diff --git a/.config/dotnet-tools.json b/.config/dotnet-tools.json new file mode 100644 index 0000000..b0e38ab --- /dev/null +++ b/.config/dotnet-tools.json @@ -0,0 +1,5 @@ +{ + "version": 1, + "isRoot": true, + "tools": {} +} \ No newline at end of file diff --git a/.dockerignore b/.dockerignore deleted file mode 100644 index fe1152b..0000000 --- a/.dockerignore +++ /dev/null @@ -1,30 +0,0 @@ -**/.classpath -**/.dockerignore -**/.env -**/.git -**/.gitignore -**/.project -**/.settings -**/.toolstarget -**/.vs -**/.vscode -**/*.*proj.user -**/*.dbmdl -**/*.jfm -**/azds.yaml -**/bin -**/charts -**/docker-compose* -**/Dockerfile* -**/node_modules -**/npm-debug.log -**/obj -**/secrets.dev.yaml -**/values.dev.yaml -LICENSE -README.md -!**/.gitignore -!.git/HEAD -!.git/config -!.git/packed-refs -!.git/refs/heads/** \ No newline at end of file diff --git a/.github/ISSUE_TEMPLATE/feature.yml b/.github/ISSUE_TEMPLATE/feature.yml new file mode 100644 index 0000000..b03f509 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/feature.yml @@ -0,0 +1,44 @@ +name: "Feature" +description: "Crie uma feature vinculada a um conjunto de features" +title: "[FEATURE] " +labels: ["feature"] +projects: ["default"] +assignees: [] +type: "FEATURE" + +body: + - type: input + id: parent-issue + attributes: + label: Issue Pai (Feature Set) + description: "Número da issue do Feature Set ao qual esta feature pertence. Exemplo: 42" + placeholder: "42" + validations: + required: true + + - type: textarea + id: description + attributes: + label: Detalhes da Implementação + description: | + Descreva o que deve ser implementado nesta feature. + placeholder: "Explicar claramente o escopo da feature." + validations: + required: true + + - type: textarea + id: steps + attributes: + label: Etapas do Desenvolvimento + description: | + Liste as etapas da feature em formato de checklist. + Exemplo: + - [ ] Criar endpoint + - [ ] Implementar testes + - [ ] Documentar + placeholder: | + - [ ] Etapa 1 + - [ ] Etapa 2 + - [ ] Etapa 3 + validations: + required: false \ No newline at end of file diff --git a/.github/ISSUE_TEMPLATE/featureset.yml b/.github/ISSUE_TEMPLATE/featureset.yml new file mode 100644 index 0000000..33d0925 Binary files /dev/null and b/.github/ISSUE_TEMPLATE/featureset.yml differ diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml new file mode 100644 index 0000000..dde9774 --- /dev/null +++ b/.github/workflows/build.yaml @@ -0,0 +1,66 @@ +name: "Build" + +on: + push: + branches: + - main + pull_request: + workflow_dispatch: + +jobs: + build-mobile: + runs-on: macos-latest + strategy: + matrix: + target: + - { framework: net8.0-android } + - { framework: net8.0-ios, runtime: iossimulator-arm64 } + fail-fast: false + + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-dotnet@v4 + with: + dotnet-version: 8.0.x + + - name: Setup Xcode 16.2 + uses: maxim-lobanov/setup-xcode@v1 + with: + xcode-version: '16.2' + + - name: Instalar workloads MAUI + run: dotnet workload install maui + + - name: Restore workloads + run: dotnet workload restore + + - name: Restore packages + run: dotnet restore ${{ github.workspace }}/src/Ayllu/Ayllu.csproj + + - name: Build + run: dotnet build ${{ github.workspace }}/src/Ayllu/Ayllu.csproj --configuration Release --framework ${{ matrix.target.framework }} ${{ matrix.target.runtime && format('--runtime {0}', matrix.target.runtime) }} --no-restore + + build-web: + runs-on: macos-15 + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-dotnet@v4 + with: + dotnet-version: 8.0.x + + - name: Instalar workloads MAUI + run: dotnet workload install maui + + - name: Restore workloads + run: dotnet workload restore + + - name: Restore packages + run: dotnet restore ${{ github.workspace }}/src/Ayllu.Web/Ayllu.Web.csproj + + - name: Build + run: dotnet build ${{ github.workspace }}/src/Ayllu.Web/Ayllu.Web.csproj --configuration Release --framework net8.0 --no-restore + + + + + \ No newline at end of file diff --git a/.github/workflows/link-feature-to-parent.yml b/.github/workflows/link-feature-to-parent.yml new file mode 100644 index 0000000..9c1d7e5 Binary files /dev/null and b/.github/workflows/link-feature-to-parent.yml differ diff --git a/.gitignore b/.gitignore index 1feccde..0fdc281 100644 --- a/.gitignore +++ b/.gitignore @@ -1,20 +1,22 @@ -################################################################################ -# Este arquivo .gitignore foi criado automaticamente pelo Microsoft(R) Visual Studio. -################################################################################ - -/.env -/.vs/Ayluu -/obj/Docker -/src/Ayllu.Api/obj -/src/Ayllu.Application/obj -/src/Ayllu.Composition/obj -/src/Ayllu.Domain/obj -/src/Ayllu.Web/obj -/src/Ayllu.Infrastructure/obj -/obj -/src/Ayllu.Api/bin/Debug/net9.0 -/src/Ayllu.Application/bin/Debug/net9.0 -/src/Ayllu.Composition/bin/Debug/net9.0 -/src/Ayllu.Domain/bin/Debug/net9.0 -/src/Ayllu.Infrastructure/bin/Debug/net9.0 -/src/Ayllu.Web/bin/Debug/net9.0 +**/bin +**/obj +**/Debug +**/Release +**/*.user +*/*.suo +**/*.cache +**/*.log +.vs +**/*.vspscc +**/*.vssscc +**/*.pdb +**/*.dbmdl +**/*.opendb +**/*.jfm +**/*.class +**/*.jar +**/*.war +**/*.ear +**/*.iml +/src/Ayllu.Github.Client/Github/Client/kiota-lock.json +/.vs/Ayllu diff --git a/.vs/Ayllu/v17/.suo b/.vs/Ayllu/v17/.suo new file mode 100644 index 0000000..0d72357 Binary files /dev/null and b/.vs/Ayllu/v17/.suo differ diff --git a/.vs/Ayllu/v17/DocumentLayout.json b/.vs/Ayllu/v17/DocumentLayout.json new file mode 100644 index 0000000..48a465a --- /dev/null +++ b/.vs/Ayllu/v17/DocumentLayout.json @@ -0,0 +1,374 @@ +{ + "Version": 1, + "WorkspaceRootPath": "D:\\RemoteCodeHub\\Ayllu\\", + "Documents": [ + { + "AbsoluteMoniker": "D:0:0:{F2EDFE53-22D8-4253-9061-C7A181AD1B3D}|workflows{F2EDFE53-22D8-4253-9061-C7A181AD1B3D}|D:\\RemoteCodeHub\\Ayllu\\.github\\workflows\\build.yaml||{8B382828-6202-11D1-8870-0000F87579D2}", + "RelativeMoniker": "D:0:0:{F2EDFE53-22D8-4253-9061-C7A181AD1B3D}|workflows{F2EDFE53-22D8-4253-9061-C7A181AD1B3D}|solutionrelative:.github\\workflows\\build.yaml||{8B382828-6202-11D1-8870-0000F87579D2}" + }, + { + "AbsoluteMoniker": "D:0:0:{54ACB41B-134C-4C67-89C3-5692359CB228}|src\\Ayllu.Github.Client\\Ayllu.Github.Client.csproj|d:\\remotecodehub\\ayllu\\src\\ayllu.github.client\\ayllu.github.client.csproj||{FA3CD31E-987B-443A-9B81-186104E8DAC1}|", + "RelativeMoniker": "D:0:0:{54ACB41B-134C-4C67-89C3-5692359CB228}|src\\Ayllu.Github.Client\\Ayllu.Github.Client.csproj|solutionrelative:src\\ayllu.github.client\\ayllu.github.client.csproj||{FA3CD31E-987B-443A-9B81-186104E8DAC1}|" + }, + { + "AbsoluteMoniker": "D:0:0:{29FF4418-8F0E-4496-9DA7-241D5E3683DE}|src\\Ayllu.Web\\Ayllu.Web.csproj|d:\\remotecodehub\\ayllu\\src\\ayllu.web\\program.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", + "RelativeMoniker": "D:0:0:{29FF4418-8F0E-4496-9DA7-241D5E3683DE}|src\\Ayllu.Web\\Ayllu.Web.csproj|solutionrelative:src\\ayllu.web\\program.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" + }, + { + "AbsoluteMoniker": "D:0:0:{29FF4418-8F0E-4496-9DA7-241D5E3683DE}|src\\Ayllu.Web\\Ayllu.Web.csproj|d:\\remotecodehub\\ayllu\\src\\ayllu.web\\ayllu.web.csproj||{FA3CD31E-987B-443A-9B81-186104E8DAC1}|", + "RelativeMoniker": "D:0:0:{29FF4418-8F0E-4496-9DA7-241D5E3683DE}|src\\Ayllu.Web\\Ayllu.Web.csproj|solutionrelative:src\\ayllu.web\\ayllu.web.csproj||{FA3CD31E-987B-443A-9B81-186104E8DAC1}|" + }, + { + "AbsoluteMoniker": "D:0:0:{29FF4418-8F0E-4496-9DA7-241D5E3683DE}|src\\Ayllu.Web\\Ayllu.Web.csproj|d:\\remotecodehub\\ayllu\\src\\ayllu.web\\ayllu.web.csproj||{04B8AB82-A572-4FEF-95CE-5222444B6B64}|", + "RelativeMoniker": "D:0:0:{29FF4418-8F0E-4496-9DA7-241D5E3683DE}|src\\Ayllu.Web\\Ayllu.Web.csproj|solutionrelative:src\\ayllu.web\\ayllu.web.csproj||{04B8AB82-A572-4FEF-95CE-5222444B6B64}|" + }, + { + "AbsoluteMoniker": "D:0:0:{29FF4418-8F0E-4496-9DA7-241D5E3683DE}|src\\Ayllu.Web\\Ayllu.Web.csproj|d:\\remotecodehub\\ayllu\\src\\ayllu.web\\app.razor||{40D31677-CBC0-4297-A9EF-89D907823A98}", + "RelativeMoniker": "D:0:0:{29FF4418-8F0E-4496-9DA7-241D5E3683DE}|src\\Ayllu.Web\\Ayllu.Web.csproj|solutionrelative:src\\ayllu.web\\app.razor||{40D31677-CBC0-4297-A9EF-89D907823A98}" + }, + { + "AbsoluteMoniker": "D:0:0:{29FF4418-8F0E-4496-9DA7-241D5E3683DE}|src\\Ayllu.Web\\Ayllu.Web.csproj|d:\\remotecodehub\\ayllu\\src\\ayllu.web\\app.razor.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", + "RelativeMoniker": "D:0:0:{29FF4418-8F0E-4496-9DA7-241D5E3683DE}|src\\Ayllu.Web\\Ayllu.Web.csproj|solutionrelative:src\\ayllu.web\\app.razor.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" + }, + { + "AbsoluteMoniker": "D:0:0:{29FF4418-8F0E-4496-9DA7-241D5E3683DE}|src\\Ayllu.Web\\Ayllu.Web.csproj|d:\\remotecodehub\\ayllu\\src\\ayllu.web\\components\\layout\\mainlayout.razor||{40D31677-CBC0-4297-A9EF-89D907823A98}", + "RelativeMoniker": "D:0:0:{29FF4418-8F0E-4496-9DA7-241D5E3683DE}|src\\Ayllu.Web\\Ayllu.Web.csproj|solutionrelative:src\\ayllu.web\\components\\layout\\mainlayout.razor||{40D31677-CBC0-4297-A9EF-89D907823A98}" + }, + { + "AbsoluteMoniker": "D:0:0:{29FF4418-8F0E-4496-9DA7-241D5E3683DE}|src\\Ayllu.Web\\Ayllu.Web.csproj|d:\\remotecodehub\\ayllu\\src\\ayllu.web\\_imports.razor||{40D31677-CBC0-4297-A9EF-89D907823A98}", + "RelativeMoniker": "D:0:0:{29FF4418-8F0E-4496-9DA7-241D5E3683DE}|src\\Ayllu.Web\\Ayllu.Web.csproj|solutionrelative:src\\ayllu.web\\_imports.razor||{40D31677-CBC0-4297-A9EF-89D907823A98}" + }, + { + "AbsoluteMoniker": "D:0:0:{29FF4418-8F0E-4496-9DA7-241D5E3683DE}|src\\Ayllu.Web\\Ayllu.Web.csproj|d:\\remotecodehub\\ayllu\\src\\ayllu.web\\components\\pages\\weather.razor||{40D31677-CBC0-4297-A9EF-89D907823A98}", + "RelativeMoniker": "D:0:0:{29FF4418-8F0E-4496-9DA7-241D5E3683DE}|src\\Ayllu.Web\\Ayllu.Web.csproj|solutionrelative:src\\ayllu.web\\components\\pages\\weather.razor||{40D31677-CBC0-4297-A9EF-89D907823A98}" + }, + { + "AbsoluteMoniker": "D:0:0:{29FF4418-8F0E-4496-9DA7-241D5E3683DE}|src\\Ayllu.Web\\Ayllu.Web.csproj|d:\\remotecodehub\\ayllu\\src\\ayllu.web\\components\\pages\\home.razor||{40D31677-CBC0-4297-A9EF-89D907823A98}", + "RelativeMoniker": "D:0:0:{29FF4418-8F0E-4496-9DA7-241D5E3683DE}|src\\Ayllu.Web\\Ayllu.Web.csproj|solutionrelative:src\\ayllu.web\\components\\pages\\home.razor||{40D31677-CBC0-4297-A9EF-89D907823A98}" + }, + { + "AbsoluteMoniker": "D:0:0:{29FF4418-8F0E-4496-9DA7-241D5E3683DE}|src\\Ayllu.Web\\Ayllu.Web.csproj|d:\\remotecodehub\\ayllu\\src\\ayllu.web\\components\\pages\\counter.razor||{40D31677-CBC0-4297-A9EF-89D907823A98}", + "RelativeMoniker": "D:0:0:{29FF4418-8F0E-4496-9DA7-241D5E3683DE}|src\\Ayllu.Web\\Ayllu.Web.csproj|solutionrelative:src\\ayllu.web\\components\\pages\\counter.razor||{40D31677-CBC0-4297-A9EF-89D907823A98}" + }, + { + "AbsoluteMoniker": "D:0:0:{29FF4418-8F0E-4496-9DA7-241D5E3683DE}|src\\Ayllu.Web\\Ayllu.Web.csproj|d:\\remotecodehub\\ayllu\\src\\ayllu.web\\wwwroot\\index.html||{40D31677-CBC0-4297-A9EF-89D907823A98}", + "RelativeMoniker": "D:0:0:{29FF4418-8F0E-4496-9DA7-241D5E3683DE}|src\\Ayllu.Web\\Ayllu.Web.csproj|solutionrelative:src\\ayllu.web\\wwwroot\\index.html||{40D31677-CBC0-4297-A9EF-89D907823A98}" + }, + { + "AbsoluteMoniker": "D:0:0:{F2EDFE53-22D8-4253-9061-C7A181AD1B3D}|workflows{F2EDFE53-22D8-4253-9061-C7A181AD1B3D}|D:\\RemoteCodeHub\\Ayllu\\.github\\workflows\\link-feature-to-parent.yml||{8B382828-6202-11D1-8870-0000F87579D2}", + "RelativeMoniker": "D:0:0:{F2EDFE53-22D8-4253-9061-C7A181AD1B3D}|workflows{F2EDFE53-22D8-4253-9061-C7A181AD1B3D}|solutionrelative:.github\\workflows\\link-feature-to-parent.yml||{8B382828-6202-11D1-8870-0000F87579D2}" + }, + { + "AbsoluteMoniker": "D:0:0:{A2FE74E1-B743-11D0-AE1A-00A0C90FFFC3}|\u003CMiscFiles\u003E|D:\\RemoteCodeHub\\Ayllu\\src\\Aullu\\Components\\Pages\\Home.razor||{40D31677-CBC0-4297-A9EF-89D907823A98}", + "RelativeMoniker": "D:0:0:{A2FE74E1-B743-11D0-AE1A-00A0C90FFFC3}|\u003CMiscFiles\u003E|solutionrelative:src\\Aullu\\Components\\Pages\\Home.razor||{40D31677-CBC0-4297-A9EF-89D907823A98}" + } + ], + "DocumentGroupContainers": [ + { + "Orientation": 0, + "VerticalTabListWidth": 256, + "DocumentGroups": [ + { + "DockedWidth": 200, + "SelectedChildIndex": -1, + "Children": [ + { + "$type": "Bookmark", + "Name": "ST:0:0:{cf577b8c-4134-11d2-83e5-00c04f9902c1}" + }, + { + "$type": "Bookmark", + "Name": "ST:0:0:{f2e84780-2af1-11d1-a7fa-00a0c9110051}" + }, + { + "$type": "Bookmark", + "Name": "ST:1:0:{90243340-bd7a-11d0-93ef-00a0c90f2734}" + }, + { + "$type": "Bookmark", + "Name": "ST:0:0:{4a18f9d0-b838-11d0-93eb-00a0c90f2734}" + }, + { + "$type": "Bookmark", + "Name": "ST:0:0:{0504ff91-9d61-11d0-a794-00a0c9110051}" + }, + { + "$type": "Bookmark", + "Name": "ST:0:0:{797f5b3d-853a-4854-a9f2-c488bac2661b}" + }, + { + "$type": "Bookmark", + "Name": "ST:136:0:{75188d03-9892-4ae2-abf1-207126247ce5}" + }, + { + "$type": "Bookmark", + "Name": "ST:137:0:{1fc202d4-d401-403c-9834-5b218574bb67}" + }, + { + "$type": "Bookmark", + "Name": "ST:138:0:{75188d03-9892-4ae2-abf1-207126247ce5}" + }, + { + "$type": "Bookmark", + "Name": "ST:368611929:0:{83107a3e-496a-485e-b455-16ddb978e55e}" + }, + { + "$type": "Bookmark", + "Name": "ST:1155921687:0:{83107a3e-496a-485e-b455-16ddb978e55e}" + }, + { + "$type": "Bookmark", + "Name": "ST:1:0:{e8b06f52-6d01-11d2-aa7d-00c04f990343}" + }, + { + "$type": "Bookmark", + "Name": "ST:2:0:{e8b06f52-6d01-11d2-aa7d-00c04f990343}" + }, + { + "$type": "Bookmark", + "Name": "ST:2:0:{57d563b6-44a5-47df-85be-f4199ad6b651}" + }, + { + "$type": "Bookmark", + "Name": "ST:12:0:{d212f56b-c48a-434c-a121-1c5d80b59b9f}" + }, + { + "$type": "Bookmark", + "Name": "ST:254354193:0:{71f361cc-493f-47c0-923f-f2570b6f8618}" + }, + { + "$type": "Bookmark", + "Name": "ST:36:0:{d212f56b-c48a-434c-a121-1c5d80b59b9f}" + }, + { + "$type": "Bookmark", + "Name": "ST:11:0:{d212f56b-c48a-434c-a121-1c5d80b59b9f}" + } + ] + }, + { + "DockedWidth": 379, + "SelectedChildIndex": 8, + "Children": [ + { + "$type": "Document", + "DocumentIndex": 1, + "Title": "Ayllu.Github.Client", + "DocumentMoniker": "D:\\RemoteCodeHub\\Ayllu\\src\\Ayllu.Github.Client\\Ayllu.Github.Client.csproj", + "RelativeDocumentMoniker": "src\\Ayllu.Github.Client\\Ayllu.Github.Client.csproj", + "ToolTip": "D:\\RemoteCodeHub\\Ayllu\\src\\Ayllu.Github.Client\\Ayllu.Github.Client.csproj", + "RelativeToolTip": "src\\Ayllu.Github.Client\\Ayllu.Github.Client.csproj", + "ViewState": "AgIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA==", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000758|", + "WhenOpened": "2025-08-19T12:04:23.813Z", + "EditorCaption": "" + }, + { + "$type": "Document", + "DocumentIndex": 4, + "Title": "Ayllu.Web", + "DocumentMoniker": "D:\\RemoteCodeHub\\Ayllu\\src\\Ayllu.Web\\Ayllu.Web.csproj", + "RelativeDocumentMoniker": "src\\Ayllu.Web\\Ayllu.Web.csproj", + "ToolTip": "D:\\RemoteCodeHub\\Ayllu\\src\\Ayllu.Web\\Ayllu.Web.csproj", + "RelativeToolTip": "src\\Ayllu.Web\\Ayllu.Web.csproj", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000758|", + "WhenOpened": "2025-08-19T10:39:59.365Z", + "EditorCaption": "" + }, + { + "$type": "Document", + "DocumentIndex": 5, + "Title": "App.razor", + "DocumentMoniker": "D:\\RemoteCodeHub\\Ayllu\\src\\Ayllu.Web\\App.razor", + "RelativeDocumentMoniker": "src\\Ayllu.Web\\App.razor", + "ToolTip": "D:\\RemoteCodeHub\\Ayllu\\src\\Ayllu.Web\\App.razor", + "RelativeToolTip": "src\\Ayllu.Web\\App.razor", + "ViewState": "AgIAAAAAAAAAAAAAAAAAAAwAAAAPAAAAAAAAAA==", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000759|", + "WhenOpened": "2025-08-19T10:01:04.076Z", + "EditorCaption": "" + }, + { + "$type": "Document", + "DocumentIndex": 2, + "Title": "Program.cs", + "DocumentMoniker": "D:\\RemoteCodeHub\\Ayllu\\src\\Ayllu.Web\\Program.cs", + "RelativeDocumentMoniker": "src\\Ayllu.Web\\Program.cs", + "ToolTip": "D:\\RemoteCodeHub\\Ayllu\\src\\Ayllu.Web\\Program.cs", + "RelativeToolTip": "src\\Ayllu.Web\\Program.cs", + "ViewState": "AgIAAAAAAAAAAAAAAAAAAA0AAAAAAAAAAAAAAA==", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", + "WhenOpened": "2025-08-19T09:55:42.958Z", + "EditorCaption": "" + }, + { + "$type": "Bookmark", + "Name": "ST:0:0:{34e76e81-ee4a-11d0-ae2e-00a0c90fffc3}" + }, + { + "$type": "Bookmark", + "Name": "ST:1:0:{d212f56b-c48a-434c-a121-1c5d80b59b9f}" + }, + { + "$type": "Bookmark", + "Name": "ST:0:0:{d78612c7-9962-4b83-95d9-268046dad23a}" + }, + { + "$type": "Document", + "DocumentIndex": 3, + "Title": "Ayllu.Web", + "DocumentMoniker": "D:\\RemoteCodeHub\\Ayllu\\src\\Ayllu.Web\\Ayllu.Web.csproj", + "RelativeDocumentMoniker": "src\\Ayllu.Web\\Ayllu.Web.csproj", + "ToolTip": "D:\\RemoteCodeHub\\Ayllu\\src\\Ayllu.Web\\Ayllu.Web.csproj", + "RelativeToolTip": "src\\Ayllu.Web\\Ayllu.Web.csproj", + "ViewState": "AgIAAAAAAAAAAAAAAAAAACIAAAAPAAAAAAAAAA==", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000758|", + "WhenOpened": "2025-08-19T09:14:55.636Z", + "EditorCaption": "" + }, + { + "$type": "Document", + "DocumentIndex": 0, + "Title": "build.yaml", + "DocumentMoniker": "D:\\RemoteCodeHub\\Ayllu\\.github\\workflows\\build.yaml", + "RelativeDocumentMoniker": ".github\\workflows\\build.yaml", + "ToolTip": "D:\\RemoteCodeHub\\Ayllu\\.github\\workflows\\build.yaml", + "RelativeToolTip": ".github\\workflows\\build.yaml", + "ViewState": "AgIAABsAAAAAAAAAAAAAADUAAABKAAAAAAAAAA==", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.003775|", + "WhenOpened": "2025-08-19T02:29:40.139Z", + "EditorCaption": "" + }, + { + "$type": "Document", + "DocumentIndex": 6, + "Title": "App.razor.cs", + "DocumentMoniker": "D:\\RemoteCodeHub\\Ayllu\\src\\Ayllu.Web\\App.razor.cs", + "RelativeDocumentMoniker": "src\\Ayllu.Web\\App.razor.cs", + "ToolTip": "D:\\RemoteCodeHub\\Ayllu\\src\\Ayllu.Web\\App.razor.cs", + "RelativeToolTip": "src\\Ayllu.Web\\App.razor.cs", + "ViewState": "AgIAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAA==", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", + "WhenOpened": "2025-08-19T10:00:45.453Z", + "EditorCaption": "" + }, + { + "$type": "Document", + "DocumentIndex": 7, + "Title": "MainLayout.razor", + "DocumentMoniker": "D:\\RemoteCodeHub\\Ayllu\\src\\Ayllu.Web\\Components\\Layout\\MainLayout.razor", + "RelativeDocumentMoniker": "src\\Ayllu.Web\\Components\\Layout\\MainLayout.razor", + "ToolTip": "D:\\RemoteCodeHub\\Ayllu\\src\\Ayllu.Web\\Components\\Layout\\MainLayout.razor", + "RelativeToolTip": "src\\Ayllu.Web\\Components\\Layout\\MainLayout.razor", + "ViewState": "AgIAAAAAAAAAAAAAAAAAAAoAAAAAAAAAAAAAAA==", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000759|", + "WhenOpened": "2025-08-19T09:58:03.386Z", + "EditorCaption": "" + }, + { + "$type": "Document", + "DocumentIndex": 9, + "Title": "Weather.razor", + "DocumentMoniker": "D:\\RemoteCodeHub\\Ayllu\\src\\Ayllu.Web\\Components\\Pages\\Weather.razor", + "RelativeDocumentMoniker": "src\\Ayllu.Web\\Components\\Pages\\Weather.razor", + "ToolTip": "D:\\RemoteCodeHub\\Ayllu\\src\\Ayllu.Web\\Components\\Pages\\Weather.razor", + "RelativeToolTip": "src\\Ayllu.Web\\Components\\Pages\\Weather.razor", + "ViewState": "AgIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA==", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000759|", + "WhenOpened": "2025-08-19T09:57:20.634Z", + "EditorCaption": "" + }, + { + "$type": "Document", + "DocumentIndex": 10, + "Title": "Home.razor", + "DocumentMoniker": "D:\\RemoteCodeHub\\Ayllu\\src\\Ayllu.Web\\Components\\Pages\\Home.razor", + "RelativeDocumentMoniker": "src\\Ayllu.Web\\Components\\Pages\\Home.razor", + "ToolTip": "D:\\RemoteCodeHub\\Ayllu\\src\\Ayllu.Web\\Components\\Pages\\Home.razor", + "RelativeToolTip": "src\\Ayllu.Web\\Components\\Pages\\Home.razor", + "ViewState": "AgIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA==", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000759|", + "WhenOpened": "2025-08-19T09:57:18.199Z", + "EditorCaption": "" + }, + { + "$type": "Document", + "DocumentIndex": 11, + "Title": "Counter.razor", + "DocumentMoniker": "D:\\RemoteCodeHub\\Ayllu\\src\\Ayllu.Web\\Components\\Pages\\Counter.razor", + "RelativeDocumentMoniker": "src\\Ayllu.Web\\Components\\Pages\\Counter.razor", + "ToolTip": "D:\\RemoteCodeHub\\Ayllu\\src\\Ayllu.Web\\Components\\Pages\\Counter.razor", + "RelativeToolTip": "src\\Ayllu.Web\\Components\\Pages\\Counter.razor", + "ViewState": "AgIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA==", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000759|", + "WhenOpened": "2025-08-19T09:57:04.77Z", + "EditorCaption": "" + }, + { + "$type": "Document", + "DocumentIndex": 12, + "Title": "index.html", + "DocumentMoniker": "D:\\RemoteCodeHub\\Ayllu\\src\\Ayllu.Web\\wwwroot\\index.html", + "RelativeDocumentMoniker": "src\\Ayllu.Web\\wwwroot\\index.html", + "ToolTip": "D:\\RemoteCodeHub\\Ayllu\\src\\Ayllu.Web\\wwwroot\\index.html", + "RelativeToolTip": "src\\Ayllu.Web\\wwwroot\\index.html", + "ViewState": "AgIAAAAAAAAAAAAAAAAAACEAAABDAAAAAAAAAA==", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.001512|", + "WhenOpened": "2025-08-19T09:45:08.633Z", + "EditorCaption": "" + }, + { + "$type": "Document", + "DocumentIndex": 8, + "Title": "_Imports.razor", + "DocumentMoniker": "D:\\RemoteCodeHub\\Ayllu\\src\\Ayllu.Web\\_Imports.razor", + "RelativeDocumentMoniker": "src\\Ayllu.Web\\_Imports.razor", + "ToolTip": "D:\\RemoteCodeHub\\Ayllu\\src\\Ayllu.Web\\_Imports.razor", + "RelativeToolTip": "src\\Ayllu.Web\\_Imports.razor", + "ViewState": "AgIAAAAAAAAAAAAAAAAAAAsAAAAiAAAAAAAAAA==", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000759|", + "WhenOpened": "2025-08-19T09:16:34.47Z", + "EditorCaption": "" + }, + { + "$type": "Bookmark", + "Name": "ST:0:0:{a80febb4-e7e0-4147-b476-21aaf2453969}" + }, + { + "$type": "Document", + "DocumentIndex": 13, + "Title": "link-feature-to-parent.yml", + "DocumentMoniker": "D:\\RemoteCodeHub\\Ayllu\\.github\\workflows\\link-feature-to-parent.yml", + "RelativeDocumentMoniker": ".github\\workflows\\link-feature-to-parent.yml", + "ToolTip": "D:\\RemoteCodeHub\\Ayllu\\.github\\workflows\\link-feature-to-parent.yml", + "RelativeToolTip": ".github\\workflows\\link-feature-to-parent.yml", + "ViewState": "AgIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA==", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.003775|", + "WhenOpened": "2025-08-19T09:12:14.112Z", + "EditorCaption": "" + }, + { + "$type": "Bookmark", + "Name": "ST:40:0:{d212f56b-c48a-434c-a121-1c5d80b59b9f}" + }, + { + "$type": "Bookmark", + "Name": "ST:0:0:{e1b7d1f8-9b3c-49b1-8f4f-bfc63a88835d}" + }, + { + "$type": "Document", + "DocumentIndex": 14, + "Title": "Home.razor", + "DocumentMoniker": "D:\\RemoteCodeHub\\Ayllu\\src\\Aullu\\Components\\Pages\\Home.razor", + "RelativeDocumentMoniker": "src\\Aullu\\Components\\Pages\\Home.razor", + "ToolTip": "D:\\RemoteCodeHub\\Ayllu\\src\\Aullu\\Components\\Pages\\Home.razor", + "RelativeToolTip": "src\\Aullu\\Components\\Pages\\Home.razor", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000759|", + "WhenOpened": "2025-08-19T02:50:20.859Z" + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Ayllu.sln b/Ayllu.sln new file mode 100644 index 0000000..bb343c2 --- /dev/null +++ b/Ayllu.sln @@ -0,0 +1,109 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 17 +VisualStudioVersion = 17.0.31903.59 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{827E0CD3-B72D-47B6-A68D-7590B98EB39B}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Ayllu.Web", "src\Ayllu.Web\Ayllu.Web.csproj", "{29FF4418-8F0E-4496-9DA7-241D5E3683DE}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "scripts", "scripts", "{8EC462FD-D22E-90A8-E5CE-7E832BA40C5D}" + ProjectSection(SolutionItems) = preProject + scripts\github-client-generator.cmd = scripts\github-client-generator.cmd + EndProjectSection +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Ayllu", "src\Ayllu\Ayllu.csproj", "{267EDB2A-5437-4EBF-94D9-AED7EA0EB2BC}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = ".github", ".github", "{02EA681E-C7D8-13C7-8484-4AC65E1B71E8}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "workflows", "workflows", "{F2EDFE53-22D8-4253-9061-C7A181AD1B3D}" + ProjectSection(SolutionItems) = preProject + .github\workflows\build.yaml = .github\workflows\build.yaml + .github\workflows\link-feature-to-parent.yml = .github\workflows\link-feature-to-parent.yml + EndProjectSection +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "ISSUE_TEMPLATE", "ISSUE_TEMPLATE", "{9DD0D30B-2278-4B30-9EB3-E06ACB4140E5}" + ProjectSection(SolutionItems) = preProject + .github\ISSUE_TEMPLATE\feature.yml = .github\ISSUE_TEMPLATE\feature.yml + .github\ISSUE_TEMPLATE\featureset.yml = .github\ISSUE_TEMPLATE\featureset.yml + EndProjectSection +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Ayllu.Github.Client", "src\Ayllu.Github.Client\Ayllu.Github.Client.csproj", "{54ACB41B-134C-4C67-89C3-5692359CB228}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = ".config", ".config", "{10A5D6FF-A764-4702-B76A-30DAC09EB48E}" + ProjectSection(SolutionItems) = preProject + .config\dotnet-tools.json = .config\dotnet-tools.json + EndProjectSection +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{380A7511-A354-6D7A-0CC0-8FA1F1BA7B6C}" + ProjectSection(SolutionItems) = preProject + .gitignore = .gitignore + EndProjectSection +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Debug|x64 = Debug|x64 + Debug|x86 = Debug|x86 + Release|Any CPU = Release|Any CPU + Release|x64 = Release|x64 + Release|x86 = Release|x86 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {29FF4418-8F0E-4496-9DA7-241D5E3683DE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {29FF4418-8F0E-4496-9DA7-241D5E3683DE}.Debug|Any CPU.Build.0 = Debug|Any CPU + {29FF4418-8F0E-4496-9DA7-241D5E3683DE}.Debug|x64.ActiveCfg = Debug|Any CPU + {29FF4418-8F0E-4496-9DA7-241D5E3683DE}.Debug|x64.Build.0 = Debug|Any CPU + {29FF4418-8F0E-4496-9DA7-241D5E3683DE}.Debug|x86.ActiveCfg = Debug|Any CPU + {29FF4418-8F0E-4496-9DA7-241D5E3683DE}.Debug|x86.Build.0 = Debug|Any CPU + {29FF4418-8F0E-4496-9DA7-241D5E3683DE}.Release|Any CPU.ActiveCfg = Release|Any CPU + {29FF4418-8F0E-4496-9DA7-241D5E3683DE}.Release|Any CPU.Build.0 = Release|Any CPU + {29FF4418-8F0E-4496-9DA7-241D5E3683DE}.Release|x64.ActiveCfg = Release|Any CPU + {29FF4418-8F0E-4496-9DA7-241D5E3683DE}.Release|x64.Build.0 = Release|Any CPU + {29FF4418-8F0E-4496-9DA7-241D5E3683DE}.Release|x86.ActiveCfg = Release|Any CPU + {29FF4418-8F0E-4496-9DA7-241D5E3683DE}.Release|x86.Build.0 = Release|Any CPU + {267EDB2A-5437-4EBF-94D9-AED7EA0EB2BC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {267EDB2A-5437-4EBF-94D9-AED7EA0EB2BC}.Debug|Any CPU.Build.0 = Debug|Any CPU + {267EDB2A-5437-4EBF-94D9-AED7EA0EB2BC}.Debug|Any CPU.Deploy.0 = Debug|Any CPU + {267EDB2A-5437-4EBF-94D9-AED7EA0EB2BC}.Debug|x64.ActiveCfg = Debug|Any CPU + {267EDB2A-5437-4EBF-94D9-AED7EA0EB2BC}.Debug|x64.Build.0 = Debug|Any CPU + {267EDB2A-5437-4EBF-94D9-AED7EA0EB2BC}.Debug|x64.Deploy.0 = Debug|Any CPU + {267EDB2A-5437-4EBF-94D9-AED7EA0EB2BC}.Debug|x86.ActiveCfg = Debug|Any CPU + {267EDB2A-5437-4EBF-94D9-AED7EA0EB2BC}.Debug|x86.Build.0 = Debug|Any CPU + {267EDB2A-5437-4EBF-94D9-AED7EA0EB2BC}.Debug|x86.Deploy.0 = Debug|Any CPU + {267EDB2A-5437-4EBF-94D9-AED7EA0EB2BC}.Release|Any CPU.ActiveCfg = Release|Any CPU + {267EDB2A-5437-4EBF-94D9-AED7EA0EB2BC}.Release|Any CPU.Build.0 = Release|Any CPU + {267EDB2A-5437-4EBF-94D9-AED7EA0EB2BC}.Release|Any CPU.Deploy.0 = Release|Any CPU + {267EDB2A-5437-4EBF-94D9-AED7EA0EB2BC}.Release|x64.ActiveCfg = Release|Any CPU + {267EDB2A-5437-4EBF-94D9-AED7EA0EB2BC}.Release|x64.Build.0 = Release|Any CPU + {267EDB2A-5437-4EBF-94D9-AED7EA0EB2BC}.Release|x64.Deploy.0 = Release|Any CPU + {267EDB2A-5437-4EBF-94D9-AED7EA0EB2BC}.Release|x86.ActiveCfg = Release|Any CPU + {267EDB2A-5437-4EBF-94D9-AED7EA0EB2BC}.Release|x86.Build.0 = Release|Any CPU + {267EDB2A-5437-4EBF-94D9-AED7EA0EB2BC}.Release|x86.Deploy.0 = Release|Any CPU + {54ACB41B-134C-4C67-89C3-5692359CB228}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {54ACB41B-134C-4C67-89C3-5692359CB228}.Debug|Any CPU.Build.0 = Debug|Any CPU + {54ACB41B-134C-4C67-89C3-5692359CB228}.Debug|x64.ActiveCfg = Debug|Any CPU + {54ACB41B-134C-4C67-89C3-5692359CB228}.Debug|x64.Build.0 = Debug|Any CPU + {54ACB41B-134C-4C67-89C3-5692359CB228}.Debug|x86.ActiveCfg = Debug|Any CPU + {54ACB41B-134C-4C67-89C3-5692359CB228}.Debug|x86.Build.0 = Debug|Any CPU + {54ACB41B-134C-4C67-89C3-5692359CB228}.Release|Any CPU.ActiveCfg = Release|Any CPU + {54ACB41B-134C-4C67-89C3-5692359CB228}.Release|Any CPU.Build.0 = Release|Any CPU + {54ACB41B-134C-4C67-89C3-5692359CB228}.Release|x64.ActiveCfg = Release|Any CPU + {54ACB41B-134C-4C67-89C3-5692359CB228}.Release|x64.Build.0 = Release|Any CPU + {54ACB41B-134C-4C67-89C3-5692359CB228}.Release|x86.ActiveCfg = Release|Any CPU + {54ACB41B-134C-4C67-89C3-5692359CB228}.Release|x86.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(NestedProjects) = preSolution + {29FF4418-8F0E-4496-9DA7-241D5E3683DE} = {827E0CD3-B72D-47B6-A68D-7590B98EB39B} + {267EDB2A-5437-4EBF-94D9-AED7EA0EB2BC} = {827E0CD3-B72D-47B6-A68D-7590B98EB39B} + {F2EDFE53-22D8-4253-9061-C7A181AD1B3D} = {02EA681E-C7D8-13C7-8484-4AC65E1B71E8} + {9DD0D30B-2278-4B30-9EB3-E06ACB4140E5} = {02EA681E-C7D8-13C7-8484-4AC65E1B71E8} + {54ACB41B-134C-4C67-89C3-5692359CB228} = {827E0CD3-B72D-47B6-A68D-7590B98EB39B} + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {3BD3208E-3881-4936-BA85-8CD446F8E643} + EndGlobalSection +EndGlobal diff --git a/Ayluu.sln b/Ayluu.sln deleted file mode 100644 index a277fbe..0000000 --- a/Ayluu.sln +++ /dev/null @@ -1,128 +0,0 @@ - -Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio Version 17 -VisualStudioVersion = 17.0.31903.59 -MinimumVisualStudioVersion = 10.0.40219.1 -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{827E0CD3-B72D-47B6-A68D-7590B98EB39B}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Ayllu.Api", "src\Ayllu.Api\Ayllu.Api.csproj", "{776E4AEA-6B98-4917-824D-B95B40F070DB}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Ayllu.Web", "src\Ayllu.Web\Ayllu.Web.csproj", "{29FF4418-8F0E-4496-9DA7-241D5E3683DE}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Ayllu.Application", "src\Ayllu.Application\Ayllu.Application.csproj", "{40F8F3D6-EE5B-4FA8-AB4D-3682D42BBF6A}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Ayllu.Domain", "src\Ayllu.Domain\Ayllu.Domain.csproj", "{D7A75ADF-A9E1-41F0-9C06-A95473EAAE8C}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Ayllu.Composition", "src\Ayllu.Composition\Ayllu.Composition.csproj", "{EE396B31-5A18-40D8-92F6-3DB32987CA72}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Ayllu.Infrastructure", "src\Ayllu.Infrastructure\Ayllu.Infrastructure.csproj", "{4C1BC75E-9D27-4474-B600-4A44F27B3F08}" -EndProject -Project("{E53339B2-1760-4266-BCC7-CA923CBCF16C}") = "docker-compose", "docker-compose.dcproj", "{81DDED9D-158B-E303-5F62-77A2896D2A5A}" -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Any CPU = Debug|Any CPU - Debug|x64 = Debug|x64 - Debug|x86 = Debug|x86 - Release|Any CPU = Release|Any CPU - Release|x64 = Release|x64 - Release|x86 = Release|x86 - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {776E4AEA-6B98-4917-824D-B95B40F070DB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {776E4AEA-6B98-4917-824D-B95B40F070DB}.Debug|Any CPU.Build.0 = Debug|Any CPU - {776E4AEA-6B98-4917-824D-B95B40F070DB}.Debug|x64.ActiveCfg = Debug|Any CPU - {776E4AEA-6B98-4917-824D-B95B40F070DB}.Debug|x64.Build.0 = Debug|Any CPU - {776E4AEA-6B98-4917-824D-B95B40F070DB}.Debug|x86.ActiveCfg = Debug|Any CPU - {776E4AEA-6B98-4917-824D-B95B40F070DB}.Debug|x86.Build.0 = Debug|Any CPU - {776E4AEA-6B98-4917-824D-B95B40F070DB}.Release|Any CPU.ActiveCfg = Release|Any CPU - {776E4AEA-6B98-4917-824D-B95B40F070DB}.Release|Any CPU.Build.0 = Release|Any CPU - {776E4AEA-6B98-4917-824D-B95B40F070DB}.Release|x64.ActiveCfg = Release|Any CPU - {776E4AEA-6B98-4917-824D-B95B40F070DB}.Release|x64.Build.0 = Release|Any CPU - {776E4AEA-6B98-4917-824D-B95B40F070DB}.Release|x86.ActiveCfg = Release|Any CPU - {776E4AEA-6B98-4917-824D-B95B40F070DB}.Release|x86.Build.0 = Release|Any CPU - {29FF4418-8F0E-4496-9DA7-241D5E3683DE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {29FF4418-8F0E-4496-9DA7-241D5E3683DE}.Debug|Any CPU.Build.0 = Debug|Any CPU - {29FF4418-8F0E-4496-9DA7-241D5E3683DE}.Debug|x64.ActiveCfg = Debug|Any CPU - {29FF4418-8F0E-4496-9DA7-241D5E3683DE}.Debug|x64.Build.0 = Debug|Any CPU - {29FF4418-8F0E-4496-9DA7-241D5E3683DE}.Debug|x86.ActiveCfg = Debug|Any CPU - {29FF4418-8F0E-4496-9DA7-241D5E3683DE}.Debug|x86.Build.0 = Debug|Any CPU - {29FF4418-8F0E-4496-9DA7-241D5E3683DE}.Release|Any CPU.ActiveCfg = Release|Any CPU - {29FF4418-8F0E-4496-9DA7-241D5E3683DE}.Release|Any CPU.Build.0 = Release|Any CPU - {29FF4418-8F0E-4496-9DA7-241D5E3683DE}.Release|x64.ActiveCfg = Release|Any CPU - {29FF4418-8F0E-4496-9DA7-241D5E3683DE}.Release|x64.Build.0 = Release|Any CPU - {29FF4418-8F0E-4496-9DA7-241D5E3683DE}.Release|x86.ActiveCfg = Release|Any CPU - {29FF4418-8F0E-4496-9DA7-241D5E3683DE}.Release|x86.Build.0 = Release|Any CPU - {40F8F3D6-EE5B-4FA8-AB4D-3682D42BBF6A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {40F8F3D6-EE5B-4FA8-AB4D-3682D42BBF6A}.Debug|Any CPU.Build.0 = Debug|Any CPU - {40F8F3D6-EE5B-4FA8-AB4D-3682D42BBF6A}.Debug|x64.ActiveCfg = Debug|Any CPU - {40F8F3D6-EE5B-4FA8-AB4D-3682D42BBF6A}.Debug|x64.Build.0 = Debug|Any CPU - {40F8F3D6-EE5B-4FA8-AB4D-3682D42BBF6A}.Debug|x86.ActiveCfg = Debug|Any CPU - {40F8F3D6-EE5B-4FA8-AB4D-3682D42BBF6A}.Debug|x86.Build.0 = Debug|Any CPU - {40F8F3D6-EE5B-4FA8-AB4D-3682D42BBF6A}.Release|Any CPU.ActiveCfg = Release|Any CPU - {40F8F3D6-EE5B-4FA8-AB4D-3682D42BBF6A}.Release|Any CPU.Build.0 = Release|Any CPU - {40F8F3D6-EE5B-4FA8-AB4D-3682D42BBF6A}.Release|x64.ActiveCfg = Release|Any CPU - {40F8F3D6-EE5B-4FA8-AB4D-3682D42BBF6A}.Release|x64.Build.0 = Release|Any CPU - {40F8F3D6-EE5B-4FA8-AB4D-3682D42BBF6A}.Release|x86.ActiveCfg = Release|Any CPU - {40F8F3D6-EE5B-4FA8-AB4D-3682D42BBF6A}.Release|x86.Build.0 = Release|Any CPU - {D7A75ADF-A9E1-41F0-9C06-A95473EAAE8C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {D7A75ADF-A9E1-41F0-9C06-A95473EAAE8C}.Debug|Any CPU.Build.0 = Debug|Any CPU - {D7A75ADF-A9E1-41F0-9C06-A95473EAAE8C}.Debug|x64.ActiveCfg = Debug|Any CPU - {D7A75ADF-A9E1-41F0-9C06-A95473EAAE8C}.Debug|x64.Build.0 = Debug|Any CPU - {D7A75ADF-A9E1-41F0-9C06-A95473EAAE8C}.Debug|x86.ActiveCfg = Debug|Any CPU - {D7A75ADF-A9E1-41F0-9C06-A95473EAAE8C}.Debug|x86.Build.0 = Debug|Any CPU - {D7A75ADF-A9E1-41F0-9C06-A95473EAAE8C}.Release|Any CPU.ActiveCfg = Release|Any CPU - {D7A75ADF-A9E1-41F0-9C06-A95473EAAE8C}.Release|Any CPU.Build.0 = Release|Any CPU - {D7A75ADF-A9E1-41F0-9C06-A95473EAAE8C}.Release|x64.ActiveCfg = Release|Any CPU - {D7A75ADF-A9E1-41F0-9C06-A95473EAAE8C}.Release|x64.Build.0 = Release|Any CPU - {D7A75ADF-A9E1-41F0-9C06-A95473EAAE8C}.Release|x86.ActiveCfg = Release|Any CPU - {D7A75ADF-A9E1-41F0-9C06-A95473EAAE8C}.Release|x86.Build.0 = Release|Any CPU - {EE396B31-5A18-40D8-92F6-3DB32987CA72}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {EE396B31-5A18-40D8-92F6-3DB32987CA72}.Debug|Any CPU.Build.0 = Debug|Any CPU - {EE396B31-5A18-40D8-92F6-3DB32987CA72}.Debug|x64.ActiveCfg = Debug|Any CPU - {EE396B31-5A18-40D8-92F6-3DB32987CA72}.Debug|x64.Build.0 = Debug|Any CPU - {EE396B31-5A18-40D8-92F6-3DB32987CA72}.Debug|x86.ActiveCfg = Debug|Any CPU - {EE396B31-5A18-40D8-92F6-3DB32987CA72}.Debug|x86.Build.0 = Debug|Any CPU - {EE396B31-5A18-40D8-92F6-3DB32987CA72}.Release|Any CPU.ActiveCfg = Release|Any CPU - {EE396B31-5A18-40D8-92F6-3DB32987CA72}.Release|Any CPU.Build.0 = Release|Any CPU - {EE396B31-5A18-40D8-92F6-3DB32987CA72}.Release|x64.ActiveCfg = Release|Any CPU - {EE396B31-5A18-40D8-92F6-3DB32987CA72}.Release|x64.Build.0 = Release|Any CPU - {EE396B31-5A18-40D8-92F6-3DB32987CA72}.Release|x86.ActiveCfg = Release|Any CPU - {EE396B31-5A18-40D8-92F6-3DB32987CA72}.Release|x86.Build.0 = Release|Any CPU - {4C1BC75E-9D27-4474-B600-4A44F27B3F08}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {4C1BC75E-9D27-4474-B600-4A44F27B3F08}.Debug|Any CPU.Build.0 = Debug|Any CPU - {4C1BC75E-9D27-4474-B600-4A44F27B3F08}.Debug|x64.ActiveCfg = Debug|Any CPU - {4C1BC75E-9D27-4474-B600-4A44F27B3F08}.Debug|x64.Build.0 = Debug|Any CPU - {4C1BC75E-9D27-4474-B600-4A44F27B3F08}.Debug|x86.ActiveCfg = Debug|Any CPU - {4C1BC75E-9D27-4474-B600-4A44F27B3F08}.Debug|x86.Build.0 = Debug|Any CPU - {4C1BC75E-9D27-4474-B600-4A44F27B3F08}.Release|Any CPU.ActiveCfg = Release|Any CPU - {4C1BC75E-9D27-4474-B600-4A44F27B3F08}.Release|Any CPU.Build.0 = Release|Any CPU - {4C1BC75E-9D27-4474-B600-4A44F27B3F08}.Release|x64.ActiveCfg = Release|Any CPU - {4C1BC75E-9D27-4474-B600-4A44F27B3F08}.Release|x64.Build.0 = Release|Any CPU - {4C1BC75E-9D27-4474-B600-4A44F27B3F08}.Release|x86.ActiveCfg = Release|Any CPU - {4C1BC75E-9D27-4474-B600-4A44F27B3F08}.Release|x86.Build.0 = Release|Any CPU - {81DDED9D-158B-E303-5F62-77A2896D2A5A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {81DDED9D-158B-E303-5F62-77A2896D2A5A}.Debug|Any CPU.Build.0 = Debug|Any CPU - {81DDED9D-158B-E303-5F62-77A2896D2A5A}.Debug|x64.ActiveCfg = Debug|Any CPU - {81DDED9D-158B-E303-5F62-77A2896D2A5A}.Debug|x64.Build.0 = Debug|Any CPU - {81DDED9D-158B-E303-5F62-77A2896D2A5A}.Debug|x86.ActiveCfg = Debug|Any CPU - {81DDED9D-158B-E303-5F62-77A2896D2A5A}.Debug|x86.Build.0 = Debug|Any CPU - {81DDED9D-158B-E303-5F62-77A2896D2A5A}.Release|Any CPU.ActiveCfg = Release|Any CPU - {81DDED9D-158B-E303-5F62-77A2896D2A5A}.Release|Any CPU.Build.0 = Release|Any CPU - {81DDED9D-158B-E303-5F62-77A2896D2A5A}.Release|x64.ActiveCfg = Release|Any CPU - {81DDED9D-158B-E303-5F62-77A2896D2A5A}.Release|x64.Build.0 = Release|Any CPU - {81DDED9D-158B-E303-5F62-77A2896D2A5A}.Release|x86.ActiveCfg = Release|Any CPU - {81DDED9D-158B-E303-5F62-77A2896D2A5A}.Release|x86.Build.0 = Release|Any CPU - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection - GlobalSection(NestedProjects) = preSolution - {776E4AEA-6B98-4917-824D-B95B40F070DB} = {827E0CD3-B72D-47B6-A68D-7590B98EB39B} - {29FF4418-8F0E-4496-9DA7-241D5E3683DE} = {827E0CD3-B72D-47B6-A68D-7590B98EB39B} - {40F8F3D6-EE5B-4FA8-AB4D-3682D42BBF6A} = {827E0CD3-B72D-47B6-A68D-7590B98EB39B} - {D7A75ADF-A9E1-41F0-9C06-A95473EAAE8C} = {827E0CD3-B72D-47B6-A68D-7590B98EB39B} - {EE396B31-5A18-40D8-92F6-3DB32987CA72} = {827E0CD3-B72D-47B6-A68D-7590B98EB39B} - {4C1BC75E-9D27-4474-B600-4A44F27B3F08} = {827E0CD3-B72D-47B6-A68D-7590B98EB39B} - EndGlobalSection -EndGlobal diff --git a/docker-compose.dcproj b/docker-compose.dcproj deleted file mode 100644 index b828822..0000000 --- a/docker-compose.dcproj +++ /dev/null @@ -1,17 +0,0 @@ - - - - 2.1 - Linux - False - 81dded9d-158b-e303-5f62-77a2896d2a5a - - - - - docker-compose.yml - - - - - \ No newline at end of file diff --git a/docker-compose.override.yml b/docker-compose.override.yml deleted file mode 100644 index 4b6a84d..0000000 --- a/docker-compose.override.yml +++ /dev/null @@ -1,18 +0,0 @@ -services: - ayllu.api: - environment: - - ASPNETCORE_ENVIRONMENT=Development - - ASPNETCORE_HTTP_PORTS=80 - - ASPNETCORE_HTTPS_PORTS=81 - - ConnectionStrings__DefaultConnection=Server=db;Database=ayllu;User Id=sa;Password=${DBPASSWORD};TrustServerCertificate=True; - - JwtSettings__SecretKey=${JWT_SECRET_KEY} - - JwtSettings__Issuer="AylluIssuer" - - JwtSettings__Audience="AylluAudience" - ports: - - "800:80" - - "801:81" - volumes: - - ${APPDATA}/Microsoft/UserSecrets:/home/app/.microsoft/usersecrets:ro - - ${APPDATA}/Microsoft/UserSecrets:/root/.microsoft/usersecrets:ro - - ${APPDATA}/ASP.NET/Https:/home/app/.aspnet/https:ro - - ${APPDATA}/ASP.NET/Https:/root/.aspnet/https:ro \ No newline at end of file diff --git a/docker-compose.yml b/docker-compose.yml deleted file mode 100644 index 2adb397..0000000 --- a/docker-compose.yml +++ /dev/null @@ -1,26 +0,0 @@ -services: - ayllu.api: - image: ${DOCKER_REGISTRY-}aylluapi - container_name: ayllu_api - depends_on: - - db - build: - context: . - dockerfile: src/Ayllu.Api/Dockerfile - networks: - - ayllu-network - - db: - image: mcr.microsoft.com/mssql/server:2022-latest - container_name: ayllu_db - environment: - SA_PASSWORD: ${DBPASSWORD} - ACCEPT_EULA: "Y" - ports: - - "1433:1433" - networks: - - ayllu-network - -networks: - ayllu-network: - driver: bridge \ No newline at end of file diff --git a/launchSettings.json b/launchSettings.json deleted file mode 100644 index 610cf02..0000000 --- a/launchSettings.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "profiles": { - "Docker Compose": { - "commandName": "DockerCompose", - "commandVersion": "1.0", - "serviceActions": { - "ayllu.api": "StartDebugging" - } - } - } -} \ No newline at end of file diff --git a/scripts/github-client-generator.cmd b/scripts/github-client-generator.cmd new file mode 100644 index 0000000..139b625 --- /dev/null +++ b/scripts/github-client-generator.cmd @@ -0,0 +1,16 @@ +@echo off +SETLOCAL ENABLEDELAYEDEXPANSION + +REM Caminho da solução +SET ROOT_DIR=%~dp0\.. +SET CLIENT_OUTPUT=%ROOT_DIR%\src\Ayllu.Github.Client +SET SPEC_URL=https://raw.githubusercontent.com/github/rest-api-description/refs/heads/main/descriptions/api.github.com/api.github.com.json + +REM Cria diretórios caso não existam +IF NOT EXIST "%CLIENT_OUTPUT%" mkdir "%CLIENT_OUTPUT%" + +echo Gerando cliente C# do GitHub API... + +docker run --rm -v %CLIENT_OUTPUT%\Github\Client:/app/output mcr.microsoft.com/openapi/kiota generate --language csharp --output /app/output --openapi %SPEC_URL% --class-name AylluGithubClient --namespace-name Ayllu.Github.Client + +echo Cliente gerado em %CLIENT_OUTPUT% diff --git a/src/Ayllu.Api/Ayllu.Api.csproj b/src/Ayllu.Api/Ayllu.Api.csproj deleted file mode 100644 index f2cc241..0000000 --- a/src/Ayllu.Api/Ayllu.Api.csproj +++ /dev/null @@ -1,28 +0,0 @@ - - - - net9.0 - enable - enable - a123ea63-1376-4138-97c9-6eb1fb64140e - Linux - ..\.. - ..\..\docker-compose.dcproj - - - - - - - runtime; build; native; contentfiles; analyzers; buildtransitive - all - - - - - - - - - - diff --git a/src/Ayllu.Api/Ayllu.Api.csproj.user b/src/Ayllu.Api/Ayllu.Api.csproj.user deleted file mode 100644 index dd2d54c..0000000 --- a/src/Ayllu.Api/Ayllu.Api.csproj.user +++ /dev/null @@ -1,6 +0,0 @@ - - - - Container (Dockerfile) - - \ No newline at end of file diff --git a/src/Ayllu.Api/Ayllu.Api.http b/src/Ayllu.Api/Ayllu.Api.http deleted file mode 100644 index 056f806..0000000 --- a/src/Ayllu.Api/Ayllu.Api.http +++ /dev/null @@ -1,6 +0,0 @@ -@Ayllu.Api_HostAddress = http://localhost:5268 - -GET {{Ayllu.Api_HostAddress}}/weatherforecast/ -Accept: application/json - -### diff --git a/src/Ayllu.Api/Controllers/AuthController.cs b/src/Ayllu.Api/Controllers/AuthController.cs deleted file mode 100644 index c3f27cc..0000000 --- a/src/Ayllu.Api/Controllers/AuthController.cs +++ /dev/null @@ -1,75 +0,0 @@ -using Ayllu.Application.CQRS.Commands; -using MediatR; -using Microsoft.AspNetCore.Authorization; -using Microsoft.AspNetCore.Identity.Data; -using Microsoft.AspNetCore.Mvc; - -namespace Ayllu.Api.Controllers -{ - [ApiController] - [Route("api/[controller]")] - public class AuthController : ControllerBase - { - private readonly IMediator _mediator; - - public AuthController(IMediator mediator) - { - _mediator = mediator; - } - - /// - /// Registra um novo usuário e realiza login automático - /// - [HttpPost("register")] - public async Task Register([FromBody] RegisterCommand request) - { - var response = await _mediator.Send(request); - return response.StatusCode switch - { - 201 => CreatedAtAction(nameof(Login), new { email = request.Email }, response), - 400 => BadRequest(response), - 409 => Conflict(response), - 422 => UnprocessableEntity(response), - _ => StatusCode(response.StatusCode, response) - }; - } - - /// - /// Login do usuário - /// - [HttpPost("login")] - public async Task Login([FromHeader] string token) - { - var request = new LoginCommand(token); - var response = await _mediator.Send(request); - return response.StatusCode switch - { - 200 => Ok(response), - 400 => BadRequest(response), - 401 => Unauthorized(response), - 404 => NotFound(response), - _ => StatusCode(response.StatusCode, response) - }; - } - - ///// - ///// Logout do usuário (invalida JWT) - ///// - //[Authorize] - //[HttpPost("logout")] - //public async Task Logout() - //{ - // // Obtém o JWT do header - // var jwt = Request.Headers["Authorization"].ToString().Replace("Bearer ", ""); - - // var command = new LogoutCommand(jwt); - - // var response = await _mediator.Send(command); - - // if (!response.Success) - // return BadRequest(response); - - // return Ok(response); - //} - } -} diff --git a/src/Ayllu.Api/Dockerfile b/src/Ayllu.Api/Dockerfile deleted file mode 100644 index 19cd448..0000000 --- a/src/Ayllu.Api/Dockerfile +++ /dev/null @@ -1,34 +0,0 @@ -# Acesse https://aka.ms/customizecontainer para saber como personalizar seu contêiner de depuração e como o Visual Studio usa este Dockerfile para criar suas imagens para uma depuração mais rápida. - -# Esta fase é usada durante a execução no VS no modo rápido (Padrão para a configuração de Depuração) -FROM mcr.microsoft.com/dotnet/aspnet:9.0 AS base -USER $APP_UID -WORKDIR /app -EXPOSE 80 -EXPOSE 81 - - -# Esta fase é usada para compilar o projeto de serviço -FROM mcr.microsoft.com/dotnet/sdk:9.0 AS build -ARG BUILD_CONFIGURATION=Release -WORKDIR /src -COPY ["src/Ayllu.Api/Ayllu.Api.csproj", "src/Ayllu.Api/"] -COPY ["src/Ayllu.Application/Ayllu.Application.csproj", "src/Ayllu.Application/"] -COPY ["src/Ayllu.Domain/Ayllu.Domain.csproj", "src/Ayllu.Domain/"] -COPY ["src/Ayllu.Composition/Ayllu.Composition.csproj", "src/Ayllu.Composition/"] -COPY ["src/Ayllu.Infrastructure/Ayllu.Infrastructure.csproj", "src/Ayllu.Infrastructure/"] -RUN dotnet restore "./src/Ayllu.Api/Ayllu.Api.csproj" -COPY . . -WORKDIR "/src/src/Ayllu.Api" -RUN dotnet build "./Ayllu.Api.csproj" -c $BUILD_CONFIGURATION -o /app/build - -# Esta fase é usada para publicar o projeto de serviço a ser copiado para a fase final -FROM build AS publish -ARG BUILD_CONFIGURATION=Release -RUN dotnet publish "./Ayllu.Api.csproj" -c $BUILD_CONFIGURATION -o /app/publish /p:UseAppHost=false - -# Esta fase é usada na produção ou quando executada no VS no modo normal (padrão quando não está usando a configuração de Depuração) -FROM base AS final -WORKDIR /app -COPY --from=publish /app/publish . -ENTRYPOINT ["dotnet", "Ayllu.Api.dll"] \ No newline at end of file diff --git a/src/Ayllu.Api/Program.cs b/src/Ayllu.Api/Program.cs deleted file mode 100644 index 9c3eadb..0000000 --- a/src/Ayllu.Api/Program.cs +++ /dev/null @@ -1,87 +0,0 @@ -using Ayllu.Composition; -using Ayllu.Infrastructure.Common.Middlewares; -using Microsoft.AspNetCore.Authentication.JwtBearer; -using Microsoft.IdentityModel.Tokens; -using System.Text; -var builder = WebApplication.CreateBuilder(args); - -// --------------------------- -// 1. Configura Ayllu (Application + Infrastructure) -// --------------------------- -builder.Services.AddAyllu(builder.Configuration); - -// --------------------------- -// 2. CORS -// --------------------------- -builder.Services.AddCors(options => -{ - options.AddDefaultPolicy(policy => - { - policy.AllowAnyOrigin() - .AllowAnyHeader() - .AllowAnyMethod(); - }); -}); - -// --------------------------- -// 3. Controllers -// --------------------------- -builder.Services.AddControllers(); - -// --------------------------- -// 4. Swagger / OpenAPI -// --------------------------- -builder.Services.AddEndpointsApiExplorer(); -builder.Services.AddOpenApi(); - -// --------------------------- -// 5. JWT Authentication -// --------------------------- -var jwtSettings = builder.Configuration.GetSection("JwtSettings"); -var secretKey = jwtSettings.GetValue("SecretKey"); - -builder.Services.AddAuthentication(options => -{ - options.DefaultAuthenticateScheme = JwtBearerDefaults.AuthenticationScheme; - options.DefaultChallengeScheme = JwtBearerDefaults.AuthenticationScheme; -}) -.AddJwtBearer(options => -{ - options.TokenValidationParameters = new TokenValidationParameters - { - ValidateIssuer = true, - ValidateAudience = true, - ValidateLifetime = true, - ValidateIssuerSigningKey = true, - ValidIssuer = jwtSettings.GetValue("Issuer"), - ValidAudience = jwtSettings.GetValue("Audience"), - IssuerSigningKey = new SymmetricSecurityKey(Encoding.UTF8.GetBytes(secretKey!)), - ClockSkew = TimeSpan.Zero - }; -}); -var app = builder.Build(); - -// --------------------------- -// Aplica migrations antes do pipeline -// --------------------------- -app.Services.ApplyMigrationsSafely(); - -if (app.Environment.IsDevelopment()) -{ - app.MapOpenApi(); -} - -app.UseHttpsRedirection(); - -app.UseCors(); - -app.UseAuthentication(); - -// Middleware customizado para validar JWT invalidados -app.UseMiddleware(); - -app.UseAuthorization(); - -app.MapControllers(); - -await app.RunAsync(); diff --git a/src/Ayllu.Api/Properties/launchSettings.json b/src/Ayllu.Api/Properties/launchSettings.json deleted file mode 100644 index ede1ea0..0000000 --- a/src/Ayllu.Api/Properties/launchSettings.json +++ /dev/null @@ -1,31 +0,0 @@ -{ - "profiles": { - "http": { - "commandName": "Project", - "environmentVariables": { - "ASPNETCORE_ENVIRONMENT": "Development" - }, - "dotnetRunMessages": true, - "applicationUrl": "http://localhost:5268" - }, - "https": { - "commandName": "Project", - "environmentVariables": { - "ASPNETCORE_ENVIRONMENT": "Development" - }, - "dotnetRunMessages": true, - "applicationUrl": "https://localhost:7140;http://localhost:5268" - }, - "Container (Dockerfile)": { - "commandName": "Docker", - "launchUrl": "{Scheme}://{ServiceHost}:{ServicePort}", - "environmentVariables": { - "ASPNETCORE_HTTPS_PORTS": "8081", - "ASPNETCORE_HTTP_PORTS": "8080" - }, - "publishAllPorts": true, - "useSSL": true - } - }, - "$schema": "https://json.schemastore.org/launchsettings.json" -} \ No newline at end of file diff --git a/src/Ayllu.Api/appsettings.Development.json b/src/Ayllu.Api/appsettings.Development.json deleted file mode 100644 index 0c208ae..0000000 --- a/src/Ayllu.Api/appsettings.Development.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "Logging": { - "LogLevel": { - "Default": "Information", - "Microsoft.AspNetCore": "Warning" - } - } -} diff --git a/src/Ayllu.Api/appsettings.json b/src/Ayllu.Api/appsettings.json deleted file mode 100644 index 5d72985..0000000 --- a/src/Ayllu.Api/appsettings.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "Logging": { - "LogLevel": { - "Default": "Information", - "Microsoft.AspNetCore": "Warning" - } - }, - "AllowedHosts": "*", - "JwtSettings": { - "SecretKey": "", - "Issuer": "", - "Audience": "", - "ExpiresInMinutes": "180" - } -} diff --git a/src/Ayllu.Application/Ayllu.Application.csproj b/src/Ayllu.Application/Ayllu.Application.csproj deleted file mode 100644 index 289ebca..0000000 --- a/src/Ayllu.Application/Ayllu.Application.csproj +++ /dev/null @@ -1,23 +0,0 @@ - - - - net9.0 - enable - enable - - - - - - - - - - - - - - - - - diff --git a/src/Ayllu.Application/CQRS/Commands/LoginCommand.cs b/src/Ayllu.Application/CQRS/Commands/LoginCommand.cs deleted file mode 100644 index b2c5a25..0000000 --- a/src/Ayllu.Application/CQRS/Commands/LoginCommand.cs +++ /dev/null @@ -1,6 +0,0 @@ -using Ayllu.Application.DTO.Responses; -using MediatR; - -namespace Ayllu.Application.CQRS.Commands; - -public record LoginCommand (string Token) : IRequest>; diff --git a/src/Ayllu.Application/CQRS/Commands/RegisterCommand.cs b/src/Ayllu.Application/CQRS/Commands/RegisterCommand.cs deleted file mode 100644 index b3fd4f5..0000000 --- a/src/Ayllu.Application/CQRS/Commands/RegisterCommand.cs +++ /dev/null @@ -1,11 +0,0 @@ -using Ayllu.Application.DTO.Responses; -using MediatR; - -namespace Ayllu.Application.CQRS.Commands; - -public record RegisterCommand(string UserName, - string Email, - string Password, - string Name, - string LastName, - string PhoneNumber) : IRequest> ; diff --git a/src/Ayllu.Application/CQRS/Handlers/LoginCommandHandler.cs b/src/Ayllu.Application/CQRS/Handlers/LoginCommandHandler.cs deleted file mode 100644 index 0b32ab4..0000000 --- a/src/Ayllu.Application/CQRS/Handlers/LoginCommandHandler.cs +++ /dev/null @@ -1,66 +0,0 @@ -using Ayllu.Application.Common.Interfaces; -using Ayllu.Application.CQRS.Commands; -using Ayllu.Application.DTO.Responses; -using MediatR; -using Microsoft.AspNetCore.Http; -using Microsoft.Extensions.Logging; -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -namespace Ayllu.Application.CQRS.Handlers -{ - public class LoginCommandHandler(IIdentityService identity, ILogger logger) : IRequestHandler> - { - public async Task> Handle(LoginCommand request, CancellationToken cancellationToken) - { - try - { - var token = request.Token; - // Remove o prefixo "Basic " se estiver presente - if (token.StartsWith("Basic ", StringComparison.OrdinalIgnoreCase)) - { - token = request.Token["Basic ".Length..].Trim(); - } - - // Decodifica de Base64 - var decodedBytes = Convert.FromBase64String(token); - var decodedString = Encoding.UTF8.GetString(decodedBytes); - - // Divide em usuário e senha - var parts = decodedString.Split(':', 2); - if (parts.Length != 2) - { - throw new FormatException("Token inválido. Esperado formato 'username:password'."); - } - - - var (Success, Jwt, Expiration, RefreshToken, Email, PhoneNumber, UserName, Roles, Errors) = await identity.LoginAsync(parts[0], parts[1]); - return new Response() - { - Data = new LoginResponse - { - Jwt = Jwt, - Expiration = Expiration, - RefreshToken = RefreshToken, - Email = Email!, - PhoneNumber = PhoneNumber!, - UserName = UserName!, - Roles = Roles - - }, - Success = Success, - StatusCode = Success ? StatusCodes.Status200OK : StatusCodes.Status401Unauthorized, - Message = Success ? "Login bem-sucedido" : string.Join(", ", Errors!), - }; - } - catch (Exception e) - { - logger.LogError(e, "Erro ao processar LoginCommand: {Message}", e.Message); - throw new InvalidOperationException("Erro ao processar LoginCommand", e); - } - } - } -} diff --git a/src/Ayllu.Application/CQRS/Handlers/RegisterCommandHandler.cs b/src/Ayllu.Application/CQRS/Handlers/RegisterCommandHandler.cs deleted file mode 100644 index ece0b80..0000000 --- a/src/Ayllu.Application/CQRS/Handlers/RegisterCommandHandler.cs +++ /dev/null @@ -1,52 +0,0 @@ -using Ayllu.Application.Common.Interfaces; -using Ayllu.Application.CQRS.Commands; -using Ayllu.Application.CQRS.Notifications; -using Ayllu.Application.DTO.Responses; -using Ayllu.Application.Services; -using MediatR; -using Microsoft.AspNetCore.Http; -using System.Text; - -namespace Ayllu.Application.CQRS.Handlers; - -public class RegisterCommandHandler(IIdentityService identityService, IMediator mediator) : IRequestHandler> -{ - public async Task> Handle(RegisterCommand request, CancellationToken cancellationToken) - { - try - { - var (Success, _, statusCode, Errors) = await identityService.RegisterAsync(request.UserName, - request.Email, - request.Password, - request.Name, - request.LastName, - request.PhoneNumber - ); - - if (!Success) - return new Response() { Data = null!, Message = string.Join(", ", Errors!), StatusCode = statusCode, Success = false }; - - // 2. Prepara o TaskCompletionSource para capturar o retorno do login - TaskCompletionSource> tcs = new(); - var credentials = $"{request.Email}:{request.Password}"; - var bytes = Encoding.UTF8.GetBytes(credentials); - var base64 = Convert.ToBase64String(bytes); - - - // 3. Publica a notification - await mediator.Publish(new UserRegisteredNotification( - $"Basic {base64}", - tcs - ), cancellationToken); - - // 4. Aguarda o resultado do handler de login - var loginResponse = await tcs.Task; - return loginResponse; - } - catch (Exception e) - { - - throw; - } - } -} diff --git a/src/Ayllu.Application/CQRS/Handlers/UserRegisteredNotificationHandler.cs b/src/Ayllu.Application/CQRS/Handlers/UserRegisteredNotificationHandler.cs deleted file mode 100644 index 3927a3d..0000000 --- a/src/Ayllu.Application/CQRS/Handlers/UserRegisteredNotificationHandler.cs +++ /dev/null @@ -1,54 +0,0 @@ -using Ayllu.Application.Common.Interfaces; -using Ayllu.Application.CQRS.Notifications; -using Ayllu.Application.DTO.Responses; -using MediatR; -using Microsoft.AspNetCore.Http; -using System.Text; - -namespace Ayllu.Application.CQRS.Handlers; - -public class UserRegisteredNotificationHandler(IIdentityService identityService) : INotificationHandler -{ - public async Task Handle(UserRegisteredNotification notification, CancellationToken cancellationToken) - { - var token = notification.Token; - // Remove o prefixo "Basic " se estiver presente - if (token.StartsWith("Basic ", StringComparison.OrdinalIgnoreCase)) - { - token = notification.Token["Basic ".Length..].Trim(); - } - - // Decodifica de Base64 - var decodedBytes = Convert.FromBase64String(token); - var decodedString = Encoding.UTF8.GetString(decodedBytes); - - // Divide em usuário e senha - var parts = decodedString.Split(':', 2); - if (parts.Length != 2) - { - throw new FormatException("Token inválido. Esperado formato 'username:password'."); - } - - // Executa o login automático - var (Success, Jwt, Expiration, RefreshToken, Email, PhoneNumber, UserName, Roles, Errors) = await identityService.LoginAsync(parts[0], parts[1]); - - // Seta o resultado no TaskCompletionSource - notification.CompletionSource.SetResult(new Response() - { - Data = new LoginResponse - { - Jwt = Jwt, - Expiration = Expiration, - RefreshToken = RefreshToken, - Email = Email!, - PhoneNumber = PhoneNumber!, - UserName = UserName!, - Roles = Roles - - }, - Success = Success, - StatusCode = Success ? StatusCodes.Status200OK : StatusCodes.Status401Unauthorized, - Message = Success ? "Login successful" : string.Join(", ", Errors!) - }); - } -} \ No newline at end of file diff --git a/src/Ayllu.Application/CQRS/Notifications/UserRegisteredNotification.cs b/src/Ayllu.Application/CQRS/Notifications/UserRegisteredNotification.cs deleted file mode 100644 index e4ff7e3..0000000 --- a/src/Ayllu.Application/CQRS/Notifications/UserRegisteredNotification.cs +++ /dev/null @@ -1,7 +0,0 @@ -using Ayllu.Application.DTO.Responses; -using MediatR; - -namespace Ayllu.Application.CQRS.Notifications -{ - public record UserRegisteredNotification (string Token, TaskCompletionSource> CompletionSource) : INotification; -} diff --git a/src/Ayllu.Application/Common/Interfaces/IIdentityService.cs b/src/Ayllu.Application/Common/Interfaces/IIdentityService.cs deleted file mode 100644 index 706a325..0000000 --- a/src/Ayllu.Application/Common/Interfaces/IIdentityService.cs +++ /dev/null @@ -1,10 +0,0 @@ -namespace Ayllu.Application.Common.Interfaces; - -public interface IIdentityService -{ - Task<(bool Success, string? UserId, int StatusCode, IEnumerable? Errors)> RegisterAsync(string username, string email, string password, string name, string lastName, string phoneNumber); - Task<(bool Success, string Jwt, DateTime Expiration, string RefreshToken, string? Email, string? PhoneNumber, string? UserName, IEnumerable Roles, IEnumerable? Errors)> LoginAsync(string key, string password); - Task LogoutAsync(string jwt); - Task<(bool Success, string? Token, IEnumerable? Errors)> ForgotPasswordAsync(string email); - Task<(bool Success, IEnumerable? Errors)> ResetPasswordAsync(string email, string token, string newPassword); -} \ No newline at end of file diff --git a/src/Ayllu.Application/Common/Interfaces/IOrganizationRolesRepository.cs b/src/Ayllu.Application/Common/Interfaces/IOrganizationRolesRepository.cs deleted file mode 100644 index 40d59be..0000000 --- a/src/Ayllu.Application/Common/Interfaces/IOrganizationRolesRepository.cs +++ /dev/null @@ -1,7 +0,0 @@ -namespace Ayllu.Application.Common.Interfaces; - -public interface IOrganizationRolesRepository -{ - Task> GetUserOrganizationRolesAsync(string userId); - Task IsUserInRoleInOrganizationAsync(string userId, string organizationId, string roleName); -} diff --git a/src/Ayllu.Application/Common/Interfaces/ITokenGenerator.cs b/src/Ayllu.Application/Common/Interfaces/ITokenGenerator.cs deleted file mode 100644 index af52e09..0000000 --- a/src/Ayllu.Application/Common/Interfaces/ITokenGenerator.cs +++ /dev/null @@ -1,14 +0,0 @@ -namespace Ayllu.Application.Common.Interfaces; - -public interface ITokenGenerator -{ - bool IsTokenInvalidated(string jwt); - void Invalidate(string jwt); - (string jwt, DateTime expirationDate, string refreshToken) GenerateToken( - string username, - string email, - string organization, - string phoneNumber, - IList roles, - IList organizationRoles); -} diff --git a/src/Ayllu.Application/DTO/Responses/LoginResponse.cs b/src/Ayllu.Application/DTO/Responses/LoginResponse.cs deleted file mode 100644 index 6ad7d7d..0000000 --- a/src/Ayllu.Application/DTO/Responses/LoginResponse.cs +++ /dev/null @@ -1,13 +0,0 @@ -namespace Ayllu.Application.DTO.Responses; - -public class LoginResponse -{ - public string Jwt { get; set; } = string.Empty; - public DateTime Expiration { get; set; } - public string RefreshToken { get; set; } = string.Empty; - public string UserId { get; set; } = string.Empty; - public string UserName { get; set; } = string.Empty; - public string Email { get; set; } = string.Empty; - public string PhoneNumber { get; set; } = string.Empty; - public IEnumerable Roles { get; set; } = []; -} diff --git a/src/Ayllu.Application/DTO/Responses/Response.cs b/src/Ayllu.Application/DTO/Responses/Response.cs deleted file mode 100644 index 7193db0..0000000 --- a/src/Ayllu.Application/DTO/Responses/Response.cs +++ /dev/null @@ -1,12 +0,0 @@ -namespace Ayllu.Application.DTO.Responses; - -public class Response -{ - public bool Success { get; set; } - public string Message { get; set; } = string.Empty; - public int StatusCode { get; set; } -} -public class Response : Response -{ - public T Data { get; set; } = default!; -} diff --git a/src/Ayllu.Application/Services/IdentityService.cs b/src/Ayllu.Application/Services/IdentityService.cs deleted file mode 100644 index be4b76a..0000000 --- a/src/Ayllu.Application/Services/IdentityService.cs +++ /dev/null @@ -1,147 +0,0 @@ -using Ayllu.Application.Common.Interfaces; -using Ayllu.Domain.Entities; -using Microsoft.AspNetCore.Identity; - -namespace Ayllu.Application.Services; - -public class IdentityService( - UserManager userManager, - SignInManager signInManager, - ITokenGenerator tokenGenerator, - IOrganizationRolesRepository context) : IIdentityService -{ - public async Task<(bool Success, string? Token, IEnumerable? Errors)> ForgotPasswordAsync(string email) - { - try - { - var user = await userManager.FindByEmailAsync(email); - if (user == null) - return (false, null, new[] { "User not found" }); - - var token = await userManager.GeneratePasswordResetTokenAsync(user); - - // Aqui você enviaria o email via IEmailSender (não implementado ainda) - // await _emailSender.SendAsync(user.Email, "Password Reset", $"Token: {token}"); - - return (true, token, null); - } - catch (Exception e) - { - - throw; - } - } - - public async Task<(bool Success, string Jwt, DateTime Expiration, string RefreshToken, string? Email, string? PhoneNumber, string? UserName, IEnumerable Roles, IEnumerable? Errors)> LoginAsync(string key, string password) - { - try - { - var user = userManager.Users.FirstOrDefault(u => u.UserName == key || u.Email == key || u.PhoneNumber == key); - if (user == null) - return (false, string.Empty, DateTime.MinValue, string.Empty, string.Empty, string.Empty, string.Empty, [], new[] { "Invalid credentials" }); - - var result = await signInManager.CheckPasswordSignInAsync(user, password, false); - if (!result.Succeeded) - return (false, string.Empty, DateTime.MinValue, string.Empty, string.Empty, string.Empty, string.Empty, [], new[] { "Invalid credentials" }); - - var roles = await userManager.GetRolesAsync(user); - - // Pegar roles de organização (se houver, simplificado) - var orgRoles = await context.GetUserOrganizationRolesAsync(user.Id); - - var (jwt, expiration, refreshToken) = tokenGenerator.GenerateToken( - user.UserName!, - user.Email!, - orgRoles.Any() ? "MemberOfOrganization" : "Independent", - user.PhoneNumber ?? string.Empty, - roles, - orgRoles - ); - - return (true, jwt, expiration, refreshToken, user.Email, user.PhoneNumber, user.UserName, roles, null); - } - catch (Exception e) - { - - throw; - } - } - - public async Task LogoutAsync(string jwt) - { - try - { - - tokenGenerator.Invalidate(jwt); - - await Task.CompletedTask; - } - catch (Exception e) - { - - throw; - } - } - - public async Task<(bool Success, string? UserId, int StatusCode, IEnumerable? Errors)> RegisterAsync(string username, string email, string password, string name, string lastName, string phoneNumber) - { - try - { - var user = new AppUser - { - UserName = username, - Email = email, - Name = name, - LastName = lastName, - PhoneNumber = phoneNumber - }; - var existingUser = await userManager.FindByEmailAsync(email); - - if (existingUser is not null) - return (false, null, 409, new[] { "Email already in use" }); - - existingUser = await userManager.FindByNameAsync(username); - - if (existingUser is not null) - return (false, null, 409, new[] { "Username already in use" }); - - existingUser = userManager.Users.Where(x => x.PhoneNumber == phoneNumber).FirstOrDefault(); - - if (existingUser is not null) - return (false, null, 409, new[] { "Phone number already in use" }); - var result = await userManager.CreateAsync(user, password); - - if (!result.Succeeded) - return (false, null, 400, result.Errors.Select(e => e.Description)); - - return (true, user.Id, 202, null); - } - catch (Exception e) - { - - throw; - } - } - - public async Task<(bool Success, IEnumerable? Errors)> ResetPasswordAsync(string email, string token, string newPassword) - { - try - { - var user = await userManager.FindByEmailAsync(email); - if (user == null) - return (false, new[] { "User not found" }); - - var result = await userManager.ResetPasswordAsync(user, token, newPassword); - - if (!result.Succeeded) - return (false, result.Errors.Select(e => e.Description)); - - return (true, null); - } - catch (Exception e) - { - - throw; - } - } -} diff --git a/src/Ayllu.Composition/Ayllu.Composition.csproj b/src/Ayllu.Composition/Ayllu.Composition.csproj deleted file mode 100644 index d9d575f..0000000 --- a/src/Ayllu.Composition/Ayllu.Composition.csproj +++ /dev/null @@ -1,18 +0,0 @@ - - - - net9.0 - enable - enable - - - - - - - - - - - - diff --git a/src/Ayllu.Composition/AylluComposition.cs b/src/Ayllu.Composition/AylluComposition.cs deleted file mode 100644 index 80c7ef8..0000000 --- a/src/Ayllu.Composition/AylluComposition.cs +++ /dev/null @@ -1,74 +0,0 @@ -using Ayllu.Application.Common.Interfaces; -using Ayllu.Application.CQRS.Commands; -using Ayllu.Application.Services; -using Ayllu.Domain.Entities; -using Ayllu.Infrastructure.Data; -using Ayllu.Infrastructure.Repositories; -using Ayllu.Infrastructure.Services; -using Microsoft.AspNetCore.Identity; -using Microsoft.EntityFrameworkCore; -using Microsoft.Extensions.Configuration; -using Microsoft.Extensions.DependencyInjection; - -namespace Ayllu.Composition -{ - public static class AylluComposition - { - public static IServiceCollection AddAyllu(this IServiceCollection services, IConfiguration configuration) - { - // --------------------------- - // 1. Configuração do DbContext - // --------------------------- - services.AddDbContext(options => - options.UseSqlServer(configuration.GetConnectionString("DefaultConnection"))); - - // --------------------------- - // 2. Configuração do Identity - // --------------------------- - services.AddIdentity(options => - { - options.Password.RequireDigit = true; - options.Password.RequireLowercase = true; - options.Password.RequireUppercase = true; - options.Password.RequireNonAlphanumeric = false; - options.Password.RequiredLength = 8; - options.User.RequireUniqueEmail = true; - }) - .AddEntityFrameworkStores() - .AddDefaultTokenProviders(); - - - // --------------------------- - // 3. TokenGenerator - // --------------------------- - services.AddScoped(); - - // --------------------------- - // 4. Repositories / Interfaces - // --------------------------- - services.AddScoped(); - - // --------------------------- - // 5. IdentityService (Application) - // --------------------------- - services.AddScoped(); - - // --------------------------- - // 6. MediatR - // --------------------------- - services.AddMediatR(cfg => - { - cfg.RegisterServicesFromAssemblies( - typeof(RegisterCommand).Assembly // Application - ); - }); - - // --------------------------- - // 7. Configurações adicionais, se houver - // --------------------------- - // ex: services.AddScoped(); - - return services; - } - } -} \ No newline at end of file diff --git a/src/Ayllu.Composition/MigrationExtensions.cs b/src/Ayllu.Composition/MigrationExtensions.cs deleted file mode 100644 index edd31ce..0000000 --- a/src/Ayllu.Composition/MigrationExtensions.cs +++ /dev/null @@ -1,57 +0,0 @@ -using Ayllu.Infrastructure.Data; -using Microsoft.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore.Infrastructure; -using Microsoft.EntityFrameworkCore.Migrations; -using Microsoft.Extensions.DependencyInjection; - -namespace Ayllu.Composition; - -public static class MigrationExtensions -{ - /// - /// Aplica migrations pendentes e reverte migrations removidas do projeto. - /// - public static void ApplyMigrationsSafely(this IServiceProvider serviceProvider) - { - using var scope = serviceProvider.CreateScope(); - var context = scope.ServiceProvider.GetRequiredService(); - var migrator = context.Database.GetService(); - - // 1. Migrations existentes no projeto - var localMigrations = context.Database.GetMigrations().ToList(); - - // 2. Migrations aplicadas no banco - var appliedMigrations = context.Database.GetAppliedMigrations().ToList(); - - // ------------------------------- - // 3. Reverte migrations removidas - // ------------------------------- - var removedMigrations = appliedMigrations.Except(localMigrations).Reverse(); - foreach (var migration in removedMigrations) - { - Console.WriteLine($"Revertendo migration removida: {migration}"); - migrator.Migrate(GetPreviousMigration(localMigrations, migration)); - } - - // ------------------------------- - // 4. Aplica migrations pendentes - // ------------------------------- - var pendingMigrations = localMigrations.Except(appliedMigrations); - foreach (var migration in pendingMigrations) - { - Console.WriteLine($"Aplicando migration: {migration}"); - migrator.Migrate(migration); - } - } - - /// - /// Retorna a migration imediatamente anterior no projeto para rollback. - /// - private static string GetPreviousMigration(List localMigrations, string removedMigration) - { - var index = localMigrations.IndexOf(removedMigration); - if (index <= 0) - return "0"; // nenhuma migration aplicada - return localMigrations[index - 1]; - } -} \ No newline at end of file diff --git a/src/Ayllu.Domain/Ayllu.Domain.csproj b/src/Ayllu.Domain/Ayllu.Domain.csproj deleted file mode 100644 index 973645a..0000000 --- a/src/Ayllu.Domain/Ayllu.Domain.csproj +++ /dev/null @@ -1,13 +0,0 @@ - - - - net9.0 - enable - enable - - - - - - - diff --git a/src/Ayllu.Domain/Entities/AppRole.cs b/src/Ayllu.Domain/Entities/AppRole.cs deleted file mode 100644 index 494eb16..0000000 --- a/src/Ayllu.Domain/Entities/AppRole.cs +++ /dev/null @@ -1,7 +0,0 @@ -using Microsoft.AspNetCore.Identity; - -namespace Ayllu.Domain.Entities; - -public class AppRole : IdentityRole -{ -} diff --git a/src/Ayllu.Domain/Entities/AppUser.cs b/src/Ayllu.Domain/Entities/AppUser.cs deleted file mode 100644 index 842757c..0000000 --- a/src/Ayllu.Domain/Entities/AppUser.cs +++ /dev/null @@ -1,17 +0,0 @@ -using Microsoft.AspNetCore.Identity; - -namespace Ayllu.Domain.Entities; - -public class AppUser : IdentityUser -{ - public string Name { get; set; } = string.Empty; - public string LastName { get; set; } = string.Empty; - public string? ProfilePictureUrl { get; set; } = string.Empty; - - public ICollection OrganizationMemberships { get; } = new List(); - public ICollection MovementsCreated { get; } = new List(); - public ICollection DialecticsCreated { get; } = new List(); - public ICollection DialecticStagesAuthored { get; } = new List(); - public ICollection ConnectionsRequested { get; } = new List(); - public ICollection ConnectionsReceived { get; } = new List(); -} diff --git a/src/Ayllu.Domain/Entities/AppUserOrganization.cs b/src/Ayllu.Domain/Entities/AppUserOrganization.cs deleted file mode 100644 index 7672b1e..0000000 --- a/src/Ayllu.Domain/Entities/AppUserOrganization.cs +++ /dev/null @@ -1,14 +0,0 @@ -namespace Ayllu.Domain.Entities -{ - - public class AppUserOrganization - { - public string UserId { get; set; } = string.Empty; - public AppUser User { get; set; } = null!; - - public string OrganizationId { get; set; } = string.Empty; - public Organization Organization { get; set; } = null!; - - public string Role { get; set; } = OrganizationRole.Member.ToString(); - } -} \ No newline at end of file diff --git a/src/Ayllu.Domain/Entities/ConnectionStatus.cs b/src/Ayllu.Domain/Entities/ConnectionStatus.cs deleted file mode 100644 index 6439fc1..0000000 --- a/src/Ayllu.Domain/Entities/ConnectionStatus.cs +++ /dev/null @@ -1,8 +0,0 @@ -namespace Ayllu.Domain.Entities; - -public enum ConnectionStatus -{ - Pending = 0, - Accepted = 1, - Rejected = 2 -} \ No newline at end of file diff --git a/src/Ayllu.Domain/Entities/Dialectic.cs b/src/Ayllu.Domain/Entities/Dialectic.cs deleted file mode 100644 index 0617d3a..0000000 --- a/src/Ayllu.Domain/Entities/Dialectic.cs +++ /dev/null @@ -1,18 +0,0 @@ -namespace Ayllu.Domain.Entities -{ - public class Dialectic - { - public string Id { get; set; } = Guid.NewGuid().ToString(); - public string Title { get; set; } = string.Empty; - public DateTime CreatedAt { get; set; } = DateTime.UtcNow; - - // Relacionamentos - public string OrganizationId { get; set; } = string.Empty; - public Organization Organization { get; set; } = null!; - - public string CreatedById { get; set; } = string.Empty; - public AppUser CreatedBy { get; set; } = null!; - - public ICollection Stages { get; set; } = new List(); - } -} \ No newline at end of file diff --git a/src/Ayllu.Domain/Entities/DialecticStage.cs b/src/Ayllu.Domain/Entities/DialecticStage.cs deleted file mode 100644 index e9cd970..0000000 --- a/src/Ayllu.Domain/Entities/DialecticStage.cs +++ /dev/null @@ -1,20 +0,0 @@ -namespace Ayllu.Domain.Entities -{ - /// - /// Representa uma etapa na discussão dialética (Tese, Antítese, Síntese, etc.) - /// - public class DialecticStage - { - public string Id { get; set; } = Guid.NewGuid().ToString(); - public DialecticStageType StageType { get; set; } - public string Content { get; set; } = string.Empty; - public DateTime CreatedAt { get; set; } = DateTime.UtcNow; - - // Relacionamentos - public string DialecticId { get; set; } = string.Empty; - public Dialectic Dialectic { get; set; } = null!; - - public string AuthorId { get; set; } = string.Empty; - public AppUser Author { get; set; } = null!; - } -} \ No newline at end of file diff --git a/src/Ayllu.Domain/Entities/DialecticStageType.cs b/src/Ayllu.Domain/Entities/DialecticStageType.cs deleted file mode 100644 index 5365b63..0000000 --- a/src/Ayllu.Domain/Entities/DialecticStageType.cs +++ /dev/null @@ -1,11 +0,0 @@ -namespace Ayllu.Domain.Entities -{ - public enum DialecticStageType - { - Thesis = 0, - Antithesis = 1, - Synthesis = 2, - Other = 3 - } - -} \ No newline at end of file diff --git a/src/Ayllu.Domain/Entities/InvalidatedToken.cs b/src/Ayllu.Domain/Entities/InvalidatedToken.cs deleted file mode 100644 index 5b30a2a..0000000 --- a/src/Ayllu.Domain/Entities/InvalidatedToken.cs +++ /dev/null @@ -1,9 +0,0 @@ -namespace Ayllu.Domain.Entities; - -public class InvalidatedToken -{ - public string Id { get; set; } = Guid.NewGuid().ToString(); - public string Jwt { get; set; } = string.Empty; - public DateTime ExpirationDate { get; set; } - public DateTime InvalidatedAt { get; set; } = DateTime.UtcNow; -} \ No newline at end of file diff --git a/src/Ayllu.Domain/Entities/Movement.cs b/src/Ayllu.Domain/Entities/Movement.cs deleted file mode 100644 index 768902a..0000000 --- a/src/Ayllu.Domain/Entities/Movement.cs +++ /dev/null @@ -1,17 +0,0 @@ -namespace Ayllu.Domain.Entities -{ - public class Movement - { - public string Id { get; set; } = Guid.NewGuid().ToString(); - public string Title { get; set; } = string.Empty; - public string? Description { get; set; } - public DateTime CreatedAt { get; set; } = DateTime.UtcNow; - - // Relacionamentos - public string OrganizationId { get; set; } = string.Empty; - public Organization Organization { get; set; } = null!; - - public string CreatedById { get; set; } = string.Empty; - public AppUser CreatedBy { get; set; } = null!; - } -} \ No newline at end of file diff --git a/src/Ayllu.Domain/Entities/Organization.cs b/src/Ayllu.Domain/Entities/Organization.cs deleted file mode 100644 index 6abb4ff..0000000 --- a/src/Ayllu.Domain/Entities/Organization.cs +++ /dev/null @@ -1,14 +0,0 @@ -namespace Ayllu.Domain.Entities; - -public class Organization -{ - public string Id { get; set; } = Guid.NewGuid().ToString(); - public string Name { get; set; } = string.Empty; - public string? Description { get; set; } - public string? LogoUrl { get; set; } - - // Relacionamentos - public ICollection Members { get; set; } = new List(); - public ICollection Movements { get; set; } = new List(); - public ICollection Dialectics { get; set; } = new List(); -} diff --git a/src/Ayllu.Domain/Entities/OrganizationRole.cs b/src/Ayllu.Domain/Entities/OrganizationRole.cs deleted file mode 100644 index 63c0d94..0000000 --- a/src/Ayllu.Domain/Entities/OrganizationRole.cs +++ /dev/null @@ -1,9 +0,0 @@ -namespace Ayllu.Domain.Entities -{ - public enum OrganizationRole - { - Owner = 0, - Admin = 1, - Member = 2 - } -} \ No newline at end of file diff --git a/src/Ayllu.Domain/Entities/UserConnection.cs b/src/Ayllu.Domain/Entities/UserConnection.cs deleted file mode 100644 index ef2993c..0000000 --- a/src/Ayllu.Domain/Entities/UserConnection.cs +++ /dev/null @@ -1,15 +0,0 @@ -using System.Data; - -namespace Ayllu.Domain.Entities; - -public class UserConnection -{ - public string User1Id { get; set; } = string.Empty; - public AppUser User1 { get; set; } = null!; - - public string User2Id { get; set; } = string.Empty; - public AppUser User2 { get; set; } = null!; - - public ConnectionStatus Status { get; set; } = ConnectionStatus.Pending; - public DateTime CreatedAt { get; set; } = DateTime.UtcNow; -} \ No newline at end of file diff --git a/src/Ayllu.Github.Client/Ayllu.Github.Client.csproj b/src/Ayllu.Github.Client/Ayllu.Github.Client.csproj new file mode 100644 index 0000000..67a0594 --- /dev/null +++ b/src/Ayllu.Github.Client/Ayllu.Github.Client.csproj @@ -0,0 +1,22 @@ + + + + net8.0 + enable + enable + + + + + + + + + + + + + + + + diff --git a/src/Ayllu.Github.Client/Github/Client/Advisories/AdvisoriesRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Advisories/AdvisoriesRequestBuilder.cs new file mode 100644 index 0000000..baf8a51 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Advisories/AdvisoriesRequestBuilder.cs @@ -0,0 +1,307 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Advisories.Item; +using Ayllu.Github.Client.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Advisories +{ + /// + /// Builds and executes requests for operations under \advisories + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class AdvisoriesRequestBuilder : BaseRequestBuilder + { + /// Gets an item from the Ayllu.Github.Client.advisories.item collection + /// The GHSA (GitHub Security Advisory) identifier of the advisory. + /// A + public global::Ayllu.Github.Client.Advisories.Item.WithGhsa_ItemRequestBuilder this[string position] + { + get + { + var urlTplParams = new Dictionary(PathParameters); + urlTplParams.Add("ghsa_id", position); + return new global::Ayllu.Github.Client.Advisories.Item.WithGhsa_ItemRequestBuilder(urlTplParams, RequestAdapter); + } + } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public AdvisoriesRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/advisories{?affects*,after*,before*,cve_id*,cwes*,direction*,ecosystem*,epss_percentage*,epss_percentile*,ghsa_id*,is_withdrawn*,modified*,per_page*,published*,severity*,sort*,type*,updated*}", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public AdvisoriesRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/advisories{?affects*,after*,before*,cve_id*,cwes*,direction*,ecosystem*,epss_percentage*,epss_percentile*,ghsa_id*,is_withdrawn*,modified*,per_page*,published*,severity*,sort*,type*,updated*}", rawUrl) + { + } + /// + /// 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/code-security/security-advisories/global-security-advisories/about-the-github-advisory-database#about-types-of-security-advisories)." + /// API method documentation + /// + /// A List<global::Ayllu.Github.Client.Models.GlobalAdvisory> + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 422 status code + /// When receiving a 429 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task?> GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task> GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "422", global::Ayllu.Github.Client.Models.ValidationErrorSimple.CreateFromDiscriminatorValue }, + { "429", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + }; + var collectionResult = await RequestAdapter.SendCollectionAsync(requestInfo, global::Ayllu.Github.Client.Models.GlobalAdvisory.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + return collectionResult?.AsList(); + } + /// + /// 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/code-security/security-advisories/global-security-advisories/about-the-github-advisory-database#about-types-of-security-advisories)." + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.Advisories.AdvisoriesRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Advisories.AdvisoriesRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// 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/code-security/security-advisories/global-security-advisories/about-the-github-advisory-database#about-types-of-security-advisories)." + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class AdvisoriesRequestBuilderGetQueryParameters + { + /// 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` +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("affects")] + public string? Affects { get; set; } +#nullable restore +#else + [QueryParameter("affects")] + public string Affects { get; set; } +#endif + /// A cursor, as given in the [Link header](https://docs.github.com/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/rest/using-the-rest-api/using-pagination-in-the-rest-api)." +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("after")] + public string? After { get; set; } +#nullable restore +#else + [QueryParameter("after")] + public string After { get; set; } +#endif + /// A cursor, as given in the [Link header](https://docs.github.com/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/rest/using-the-rest-api/using-pagination-in-the-rest-api)." +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("before")] + public string? Before { get; set; } +#nullable restore +#else + [QueryParameter("before")] + public string Before { get; set; } +#endif + /// If specified, only advisories with this CVE (Common Vulnerabilities and Exposures) identifier will be returned. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("cve_id")] + public string? CveId { get; set; } +#nullable restore +#else + [QueryParameter("cve_id")] + public string CveId { get; set; } +#endif + /// 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` +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("cwes")] + public string? Cwes { get; set; } +#nullable restore +#else + [QueryParameter("cwes")] + public string Cwes { get; set; } +#endif + /// The direction to sort the results by. + [Obsolete("This property is deprecated, use DirectionAsGetDirectionQueryParameterType instead")] +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("direction")] + public string? Direction { get; set; } +#nullable restore +#else + [QueryParameter("direction")] + public string Direction { get; set; } +#endif + /// The direction to sort the results by. + [QueryParameter("direction")] + public global::Ayllu.Github.Client.Advisories.GetDirectionQueryParameterType? DirectionAsGetDirectionQueryParameterType { get; set; } + /// If specified, only advisories for these ecosystems will be returned. + [Obsolete("This property is deprecated, use EcosystemAsSecurityAdvisoryEcosystems instead")] +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("ecosystem")] + public string? Ecosystem { get; set; } +#nullable restore +#else + [QueryParameter("ecosystem")] + public string Ecosystem { get; set; } +#endif + /// If specified, only advisories for these ecosystems will be returned. + [QueryParameter("ecosystem")] + public global::Ayllu.Github.Client.Models.SecurityAdvisoryEcosystems? EcosystemAsSecurityAdvisoryEcosystems { get; set; } + /// If specified, only return advisories that have an EPSS percentage score that matches the provided value.The EPSS percentage represents the likelihood of a CVE being exploited. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("epss_percentage")] + public string? EpssPercentage { get; set; } +#nullable restore +#else + [QueryParameter("epss_percentage")] + public string EpssPercentage { get; set; } +#endif + /// If specified, only return advisories that have an EPSS percentile score that matches the provided value.The EPSS percentile represents the relative rank of the CVE's likelihood of being exploited compared to other CVEs. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("epss_percentile")] + public string? EpssPercentile { get; set; } +#nullable restore +#else + [QueryParameter("epss_percentile")] + public string EpssPercentile { get; set; } +#endif + /// If specified, only advisories with this GHSA (GitHub Security Advisory) identifier will be returned. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("ghsa_id")] + public string? GhsaId { get; set; } +#nullable restore +#else + [QueryParameter("ghsa_id")] + public string GhsaId { get; set; } +#endif + /// Whether to only return advisories that have been withdrawn. + [QueryParameter("is_withdrawn")] + public bool? IsWithdrawn { get; set; } + /// 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/search-github/getting-started-with-searching-on-github/understanding-the-search-syntax#query-for-dates)." +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("modified")] + public string? Modified { get; set; } +#nullable restore +#else + [QueryParameter("modified")] + public string Modified { get; set; } +#endif + /// The number of results per page (max 100). For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." + [QueryParameter("per_page")] + public int? PerPage { get; set; } + /// 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/search-github/getting-started-with-searching-on-github/understanding-the-search-syntax#query-for-dates)." +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("published")] + public string? Published { get; set; } +#nullable restore +#else + [QueryParameter("published")] + public string Published { get; set; } +#endif + /// If specified, only advisories with these severities will be returned. + [Obsolete("This property is deprecated, use SeverityAsGetSeverityQueryParameterType instead")] +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("severity")] + public string? Severity { get; set; } +#nullable restore +#else + [QueryParameter("severity")] + public string Severity { get; set; } +#endif + /// If specified, only advisories with these severities will be returned. + [QueryParameter("severity")] + public global::Ayllu.Github.Client.Advisories.GetSeverityQueryParameterType? SeverityAsGetSeverityQueryParameterType { get; set; } + /// The property to sort the results by. + [Obsolete("This property is deprecated, use SortAsGetSortQueryParameterType instead")] +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("sort")] + public string? Sort { get; set; } +#nullable restore +#else + [QueryParameter("sort")] + public string Sort { get; set; } +#endif + /// The property to sort the results by. + [QueryParameter("sort")] + public global::Ayllu.Github.Client.Advisories.GetSortQueryParameterType? SortAsGetSortQueryParameterType { get; set; } + /// 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. + [Obsolete("This property is deprecated, use TypeAsGetTypeQueryParameterType instead")] +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("type")] + public string? Type { get; set; } +#nullable restore +#else + [QueryParameter("type")] + public string Type { get; set; } +#endif + /// 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. + [QueryParameter("type")] + public global::Ayllu.Github.Client.Advisories.GetTypeQueryParameterType? TypeAsGetTypeQueryParameterType { get; set; } + /// 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/search-github/getting-started-with-searching-on-github/understanding-the-search-syntax#query-for-dates)." +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("updated")] + public string? Updated { get; set; } +#nullable restore +#else + [QueryParameter("updated")] + public string Updated { get; set; } +#endif + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class AdvisoriesRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Advisories/GetDirectionQueryParameterType.cs b/src/Ayllu.Github.Client/Github/Client/Advisories/GetDirectionQueryParameterType.cs new file mode 100644 index 0000000..07c6b51 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Advisories/GetDirectionQueryParameterType.cs @@ -0,0 +1,20 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Advisories +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public enum GetDirectionQueryParameterType + #pragma warning restore CS1591 + { + [EnumMember(Value = "asc")] + #pragma warning disable CS1591 + Asc, + #pragma warning restore CS1591 + [EnumMember(Value = "desc")] + #pragma warning disable CS1591 + Desc, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Advisories/GetSeverityQueryParameterType.cs b/src/Ayllu.Github.Client/Github/Client/Advisories/GetSeverityQueryParameterType.cs new file mode 100644 index 0000000..6409fa9 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Advisories/GetSeverityQueryParameterType.cs @@ -0,0 +1,32 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Advisories +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public enum GetSeverityQueryParameterType + #pragma warning restore CS1591 + { + [EnumMember(Value = "unknown")] + #pragma warning disable CS1591 + Unknown, + #pragma warning restore CS1591 + [EnumMember(Value = "low")] + #pragma warning disable CS1591 + Low, + #pragma warning restore CS1591 + [EnumMember(Value = "medium")] + #pragma warning disable CS1591 + Medium, + #pragma warning restore CS1591 + [EnumMember(Value = "high")] + #pragma warning disable CS1591 + High, + #pragma warning restore CS1591 + [EnumMember(Value = "critical")] + #pragma warning disable CS1591 + Critical, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Advisories/GetSortQueryParameterType.cs b/src/Ayllu.Github.Client/Github/Client/Advisories/GetSortQueryParameterType.cs new file mode 100644 index 0000000..996f627 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Advisories/GetSortQueryParameterType.cs @@ -0,0 +1,28 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Advisories +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public enum GetSortQueryParameterType + #pragma warning restore CS1591 + { + [EnumMember(Value = "updated")] + #pragma warning disable CS1591 + Updated, + #pragma warning restore CS1591 + [EnumMember(Value = "published")] + #pragma warning disable CS1591 + Published, + #pragma warning restore CS1591 + [EnumMember(Value = "epss_percentage")] + #pragma warning disable CS1591 + Epss_percentage, + #pragma warning restore CS1591 + [EnumMember(Value = "epss_percentile")] + #pragma warning disable CS1591 + Epss_percentile, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Advisories/GetTypeQueryParameterType.cs b/src/Ayllu.Github.Client/Github/Client/Advisories/GetTypeQueryParameterType.cs new file mode 100644 index 0000000..5e5fdc3 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Advisories/GetTypeQueryParameterType.cs @@ -0,0 +1,24 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Advisories +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public enum GetTypeQueryParameterType + #pragma warning restore CS1591 + { + [EnumMember(Value = "reviewed")] + #pragma warning disable CS1591 + Reviewed, + #pragma warning restore CS1591 + [EnumMember(Value = "malware")] + #pragma warning disable CS1591 + Malware, + #pragma warning restore CS1591 + [EnumMember(Value = "unreviewed")] + #pragma warning disable CS1591 + Unreviewed, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Advisories/Item/WithGhsa_ItemRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Advisories/Item/WithGhsa_ItemRequestBuilder.cs new file mode 100644 index 0000000..47b5289 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Advisories/Item/WithGhsa_ItemRequestBuilder.cs @@ -0,0 +1,98 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Advisories.Item +{ + /// + /// Builds and executes requests for operations under \advisories\{ghsa_id} + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithGhsa_ItemRequestBuilder : BaseRequestBuilder + { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public WithGhsa_ItemRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/advisories/{ghsa_id}", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public WithGhsa_ItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/advisories/{ghsa_id}", rawUrl) + { + } + /// + /// Gets a global security advisory using its GitHub Security Advisory (GHSA) identifier. + /// API method documentation + /// + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 404 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "404", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Models.GlobalAdvisory.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// Gets a global security advisory using its GitHub Security Advisory (GHSA) identifier. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.Advisories.Item.WithGhsa_ItemRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Advisories.Item.WithGhsa_ItemRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithGhsa_ItemRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/App/AppRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/App/AppRequestBuilder.cs new file mode 100644 index 0000000..11d39fd --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/App/AppRequestBuilder.cs @@ -0,0 +1,111 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.App.Hook; +using Ayllu.Github.Client.App.InstallationRequests; +using Ayllu.Github.Client.App.Installations; +using Ayllu.Github.Client.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.App +{ + /// + /// Builds and executes requests for operations under \app + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class AppRequestBuilder : BaseRequestBuilder + { + /// The hook property + public global::Ayllu.Github.Client.App.Hook.HookRequestBuilder Hook + { + get => new global::Ayllu.Github.Client.App.Hook.HookRequestBuilder(PathParameters, RequestAdapter); + } + /// The installationRequests property + public global::Ayllu.Github.Client.App.InstallationRequests.InstallationRequestsRequestBuilder InstallationRequests + { + get => new global::Ayllu.Github.Client.App.InstallationRequests.InstallationRequestsRequestBuilder(PathParameters, RequestAdapter); + } + /// The installations property + public global::Ayllu.Github.Client.App.Installations.InstallationsRequestBuilder Installations + { + get => new global::Ayllu.Github.Client.App.Installations.InstallationsRequestBuilder(PathParameters, RequestAdapter); + } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public AppRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/app", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public AppRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/app", rawUrl) + { + } + /// + /// 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/rest/apps/apps#list-installations-for-the-authenticated-app)" endpoint.You must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. + /// API method documentation + /// + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Models.Integration.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false); + } + /// + /// 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/rest/apps/apps#list-installations-for-the-authenticated-app)" endpoint.You must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.App.AppRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.App.AppRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class AppRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/App/Hook/Config/ConfigPatchRequestBody.cs b/src/Ayllu.Github.Client/Github/Client/App/Hook/Config/ConfigPatchRequestBody.cs new file mode 100644 index 0000000..372c342 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/App/Hook/Config/ConfigPatchRequestBody.cs @@ -0,0 +1,96 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.App.Hook.Config +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class ConfigPatchRequestBody : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The media type used to serialize the payloads. Supported values include `json` and `form`. The default is `form`. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? ContentType { get; set; } +#nullable restore +#else + public string ContentType { get; set; } +#endif + /// The insecure_ssl property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.WebhookConfigInsecureSsl? InsecureSsl { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.WebhookConfigInsecureSsl InsecureSsl { get; set; } +#endif + /// 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/webhooks/event-payloads/#delivery-headers). +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Secret { get; set; } +#nullable restore +#else + public string Secret { get; set; } +#endif + /// The URL to which the payloads will be delivered. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Url { get; set; } +#nullable restore +#else + public string Url { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public ConfigPatchRequestBody() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.App.Hook.Config.ConfigPatchRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.App.Hook.Config.ConfigPatchRequestBody(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "content_type", n => { ContentType = n.GetStringValue(); } }, + { "insecure_ssl", n => { InsecureSsl = n.GetObjectValue(global::Ayllu.Github.Client.Models.WebhookConfigInsecureSsl.CreateFromDiscriminatorValue); } }, + { "secret", n => { Secret = n.GetStringValue(); } }, + { "url", n => { Url = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("content_type", ContentType); + writer.WriteObjectValue("insecure_ssl", InsecureSsl); + writer.WriteStringValue("secret", Secret); + writer.WriteStringValue("url", Url); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/App/Hook/Config/ConfigRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/App/Hook/Config/ConfigRequestBuilder.cs new file mode 100644 index 0000000..6cd3c33 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/App/Hook/Config/ConfigRequestBuilder.cs @@ -0,0 +1,144 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.App.Hook.Config +{ + /// + /// Builds and executes requests for operations under \app\hook\config + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class ConfigRequestBuilder : BaseRequestBuilder + { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public ConfigRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/app/hook/config", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public ConfigRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/app/hook/config", rawUrl) + { + } + /// + /// 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/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. + /// API method documentation + /// + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Models.WebhookConfig.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false); + } + /// + /// 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/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. + /// API method documentation + /// + /// A + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PatchAsync(global::Ayllu.Github.Client.App.Hook.Config.ConfigPatchRequestBody body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task PatchAsync(global::Ayllu.Github.Client.App.Hook.Config.ConfigPatchRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPatchRequestInformation(body, requestConfiguration); + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Models.WebhookConfig.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false); + } + /// + /// 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/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// 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/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. + /// + /// A + /// The request body + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPatchRequestInformation(global::Ayllu.Github.Client.App.Hook.Config.ConfigPatchRequestBody body, Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToPatchRequestInformation(global::Ayllu.Github.Client.App.Hook.Config.ConfigPatchRequestBody body, Action> requestConfiguration = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.App.Hook.Config.ConfigRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.App.Hook.Config.ConfigRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class ConfigRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class ConfigRequestBuilderPatchRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/App/Hook/Deliveries/DeliveriesRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/App/Hook/Deliveries/DeliveriesRequestBuilder.cs new file mode 100644 index 0000000..e4f4166 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/App/Hook/Deliveries/DeliveriesRequestBuilder.cs @@ -0,0 +1,147 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.App.Hook.Deliveries.Item; +using Ayllu.Github.Client.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.App.Hook.Deliveries +{ + /// + /// Builds and executes requests for operations under \app\hook\deliveries + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class DeliveriesRequestBuilder : BaseRequestBuilder + { + /// Gets an item from the Ayllu.Github.Client.app.hook.deliveries.item collection + /// Unique identifier of the item + /// A + public global::Ayllu.Github.Client.App.Hook.Deliveries.Item.WithDelivery_ItemRequestBuilder this[int position] + { + get + { + var urlTplParams = new Dictionary(PathParameters); + urlTplParams.Add("delivery_id", position); + return new global::Ayllu.Github.Client.App.Hook.Deliveries.Item.WithDelivery_ItemRequestBuilder(urlTplParams, RequestAdapter); + } + } + /// Gets an item from the Ayllu.Github.Client.app.hook.deliveries.item collection + /// Unique identifier of the item + /// A + [Obsolete("This indexer is deprecated and will be removed in the next major version. Use the one with the typed parameter instead.")] + public global::Ayllu.Github.Client.App.Hook.Deliveries.Item.WithDelivery_ItemRequestBuilder this[string position] + { + get + { + var urlTplParams = new Dictionary(PathParameters); + if (!string.IsNullOrWhiteSpace(position)) urlTplParams.Add("delivery_id", position); + return new global::Ayllu.Github.Client.App.Hook.Deliveries.Item.WithDelivery_ItemRequestBuilder(urlTplParams, RequestAdapter); + } + } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public DeliveriesRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/app/hook/deliveries{?cursor*,per_page*}", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public DeliveriesRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/app/hook/deliveries{?cursor*,per_page*}", rawUrl) + { + } + /// + /// Returns a list of webhook deliveries for the webhook configured for a GitHub App.You must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. + /// API method documentation + /// + /// A List<global::Ayllu.Github.Client.Models.HookDeliveryItem> + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 400 status code + /// When receiving a 422 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task?> GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task> GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "400", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "422", global::Ayllu.Github.Client.Models.ValidationError.CreateFromDiscriminatorValue }, + }; + var collectionResult = await RequestAdapter.SendCollectionAsync(requestInfo, global::Ayllu.Github.Client.Models.HookDeliveryItem.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + return collectionResult?.AsList(); + } + /// + /// Returns a list of webhook deliveries for the webhook configured for a GitHub App.You must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.App.Hook.Deliveries.DeliveriesRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.App.Hook.Deliveries.DeliveriesRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Returns a list of webhook deliveries for the webhook configured for a GitHub App.You must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class DeliveriesRequestBuilderGetQueryParameters + { + /// 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. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("cursor")] + public string? Cursor { get; set; } +#nullable restore +#else + [QueryParameter("cursor")] + public string Cursor { get; set; } +#endif + /// The number of results per page (max 100). For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." + [QueryParameter("per_page")] + public int? PerPage { get; set; } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class DeliveriesRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/App/Hook/Deliveries/Item/Attempts/AttemptsPostResponse.cs b/src/Ayllu.Github.Client/Github/Client/App/Hook/Deliveries/Item/Attempts/AttemptsPostResponse.cs new file mode 100644 index 0000000..fd2dab6 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/App/Hook/Deliveries/Item/Attempts/AttemptsPostResponse.cs @@ -0,0 +1,55 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.App.Hook.Deliveries.Item.Attempts +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class AttemptsPostResponse : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public AttemptsPostResponse() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.App.Hook.Deliveries.Item.Attempts.AttemptsPostResponse CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.App.Hook.Deliveries.Item.Attempts.AttemptsPostResponse(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/App/Hook/Deliveries/Item/Attempts/AttemptsRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/App/Hook/Deliveries/Item/Attempts/AttemptsRequestBuilder.cs new file mode 100644 index 0000000..62f6e9f --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/App/Hook/Deliveries/Item/Attempts/AttemptsRequestBuilder.cs @@ -0,0 +1,127 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.App.Hook.Deliveries.Item.Attempts +{ + /// + /// Builds and executes requests for operations under \app\hook\deliveries\{delivery_id}\attempts + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class AttemptsRequestBuilder : BaseRequestBuilder + { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public AttemptsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/app/hook/deliveries/{delivery_id}/attempts", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public AttemptsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/app/hook/deliveries/{delivery_id}/attempts", rawUrl) + { + } + /// + /// Redeliver a delivery for the webhook configured for a GitHub App.You must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. + /// API method documentation + /// + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 400 status code + /// When receiving a 422 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PostAsAttemptsPostResponseAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task PostAsAttemptsPostResponseAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToPostRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "400", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "422", global::Ayllu.Github.Client.Models.ValidationError.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.App.Hook.Deliveries.Item.Attempts.AttemptsPostResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// Redeliver a delivery for the webhook configured for a GitHub App.You must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. + /// API method documentation + /// + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 400 status code + /// When receiving a 422 status code + [Obsolete("This method is obsolete. Use PostAsAttemptsPostResponseAsync instead.")] +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PostAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task PostAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToPostRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "400", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "422", global::Ayllu.Github.Client.Models.ValidationError.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.App.Hook.Deliveries.Item.Attempts.AttemptsResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// Redeliver a delivery for the webhook configured for a GitHub App.You must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPostRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToPostRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.App.Hook.Deliveries.Item.Attempts.AttemptsRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.App.Hook.Deliveries.Item.Attempts.AttemptsRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class AttemptsRequestBuilderPostRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/App/Hook/Deliveries/Item/Attempts/AttemptsResponse.cs b/src/Ayllu.Github.Client/Github/Client/App/Hook/Deliveries/Item/Attempts/AttemptsResponse.cs new file mode 100644 index 0000000..6c1760b --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/App/Hook/Deliveries/Item/Attempts/AttemptsResponse.cs @@ -0,0 +1,28 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.App.Hook.Deliveries.Item.Attempts +{ + [Obsolete("This class is obsolete. Use AttemptsPostResponse instead.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class AttemptsResponse : global::Ayllu.Github.Client.App.Hook.Deliveries.Item.Attempts.AttemptsPostResponse, IParsable + #pragma warning restore CS1591 + { + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static new global::Ayllu.Github.Client.App.Hook.Deliveries.Item.Attempts.AttemptsResponse CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.App.Hook.Deliveries.Item.Attempts.AttemptsResponse(); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/App/Hook/Deliveries/Item/WithDelivery_ItemRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/App/Hook/Deliveries/Item/WithDelivery_ItemRequestBuilder.cs new file mode 100644 index 0000000..a87bc8b --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/App/Hook/Deliveries/Item/WithDelivery_ItemRequestBuilder.cs @@ -0,0 +1,106 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.App.Hook.Deliveries.Item.Attempts; +using Ayllu.Github.Client.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.App.Hook.Deliveries.Item +{ + /// + /// Builds and executes requests for operations under \app\hook\deliveries\{delivery_id} + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithDelivery_ItemRequestBuilder : BaseRequestBuilder + { + /// The attempts property + public global::Ayllu.Github.Client.App.Hook.Deliveries.Item.Attempts.AttemptsRequestBuilder Attempts + { + get => new global::Ayllu.Github.Client.App.Hook.Deliveries.Item.Attempts.AttemptsRequestBuilder(PathParameters, RequestAdapter); + } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public WithDelivery_ItemRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/app/hook/deliveries/{delivery_id}", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public WithDelivery_ItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/app/hook/deliveries/{delivery_id}", rawUrl) + { + } + /// + /// Returns a delivery for the webhook configured for a GitHub App.You must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. + /// API method documentation + /// + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 400 status code + /// When receiving a 422 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "400", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "422", global::Ayllu.Github.Client.Models.ValidationError.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Models.HookDelivery.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// Returns a delivery for the webhook configured for a GitHub App.You must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.App.Hook.Deliveries.Item.WithDelivery_ItemRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.App.Hook.Deliveries.Item.WithDelivery_ItemRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithDelivery_ItemRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/App/Hook/HookRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/App/Hook/HookRequestBuilder.cs new file mode 100644 index 0000000..3d46b7f --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/App/Hook/HookRequestBuilder.cs @@ -0,0 +1,47 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.App.Hook.Config; +using Ayllu.Github.Client.App.Hook.Deliveries; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System; +namespace Ayllu.Github.Client.App.Hook +{ + /// + /// Builds and executes requests for operations under \app\hook + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class HookRequestBuilder : BaseRequestBuilder + { + /// The config property + public global::Ayllu.Github.Client.App.Hook.Config.ConfigRequestBuilder Config + { + get => new global::Ayllu.Github.Client.App.Hook.Config.ConfigRequestBuilder(PathParameters, RequestAdapter); + } + /// The deliveries property + public global::Ayllu.Github.Client.App.Hook.Deliveries.DeliveriesRequestBuilder Deliveries + { + get => new global::Ayllu.Github.Client.App.Hook.Deliveries.DeliveriesRequestBuilder(PathParameters, RequestAdapter); + } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public HookRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/app/hook", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public HookRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/app/hook", rawUrl) + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/App/InstallationRequests/InstallationRequestsRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/App/InstallationRequests/InstallationRequestsRequestBuilder.cs new file mode 100644 index 0000000..f76adb9 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/App/InstallationRequests/InstallationRequestsRequestBuilder.cs @@ -0,0 +1,112 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.App.InstallationRequests +{ + /// + /// Builds and executes requests for operations under \app\installation-requests + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class InstallationRequestsRequestBuilder : BaseRequestBuilder + { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public InstallationRequestsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/app/installation-requests{?page*,per_page*}", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public InstallationRequestsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/app/installation-requests{?page*,per_page*}", rawUrl) + { + } + /// + /// Lists all the pending installation requests for the authenticated GitHub App. + /// API method documentation + /// + /// A List<global::Ayllu.Github.Client.Models.IntegrationInstallationRequest> + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 401 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task?> GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task> GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "401", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + }; + var collectionResult = await RequestAdapter.SendCollectionAsync(requestInfo, global::Ayllu.Github.Client.Models.IntegrationInstallationRequest.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + return collectionResult?.AsList(); + } + /// + /// Lists all the pending installation requests for the authenticated GitHub App. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.App.InstallationRequests.InstallationRequestsRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.App.InstallationRequests.InstallationRequestsRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Lists all the pending installation requests for the authenticated GitHub App. + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class InstallationRequestsRequestBuilderGetQueryParameters + { + /// The page number of the results to fetch. For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." + [QueryParameter("page")] + public int? Page { get; set; } + /// The number of results per page (max 100). For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." + [QueryParameter("per_page")] + public int? PerPage { get; set; } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class InstallationRequestsRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/App/Installations/InstallationsRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/App/Installations/InstallationsRequestBuilder.cs new file mode 100644 index 0000000..c95aad7 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/App/Installations/InstallationsRequestBuilder.cs @@ -0,0 +1,145 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.App.Installations.Item; +using Ayllu.Github.Client.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.App.Installations +{ + /// + /// Builds and executes requests for operations under \app\installations + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class InstallationsRequestBuilder : BaseRequestBuilder + { + /// Gets an item from the Ayllu.Github.Client.app.installations.item collection + /// The unique identifier of the installation. + /// A + public global::Ayllu.Github.Client.App.Installations.Item.WithInstallation_ItemRequestBuilder this[int position] + { + get + { + var urlTplParams = new Dictionary(PathParameters); + urlTplParams.Add("installation_id", position); + return new global::Ayllu.Github.Client.App.Installations.Item.WithInstallation_ItemRequestBuilder(urlTplParams, RequestAdapter); + } + } + /// Gets an item from the Ayllu.Github.Client.app.installations.item collection + /// The unique identifier of the installation. + /// A + [Obsolete("This indexer is deprecated and will be removed in the next major version. Use the one with the typed parameter instead.")] + public global::Ayllu.Github.Client.App.Installations.Item.WithInstallation_ItemRequestBuilder this[string position] + { + get + { + var urlTplParams = new Dictionary(PathParameters); + if (!string.IsNullOrWhiteSpace(position)) urlTplParams.Add("installation_id", position); + return new global::Ayllu.Github.Client.App.Installations.Item.WithInstallation_ItemRequestBuilder(urlTplParams, RequestAdapter); + } + } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public InstallationsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/app/installations{?outdated*,page*,per_page*,since*}", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public InstallationsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/app/installations{?outdated*,page*,per_page*,since*}", rawUrl) + { + } + /// + /// The permissions the installation has are included under the `permissions` key.You must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. + /// API method documentation + /// + /// A List<global::Ayllu.Github.Client.Models.Installation> + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task?> GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task> GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var collectionResult = await RequestAdapter.SendCollectionAsync(requestInfo, global::Ayllu.Github.Client.Models.Installation.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false); + return collectionResult?.AsList(); + } + /// + /// The permissions the installation has are included under the `permissions` key.You must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.App.Installations.InstallationsRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.App.Installations.InstallationsRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// The permissions the installation has are included under the `permissions` key.You must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class InstallationsRequestBuilderGetQueryParameters + { +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("outdated")] + public string? Outdated { get; set; } +#nullable restore +#else + [QueryParameter("outdated")] + public string Outdated { get; set; } +#endif + /// The page number of the results to fetch. For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." + [QueryParameter("page")] + public int? Page { get; set; } + /// The number of results per page (max 100). For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." + [QueryParameter("per_page")] + public int? PerPage { get; set; } + /// 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`. + [QueryParameter("since")] + public DateTimeOffset? Since { get; set; } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class InstallationsRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/App/Installations/Item/Access_tokens/Access_tokensPostRequestBody.cs b/src/Ayllu.Github.Client/Github/Client/App/Installations/Item/Access_tokens/Access_tokensPostRequestBody.cs new file mode 100644 index 0000000..2de6487 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/App/Installations/Item/Access_tokens/Access_tokensPostRequestBody.cs @@ -0,0 +1,86 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.App.Installations.Item.Access_tokens +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class Access_tokensPostRequestBody : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The permissions granted to the user access token. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.AppPermissions? Permissions { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.AppPermissions Permissions { get; set; } +#endif + /// List of repository names that the token should have access to +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? Repositories { get; set; } +#nullable restore +#else + public List Repositories { get; set; } +#endif + /// List of repository IDs that the token should have access to +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? RepositoryIds { get; set; } +#nullable restore +#else + public List RepositoryIds { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public Access_tokensPostRequestBody() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.App.Installations.Item.Access_tokens.Access_tokensPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.App.Installations.Item.Access_tokens.Access_tokensPostRequestBody(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "permissions", n => { Permissions = n.GetObjectValue(global::Ayllu.Github.Client.Models.AppPermissions.CreateFromDiscriminatorValue); } }, + { "repositories", n => { Repositories = n.GetCollectionOfPrimitiveValues()?.AsList(); } }, + { "repository_ids", n => { RepositoryIds = n.GetCollectionOfPrimitiveValues()?.AsList(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteObjectValue("permissions", Permissions); + writer.WriteCollectionOfPrimitiveValues("repositories", Repositories); + writer.WriteCollectionOfPrimitiveValues("repository_ids", RepositoryIds); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/App/Installations/Item/Access_tokens/Access_tokensRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/App/Installations/Item/Access_tokens/Access_tokensRequestBuilder.cs new file mode 100644 index 0000000..2e1f57d --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/App/Installations/Item/Access_tokens/Access_tokensRequestBuilder.cs @@ -0,0 +1,109 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.App.Installations.Item.Access_tokens +{ + /// + /// Builds and executes requests for operations under \app\installations\{installation_id}\access_tokens + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class Access_tokensRequestBuilder : BaseRequestBuilder + { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public Access_tokensRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/app/installations/{installation_id}/access_tokens", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public Access_tokensRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/app/installations/{installation_id}/access_tokens", rawUrl) + { + } + /// + /// 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.You must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. + /// API method documentation + /// + /// A + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 401 status code + /// When receiving a 403 status code + /// When receiving a 404 status code + /// When receiving a 422 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PostAsync(global::Ayllu.Github.Client.App.Installations.Item.Access_tokens.Access_tokensPostRequestBody body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task PostAsync(global::Ayllu.Github.Client.App.Installations.Item.Access_tokens.Access_tokensPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPostRequestInformation(body, requestConfiguration); + var errorMapping = new Dictionary> + { + { "401", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "403", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "404", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "422", global::Ayllu.Github.Client.Models.ValidationError.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Models.InstallationToken.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// 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.You must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. + /// + /// A + /// The request body + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPostRequestInformation(global::Ayllu.Github.Client.App.Installations.Item.Access_tokens.Access_tokensPostRequestBody body, Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToPostRequestInformation(global::Ayllu.Github.Client.App.Installations.Item.Access_tokens.Access_tokensPostRequestBody body, Action> requestConfiguration = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.App.Installations.Item.Access_tokens.Access_tokensRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.App.Installations.Item.Access_tokens.Access_tokensRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class Access_tokensRequestBuilderPostRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/App/Installations/Item/Suspended/SuspendedRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/App/Installations/Item/Suspended/SuspendedRequestBuilder.cs new file mode 100644 index 0000000..c8ba9d1 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/App/Installations/Item/Suspended/SuspendedRequestBuilder.cs @@ -0,0 +1,147 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.App.Installations.Item.Suspended +{ + /// + /// Builds and executes requests for operations under \app\installations\{installation_id}\suspended + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class SuspendedRequestBuilder : BaseRequestBuilder + { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public SuspendedRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/app/installations/{installation_id}/suspended", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public SuspendedRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/app/installations/{installation_id}/suspended", rawUrl) + { + } + /// + /// Removes a GitHub App installation suspension.You must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. + /// API method documentation + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 404 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task DeleteAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task DeleteAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToDeleteRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "404", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + }; + await RequestAdapter.SendNoContentAsync(requestInfo, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// Suspends a GitHub App on a user, organization, or enterprise account, which blocks the app from accessing the account's resources. When a GitHub App is suspended, the app's access to the GitHub API or webhook events is blocked for that account.You must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. + /// API method documentation + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 404 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PutAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task PutAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToPutRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "404", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + }; + await RequestAdapter.SendNoContentAsync(requestInfo, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// Removes a GitHub App installation suspension.You must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToDeleteRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToDeleteRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.DELETE, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Suspends a GitHub App on a user, organization, or enterprise account, which blocks the app from accessing the account's resources. When a GitHub App is suspended, the app's access to the GitHub API or webhook events is blocked for that account.You must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPutRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToPutRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.PUT, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.App.Installations.Item.Suspended.SuspendedRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.App.Installations.Item.Suspended.SuspendedRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class SuspendedRequestBuilderDeleteRequestConfiguration : RequestConfiguration + { + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class SuspendedRequestBuilderPutRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/App/Installations/Item/WithInstallation_ItemRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/App/Installations/Item/WithInstallation_ItemRequestBuilder.cs new file mode 100644 index 0000000..d0426d7 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/App/Installations/Item/WithInstallation_ItemRequestBuilder.cs @@ -0,0 +1,160 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.App.Installations.Item.Access_tokens; +using Ayllu.Github.Client.App.Installations.Item.Suspended; +using Ayllu.Github.Client.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.App.Installations.Item +{ + /// + /// Builds and executes requests for operations under \app\installations\{installation_id} + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithInstallation_ItemRequestBuilder : BaseRequestBuilder + { + /// The access_tokens property + public global::Ayllu.Github.Client.App.Installations.Item.Access_tokens.Access_tokensRequestBuilder Access_tokens + { + get => new global::Ayllu.Github.Client.App.Installations.Item.Access_tokens.Access_tokensRequestBuilder(PathParameters, RequestAdapter); + } + /// The suspended property + public global::Ayllu.Github.Client.App.Installations.Item.Suspended.SuspendedRequestBuilder Suspended + { + get => new global::Ayllu.Github.Client.App.Installations.Item.Suspended.SuspendedRequestBuilder(PathParameters, RequestAdapter); + } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public WithInstallation_ItemRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/app/installations/{installation_id}", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public WithInstallation_ItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/app/installations/{installation_id}", rawUrl) + { + } + /// + /// Uninstalls a GitHub App on a user, organization, or enterprise 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/rest/apps/apps#suspend-an-app-installation)" endpoint.You must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. + /// API method documentation + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 404 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task DeleteAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task DeleteAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToDeleteRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "404", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + }; + await RequestAdapter.SendNoContentAsync(requestInfo, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// Enables an authenticated GitHub App to find an installation's information using the installation id.You must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. + /// API method documentation + /// + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 404 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "404", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Models.Installation.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// Uninstalls a GitHub App on a user, organization, or enterprise 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/rest/apps/apps#suspend-an-app-installation)" endpoint.You must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToDeleteRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToDeleteRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.DELETE, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Enables an authenticated GitHub App to find an installation's information using the installation id.You must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.App.Installations.Item.WithInstallation_ItemRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.App.Installations.Item.WithInstallation_ItemRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithInstallation_ItemRequestBuilderDeleteRequestConfiguration : RequestConfiguration + { + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithInstallation_ItemRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/AppManifests/AppManifestsRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/AppManifests/AppManifestsRequestBuilder.cs new file mode 100644 index 0000000..3fa7bf0 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/AppManifests/AppManifestsRequestBuilder.cs @@ -0,0 +1,48 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.AppManifests.Item; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System; +namespace Ayllu.Github.Client.AppManifests +{ + /// + /// Builds and executes requests for operations under \app-manifests + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class AppManifestsRequestBuilder : BaseRequestBuilder + { + /// Gets an item from the Ayllu.Github.Client.appManifests.item collection + /// Unique identifier of the item + /// A + public global::Ayllu.Github.Client.AppManifests.Item.WithCodeItemRequestBuilder this[string position] + { + get + { + var urlTplParams = new Dictionary(PathParameters); + urlTplParams.Add("code", position); + return new global::Ayllu.Github.Client.AppManifests.Item.WithCodeItemRequestBuilder(urlTplParams, RequestAdapter); + } + } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public AppManifestsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/app-manifests", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public AppManifestsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/app-manifests", rawUrl) + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/AppManifests/Item/Conversions/ConversionsPostResponse.cs b/src/Ayllu.Github.Client/Github/Client/AppManifests/Item/Conversions/ConversionsPostResponse.cs new file mode 100644 index 0000000..3e27fa6 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/AppManifests/Item/Conversions/ConversionsPostResponse.cs @@ -0,0 +1,77 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.AppManifests.Item.Conversions +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class ConversionsPostResponse : global::Ayllu.Github.Client.Models.Integration, IParsable + #pragma warning restore CS1591 + { + /// The client_secret property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? ClientSecret { get; set; } +#nullable restore +#else + public string ClientSecret { get; set; } +#endif + /// The pem property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Pem { get; set; } +#nullable restore +#else + public string Pem { get; set; } +#endif + /// The webhook_secret property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? WebhookSecret { get; set; } +#nullable restore +#else + public string WebhookSecret { get; set; } +#endif + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static new global::Ayllu.Github.Client.AppManifests.Item.Conversions.ConversionsPostResponse CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.AppManifests.Item.Conversions.ConversionsPostResponse(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public override IDictionary> GetFieldDeserializers() + { + return new Dictionary>(base.GetFieldDeserializers()) + { + { "client_secret", n => { ClientSecret = n.GetStringValue(); } }, + { "pem", n => { Pem = n.GetStringValue(); } }, + { "webhook_secret", n => { WebhookSecret = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public override void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + base.Serialize(writer); + writer.WriteStringValue("client_secret", ClientSecret); + writer.WriteStringValue("pem", Pem); + writer.WriteStringValue("webhook_secret", WebhookSecret); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/AppManifests/Item/Conversions/ConversionsRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/AppManifests/Item/Conversions/ConversionsRequestBuilder.cs new file mode 100644 index 0000000..4e2f28b --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/AppManifests/Item/Conversions/ConversionsRequestBuilder.cs @@ -0,0 +1,127 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.AppManifests.Item.Conversions +{ + /// + /// Builds and executes requests for operations under \app-manifests\{code}\conversions + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class ConversionsRequestBuilder : BaseRequestBuilder + { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public ConversionsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/app-manifests/{code}/conversions", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public ConversionsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/app-manifests/{code}/conversions", rawUrl) + { + } + /// + /// Use this endpoint to complete the handshake necessary when implementing the [GitHub App Manifest flow](https://docs.github.com/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`. + /// API method documentation + /// + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 404 status code + /// When receiving a 422 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PostAsConversionsPostResponseAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task PostAsConversionsPostResponseAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToPostRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "404", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "422", global::Ayllu.Github.Client.Models.ValidationErrorSimple.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.AppManifests.Item.Conversions.ConversionsPostResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// Use this endpoint to complete the handshake necessary when implementing the [GitHub App Manifest flow](https://docs.github.com/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`. + /// API method documentation + /// + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 404 status code + /// When receiving a 422 status code + [Obsolete("This method is obsolete. Use PostAsConversionsPostResponseAsync instead.")] +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PostAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task PostAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToPostRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "404", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "422", global::Ayllu.Github.Client.Models.ValidationErrorSimple.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.AppManifests.Item.Conversions.ConversionsResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// Use this endpoint to complete the handshake necessary when implementing the [GitHub App Manifest flow](https://docs.github.com/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`. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPostRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToPostRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.AppManifests.Item.Conversions.ConversionsRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.AppManifests.Item.Conversions.ConversionsRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class ConversionsRequestBuilderPostRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/AppManifests/Item/Conversions/ConversionsResponse.cs b/src/Ayllu.Github.Client/Github/Client/AppManifests/Item/Conversions/ConversionsResponse.cs new file mode 100644 index 0000000..917963f --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/AppManifests/Item/Conversions/ConversionsResponse.cs @@ -0,0 +1,28 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.AppManifests.Item.Conversions +{ + [Obsolete("This class is obsolete. Use ConversionsPostResponse instead.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class ConversionsResponse : global::Ayllu.Github.Client.AppManifests.Item.Conversions.ConversionsPostResponse, IParsable + #pragma warning restore CS1591 + { + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static new global::Ayllu.Github.Client.AppManifests.Item.Conversions.ConversionsResponse CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.AppManifests.Item.Conversions.ConversionsResponse(); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/AppManifests/Item/WithCodeItemRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/AppManifests/Item/WithCodeItemRequestBuilder.cs new file mode 100644 index 0000000..b7bda65 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/AppManifests/Item/WithCodeItemRequestBuilder.cs @@ -0,0 +1,41 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.AppManifests.Item.Conversions; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System; +namespace Ayllu.Github.Client.AppManifests.Item +{ + /// + /// Builds and executes requests for operations under \app-manifests\{code} + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithCodeItemRequestBuilder : BaseRequestBuilder + { + /// The conversions property + public global::Ayllu.Github.Client.AppManifests.Item.Conversions.ConversionsRequestBuilder Conversions + { + get => new global::Ayllu.Github.Client.AppManifests.Item.Conversions.ConversionsRequestBuilder(PathParameters, RequestAdapter); + } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public WithCodeItemRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/app-manifests/{code}", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public WithCodeItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/app-manifests/{code}", rawUrl) + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Applications/ApplicationsRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Applications/ApplicationsRequestBuilder.cs new file mode 100644 index 0000000..ce0d4c4 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Applications/ApplicationsRequestBuilder.cs @@ -0,0 +1,48 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Applications.Item; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System; +namespace Ayllu.Github.Client.Applications +{ + /// + /// Builds and executes requests for operations under \applications + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class ApplicationsRequestBuilder : BaseRequestBuilder + { + /// Gets an item from the Ayllu.Github.Client.applications.item collection + /// The client ID of the GitHub app. + /// A + public global::Ayllu.Github.Client.Applications.Item.WithClient_ItemRequestBuilder this[string position] + { + get + { + var urlTplParams = new Dictionary(PathParameters); + urlTplParams.Add("client_id", position); + return new global::Ayllu.Github.Client.Applications.Item.WithClient_ItemRequestBuilder(urlTplParams, RequestAdapter); + } + } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public ApplicationsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/applications", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public ApplicationsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/applications", rawUrl) + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Applications/Item/Grant/GrantDeleteRequestBody.cs b/src/Ayllu.Github.Client/Github/Client/Applications/Item/Grant/GrantDeleteRequestBody.cs new file mode 100644 index 0000000..d0b9bd4 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Applications/Item/Grant/GrantDeleteRequestBody.cs @@ -0,0 +1,65 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Applications.Item.Grant +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class GrantDeleteRequestBody : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// The OAuth access token used to authenticate to the GitHub API. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? AccessToken { get; set; } +#nullable restore +#else + public string AccessToken { get; set; } +#endif + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public GrantDeleteRequestBody() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Applications.Item.Grant.GrantDeleteRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Applications.Item.Grant.GrantDeleteRequestBody(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "access_token", n => { AccessToken = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("access_token", AccessToken); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Applications/Item/Grant/GrantRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Applications/Item/Grant/GrantRequestBuilder.cs new file mode 100644 index 0000000..9cf2a59 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Applications/Item/Grant/GrantRequestBuilder.cs @@ -0,0 +1,102 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Applications.Item.Grant +{ + /// + /// Builds and executes requests for operations under \applications\{client_id}\grant + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class GrantRequestBuilder : BaseRequestBuilder + { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public GrantRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/applications/{client_id}/grant", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public GrantRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/applications/{client_id}/grant", rawUrl) + { + } + /// + /// 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). + /// API method documentation + /// + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 422 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task DeleteAsync(global::Ayllu.Github.Client.Applications.Item.Grant.GrantDeleteRequestBody body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task DeleteAsync(global::Ayllu.Github.Client.Applications.Item.Grant.GrantDeleteRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = ToDeleteRequestInformation(body, requestConfiguration); + var errorMapping = new Dictionary> + { + { "422", global::Ayllu.Github.Client.Models.ValidationError.CreateFromDiscriminatorValue }, + }; + await RequestAdapter.SendNoContentAsync(requestInfo, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// 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). + /// + /// A + /// The request body + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToDeleteRequestInformation(global::Ayllu.Github.Client.Applications.Item.Grant.GrantDeleteRequestBody body, Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToDeleteRequestInformation(global::Ayllu.Github.Client.Applications.Item.Grant.GrantDeleteRequestBody body, Action> requestConfiguration = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation(Method.DELETE, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.Applications.Item.Grant.GrantRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Applications.Item.Grant.GrantRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class GrantRequestBuilderDeleteRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Applications/Item/Token/Scoped/ScopedPostRequestBody.cs b/src/Ayllu.Github.Client/Github/Client/Applications/Item/Token/Scoped/ScopedPostRequestBody.cs new file mode 100644 index 0000000..993a933 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Applications/Item/Token/Scoped/ScopedPostRequestBody.cs @@ -0,0 +1,110 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Applications.Item.Token.Scoped +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class ScopedPostRequestBody : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// The access token used to authenticate to the GitHub API. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? AccessToken { get; set; } +#nullable restore +#else + public string AccessToken { get; set; } +#endif + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The permissions granted to the user access token. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.AppPermissions? Permissions { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.AppPermissions Permissions { get; set; } +#endif + /// The list of repository names to scope the user access token to. `repositories` may not be specified if `repository_ids` is specified. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? Repositories { get; set; } +#nullable restore +#else + public List Repositories { get; set; } +#endif + /// The list of repository IDs to scope the user access token to. `repository_ids` may not be specified if `repositories` is specified. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? RepositoryIds { get; set; } +#nullable restore +#else + public List RepositoryIds { get; set; } +#endif + /// The name of the user or organization to scope the user access token to. **Required** unless `target_id` is specified. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Target { get; set; } +#nullable restore +#else + public string Target { get; set; } +#endif + /// The ID of the user or organization to scope the user access token to. **Required** unless `target` is specified. + public int? TargetId { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public ScopedPostRequestBody() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Applications.Item.Token.Scoped.ScopedPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Applications.Item.Token.Scoped.ScopedPostRequestBody(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "access_token", n => { AccessToken = n.GetStringValue(); } }, + { "permissions", n => { Permissions = n.GetObjectValue(global::Ayllu.Github.Client.Models.AppPermissions.CreateFromDiscriminatorValue); } }, + { "repositories", n => { Repositories = n.GetCollectionOfPrimitiveValues()?.AsList(); } }, + { "repository_ids", n => { RepositoryIds = n.GetCollectionOfPrimitiveValues()?.AsList(); } }, + { "target", n => { Target = n.GetStringValue(); } }, + { "target_id", n => { TargetId = n.GetIntValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("access_token", AccessToken); + writer.WriteObjectValue("permissions", Permissions); + writer.WriteCollectionOfPrimitiveValues("repositories", Repositories); + writer.WriteCollectionOfPrimitiveValues("repository_ids", RepositoryIds); + writer.WriteStringValue("target", Target); + writer.WriteIntValue("target_id", TargetId); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Applications/Item/Token/Scoped/ScopedRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Applications/Item/Token/Scoped/ScopedRequestBuilder.cs new file mode 100644 index 0000000..d747e9c --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Applications/Item/Token/Scoped/ScopedRequestBuilder.cs @@ -0,0 +1,109 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Applications.Item.Token.Scoped +{ + /// + /// Builds and executes requests for operations under \applications\{client_id}\token\scoped + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class ScopedRequestBuilder : BaseRequestBuilder + { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public ScopedRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/applications/{client_id}/token/scoped", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public ScopedRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/applications/{client_id}/token/scoped", rawUrl) + { + } + /// + /// 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`. + /// API method documentation + /// + /// A + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 401 status code + /// When receiving a 403 status code + /// When receiving a 404 status code + /// When receiving a 422 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PostAsync(global::Ayllu.Github.Client.Applications.Item.Token.Scoped.ScopedPostRequestBody body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task PostAsync(global::Ayllu.Github.Client.Applications.Item.Token.Scoped.ScopedPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPostRequestInformation(body, requestConfiguration); + var errorMapping = new Dictionary> + { + { "401", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "403", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "404", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "422", global::Ayllu.Github.Client.Models.ValidationError.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Models.Authorization.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// 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`. + /// + /// A + /// The request body + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPostRequestInformation(global::Ayllu.Github.Client.Applications.Item.Token.Scoped.ScopedPostRequestBody body, Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToPostRequestInformation(global::Ayllu.Github.Client.Applications.Item.Token.Scoped.ScopedPostRequestBody body, Action> requestConfiguration = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.Applications.Item.Token.Scoped.ScopedRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Applications.Item.Token.Scoped.ScopedRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class ScopedRequestBuilderPostRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Applications/Item/Token/TokenDeleteRequestBody.cs b/src/Ayllu.Github.Client/Github/Client/Applications/Item/Token/TokenDeleteRequestBody.cs new file mode 100644 index 0000000..4114ef7 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Applications/Item/Token/TokenDeleteRequestBody.cs @@ -0,0 +1,65 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Applications.Item.Token +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class TokenDeleteRequestBody : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// The OAuth access token used to authenticate to the GitHub API. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? AccessToken { get; set; } +#nullable restore +#else + public string AccessToken { get; set; } +#endif + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public TokenDeleteRequestBody() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Applications.Item.Token.TokenDeleteRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Applications.Item.Token.TokenDeleteRequestBody(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "access_token", n => { AccessToken = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("access_token", AccessToken); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Applications/Item/Token/TokenPatchRequestBody.cs b/src/Ayllu.Github.Client/Github/Client/Applications/Item/Token/TokenPatchRequestBody.cs new file mode 100644 index 0000000..07f1b40 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Applications/Item/Token/TokenPatchRequestBody.cs @@ -0,0 +1,65 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Applications.Item.Token +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class TokenPatchRequestBody : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// The access_token of the OAuth or GitHub application. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? AccessToken { get; set; } +#nullable restore +#else + public string AccessToken { get; set; } +#endif + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public TokenPatchRequestBody() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Applications.Item.Token.TokenPatchRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Applications.Item.Token.TokenPatchRequestBody(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "access_token", n => { AccessToken = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("access_token", AccessToken); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Applications/Item/Token/TokenPostRequestBody.cs b/src/Ayllu.Github.Client/Github/Client/Applications/Item/Token/TokenPostRequestBody.cs new file mode 100644 index 0000000..4847355 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Applications/Item/Token/TokenPostRequestBody.cs @@ -0,0 +1,65 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Applications.Item.Token +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class TokenPostRequestBody : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// The access_token of the OAuth or GitHub application. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? AccessToken { get; set; } +#nullable restore +#else + public string AccessToken { get; set; } +#endif + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public TokenPostRequestBody() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Applications.Item.Token.TokenPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Applications.Item.Token.TokenPostRequestBody(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "access_token", n => { AccessToken = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("access_token", AccessToken); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Applications/Item/Token/TokenRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Applications/Item/Token/TokenRequestBuilder.cs new file mode 100644 index 0000000..85d499e --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Applications/Item/Token/TokenRequestBuilder.cs @@ -0,0 +1,222 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Applications.Item.Token.Scoped; +using Ayllu.Github.Client.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Applications.Item.Token +{ + /// + /// Builds and executes requests for operations under \applications\{client_id}\token + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class TokenRequestBuilder : BaseRequestBuilder + { + /// The scoped property + public global::Ayllu.Github.Client.Applications.Item.Token.Scoped.ScopedRequestBuilder Scoped + { + get => new global::Ayllu.Github.Client.Applications.Item.Token.Scoped.ScopedRequestBuilder(PathParameters, RequestAdapter); + } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public TokenRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/applications/{client_id}/token", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public TokenRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/applications/{client_id}/token", rawUrl) + { + } + /// + /// OAuth or GitHub application owners can revoke a single token for an OAuth application or a GitHub application with an OAuth authorization. + /// API method documentation + /// + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 422 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task DeleteAsync(global::Ayllu.Github.Client.Applications.Item.Token.TokenDeleteRequestBody body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task DeleteAsync(global::Ayllu.Github.Client.Applications.Item.Token.TokenDeleteRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = ToDeleteRequestInformation(body, requestConfiguration); + var errorMapping = new Dictionary> + { + { "422", global::Ayllu.Github.Client.Models.ValidationError.CreateFromDiscriminatorValue }, + }; + await RequestAdapter.SendNoContentAsync(requestInfo, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// 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`. + /// API method documentation + /// + /// A + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 422 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PatchAsync(global::Ayllu.Github.Client.Applications.Item.Token.TokenPatchRequestBody body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task PatchAsync(global::Ayllu.Github.Client.Applications.Item.Token.TokenPatchRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPatchRequestInformation(body, requestConfiguration); + var errorMapping = new Dictionary> + { + { "422", global::Ayllu.Github.Client.Models.ValidationError.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Models.Authorization.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// 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`. + /// API method documentation + /// + /// A + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 404 status code + /// When receiving a 422 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PostAsync(global::Ayllu.Github.Client.Applications.Item.Token.TokenPostRequestBody body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task PostAsync(global::Ayllu.Github.Client.Applications.Item.Token.TokenPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPostRequestInformation(body, requestConfiguration); + var errorMapping = new Dictionary> + { + { "404", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "422", global::Ayllu.Github.Client.Models.ValidationError.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Models.Authorization.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// OAuth or GitHub application owners can revoke a single token for an OAuth application or a GitHub application with an OAuth authorization. + /// + /// A + /// The request body + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToDeleteRequestInformation(global::Ayllu.Github.Client.Applications.Item.Token.TokenDeleteRequestBody body, Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToDeleteRequestInformation(global::Ayllu.Github.Client.Applications.Item.Token.TokenDeleteRequestBody body, Action> requestConfiguration = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation(Method.DELETE, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + return requestInfo; + } + /// + /// 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`. + /// + /// A + /// The request body + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPatchRequestInformation(global::Ayllu.Github.Client.Applications.Item.Token.TokenPatchRequestBody body, Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToPatchRequestInformation(global::Ayllu.Github.Client.Applications.Item.Token.TokenPatchRequestBody body, Action> requestConfiguration = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + return requestInfo; + } + /// + /// 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`. + /// + /// A + /// The request body + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPostRequestInformation(global::Ayllu.Github.Client.Applications.Item.Token.TokenPostRequestBody body, Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToPostRequestInformation(global::Ayllu.Github.Client.Applications.Item.Token.TokenPostRequestBody body, Action> requestConfiguration = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.Applications.Item.Token.TokenRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Applications.Item.Token.TokenRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class TokenRequestBuilderDeleteRequestConfiguration : RequestConfiguration + { + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class TokenRequestBuilderPatchRequestConfiguration : RequestConfiguration + { + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class TokenRequestBuilderPostRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Applications/Item/WithClient_ItemRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Applications/Item/WithClient_ItemRequestBuilder.cs new file mode 100644 index 0000000..6447441 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Applications/Item/WithClient_ItemRequestBuilder.cs @@ -0,0 +1,47 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Applications.Item.Grant; +using Ayllu.Github.Client.Applications.Item.Token; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System; +namespace Ayllu.Github.Client.Applications.Item +{ + /// + /// Builds and executes requests for operations under \applications\{client_id} + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithClient_ItemRequestBuilder : BaseRequestBuilder + { + /// The grant property + public global::Ayllu.Github.Client.Applications.Item.Grant.GrantRequestBuilder Grant + { + get => new global::Ayllu.Github.Client.Applications.Item.Grant.GrantRequestBuilder(PathParameters, RequestAdapter); + } + /// The token property + public global::Ayllu.Github.Client.Applications.Item.Token.TokenRequestBuilder Token + { + get => new global::Ayllu.Github.Client.Applications.Item.Token.TokenRequestBuilder(PathParameters, RequestAdapter); + } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public WithClient_ItemRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/applications/{client_id}", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public WithClient_ItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/applications/{client_id}", rawUrl) + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Apps/AppsRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Apps/AppsRequestBuilder.cs new file mode 100644 index 0000000..518a92b --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Apps/AppsRequestBuilder.cs @@ -0,0 +1,48 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Apps.Item; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System; +namespace Ayllu.Github.Client.Apps +{ + /// + /// Builds and executes requests for operations under \apps + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class AppsRequestBuilder : BaseRequestBuilder + { + /// Gets an item from the Ayllu.Github.Client.apps.item collection + /// Unique identifier of the item + /// A + public global::Ayllu.Github.Client.Apps.Item.WithApp_slugItemRequestBuilder this[string position] + { + get + { + var urlTplParams = new Dictionary(PathParameters); + urlTplParams.Add("app_slug", position); + return new global::Ayllu.Github.Client.Apps.Item.WithApp_slugItemRequestBuilder(urlTplParams, RequestAdapter); + } + } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public AppsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/apps", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public AppsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/apps", rawUrl) + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Apps/Item/WithApp_slugItemRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Apps/Item/WithApp_slugItemRequestBuilder.cs new file mode 100644 index 0000000..b651bb0 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Apps/Item/WithApp_slugItemRequestBuilder.cs @@ -0,0 +1,100 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Apps.Item +{ + /// + /// Builds and executes requests for operations under \apps\{app_slug} + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithApp_slugItemRequestBuilder : BaseRequestBuilder + { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public WithApp_slugItemRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/apps/{app_slug}", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public WithApp_slugItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/apps/{app_slug}", rawUrl) + { + } + /// + /// > [!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`). + /// API method documentation + /// + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 403 status code + /// When receiving a 404 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "403", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "404", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Models.Integration.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// > [!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`). + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.Apps.Item.WithApp_slugItemRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Apps.Item.WithApp_slugItemRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithApp_slugItemRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Assignments/AssignmentsRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Assignments/AssignmentsRequestBuilder.cs new file mode 100644 index 0000000..d9ac572 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Assignments/AssignmentsRequestBuilder.cs @@ -0,0 +1,61 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Assignments.Item; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System; +namespace Ayllu.Github.Client.Assignments +{ + /// + /// Builds and executes requests for operations under \assignments + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class AssignmentsRequestBuilder : BaseRequestBuilder + { + /// Gets an item from the Ayllu.Github.Client.assignments.item collection + /// The unique identifier of the classroom assignment. + /// A + public global::Ayllu.Github.Client.Assignments.Item.WithAssignment_ItemRequestBuilder this[int position] + { + get + { + var urlTplParams = new Dictionary(PathParameters); + urlTplParams.Add("assignment_id", position); + return new global::Ayllu.Github.Client.Assignments.Item.WithAssignment_ItemRequestBuilder(urlTplParams, RequestAdapter); + } + } + /// Gets an item from the Ayllu.Github.Client.assignments.item collection + /// The unique identifier of the classroom assignment. + /// A + [Obsolete("This indexer is deprecated and will be removed in the next major version. Use the one with the typed parameter instead.")] + public global::Ayllu.Github.Client.Assignments.Item.WithAssignment_ItemRequestBuilder this[string position] + { + get + { + var urlTplParams = new Dictionary(PathParameters); + if (!string.IsNullOrWhiteSpace(position)) urlTplParams.Add("assignment_id", position); + return new global::Ayllu.Github.Client.Assignments.Item.WithAssignment_ItemRequestBuilder(urlTplParams, RequestAdapter); + } + } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public AssignmentsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/assignments", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public AssignmentsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/assignments", rawUrl) + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Assignments/Item/Accepted_assignments/Accepted_assignmentsRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Assignments/Item/Accepted_assignments/Accepted_assignmentsRequestBuilder.cs new file mode 100644 index 0000000..504f181 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Assignments/Item/Accepted_assignments/Accepted_assignmentsRequestBuilder.cs @@ -0,0 +1,107 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Assignments.Item.Accepted_assignments +{ + /// + /// Builds and executes requests for operations under \assignments\{assignment_id}\accepted_assignments + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class Accepted_assignmentsRequestBuilder : BaseRequestBuilder + { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public Accepted_assignmentsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/assignments/{assignment_id}/accepted_assignments{?page*,per_page*}", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public Accepted_assignmentsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/assignments/{assignment_id}/accepted_assignments{?page*,per_page*}", rawUrl) + { + } + /// + /// 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. + /// API method documentation + /// + /// A List<global::Ayllu.Github.Client.Models.ClassroomAcceptedAssignment> + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task?> GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task> GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var collectionResult = await RequestAdapter.SendCollectionAsync(requestInfo, global::Ayllu.Github.Client.Models.ClassroomAcceptedAssignment.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false); + return collectionResult?.AsList(); + } + /// + /// 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. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.Assignments.Item.Accepted_assignments.Accepted_assignmentsRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Assignments.Item.Accepted_assignments.Accepted_assignmentsRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// 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. + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class Accepted_assignmentsRequestBuilderGetQueryParameters + { + /// The page number of the results to fetch. For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." + [QueryParameter("page")] + public int? Page { get; set; } + /// The number of results per page (max 100). For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." + [QueryParameter("per_page")] + public int? PerPage { get; set; } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class Accepted_assignmentsRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Assignments/Item/Grades/GradesRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Assignments/Item/Grades/GradesRequestBuilder.cs new file mode 100644 index 0000000..67a9ca3 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Assignments/Item/Grades/GradesRequestBuilder.cs @@ -0,0 +1,99 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Assignments.Item.Grades +{ + /// + /// Builds and executes requests for operations under \assignments\{assignment_id}\grades + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class GradesRequestBuilder : BaseRequestBuilder + { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public GradesRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/assignments/{assignment_id}/grades", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public GradesRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/assignments/{assignment_id}/grades", rawUrl) + { + } + /// + /// 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. + /// API method documentation + /// + /// A List<global::Ayllu.Github.Client.Models.ClassroomAssignmentGrade> + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 404 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task?> GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task> GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "404", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + }; + var collectionResult = await RequestAdapter.SendCollectionAsync(requestInfo, global::Ayllu.Github.Client.Models.ClassroomAssignmentGrade.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + return collectionResult?.AsList(); + } + /// + /// 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. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.Assignments.Item.Grades.GradesRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Assignments.Item.Grades.GradesRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class GradesRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Assignments/Item/WithAssignment_ItemRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Assignments/Item/WithAssignment_ItemRequestBuilder.cs new file mode 100644 index 0000000..b8a9159 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Assignments/Item/WithAssignment_ItemRequestBuilder.cs @@ -0,0 +1,110 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Assignments.Item.Accepted_assignments; +using Ayllu.Github.Client.Assignments.Item.Grades; +using Ayllu.Github.Client.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Assignments.Item +{ + /// + /// Builds and executes requests for operations under \assignments\{assignment_id} + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithAssignment_ItemRequestBuilder : BaseRequestBuilder + { + /// The accepted_assignments property + public global::Ayllu.Github.Client.Assignments.Item.Accepted_assignments.Accepted_assignmentsRequestBuilder Accepted_assignments + { + get => new global::Ayllu.Github.Client.Assignments.Item.Accepted_assignments.Accepted_assignmentsRequestBuilder(PathParameters, RequestAdapter); + } + /// The grades property + public global::Ayllu.Github.Client.Assignments.Item.Grades.GradesRequestBuilder Grades + { + get => new global::Ayllu.Github.Client.Assignments.Item.Grades.GradesRequestBuilder(PathParameters, RequestAdapter); + } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public WithAssignment_ItemRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/assignments/{assignment_id}", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public WithAssignment_ItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/assignments/{assignment_id}", rawUrl) + { + } + /// + /// Gets a GitHub Classroom assignment. Assignment will only be returned if the current user is an administrator of the GitHub Classroom for the assignment. + /// API method documentation + /// + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 404 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "404", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Models.ClassroomAssignment.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// Gets a GitHub Classroom assignment. Assignment will only be returned if the current user is an administrator of the GitHub Classroom for the assignment. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.Assignments.Item.WithAssignment_ItemRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Assignments.Item.WithAssignment_ItemRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithAssignment_ItemRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/AylluGithubClient.cs b/src/Ayllu.Github.Client/Github/Client/AylluGithubClient.cs new file mode 100644 index 0000000..9ebd3f9 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/AylluGithubClient.cs @@ -0,0 +1,307 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Advisories; +using Ayllu.Github.Client.App; +using Ayllu.Github.Client.AppManifests; +using Ayllu.Github.Client.Applications; +using Ayllu.Github.Client.Apps; +using Ayllu.Github.Client.Assignments; +using Ayllu.Github.Client.Classrooms; +using Ayllu.Github.Client.Codes_of_conduct; +using Ayllu.Github.Client.Credentials; +using Ayllu.Github.Client.Emojis; +using Ayllu.Github.Client.Enterprises; +using Ayllu.Github.Client.Events; +using Ayllu.Github.Client.Feeds; +using Ayllu.Github.Client.Gists; +using Ayllu.Github.Client.Gitignore; +using Ayllu.Github.Client.Installation; +using Ayllu.Github.Client.Issues; +using Ayllu.Github.Client.Licenses; +using Ayllu.Github.Client.Markdown; +using Ayllu.Github.Client.Marketplace_listing; +using Ayllu.Github.Client.Meta; +using Ayllu.Github.Client.Models; +using Ayllu.Github.Client.Networks; +using Ayllu.Github.Client.Notifications; +using Ayllu.Github.Client.Octocat; +using Ayllu.Github.Client.Organizations; +using Ayllu.Github.Client.Orgs; +using Ayllu.Github.Client.Projects; +using Ayllu.Github.Client.Rate_limit; +using Ayllu.Github.Client.Repos; +using Ayllu.Github.Client.Repositories; +using Ayllu.Github.Client.Search; +using Ayllu.Github.Client.Teams; +using Ayllu.Github.Client.User; +using Ayllu.Github.Client.Users; +using Ayllu.Github.Client.Versions; +using Ayllu.Github.Client.Zen; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using Microsoft.Kiota.Serialization.Form; +using Microsoft.Kiota.Serialization.Json; +using Microsoft.Kiota.Serialization.Multipart; +using Microsoft.Kiota.Serialization.Text; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client +{ + /// + /// The main entry point of the SDK, exposes the configuration and the fluent API. + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class AylluGithubClient : BaseRequestBuilder + { + /// The advisories property + public global::Ayllu.Github.Client.Advisories.AdvisoriesRequestBuilder Advisories + { + get => new global::Ayllu.Github.Client.Advisories.AdvisoriesRequestBuilder(PathParameters, RequestAdapter); + } + /// The app property + public global::Ayllu.Github.Client.App.AppRequestBuilder App + { + get => new global::Ayllu.Github.Client.App.AppRequestBuilder(PathParameters, RequestAdapter); + } + /// The applications property + public global::Ayllu.Github.Client.Applications.ApplicationsRequestBuilder Applications + { + get => new global::Ayllu.Github.Client.Applications.ApplicationsRequestBuilder(PathParameters, RequestAdapter); + } + /// The appManifests property + public global::Ayllu.Github.Client.AppManifests.AppManifestsRequestBuilder AppManifests + { + get => new global::Ayllu.Github.Client.AppManifests.AppManifestsRequestBuilder(PathParameters, RequestAdapter); + } + /// The apps property + public global::Ayllu.Github.Client.Apps.AppsRequestBuilder Apps + { + get => new global::Ayllu.Github.Client.Apps.AppsRequestBuilder(PathParameters, RequestAdapter); + } + /// The assignments property + public global::Ayllu.Github.Client.Assignments.AssignmentsRequestBuilder Assignments + { + get => new global::Ayllu.Github.Client.Assignments.AssignmentsRequestBuilder(PathParameters, RequestAdapter); + } + /// The classrooms property + public global::Ayllu.Github.Client.Classrooms.ClassroomsRequestBuilder Classrooms + { + get => new global::Ayllu.Github.Client.Classrooms.ClassroomsRequestBuilder(PathParameters, RequestAdapter); + } + /// The codes_of_conduct property + public global::Ayllu.Github.Client.Codes_of_conduct.Codes_of_conductRequestBuilder Codes_of_conduct + { + get => new global::Ayllu.Github.Client.Codes_of_conduct.Codes_of_conductRequestBuilder(PathParameters, RequestAdapter); + } + /// The credentials property + public global::Ayllu.Github.Client.Credentials.CredentialsRequestBuilder Credentials + { + get => new global::Ayllu.Github.Client.Credentials.CredentialsRequestBuilder(PathParameters, RequestAdapter); + } + /// The emojis property + public global::Ayllu.Github.Client.Emojis.EmojisRequestBuilder Emojis + { + get => new global::Ayllu.Github.Client.Emojis.EmojisRequestBuilder(PathParameters, RequestAdapter); + } + /// The enterprises property + public global::Ayllu.Github.Client.Enterprises.EnterprisesRequestBuilder Enterprises + { + get => new global::Ayllu.Github.Client.Enterprises.EnterprisesRequestBuilder(PathParameters, RequestAdapter); + } + /// The events property + public global::Ayllu.Github.Client.Events.EventsRequestBuilder Events + { + get => new global::Ayllu.Github.Client.Events.EventsRequestBuilder(PathParameters, RequestAdapter); + } + /// The feeds property + public global::Ayllu.Github.Client.Feeds.FeedsRequestBuilder Feeds + { + get => new global::Ayllu.Github.Client.Feeds.FeedsRequestBuilder(PathParameters, RequestAdapter); + } + /// The gists property + public global::Ayllu.Github.Client.Gists.GistsRequestBuilder Gists + { + get => new global::Ayllu.Github.Client.Gists.GistsRequestBuilder(PathParameters, RequestAdapter); + } + /// The gitignore property + public global::Ayllu.Github.Client.Gitignore.GitignoreRequestBuilder Gitignore + { + get => new global::Ayllu.Github.Client.Gitignore.GitignoreRequestBuilder(PathParameters, RequestAdapter); + } + /// The installation property + public global::Ayllu.Github.Client.Installation.InstallationRequestBuilder Installation + { + get => new global::Ayllu.Github.Client.Installation.InstallationRequestBuilder(PathParameters, RequestAdapter); + } + /// The issues property + public global::Ayllu.Github.Client.Issues.IssuesRequestBuilder Issues + { + get => new global::Ayllu.Github.Client.Issues.IssuesRequestBuilder(PathParameters, RequestAdapter); + } + /// The licenses property + public global::Ayllu.Github.Client.Licenses.LicensesRequestBuilder Licenses + { + get => new global::Ayllu.Github.Client.Licenses.LicensesRequestBuilder(PathParameters, RequestAdapter); + } + /// The markdown property + public global::Ayllu.Github.Client.Markdown.MarkdownRequestBuilder Markdown + { + get => new global::Ayllu.Github.Client.Markdown.MarkdownRequestBuilder(PathParameters, RequestAdapter); + } + /// The marketplace_listing property + public global::Ayllu.Github.Client.Marketplace_listing.Marketplace_listingRequestBuilder Marketplace_listing + { + get => new global::Ayllu.Github.Client.Marketplace_listing.Marketplace_listingRequestBuilder(PathParameters, RequestAdapter); + } + /// The meta property + public global::Ayllu.Github.Client.Meta.MetaRequestBuilder Meta + { + get => new global::Ayllu.Github.Client.Meta.MetaRequestBuilder(PathParameters, RequestAdapter); + } + /// The networks property + public global::Ayllu.Github.Client.Networks.NetworksRequestBuilder Networks + { + get => new global::Ayllu.Github.Client.Networks.NetworksRequestBuilder(PathParameters, RequestAdapter); + } + /// The notifications property + public global::Ayllu.Github.Client.Notifications.NotificationsRequestBuilder Notifications + { + get => new global::Ayllu.Github.Client.Notifications.NotificationsRequestBuilder(PathParameters, RequestAdapter); + } + /// The octocat property + public global::Ayllu.Github.Client.Octocat.OctocatRequestBuilder Octocat + { + get => new global::Ayllu.Github.Client.Octocat.OctocatRequestBuilder(PathParameters, RequestAdapter); + } + /// The organizations property + public global::Ayllu.Github.Client.Organizations.OrganizationsRequestBuilder Organizations + { + get => new global::Ayllu.Github.Client.Organizations.OrganizationsRequestBuilder(PathParameters, RequestAdapter); + } + /// The orgs property + public global::Ayllu.Github.Client.Orgs.OrgsRequestBuilder Orgs + { + get => new global::Ayllu.Github.Client.Orgs.OrgsRequestBuilder(PathParameters, RequestAdapter); + } + /// The projects property + public global::Ayllu.Github.Client.Projects.ProjectsRequestBuilder Projects + { + get => new global::Ayllu.Github.Client.Projects.ProjectsRequestBuilder(PathParameters, RequestAdapter); + } + /// The rate_limit property + public global::Ayllu.Github.Client.Rate_limit.Rate_limitRequestBuilder Rate_limit + { + get => new global::Ayllu.Github.Client.Rate_limit.Rate_limitRequestBuilder(PathParameters, RequestAdapter); + } + /// The repos property + public global::Ayllu.Github.Client.Repos.ReposRequestBuilder Repos + { + get => new global::Ayllu.Github.Client.Repos.ReposRequestBuilder(PathParameters, RequestAdapter); + } + /// The repositories property + public global::Ayllu.Github.Client.Repositories.RepositoriesRequestBuilder Repositories + { + get => new global::Ayllu.Github.Client.Repositories.RepositoriesRequestBuilder(PathParameters, RequestAdapter); + } + /// The search property + public global::Ayllu.Github.Client.Search.SearchRequestBuilder Search + { + get => new global::Ayllu.Github.Client.Search.SearchRequestBuilder(PathParameters, RequestAdapter); + } + /// The teams property + public global::Ayllu.Github.Client.Teams.TeamsRequestBuilder Teams + { + get => new global::Ayllu.Github.Client.Teams.TeamsRequestBuilder(PathParameters, RequestAdapter); + } + /// The user property + public global::Ayllu.Github.Client.User.UserRequestBuilder User + { + get => new global::Ayllu.Github.Client.User.UserRequestBuilder(PathParameters, RequestAdapter); + } + /// The users property + public global::Ayllu.Github.Client.Users.UsersRequestBuilder Users + { + get => new global::Ayllu.Github.Client.Users.UsersRequestBuilder(PathParameters, RequestAdapter); + } + /// The versions property + public global::Ayllu.Github.Client.Versions.VersionsRequestBuilder Versions + { + get => new global::Ayllu.Github.Client.Versions.VersionsRequestBuilder(PathParameters, RequestAdapter); + } + /// The zen property + public global::Ayllu.Github.Client.Zen.ZenRequestBuilder Zen + { + get => new global::Ayllu.Github.Client.Zen.ZenRequestBuilder(PathParameters, RequestAdapter); + } + /// + /// Instantiates a new and sets the default values. + /// + /// The request adapter to use to execute the requests. + public AylluGithubClient(IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}", new Dictionary()) + { + ApiClientBuilder.RegisterDefaultSerializer(); + ApiClientBuilder.RegisterDefaultSerializer(); + ApiClientBuilder.RegisterDefaultSerializer(); + ApiClientBuilder.RegisterDefaultSerializer(); + ApiClientBuilder.RegisterDefaultDeserializer(); + ApiClientBuilder.RegisterDefaultDeserializer(); + ApiClientBuilder.RegisterDefaultDeserializer(); + if (string.IsNullOrEmpty(RequestAdapter.BaseUrl)) + { + RequestAdapter.BaseUrl = "https://api.github.com"; + } + PathParameters.TryAdd("baseurl", RequestAdapter.BaseUrl); + } + /// + /// Get Hypermedia links to resources accessible in GitHub's REST API + /// API method documentation + /// + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Models.Root.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false); + } + /// + /// Get Hypermedia links to resources accessible in GitHub's REST API + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class AylluGithubClientGetRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Classrooms/ClassroomsRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Classrooms/ClassroomsRequestBuilder.cs new file mode 100644 index 0000000..6d2f75f --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Classrooms/ClassroomsRequestBuilder.cs @@ -0,0 +1,133 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Classrooms.Item; +using Ayllu.Github.Client.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Classrooms +{ + /// + /// Builds and executes requests for operations under \classrooms + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class ClassroomsRequestBuilder : BaseRequestBuilder + { + /// Gets an item from the Ayllu.Github.Client.classrooms.item collection + /// The unique identifier of the classroom. + /// A + public global::Ayllu.Github.Client.Classrooms.Item.WithClassroom_ItemRequestBuilder this[int position] + { + get + { + var urlTplParams = new Dictionary(PathParameters); + urlTplParams.Add("classroom_id", position); + return new global::Ayllu.Github.Client.Classrooms.Item.WithClassroom_ItemRequestBuilder(urlTplParams, RequestAdapter); + } + } + /// Gets an item from the Ayllu.Github.Client.classrooms.item collection + /// The unique identifier of the classroom. + /// A + [Obsolete("This indexer is deprecated and will be removed in the next major version. Use the one with the typed parameter instead.")] + public global::Ayllu.Github.Client.Classrooms.Item.WithClassroom_ItemRequestBuilder this[string position] + { + get + { + var urlTplParams = new Dictionary(PathParameters); + if (!string.IsNullOrWhiteSpace(position)) urlTplParams.Add("classroom_id", position); + return new global::Ayllu.Github.Client.Classrooms.Item.WithClassroom_ItemRequestBuilder(urlTplParams, RequestAdapter); + } + } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public ClassroomsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/classrooms{?page*,per_page*}", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public ClassroomsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/classrooms{?page*,per_page*}", rawUrl) + { + } + /// + /// 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. + /// API method documentation + /// + /// A List<global::Ayllu.Github.Client.Models.SimpleClassroom> + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task?> GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task> GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var collectionResult = await RequestAdapter.SendCollectionAsync(requestInfo, global::Ayllu.Github.Client.Models.SimpleClassroom.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false); + return collectionResult?.AsList(); + } + /// + /// 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. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.Classrooms.ClassroomsRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Classrooms.ClassroomsRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// 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. + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class ClassroomsRequestBuilderGetQueryParameters + { + /// The page number of the results to fetch. For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." + [QueryParameter("page")] + public int? Page { get; set; } + /// The number of results per page (max 100). For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." + [QueryParameter("per_page")] + public int? PerPage { get; set; } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class ClassroomsRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Classrooms/Item/Assignments/AssignmentsRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Classrooms/Item/Assignments/AssignmentsRequestBuilder.cs new file mode 100644 index 0000000..4e5866e --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Classrooms/Item/Assignments/AssignmentsRequestBuilder.cs @@ -0,0 +1,107 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Classrooms.Item.Assignments +{ + /// + /// Builds and executes requests for operations under \classrooms\{classroom_id}\assignments + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class AssignmentsRequestBuilder : BaseRequestBuilder + { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public AssignmentsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/classrooms/{classroom_id}/assignments{?page*,per_page*}", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public AssignmentsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/classrooms/{classroom_id}/assignments{?page*,per_page*}", rawUrl) + { + } + /// + /// Lists GitHub Classroom assignments for a classroom. Assignments will only be returned if the current user is an administrator of the GitHub Classroom. + /// API method documentation + /// + /// A List<global::Ayllu.Github.Client.Models.SimpleClassroomAssignment> + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task?> GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task> GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var collectionResult = await RequestAdapter.SendCollectionAsync(requestInfo, global::Ayllu.Github.Client.Models.SimpleClassroomAssignment.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false); + return collectionResult?.AsList(); + } + /// + /// Lists GitHub Classroom assignments for a classroom. Assignments will only be returned if the current user is an administrator of the GitHub Classroom. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.Classrooms.Item.Assignments.AssignmentsRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Classrooms.Item.Assignments.AssignmentsRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Lists GitHub Classroom assignments for a classroom. Assignments will only be returned if the current user is an administrator of the GitHub Classroom. + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class AssignmentsRequestBuilderGetQueryParameters + { + /// The page number of the results to fetch. For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." + [QueryParameter("page")] + public int? Page { get; set; } + /// The number of results per page (max 100). For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." + [QueryParameter("per_page")] + public int? PerPage { get; set; } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class AssignmentsRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Classrooms/Item/WithClassroom_ItemRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Classrooms/Item/WithClassroom_ItemRequestBuilder.cs new file mode 100644 index 0000000..ed53c57 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Classrooms/Item/WithClassroom_ItemRequestBuilder.cs @@ -0,0 +1,104 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Classrooms.Item.Assignments; +using Ayllu.Github.Client.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Classrooms.Item +{ + /// + /// Builds and executes requests for operations under \classrooms\{classroom_id} + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithClassroom_ItemRequestBuilder : BaseRequestBuilder + { + /// The assignments property + public global::Ayllu.Github.Client.Classrooms.Item.Assignments.AssignmentsRequestBuilder Assignments + { + get => new global::Ayllu.Github.Client.Classrooms.Item.Assignments.AssignmentsRequestBuilder(PathParameters, RequestAdapter); + } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public WithClassroom_ItemRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/classrooms/{classroom_id}", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public WithClassroom_ItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/classrooms/{classroom_id}", rawUrl) + { + } + /// + /// 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. + /// API method documentation + /// + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 404 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "404", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Models.Classroom.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// 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. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.Classrooms.Item.WithClassroom_ItemRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Classrooms.Item.WithClassroom_ItemRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithClassroom_ItemRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Codes_of_conduct/Codes_of_conductRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Codes_of_conduct/Codes_of_conductRequestBuilder.cs new file mode 100644 index 0000000..8c80afb --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Codes_of_conduct/Codes_of_conductRequestBuilder.cs @@ -0,0 +1,107 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Codes_of_conduct.Item; +using Ayllu.Github.Client.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Codes_of_conduct +{ + /// + /// Builds and executes requests for operations under \codes_of_conduct + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class Codes_of_conductRequestBuilder : BaseRequestBuilder + { + /// Gets an item from the Ayllu.Github.Client.codes_of_conduct.item collection + /// Unique identifier of the item + /// A + public global::Ayllu.Github.Client.Codes_of_conduct.Item.WithKeyItemRequestBuilder this[string position] + { + get + { + var urlTplParams = new Dictionary(PathParameters); + urlTplParams.Add("key", position); + return new global::Ayllu.Github.Client.Codes_of_conduct.Item.WithKeyItemRequestBuilder(urlTplParams, RequestAdapter); + } + } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public Codes_of_conductRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/codes_of_conduct", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public Codes_of_conductRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/codes_of_conduct", rawUrl) + { + } + /// + /// Returns array of all GitHub's codes of conduct. + /// API method documentation + /// + /// A List<global::Ayllu.Github.Client.Models.CodeOfConduct> + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task?> GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task> GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var collectionResult = await RequestAdapter.SendCollectionAsync(requestInfo, global::Ayllu.Github.Client.Models.CodeOfConduct.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false); + return collectionResult?.AsList(); + } + /// + /// Returns array of all GitHub's codes of conduct. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.Codes_of_conduct.Codes_of_conductRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Codes_of_conduct.Codes_of_conductRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class Codes_of_conductRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Codes_of_conduct/Item/WithKeyItemRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Codes_of_conduct/Item/WithKeyItemRequestBuilder.cs new file mode 100644 index 0000000..e0b845c --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Codes_of_conduct/Item/WithKeyItemRequestBuilder.cs @@ -0,0 +1,98 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Codes_of_conduct.Item +{ + /// + /// Builds and executes requests for operations under \codes_of_conduct\{key} + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithKeyItemRequestBuilder : BaseRequestBuilder + { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public WithKeyItemRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/codes_of_conduct/{key}", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public WithKeyItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/codes_of_conduct/{key}", rawUrl) + { + } + /// + /// Returns information about the specified GitHub code of conduct. + /// API method documentation + /// + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 404 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "404", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Models.CodeOfConduct.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// Returns information about the specified GitHub code of conduct. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.Codes_of_conduct.Item.WithKeyItemRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Codes_of_conduct.Item.WithKeyItemRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithKeyItemRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Credentials/CredentialsRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Credentials/CredentialsRequestBuilder.cs new file mode 100644 index 0000000..6873768 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Credentials/CredentialsRequestBuilder.cs @@ -0,0 +1,41 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Credentials.Revoke; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System; +namespace Ayllu.Github.Client.Credentials +{ + /// + /// Builds and executes requests for operations under \credentials + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class CredentialsRequestBuilder : BaseRequestBuilder + { + /// The revoke property + public global::Ayllu.Github.Client.Credentials.Revoke.RevokeRequestBuilder Revoke + { + get => new global::Ayllu.Github.Client.Credentials.Revoke.RevokeRequestBuilder(PathParameters, RequestAdapter); + } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public CredentialsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/credentials", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public CredentialsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/credentials", rawUrl) + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Credentials/Revoke/RevokePostRequestBody.cs b/src/Ayllu.Github.Client/Github/Client/Credentials/Revoke/RevokePostRequestBody.cs new file mode 100644 index 0000000..9417aa1 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Credentials/Revoke/RevokePostRequestBody.cs @@ -0,0 +1,65 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Credentials.Revoke +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class RevokePostRequestBody : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// A list of credentials to be revoked, up to 1000 per request. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? Credentials { get; set; } +#nullable restore +#else + public List Credentials { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public RevokePostRequestBody() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Credentials.Revoke.RevokePostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Credentials.Revoke.RevokePostRequestBody(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "credentials", n => { Credentials = n.GetCollectionOfPrimitiveValues()?.AsList(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteCollectionOfPrimitiveValues("credentials", Credentials); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Credentials/Revoke/RevokePostResponse.cs b/src/Ayllu.Github.Client/Github/Client/Credentials/Revoke/RevokePostResponse.cs new file mode 100644 index 0000000..5b6a43a --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Credentials/Revoke/RevokePostResponse.cs @@ -0,0 +1,55 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Credentials.Revoke +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class RevokePostResponse : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public RevokePostResponse() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Credentials.Revoke.RevokePostResponse CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Credentials.Revoke.RevokePostResponse(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Credentials/Revoke/RevokeRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Credentials/Revoke/RevokeRequestBuilder.cs new file mode 100644 index 0000000..5fef518 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Credentials/Revoke/RevokeRequestBuilder.cs @@ -0,0 +1,134 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Credentials.Revoke +{ + /// + /// Builds and executes requests for operations under \credentials\revoke + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class RevokeRequestBuilder : BaseRequestBuilder + { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public RevokeRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/credentials/revoke", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public RevokeRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/credentials/revoke", rawUrl) + { + } + /// + /// Submit a list of credentials to be revoked. This endpoint is intended to revoke credentials the caller does not own and may have found exposed on GitHub.com or elsewhere. It can also be used for credentials associated with an old user account that you no longer have access to. Credential owners will be notified of the revocation.This endpoint currently accepts the following credential types:- Personal access tokens (classic)- Fine-grained personal access tokensRevoked credentials may impact users on GitHub Free, Pro, & Team and GitHub Enterprise Cloud, and GitHub Enterprise Cloud with Enterprise Managed Users.GitHub cannot reactivate any credentials that have been revoked; new credentials will need to be generated.To prevent abuse, this API is limited to only 60 unauthenticated requests per hour and a max of 1000 tokens per API request.> [!NOTE]> Any authenticated requests will return a 403. + /// API method documentation + /// + /// A + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 422 status code + /// When receiving a 500 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PostAsRevokePostResponseAsync(global::Ayllu.Github.Client.Credentials.Revoke.RevokePostRequestBody body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task PostAsRevokePostResponseAsync(global::Ayllu.Github.Client.Credentials.Revoke.RevokePostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPostRequestInformation(body, requestConfiguration); + var errorMapping = new Dictionary> + { + { "422", global::Ayllu.Github.Client.Models.ValidationErrorSimple.CreateFromDiscriminatorValue }, + { "500", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Credentials.Revoke.RevokePostResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// Submit a list of credentials to be revoked. This endpoint is intended to revoke credentials the caller does not own and may have found exposed on GitHub.com or elsewhere. It can also be used for credentials associated with an old user account that you no longer have access to. Credential owners will be notified of the revocation.This endpoint currently accepts the following credential types:- Personal access tokens (classic)- Fine-grained personal access tokensRevoked credentials may impact users on GitHub Free, Pro, & Team and GitHub Enterprise Cloud, and GitHub Enterprise Cloud with Enterprise Managed Users.GitHub cannot reactivate any credentials that have been revoked; new credentials will need to be generated.To prevent abuse, this API is limited to only 60 unauthenticated requests per hour and a max of 1000 tokens per API request.> [!NOTE]> Any authenticated requests will return a 403. + /// API method documentation + /// + /// A + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 422 status code + /// When receiving a 500 status code + [Obsolete("This method is obsolete. Use PostAsRevokePostResponseAsync instead.")] +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PostAsync(global::Ayllu.Github.Client.Credentials.Revoke.RevokePostRequestBody body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task PostAsync(global::Ayllu.Github.Client.Credentials.Revoke.RevokePostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPostRequestInformation(body, requestConfiguration); + var errorMapping = new Dictionary> + { + { "422", global::Ayllu.Github.Client.Models.ValidationErrorSimple.CreateFromDiscriminatorValue }, + { "500", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Credentials.Revoke.RevokeResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// Submit a list of credentials to be revoked. This endpoint is intended to revoke credentials the caller does not own and may have found exposed on GitHub.com or elsewhere. It can also be used for credentials associated with an old user account that you no longer have access to. Credential owners will be notified of the revocation.This endpoint currently accepts the following credential types:- Personal access tokens (classic)- Fine-grained personal access tokensRevoked credentials may impact users on GitHub Free, Pro, & Team and GitHub Enterprise Cloud, and GitHub Enterprise Cloud with Enterprise Managed Users.GitHub cannot reactivate any credentials that have been revoked; new credentials will need to be generated.To prevent abuse, this API is limited to only 60 unauthenticated requests per hour and a max of 1000 tokens per API request.> [!NOTE]> Any authenticated requests will return a 403. + /// + /// A + /// The request body + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPostRequestInformation(global::Ayllu.Github.Client.Credentials.Revoke.RevokePostRequestBody body, Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToPostRequestInformation(global::Ayllu.Github.Client.Credentials.Revoke.RevokePostRequestBody body, Action> requestConfiguration = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.Credentials.Revoke.RevokeRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Credentials.Revoke.RevokeRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class RevokeRequestBuilderPostRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Credentials/Revoke/RevokeResponse.cs b/src/Ayllu.Github.Client/Github/Client/Credentials/Revoke/RevokeResponse.cs new file mode 100644 index 0000000..2865ddb --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Credentials/Revoke/RevokeResponse.cs @@ -0,0 +1,28 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Credentials.Revoke +{ + [Obsolete("This class is obsolete. Use RevokePostResponse instead.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class RevokeResponse : global::Ayllu.Github.Client.Credentials.Revoke.RevokePostResponse, IParsable + #pragma warning restore CS1591 + { + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static new global::Ayllu.Github.Client.Credentials.Revoke.RevokeResponse CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Credentials.Revoke.RevokeResponse(); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Emojis/EmojisGetResponse.cs b/src/Ayllu.Github.Client/Github/Client/Emojis/EmojisGetResponse.cs new file mode 100644 index 0000000..d869e0b --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Emojis/EmojisGetResponse.cs @@ -0,0 +1,55 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Emojis +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class EmojisGetResponse : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public EmojisGetResponse() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Emojis.EmojisGetResponse CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Emojis.EmojisGetResponse(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Emojis/EmojisRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Emojis/EmojisRequestBuilder.cs new file mode 100644 index 0000000..68374e9 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Emojis/EmojisRequestBuilder.cs @@ -0,0 +1,112 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Emojis +{ + /// + /// Builds and executes requests for operations under \emojis + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class EmojisRequestBuilder : BaseRequestBuilder + { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public EmojisRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/emojis", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public EmojisRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/emojis", rawUrl) + { + } + /// + /// Lists all the emojis available to use on GitHub. + /// API method documentation + /// + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsEmojisGetResponseAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task GetAsEmojisGetResponseAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Emojis.EmojisGetResponse.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false); + } + /// + /// Lists all the emojis available to use on GitHub. + /// API method documentation + /// + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + [Obsolete("This method is obsolete. Use GetAsEmojisGetResponseAsync instead.")] +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Emojis.EmojisResponse.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false); + } + /// + /// Lists all the emojis available to use on GitHub. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.Emojis.EmojisRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Emojis.EmojisRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class EmojisRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Emojis/EmojisResponse.cs b/src/Ayllu.Github.Client/Github/Client/Emojis/EmojisResponse.cs new file mode 100644 index 0000000..d509da1 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Emojis/EmojisResponse.cs @@ -0,0 +1,28 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Emojis +{ + [Obsolete("This class is obsolete. Use EmojisGetResponse instead.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class EmojisResponse : global::Ayllu.Github.Client.Emojis.EmojisGetResponse, IParsable + #pragma warning restore CS1591 + { + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static new global::Ayllu.Github.Client.Emojis.EmojisResponse CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Emojis.EmojisResponse(); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Enterprises/EnterprisesRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Enterprises/EnterprisesRequestBuilder.cs new file mode 100644 index 0000000..64ca4ae --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Enterprises/EnterprisesRequestBuilder.cs @@ -0,0 +1,48 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Enterprises.Item; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System; +namespace Ayllu.Github.Client.Enterprises +{ + /// + /// Builds and executes requests for operations under \enterprises + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class EnterprisesRequestBuilder : BaseRequestBuilder + { + /// Gets an item from the Ayllu.Github.Client.enterprises.item collection + /// The slug version of the enterprise name. + /// A + public global::Ayllu.Github.Client.Enterprises.Item.WithEnterpriseItemRequestBuilder this[string position] + { + get + { + var urlTplParams = new Dictionary(PathParameters); + urlTplParams.Add("enterprise", position); + return new global::Ayllu.Github.Client.Enterprises.Item.WithEnterpriseItemRequestBuilder(urlTplParams, RequestAdapter); + } + } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public EnterprisesRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/enterprises", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public EnterprisesRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/enterprises", rawUrl) + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Enterprises/Item/CodeSecurity/CodeSecurityRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Enterprises/Item/CodeSecurity/CodeSecurityRequestBuilder.cs new file mode 100644 index 0000000..0b596d8 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Enterprises/Item/CodeSecurity/CodeSecurityRequestBuilder.cs @@ -0,0 +1,41 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Enterprises.Item.CodeSecurity.Configurations; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System; +namespace Ayllu.Github.Client.Enterprises.Item.CodeSecurity +{ + /// + /// Builds and executes requests for operations under \enterprises\{enterprise}\code-security + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class CodeSecurityRequestBuilder : BaseRequestBuilder + { + /// The configurations property + public global::Ayllu.Github.Client.Enterprises.Item.CodeSecurity.Configurations.ConfigurationsRequestBuilder Configurations + { + get => new global::Ayllu.Github.Client.Enterprises.Item.CodeSecurity.Configurations.ConfigurationsRequestBuilder(PathParameters, RequestAdapter); + } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public CodeSecurityRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/enterprises/{enterprise}/code-security", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public CodeSecurityRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/enterprises/{enterprise}/code-security", rawUrl) + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Enterprises/Item/CodeSecurity/Configurations/ConfigurationsPostRequestBody.cs b/src/Ayllu.Github.Client/Github/Client/Enterprises/Item/CodeSecurity/Configurations/ConfigurationsPostRequestBody.cs new file mode 100644 index 0000000..8986d37 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Enterprises/Item/CodeSecurity/Configurations/ConfigurationsPostRequestBody.cs @@ -0,0 +1,185 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Enterprises.Item.CodeSecurity.Configurations +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class ConfigurationsPostRequestBody : IParsable + #pragma warning restore CS1591 + { + /// The enablement status of GitHub Advanced Security features. `enabled` will enable both Code Security and Secret Protection features.> [!WARNING]> `code_security` and `secret_protection` are deprecated values for this field. Prefer the individual `code_security` and `secret_protection` fields to set the status of these features. + public global::Ayllu.Github.Client.Enterprises.Item.CodeSecurity.Configurations.ConfigurationsPostRequestBody_advanced_security? AdvancedSecurity { get; set; } + /// The enablement status of code scanning default setup + public global::Ayllu.Github.Client.Enterprises.Item.CodeSecurity.Configurations.ConfigurationsPostRequestBody_code_scanning_default_setup? CodeScanningDefaultSetup { get; set; } + /// Feature options for code scanning default setup +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.CodeScanningDefaultSetupOptions? CodeScanningDefaultSetupOptions { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.CodeScanningDefaultSetupOptions CodeScanningDefaultSetupOptions { get; set; } +#endif + /// The enablement status of code scanning delegated alert dismissal + public global::Ayllu.Github.Client.Enterprises.Item.CodeSecurity.Configurations.ConfigurationsPostRequestBody_code_scanning_delegated_alert_dismissal? CodeScanningDelegatedAlertDismissal { get; set; } + /// Security Configuration feature options for code scanning +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.CodeScanningOptions? CodeScanningOptions { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.CodeScanningOptions CodeScanningOptions { get; set; } +#endif + /// The enablement status of GitHub Code Security features. + public global::Ayllu.Github.Client.Enterprises.Item.CodeSecurity.Configurations.ConfigurationsPostRequestBody_code_security? CodeSecurity { get; set; } + /// The enablement status of Dependabot alerts + public global::Ayllu.Github.Client.Enterprises.Item.CodeSecurity.Configurations.ConfigurationsPostRequestBody_dependabot_alerts? DependabotAlerts { get; set; } + /// The enablement status of Dependabot security updates + public global::Ayllu.Github.Client.Enterprises.Item.CodeSecurity.Configurations.ConfigurationsPostRequestBody_dependabot_security_updates? DependabotSecurityUpdates { get; set; } + /// The enablement status of Dependency Graph + public global::Ayllu.Github.Client.Enterprises.Item.CodeSecurity.Configurations.ConfigurationsPostRequestBody_dependency_graph? DependencyGraph { get; set; } + /// The enablement status of Automatic dependency submission + public global::Ayllu.Github.Client.Enterprises.Item.CodeSecurity.Configurations.ConfigurationsPostRequestBody_dependency_graph_autosubmit_action? DependencyGraphAutosubmitAction { get; set; } + /// Feature options for Automatic dependency submission +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Enterprises.Item.CodeSecurity.Configurations.ConfigurationsPostRequestBody_dependency_graph_autosubmit_action_options? DependencyGraphAutosubmitActionOptions { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Enterprises.Item.CodeSecurity.Configurations.ConfigurationsPostRequestBody_dependency_graph_autosubmit_action_options DependencyGraphAutosubmitActionOptions { get; set; } +#endif + /// A description of the code security configuration +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Description { get; set; } +#nullable restore +#else + public string Description { get; set; } +#endif + /// The enforcement status for a security configuration + public global::Ayllu.Github.Client.Enterprises.Item.CodeSecurity.Configurations.ConfigurationsPostRequestBody_enforcement? Enforcement { get; set; } + /// The name of the code security configuration. Must be unique within the enterprise. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Name { get; set; } +#nullable restore +#else + public string Name { get; set; } +#endif + /// The enablement status of private vulnerability reporting + public global::Ayllu.Github.Client.Enterprises.Item.CodeSecurity.Configurations.ConfigurationsPostRequestBody_private_vulnerability_reporting? PrivateVulnerabilityReporting { get; set; } + /// The enablement status of GitHub Secret Protection features. + public global::Ayllu.Github.Client.Enterprises.Item.CodeSecurity.Configurations.ConfigurationsPostRequestBody_secret_protection? SecretProtection { get; set; } + /// The enablement status of secret scanning + public global::Ayllu.Github.Client.Enterprises.Item.CodeSecurity.Configurations.ConfigurationsPostRequestBody_secret_scanning? SecretScanning { get; set; } + /// The enablement status of secret scanning delegated alert dismissal + public global::Ayllu.Github.Client.Enterprises.Item.CodeSecurity.Configurations.ConfigurationsPostRequestBody_secret_scanning_delegated_alert_dismissal? SecretScanningDelegatedAlertDismissal { get; set; } + /// The enablement status of Copilot secret scanning + public global::Ayllu.Github.Client.Enterprises.Item.CodeSecurity.Configurations.ConfigurationsPostRequestBody_secret_scanning_generic_secrets? SecretScanningGenericSecrets { get; set; } + /// The enablement status of secret scanning non provider patterns + public global::Ayllu.Github.Client.Enterprises.Item.CodeSecurity.Configurations.ConfigurationsPostRequestBody_secret_scanning_non_provider_patterns? SecretScanningNonProviderPatterns { get; set; } + /// The enablement status of secret scanning push protection + public global::Ayllu.Github.Client.Enterprises.Item.CodeSecurity.Configurations.ConfigurationsPostRequestBody_secret_scanning_push_protection? SecretScanningPushProtection { get; set; } + /// The enablement status of secret scanning validity checks + public global::Ayllu.Github.Client.Enterprises.Item.CodeSecurity.Configurations.ConfigurationsPostRequestBody_secret_scanning_validity_checks? SecretScanningValidityChecks { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public ConfigurationsPostRequestBody() + { + AdvancedSecurity = global::Ayllu.Github.Client.Enterprises.Item.CodeSecurity.Configurations.ConfigurationsPostRequestBody_advanced_security.Disabled; + CodeScanningDefaultSetup = global::Ayllu.Github.Client.Enterprises.Item.CodeSecurity.Configurations.ConfigurationsPostRequestBody_code_scanning_default_setup.Disabled; + CodeScanningDelegatedAlertDismissal = global::Ayllu.Github.Client.Enterprises.Item.CodeSecurity.Configurations.ConfigurationsPostRequestBody_code_scanning_delegated_alert_dismissal.Disabled; + DependabotAlerts = global::Ayllu.Github.Client.Enterprises.Item.CodeSecurity.Configurations.ConfigurationsPostRequestBody_dependabot_alerts.Disabled; + DependabotSecurityUpdates = global::Ayllu.Github.Client.Enterprises.Item.CodeSecurity.Configurations.ConfigurationsPostRequestBody_dependabot_security_updates.Disabled; + DependencyGraph = global::Ayllu.Github.Client.Enterprises.Item.CodeSecurity.Configurations.ConfigurationsPostRequestBody_dependency_graph.Enabled; + DependencyGraphAutosubmitAction = global::Ayllu.Github.Client.Enterprises.Item.CodeSecurity.Configurations.ConfigurationsPostRequestBody_dependency_graph_autosubmit_action.Disabled; + Enforcement = global::Ayllu.Github.Client.Enterprises.Item.CodeSecurity.Configurations.ConfigurationsPostRequestBody_enforcement.Enforced; + PrivateVulnerabilityReporting = global::Ayllu.Github.Client.Enterprises.Item.CodeSecurity.Configurations.ConfigurationsPostRequestBody_private_vulnerability_reporting.Disabled; + SecretScanning = global::Ayllu.Github.Client.Enterprises.Item.CodeSecurity.Configurations.ConfigurationsPostRequestBody_secret_scanning.Disabled; + SecretScanningDelegatedAlertDismissal = global::Ayllu.Github.Client.Enterprises.Item.CodeSecurity.Configurations.ConfigurationsPostRequestBody_secret_scanning_delegated_alert_dismissal.Disabled; + SecretScanningGenericSecrets = global::Ayllu.Github.Client.Enterprises.Item.CodeSecurity.Configurations.ConfigurationsPostRequestBody_secret_scanning_generic_secrets.Disabled; + SecretScanningNonProviderPatterns = global::Ayllu.Github.Client.Enterprises.Item.CodeSecurity.Configurations.ConfigurationsPostRequestBody_secret_scanning_non_provider_patterns.Disabled; + SecretScanningPushProtection = global::Ayllu.Github.Client.Enterprises.Item.CodeSecurity.Configurations.ConfigurationsPostRequestBody_secret_scanning_push_protection.Disabled; + SecretScanningValidityChecks = global::Ayllu.Github.Client.Enterprises.Item.CodeSecurity.Configurations.ConfigurationsPostRequestBody_secret_scanning_validity_checks.Disabled; + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Enterprises.Item.CodeSecurity.Configurations.ConfigurationsPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Enterprises.Item.CodeSecurity.Configurations.ConfigurationsPostRequestBody(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "advanced_security", n => { AdvancedSecurity = n.GetEnumValue(); } }, + { "code_scanning_default_setup", n => { CodeScanningDefaultSetup = n.GetEnumValue(); } }, + { "code_scanning_default_setup_options", n => { CodeScanningDefaultSetupOptions = n.GetObjectValue(global::Ayllu.Github.Client.Models.CodeScanningDefaultSetupOptions.CreateFromDiscriminatorValue); } }, + { "code_scanning_delegated_alert_dismissal", n => { CodeScanningDelegatedAlertDismissal = n.GetEnumValue(); } }, + { "code_scanning_options", n => { CodeScanningOptions = n.GetObjectValue(global::Ayllu.Github.Client.Models.CodeScanningOptions.CreateFromDiscriminatorValue); } }, + { "code_security", n => { CodeSecurity = n.GetEnumValue(); } }, + { "dependabot_alerts", n => { DependabotAlerts = n.GetEnumValue(); } }, + { "dependabot_security_updates", n => { DependabotSecurityUpdates = n.GetEnumValue(); } }, + { "dependency_graph", n => { DependencyGraph = n.GetEnumValue(); } }, + { "dependency_graph_autosubmit_action", n => { DependencyGraphAutosubmitAction = n.GetEnumValue(); } }, + { "dependency_graph_autosubmit_action_options", n => { DependencyGraphAutosubmitActionOptions = n.GetObjectValue(global::Ayllu.Github.Client.Enterprises.Item.CodeSecurity.Configurations.ConfigurationsPostRequestBody_dependency_graph_autosubmit_action_options.CreateFromDiscriminatorValue); } }, + { "description", n => { Description = n.GetStringValue(); } }, + { "enforcement", n => { Enforcement = n.GetEnumValue(); } }, + { "name", n => { Name = n.GetStringValue(); } }, + { "private_vulnerability_reporting", n => { PrivateVulnerabilityReporting = n.GetEnumValue(); } }, + { "secret_protection", n => { SecretProtection = n.GetEnumValue(); } }, + { "secret_scanning", n => { SecretScanning = n.GetEnumValue(); } }, + { "secret_scanning_delegated_alert_dismissal", n => { SecretScanningDelegatedAlertDismissal = n.GetEnumValue(); } }, + { "secret_scanning_generic_secrets", n => { SecretScanningGenericSecrets = n.GetEnumValue(); } }, + { "secret_scanning_non_provider_patterns", n => { SecretScanningNonProviderPatterns = n.GetEnumValue(); } }, + { "secret_scanning_push_protection", n => { SecretScanningPushProtection = n.GetEnumValue(); } }, + { "secret_scanning_validity_checks", n => { SecretScanningValidityChecks = n.GetEnumValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteEnumValue("advanced_security", AdvancedSecurity); + writer.WriteEnumValue("code_scanning_default_setup", CodeScanningDefaultSetup); + writer.WriteObjectValue("code_scanning_default_setup_options", CodeScanningDefaultSetupOptions); + writer.WriteEnumValue("code_scanning_delegated_alert_dismissal", CodeScanningDelegatedAlertDismissal); + writer.WriteObjectValue("code_scanning_options", CodeScanningOptions); + writer.WriteEnumValue("code_security", CodeSecurity); + writer.WriteEnumValue("dependabot_alerts", DependabotAlerts); + writer.WriteEnumValue("dependabot_security_updates", DependabotSecurityUpdates); + writer.WriteEnumValue("dependency_graph", DependencyGraph); + writer.WriteEnumValue("dependency_graph_autosubmit_action", DependencyGraphAutosubmitAction); + writer.WriteObjectValue("dependency_graph_autosubmit_action_options", DependencyGraphAutosubmitActionOptions); + writer.WriteStringValue("description", Description); + writer.WriteEnumValue("enforcement", Enforcement); + writer.WriteStringValue("name", Name); + writer.WriteEnumValue("private_vulnerability_reporting", PrivateVulnerabilityReporting); + writer.WriteEnumValue("secret_protection", SecretProtection); + writer.WriteEnumValue("secret_scanning", SecretScanning); + writer.WriteEnumValue("secret_scanning_delegated_alert_dismissal", SecretScanningDelegatedAlertDismissal); + writer.WriteEnumValue("secret_scanning_generic_secrets", SecretScanningGenericSecrets); + writer.WriteEnumValue("secret_scanning_non_provider_patterns", SecretScanningNonProviderPatterns); + writer.WriteEnumValue("secret_scanning_push_protection", SecretScanningPushProtection); + writer.WriteEnumValue("secret_scanning_validity_checks", SecretScanningValidityChecks); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Enterprises/Item/CodeSecurity/Configurations/ConfigurationsPostRequestBody_advanced_security.cs b/src/Ayllu.Github.Client/Github/Client/Enterprises/Item/CodeSecurity/Configurations/ConfigurationsPostRequestBody_advanced_security.cs new file mode 100644 index 0000000..6501abe --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Enterprises/Item/CodeSecurity/Configurations/ConfigurationsPostRequestBody_advanced_security.cs @@ -0,0 +1,27 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Enterprises.Item.CodeSecurity.Configurations +{ + /// The enablement status of GitHub Advanced Security features. `enabled` will enable both Code Security and Secret Protection features.> [!WARNING]> `code_security` and `secret_protection` are deprecated values for this field. Prefer the individual `code_security` and `secret_protection` fields to set the status of these features. + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public enum ConfigurationsPostRequestBody_advanced_security + { + [EnumMember(Value = "enabled")] + #pragma warning disable CS1591 + Enabled, + #pragma warning restore CS1591 + [EnumMember(Value = "disabled")] + #pragma warning disable CS1591 + Disabled, + #pragma warning restore CS1591 + [EnumMember(Value = "code_security")] + #pragma warning disable CS1591 + Code_security, + #pragma warning restore CS1591 + [EnumMember(Value = "secret_protection")] + #pragma warning disable CS1591 + Secret_protection, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Enterprises/Item/CodeSecurity/Configurations/ConfigurationsPostRequestBody_code_scanning_default_setup.cs b/src/Ayllu.Github.Client/Github/Client/Enterprises/Item/CodeSecurity/Configurations/ConfigurationsPostRequestBody_code_scanning_default_setup.cs new file mode 100644 index 0000000..a508bf5 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Enterprises/Item/CodeSecurity/Configurations/ConfigurationsPostRequestBody_code_scanning_default_setup.cs @@ -0,0 +1,23 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Enterprises.Item.CodeSecurity.Configurations +{ + /// The enablement status of code scanning default setup + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public enum ConfigurationsPostRequestBody_code_scanning_default_setup + { + [EnumMember(Value = "enabled")] + #pragma warning disable CS1591 + Enabled, + #pragma warning restore CS1591 + [EnumMember(Value = "disabled")] + #pragma warning disable CS1591 + Disabled, + #pragma warning restore CS1591 + [EnumMember(Value = "not_set")] + #pragma warning disable CS1591 + Not_set, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Enterprises/Item/CodeSecurity/Configurations/ConfigurationsPostRequestBody_code_scanning_delegated_alert_dismissal.cs b/src/Ayllu.Github.Client/Github/Client/Enterprises/Item/CodeSecurity/Configurations/ConfigurationsPostRequestBody_code_scanning_delegated_alert_dismissal.cs new file mode 100644 index 0000000..bddb47a --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Enterprises/Item/CodeSecurity/Configurations/ConfigurationsPostRequestBody_code_scanning_delegated_alert_dismissal.cs @@ -0,0 +1,23 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Enterprises.Item.CodeSecurity.Configurations +{ + /// The enablement status of code scanning delegated alert dismissal + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public enum ConfigurationsPostRequestBody_code_scanning_delegated_alert_dismissal + { + [EnumMember(Value = "enabled")] + #pragma warning disable CS1591 + Enabled, + #pragma warning restore CS1591 + [EnumMember(Value = "disabled")] + #pragma warning disable CS1591 + Disabled, + #pragma warning restore CS1591 + [EnumMember(Value = "not_set")] + #pragma warning disable CS1591 + Not_set, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Enterprises/Item/CodeSecurity/Configurations/ConfigurationsPostRequestBody_code_security.cs b/src/Ayllu.Github.Client/Github/Client/Enterprises/Item/CodeSecurity/Configurations/ConfigurationsPostRequestBody_code_security.cs new file mode 100644 index 0000000..26a0275 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Enterprises/Item/CodeSecurity/Configurations/ConfigurationsPostRequestBody_code_security.cs @@ -0,0 +1,23 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Enterprises.Item.CodeSecurity.Configurations +{ + /// The enablement status of GitHub Code Security features. + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public enum ConfigurationsPostRequestBody_code_security + { + [EnumMember(Value = "enabled")] + #pragma warning disable CS1591 + Enabled, + #pragma warning restore CS1591 + [EnumMember(Value = "disabled")] + #pragma warning disable CS1591 + Disabled, + #pragma warning restore CS1591 + [EnumMember(Value = "not_set")] + #pragma warning disable CS1591 + Not_set, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Enterprises/Item/CodeSecurity/Configurations/ConfigurationsPostRequestBody_dependabot_alerts.cs b/src/Ayllu.Github.Client/Github/Client/Enterprises/Item/CodeSecurity/Configurations/ConfigurationsPostRequestBody_dependabot_alerts.cs new file mode 100644 index 0000000..9d83a36 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Enterprises/Item/CodeSecurity/Configurations/ConfigurationsPostRequestBody_dependabot_alerts.cs @@ -0,0 +1,23 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Enterprises.Item.CodeSecurity.Configurations +{ + /// The enablement status of Dependabot alerts + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public enum ConfigurationsPostRequestBody_dependabot_alerts + { + [EnumMember(Value = "enabled")] + #pragma warning disable CS1591 + Enabled, + #pragma warning restore CS1591 + [EnumMember(Value = "disabled")] + #pragma warning disable CS1591 + Disabled, + #pragma warning restore CS1591 + [EnumMember(Value = "not_set")] + #pragma warning disable CS1591 + Not_set, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Enterprises/Item/CodeSecurity/Configurations/ConfigurationsPostRequestBody_dependabot_security_updates.cs b/src/Ayllu.Github.Client/Github/Client/Enterprises/Item/CodeSecurity/Configurations/ConfigurationsPostRequestBody_dependabot_security_updates.cs new file mode 100644 index 0000000..ec47067 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Enterprises/Item/CodeSecurity/Configurations/ConfigurationsPostRequestBody_dependabot_security_updates.cs @@ -0,0 +1,23 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Enterprises.Item.CodeSecurity.Configurations +{ + /// The enablement status of Dependabot security updates + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public enum ConfigurationsPostRequestBody_dependabot_security_updates + { + [EnumMember(Value = "enabled")] + #pragma warning disable CS1591 + Enabled, + #pragma warning restore CS1591 + [EnumMember(Value = "disabled")] + #pragma warning disable CS1591 + Disabled, + #pragma warning restore CS1591 + [EnumMember(Value = "not_set")] + #pragma warning disable CS1591 + Not_set, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Enterprises/Item/CodeSecurity/Configurations/ConfigurationsPostRequestBody_dependency_graph.cs b/src/Ayllu.Github.Client/Github/Client/Enterprises/Item/CodeSecurity/Configurations/ConfigurationsPostRequestBody_dependency_graph.cs new file mode 100644 index 0000000..183b237 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Enterprises/Item/CodeSecurity/Configurations/ConfigurationsPostRequestBody_dependency_graph.cs @@ -0,0 +1,23 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Enterprises.Item.CodeSecurity.Configurations +{ + /// The enablement status of Dependency Graph + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public enum ConfigurationsPostRequestBody_dependency_graph + { + [EnumMember(Value = "enabled")] + #pragma warning disable CS1591 + Enabled, + #pragma warning restore CS1591 + [EnumMember(Value = "disabled")] + #pragma warning disable CS1591 + Disabled, + #pragma warning restore CS1591 + [EnumMember(Value = "not_set")] + #pragma warning disable CS1591 + Not_set, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Enterprises/Item/CodeSecurity/Configurations/ConfigurationsPostRequestBody_dependency_graph_autosubmit_action.cs b/src/Ayllu.Github.Client/Github/Client/Enterprises/Item/CodeSecurity/Configurations/ConfigurationsPostRequestBody_dependency_graph_autosubmit_action.cs new file mode 100644 index 0000000..e3aef40 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Enterprises/Item/CodeSecurity/Configurations/ConfigurationsPostRequestBody_dependency_graph_autosubmit_action.cs @@ -0,0 +1,23 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Enterprises.Item.CodeSecurity.Configurations +{ + /// The enablement status of Automatic dependency submission + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public enum ConfigurationsPostRequestBody_dependency_graph_autosubmit_action + { + [EnumMember(Value = "enabled")] + #pragma warning disable CS1591 + Enabled, + #pragma warning restore CS1591 + [EnumMember(Value = "disabled")] + #pragma warning disable CS1591 + Disabled, + #pragma warning restore CS1591 + [EnumMember(Value = "not_set")] + #pragma warning disable CS1591 + Not_set, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Enterprises/Item/CodeSecurity/Configurations/ConfigurationsPostRequestBody_dependency_graph_autosubmit_action_options.cs b/src/Ayllu.Github.Client/Github/Client/Enterprises/Item/CodeSecurity/Configurations/ConfigurationsPostRequestBody_dependency_graph_autosubmit_action_options.cs new file mode 100644 index 0000000..f7af0a6 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Enterprises/Item/CodeSecurity/Configurations/ConfigurationsPostRequestBody_dependency_graph_autosubmit_action_options.cs @@ -0,0 +1,60 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Enterprises.Item.CodeSecurity.Configurations +{ + /// + /// Feature options for Automatic dependency submission + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class ConfigurationsPostRequestBody_dependency_graph_autosubmit_action_options : IAdditionalDataHolder, IParsable + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// Whether to use runners labeled with 'dependency-submission' or standard GitHub runners. + public bool? LabeledRunners { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public ConfigurationsPostRequestBody_dependency_graph_autosubmit_action_options() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Enterprises.Item.CodeSecurity.Configurations.ConfigurationsPostRequestBody_dependency_graph_autosubmit_action_options CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Enterprises.Item.CodeSecurity.Configurations.ConfigurationsPostRequestBody_dependency_graph_autosubmit_action_options(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "labeled_runners", n => { LabeledRunners = n.GetBoolValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteBoolValue("labeled_runners", LabeledRunners); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Enterprises/Item/CodeSecurity/Configurations/ConfigurationsPostRequestBody_enforcement.cs b/src/Ayllu.Github.Client/Github/Client/Enterprises/Item/CodeSecurity/Configurations/ConfigurationsPostRequestBody_enforcement.cs new file mode 100644 index 0000000..a2a31bb --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Enterprises/Item/CodeSecurity/Configurations/ConfigurationsPostRequestBody_enforcement.cs @@ -0,0 +1,19 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Enterprises.Item.CodeSecurity.Configurations +{ + /// The enforcement status for a security configuration + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public enum ConfigurationsPostRequestBody_enforcement + { + [EnumMember(Value = "enforced")] + #pragma warning disable CS1591 + Enforced, + #pragma warning restore CS1591 + [EnumMember(Value = "unenforced")] + #pragma warning disable CS1591 + Unenforced, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Enterprises/Item/CodeSecurity/Configurations/ConfigurationsPostRequestBody_private_vulnerability_reporting.cs b/src/Ayllu.Github.Client/Github/Client/Enterprises/Item/CodeSecurity/Configurations/ConfigurationsPostRequestBody_private_vulnerability_reporting.cs new file mode 100644 index 0000000..ab30747 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Enterprises/Item/CodeSecurity/Configurations/ConfigurationsPostRequestBody_private_vulnerability_reporting.cs @@ -0,0 +1,23 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Enterprises.Item.CodeSecurity.Configurations +{ + /// The enablement status of private vulnerability reporting + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public enum ConfigurationsPostRequestBody_private_vulnerability_reporting + { + [EnumMember(Value = "enabled")] + #pragma warning disable CS1591 + Enabled, + #pragma warning restore CS1591 + [EnumMember(Value = "disabled")] + #pragma warning disable CS1591 + Disabled, + #pragma warning restore CS1591 + [EnumMember(Value = "not_set")] + #pragma warning disable CS1591 + Not_set, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Enterprises/Item/CodeSecurity/Configurations/ConfigurationsPostRequestBody_secret_protection.cs b/src/Ayllu.Github.Client/Github/Client/Enterprises/Item/CodeSecurity/Configurations/ConfigurationsPostRequestBody_secret_protection.cs new file mode 100644 index 0000000..b602d17 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Enterprises/Item/CodeSecurity/Configurations/ConfigurationsPostRequestBody_secret_protection.cs @@ -0,0 +1,23 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Enterprises.Item.CodeSecurity.Configurations +{ + /// The enablement status of GitHub Secret Protection features. + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public enum ConfigurationsPostRequestBody_secret_protection + { + [EnumMember(Value = "enabled")] + #pragma warning disable CS1591 + Enabled, + #pragma warning restore CS1591 + [EnumMember(Value = "disabled")] + #pragma warning disable CS1591 + Disabled, + #pragma warning restore CS1591 + [EnumMember(Value = "not_set")] + #pragma warning disable CS1591 + Not_set, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Enterprises/Item/CodeSecurity/Configurations/ConfigurationsPostRequestBody_secret_scanning.cs b/src/Ayllu.Github.Client/Github/Client/Enterprises/Item/CodeSecurity/Configurations/ConfigurationsPostRequestBody_secret_scanning.cs new file mode 100644 index 0000000..6f3adf2 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Enterprises/Item/CodeSecurity/Configurations/ConfigurationsPostRequestBody_secret_scanning.cs @@ -0,0 +1,23 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Enterprises.Item.CodeSecurity.Configurations +{ + /// The enablement status of secret scanning + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public enum ConfigurationsPostRequestBody_secret_scanning + { + [EnumMember(Value = "enabled")] + #pragma warning disable CS1591 + Enabled, + #pragma warning restore CS1591 + [EnumMember(Value = "disabled")] + #pragma warning disable CS1591 + Disabled, + #pragma warning restore CS1591 + [EnumMember(Value = "not_set")] + #pragma warning disable CS1591 + Not_set, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Enterprises/Item/CodeSecurity/Configurations/ConfigurationsPostRequestBody_secret_scanning_delegated_alert_dismissal.cs b/src/Ayllu.Github.Client/Github/Client/Enterprises/Item/CodeSecurity/Configurations/ConfigurationsPostRequestBody_secret_scanning_delegated_alert_dismissal.cs new file mode 100644 index 0000000..e23d988 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Enterprises/Item/CodeSecurity/Configurations/ConfigurationsPostRequestBody_secret_scanning_delegated_alert_dismissal.cs @@ -0,0 +1,23 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Enterprises.Item.CodeSecurity.Configurations +{ + /// The enablement status of secret scanning delegated alert dismissal + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public enum ConfigurationsPostRequestBody_secret_scanning_delegated_alert_dismissal + { + [EnumMember(Value = "enabled")] + #pragma warning disable CS1591 + Enabled, + #pragma warning restore CS1591 + [EnumMember(Value = "disabled")] + #pragma warning disable CS1591 + Disabled, + #pragma warning restore CS1591 + [EnumMember(Value = "not_set")] + #pragma warning disable CS1591 + Not_set, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Enterprises/Item/CodeSecurity/Configurations/ConfigurationsPostRequestBody_secret_scanning_generic_secrets.cs b/src/Ayllu.Github.Client/Github/Client/Enterprises/Item/CodeSecurity/Configurations/ConfigurationsPostRequestBody_secret_scanning_generic_secrets.cs new file mode 100644 index 0000000..a6eeb8b --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Enterprises/Item/CodeSecurity/Configurations/ConfigurationsPostRequestBody_secret_scanning_generic_secrets.cs @@ -0,0 +1,23 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Enterprises.Item.CodeSecurity.Configurations +{ + /// The enablement status of Copilot secret scanning + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public enum ConfigurationsPostRequestBody_secret_scanning_generic_secrets + { + [EnumMember(Value = "enabled")] + #pragma warning disable CS1591 + Enabled, + #pragma warning restore CS1591 + [EnumMember(Value = "disabled")] + #pragma warning disable CS1591 + Disabled, + #pragma warning restore CS1591 + [EnumMember(Value = "not_set")] + #pragma warning disable CS1591 + Not_set, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Enterprises/Item/CodeSecurity/Configurations/ConfigurationsPostRequestBody_secret_scanning_non_provider_patterns.cs b/src/Ayllu.Github.Client/Github/Client/Enterprises/Item/CodeSecurity/Configurations/ConfigurationsPostRequestBody_secret_scanning_non_provider_patterns.cs new file mode 100644 index 0000000..cdf90a5 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Enterprises/Item/CodeSecurity/Configurations/ConfigurationsPostRequestBody_secret_scanning_non_provider_patterns.cs @@ -0,0 +1,23 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Enterprises.Item.CodeSecurity.Configurations +{ + /// The enablement status of secret scanning non provider patterns + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public enum ConfigurationsPostRequestBody_secret_scanning_non_provider_patterns + { + [EnumMember(Value = "enabled")] + #pragma warning disable CS1591 + Enabled, + #pragma warning restore CS1591 + [EnumMember(Value = "disabled")] + #pragma warning disable CS1591 + Disabled, + #pragma warning restore CS1591 + [EnumMember(Value = "not_set")] + #pragma warning disable CS1591 + Not_set, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Enterprises/Item/CodeSecurity/Configurations/ConfigurationsPostRequestBody_secret_scanning_push_protection.cs b/src/Ayllu.Github.Client/Github/Client/Enterprises/Item/CodeSecurity/Configurations/ConfigurationsPostRequestBody_secret_scanning_push_protection.cs new file mode 100644 index 0000000..8a56e0d --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Enterprises/Item/CodeSecurity/Configurations/ConfigurationsPostRequestBody_secret_scanning_push_protection.cs @@ -0,0 +1,23 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Enterprises.Item.CodeSecurity.Configurations +{ + /// The enablement status of secret scanning push protection + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public enum ConfigurationsPostRequestBody_secret_scanning_push_protection + { + [EnumMember(Value = "enabled")] + #pragma warning disable CS1591 + Enabled, + #pragma warning restore CS1591 + [EnumMember(Value = "disabled")] + #pragma warning disable CS1591 + Disabled, + #pragma warning restore CS1591 + [EnumMember(Value = "not_set")] + #pragma warning disable CS1591 + Not_set, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Enterprises/Item/CodeSecurity/Configurations/ConfigurationsPostRequestBody_secret_scanning_validity_checks.cs b/src/Ayllu.Github.Client/Github/Client/Enterprises/Item/CodeSecurity/Configurations/ConfigurationsPostRequestBody_secret_scanning_validity_checks.cs new file mode 100644 index 0000000..e5b3562 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Enterprises/Item/CodeSecurity/Configurations/ConfigurationsPostRequestBody_secret_scanning_validity_checks.cs @@ -0,0 +1,23 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Enterprises.Item.CodeSecurity.Configurations +{ + /// The enablement status of secret scanning validity checks + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public enum ConfigurationsPostRequestBody_secret_scanning_validity_checks + { + [EnumMember(Value = "enabled")] + #pragma warning disable CS1591 + Enabled, + #pragma warning restore CS1591 + [EnumMember(Value = "disabled")] + #pragma warning disable CS1591 + Disabled, + #pragma warning restore CS1591 + [EnumMember(Value = "not_set")] + #pragma warning disable CS1591 + Not_set, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Enterprises/Item/CodeSecurity/Configurations/ConfigurationsRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Enterprises/Item/CodeSecurity/Configurations/ConfigurationsRequestBuilder.cs new file mode 100644 index 0000000..92a18bd --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Enterprises/Item/CodeSecurity/Configurations/ConfigurationsRequestBuilder.cs @@ -0,0 +1,223 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Enterprises.Item.CodeSecurity.Configurations.Defaults; +using Ayllu.Github.Client.Enterprises.Item.CodeSecurity.Configurations.Item; +using Ayllu.Github.Client.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Enterprises.Item.CodeSecurity.Configurations +{ + /// + /// Builds and executes requests for operations under \enterprises\{enterprise}\code-security\configurations + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class ConfigurationsRequestBuilder : BaseRequestBuilder + { + /// The defaults property + public global::Ayllu.Github.Client.Enterprises.Item.CodeSecurity.Configurations.Defaults.DefaultsRequestBuilder Defaults + { + get => new global::Ayllu.Github.Client.Enterprises.Item.CodeSecurity.Configurations.Defaults.DefaultsRequestBuilder(PathParameters, RequestAdapter); + } + /// Gets an item from the Ayllu.Github.Client.enterprises.item.codeSecurity.configurations.item collection + /// The unique identifier of the code security configuration. + /// A + public global::Ayllu.Github.Client.Enterprises.Item.CodeSecurity.Configurations.Item.WithConfiguration_ItemRequestBuilder this[int position] + { + get + { + var urlTplParams = new Dictionary(PathParameters); + urlTplParams.Add("configuration_id", position); + return new global::Ayllu.Github.Client.Enterprises.Item.CodeSecurity.Configurations.Item.WithConfiguration_ItemRequestBuilder(urlTplParams, RequestAdapter); + } + } + /// Gets an item from the Ayllu.Github.Client.enterprises.item.codeSecurity.configurations.item collection + /// The unique identifier of the code security configuration. + /// A + [Obsolete("This indexer is deprecated and will be removed in the next major version. Use the one with the typed parameter instead.")] + public global::Ayllu.Github.Client.Enterprises.Item.CodeSecurity.Configurations.Item.WithConfiguration_ItemRequestBuilder this[string position] + { + get + { + var urlTplParams = new Dictionary(PathParameters); + if (!string.IsNullOrWhiteSpace(position)) urlTplParams.Add("configuration_id", position); + return new global::Ayllu.Github.Client.Enterprises.Item.CodeSecurity.Configurations.Item.WithConfiguration_ItemRequestBuilder(urlTplParams, RequestAdapter); + } + } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public ConfigurationsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/enterprises/{enterprise}/code-security/configurations{?after*,before*,per_page*}", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public ConfigurationsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/enterprises/{enterprise}/code-security/configurations{?after*,before*,per_page*}", rawUrl) + { + } + /// + /// Lists all code security configurations available in an 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. + /// API method documentation + /// + /// A List<global::Ayllu.Github.Client.Models.CodeSecurityConfiguration> + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 403 status code + /// When receiving a 404 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task?> GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task> GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "403", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "404", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + }; + var collectionResult = await RequestAdapter.SendCollectionAsync(requestInfo, global::Ayllu.Github.Client.Models.CodeSecurityConfiguration.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + return collectionResult?.AsList(); + } + /// + /// Creates a code security configuration in an 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 `admin:enterprise` scope to use this endpoint. + /// API method documentation + /// + /// A + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 400 status code + /// When receiving a 403 status code + /// When receiving a 404 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PostAsync(global::Ayllu.Github.Client.Enterprises.Item.CodeSecurity.Configurations.ConfigurationsPostRequestBody body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task PostAsync(global::Ayllu.Github.Client.Enterprises.Item.CodeSecurity.Configurations.ConfigurationsPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPostRequestInformation(body, requestConfiguration); + var errorMapping = new Dictionary> + { + { "400", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "403", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "404", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Models.CodeSecurityConfiguration.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// Lists all code security configurations available in an 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. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Creates a code security configuration in an 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 `admin:enterprise` scope to use this endpoint. + /// + /// A + /// The request body + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPostRequestInformation(global::Ayllu.Github.Client.Enterprises.Item.CodeSecurity.Configurations.ConfigurationsPostRequestBody body, Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToPostRequestInformation(global::Ayllu.Github.Client.Enterprises.Item.CodeSecurity.Configurations.ConfigurationsPostRequestBody body, Action> requestConfiguration = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.Enterprises.Item.CodeSecurity.Configurations.ConfigurationsRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Enterprises.Item.CodeSecurity.Configurations.ConfigurationsRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Lists all code security configurations available in an 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. + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class ConfigurationsRequestBuilderGetQueryParameters + { + /// A cursor, as given in the [Link header](https://docs.github.com/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/rest/using-the-rest-api/using-pagination-in-the-rest-api)." +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("after")] + public string? After { get; set; } +#nullable restore +#else + [QueryParameter("after")] + public string After { get; set; } +#endif + /// A cursor, as given in the [Link header](https://docs.github.com/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/rest/using-the-rest-api/using-pagination-in-the-rest-api)." +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("before")] + public string? Before { get; set; } +#nullable restore +#else + [QueryParameter("before")] + public string Before { get; set; } +#endif + /// The number of results per page (max 100). For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." + [QueryParameter("per_page")] + public int? PerPage { get; set; } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class ConfigurationsRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class ConfigurationsRequestBuilderPostRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Enterprises/Item/CodeSecurity/Configurations/Defaults/DefaultsRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Enterprises/Item/CodeSecurity/Configurations/Defaults/DefaultsRequestBuilder.cs new file mode 100644 index 0000000..bdd9637 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Enterprises/Item/CodeSecurity/Configurations/Defaults/DefaultsRequestBuilder.cs @@ -0,0 +1,94 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Enterprises.Item.CodeSecurity.Configurations.Defaults +{ + /// + /// Builds and executes requests for operations under \enterprises\{enterprise}\code-security\configurations\defaults + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class DefaultsRequestBuilder : BaseRequestBuilder + { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public DefaultsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/enterprises/{enterprise}/code-security/configurations/defaults", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public DefaultsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/enterprises/{enterprise}/code-security/configurations/defaults", rawUrl) + { + } + /// + /// Lists the default code security configurations for an 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. + /// API method documentation + /// + /// A List<global::Ayllu.Github.Client.Models.CodeSecurityDefaultConfigurations> + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task?> GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task> GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var collectionResult = await RequestAdapter.SendCollectionAsync(requestInfo, global::Ayllu.Github.Client.Models.CodeSecurityDefaultConfigurations.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false); + return collectionResult?.AsList(); + } + /// + /// Lists the default code security configurations for an 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. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.Enterprises.Item.CodeSecurity.Configurations.Defaults.DefaultsRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Enterprises.Item.CodeSecurity.Configurations.Defaults.DefaultsRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class DefaultsRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Enterprises/Item/CodeSecurity/Configurations/Item/Attach/AttachPostRequestBody.cs b/src/Ayllu.Github.Client/Github/Client/Enterprises/Item/CodeSecurity/Configurations/Item/Attach/AttachPostRequestBody.cs new file mode 100644 index 0000000..0510463 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Enterprises/Item/CodeSecurity/Configurations/Item/Attach/AttachPostRequestBody.cs @@ -0,0 +1,49 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Enterprises.Item.CodeSecurity.Configurations.Item.Attach +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class AttachPostRequestBody : IParsable + #pragma warning restore CS1591 + { + /// The type of repositories to attach the configuration to. + public global::Ayllu.Github.Client.Enterprises.Item.CodeSecurity.Configurations.Item.Attach.AttachPostRequestBody_scope? Scope { get; set; } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Enterprises.Item.CodeSecurity.Configurations.Item.Attach.AttachPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Enterprises.Item.CodeSecurity.Configurations.Item.Attach.AttachPostRequestBody(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "scope", n => { Scope = n.GetEnumValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteEnumValue("scope", Scope); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Enterprises/Item/CodeSecurity/Configurations/Item/Attach/AttachPostRequestBody_scope.cs b/src/Ayllu.Github.Client/Github/Client/Enterprises/Item/CodeSecurity/Configurations/Item/Attach/AttachPostRequestBody_scope.cs new file mode 100644 index 0000000..99ee701 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Enterprises/Item/CodeSecurity/Configurations/Item/Attach/AttachPostRequestBody_scope.cs @@ -0,0 +1,19 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Enterprises.Item.CodeSecurity.Configurations.Item.Attach +{ + /// The type of repositories to attach the configuration to. + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public enum AttachPostRequestBody_scope + { + [EnumMember(Value = "all")] + #pragma warning disable CS1591 + All, + #pragma warning restore CS1591 + [EnumMember(Value = "all_without_configurations")] + #pragma warning disable CS1591 + All_without_configurations, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Enterprises/Item/CodeSecurity/Configurations/Item/Attach/AttachPostResponse.cs b/src/Ayllu.Github.Client/Github/Client/Enterprises/Item/CodeSecurity/Configurations/Item/Attach/AttachPostResponse.cs new file mode 100644 index 0000000..5d7c663 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Enterprises/Item/CodeSecurity/Configurations/Item/Attach/AttachPostResponse.cs @@ -0,0 +1,55 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Enterprises.Item.CodeSecurity.Configurations.Item.Attach +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class AttachPostResponse : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public AttachPostResponse() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Enterprises.Item.CodeSecurity.Configurations.Item.Attach.AttachPostResponse CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Enterprises.Item.CodeSecurity.Configurations.Item.Attach.AttachPostResponse(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Enterprises/Item/CodeSecurity/Configurations/Item/Attach/AttachRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Enterprises/Item/CodeSecurity/Configurations/Item/Attach/AttachRequestBuilder.cs new file mode 100644 index 0000000..1d40215 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Enterprises/Item/CodeSecurity/Configurations/Item/Attach/AttachRequestBuilder.cs @@ -0,0 +1,138 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Enterprises.Item.CodeSecurity.Configurations.Item.Attach +{ + /// + /// Builds and executes requests for operations under \enterprises\{enterprise}\code-security\configurations\{configuration_id}\attach + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class AttachRequestBuilder : BaseRequestBuilder + { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public AttachRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/enterprises/{enterprise}/code-security/configurations/{configuration_id}/attach", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public AttachRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/enterprises/{enterprise}/code-security/configurations/{configuration_id}/attach", rawUrl) + { + } + /// + /// Attaches an enterprise code security configuration to 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 for the enterprise to use this endpoint.OAuth app tokens and personal access tokens (classic) need the `admin:enterprise` scope to use this endpoint. + /// API method documentation + /// + /// A + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 403 status code + /// When receiving a 404 status code + /// When receiving a 409 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PostAsAttachPostResponseAsync(global::Ayllu.Github.Client.Enterprises.Item.CodeSecurity.Configurations.Item.Attach.AttachPostRequestBody body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task PostAsAttachPostResponseAsync(global::Ayllu.Github.Client.Enterprises.Item.CodeSecurity.Configurations.Item.Attach.AttachPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPostRequestInformation(body, requestConfiguration); + var errorMapping = new Dictionary> + { + { "403", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "404", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "409", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Enterprises.Item.CodeSecurity.Configurations.Item.Attach.AttachPostResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// Attaches an enterprise code security configuration to 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 for the enterprise to use this endpoint.OAuth app tokens and personal access tokens (classic) need the `admin:enterprise` scope to use this endpoint. + /// API method documentation + /// + /// A + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 403 status code + /// When receiving a 404 status code + /// When receiving a 409 status code + [Obsolete("This method is obsolete. Use PostAsAttachPostResponseAsync instead.")] +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PostAsync(global::Ayllu.Github.Client.Enterprises.Item.CodeSecurity.Configurations.Item.Attach.AttachPostRequestBody body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task PostAsync(global::Ayllu.Github.Client.Enterprises.Item.CodeSecurity.Configurations.Item.Attach.AttachPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPostRequestInformation(body, requestConfiguration); + var errorMapping = new Dictionary> + { + { "403", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "404", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "409", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Enterprises.Item.CodeSecurity.Configurations.Item.Attach.AttachResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// Attaches an enterprise code security configuration to 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 for the enterprise to use this endpoint.OAuth app tokens and personal access tokens (classic) need the `admin:enterprise` scope to use this endpoint. + /// + /// A + /// The request body + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPostRequestInformation(global::Ayllu.Github.Client.Enterprises.Item.CodeSecurity.Configurations.Item.Attach.AttachPostRequestBody body, Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToPostRequestInformation(global::Ayllu.Github.Client.Enterprises.Item.CodeSecurity.Configurations.Item.Attach.AttachPostRequestBody body, Action> requestConfiguration = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.Enterprises.Item.CodeSecurity.Configurations.Item.Attach.AttachRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Enterprises.Item.CodeSecurity.Configurations.Item.Attach.AttachRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class AttachRequestBuilderPostRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Enterprises/Item/CodeSecurity/Configurations/Item/Attach/AttachResponse.cs b/src/Ayllu.Github.Client/Github/Client/Enterprises/Item/CodeSecurity/Configurations/Item/Attach/AttachResponse.cs new file mode 100644 index 0000000..949df36 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Enterprises/Item/CodeSecurity/Configurations/Item/Attach/AttachResponse.cs @@ -0,0 +1,28 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Enterprises.Item.CodeSecurity.Configurations.Item.Attach +{ + [Obsolete("This class is obsolete. Use AttachPostResponse instead.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class AttachResponse : global::Ayllu.Github.Client.Enterprises.Item.CodeSecurity.Configurations.Item.Attach.AttachPostResponse, IParsable + #pragma warning restore CS1591 + { + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static new global::Ayllu.Github.Client.Enterprises.Item.CodeSecurity.Configurations.Item.Attach.AttachResponse CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Enterprises.Item.CodeSecurity.Configurations.Item.Attach.AttachResponse(); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Enterprises/Item/CodeSecurity/Configurations/Item/Defaults/DefaultsPutRequestBody.cs b/src/Ayllu.Github.Client/Github/Client/Enterprises/Item/CodeSecurity/Configurations/Item/Defaults/DefaultsPutRequestBody.cs new file mode 100644 index 0000000..e03b4ce --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Enterprises/Item/CodeSecurity/Configurations/Item/Defaults/DefaultsPutRequestBody.cs @@ -0,0 +1,59 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Enterprises.Item.CodeSecurity.Configurations.Item.Defaults +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class DefaultsPutRequestBody : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// Specify which types of repository this security configuration should be applied to by default. + public global::Ayllu.Github.Client.Enterprises.Item.CodeSecurity.Configurations.Item.Defaults.DefaultsPutRequestBody_default_for_new_repos? DefaultForNewRepos { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public DefaultsPutRequestBody() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Enterprises.Item.CodeSecurity.Configurations.Item.Defaults.DefaultsPutRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Enterprises.Item.CodeSecurity.Configurations.Item.Defaults.DefaultsPutRequestBody(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "default_for_new_repos", n => { DefaultForNewRepos = n.GetEnumValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteEnumValue("default_for_new_repos", DefaultForNewRepos); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Enterprises/Item/CodeSecurity/Configurations/Item/Defaults/DefaultsPutRequestBody_default_for_new_repos.cs b/src/Ayllu.Github.Client/Github/Client/Enterprises/Item/CodeSecurity/Configurations/Item/Defaults/DefaultsPutRequestBody_default_for_new_repos.cs new file mode 100644 index 0000000..d045597 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Enterprises/Item/CodeSecurity/Configurations/Item/Defaults/DefaultsPutRequestBody_default_for_new_repos.cs @@ -0,0 +1,27 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Enterprises.Item.CodeSecurity.Configurations.Item.Defaults +{ + /// Specify which types of repository this security configuration should be applied to by default. + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public enum DefaultsPutRequestBody_default_for_new_repos + { + [EnumMember(Value = "all")] + #pragma warning disable CS1591 + All, + #pragma warning restore CS1591 + [EnumMember(Value = "none")] + #pragma warning disable CS1591 + None, + #pragma warning restore CS1591 + [EnumMember(Value = "private_and_internal")] + #pragma warning disable CS1591 + Private_and_internal, + #pragma warning restore CS1591 + [EnumMember(Value = "public")] + #pragma warning disable CS1591 + Public, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Enterprises/Item/CodeSecurity/Configurations/Item/Defaults/DefaultsPutResponse.cs b/src/Ayllu.Github.Client/Github/Client/Enterprises/Item/CodeSecurity/Configurations/Item/Defaults/DefaultsPutResponse.cs new file mode 100644 index 0000000..9226ea1 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Enterprises/Item/CodeSecurity/Configurations/Item/Defaults/DefaultsPutResponse.cs @@ -0,0 +1,70 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Enterprises.Item.CodeSecurity.Configurations.Item.Defaults +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class DefaultsPutResponse : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// A code security configuration +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.CodeSecurityConfiguration? Configuration { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.CodeSecurityConfiguration Configuration { get; set; } +#endif + /// Specifies which types of repository this security configuration is applied to by default. + public global::Ayllu.Github.Client.Enterprises.Item.CodeSecurity.Configurations.Item.Defaults.DefaultsPutResponse_default_for_new_repos? DefaultForNewRepos { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public DefaultsPutResponse() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Enterprises.Item.CodeSecurity.Configurations.Item.Defaults.DefaultsPutResponse CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Enterprises.Item.CodeSecurity.Configurations.Item.Defaults.DefaultsPutResponse(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "configuration", n => { Configuration = n.GetObjectValue(global::Ayllu.Github.Client.Models.CodeSecurityConfiguration.CreateFromDiscriminatorValue); } }, + { "default_for_new_repos", n => { DefaultForNewRepos = n.GetEnumValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteObjectValue("configuration", Configuration); + writer.WriteEnumValue("default_for_new_repos", DefaultForNewRepos); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Enterprises/Item/CodeSecurity/Configurations/Item/Defaults/DefaultsPutResponse_default_for_new_repos.cs b/src/Ayllu.Github.Client/Github/Client/Enterprises/Item/CodeSecurity/Configurations/Item/Defaults/DefaultsPutResponse_default_for_new_repos.cs new file mode 100644 index 0000000..f02be47 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Enterprises/Item/CodeSecurity/Configurations/Item/Defaults/DefaultsPutResponse_default_for_new_repos.cs @@ -0,0 +1,27 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Enterprises.Item.CodeSecurity.Configurations.Item.Defaults +{ + /// Specifies which types of repository this security configuration is applied to by default. + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public enum DefaultsPutResponse_default_for_new_repos + { + [EnumMember(Value = "all")] + #pragma warning disable CS1591 + All, + #pragma warning restore CS1591 + [EnumMember(Value = "none")] + #pragma warning disable CS1591 + None, + #pragma warning restore CS1591 + [EnumMember(Value = "private_and_internal")] + #pragma warning disable CS1591 + Private_and_internal, + #pragma warning restore CS1591 + [EnumMember(Value = "public")] + #pragma warning disable CS1591 + Public, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Enterprises/Item/CodeSecurity/Configurations/Item/Defaults/DefaultsRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Enterprises/Item/CodeSecurity/Configurations/Item/Defaults/DefaultsRequestBuilder.cs new file mode 100644 index 0000000..c182581 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Enterprises/Item/CodeSecurity/Configurations/Item/Defaults/DefaultsRequestBuilder.cs @@ -0,0 +1,134 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Enterprises.Item.CodeSecurity.Configurations.Item.Defaults +{ + /// + /// Builds and executes requests for operations under \enterprises\{enterprise}\code-security\configurations\{configuration_id}\defaults + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class DefaultsRequestBuilder : BaseRequestBuilder + { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public DefaultsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/enterprises/{enterprise}/code-security/configurations/{configuration_id}/defaults", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public DefaultsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/enterprises/{enterprise}/code-security/configurations/{configuration_id}/defaults", rawUrl) + { + } + /// + /// Sets a code security configuration as a default to be applied to new repositories in your enterprise.This configuration will be applied by default to the matching repository type when created, but only for organizations within the enterprise that do not already have a default code security configuration set.The authenticated user must be an administrator for the enterprise to use this endpoint.OAuth app tokens and personal access tokens (classic) need the `admin:enterprise` scope to use this endpoint. + /// API method documentation + /// + /// A + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 403 status code + /// When receiving a 404 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PutAsDefaultsPutResponseAsync(global::Ayllu.Github.Client.Enterprises.Item.CodeSecurity.Configurations.Item.Defaults.DefaultsPutRequestBody body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task PutAsDefaultsPutResponseAsync(global::Ayllu.Github.Client.Enterprises.Item.CodeSecurity.Configurations.Item.Defaults.DefaultsPutRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPutRequestInformation(body, requestConfiguration); + var errorMapping = new Dictionary> + { + { "403", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "404", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Enterprises.Item.CodeSecurity.Configurations.Item.Defaults.DefaultsPutResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// Sets a code security configuration as a default to be applied to new repositories in your enterprise.This configuration will be applied by default to the matching repository type when created, but only for organizations within the enterprise that do not already have a default code security configuration set.The authenticated user must be an administrator for the enterprise to use this endpoint.OAuth app tokens and personal access tokens (classic) need the `admin:enterprise` scope to use this endpoint. + /// API method documentation + /// + /// A + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 403 status code + /// When receiving a 404 status code + [Obsolete("This method is obsolete. Use PutAsDefaultsPutResponseAsync instead.")] +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PutAsync(global::Ayllu.Github.Client.Enterprises.Item.CodeSecurity.Configurations.Item.Defaults.DefaultsPutRequestBody body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task PutAsync(global::Ayllu.Github.Client.Enterprises.Item.CodeSecurity.Configurations.Item.Defaults.DefaultsPutRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPutRequestInformation(body, requestConfiguration); + var errorMapping = new Dictionary> + { + { "403", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "404", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Enterprises.Item.CodeSecurity.Configurations.Item.Defaults.DefaultsResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// Sets a code security configuration as a default to be applied to new repositories in your enterprise.This configuration will be applied by default to the matching repository type when created, but only for organizations within the enterprise that do not already have a default code security configuration set.The authenticated user must be an administrator for the enterprise to use this endpoint.OAuth app tokens and personal access tokens (classic) need the `admin:enterprise` scope to use this endpoint. + /// + /// A + /// The request body + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPutRequestInformation(global::Ayllu.Github.Client.Enterprises.Item.CodeSecurity.Configurations.Item.Defaults.DefaultsPutRequestBody body, Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToPutRequestInformation(global::Ayllu.Github.Client.Enterprises.Item.CodeSecurity.Configurations.Item.Defaults.DefaultsPutRequestBody body, Action> requestConfiguration = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation(Method.PUT, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.Enterprises.Item.CodeSecurity.Configurations.Item.Defaults.DefaultsRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Enterprises.Item.CodeSecurity.Configurations.Item.Defaults.DefaultsRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class DefaultsRequestBuilderPutRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Enterprises/Item/CodeSecurity/Configurations/Item/Defaults/DefaultsResponse.cs b/src/Ayllu.Github.Client/Github/Client/Enterprises/Item/CodeSecurity/Configurations/Item/Defaults/DefaultsResponse.cs new file mode 100644 index 0000000..bb5846b --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Enterprises/Item/CodeSecurity/Configurations/Item/Defaults/DefaultsResponse.cs @@ -0,0 +1,28 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Enterprises.Item.CodeSecurity.Configurations.Item.Defaults +{ + [Obsolete("This class is obsolete. Use DefaultsPutResponse instead.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class DefaultsResponse : global::Ayllu.Github.Client.Enterprises.Item.CodeSecurity.Configurations.Item.Defaults.DefaultsPutResponse, IParsable + #pragma warning restore CS1591 + { + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static new global::Ayllu.Github.Client.Enterprises.Item.CodeSecurity.Configurations.Item.Defaults.DefaultsResponse CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Enterprises.Item.CodeSecurity.Configurations.Item.Defaults.DefaultsResponse(); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Enterprises/Item/CodeSecurity/Configurations/Item/Repositories/RepositoriesRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Enterprises/Item/CodeSecurity/Configurations/Item/Repositories/RepositoriesRequestBuilder.cs new file mode 100644 index 0000000..7fb63ec --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Enterprises/Item/CodeSecurity/Configurations/Item/Repositories/RepositoriesRequestBuilder.cs @@ -0,0 +1,141 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Enterprises.Item.CodeSecurity.Configurations.Item.Repositories +{ + /// + /// Builds and executes requests for operations under \enterprises\{enterprise}\code-security\configurations\{configuration_id}\repositories + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class RepositoriesRequestBuilder : BaseRequestBuilder + { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public RepositoriesRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/enterprises/{enterprise}/code-security/configurations/{configuration_id}/repositories{?after*,before*,per_page*,status*}", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public RepositoriesRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/enterprises/{enterprise}/code-security/configurations/{configuration_id}/repositories{?after*,before*,per_page*,status*}", rawUrl) + { + } + /// + /// Lists the repositories associated with an enterprise code security configuration in an organization.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. + /// API method documentation + /// + /// A List<global::Ayllu.Github.Client.Models.CodeSecurityConfigurationRepositories> + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 403 status code + /// When receiving a 404 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task?> GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task> GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "403", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "404", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + }; + var collectionResult = await RequestAdapter.SendCollectionAsync(requestInfo, global::Ayllu.Github.Client.Models.CodeSecurityConfigurationRepositories.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + return collectionResult?.AsList(); + } + /// + /// Lists the repositories associated with an enterprise code security configuration in an organization.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. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.Enterprises.Item.CodeSecurity.Configurations.Item.Repositories.RepositoriesRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Enterprises.Item.CodeSecurity.Configurations.Item.Repositories.RepositoriesRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Lists the repositories associated with an enterprise code security configuration in an organization.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. + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class RepositoriesRequestBuilderGetQueryParameters + { + /// A cursor, as given in the [Link header](https://docs.github.com/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/rest/using-the-rest-api/using-pagination-in-the-rest-api)." +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("after")] + public string? After { get; set; } +#nullable restore +#else + [QueryParameter("after")] + public string After { get; set; } +#endif + /// A cursor, as given in the [Link header](https://docs.github.com/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/rest/using-the-rest-api/using-pagination-in-the-rest-api)." +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("before")] + public string? Before { get; set; } +#nullable restore +#else + [QueryParameter("before")] + public string Before { get; set; } +#endif + /// The number of results per page (max 100). For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." + [QueryParameter("per_page")] + public int? PerPage { get; set; } + /// A comma-separated list of statuses. If specified, only repositories with these attachment statuses will be returned.Can be: `all`, `attached`, `attaching`, `removed`, `enforced`, `failed`, `updating`, `removed_by_enterprise` +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("status")] + public string? Status { get; set; } +#nullable restore +#else + [QueryParameter("status")] + public string Status { get; set; } +#endif + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class RepositoriesRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Enterprises/Item/CodeSecurity/Configurations/Item/WithConfiguration_ItemRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Enterprises/Item/CodeSecurity/Configurations/Item/WithConfiguration_ItemRequestBuilder.cs new file mode 100644 index 0000000..d5aa8b7 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Enterprises/Item/CodeSecurity/Configurations/Item/WithConfiguration_ItemRequestBuilder.cs @@ -0,0 +1,234 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Enterprises.Item.CodeSecurity.Configurations.Item.Attach; +using Ayllu.Github.Client.Enterprises.Item.CodeSecurity.Configurations.Item.Defaults; +using Ayllu.Github.Client.Enterprises.Item.CodeSecurity.Configurations.Item.Repositories; +using Ayllu.Github.Client.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Enterprises.Item.CodeSecurity.Configurations.Item +{ + /// + /// Builds and executes requests for operations under \enterprises\{enterprise}\code-security\configurations\{configuration_id} + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithConfiguration_ItemRequestBuilder : BaseRequestBuilder + { + /// The attach property + public global::Ayllu.Github.Client.Enterprises.Item.CodeSecurity.Configurations.Item.Attach.AttachRequestBuilder Attach + { + get => new global::Ayllu.Github.Client.Enterprises.Item.CodeSecurity.Configurations.Item.Attach.AttachRequestBuilder(PathParameters, RequestAdapter); + } + /// The defaults property + public global::Ayllu.Github.Client.Enterprises.Item.CodeSecurity.Configurations.Item.Defaults.DefaultsRequestBuilder Defaults + { + get => new global::Ayllu.Github.Client.Enterprises.Item.CodeSecurity.Configurations.Item.Defaults.DefaultsRequestBuilder(PathParameters, RequestAdapter); + } + /// The repositories property + public global::Ayllu.Github.Client.Enterprises.Item.CodeSecurity.Configurations.Item.Repositories.RepositoriesRequestBuilder Repositories + { + get => new global::Ayllu.Github.Client.Enterprises.Item.CodeSecurity.Configurations.Item.Repositories.RepositoriesRequestBuilder(PathParameters, RequestAdapter); + } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public WithConfiguration_ItemRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/enterprises/{enterprise}/code-security/configurations/{configuration_id}", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public WithConfiguration_ItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/enterprises/{enterprise}/code-security/configurations/{configuration_id}", rawUrl) + { + } + /// + /// Deletes a code security configuration from an enterprise.Repositories attached to the configuration will retain their settings but will no longer be associated withthe configuration.The authenticated user must be an administrator for the enterprise to use this endpoint.OAuth app tokens and personal access tokens (classic) need the `admin:enterprise` scope to use this endpoint. + /// API method documentation + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 400 status code + /// When receiving a 403 status code + /// When receiving a 404 status code + /// When receiving a 409 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task DeleteAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task DeleteAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToDeleteRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "400", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "403", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "404", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "409", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + }; + await RequestAdapter.SendNoContentAsync(requestInfo, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// Gets a code security configuration available in an 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. + /// API method documentation + /// + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 403 status code + /// When receiving a 404 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "403", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "404", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Models.CodeSecurityConfiguration.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// Updates a code security configuration in an 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 `admin:enterprise` scope to use this endpoint. + /// API method documentation + /// + /// A + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 403 status code + /// When receiving a 404 status code + /// When receiving a 409 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PatchAsync(global::Ayllu.Github.Client.Enterprises.Item.CodeSecurity.Configurations.Item.WithConfiguration_PatchRequestBody body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task PatchAsync(global::Ayllu.Github.Client.Enterprises.Item.CodeSecurity.Configurations.Item.WithConfiguration_PatchRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPatchRequestInformation(body, requestConfiguration); + var errorMapping = new Dictionary> + { + { "403", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "404", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "409", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Models.CodeSecurityConfiguration.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// Deletes a code security configuration from an enterprise.Repositories attached to the configuration will retain their settings but will no longer be associated withthe configuration.The authenticated user must be an administrator for the enterprise to use this endpoint.OAuth app tokens and personal access tokens (classic) need the `admin:enterprise` scope to use this endpoint. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToDeleteRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToDeleteRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.DELETE, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json, application/scim+json"); + return requestInfo; + } + /// + /// Gets a code security configuration available in an 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. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Updates a code security configuration in an 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 `admin:enterprise` scope to use this endpoint. + /// + /// A + /// The request body + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPatchRequestInformation(global::Ayllu.Github.Client.Enterprises.Item.CodeSecurity.Configurations.Item.WithConfiguration_PatchRequestBody body, Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToPatchRequestInformation(global::Ayllu.Github.Client.Enterprises.Item.CodeSecurity.Configurations.Item.WithConfiguration_PatchRequestBody body, Action> requestConfiguration = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.Enterprises.Item.CodeSecurity.Configurations.Item.WithConfiguration_ItemRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Enterprises.Item.CodeSecurity.Configurations.Item.WithConfiguration_ItemRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithConfiguration_ItemRequestBuilderDeleteRequestConfiguration : RequestConfiguration + { + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithConfiguration_ItemRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithConfiguration_ItemRequestBuilderPatchRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Enterprises/Item/CodeSecurity/Configurations/Item/WithConfiguration_PatchRequestBody.cs b/src/Ayllu.Github.Client/Github/Client/Enterprises/Item/CodeSecurity/Configurations/Item/WithConfiguration_PatchRequestBody.cs new file mode 100644 index 0000000..6967158 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Enterprises/Item/CodeSecurity/Configurations/Item/WithConfiguration_PatchRequestBody.cs @@ -0,0 +1,163 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Enterprises.Item.CodeSecurity.Configurations.Item +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class WithConfiguration_PatchRequestBody : IParsable + #pragma warning restore CS1591 + { + /// The enablement status of GitHub Advanced Security features. `enabled` will enable both Code Security and Secret Protection features.> [!WARNING]> `code_security` and `secret_protection` are deprecated values for this field. Prefer the individual `code_security` and `secret_protection` fields to set the status of these features. + public global::Ayllu.Github.Client.Enterprises.Item.CodeSecurity.Configurations.Item.WithConfiguration_PatchRequestBody_advanced_security? AdvancedSecurity { get; set; } + /// The enablement status of code scanning default setup + public global::Ayllu.Github.Client.Enterprises.Item.CodeSecurity.Configurations.Item.WithConfiguration_PatchRequestBody_code_scanning_default_setup? CodeScanningDefaultSetup { get; set; } + /// Feature options for code scanning default setup +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.CodeScanningDefaultSetupOptions? CodeScanningDefaultSetupOptions { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.CodeScanningDefaultSetupOptions CodeScanningDefaultSetupOptions { get; set; } +#endif + /// The enablement status of code scanning delegated alert dismissal + public global::Ayllu.Github.Client.Enterprises.Item.CodeSecurity.Configurations.Item.WithConfiguration_PatchRequestBody_code_scanning_delegated_alert_dismissal? CodeScanningDelegatedAlertDismissal { get; set; } + /// The enablement status of GitHub Code Security features. + public global::Ayllu.Github.Client.Enterprises.Item.CodeSecurity.Configurations.Item.WithConfiguration_PatchRequestBody_code_security? CodeSecurity { get; set; } + /// The enablement status of Dependabot alerts + public global::Ayllu.Github.Client.Enterprises.Item.CodeSecurity.Configurations.Item.WithConfiguration_PatchRequestBody_dependabot_alerts? DependabotAlerts { get; set; } + /// The enablement status of Dependabot security updates + public global::Ayllu.Github.Client.Enterprises.Item.CodeSecurity.Configurations.Item.WithConfiguration_PatchRequestBody_dependabot_security_updates? DependabotSecurityUpdates { get; set; } + /// The enablement status of Dependency Graph + public global::Ayllu.Github.Client.Enterprises.Item.CodeSecurity.Configurations.Item.WithConfiguration_PatchRequestBody_dependency_graph? DependencyGraph { get; set; } + /// The enablement status of Automatic dependency submission + public global::Ayllu.Github.Client.Enterprises.Item.CodeSecurity.Configurations.Item.WithConfiguration_PatchRequestBody_dependency_graph_autosubmit_action? DependencyGraphAutosubmitAction { get; set; } + /// Feature options for Automatic dependency submission +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Enterprises.Item.CodeSecurity.Configurations.Item.WithConfiguration_PatchRequestBody_dependency_graph_autosubmit_action_options? DependencyGraphAutosubmitActionOptions { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Enterprises.Item.CodeSecurity.Configurations.Item.WithConfiguration_PatchRequestBody_dependency_graph_autosubmit_action_options DependencyGraphAutosubmitActionOptions { get; set; } +#endif + /// A description of the code security configuration +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Description { get; set; } +#nullable restore +#else + public string Description { get; set; } +#endif + /// The enforcement status for a security configuration + public global::Ayllu.Github.Client.Enterprises.Item.CodeSecurity.Configurations.Item.WithConfiguration_PatchRequestBody_enforcement? Enforcement { get; set; } + /// The name of the code security configuration. Must be unique across the enterprise. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Name { get; set; } +#nullable restore +#else + public string Name { get; set; } +#endif + /// The enablement status of private vulnerability reporting + public global::Ayllu.Github.Client.Enterprises.Item.CodeSecurity.Configurations.Item.WithConfiguration_PatchRequestBody_private_vulnerability_reporting? PrivateVulnerabilityReporting { get; set; } + /// The enablement status of GitHub Secret Protection features. + public global::Ayllu.Github.Client.Enterprises.Item.CodeSecurity.Configurations.Item.WithConfiguration_PatchRequestBody_secret_protection? SecretProtection { get; set; } + /// The enablement status of secret scanning + public global::Ayllu.Github.Client.Enterprises.Item.CodeSecurity.Configurations.Item.WithConfiguration_PatchRequestBody_secret_scanning? SecretScanning { get; set; } + /// The enablement status of secret scanning delegated alert dismissal + public global::Ayllu.Github.Client.Enterprises.Item.CodeSecurity.Configurations.Item.WithConfiguration_PatchRequestBody_secret_scanning_delegated_alert_dismissal? SecretScanningDelegatedAlertDismissal { get; set; } + /// The enablement status of Copilot secret scanning + public global::Ayllu.Github.Client.Enterprises.Item.CodeSecurity.Configurations.Item.WithConfiguration_PatchRequestBody_secret_scanning_generic_secrets? SecretScanningGenericSecrets { get; set; } + /// The enablement status of secret scanning non-provider patterns + public global::Ayllu.Github.Client.Enterprises.Item.CodeSecurity.Configurations.Item.WithConfiguration_PatchRequestBody_secret_scanning_non_provider_patterns? SecretScanningNonProviderPatterns { get; set; } + /// The enablement status of secret scanning push protection + public global::Ayllu.Github.Client.Enterprises.Item.CodeSecurity.Configurations.Item.WithConfiguration_PatchRequestBody_secret_scanning_push_protection? SecretScanningPushProtection { get; set; } + /// The enablement status of secret scanning validity checks + public global::Ayllu.Github.Client.Enterprises.Item.CodeSecurity.Configurations.Item.WithConfiguration_PatchRequestBody_secret_scanning_validity_checks? SecretScanningValidityChecks { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public WithConfiguration_PatchRequestBody() + { + CodeScanningDelegatedAlertDismissal = global::Ayllu.Github.Client.Enterprises.Item.CodeSecurity.Configurations.Item.WithConfiguration_PatchRequestBody_code_scanning_delegated_alert_dismissal.Disabled; + SecretScanningDelegatedAlertDismissal = global::Ayllu.Github.Client.Enterprises.Item.CodeSecurity.Configurations.Item.WithConfiguration_PatchRequestBody_secret_scanning_delegated_alert_dismissal.Disabled; + SecretScanningGenericSecrets = global::Ayllu.Github.Client.Enterprises.Item.CodeSecurity.Configurations.Item.WithConfiguration_PatchRequestBody_secret_scanning_generic_secrets.Disabled; + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Enterprises.Item.CodeSecurity.Configurations.Item.WithConfiguration_PatchRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Enterprises.Item.CodeSecurity.Configurations.Item.WithConfiguration_PatchRequestBody(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "advanced_security", n => { AdvancedSecurity = n.GetEnumValue(); } }, + { "code_scanning_default_setup", n => { CodeScanningDefaultSetup = n.GetEnumValue(); } }, + { "code_scanning_default_setup_options", n => { CodeScanningDefaultSetupOptions = n.GetObjectValue(global::Ayllu.Github.Client.Models.CodeScanningDefaultSetupOptions.CreateFromDiscriminatorValue); } }, + { "code_scanning_delegated_alert_dismissal", n => { CodeScanningDelegatedAlertDismissal = n.GetEnumValue(); } }, + { "code_security", n => { CodeSecurity = n.GetEnumValue(); } }, + { "dependabot_alerts", n => { DependabotAlerts = n.GetEnumValue(); } }, + { "dependabot_security_updates", n => { DependabotSecurityUpdates = n.GetEnumValue(); } }, + { "dependency_graph", n => { DependencyGraph = n.GetEnumValue(); } }, + { "dependency_graph_autosubmit_action", n => { DependencyGraphAutosubmitAction = n.GetEnumValue(); } }, + { "dependency_graph_autosubmit_action_options", n => { DependencyGraphAutosubmitActionOptions = n.GetObjectValue(global::Ayllu.Github.Client.Enterprises.Item.CodeSecurity.Configurations.Item.WithConfiguration_PatchRequestBody_dependency_graph_autosubmit_action_options.CreateFromDiscriminatorValue); } }, + { "description", n => { Description = n.GetStringValue(); } }, + { "enforcement", n => { Enforcement = n.GetEnumValue(); } }, + { "name", n => { Name = n.GetStringValue(); } }, + { "private_vulnerability_reporting", n => { PrivateVulnerabilityReporting = n.GetEnumValue(); } }, + { "secret_protection", n => { SecretProtection = n.GetEnumValue(); } }, + { "secret_scanning", n => { SecretScanning = n.GetEnumValue(); } }, + { "secret_scanning_delegated_alert_dismissal", n => { SecretScanningDelegatedAlertDismissal = n.GetEnumValue(); } }, + { "secret_scanning_generic_secrets", n => { SecretScanningGenericSecrets = n.GetEnumValue(); } }, + { "secret_scanning_non_provider_patterns", n => { SecretScanningNonProviderPatterns = n.GetEnumValue(); } }, + { "secret_scanning_push_protection", n => { SecretScanningPushProtection = n.GetEnumValue(); } }, + { "secret_scanning_validity_checks", n => { SecretScanningValidityChecks = n.GetEnumValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteEnumValue("advanced_security", AdvancedSecurity); + writer.WriteEnumValue("code_scanning_default_setup", CodeScanningDefaultSetup); + writer.WriteObjectValue("code_scanning_default_setup_options", CodeScanningDefaultSetupOptions); + writer.WriteEnumValue("code_scanning_delegated_alert_dismissal", CodeScanningDelegatedAlertDismissal); + writer.WriteEnumValue("code_security", CodeSecurity); + writer.WriteEnumValue("dependabot_alerts", DependabotAlerts); + writer.WriteEnumValue("dependabot_security_updates", DependabotSecurityUpdates); + writer.WriteEnumValue("dependency_graph", DependencyGraph); + writer.WriteEnumValue("dependency_graph_autosubmit_action", DependencyGraphAutosubmitAction); + writer.WriteObjectValue("dependency_graph_autosubmit_action_options", DependencyGraphAutosubmitActionOptions); + writer.WriteStringValue("description", Description); + writer.WriteEnumValue("enforcement", Enforcement); + writer.WriteStringValue("name", Name); + writer.WriteEnumValue("private_vulnerability_reporting", PrivateVulnerabilityReporting); + writer.WriteEnumValue("secret_protection", SecretProtection); + writer.WriteEnumValue("secret_scanning", SecretScanning); + writer.WriteEnumValue("secret_scanning_delegated_alert_dismissal", SecretScanningDelegatedAlertDismissal); + writer.WriteEnumValue("secret_scanning_generic_secrets", SecretScanningGenericSecrets); + writer.WriteEnumValue("secret_scanning_non_provider_patterns", SecretScanningNonProviderPatterns); + writer.WriteEnumValue("secret_scanning_push_protection", SecretScanningPushProtection); + writer.WriteEnumValue("secret_scanning_validity_checks", SecretScanningValidityChecks); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Enterprises/Item/CodeSecurity/Configurations/Item/WithConfiguration_PatchRequestBody_advanced_security.cs b/src/Ayllu.Github.Client/Github/Client/Enterprises/Item/CodeSecurity/Configurations/Item/WithConfiguration_PatchRequestBody_advanced_security.cs new file mode 100644 index 0000000..0ec5e56 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Enterprises/Item/CodeSecurity/Configurations/Item/WithConfiguration_PatchRequestBody_advanced_security.cs @@ -0,0 +1,27 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Enterprises.Item.CodeSecurity.Configurations.Item +{ + /// The enablement status of GitHub Advanced Security features. `enabled` will enable both Code Security and Secret Protection features.> [!WARNING]> `code_security` and `secret_protection` are deprecated values for this field. Prefer the individual `code_security` and `secret_protection` fields to set the status of these features. + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public enum WithConfiguration_PatchRequestBody_advanced_security + { + [EnumMember(Value = "enabled")] + #pragma warning disable CS1591 + Enabled, + #pragma warning restore CS1591 + [EnumMember(Value = "disabled")] + #pragma warning disable CS1591 + Disabled, + #pragma warning restore CS1591 + [EnumMember(Value = "code_security")] + #pragma warning disable CS1591 + Code_security, + #pragma warning restore CS1591 + [EnumMember(Value = "secret_protection")] + #pragma warning disable CS1591 + Secret_protection, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Enterprises/Item/CodeSecurity/Configurations/Item/WithConfiguration_PatchRequestBody_code_scanning_default_setup.cs b/src/Ayllu.Github.Client/Github/Client/Enterprises/Item/CodeSecurity/Configurations/Item/WithConfiguration_PatchRequestBody_code_scanning_default_setup.cs new file mode 100644 index 0000000..87bc183 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Enterprises/Item/CodeSecurity/Configurations/Item/WithConfiguration_PatchRequestBody_code_scanning_default_setup.cs @@ -0,0 +1,23 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Enterprises.Item.CodeSecurity.Configurations.Item +{ + /// The enablement status of code scanning default setup + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public enum WithConfiguration_PatchRequestBody_code_scanning_default_setup + { + [EnumMember(Value = "enabled")] + #pragma warning disable CS1591 + Enabled, + #pragma warning restore CS1591 + [EnumMember(Value = "disabled")] + #pragma warning disable CS1591 + Disabled, + #pragma warning restore CS1591 + [EnumMember(Value = "not_set")] + #pragma warning disable CS1591 + Not_set, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Enterprises/Item/CodeSecurity/Configurations/Item/WithConfiguration_PatchRequestBody_code_scanning_delegated_alert_dismissal.cs b/src/Ayllu.Github.Client/Github/Client/Enterprises/Item/CodeSecurity/Configurations/Item/WithConfiguration_PatchRequestBody_code_scanning_delegated_alert_dismissal.cs new file mode 100644 index 0000000..e2ee3f1 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Enterprises/Item/CodeSecurity/Configurations/Item/WithConfiguration_PatchRequestBody_code_scanning_delegated_alert_dismissal.cs @@ -0,0 +1,23 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Enterprises.Item.CodeSecurity.Configurations.Item +{ + /// The enablement status of code scanning delegated alert dismissal + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public enum WithConfiguration_PatchRequestBody_code_scanning_delegated_alert_dismissal + { + [EnumMember(Value = "enabled")] + #pragma warning disable CS1591 + Enabled, + #pragma warning restore CS1591 + [EnumMember(Value = "disabled")] + #pragma warning disable CS1591 + Disabled, + #pragma warning restore CS1591 + [EnumMember(Value = "not_set")] + #pragma warning disable CS1591 + Not_set, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Enterprises/Item/CodeSecurity/Configurations/Item/WithConfiguration_PatchRequestBody_code_security.cs b/src/Ayllu.Github.Client/Github/Client/Enterprises/Item/CodeSecurity/Configurations/Item/WithConfiguration_PatchRequestBody_code_security.cs new file mode 100644 index 0000000..5f11585 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Enterprises/Item/CodeSecurity/Configurations/Item/WithConfiguration_PatchRequestBody_code_security.cs @@ -0,0 +1,23 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Enterprises.Item.CodeSecurity.Configurations.Item +{ + /// The enablement status of GitHub Code Security features. + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public enum WithConfiguration_PatchRequestBody_code_security + { + [EnumMember(Value = "enabled")] + #pragma warning disable CS1591 + Enabled, + #pragma warning restore CS1591 + [EnumMember(Value = "disabled")] + #pragma warning disable CS1591 + Disabled, + #pragma warning restore CS1591 + [EnumMember(Value = "not_set")] + #pragma warning disable CS1591 + Not_set, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Enterprises/Item/CodeSecurity/Configurations/Item/WithConfiguration_PatchRequestBody_dependabot_alerts.cs b/src/Ayllu.Github.Client/Github/Client/Enterprises/Item/CodeSecurity/Configurations/Item/WithConfiguration_PatchRequestBody_dependabot_alerts.cs new file mode 100644 index 0000000..ced0569 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Enterprises/Item/CodeSecurity/Configurations/Item/WithConfiguration_PatchRequestBody_dependabot_alerts.cs @@ -0,0 +1,23 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Enterprises.Item.CodeSecurity.Configurations.Item +{ + /// The enablement status of Dependabot alerts + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public enum WithConfiguration_PatchRequestBody_dependabot_alerts + { + [EnumMember(Value = "enabled")] + #pragma warning disable CS1591 + Enabled, + #pragma warning restore CS1591 + [EnumMember(Value = "disabled")] + #pragma warning disable CS1591 + Disabled, + #pragma warning restore CS1591 + [EnumMember(Value = "not_set")] + #pragma warning disable CS1591 + Not_set, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Enterprises/Item/CodeSecurity/Configurations/Item/WithConfiguration_PatchRequestBody_dependabot_security_updates.cs b/src/Ayllu.Github.Client/Github/Client/Enterprises/Item/CodeSecurity/Configurations/Item/WithConfiguration_PatchRequestBody_dependabot_security_updates.cs new file mode 100644 index 0000000..d08f2e4 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Enterprises/Item/CodeSecurity/Configurations/Item/WithConfiguration_PatchRequestBody_dependabot_security_updates.cs @@ -0,0 +1,23 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Enterprises.Item.CodeSecurity.Configurations.Item +{ + /// The enablement status of Dependabot security updates + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public enum WithConfiguration_PatchRequestBody_dependabot_security_updates + { + [EnumMember(Value = "enabled")] + #pragma warning disable CS1591 + Enabled, + #pragma warning restore CS1591 + [EnumMember(Value = "disabled")] + #pragma warning disable CS1591 + Disabled, + #pragma warning restore CS1591 + [EnumMember(Value = "not_set")] + #pragma warning disable CS1591 + Not_set, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Enterprises/Item/CodeSecurity/Configurations/Item/WithConfiguration_PatchRequestBody_dependency_graph.cs b/src/Ayllu.Github.Client/Github/Client/Enterprises/Item/CodeSecurity/Configurations/Item/WithConfiguration_PatchRequestBody_dependency_graph.cs new file mode 100644 index 0000000..adbf981 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Enterprises/Item/CodeSecurity/Configurations/Item/WithConfiguration_PatchRequestBody_dependency_graph.cs @@ -0,0 +1,23 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Enterprises.Item.CodeSecurity.Configurations.Item +{ + /// The enablement status of Dependency Graph + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public enum WithConfiguration_PatchRequestBody_dependency_graph + { + [EnumMember(Value = "enabled")] + #pragma warning disable CS1591 + Enabled, + #pragma warning restore CS1591 + [EnumMember(Value = "disabled")] + #pragma warning disable CS1591 + Disabled, + #pragma warning restore CS1591 + [EnumMember(Value = "not_set")] + #pragma warning disable CS1591 + Not_set, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Enterprises/Item/CodeSecurity/Configurations/Item/WithConfiguration_PatchRequestBody_dependency_graph_autosubmit_action.cs b/src/Ayllu.Github.Client/Github/Client/Enterprises/Item/CodeSecurity/Configurations/Item/WithConfiguration_PatchRequestBody_dependency_graph_autosubmit_action.cs new file mode 100644 index 0000000..5945ba8 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Enterprises/Item/CodeSecurity/Configurations/Item/WithConfiguration_PatchRequestBody_dependency_graph_autosubmit_action.cs @@ -0,0 +1,23 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Enterprises.Item.CodeSecurity.Configurations.Item +{ + /// The enablement status of Automatic dependency submission + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public enum WithConfiguration_PatchRequestBody_dependency_graph_autosubmit_action + { + [EnumMember(Value = "enabled")] + #pragma warning disable CS1591 + Enabled, + #pragma warning restore CS1591 + [EnumMember(Value = "disabled")] + #pragma warning disable CS1591 + Disabled, + #pragma warning restore CS1591 + [EnumMember(Value = "not_set")] + #pragma warning disable CS1591 + Not_set, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Enterprises/Item/CodeSecurity/Configurations/Item/WithConfiguration_PatchRequestBody_dependency_graph_autosubmit_action_options.cs b/src/Ayllu.Github.Client/Github/Client/Enterprises/Item/CodeSecurity/Configurations/Item/WithConfiguration_PatchRequestBody_dependency_graph_autosubmit_action_options.cs new file mode 100644 index 0000000..271c9e6 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Enterprises/Item/CodeSecurity/Configurations/Item/WithConfiguration_PatchRequestBody_dependency_graph_autosubmit_action_options.cs @@ -0,0 +1,60 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Enterprises.Item.CodeSecurity.Configurations.Item +{ + /// + /// Feature options for Automatic dependency submission + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithConfiguration_PatchRequestBody_dependency_graph_autosubmit_action_options : IAdditionalDataHolder, IParsable + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// Whether to use runners labeled with 'dependency-submission' or standard GitHub runners. + public bool? LabeledRunners { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public WithConfiguration_PatchRequestBody_dependency_graph_autosubmit_action_options() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Enterprises.Item.CodeSecurity.Configurations.Item.WithConfiguration_PatchRequestBody_dependency_graph_autosubmit_action_options CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Enterprises.Item.CodeSecurity.Configurations.Item.WithConfiguration_PatchRequestBody_dependency_graph_autosubmit_action_options(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "labeled_runners", n => { LabeledRunners = n.GetBoolValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteBoolValue("labeled_runners", LabeledRunners); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Enterprises/Item/CodeSecurity/Configurations/Item/WithConfiguration_PatchRequestBody_enforcement.cs b/src/Ayllu.Github.Client/Github/Client/Enterprises/Item/CodeSecurity/Configurations/Item/WithConfiguration_PatchRequestBody_enforcement.cs new file mode 100644 index 0000000..a302fe9 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Enterprises/Item/CodeSecurity/Configurations/Item/WithConfiguration_PatchRequestBody_enforcement.cs @@ -0,0 +1,19 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Enterprises.Item.CodeSecurity.Configurations.Item +{ + /// The enforcement status for a security configuration + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public enum WithConfiguration_PatchRequestBody_enforcement + { + [EnumMember(Value = "enforced")] + #pragma warning disable CS1591 + Enforced, + #pragma warning restore CS1591 + [EnumMember(Value = "unenforced")] + #pragma warning disable CS1591 + Unenforced, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Enterprises/Item/CodeSecurity/Configurations/Item/WithConfiguration_PatchRequestBody_private_vulnerability_reporting.cs b/src/Ayllu.Github.Client/Github/Client/Enterprises/Item/CodeSecurity/Configurations/Item/WithConfiguration_PatchRequestBody_private_vulnerability_reporting.cs new file mode 100644 index 0000000..f3f1340 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Enterprises/Item/CodeSecurity/Configurations/Item/WithConfiguration_PatchRequestBody_private_vulnerability_reporting.cs @@ -0,0 +1,23 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Enterprises.Item.CodeSecurity.Configurations.Item +{ + /// The enablement status of private vulnerability reporting + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public enum WithConfiguration_PatchRequestBody_private_vulnerability_reporting + { + [EnumMember(Value = "enabled")] + #pragma warning disable CS1591 + Enabled, + #pragma warning restore CS1591 + [EnumMember(Value = "disabled")] + #pragma warning disable CS1591 + Disabled, + #pragma warning restore CS1591 + [EnumMember(Value = "not_set")] + #pragma warning disable CS1591 + Not_set, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Enterprises/Item/CodeSecurity/Configurations/Item/WithConfiguration_PatchRequestBody_secret_protection.cs b/src/Ayllu.Github.Client/Github/Client/Enterprises/Item/CodeSecurity/Configurations/Item/WithConfiguration_PatchRequestBody_secret_protection.cs new file mode 100644 index 0000000..d0a48bb --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Enterprises/Item/CodeSecurity/Configurations/Item/WithConfiguration_PatchRequestBody_secret_protection.cs @@ -0,0 +1,23 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Enterprises.Item.CodeSecurity.Configurations.Item +{ + /// The enablement status of GitHub Secret Protection features. + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public enum WithConfiguration_PatchRequestBody_secret_protection + { + [EnumMember(Value = "enabled")] + #pragma warning disable CS1591 + Enabled, + #pragma warning restore CS1591 + [EnumMember(Value = "disabled")] + #pragma warning disable CS1591 + Disabled, + #pragma warning restore CS1591 + [EnumMember(Value = "not_set")] + #pragma warning disable CS1591 + Not_set, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Enterprises/Item/CodeSecurity/Configurations/Item/WithConfiguration_PatchRequestBody_secret_scanning.cs b/src/Ayllu.Github.Client/Github/Client/Enterprises/Item/CodeSecurity/Configurations/Item/WithConfiguration_PatchRequestBody_secret_scanning.cs new file mode 100644 index 0000000..bb50f61 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Enterprises/Item/CodeSecurity/Configurations/Item/WithConfiguration_PatchRequestBody_secret_scanning.cs @@ -0,0 +1,23 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Enterprises.Item.CodeSecurity.Configurations.Item +{ + /// The enablement status of secret scanning + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public enum WithConfiguration_PatchRequestBody_secret_scanning + { + [EnumMember(Value = "enabled")] + #pragma warning disable CS1591 + Enabled, + #pragma warning restore CS1591 + [EnumMember(Value = "disabled")] + #pragma warning disable CS1591 + Disabled, + #pragma warning restore CS1591 + [EnumMember(Value = "not_set")] + #pragma warning disable CS1591 + Not_set, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Enterprises/Item/CodeSecurity/Configurations/Item/WithConfiguration_PatchRequestBody_secret_scanning_delegated_alert_dismissal.cs b/src/Ayllu.Github.Client/Github/Client/Enterprises/Item/CodeSecurity/Configurations/Item/WithConfiguration_PatchRequestBody_secret_scanning_delegated_alert_dismissal.cs new file mode 100644 index 0000000..a968946 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Enterprises/Item/CodeSecurity/Configurations/Item/WithConfiguration_PatchRequestBody_secret_scanning_delegated_alert_dismissal.cs @@ -0,0 +1,23 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Enterprises.Item.CodeSecurity.Configurations.Item +{ + /// The enablement status of secret scanning delegated alert dismissal + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public enum WithConfiguration_PatchRequestBody_secret_scanning_delegated_alert_dismissal + { + [EnumMember(Value = "enabled")] + #pragma warning disable CS1591 + Enabled, + #pragma warning restore CS1591 + [EnumMember(Value = "disabled")] + #pragma warning disable CS1591 + Disabled, + #pragma warning restore CS1591 + [EnumMember(Value = "not_set")] + #pragma warning disable CS1591 + Not_set, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Enterprises/Item/CodeSecurity/Configurations/Item/WithConfiguration_PatchRequestBody_secret_scanning_generic_secrets.cs b/src/Ayllu.Github.Client/Github/Client/Enterprises/Item/CodeSecurity/Configurations/Item/WithConfiguration_PatchRequestBody_secret_scanning_generic_secrets.cs new file mode 100644 index 0000000..cbd0571 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Enterprises/Item/CodeSecurity/Configurations/Item/WithConfiguration_PatchRequestBody_secret_scanning_generic_secrets.cs @@ -0,0 +1,23 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Enterprises.Item.CodeSecurity.Configurations.Item +{ + /// The enablement status of Copilot secret scanning + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public enum WithConfiguration_PatchRequestBody_secret_scanning_generic_secrets + { + [EnumMember(Value = "enabled")] + #pragma warning disable CS1591 + Enabled, + #pragma warning restore CS1591 + [EnumMember(Value = "disabled")] + #pragma warning disable CS1591 + Disabled, + #pragma warning restore CS1591 + [EnumMember(Value = "not_set")] + #pragma warning disable CS1591 + Not_set, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Enterprises/Item/CodeSecurity/Configurations/Item/WithConfiguration_PatchRequestBody_secret_scanning_non_provider_patterns.cs b/src/Ayllu.Github.Client/Github/Client/Enterprises/Item/CodeSecurity/Configurations/Item/WithConfiguration_PatchRequestBody_secret_scanning_non_provider_patterns.cs new file mode 100644 index 0000000..66d147b --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Enterprises/Item/CodeSecurity/Configurations/Item/WithConfiguration_PatchRequestBody_secret_scanning_non_provider_patterns.cs @@ -0,0 +1,23 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Enterprises.Item.CodeSecurity.Configurations.Item +{ + /// The enablement status of secret scanning non-provider patterns + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public enum WithConfiguration_PatchRequestBody_secret_scanning_non_provider_patterns + { + [EnumMember(Value = "enabled")] + #pragma warning disable CS1591 + Enabled, + #pragma warning restore CS1591 + [EnumMember(Value = "disabled")] + #pragma warning disable CS1591 + Disabled, + #pragma warning restore CS1591 + [EnumMember(Value = "not_set")] + #pragma warning disable CS1591 + Not_set, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Enterprises/Item/CodeSecurity/Configurations/Item/WithConfiguration_PatchRequestBody_secret_scanning_push_protection.cs b/src/Ayllu.Github.Client/Github/Client/Enterprises/Item/CodeSecurity/Configurations/Item/WithConfiguration_PatchRequestBody_secret_scanning_push_protection.cs new file mode 100644 index 0000000..deca745 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Enterprises/Item/CodeSecurity/Configurations/Item/WithConfiguration_PatchRequestBody_secret_scanning_push_protection.cs @@ -0,0 +1,23 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Enterprises.Item.CodeSecurity.Configurations.Item +{ + /// The enablement status of secret scanning push protection + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public enum WithConfiguration_PatchRequestBody_secret_scanning_push_protection + { + [EnumMember(Value = "enabled")] + #pragma warning disable CS1591 + Enabled, + #pragma warning restore CS1591 + [EnumMember(Value = "disabled")] + #pragma warning disable CS1591 + Disabled, + #pragma warning restore CS1591 + [EnumMember(Value = "not_set")] + #pragma warning disable CS1591 + Not_set, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Enterprises/Item/CodeSecurity/Configurations/Item/WithConfiguration_PatchRequestBody_secret_scanning_validity_checks.cs b/src/Ayllu.Github.Client/Github/Client/Enterprises/Item/CodeSecurity/Configurations/Item/WithConfiguration_PatchRequestBody_secret_scanning_validity_checks.cs new file mode 100644 index 0000000..042b6f1 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Enterprises/Item/CodeSecurity/Configurations/Item/WithConfiguration_PatchRequestBody_secret_scanning_validity_checks.cs @@ -0,0 +1,23 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Enterprises.Item.CodeSecurity.Configurations.Item +{ + /// The enablement status of secret scanning validity checks + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public enum WithConfiguration_PatchRequestBody_secret_scanning_validity_checks + { + [EnumMember(Value = "enabled")] + #pragma warning disable CS1591 + Enabled, + #pragma warning restore CS1591 + [EnumMember(Value = "disabled")] + #pragma warning disable CS1591 + Disabled, + #pragma warning restore CS1591 + [EnumMember(Value = "not_set")] + #pragma warning disable CS1591 + Not_set, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Enterprises/Item/Dependabot/Alerts/AlertsRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Enterprises/Item/Dependabot/Alerts/AlertsRequestBuilder.cs new file mode 100644 index 0000000..5cb5b3e --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Enterprises/Item/Dependabot/Alerts/AlertsRequestBuilder.cs @@ -0,0 +1,241 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Enterprises.Item.Dependabot.Alerts +{ + /// + /// Builds and executes requests for operations under \enterprises\{enterprise}\dependabot\alerts + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class AlertsRequestBuilder : BaseRequestBuilder + { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public AlertsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/enterprises/{enterprise}/dependabot/alerts{?after*,before*,direction*,ecosystem*,epss_percentage*,first*,has*,last*,package*,per_page*,scope*,severity*,sort*,state*}", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public AlertsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/enterprises/{enterprise}/dependabot/alerts{?after*,before*,direction*,ecosystem*,epss_percentage*,first*,has*,last*,package*,per_page*,scope*,severity*,sort*,state*}", rawUrl) + { + } + /// + /// 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/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. + /// API method documentation + /// + /// A List<global::Ayllu.Github.Client.Models.DependabotAlertWithRepository> + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 403 status code + /// When receiving a 404 status code + /// When receiving a 422 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task?> GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task> GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "403", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "404", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "422", global::Ayllu.Github.Client.Models.ValidationErrorSimple.CreateFromDiscriminatorValue }, + }; + var collectionResult = await RequestAdapter.SendCollectionAsync(requestInfo, global::Ayllu.Github.Client.Models.DependabotAlertWithRepository.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + return collectionResult?.AsList(); + } + /// + /// 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/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. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.Enterprises.Item.Dependabot.Alerts.AlertsRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Enterprises.Item.Dependabot.Alerts.AlertsRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// 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/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. + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class AlertsRequestBuilderGetQueryParameters + { + /// A cursor, as given in the [Link header](https://docs.github.com/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/rest/using-the-rest-api/using-pagination-in-the-rest-api)." +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("after")] + public string? After { get; set; } +#nullable restore +#else + [QueryParameter("after")] + public string After { get; set; } +#endif + /// A cursor, as given in the [Link header](https://docs.github.com/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/rest/using-the-rest-api/using-pagination-in-the-rest-api)." +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("before")] + public string? Before { get; set; } +#nullable restore +#else + [QueryParameter("before")] + public string Before { get; set; } +#endif + /// The direction to sort the results by. + [Obsolete("This property is deprecated, use DirectionAsGetDirectionQueryParameterType instead")] +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("direction")] + public string? Direction { get; set; } +#nullable restore +#else + [QueryParameter("direction")] + public string Direction { get; set; } +#endif + /// The direction to sort the results by. + [QueryParameter("direction")] + public global::Ayllu.Github.Client.Enterprises.Item.Dependabot.Alerts.GetDirectionQueryParameterType? DirectionAsGetDirectionQueryParameterType { get; set; } + /// 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` +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("ecosystem")] + public string? Ecosystem { get; set; } +#nullable restore +#else + [QueryParameter("ecosystem")] + public string Ecosystem { get; set; } +#endif + /// CVE Exploit Prediction Scoring System (EPSS) percentage. Can be specified as:- An exact number (`n`)- Comparators such as `>n`, `<n`, `>=n`, `<=n`- A range like `n..n`, where `n` is a number from 0.0 to 1.0Filters the list of alerts based on EPSS percentages. If specified, only alerts with the provided EPSS percentages will be returned. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("epss_percentage")] + public string? EpssPercentage { get; set; } +#nullable restore +#else + [QueryParameter("epss_percentage")] + public string EpssPercentage { get; set; } +#endif + /// **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. + [QueryParameter("first")] + public int? First { get; set; } + /// Filters the list of alerts based on whether the alert has the given value. If specified, only alerts meeting this criterion will be returned.Multiple `has` filters can be passed to filter for alerts that have all of the values. Currently, only `patch` is supported. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("has")] + public string? Has { get; set; } +#nullable restore +#else + [QueryParameter("has")] + public string Has { get; set; } +#endif + /// **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. + [QueryParameter("last")] + public int? Last { get; set; } + /// A comma-separated list of package names. If specified, only alerts for these packages will be returned. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("package")] + public string? Package { get; set; } +#nullable restore +#else + [QueryParameter("package")] + public string Package { get; set; } +#endif + /// The number of results per page (max 100). For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." + [QueryParameter("per_page")] + public int? PerPage { get; set; } + /// The scope of the vulnerable dependency. If specified, only alerts with this scope will be returned. + [Obsolete("This property is deprecated, use ScopeAsGetScopeQueryParameterType instead")] +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("scope")] + public string? Scope { get; set; } +#nullable restore +#else + [QueryParameter("scope")] + public string Scope { get; set; } +#endif + /// The scope of the vulnerable dependency. If specified, only alerts with this scope will be returned. + [QueryParameter("scope")] + public global::Ayllu.Github.Client.Enterprises.Item.Dependabot.Alerts.GetScopeQueryParameterType? ScopeAsGetScopeQueryParameterType { get; set; } + /// A comma-separated list of severities. If specified, only alerts with these severities will be returned.Can be: `low`, `medium`, `high`, `critical` +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("severity")] + public string? Severity { get; set; } +#nullable restore +#else + [QueryParameter("severity")] + public string Severity { get; set; } +#endif + /// The property by which to sort the results.`created` means when the alert was created.`updated` means when the alert's state last changed.`epss_percentage` sorts alerts by the Exploit Prediction Scoring System (EPSS) percentage. + [Obsolete("This property is deprecated, use SortAsGetSortQueryParameterType instead")] +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("sort")] + public string? Sort { get; set; } +#nullable restore +#else + [QueryParameter("sort")] + public string Sort { get; set; } +#endif + /// The property by which to sort the results.`created` means when the alert was created.`updated` means when the alert's state last changed.`epss_percentage` sorts alerts by the Exploit Prediction Scoring System (EPSS) percentage. + [QueryParameter("sort")] + public global::Ayllu.Github.Client.Enterprises.Item.Dependabot.Alerts.GetSortQueryParameterType? SortAsGetSortQueryParameterType { get; set; } + /// A comma-separated list of states. If specified, only alerts with these states will be returned.Can be: `auto_dismissed`, `dismissed`, `fixed`, `open` +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("state")] + public string? State { get; set; } +#nullable restore +#else + [QueryParameter("state")] + public string State { get; set; } +#endif + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class AlertsRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Enterprises/Item/Dependabot/Alerts/GetDirectionQueryParameterType.cs b/src/Ayllu.Github.Client/Github/Client/Enterprises/Item/Dependabot/Alerts/GetDirectionQueryParameterType.cs new file mode 100644 index 0000000..e9ff866 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Enterprises/Item/Dependabot/Alerts/GetDirectionQueryParameterType.cs @@ -0,0 +1,20 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Enterprises.Item.Dependabot.Alerts +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public enum GetDirectionQueryParameterType + #pragma warning restore CS1591 + { + [EnumMember(Value = "asc")] + #pragma warning disable CS1591 + Asc, + #pragma warning restore CS1591 + [EnumMember(Value = "desc")] + #pragma warning disable CS1591 + Desc, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Enterprises/Item/Dependabot/Alerts/GetScopeQueryParameterType.cs b/src/Ayllu.Github.Client/Github/Client/Enterprises/Item/Dependabot/Alerts/GetScopeQueryParameterType.cs new file mode 100644 index 0000000..30aa7b4 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Enterprises/Item/Dependabot/Alerts/GetScopeQueryParameterType.cs @@ -0,0 +1,20 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Enterprises.Item.Dependabot.Alerts +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public enum GetScopeQueryParameterType + #pragma warning restore CS1591 + { + [EnumMember(Value = "development")] + #pragma warning disable CS1591 + Development, + #pragma warning restore CS1591 + [EnumMember(Value = "runtime")] + #pragma warning disable CS1591 + Runtime, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Enterprises/Item/Dependabot/Alerts/GetSortQueryParameterType.cs b/src/Ayllu.Github.Client/Github/Client/Enterprises/Item/Dependabot/Alerts/GetSortQueryParameterType.cs new file mode 100644 index 0000000..d1cf5a3 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Enterprises/Item/Dependabot/Alerts/GetSortQueryParameterType.cs @@ -0,0 +1,24 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Enterprises.Item.Dependabot.Alerts +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public enum GetSortQueryParameterType + #pragma warning restore CS1591 + { + [EnumMember(Value = "created")] + #pragma warning disable CS1591 + Created, + #pragma warning restore CS1591 + [EnumMember(Value = "updated")] + #pragma warning disable CS1591 + Updated, + #pragma warning restore CS1591 + [EnumMember(Value = "epss_percentage")] + #pragma warning disable CS1591 + Epss_percentage, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Enterprises/Item/Dependabot/DependabotRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Enterprises/Item/Dependabot/DependabotRequestBuilder.cs new file mode 100644 index 0000000..a54e9eb --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Enterprises/Item/Dependabot/DependabotRequestBuilder.cs @@ -0,0 +1,41 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Enterprises.Item.Dependabot.Alerts; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System; +namespace Ayllu.Github.Client.Enterprises.Item.Dependabot +{ + /// + /// Builds and executes requests for operations under \enterprises\{enterprise}\dependabot + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class DependabotRequestBuilder : BaseRequestBuilder + { + /// The alerts property + public global::Ayllu.Github.Client.Enterprises.Item.Dependabot.Alerts.AlertsRequestBuilder Alerts + { + get => new global::Ayllu.Github.Client.Enterprises.Item.Dependabot.Alerts.AlertsRequestBuilder(PathParameters, RequestAdapter); + } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public DependabotRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/enterprises/{enterprise}/dependabot", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public DependabotRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/enterprises/{enterprise}/dependabot", rawUrl) + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Enterprises/Item/SecretScanning/Alerts/AlertsRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Enterprises/Item/SecretScanning/Alerts/AlertsRequestBuilder.cs new file mode 100644 index 0000000..48f8fad --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Enterprises/Item/SecretScanning/Alerts/AlertsRequestBuilder.cs @@ -0,0 +1,212 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Enterprises.Item.SecretScanning.Alerts +{ + /// + /// Builds and executes requests for operations under \enterprises\{enterprise}\secret-scanning\alerts + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class AlertsRequestBuilder : BaseRequestBuilder + { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public AlertsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/enterprises/{enterprise}/secret-scanning/alerts{?after*,before*,direction*,hide_secret*,is_multi_repo*,is_publicly_leaked*,per_page*,resolution*,secret_type*,sort*,state*,validity*}", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public AlertsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/enterprises/{enterprise}/secret-scanning/alerts{?after*,before*,direction*,hide_secret*,is_multi_repo*,is_publicly_leaked*,per_page*,resolution*,secret_type*,sort*,state*,validity*}", rawUrl) + { + } + /// + /// Lists secret scanning alerts for eligible repositories in an enterprise, from newest to oldest.Alerts are only returned for organizations in the enterprise for which the authenticated user is an organization owner or a [security manager](https://docs.github.com/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 in order to use this endpoint.OAuth app tokens and personal access tokens (classic) need the `repo` scope or `security_events` scope to use this endpoint. + /// API method documentation + /// + /// A List<global::Ayllu.Github.Client.Models.OrganizationSecretScanningAlert> + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 404 status code + /// When receiving a 503 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task?> GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task> GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "404", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "503", global::Ayllu.Github.Client.Models.Alerts503Error.CreateFromDiscriminatorValue }, + }; + var collectionResult = await RequestAdapter.SendCollectionAsync(requestInfo, global::Ayllu.Github.Client.Models.OrganizationSecretScanningAlert.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + return collectionResult?.AsList(); + } + /// + /// Lists secret scanning alerts for eligible repositories in an enterprise, from newest to oldest.Alerts are only returned for organizations in the enterprise for which the authenticated user is an organization owner or a [security manager](https://docs.github.com/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 in order to use this endpoint.OAuth app tokens and personal access tokens (classic) need the `repo` scope or `security_events` scope to use this endpoint. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.Enterprises.Item.SecretScanning.Alerts.AlertsRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Enterprises.Item.SecretScanning.Alerts.AlertsRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Lists secret scanning alerts for eligible repositories in an enterprise, from newest to oldest.Alerts are only returned for organizations in the enterprise for which the authenticated user is an organization owner or a [security manager](https://docs.github.com/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 in order to use this endpoint.OAuth app tokens and personal access tokens (classic) need the `repo` scope or `security_events` scope to use this endpoint. + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class AlertsRequestBuilderGetQueryParameters + { + /// A cursor, as given in the [Link header](https://docs.github.com/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/rest/using-the-rest-api/using-pagination-in-the-rest-api)." +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("after")] + public string? After { get; set; } +#nullable restore +#else + [QueryParameter("after")] + public string After { get; set; } +#endif + /// A cursor, as given in the [Link header](https://docs.github.com/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/rest/using-the-rest-api/using-pagination-in-the-rest-api)." +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("before")] + public string? Before { get; set; } +#nullable restore +#else + [QueryParameter("before")] + public string Before { get; set; } +#endif + /// The direction to sort the results by. + [Obsolete("This property is deprecated, use DirectionAsGetDirectionQueryParameterType instead")] +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("direction")] + public string? Direction { get; set; } +#nullable restore +#else + [QueryParameter("direction")] + public string Direction { get; set; } +#endif + /// The direction to sort the results by. + [QueryParameter("direction")] + public global::Ayllu.Github.Client.Enterprises.Item.SecretScanning.Alerts.GetDirectionQueryParameterType? DirectionAsGetDirectionQueryParameterType { get; set; } + /// A boolean value representing whether or not to hide literal secrets in the results. + [QueryParameter("hide_secret")] + public bool? HideSecret { get; set; } + /// A boolean value representing whether or not to filter alerts by the multi-repo tag being present. + [QueryParameter("is_multi_repo")] + public bool? IsMultiRepo { get; set; } + /// A boolean value representing whether or not to filter alerts by the publicly-leaked tag being present. + [QueryParameter("is_publicly_leaked")] + public bool? IsPubliclyLeaked { get; set; } + /// The number of results per page (max 100). For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." + [QueryParameter("per_page")] + public int? PerPage { get; set; } + /// 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`. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("resolution")] + public string? Resolution { get; set; } +#nullable restore +#else + [QueryParameter("resolution")] + public string Resolution { get; set; } +#endif + /// A comma-separated list of secret types to return. All default secret patterns are returned. To return generic patterns, pass the token name(s) in the parameter. See "[Supported secret scanning patterns](https://docs.github.com/code-security/secret-scanning/introduction/supported-secret-scanning-patterns#supported-secrets)" for a complete list of secret types. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("secret_type")] + public string? SecretType { get; set; } +#nullable restore +#else + [QueryParameter("secret_type")] + public string SecretType { get; set; } +#endif + /// The property to sort the results by. `created` means when the alert was created. `updated` means when the alert was updated or resolved. + [Obsolete("This property is deprecated, use SortAsGetSortQueryParameterType instead")] +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("sort")] + public string? Sort { get; set; } +#nullable restore +#else + [QueryParameter("sort")] + public string Sort { get; set; } +#endif + /// The property to sort the results by. `created` means when the alert was created. `updated` means when the alert was updated or resolved. + [QueryParameter("sort")] + public global::Ayllu.Github.Client.Enterprises.Item.SecretScanning.Alerts.GetSortQueryParameterType? SortAsGetSortQueryParameterType { get; set; } + /// Set to `open` or `resolved` to only list secret scanning alerts in a specific state. + [Obsolete("This property is deprecated, use StateAsGetStateQueryParameterType instead")] +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("state")] + public string? State { get; set; } +#nullable restore +#else + [QueryParameter("state")] + public string State { get; set; } +#endif + /// Set to `open` or `resolved` to only list secret scanning alerts in a specific state. + [QueryParameter("state")] + public global::Ayllu.Github.Client.Enterprises.Item.SecretScanning.Alerts.GetStateQueryParameterType? StateAsGetStateQueryParameterType { get; set; } + /// 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`. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("validity")] + public string? Validity { get; set; } +#nullable restore +#else + [QueryParameter("validity")] + public string Validity { get; set; } +#endif + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class AlertsRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Enterprises/Item/SecretScanning/Alerts/GetDirectionQueryParameterType.cs b/src/Ayllu.Github.Client/Github/Client/Enterprises/Item/SecretScanning/Alerts/GetDirectionQueryParameterType.cs new file mode 100644 index 0000000..f1a2efc --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Enterprises/Item/SecretScanning/Alerts/GetDirectionQueryParameterType.cs @@ -0,0 +1,20 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Enterprises.Item.SecretScanning.Alerts +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public enum GetDirectionQueryParameterType + #pragma warning restore CS1591 + { + [EnumMember(Value = "asc")] + #pragma warning disable CS1591 + Asc, + #pragma warning restore CS1591 + [EnumMember(Value = "desc")] + #pragma warning disable CS1591 + Desc, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Enterprises/Item/SecretScanning/Alerts/GetSortQueryParameterType.cs b/src/Ayllu.Github.Client/Github/Client/Enterprises/Item/SecretScanning/Alerts/GetSortQueryParameterType.cs new file mode 100644 index 0000000..0980704 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Enterprises/Item/SecretScanning/Alerts/GetSortQueryParameterType.cs @@ -0,0 +1,20 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Enterprises.Item.SecretScanning.Alerts +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public enum GetSortQueryParameterType + #pragma warning restore CS1591 + { + [EnumMember(Value = "created")] + #pragma warning disable CS1591 + Created, + #pragma warning restore CS1591 + [EnumMember(Value = "updated")] + #pragma warning disable CS1591 + Updated, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Enterprises/Item/SecretScanning/Alerts/GetStateQueryParameterType.cs b/src/Ayllu.Github.Client/Github/Client/Enterprises/Item/SecretScanning/Alerts/GetStateQueryParameterType.cs new file mode 100644 index 0000000..66ebe29 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Enterprises/Item/SecretScanning/Alerts/GetStateQueryParameterType.cs @@ -0,0 +1,20 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Enterprises.Item.SecretScanning.Alerts +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public enum GetStateQueryParameterType + #pragma warning restore CS1591 + { + [EnumMember(Value = "open")] + #pragma warning disable CS1591 + Open, + #pragma warning restore CS1591 + [EnumMember(Value = "resolved")] + #pragma warning disable CS1591 + Resolved, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Enterprises/Item/SecretScanning/SecretScanningRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Enterprises/Item/SecretScanning/SecretScanningRequestBuilder.cs new file mode 100644 index 0000000..50c7b49 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Enterprises/Item/SecretScanning/SecretScanningRequestBuilder.cs @@ -0,0 +1,41 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Enterprises.Item.SecretScanning.Alerts; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System; +namespace Ayllu.Github.Client.Enterprises.Item.SecretScanning +{ + /// + /// Builds and executes requests for operations under \enterprises\{enterprise}\secret-scanning + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class SecretScanningRequestBuilder : BaseRequestBuilder + { + /// The alerts property + public global::Ayllu.Github.Client.Enterprises.Item.SecretScanning.Alerts.AlertsRequestBuilder Alerts + { + get => new global::Ayllu.Github.Client.Enterprises.Item.SecretScanning.Alerts.AlertsRequestBuilder(PathParameters, RequestAdapter); + } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public SecretScanningRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/enterprises/{enterprise}/secret-scanning", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public SecretScanningRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/enterprises/{enterprise}/secret-scanning", rawUrl) + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Enterprises/Item/WithEnterpriseItemRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Enterprises/Item/WithEnterpriseItemRequestBuilder.cs new file mode 100644 index 0000000..5fc1b92 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Enterprises/Item/WithEnterpriseItemRequestBuilder.cs @@ -0,0 +1,53 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Enterprises.Item.CodeSecurity; +using Ayllu.Github.Client.Enterprises.Item.Dependabot; +using Ayllu.Github.Client.Enterprises.Item.SecretScanning; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System; +namespace Ayllu.Github.Client.Enterprises.Item +{ + /// + /// Builds and executes requests for operations under \enterprises\{enterprise} + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithEnterpriseItemRequestBuilder : BaseRequestBuilder + { + /// The codeSecurity property + public global::Ayllu.Github.Client.Enterprises.Item.CodeSecurity.CodeSecurityRequestBuilder CodeSecurity + { + get => new global::Ayllu.Github.Client.Enterprises.Item.CodeSecurity.CodeSecurityRequestBuilder(PathParameters, RequestAdapter); + } + /// The dependabot property + public global::Ayllu.Github.Client.Enterprises.Item.Dependabot.DependabotRequestBuilder Dependabot + { + get => new global::Ayllu.Github.Client.Enterprises.Item.Dependabot.DependabotRequestBuilder(PathParameters, RequestAdapter); + } + /// The secretScanning property + public global::Ayllu.Github.Client.Enterprises.Item.SecretScanning.SecretScanningRequestBuilder SecretScanning + { + get => new global::Ayllu.Github.Client.Enterprises.Item.SecretScanning.SecretScanningRequestBuilder(PathParameters, RequestAdapter); + } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public WithEnterpriseItemRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/enterprises/{enterprise}", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public WithEnterpriseItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/enterprises/{enterprise}", rawUrl) + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Events/EventsRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Events/EventsRequestBuilder.cs new file mode 100644 index 0000000..41002d4 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Events/EventsRequestBuilder.cs @@ -0,0 +1,114 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Events +{ + /// + /// Builds and executes requests for operations under \events + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class EventsRequestBuilder : BaseRequestBuilder + { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public EventsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/events{?page*,per_page*}", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public EventsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/events{?page*,per_page*}", rawUrl) + { + } + /// + /// > [!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. + /// API method documentation + /// + /// A List<global::Ayllu.Github.Client.Models.Event> + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 403 status code + /// When receiving a 503 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task?> GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task> GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "403", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "503", global::Ayllu.Github.Client.Models.Events503Error.CreateFromDiscriminatorValue }, + }; + var collectionResult = await RequestAdapter.SendCollectionAsync(requestInfo, global::Ayllu.Github.Client.Models.Event.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + return collectionResult?.AsList(); + } + /// + /// > [!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. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.Events.EventsRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Events.EventsRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// > [!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. + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class EventsRequestBuilderGetQueryParameters + { + /// The page number of the results to fetch. For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." + [QueryParameter("page")] + public int? Page { get; set; } + /// The number of results per page (max 100). For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." + [QueryParameter("per_page")] + public int? PerPage { get; set; } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class EventsRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Feeds/FeedsRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Feeds/FeedsRequestBuilder.cs new file mode 100644 index 0000000..3a3cc43 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Feeds/FeedsRequestBuilder.cs @@ -0,0 +1,93 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Feeds +{ + /// + /// Builds and executes requests for operations under \feeds + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class FeedsRequestBuilder : BaseRequestBuilder + { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public FeedsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/feeds", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public FeedsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/feeds", rawUrl) + { + } + /// + /// Lists the feeds available to the authenticated user. The response provides a URL for each feed. You can then get a specific feed by sending a request to one of the feed URLs.* **Timeline**: The GitHub global public timeline* **User**: The public timeline for any user, using `uri_template`. For more information, see "[Hypermedia](https://docs.github.com/rest/using-the-rest-api/getting-started-with-the-rest-api#hypermedia)."* **Current user public**: The public timeline for the authenticated user* **Current user**: The private timeline for the authenticated user* **Current user actor**: The private timeline for activity created by the authenticated user* **Current user organizations**: The private timeline for the organizations the authenticated user is a member of.* **Security advisories**: A collection of public announcements that provide information about security-related vulnerabilities in software on GitHub.By default, timeline resources are returned in JSON. You can specify the `application/atom+xml` type in the `Accept` header to return timeline resources in Atom format. For more information, see "[Media types](https://docs.github.com/rest/using-the-rest-api/getting-started-with-the-rest-api#media-types)."> [!NOTE]> Private feeds are only returned when [authenticating via Basic Auth](https://docs.github.com/rest/authentication/authenticating-to-the-rest-api#using-basic-authentication) since current feed URIs use the older, non revocable auth tokens. + /// API method documentation + /// + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Models.Feed.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false); + } + /// + /// Lists the feeds available to the authenticated user. The response provides a URL for each feed. You can then get a specific feed by sending a request to one of the feed URLs.* **Timeline**: The GitHub global public timeline* **User**: The public timeline for any user, using `uri_template`. For more information, see "[Hypermedia](https://docs.github.com/rest/using-the-rest-api/getting-started-with-the-rest-api#hypermedia)."* **Current user public**: The public timeline for the authenticated user* **Current user**: The private timeline for the authenticated user* **Current user actor**: The private timeline for activity created by the authenticated user* **Current user organizations**: The private timeline for the organizations the authenticated user is a member of.* **Security advisories**: A collection of public announcements that provide information about security-related vulnerabilities in software on GitHub.By default, timeline resources are returned in JSON. You can specify the `application/atom+xml` type in the `Accept` header to return timeline resources in Atom format. For more information, see "[Media types](https://docs.github.com/rest/using-the-rest-api/getting-started-with-the-rest-api#media-types)."> [!NOTE]> Private feeds are only returned when [authenticating via Basic Auth](https://docs.github.com/rest/authentication/authenticating-to-the-rest-api#using-basic-authentication) since current feed URIs use the older, non revocable auth tokens. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.Feeds.FeedsRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Feeds.FeedsRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class FeedsRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Gists/GistsPostRequestBody.cs b/src/Ayllu.Github.Client/Github/Client/Gists/GistsPostRequestBody.cs new file mode 100644 index 0000000..0ac41d4 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Gists/GistsPostRequestBody.cs @@ -0,0 +1,146 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Gists +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class GistsPostRequestBody : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// Description of the gist +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Description { get; set; } +#nullable restore +#else + public string Description { get; set; } +#endif + /// Names and content for the files that make up the gist +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Gists.GistsPostRequestBody_files? Files { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Gists.GistsPostRequestBody_files Files { get; set; } +#endif + /// The public property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Gists.GistsPostRequestBody.GistsPostRequestBody_public? Public { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Gists.GistsPostRequestBody.GistsPostRequestBody_public Public { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public GistsPostRequestBody() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Gists.GistsPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Gists.GistsPostRequestBody(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "description", n => { Description = n.GetStringValue(); } }, + { "files", n => { Files = n.GetObjectValue(global::Ayllu.Github.Client.Gists.GistsPostRequestBody_files.CreateFromDiscriminatorValue); } }, + { "public", n => { Public = n.GetObjectValue(global::Ayllu.Github.Client.Gists.GistsPostRequestBody.GistsPostRequestBody_public.CreateFromDiscriminatorValue); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("description", Description); + writer.WriteObjectValue("files", Files); + writer.WriteObjectValue("public", Public); + writer.WriteAdditionalData(AdditionalData); + } + /// + /// Composed type wrapper for classes , + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class GistsPostRequestBody_public : IComposedTypeWrapper, IParsable + { + /// Composed type representation for type + public bool? Boolean { get; set; } + /// Composed type representation for type +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? String { get; set; } +#nullable restore +#else + public string String { get; set; } +#endif + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Gists.GistsPostRequestBody.GistsPostRequestBody_public CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + var mappingValue = parseNode.GetChildNode("")?.GetStringValue(); + var result = new global::Ayllu.Github.Client.Gists.GistsPostRequestBody.GistsPostRequestBody_public(); + if(parseNode.GetBoolValue() is bool booleanValue) + { + result.Boolean = booleanValue; + } + else if(parseNode.GetStringValue() is string stringValue) + { + result.String = stringValue; + } + return result; + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary>(); + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(Boolean != null) + { + writer.WriteBoolValue(null, Boolean); + } + else if(String != null) + { + writer.WriteStringValue(null, String); + } + } + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Gists/GistsPostRequestBody_files.cs b/src/Ayllu.Github.Client/Github/Client/Gists/GistsPostRequestBody_files.cs new file mode 100644 index 0000000..eb8270a --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Gists/GistsPostRequestBody_files.cs @@ -0,0 +1,56 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Gists +{ + /// + /// Names and content for the files that make up the gist + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class GistsPostRequestBody_files : IAdditionalDataHolder, IParsable + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public GistsPostRequestBody_files() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Gists.GistsPostRequestBody_files CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Gists.GistsPostRequestBody_files(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Gists/GistsRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Gists/GistsRequestBuilder.cs new file mode 100644 index 0000000..1b967d7 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Gists/GistsRequestBuilder.cs @@ -0,0 +1,200 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Gists.Item; +using Ayllu.Github.Client.Gists.Public; +using Ayllu.Github.Client.Gists.Starred; +using Ayllu.Github.Client.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Gists +{ + /// + /// Builds and executes requests for operations under \gists + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class GistsRequestBuilder : BaseRequestBuilder + { + /// The public property + public global::Ayllu.Github.Client.Gists.Public.PublicRequestBuilder Public + { + get => new global::Ayllu.Github.Client.Gists.Public.PublicRequestBuilder(PathParameters, RequestAdapter); + } + /// The starred property + public global::Ayllu.Github.Client.Gists.Starred.StarredRequestBuilder Starred + { + get => new global::Ayllu.Github.Client.Gists.Starred.StarredRequestBuilder(PathParameters, RequestAdapter); + } + /// Gets an item from the Ayllu.Github.Client.gists.item collection + /// The unique identifier of the gist. + /// A + public global::Ayllu.Github.Client.Gists.Item.WithGist_ItemRequestBuilder this[string position] + { + get + { + var urlTplParams = new Dictionary(PathParameters); + urlTplParams.Add("gist_id", position); + return new global::Ayllu.Github.Client.Gists.Item.WithGist_ItemRequestBuilder(urlTplParams, RequestAdapter); + } + } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public GistsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/gists{?page*,per_page*,since*}", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public GistsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/gists{?page*,per_page*,since*}", rawUrl) + { + } + /// + /// Lists the authenticated user's gists or if called anonymously, this endpoint returns all public gists: + /// API method documentation + /// + /// A List<global::Ayllu.Github.Client.Models.BaseGist> + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 403 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task?> GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task> GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "403", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + }; + var collectionResult = await RequestAdapter.SendCollectionAsync(requestInfo, global::Ayllu.Github.Client.Models.BaseGist.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + return collectionResult?.AsList(); + } + /// + /// 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. + /// API method documentation + /// + /// A + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 403 status code + /// When receiving a 404 status code + /// When receiving a 422 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PostAsync(global::Ayllu.Github.Client.Gists.GistsPostRequestBody body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task PostAsync(global::Ayllu.Github.Client.Gists.GistsPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPostRequestInformation(body, requestConfiguration); + var errorMapping = new Dictionary> + { + { "403", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "404", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "422", global::Ayllu.Github.Client.Models.ValidationError.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Models.GistSimple.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// Lists the authenticated user's gists or if called anonymously, this endpoint returns all public gists: + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// 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. + /// + /// A + /// The request body + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPostRequestInformation(global::Ayllu.Github.Client.Gists.GistsPostRequestBody body, Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToPostRequestInformation(global::Ayllu.Github.Client.Gists.GistsPostRequestBody body, Action> requestConfiguration = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.Gists.GistsRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Gists.GistsRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Lists the authenticated user's gists or if called anonymously, this endpoint returns all public gists: + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class GistsRequestBuilderGetQueryParameters + { + /// The page number of the results to fetch. For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." + [QueryParameter("page")] + public int? Page { get; set; } + /// The number of results per page (max 100). For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." + [QueryParameter("per_page")] + public int? PerPage { get; set; } + /// 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`. + [QueryParameter("since")] + public DateTimeOffset? Since { get; set; } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class GistsRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class GistsRequestBuilderPostRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Gists/Item/Comments/CommentsPostRequestBody.cs b/src/Ayllu.Github.Client/Github/Client/Gists/Item/Comments/CommentsPostRequestBody.cs new file mode 100644 index 0000000..90fdaaa --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Gists/Item/Comments/CommentsPostRequestBody.cs @@ -0,0 +1,65 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Gists.Item.Comments +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class CommentsPostRequestBody : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The comment text. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Body { get; set; } +#nullable restore +#else + public string Body { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public CommentsPostRequestBody() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Gists.Item.Comments.CommentsPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Gists.Item.Comments.CommentsPostRequestBody(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "body", n => { Body = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("body", Body); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Gists/Item/Comments/CommentsRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Gists/Item/Comments/CommentsRequestBuilder.cs new file mode 100644 index 0000000..f2d1897 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Gists/Item/Comments/CommentsRequestBuilder.cs @@ -0,0 +1,198 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Gists.Item.Comments.Item; +using Ayllu.Github.Client.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Gists.Item.Comments +{ + /// + /// Builds and executes requests for operations under \gists\{gist_id}\comments + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class CommentsRequestBuilder : BaseRequestBuilder + { + /// Gets an item from the Ayllu.Github.Client.gists.item.comments.item collection + /// The unique identifier of the comment. + /// A + public global::Ayllu.Github.Client.Gists.Item.Comments.Item.WithComment_ItemRequestBuilder this[long position] + { + get + { + var urlTplParams = new Dictionary(PathParameters); + urlTplParams.Add("comment_id", position); + return new global::Ayllu.Github.Client.Gists.Item.Comments.Item.WithComment_ItemRequestBuilder(urlTplParams, RequestAdapter); + } + } + /// Gets an item from the Ayllu.Github.Client.gists.item.comments.item collection + /// The unique identifier of the comment. + /// A + [Obsolete("This indexer is deprecated and will be removed in the next major version. Use the one with the typed parameter instead.")] + public global::Ayllu.Github.Client.Gists.Item.Comments.Item.WithComment_ItemRequestBuilder this[string position] + { + get + { + var urlTplParams = new Dictionary(PathParameters); + if (!string.IsNullOrWhiteSpace(position)) urlTplParams.Add("comment_id", position); + return new global::Ayllu.Github.Client.Gists.Item.Comments.Item.WithComment_ItemRequestBuilder(urlTplParams, RequestAdapter); + } + } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public CommentsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/gists/{gist_id}/comments{?page*,per_page*}", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public CommentsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/gists/{gist_id}/comments{?page*,per_page*}", rawUrl) + { + } + /// + /// Lists the comments on a gist.This endpoint supports the following custom media types. For more information, see "[Media types](https://docs.github.com/rest/using-the-rest-api/getting-started-with-the-rest-api#media-types)."- **`application/vnd.github.raw+json`**: Returns the raw markdown. 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. + /// API method documentation + /// + /// A List<global::Ayllu.Github.Client.Models.GistComment> + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 403 status code + /// When receiving a 404 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task?> GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task> GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "403", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "404", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + }; + var collectionResult = await RequestAdapter.SendCollectionAsync(requestInfo, global::Ayllu.Github.Client.Models.GistComment.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + return collectionResult?.AsList(); + } + /// + /// Creates a comment on a gist.This endpoint supports the following custom media types. For more information, see "[Media types](https://docs.github.com/rest/using-the-rest-api/getting-started-with-the-rest-api#media-types)."- **`application/vnd.github.raw+json`**: Returns the raw markdown. 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. + /// API method documentation + /// + /// A + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 403 status code + /// When receiving a 404 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PostAsync(global::Ayllu.Github.Client.Gists.Item.Comments.CommentsPostRequestBody body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task PostAsync(global::Ayllu.Github.Client.Gists.Item.Comments.CommentsPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPostRequestInformation(body, requestConfiguration); + var errorMapping = new Dictionary> + { + { "403", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "404", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Models.GistComment.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// Lists the comments on a gist.This endpoint supports the following custom media types. For more information, see "[Media types](https://docs.github.com/rest/using-the-rest-api/getting-started-with-the-rest-api#media-types)."- **`application/vnd.github.raw+json`**: Returns the raw markdown. 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. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Creates a comment on a gist.This endpoint supports the following custom media types. For more information, see "[Media types](https://docs.github.com/rest/using-the-rest-api/getting-started-with-the-rest-api#media-types)."- **`application/vnd.github.raw+json`**: Returns the raw markdown. 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. + /// + /// A + /// The request body + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPostRequestInformation(global::Ayllu.Github.Client.Gists.Item.Comments.CommentsPostRequestBody body, Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToPostRequestInformation(global::Ayllu.Github.Client.Gists.Item.Comments.CommentsPostRequestBody body, Action> requestConfiguration = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.Gists.Item.Comments.CommentsRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Gists.Item.Comments.CommentsRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Lists the comments on a gist.This endpoint supports the following custom media types. For more information, see "[Media types](https://docs.github.com/rest/using-the-rest-api/getting-started-with-the-rest-api#media-types)."- **`application/vnd.github.raw+json`**: Returns the raw markdown. 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. + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class CommentsRequestBuilderGetQueryParameters + { + /// The page number of the results to fetch. For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." + [QueryParameter("page")] + public int? Page { get; set; } + /// The number of results per page (max 100). For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." + [QueryParameter("per_page")] + public int? PerPage { get; set; } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class CommentsRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class CommentsRequestBuilderPostRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Gists/Item/Comments/Item/WithComment_ItemRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Gists/Item/Comments/Item/WithComment_ItemRequestBuilder.cs new file mode 100644 index 0000000..5b2a848 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Gists/Item/Comments/Item/WithComment_ItemRequestBuilder.cs @@ -0,0 +1,205 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Gists.Item.Comments.Item +{ + /// + /// Builds and executes requests for operations under \gists\{gist_id}\comments\{comment_id} + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithComment_ItemRequestBuilder : BaseRequestBuilder + { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public WithComment_ItemRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/gists/{gist_id}/comments/{comment_id}", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public WithComment_ItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/gists/{gist_id}/comments/{comment_id}", rawUrl) + { + } + /// + /// Delete a gist comment + /// API method documentation + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 403 status code + /// When receiving a 404 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task DeleteAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task DeleteAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToDeleteRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "403", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "404", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + }; + await RequestAdapter.SendNoContentAsync(requestInfo, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// Gets a comment on a gist.This endpoint supports the following custom media types. For more information, see "[Media types](https://docs.github.com/rest/using-the-rest-api/getting-started-with-the-rest-api#media-types)."- **`application/vnd.github.raw+json`**: Returns the raw markdown. 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. + /// API method documentation + /// + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 403 status code + /// When receiving a 404 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "403", global::Ayllu.Github.Client.Models.GistComment403Error.CreateFromDiscriminatorValue }, + { "404", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Models.GistComment.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// Updates a comment on a gist.This endpoint supports the following custom media types. For more information, see "[Media types](https://docs.github.com/rest/using-the-rest-api/getting-started-with-the-rest-api#media-types)."- **`application/vnd.github.raw+json`**: Returns the raw markdown. 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. + /// API method documentation + /// + /// A + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 404 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PatchAsync(global::Ayllu.Github.Client.Gists.Item.Comments.Item.WithComment_PatchRequestBody body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task PatchAsync(global::Ayllu.Github.Client.Gists.Item.Comments.Item.WithComment_PatchRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPatchRequestInformation(body, requestConfiguration); + var errorMapping = new Dictionary> + { + { "404", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Models.GistComment.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToDeleteRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToDeleteRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.DELETE, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Gets a comment on a gist.This endpoint supports the following custom media types. For more information, see "[Media types](https://docs.github.com/rest/using-the-rest-api/getting-started-with-the-rest-api#media-types)."- **`application/vnd.github.raw+json`**: Returns the raw markdown. 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. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Updates a comment on a gist.This endpoint supports the following custom media types. For more information, see "[Media types](https://docs.github.com/rest/using-the-rest-api/getting-started-with-the-rest-api#media-types)."- **`application/vnd.github.raw+json`**: Returns the raw markdown. 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. + /// + /// A + /// The request body + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPatchRequestInformation(global::Ayllu.Github.Client.Gists.Item.Comments.Item.WithComment_PatchRequestBody body, Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToPatchRequestInformation(global::Ayllu.Github.Client.Gists.Item.Comments.Item.WithComment_PatchRequestBody body, Action> requestConfiguration = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.Gists.Item.Comments.Item.WithComment_ItemRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Gists.Item.Comments.Item.WithComment_ItemRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithComment_ItemRequestBuilderDeleteRequestConfiguration : RequestConfiguration + { + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithComment_ItemRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithComment_ItemRequestBuilderPatchRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Gists/Item/Comments/Item/WithComment_PatchRequestBody.cs b/src/Ayllu.Github.Client/Github/Client/Gists/Item/Comments/Item/WithComment_PatchRequestBody.cs new file mode 100644 index 0000000..5ae3daa --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Gists/Item/Comments/Item/WithComment_PatchRequestBody.cs @@ -0,0 +1,65 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Gists.Item.Comments.Item +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class WithComment_PatchRequestBody : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The comment text. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Body { get; set; } +#nullable restore +#else + public string Body { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public WithComment_PatchRequestBody() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Gists.Item.Comments.Item.WithComment_PatchRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Gists.Item.Comments.Item.WithComment_PatchRequestBody(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "body", n => { Body = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("body", Body); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Gists/Item/Commits/CommitsRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Gists/Item/Commits/CommitsRequestBuilder.cs new file mode 100644 index 0000000..480df7b --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Gists/Item/Commits/CommitsRequestBuilder.cs @@ -0,0 +1,111 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Gists.Item.Commits +{ + /// + /// Builds and executes requests for operations under \gists\{gist_id}\commits + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class CommitsRequestBuilder : BaseRequestBuilder + { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public CommitsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/gists/{gist_id}/commits{?page*,per_page*}", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public CommitsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/gists/{gist_id}/commits{?page*,per_page*}", rawUrl) + { + } + /// + /// List gist commits + /// API method documentation + /// + /// A List<global::Ayllu.Github.Client.Models.GistCommit> + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 403 status code + /// When receiving a 404 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task?> GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task> GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "403", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "404", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + }; + var collectionResult = await RequestAdapter.SendCollectionAsync(requestInfo, global::Ayllu.Github.Client.Models.GistCommit.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + return collectionResult?.AsList(); + } + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.Gists.Item.Commits.CommitsRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Gists.Item.Commits.CommitsRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// List gist commits + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class CommitsRequestBuilderGetQueryParameters + { + /// The page number of the results to fetch. For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." + [QueryParameter("page")] + public int? Page { get; set; } + /// The number of results per page (max 100). For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." + [QueryParameter("per_page")] + public int? PerPage { get; set; } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class CommitsRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Gists/Item/Forks/ForksRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Gists/Item/Forks/ForksRequestBuilder.cs new file mode 100644 index 0000000..e5e4970 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Gists/Item/Forks/ForksRequestBuilder.cs @@ -0,0 +1,163 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Gists.Item.Forks +{ + /// + /// Builds and executes requests for operations under \gists\{gist_id}\forks + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class ForksRequestBuilder : BaseRequestBuilder + { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public ForksRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/gists/{gist_id}/forks{?page*,per_page*}", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public ForksRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/gists/{gist_id}/forks{?page*,per_page*}", rawUrl) + { + } + /// + /// List gist forks + /// API method documentation + /// + /// A List<global::Ayllu.Github.Client.Models.GistSimple> + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 403 status code + /// When receiving a 404 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task?> GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task> GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "403", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "404", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + }; + var collectionResult = await RequestAdapter.SendCollectionAsync(requestInfo, global::Ayllu.Github.Client.Models.GistSimple.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + return collectionResult?.AsList(); + } + /// + /// Fork a gist + /// API method documentation + /// + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 403 status code + /// When receiving a 404 status code + /// When receiving a 422 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PostAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task PostAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToPostRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "403", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "404", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "422", global::Ayllu.Github.Client.Models.ValidationError.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Models.BaseGist.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPostRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToPostRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.Gists.Item.Forks.ForksRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Gists.Item.Forks.ForksRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// List gist forks + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class ForksRequestBuilderGetQueryParameters + { + /// The page number of the results to fetch. For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." + [QueryParameter("page")] + public int? Page { get; set; } + /// The number of results per page (max 100). For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." + [QueryParameter("per_page")] + public int? PerPage { get; set; } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class ForksRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class ForksRequestBuilderPostRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Gists/Item/Item/WithShaItemRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Gists/Item/Item/WithShaItemRequestBuilder.cs new file mode 100644 index 0000000..12fed29 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Gists/Item/Item/WithShaItemRequestBuilder.cs @@ -0,0 +1,102 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Gists.Item.Item +{ + /// + /// Builds and executes requests for operations under \gists\{gist_id}\{sha} + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithShaItemRequestBuilder : BaseRequestBuilder + { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public WithShaItemRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/gists/{gist_id}/{sha}", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public WithShaItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/gists/{gist_id}/{sha}", rawUrl) + { + } + /// + /// Gets a specified gist revision.This endpoint supports the following custom media types. For more information, see "[Media types](https://docs.github.com/rest/using-the-rest-api/getting-started-with-the-rest-api#media-types)."- **`application/vnd.github.raw+json`**: Returns the raw markdown. 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. + /// API method documentation + /// + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 403 status code + /// When receiving a 404 status code + /// When receiving a 422 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "403", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "404", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "422", global::Ayllu.Github.Client.Models.ValidationError.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Models.GistSimple.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// Gets a specified gist revision.This endpoint supports the following custom media types. For more information, see "[Media types](https://docs.github.com/rest/using-the-rest-api/getting-started-with-the-rest-api#media-types)."- **`application/vnd.github.raw+json`**: Returns the raw markdown. 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. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.Gists.Item.Item.WithShaItemRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Gists.Item.Item.WithShaItemRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithShaItemRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Gists/Item/Star/Star404Error.cs b/src/Ayllu.Github.Client/Github/Client/Gists/Item/Star/Star404Error.cs new file mode 100644 index 0000000..084bac7 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Gists/Item/Star/Star404Error.cs @@ -0,0 +1,48 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Gists.Item.Star +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class Star404Error : ApiException, IParsable + #pragma warning restore CS1591 + { + /// The primary error message. + public override string Message { get => base.Message; } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Gists.Item.Star.Star404Error CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Gists.Item.Star.Star404Error(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Gists/Item/Star/StarRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Gists/Item/Star/StarRequestBuilder.cs new file mode 100644 index 0000000..4a8a883 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Gists/Item/Star/StarRequestBuilder.cs @@ -0,0 +1,197 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Gists.Item.Star +{ + /// + /// Builds and executes requests for operations under \gists\{gist_id}\star + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class StarRequestBuilder : BaseRequestBuilder + { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public StarRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/gists/{gist_id}/star", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public StarRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/gists/{gist_id}/star", rawUrl) + { + } + /// + /// Unstar a gist + /// API method documentation + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 403 status code + /// When receiving a 404 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task DeleteAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task DeleteAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToDeleteRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "403", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "404", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + }; + await RequestAdapter.SendNoContentAsync(requestInfo, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// Check if a gist is starred + /// API method documentation + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 403 status code + /// When receiving a 404 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "403", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "404", global::Ayllu.Github.Client.Gists.Item.Star.Star404Error.CreateFromDiscriminatorValue }, + }; + await RequestAdapter.SendNoContentAsync(requestInfo, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// 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/rest/guides/getting-started-with-the-rest-api#http-method)." + /// API method documentation + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 403 status code + /// When receiving a 404 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PutAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task PutAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToPutRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "403", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "404", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + }; + await RequestAdapter.SendNoContentAsync(requestInfo, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToDeleteRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToDeleteRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.DELETE, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// 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/rest/guides/getting-started-with-the-rest-api#http-method)." + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPutRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToPutRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.PUT, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.Gists.Item.Star.StarRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Gists.Item.Star.StarRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class StarRequestBuilderDeleteRequestConfiguration : RequestConfiguration + { + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class StarRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class StarRequestBuilderPutRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Gists/Item/WithGist_ItemRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Gists/Item/WithGist_ItemRequestBuilder.cs new file mode 100644 index 0000000..388ecbd --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Gists/Item/WithGist_ItemRequestBuilder.cs @@ -0,0 +1,244 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Gists.Item.Comments; +using Ayllu.Github.Client.Gists.Item.Commits; +using Ayllu.Github.Client.Gists.Item.Forks; +using Ayllu.Github.Client.Gists.Item.Item; +using Ayllu.Github.Client.Gists.Item.Star; +using Ayllu.Github.Client.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Gists.Item +{ + /// + /// Builds and executes requests for operations under \gists\{gist_id} + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithGist_ItemRequestBuilder : BaseRequestBuilder + { + /// The comments property + public global::Ayllu.Github.Client.Gists.Item.Comments.CommentsRequestBuilder Comments + { + get => new global::Ayllu.Github.Client.Gists.Item.Comments.CommentsRequestBuilder(PathParameters, RequestAdapter); + } + /// The commits property + public global::Ayllu.Github.Client.Gists.Item.Commits.CommitsRequestBuilder Commits + { + get => new global::Ayllu.Github.Client.Gists.Item.Commits.CommitsRequestBuilder(PathParameters, RequestAdapter); + } + /// The forks property + public global::Ayllu.Github.Client.Gists.Item.Forks.ForksRequestBuilder Forks + { + get => new global::Ayllu.Github.Client.Gists.Item.Forks.ForksRequestBuilder(PathParameters, RequestAdapter); + } + /// The star property + public global::Ayllu.Github.Client.Gists.Item.Star.StarRequestBuilder Star + { + get => new global::Ayllu.Github.Client.Gists.Item.Star.StarRequestBuilder(PathParameters, RequestAdapter); + } + /// Gets an item from the Ayllu.Github.Client.gists.item.item collection + /// Unique identifier of the item + /// A + public global::Ayllu.Github.Client.Gists.Item.Item.WithShaItemRequestBuilder this[string position] + { + get + { + var urlTplParams = new Dictionary(PathParameters); + urlTplParams.Add("sha", position); + return new global::Ayllu.Github.Client.Gists.Item.Item.WithShaItemRequestBuilder(urlTplParams, RequestAdapter); + } + } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public WithGist_ItemRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/gists/{gist_id}", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public WithGist_ItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/gists/{gist_id}", rawUrl) + { + } + /// + /// Delete a gist + /// API method documentation + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 403 status code + /// When receiving a 404 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task DeleteAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task DeleteAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToDeleteRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "403", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "404", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + }; + await RequestAdapter.SendNoContentAsync(requestInfo, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// Gets a specified gist.This endpoint supports the following custom media types. For more information, see "[Media types](https://docs.github.com/rest/using-the-rest-api/getting-started-with-the-rest-api#media-types)."- **`application/vnd.github.raw+json`**: Returns the raw markdown. 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. + /// API method documentation + /// + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 403 status code + /// When receiving a 404 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "403", global::Ayllu.Github.Client.Models.GistSimple403Error.CreateFromDiscriminatorValue }, + { "404", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Models.GistSimple.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// 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/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. + /// API method documentation + /// + /// A + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 404 status code + /// When receiving a 422 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PatchAsync(global::Ayllu.Github.Client.Gists.Item.WithGist_PatchRequestBody body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task PatchAsync(global::Ayllu.Github.Client.Gists.Item.WithGist_PatchRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPatchRequestInformation(body, requestConfiguration); + var errorMapping = new Dictionary> + { + { "404", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "422", global::Ayllu.Github.Client.Models.ValidationError.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Models.GistSimple.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToDeleteRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToDeleteRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.DELETE, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Gets a specified gist.This endpoint supports the following custom media types. For more information, see "[Media types](https://docs.github.com/rest/using-the-rest-api/getting-started-with-the-rest-api#media-types)."- **`application/vnd.github.raw+json`**: Returns the raw markdown. 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. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// 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/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. + /// + /// A + /// The request body + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPatchRequestInformation(global::Ayllu.Github.Client.Gists.Item.WithGist_PatchRequestBody body, Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToPatchRequestInformation(global::Ayllu.Github.Client.Gists.Item.WithGist_PatchRequestBody body, Action> requestConfiguration = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.Gists.Item.WithGist_ItemRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Gists.Item.WithGist_ItemRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithGist_ItemRequestBuilderDeleteRequestConfiguration : RequestConfiguration + { + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithGist_ItemRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithGist_ItemRequestBuilderPatchRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Gists/Item/WithGist_PatchRequestBody.cs b/src/Ayllu.Github.Client/Github/Client/Gists/Item/WithGist_PatchRequestBody.cs new file mode 100644 index 0000000..3adc86e --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Gists/Item/WithGist_PatchRequestBody.cs @@ -0,0 +1,75 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Gists.Item +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class WithGist_PatchRequestBody : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The description of the gist. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Description { get; set; } +#nullable restore +#else + public string Description { get; set; } +#endif + /// 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`. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Gists.Item.WithGist_PatchRequestBody_files? Files { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Gists.Item.WithGist_PatchRequestBody_files Files { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public WithGist_PatchRequestBody() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Gists.Item.WithGist_PatchRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Gists.Item.WithGist_PatchRequestBody(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "description", n => { Description = n.GetStringValue(); } }, + { "files", n => { Files = n.GetObjectValue(global::Ayllu.Github.Client.Gists.Item.WithGist_PatchRequestBody_files.CreateFromDiscriminatorValue); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("description", Description); + writer.WriteObjectValue("files", Files); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Gists/Item/WithGist_PatchRequestBody_files.cs b/src/Ayllu.Github.Client/Github/Client/Gists/Item/WithGist_PatchRequestBody_files.cs new file mode 100644 index 0000000..33f366d --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Gists/Item/WithGist_PatchRequestBody_files.cs @@ -0,0 +1,56 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Gists.Item +{ + /// + /// 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`. + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithGist_PatchRequestBody_files : IAdditionalDataHolder, IParsable + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public WithGist_PatchRequestBody_files() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Gists.Item.WithGist_PatchRequestBody_files CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Gists.Item.WithGist_PatchRequestBody_files(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Gists/Public/PublicRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Gists/Public/PublicRequestBuilder.cs new file mode 100644 index 0000000..ee67ebc --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Gists/Public/PublicRequestBuilder.cs @@ -0,0 +1,117 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Gists.Public +{ + /// + /// Builds and executes requests for operations under \gists\public + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class PublicRequestBuilder : BaseRequestBuilder + { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public PublicRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/gists/public{?page*,per_page*,since*}", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public PublicRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/gists/public{?page*,per_page*,since*}", rawUrl) + { + } + /// + /// List public gists sorted by most recently updated to least recently updated.Note: With [pagination](https://docs.github.com/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. + /// API method documentation + /// + /// A List<global::Ayllu.Github.Client.Models.BaseGist> + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 403 status code + /// When receiving a 422 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task?> GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task> GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "403", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "422", global::Ayllu.Github.Client.Models.ValidationError.CreateFromDiscriminatorValue }, + }; + var collectionResult = await RequestAdapter.SendCollectionAsync(requestInfo, global::Ayllu.Github.Client.Models.BaseGist.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + return collectionResult?.AsList(); + } + /// + /// List public gists sorted by most recently updated to least recently updated.Note: With [pagination](https://docs.github.com/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. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.Gists.Public.PublicRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Gists.Public.PublicRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// List public gists sorted by most recently updated to least recently updated.Note: With [pagination](https://docs.github.com/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. + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class PublicRequestBuilderGetQueryParameters + { + /// The page number of the results to fetch. For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." + [QueryParameter("page")] + public int? Page { get; set; } + /// The number of results per page (max 100). For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." + [QueryParameter("per_page")] + public int? PerPage { get; set; } + /// 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`. + [QueryParameter("since")] + public DateTimeOffset? Since { get; set; } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class PublicRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Gists/Starred/StarredRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Gists/Starred/StarredRequestBuilder.cs new file mode 100644 index 0000000..9798010 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Gists/Starred/StarredRequestBuilder.cs @@ -0,0 +1,117 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Gists.Starred +{ + /// + /// Builds and executes requests for operations under \gists\starred + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class StarredRequestBuilder : BaseRequestBuilder + { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public StarredRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/gists/starred{?page*,per_page*,since*}", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public StarredRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/gists/starred{?page*,per_page*,since*}", rawUrl) + { + } + /// + /// List the authenticated user's starred gists: + /// API method documentation + /// + /// A List<global::Ayllu.Github.Client.Models.BaseGist> + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 401 status code + /// When receiving a 403 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task?> GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task> GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "401", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "403", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + }; + var collectionResult = await RequestAdapter.SendCollectionAsync(requestInfo, global::Ayllu.Github.Client.Models.BaseGist.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + return collectionResult?.AsList(); + } + /// + /// List the authenticated user's starred gists: + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.Gists.Starred.StarredRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Gists.Starred.StarredRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// List the authenticated user's starred gists: + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class StarredRequestBuilderGetQueryParameters + { + /// The page number of the results to fetch. For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." + [QueryParameter("page")] + public int? Page { get; set; } + /// The number of results per page (max 100). For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." + [QueryParameter("per_page")] + public int? PerPage { get; set; } + /// 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`. + [QueryParameter("since")] + public DateTimeOffset? Since { get; set; } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class StarredRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Gitignore/GitignoreRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Gitignore/GitignoreRequestBuilder.cs new file mode 100644 index 0000000..cae905e --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Gitignore/GitignoreRequestBuilder.cs @@ -0,0 +1,41 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Gitignore.Templates; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System; +namespace Ayllu.Github.Client.Gitignore +{ + /// + /// Builds and executes requests for operations under \gitignore + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class GitignoreRequestBuilder : BaseRequestBuilder + { + /// The templates property + public global::Ayllu.Github.Client.Gitignore.Templates.TemplatesRequestBuilder Templates + { + get => new global::Ayllu.Github.Client.Gitignore.Templates.TemplatesRequestBuilder(PathParameters, RequestAdapter); + } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public GitignoreRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/gitignore", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public GitignoreRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/gitignore", rawUrl) + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Gitignore/Templates/Item/WithNameItemRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Gitignore/Templates/Item/WithNameItemRequestBuilder.cs new file mode 100644 index 0000000..0834a37 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Gitignore/Templates/Item/WithNameItemRequestBuilder.cs @@ -0,0 +1,93 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Gitignore.Templates.Item +{ + /// + /// Builds and executes requests for operations under \gitignore\templates\{name} + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithNameItemRequestBuilder : BaseRequestBuilder + { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public WithNameItemRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/gitignore/templates/{name}", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public WithNameItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/gitignore/templates/{name}", rawUrl) + { + } + /// + /// 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/rest/using-the-rest-api/getting-started-with-the-rest-api#media-types)."- **`application/vnd.github.raw+json`**: Returns the raw .gitignore contents. + /// API method documentation + /// + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Models.GitignoreTemplate.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false); + } + /// + /// 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/rest/using-the-rest-api/getting-started-with-the-rest-api#media-types)."- **`application/vnd.github.raw+json`**: Returns the raw .gitignore contents. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.Gitignore.Templates.Item.WithNameItemRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Gitignore.Templates.Item.WithNameItemRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithNameItemRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Gitignore/Templates/TemplatesRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Gitignore/Templates/TemplatesRequestBuilder.cs new file mode 100644 index 0000000..28b9fe2 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Gitignore/Templates/TemplatesRequestBuilder.cs @@ -0,0 +1,106 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Gitignore.Templates.Item; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Gitignore.Templates +{ + /// + /// Builds and executes requests for operations under \gitignore\templates + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class TemplatesRequestBuilder : BaseRequestBuilder + { + /// Gets an item from the Ayllu.Github.Client.gitignore.templates.item collection + /// Unique identifier of the item + /// A + public global::Ayllu.Github.Client.Gitignore.Templates.Item.WithNameItemRequestBuilder this[string position] + { + get + { + var urlTplParams = new Dictionary(PathParameters); + urlTplParams.Add("name", position); + return new global::Ayllu.Github.Client.Gitignore.Templates.Item.WithNameItemRequestBuilder(urlTplParams, RequestAdapter); + } + } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public TemplatesRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/gitignore/templates", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public TemplatesRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/gitignore/templates", rawUrl) + { + } + /// + /// List all templates available to pass as an option when [creating a repository](https://docs.github.com/rest/repos/repos#create-a-repository-for-the-authenticated-user). + /// API method documentation + /// + /// A List<string> + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task?> GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task> GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var collectionResult = await RequestAdapter.SendPrimitiveCollectionAsync(requestInfo, default, cancellationToken).ConfigureAwait(false); + return collectionResult?.AsList(); + } + /// + /// List all templates available to pass as an option when [creating a repository](https://docs.github.com/rest/repos/repos#create-a-repository-for-the-authenticated-user). + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.Gitignore.Templates.TemplatesRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Gitignore.Templates.TemplatesRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class TemplatesRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Installation/InstallationRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Installation/InstallationRequestBuilder.cs new file mode 100644 index 0000000..90cb10c --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Installation/InstallationRequestBuilder.cs @@ -0,0 +1,47 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Installation.Repositories; +using Ayllu.Github.Client.Installation.Token; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System; +namespace Ayllu.Github.Client.Installation +{ + /// + /// Builds and executes requests for operations under \installation + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class InstallationRequestBuilder : BaseRequestBuilder + { + /// The repositories property + public global::Ayllu.Github.Client.Installation.Repositories.RepositoriesRequestBuilder Repositories + { + get => new global::Ayllu.Github.Client.Installation.Repositories.RepositoriesRequestBuilder(PathParameters, RequestAdapter); + } + /// The token property + public global::Ayllu.Github.Client.Installation.Token.TokenRequestBuilder Token + { + get => new global::Ayllu.Github.Client.Installation.Token.TokenRequestBuilder(PathParameters, RequestAdapter); + } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public InstallationRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/installation", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public InstallationRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/installation", rawUrl) + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Installation/Repositories/RepositoriesGetResponse.cs b/src/Ayllu.Github.Client/Github/Client/Installation/Repositories/RepositoriesGetResponse.cs new file mode 100644 index 0000000..17a0dc0 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Installation/Repositories/RepositoriesGetResponse.cs @@ -0,0 +1,80 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Installation.Repositories +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class RepositoriesGetResponse : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The repositories property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? Repositories { get; set; } +#nullable restore +#else + public List Repositories { get; set; } +#endif + /// The repository_selection property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? RepositorySelection { get; set; } +#nullable restore +#else + public string RepositorySelection { get; set; } +#endif + /// The total_count property + public int? TotalCount { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public RepositoriesGetResponse() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Installation.Repositories.RepositoriesGetResponse CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Installation.Repositories.RepositoriesGetResponse(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "repositories", n => { Repositories = n.GetCollectionOfObjectValues(global::Ayllu.Github.Client.Models.Repository.CreateFromDiscriminatorValue)?.AsList(); } }, + { "repository_selection", n => { RepositorySelection = n.GetStringValue(); } }, + { "total_count", n => { TotalCount = n.GetIntValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteCollectionOfObjectValues("repositories", Repositories); + writer.WriteStringValue("repository_selection", RepositorySelection); + writer.WriteIntValue("total_count", TotalCount); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Installation/Repositories/RepositoriesRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Installation/Repositories/RepositoriesRequestBuilder.cs new file mode 100644 index 0000000..b48df40 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Installation/Repositories/RepositoriesRequestBuilder.cs @@ -0,0 +1,140 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Installation.Repositories +{ + /// + /// Builds and executes requests for operations under \installation\repositories + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class RepositoriesRequestBuilder : BaseRequestBuilder + { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public RepositoriesRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/installation/repositories{?page*,per_page*}", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public RepositoriesRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/installation/repositories{?page*,per_page*}", rawUrl) + { + } + /// + /// List repositories that an app installation can access. + /// API method documentation + /// + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 401 status code + /// When receiving a 403 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsRepositoriesGetResponseAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task GetAsRepositoriesGetResponseAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "401", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "403", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Installation.Repositories.RepositoriesGetResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// List repositories that an app installation can access. + /// API method documentation + /// + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 401 status code + /// When receiving a 403 status code + [Obsolete("This method is obsolete. Use GetAsRepositoriesGetResponseAsync instead.")] +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "401", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "403", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Installation.Repositories.RepositoriesResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// List repositories that an app installation can access. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.Installation.Repositories.RepositoriesRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Installation.Repositories.RepositoriesRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// List repositories that an app installation can access. + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class RepositoriesRequestBuilderGetQueryParameters + { + /// The page number of the results to fetch. For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." + [QueryParameter("page")] + public int? Page { get; set; } + /// The number of results per page (max 100). For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." + [QueryParameter("per_page")] + public int? PerPage { get; set; } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class RepositoriesRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Installation/Repositories/RepositoriesResponse.cs b/src/Ayllu.Github.Client/Github/Client/Installation/Repositories/RepositoriesResponse.cs new file mode 100644 index 0000000..36f8aeb --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Installation/Repositories/RepositoriesResponse.cs @@ -0,0 +1,28 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Installation.Repositories +{ + [Obsolete("This class is obsolete. Use RepositoriesGetResponse instead.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class RepositoriesResponse : global::Ayllu.Github.Client.Installation.Repositories.RepositoriesGetResponse, IParsable + #pragma warning restore CS1591 + { + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static new global::Ayllu.Github.Client.Installation.Repositories.RepositoriesResponse CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Installation.Repositories.RepositoriesResponse(); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Installation/Token/TokenRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Installation/Token/TokenRequestBuilder.cs new file mode 100644 index 0000000..e8de5cd --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Installation/Token/TokenRequestBuilder.cs @@ -0,0 +1,90 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Installation.Token +{ + /// + /// Builds and executes requests for operations under \installation\token + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class TokenRequestBuilder : BaseRequestBuilder + { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public TokenRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/installation/token", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public TokenRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/installation/token", rawUrl) + { + } + /// + /// 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/rest/apps/apps#create-an-installation-access-token-for-an-app)" endpoint. + /// API method documentation + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task DeleteAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task DeleteAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToDeleteRequestInformation(requestConfiguration); + await RequestAdapter.SendNoContentAsync(requestInfo, default, cancellationToken).ConfigureAwait(false); + } + /// + /// 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/rest/apps/apps#create-an-installation-access-token-for-an-app)" endpoint. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToDeleteRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToDeleteRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.DELETE, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.Installation.Token.TokenRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Installation.Token.TokenRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class TokenRequestBuilderDeleteRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Issues/GetDirectionQueryParameterType.cs b/src/Ayllu.Github.Client/Github/Client/Issues/GetDirectionQueryParameterType.cs new file mode 100644 index 0000000..dff4fd0 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Issues/GetDirectionQueryParameterType.cs @@ -0,0 +1,20 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Issues +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public enum GetDirectionQueryParameterType + #pragma warning restore CS1591 + { + [EnumMember(Value = "asc")] + #pragma warning disable CS1591 + Asc, + #pragma warning restore CS1591 + [EnumMember(Value = "desc")] + #pragma warning disable CS1591 + Desc, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Issues/GetFilterQueryParameterType.cs b/src/Ayllu.Github.Client/Github/Client/Issues/GetFilterQueryParameterType.cs new file mode 100644 index 0000000..14262c7 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Issues/GetFilterQueryParameterType.cs @@ -0,0 +1,36 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Issues +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public enum GetFilterQueryParameterType + #pragma warning restore CS1591 + { + [EnumMember(Value = "assigned")] + #pragma warning disable CS1591 + Assigned, + #pragma warning restore CS1591 + [EnumMember(Value = "created")] + #pragma warning disable CS1591 + Created, + #pragma warning restore CS1591 + [EnumMember(Value = "mentioned")] + #pragma warning disable CS1591 + Mentioned, + #pragma warning restore CS1591 + [EnumMember(Value = "subscribed")] + #pragma warning disable CS1591 + Subscribed, + #pragma warning restore CS1591 + [EnumMember(Value = "repos")] + #pragma warning disable CS1591 + Repos, + #pragma warning restore CS1591 + [EnumMember(Value = "all")] + #pragma warning disable CS1591 + All, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Issues/GetSortQueryParameterType.cs b/src/Ayllu.Github.Client/Github/Client/Issues/GetSortQueryParameterType.cs new file mode 100644 index 0000000..9a64a29 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Issues/GetSortQueryParameterType.cs @@ -0,0 +1,24 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Issues +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public enum GetSortQueryParameterType + #pragma warning restore CS1591 + { + [EnumMember(Value = "created")] + #pragma warning disable CS1591 + Created, + #pragma warning restore CS1591 + [EnumMember(Value = "updated")] + #pragma warning disable CS1591 + Updated, + #pragma warning restore CS1591 + [EnumMember(Value = "comments")] + #pragma warning disable CS1591 + Comments, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Issues/GetStateQueryParameterType.cs b/src/Ayllu.Github.Client/Github/Client/Issues/GetStateQueryParameterType.cs new file mode 100644 index 0000000..8bdd945 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Issues/GetStateQueryParameterType.cs @@ -0,0 +1,24 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Issues +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public enum GetStateQueryParameterType + #pragma warning restore CS1591 + { + [EnumMember(Value = "open")] + #pragma warning disable CS1591 + Open, + #pragma warning restore CS1591 + [EnumMember(Value = "closed")] + #pragma warning disable CS1591 + Closed, + #pragma warning restore CS1591 + [EnumMember(Value = "all")] + #pragma warning disable CS1591 + All, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Issues/IssuesRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Issues/IssuesRequestBuilder.cs new file mode 100644 index 0000000..af2acb8 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Issues/IssuesRequestBuilder.cs @@ -0,0 +1,191 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Issues +{ + /// + /// Builds and executes requests for operations under \issues + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class IssuesRequestBuilder : BaseRequestBuilder + { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public IssuesRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/issues{?collab*,direction*,filter*,labels*,orgs*,owned*,page*,per_page*,pulls*,since*,sort*,state*}", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public IssuesRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/issues{?collab*,direction*,filter*,labels*,orgs*,owned*,page*,per_page*,pulls*,since*,sort*,state*}", rawUrl) + { + } + /// + /// 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 this reason, "Issues" endpoints may return both issues and pull requests in the response. You can identify pull requests by the `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 pull request id, use the "[List pull requests](https://docs.github.com/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/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`. + /// API method documentation + /// + /// A List<global::Ayllu.Github.Client.Models.Issue> + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 404 status code + /// When receiving a 422 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task?> GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task> GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "404", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "422", global::Ayllu.Github.Client.Models.ValidationError.CreateFromDiscriminatorValue }, + }; + var collectionResult = await RequestAdapter.SendCollectionAsync(requestInfo, global::Ayllu.Github.Client.Models.Issue.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + return collectionResult?.AsList(); + } + /// + /// 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 this reason, "Issues" endpoints may return both issues and pull requests in the response. You can identify pull requests by the `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 pull request id, use the "[List pull requests](https://docs.github.com/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/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`. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.Issues.IssuesRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Issues.IssuesRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// 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 this reason, "Issues" endpoints may return both issues and pull requests in the response. You can identify pull requests by the `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 pull request id, use the "[List pull requests](https://docs.github.com/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/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`. + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class IssuesRequestBuilderGetQueryParameters + { + [QueryParameter("collab")] + public bool? Collab { get; set; } + /// The direction to sort the results by. + [Obsolete("This property is deprecated, use DirectionAsGetDirectionQueryParameterType instead")] +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("direction")] + public string? Direction { get; set; } +#nullable restore +#else + [QueryParameter("direction")] + public string Direction { get; set; } +#endif + /// The direction to sort the results by. + [QueryParameter("direction")] + public global::Ayllu.Github.Client.Issues.GetDirectionQueryParameterType? DirectionAsGetDirectionQueryParameterType { get; set; } + /// 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. + [Obsolete("This property is deprecated, use FilterAsGetFilterQueryParameterType instead")] +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("filter")] + public string? Filter { get; set; } +#nullable restore +#else + [QueryParameter("filter")] + public string Filter { get; set; } +#endif + /// 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. + [QueryParameter("filter")] + public global::Ayllu.Github.Client.Issues.GetFilterQueryParameterType? FilterAsGetFilterQueryParameterType { get; set; } + /// A list of comma separated label names. Example: `bug,ui,@high` +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("labels")] + public string? Labels { get; set; } +#nullable restore +#else + [QueryParameter("labels")] + public string Labels { get; set; } +#endif + [QueryParameter("orgs")] + public bool? Orgs { get; set; } + [QueryParameter("owned")] + public bool? Owned { get; set; } + /// The page number of the results to fetch. For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." + [QueryParameter("page")] + public int? Page { get; set; } + /// The number of results per page (max 100). For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." + [QueryParameter("per_page")] + public int? PerPage { get; set; } + [QueryParameter("pulls")] + public bool? Pulls { get; set; } + /// 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`. + [QueryParameter("since")] + public DateTimeOffset? Since { get; set; } + /// What to sort results by. + [Obsolete("This property is deprecated, use SortAsGetSortQueryParameterType instead")] +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("sort")] + public string? Sort { get; set; } +#nullable restore +#else + [QueryParameter("sort")] + public string Sort { get; set; } +#endif + /// What to sort results by. + [QueryParameter("sort")] + public global::Ayllu.Github.Client.Issues.GetSortQueryParameterType? SortAsGetSortQueryParameterType { get; set; } + /// Indicates the state of the issues to return. + [Obsolete("This property is deprecated, use StateAsGetStateQueryParameterType instead")] +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("state")] + public string? State { get; set; } +#nullable restore +#else + [QueryParameter("state")] + public string State { get; set; } +#endif + /// Indicates the state of the issues to return. + [QueryParameter("state")] + public global::Ayllu.Github.Client.Issues.GetStateQueryParameterType? StateAsGetStateQueryParameterType { get; set; } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class IssuesRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Licenses/Item/WithLicenseItemRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Licenses/Item/WithLicenseItemRequestBuilder.cs new file mode 100644 index 0000000..8b4428f --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Licenses/Item/WithLicenseItemRequestBuilder.cs @@ -0,0 +1,100 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Licenses.Item +{ + /// + /// Builds and executes requests for operations under \licenses\{license} + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithLicenseItemRequestBuilder : BaseRequestBuilder + { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public WithLicenseItemRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/licenses/{license}", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public WithLicenseItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/licenses/{license}", rawUrl) + { + } + /// + /// Gets information about a specific license. For more information, see "[Licensing a repository ](https://docs.github.com/repositories/managing-your-repositorys-settings-and-features/customizing-your-repository/licensing-a-repository)." + /// API method documentation + /// + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 403 status code + /// When receiving a 404 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "403", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "404", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Models.License.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// Gets information about a specific license. For more information, see "[Licensing a repository ](https://docs.github.com/repositories/managing-your-repositorys-settings-and-features/customizing-your-repository/licensing-a-repository)." + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.Licenses.Item.WithLicenseItemRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Licenses.Item.WithLicenseItemRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithLicenseItemRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Licenses/LicensesRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Licenses/LicensesRequestBuilder.cs new file mode 100644 index 0000000..1a07fe6 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Licenses/LicensesRequestBuilder.cs @@ -0,0 +1,122 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Licenses.Item; +using Ayllu.Github.Client.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Licenses +{ + /// + /// Builds and executes requests for operations under \licenses + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class LicensesRequestBuilder : BaseRequestBuilder + { + /// Gets an item from the Ayllu.Github.Client.licenses.item collection + /// Unique identifier of the item + /// A + public global::Ayllu.Github.Client.Licenses.Item.WithLicenseItemRequestBuilder this[string position] + { + get + { + var urlTplParams = new Dictionary(PathParameters); + urlTplParams.Add("license", position); + return new global::Ayllu.Github.Client.Licenses.Item.WithLicenseItemRequestBuilder(urlTplParams, RequestAdapter); + } + } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public LicensesRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/licenses{?featured*,page*,per_page*}", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public LicensesRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/licenses{?featured*,page*,per_page*}", rawUrl) + { + } + /// + /// Lists the most commonly used licenses on GitHub. For more information, see "[Licensing a repository ](https://docs.github.com/repositories/managing-your-repositorys-settings-and-features/customizing-your-repository/licensing-a-repository)." + /// API method documentation + /// + /// A List<global::Ayllu.Github.Client.Models.LicenseSimple> + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task?> GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task> GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var collectionResult = await RequestAdapter.SendCollectionAsync(requestInfo, global::Ayllu.Github.Client.Models.LicenseSimple.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false); + return collectionResult?.AsList(); + } + /// + /// Lists the most commonly used licenses on GitHub. For more information, see "[Licensing a repository ](https://docs.github.com/repositories/managing-your-repositorys-settings-and-features/customizing-your-repository/licensing-a-repository)." + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.Licenses.LicensesRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Licenses.LicensesRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Lists the most commonly used licenses on GitHub. For more information, see "[Licensing a repository ](https://docs.github.com/repositories/managing-your-repositorys-settings-and-features/customizing-your-repository/licensing-a-repository)." + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class LicensesRequestBuilderGetQueryParameters + { + [QueryParameter("featured")] + public bool? Featured { get; set; } + /// The page number of the results to fetch. For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." + [QueryParameter("page")] + public int? Page { get; set; } + /// The number of results per page (max 100). For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." + [QueryParameter("per_page")] + public int? PerPage { get; set; } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class LicensesRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Markdown/MarkdownPostRequestBody.cs b/src/Ayllu.Github.Client/Github/Client/Markdown/MarkdownPostRequestBody.cs new file mode 100644 index 0000000..9955dd0 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Markdown/MarkdownPostRequestBody.cs @@ -0,0 +1,80 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Markdown +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class MarkdownPostRequestBody : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// 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. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Context { get; set; } +#nullable restore +#else + public string Context { get; set; } +#endif + /// The rendering mode. + public global::Ayllu.Github.Client.Markdown.MarkdownPostRequestBody_mode? Mode { get; set; } + /// The Markdown text to render in HTML. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Text { get; set; } +#nullable restore +#else + public string Text { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public MarkdownPostRequestBody() + { + AdditionalData = new Dictionary(); + Mode = global::Ayllu.Github.Client.Markdown.MarkdownPostRequestBody_mode.Markdown; + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Markdown.MarkdownPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Markdown.MarkdownPostRequestBody(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "context", n => { Context = n.GetStringValue(); } }, + { "mode", n => { Mode = n.GetEnumValue(); } }, + { "text", n => { Text = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("context", Context); + writer.WriteEnumValue("mode", Mode); + writer.WriteStringValue("text", Text); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Markdown/MarkdownPostRequestBody_mode.cs b/src/Ayllu.Github.Client/Github/Client/Markdown/MarkdownPostRequestBody_mode.cs new file mode 100644 index 0000000..782bbb8 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Markdown/MarkdownPostRequestBody_mode.cs @@ -0,0 +1,19 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Markdown +{ + /// The rendering mode. + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public enum MarkdownPostRequestBody_mode + { + [EnumMember(Value = "markdown")] + #pragma warning disable CS1591 + Markdown, + #pragma warning restore CS1591 + [EnumMember(Value = "gfm")] + #pragma warning disable CS1591 + Gfm, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Markdown/MarkdownRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Markdown/MarkdownRequestBuilder.cs new file mode 100644 index 0000000..25e6c68 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Markdown/MarkdownRequestBuilder.cs @@ -0,0 +1,102 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Markdown.Raw; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Markdown +{ + /// + /// Builds and executes requests for operations under \markdown + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class MarkdownRequestBuilder : BaseRequestBuilder + { + /// The raw property + public global::Ayllu.Github.Client.Markdown.Raw.RawRequestBuilder Raw + { + get => new global::Ayllu.Github.Client.Markdown.Raw.RawRequestBuilder(PathParameters, RequestAdapter); + } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public MarkdownRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/markdown", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public MarkdownRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/markdown", rawUrl) + { + } + /// + /// Depending on what is rendered in the Markdown, you may need to provide additional token scopes for labels, such as `issues:read` or `pull_requests:read`. + /// API method documentation + /// + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PostAsync(global::Ayllu.Github.Client.Markdown.MarkdownPostRequestBody body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task PostAsync(global::Ayllu.Github.Client.Markdown.MarkdownPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPostRequestInformation(body, requestConfiguration); + await RequestAdapter.SendNoContentAsync(requestInfo, default, cancellationToken).ConfigureAwait(false); + } + /// + /// Depending on what is rendered in the Markdown, you may need to provide additional token scopes for labels, such as `issues:read` or `pull_requests:read`. + /// + /// A + /// The request body + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPostRequestInformation(global::Ayllu.Github.Client.Markdown.MarkdownPostRequestBody body, Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToPostRequestInformation(global::Ayllu.Github.Client.Markdown.MarkdownPostRequestBody body, Action> requestConfiguration = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "text/html"); + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.Markdown.MarkdownRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Markdown.MarkdownRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class MarkdownRequestBuilderPostRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Markdown/Raw/RawRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Markdown/Raw/RawRequestBuilder.cs new file mode 100644 index 0000000..bfceb85 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Markdown/Raw/RawRequestBuilder.cs @@ -0,0 +1,96 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Markdown.Raw +{ + /// + /// Builds and executes requests for operations under \markdown\raw + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class RawRequestBuilder : BaseRequestBuilder + { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public RawRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/markdown/raw", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public RawRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/markdown/raw", rawUrl) + { + } + /// + /// 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 + /// + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PostAsync(string body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task PostAsync(string body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + if(string.IsNullOrEmpty(body)) throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPostRequestInformation(body, requestConfiguration); + await RequestAdapter.SendNoContentAsync(requestInfo, default, cancellationToken).ConfigureAwait(false); + } + /// + /// 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. + /// + /// A + /// The request body + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPostRequestInformation(string body, Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToPostRequestInformation(string body, Action> requestConfiguration = default) + { +#endif + if(string.IsNullOrEmpty(body)) throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "text/html"); + requestInfo.SetContentFromScalar(RequestAdapter, "text/plain", body); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.Markdown.Raw.RawRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Markdown.Raw.RawRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class RawRequestBuilderPostRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Marketplace_listing/Accounts/AccountsRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Marketplace_listing/Accounts/AccountsRequestBuilder.cs new file mode 100644 index 0000000..67a538b --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Marketplace_listing/Accounts/AccountsRequestBuilder.cs @@ -0,0 +1,61 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Marketplace_listing.Accounts.Item; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System; +namespace Ayllu.Github.Client.Marketplace_listing.Accounts +{ + /// + /// Builds and executes requests for operations under \marketplace_listing\accounts + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class AccountsRequestBuilder : BaseRequestBuilder + { + /// Gets an item from the Ayllu.Github.Client.marketplace_listing.accounts.item collection + /// account_id parameter + /// A + public global::Ayllu.Github.Client.Marketplace_listing.Accounts.Item.WithAccount_ItemRequestBuilder this[int position] + { + get + { + var urlTplParams = new Dictionary(PathParameters); + urlTplParams.Add("account_id", position); + return new global::Ayllu.Github.Client.Marketplace_listing.Accounts.Item.WithAccount_ItemRequestBuilder(urlTplParams, RequestAdapter); + } + } + /// Gets an item from the Ayllu.Github.Client.marketplace_listing.accounts.item collection + /// account_id parameter + /// A + [Obsolete("This indexer is deprecated and will be removed in the next major version. Use the one with the typed parameter instead.")] + public global::Ayllu.Github.Client.Marketplace_listing.Accounts.Item.WithAccount_ItemRequestBuilder this[string position] + { + get + { + var urlTplParams = new Dictionary(PathParameters); + if (!string.IsNullOrWhiteSpace(position)) urlTplParams.Add("account_id", position); + return new global::Ayllu.Github.Client.Marketplace_listing.Accounts.Item.WithAccount_ItemRequestBuilder(urlTplParams, RequestAdapter); + } + } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public AccountsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/marketplace_listing/accounts", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public AccountsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/marketplace_listing/accounts", rawUrl) + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Marketplace_listing/Accounts/Item/WithAccount_ItemRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Marketplace_listing/Accounts/Item/WithAccount_ItemRequestBuilder.cs new file mode 100644 index 0000000..f392597 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Marketplace_listing/Accounts/Item/WithAccount_ItemRequestBuilder.cs @@ -0,0 +1,100 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Marketplace_listing.Accounts.Item +{ + /// + /// Builds and executes requests for operations under \marketplace_listing\accounts\{account_id} + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithAccount_ItemRequestBuilder : BaseRequestBuilder + { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public WithAccount_ItemRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/marketplace_listing/accounts/{account_id}", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public WithAccount_ItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/marketplace_listing/accounts/{account_id}", rawUrl) + { + } + /// + /// Shows whether the user or organization account actively subscribes to a plan listed by the authenticated GitHub App. When someone submits a plan change that won't be processed until the end of their billing cycle, you will also see the upcoming pending change.GitHub Apps must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. OAuth apps must use [basic authentication](https://docs.github.com/rest/authentication/authenticating-to-the-rest-api#using-basic-authentication) with their client ID and client secret to access this endpoint. + /// API method documentation + /// + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 401 status code + /// When receiving a 404 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "401", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "404", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Models.MarketplacePurchase.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// Shows whether the user or organization account actively subscribes to a plan listed by the authenticated GitHub App. When someone submits a plan change that won't be processed until the end of their billing cycle, you will also see the upcoming pending change.GitHub Apps must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. OAuth apps must use [basic authentication](https://docs.github.com/rest/authentication/authenticating-to-the-rest-api#using-basic-authentication) with their client ID and client secret to access this endpoint. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.Marketplace_listing.Accounts.Item.WithAccount_ItemRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Marketplace_listing.Accounts.Item.WithAccount_ItemRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithAccount_ItemRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Marketplace_listing/Marketplace_listingRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Marketplace_listing/Marketplace_listingRequestBuilder.cs new file mode 100644 index 0000000..203b33c --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Marketplace_listing/Marketplace_listingRequestBuilder.cs @@ -0,0 +1,53 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Marketplace_listing.Accounts; +using Ayllu.Github.Client.Marketplace_listing.Plans; +using Ayllu.Github.Client.Marketplace_listing.Stubbed; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System; +namespace Ayllu.Github.Client.Marketplace_listing +{ + /// + /// Builds and executes requests for operations under \marketplace_listing + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class Marketplace_listingRequestBuilder : BaseRequestBuilder + { + /// The accounts property + public global::Ayllu.Github.Client.Marketplace_listing.Accounts.AccountsRequestBuilder Accounts + { + get => new global::Ayllu.Github.Client.Marketplace_listing.Accounts.AccountsRequestBuilder(PathParameters, RequestAdapter); + } + /// The plans property + public global::Ayllu.Github.Client.Marketplace_listing.Plans.PlansRequestBuilder Plans + { + get => new global::Ayllu.Github.Client.Marketplace_listing.Plans.PlansRequestBuilder(PathParameters, RequestAdapter); + } + /// The stubbed property + public global::Ayllu.Github.Client.Marketplace_listing.Stubbed.StubbedRequestBuilder Stubbed + { + get => new global::Ayllu.Github.Client.Marketplace_listing.Stubbed.StubbedRequestBuilder(PathParameters, RequestAdapter); + } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public Marketplace_listingRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/marketplace_listing", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public Marketplace_listingRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/marketplace_listing", rawUrl) + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Marketplace_listing/Plans/Item/Accounts/AccountsRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Marketplace_listing/Plans/Item/Accounts/AccountsRequestBuilder.cs new file mode 100644 index 0000000..73bd53c --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Marketplace_listing/Plans/Item/Accounts/AccountsRequestBuilder.cs @@ -0,0 +1,144 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Marketplace_listing.Plans.Item.Accounts +{ + /// + /// Builds and executes requests for operations under \marketplace_listing\plans\{plan_id}\accounts + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class AccountsRequestBuilder : BaseRequestBuilder + { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public AccountsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/marketplace_listing/plans/{plan_id}/accounts{?direction*,page*,per_page*,sort*}", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public AccountsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/marketplace_listing/plans/{plan_id}/accounts{?direction*,page*,per_page*,sort*}", rawUrl) + { + } + /// + /// Returns user and organization accounts associated with the specified plan, including free plans. For per-seat pricing, you see the list of accounts that have purchased the plan, including the number of seats purchased. When someone submits a plan change that won't be processed until the end of their billing cycle, you will also see the upcoming pending change.GitHub Apps must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. OAuth apps must use [basic authentication](https://docs.github.com/rest/authentication/authenticating-to-the-rest-api#using-basic-authentication) with their client ID and client secret to access this endpoint. + /// API method documentation + /// + /// A List<global::Ayllu.Github.Client.Models.MarketplacePurchase> + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 401 status code + /// When receiving a 404 status code + /// When receiving a 422 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task?> GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task> GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "401", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "404", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "422", global::Ayllu.Github.Client.Models.ValidationError.CreateFromDiscriminatorValue }, + }; + var collectionResult = await RequestAdapter.SendCollectionAsync(requestInfo, global::Ayllu.Github.Client.Models.MarketplacePurchase.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + return collectionResult?.AsList(); + } + /// + /// Returns user and organization accounts associated with the specified plan, including free plans. For per-seat pricing, you see the list of accounts that have purchased the plan, including the number of seats purchased. When someone submits a plan change that won't be processed until the end of their billing cycle, you will also see the upcoming pending change.GitHub Apps must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. OAuth apps must use [basic authentication](https://docs.github.com/rest/authentication/authenticating-to-the-rest-api#using-basic-authentication) with their client ID and client secret to access this endpoint. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.Marketplace_listing.Plans.Item.Accounts.AccountsRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Marketplace_listing.Plans.Item.Accounts.AccountsRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Returns user and organization accounts associated with the specified plan, including free plans. For per-seat pricing, you see the list of accounts that have purchased the plan, including the number of seats purchased. When someone submits a plan change that won't be processed until the end of their billing cycle, you will also see the upcoming pending change.GitHub Apps must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. OAuth apps must use [basic authentication](https://docs.github.com/rest/authentication/authenticating-to-the-rest-api#using-basic-authentication) with their client ID and client secret to access this endpoint. + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class AccountsRequestBuilderGetQueryParameters + { + /// To return the oldest accounts first, set to `asc`. Ignored without the `sort` parameter. + [Obsolete("This property is deprecated, use DirectionAsGetDirectionQueryParameterType instead")] +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("direction")] + public string? Direction { get; set; } +#nullable restore +#else + [QueryParameter("direction")] + public string Direction { get; set; } +#endif + /// To return the oldest accounts first, set to `asc`. Ignored without the `sort` parameter. + [QueryParameter("direction")] + public global::Ayllu.Github.Client.Marketplace_listing.Plans.Item.Accounts.GetDirectionQueryParameterType? DirectionAsGetDirectionQueryParameterType { get; set; } + /// The page number of the results to fetch. For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." + [QueryParameter("page")] + public int? Page { get; set; } + /// The number of results per page (max 100). For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." + [QueryParameter("per_page")] + public int? PerPage { get; set; } + /// The property to sort the results by. + [Obsolete("This property is deprecated, use SortAsGetSortQueryParameterType instead")] +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("sort")] + public string? Sort { get; set; } +#nullable restore +#else + [QueryParameter("sort")] + public string Sort { get; set; } +#endif + /// The property to sort the results by. + [QueryParameter("sort")] + public global::Ayllu.Github.Client.Marketplace_listing.Plans.Item.Accounts.GetSortQueryParameterType? SortAsGetSortQueryParameterType { get; set; } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class AccountsRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Marketplace_listing/Plans/Item/Accounts/GetDirectionQueryParameterType.cs b/src/Ayllu.Github.Client/Github/Client/Marketplace_listing/Plans/Item/Accounts/GetDirectionQueryParameterType.cs new file mode 100644 index 0000000..b22be6c --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Marketplace_listing/Plans/Item/Accounts/GetDirectionQueryParameterType.cs @@ -0,0 +1,20 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Marketplace_listing.Plans.Item.Accounts +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public enum GetDirectionQueryParameterType + #pragma warning restore CS1591 + { + [EnumMember(Value = "asc")] + #pragma warning disable CS1591 + Asc, + #pragma warning restore CS1591 + [EnumMember(Value = "desc")] + #pragma warning disable CS1591 + Desc, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Marketplace_listing/Plans/Item/Accounts/GetSortQueryParameterType.cs b/src/Ayllu.Github.Client/Github/Client/Marketplace_listing/Plans/Item/Accounts/GetSortQueryParameterType.cs new file mode 100644 index 0000000..559d93b --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Marketplace_listing/Plans/Item/Accounts/GetSortQueryParameterType.cs @@ -0,0 +1,20 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Marketplace_listing.Plans.Item.Accounts +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public enum GetSortQueryParameterType + #pragma warning restore CS1591 + { + [EnumMember(Value = "created")] + #pragma warning disable CS1591 + Created, + #pragma warning restore CS1591 + [EnumMember(Value = "updated")] + #pragma warning disable CS1591 + Updated, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Marketplace_listing/Plans/Item/WithPlan_ItemRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Marketplace_listing/Plans/Item/WithPlan_ItemRequestBuilder.cs new file mode 100644 index 0000000..3b14926 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Marketplace_listing/Plans/Item/WithPlan_ItemRequestBuilder.cs @@ -0,0 +1,41 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Marketplace_listing.Plans.Item.Accounts; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System; +namespace Ayllu.Github.Client.Marketplace_listing.Plans.Item +{ + /// + /// Builds and executes requests for operations under \marketplace_listing\plans\{plan_id} + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithPlan_ItemRequestBuilder : BaseRequestBuilder + { + /// The accounts property + public global::Ayllu.Github.Client.Marketplace_listing.Plans.Item.Accounts.AccountsRequestBuilder Accounts + { + get => new global::Ayllu.Github.Client.Marketplace_listing.Plans.Item.Accounts.AccountsRequestBuilder(PathParameters, RequestAdapter); + } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public WithPlan_ItemRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/marketplace_listing/plans/{plan_id}", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public WithPlan_ItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/marketplace_listing/plans/{plan_id}", rawUrl) + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Marketplace_listing/Plans/PlansRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Marketplace_listing/Plans/PlansRequestBuilder.cs new file mode 100644 index 0000000..a93b946 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Marketplace_listing/Plans/PlansRequestBuilder.cs @@ -0,0 +1,140 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Marketplace_listing.Plans.Item; +using Ayllu.Github.Client.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Marketplace_listing.Plans +{ + /// + /// Builds and executes requests for operations under \marketplace_listing\plans + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class PlansRequestBuilder : BaseRequestBuilder + { + /// Gets an item from the Ayllu.Github.Client.marketplace_listing.plans.item collection + /// The unique identifier of the plan. + /// A + public global::Ayllu.Github.Client.Marketplace_listing.Plans.Item.WithPlan_ItemRequestBuilder this[int position] + { + get + { + var urlTplParams = new Dictionary(PathParameters); + urlTplParams.Add("plan_id", position); + return new global::Ayllu.Github.Client.Marketplace_listing.Plans.Item.WithPlan_ItemRequestBuilder(urlTplParams, RequestAdapter); + } + } + /// Gets an item from the Ayllu.Github.Client.marketplace_listing.plans.item collection + /// The unique identifier of the plan. + /// A + [Obsolete("This indexer is deprecated and will be removed in the next major version. Use the one with the typed parameter instead.")] + public global::Ayllu.Github.Client.Marketplace_listing.Plans.Item.WithPlan_ItemRequestBuilder this[string position] + { + get + { + var urlTplParams = new Dictionary(PathParameters); + if (!string.IsNullOrWhiteSpace(position)) urlTplParams.Add("plan_id", position); + return new global::Ayllu.Github.Client.Marketplace_listing.Plans.Item.WithPlan_ItemRequestBuilder(urlTplParams, RequestAdapter); + } + } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public PlansRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/marketplace_listing/plans{?page*,per_page*}", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public PlansRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/marketplace_listing/plans{?page*,per_page*}", rawUrl) + { + } + /// + /// Lists all plans that are part of your GitHub Marketplace listing.GitHub Apps must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. OAuth apps must use [basic authentication](https://docs.github.com/rest/authentication/authenticating-to-the-rest-api#using-basic-authentication) with their client ID and client secret to access this endpoint. + /// API method documentation + /// + /// A List<global::Ayllu.Github.Client.Models.MarketplaceListingPlan> + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 401 status code + /// When receiving a 404 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task?> GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task> GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "401", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "404", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + }; + var collectionResult = await RequestAdapter.SendCollectionAsync(requestInfo, global::Ayllu.Github.Client.Models.MarketplaceListingPlan.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + return collectionResult?.AsList(); + } + /// + /// Lists all plans that are part of your GitHub Marketplace listing.GitHub Apps must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. OAuth apps must use [basic authentication](https://docs.github.com/rest/authentication/authenticating-to-the-rest-api#using-basic-authentication) with their client ID and client secret to access this endpoint. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.Marketplace_listing.Plans.PlansRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Marketplace_listing.Plans.PlansRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Lists all plans that are part of your GitHub Marketplace listing.GitHub Apps must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. OAuth apps must use [basic authentication](https://docs.github.com/rest/authentication/authenticating-to-the-rest-api#using-basic-authentication) with their client ID and client secret to access this endpoint. + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class PlansRequestBuilderGetQueryParameters + { + /// The page number of the results to fetch. For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." + [QueryParameter("page")] + public int? Page { get; set; } + /// The number of results per page (max 100). For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." + [QueryParameter("per_page")] + public int? PerPage { get; set; } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class PlansRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Marketplace_listing/Stubbed/Accounts/AccountsRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Marketplace_listing/Stubbed/Accounts/AccountsRequestBuilder.cs new file mode 100644 index 0000000..d678f7e --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Marketplace_listing/Stubbed/Accounts/AccountsRequestBuilder.cs @@ -0,0 +1,61 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Marketplace_listing.Stubbed.Accounts.Item; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System; +namespace Ayllu.Github.Client.Marketplace_listing.Stubbed.Accounts +{ + /// + /// Builds and executes requests for operations under \marketplace_listing\stubbed\accounts + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class AccountsRequestBuilder : BaseRequestBuilder + { + /// Gets an item from the Ayllu.Github.Client.marketplace_listing.stubbed.accounts.item collection + /// account_id parameter + /// A + public global::Ayllu.Github.Client.Marketplace_listing.Stubbed.Accounts.Item.WithAccount_ItemRequestBuilder this[int position] + { + get + { + var urlTplParams = new Dictionary(PathParameters); + urlTplParams.Add("account_id", position); + return new global::Ayllu.Github.Client.Marketplace_listing.Stubbed.Accounts.Item.WithAccount_ItemRequestBuilder(urlTplParams, RequestAdapter); + } + } + /// Gets an item from the Ayllu.Github.Client.marketplace_listing.stubbed.accounts.item collection + /// account_id parameter + /// A + [Obsolete("This indexer is deprecated and will be removed in the next major version. Use the one with the typed parameter instead.")] + public global::Ayllu.Github.Client.Marketplace_listing.Stubbed.Accounts.Item.WithAccount_ItemRequestBuilder this[string position] + { + get + { + var urlTplParams = new Dictionary(PathParameters); + if (!string.IsNullOrWhiteSpace(position)) urlTplParams.Add("account_id", position); + return new global::Ayllu.Github.Client.Marketplace_listing.Stubbed.Accounts.Item.WithAccount_ItemRequestBuilder(urlTplParams, RequestAdapter); + } + } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public AccountsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/marketplace_listing/stubbed/accounts", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public AccountsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/marketplace_listing/stubbed/accounts", rawUrl) + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Marketplace_listing/Stubbed/Accounts/Item/WithAccount_ItemRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Marketplace_listing/Stubbed/Accounts/Item/WithAccount_ItemRequestBuilder.cs new file mode 100644 index 0000000..8410733 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Marketplace_listing/Stubbed/Accounts/Item/WithAccount_ItemRequestBuilder.cs @@ -0,0 +1,98 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Marketplace_listing.Stubbed.Accounts.Item +{ + /// + /// Builds and executes requests for operations under \marketplace_listing\stubbed\accounts\{account_id} + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithAccount_ItemRequestBuilder : BaseRequestBuilder + { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public WithAccount_ItemRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/marketplace_listing/stubbed/accounts/{account_id}", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public WithAccount_ItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/marketplace_listing/stubbed/accounts/{account_id}", rawUrl) + { + } + /// + /// Shows whether the user or organization account actively subscribes to a plan listed by the authenticated GitHub App. When someone submits a plan change that won't be processed until the end of their billing cycle, you will also see the upcoming pending change.GitHub Apps must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. OAuth apps must use [basic authentication](https://docs.github.com/rest/authentication/authenticating-to-the-rest-api#using-basic-authentication) with their client ID and client secret to access this endpoint. + /// API method documentation + /// + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 401 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "401", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Models.MarketplacePurchase.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// Shows whether the user or organization account actively subscribes to a plan listed by the authenticated GitHub App. When someone submits a plan change that won't be processed until the end of their billing cycle, you will also see the upcoming pending change.GitHub Apps must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. OAuth apps must use [basic authentication](https://docs.github.com/rest/authentication/authenticating-to-the-rest-api#using-basic-authentication) with their client ID and client secret to access this endpoint. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.Marketplace_listing.Stubbed.Accounts.Item.WithAccount_ItemRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Marketplace_listing.Stubbed.Accounts.Item.WithAccount_ItemRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithAccount_ItemRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Marketplace_listing/Stubbed/Plans/Item/Accounts/AccountsRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Marketplace_listing/Stubbed/Plans/Item/Accounts/AccountsRequestBuilder.cs new file mode 100644 index 0000000..7507e4c --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Marketplace_listing/Stubbed/Plans/Item/Accounts/AccountsRequestBuilder.cs @@ -0,0 +1,140 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Marketplace_listing.Stubbed.Plans.Item.Accounts +{ + /// + /// Builds and executes requests for operations under \marketplace_listing\stubbed\plans\{plan_id}\accounts + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class AccountsRequestBuilder : BaseRequestBuilder + { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public AccountsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/marketplace_listing/stubbed/plans/{plan_id}/accounts{?direction*,page*,per_page*,sort*}", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public AccountsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/marketplace_listing/stubbed/plans/{plan_id}/accounts{?direction*,page*,per_page*,sort*}", rawUrl) + { + } + /// + /// Returns repository and organization accounts associated with the specified plan, including free plans. For per-seat pricing, you see the list of accounts that have purchased the plan, including the number of seats purchased. When someone submits a plan change that won't be processed until the end of their billing cycle, you will also see the upcoming pending change.GitHub Apps must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. OAuth apps must use [basic authentication](https://docs.github.com/rest/authentication/authenticating-to-the-rest-api#using-basic-authentication) with their client ID and client secret to access this endpoint. + /// API method documentation + /// + /// A List<global::Ayllu.Github.Client.Models.MarketplacePurchase> + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 401 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task?> GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task> GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "401", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + }; + var collectionResult = await RequestAdapter.SendCollectionAsync(requestInfo, global::Ayllu.Github.Client.Models.MarketplacePurchase.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + return collectionResult?.AsList(); + } + /// + /// Returns repository and organization accounts associated with the specified plan, including free plans. For per-seat pricing, you see the list of accounts that have purchased the plan, including the number of seats purchased. When someone submits a plan change that won't be processed until the end of their billing cycle, you will also see the upcoming pending change.GitHub Apps must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. OAuth apps must use [basic authentication](https://docs.github.com/rest/authentication/authenticating-to-the-rest-api#using-basic-authentication) with their client ID and client secret to access this endpoint. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.Marketplace_listing.Stubbed.Plans.Item.Accounts.AccountsRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Marketplace_listing.Stubbed.Plans.Item.Accounts.AccountsRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Returns repository and organization accounts associated with the specified plan, including free plans. For per-seat pricing, you see the list of accounts that have purchased the plan, including the number of seats purchased. When someone submits a plan change that won't be processed until the end of their billing cycle, you will also see the upcoming pending change.GitHub Apps must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. OAuth apps must use [basic authentication](https://docs.github.com/rest/authentication/authenticating-to-the-rest-api#using-basic-authentication) with their client ID and client secret to access this endpoint. + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class AccountsRequestBuilderGetQueryParameters + { + /// To return the oldest accounts first, set to `asc`. Ignored without the `sort` parameter. + [Obsolete("This property is deprecated, use DirectionAsGetDirectionQueryParameterType instead")] +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("direction")] + public string? Direction { get; set; } +#nullable restore +#else + [QueryParameter("direction")] + public string Direction { get; set; } +#endif + /// To return the oldest accounts first, set to `asc`. Ignored without the `sort` parameter. + [QueryParameter("direction")] + public global::Ayllu.Github.Client.Marketplace_listing.Stubbed.Plans.Item.Accounts.GetDirectionQueryParameterType? DirectionAsGetDirectionQueryParameterType { get; set; } + /// The page number of the results to fetch. For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." + [QueryParameter("page")] + public int? Page { get; set; } + /// The number of results per page (max 100). For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." + [QueryParameter("per_page")] + public int? PerPage { get; set; } + /// The property to sort the results by. + [Obsolete("This property is deprecated, use SortAsGetSortQueryParameterType instead")] +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("sort")] + public string? Sort { get; set; } +#nullable restore +#else + [QueryParameter("sort")] + public string Sort { get; set; } +#endif + /// The property to sort the results by. + [QueryParameter("sort")] + public global::Ayllu.Github.Client.Marketplace_listing.Stubbed.Plans.Item.Accounts.GetSortQueryParameterType? SortAsGetSortQueryParameterType { get; set; } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class AccountsRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Marketplace_listing/Stubbed/Plans/Item/Accounts/GetDirectionQueryParameterType.cs b/src/Ayllu.Github.Client/Github/Client/Marketplace_listing/Stubbed/Plans/Item/Accounts/GetDirectionQueryParameterType.cs new file mode 100644 index 0000000..a1482d1 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Marketplace_listing/Stubbed/Plans/Item/Accounts/GetDirectionQueryParameterType.cs @@ -0,0 +1,20 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Marketplace_listing.Stubbed.Plans.Item.Accounts +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public enum GetDirectionQueryParameterType + #pragma warning restore CS1591 + { + [EnumMember(Value = "asc")] + #pragma warning disable CS1591 + Asc, + #pragma warning restore CS1591 + [EnumMember(Value = "desc")] + #pragma warning disable CS1591 + Desc, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Marketplace_listing/Stubbed/Plans/Item/Accounts/GetSortQueryParameterType.cs b/src/Ayllu.Github.Client/Github/Client/Marketplace_listing/Stubbed/Plans/Item/Accounts/GetSortQueryParameterType.cs new file mode 100644 index 0000000..39f2a92 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Marketplace_listing/Stubbed/Plans/Item/Accounts/GetSortQueryParameterType.cs @@ -0,0 +1,20 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Marketplace_listing.Stubbed.Plans.Item.Accounts +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public enum GetSortQueryParameterType + #pragma warning restore CS1591 + { + [EnumMember(Value = "created")] + #pragma warning disable CS1591 + Created, + #pragma warning restore CS1591 + [EnumMember(Value = "updated")] + #pragma warning disable CS1591 + Updated, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Marketplace_listing/Stubbed/Plans/Item/WithPlan_ItemRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Marketplace_listing/Stubbed/Plans/Item/WithPlan_ItemRequestBuilder.cs new file mode 100644 index 0000000..9b2ea3a --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Marketplace_listing/Stubbed/Plans/Item/WithPlan_ItemRequestBuilder.cs @@ -0,0 +1,41 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Marketplace_listing.Stubbed.Plans.Item.Accounts; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System; +namespace Ayllu.Github.Client.Marketplace_listing.Stubbed.Plans.Item +{ + /// + /// Builds and executes requests for operations under \marketplace_listing\stubbed\plans\{plan_id} + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithPlan_ItemRequestBuilder : BaseRequestBuilder + { + /// The accounts property + public global::Ayllu.Github.Client.Marketplace_listing.Stubbed.Plans.Item.Accounts.AccountsRequestBuilder Accounts + { + get => new global::Ayllu.Github.Client.Marketplace_listing.Stubbed.Plans.Item.Accounts.AccountsRequestBuilder(PathParameters, RequestAdapter); + } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public WithPlan_ItemRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/marketplace_listing/stubbed/plans/{plan_id}", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public WithPlan_ItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/marketplace_listing/stubbed/plans/{plan_id}", rawUrl) + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Marketplace_listing/Stubbed/Plans/PlansRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Marketplace_listing/Stubbed/Plans/PlansRequestBuilder.cs new file mode 100644 index 0000000..6b63ee1 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Marketplace_listing/Stubbed/Plans/PlansRequestBuilder.cs @@ -0,0 +1,138 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Marketplace_listing.Stubbed.Plans.Item; +using Ayllu.Github.Client.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Marketplace_listing.Stubbed.Plans +{ + /// + /// Builds and executes requests for operations under \marketplace_listing\stubbed\plans + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class PlansRequestBuilder : BaseRequestBuilder + { + /// Gets an item from the Ayllu.Github.Client.marketplace_listing.stubbed.plans.item collection + /// The unique identifier of the plan. + /// A + public global::Ayllu.Github.Client.Marketplace_listing.Stubbed.Plans.Item.WithPlan_ItemRequestBuilder this[int position] + { + get + { + var urlTplParams = new Dictionary(PathParameters); + urlTplParams.Add("plan_id", position); + return new global::Ayllu.Github.Client.Marketplace_listing.Stubbed.Plans.Item.WithPlan_ItemRequestBuilder(urlTplParams, RequestAdapter); + } + } + /// Gets an item from the Ayllu.Github.Client.marketplace_listing.stubbed.plans.item collection + /// The unique identifier of the plan. + /// A + [Obsolete("This indexer is deprecated and will be removed in the next major version. Use the one with the typed parameter instead.")] + public global::Ayllu.Github.Client.Marketplace_listing.Stubbed.Plans.Item.WithPlan_ItemRequestBuilder this[string position] + { + get + { + var urlTplParams = new Dictionary(PathParameters); + if (!string.IsNullOrWhiteSpace(position)) urlTplParams.Add("plan_id", position); + return new global::Ayllu.Github.Client.Marketplace_listing.Stubbed.Plans.Item.WithPlan_ItemRequestBuilder(urlTplParams, RequestAdapter); + } + } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public PlansRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/marketplace_listing/stubbed/plans{?page*,per_page*}", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public PlansRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/marketplace_listing/stubbed/plans{?page*,per_page*}", rawUrl) + { + } + /// + /// Lists all plans that are part of your GitHub Marketplace listing.GitHub Apps must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. OAuth apps must use [basic authentication](https://docs.github.com/rest/authentication/authenticating-to-the-rest-api#using-basic-authentication) with their client ID and client secret to access this endpoint. + /// API method documentation + /// + /// A List<global::Ayllu.Github.Client.Models.MarketplaceListingPlan> + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 401 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task?> GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task> GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "401", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + }; + var collectionResult = await RequestAdapter.SendCollectionAsync(requestInfo, global::Ayllu.Github.Client.Models.MarketplaceListingPlan.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + return collectionResult?.AsList(); + } + /// + /// Lists all plans that are part of your GitHub Marketplace listing.GitHub Apps must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. OAuth apps must use [basic authentication](https://docs.github.com/rest/authentication/authenticating-to-the-rest-api#using-basic-authentication) with their client ID and client secret to access this endpoint. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.Marketplace_listing.Stubbed.Plans.PlansRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Marketplace_listing.Stubbed.Plans.PlansRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Lists all plans that are part of your GitHub Marketplace listing.GitHub Apps must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. OAuth apps must use [basic authentication](https://docs.github.com/rest/authentication/authenticating-to-the-rest-api#using-basic-authentication) with their client ID and client secret to access this endpoint. + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class PlansRequestBuilderGetQueryParameters + { + /// The page number of the results to fetch. For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." + [QueryParameter("page")] + public int? Page { get; set; } + /// The number of results per page (max 100). For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." + [QueryParameter("per_page")] + public int? PerPage { get; set; } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class PlansRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Marketplace_listing/Stubbed/StubbedRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Marketplace_listing/Stubbed/StubbedRequestBuilder.cs new file mode 100644 index 0000000..71c9bbf --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Marketplace_listing/Stubbed/StubbedRequestBuilder.cs @@ -0,0 +1,47 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Marketplace_listing.Stubbed.Accounts; +using Ayllu.Github.Client.Marketplace_listing.Stubbed.Plans; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System; +namespace Ayllu.Github.Client.Marketplace_listing.Stubbed +{ + /// + /// Builds and executes requests for operations under \marketplace_listing\stubbed + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class StubbedRequestBuilder : BaseRequestBuilder + { + /// The accounts property + public global::Ayllu.Github.Client.Marketplace_listing.Stubbed.Accounts.AccountsRequestBuilder Accounts + { + get => new global::Ayllu.Github.Client.Marketplace_listing.Stubbed.Accounts.AccountsRequestBuilder(PathParameters, RequestAdapter); + } + /// The plans property + public global::Ayllu.Github.Client.Marketplace_listing.Stubbed.Plans.PlansRequestBuilder Plans + { + get => new global::Ayllu.Github.Client.Marketplace_listing.Stubbed.Plans.PlansRequestBuilder(PathParameters, RequestAdapter); + } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public StubbedRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/marketplace_listing/stubbed", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public StubbedRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/marketplace_listing/stubbed", rawUrl) + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Meta/MetaRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Meta/MetaRequestBuilder.cs new file mode 100644 index 0000000..5dfefee --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Meta/MetaRequestBuilder.cs @@ -0,0 +1,93 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Meta +{ + /// + /// Builds and executes requests for operations under \meta + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class MetaRequestBuilder : BaseRequestBuilder + { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public MetaRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/meta", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public MetaRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/meta", rawUrl) + { + } + /// + /// 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/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. + /// API method documentation + /// + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Models.ApiOverview.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false); + } + /// + /// 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/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. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.Meta.MetaRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Meta.MetaRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class MetaRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/ActionsArtifactAndLogRetention.cs b/src/Ayllu.Github.Client/Github/Client/Models/ActionsArtifactAndLogRetention.cs new file mode 100644 index 0000000..a6ee9d7 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/ActionsArtifactAndLogRetention.cs @@ -0,0 +1,59 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class ActionsArtifactAndLogRetention : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The number of days to retain artifacts and logs + public int? Days { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public ActionsArtifactAndLogRetention() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.ActionsArtifactAndLogRetention CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.ActionsArtifactAndLogRetention(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "days", n => { Days = n.GetIntValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteIntValue("days", Days); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/ActionsArtifactAndLogRetentionResponse.cs b/src/Ayllu.Github.Client/Github/Client/Models/ActionsArtifactAndLogRetentionResponse.cs new file mode 100644 index 0000000..eec577c --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/ActionsArtifactAndLogRetentionResponse.cs @@ -0,0 +1,63 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class ActionsArtifactAndLogRetentionResponse : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The number of days artifacts and logs are retained + public int? Days { get; set; } + /// The maximum number of days that can be configured + public int? MaximumAllowedDays { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public ActionsArtifactAndLogRetentionResponse() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.ActionsArtifactAndLogRetentionResponse CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.ActionsArtifactAndLogRetentionResponse(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "days", n => { Days = n.GetIntValue(); } }, + { "maximum_allowed_days", n => { MaximumAllowedDays = n.GetIntValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteIntValue("days", Days); + writer.WriteIntValue("maximum_allowed_days", MaximumAllowedDays); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/ActionsBillingUsage.cs b/src/Ayllu.Github.Client/Github/Client/Models/ActionsBillingUsage.cs new file mode 100644 index 0000000..cc0663e --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/ActionsBillingUsage.cs @@ -0,0 +1,77 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class ActionsBillingUsage : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The amount of free GitHub Actions minutes available. + public int? IncludedMinutes { get; set; } + /// The minutes_used_breakdown property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.ActionsBillingUsage_minutes_used_breakdown? MinutesUsedBreakdown { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.ActionsBillingUsage_minutes_used_breakdown MinutesUsedBreakdown { get; set; } +#endif + /// The sum of the free and paid GitHub Actions minutes used. + public int? TotalMinutesUsed { get; set; } + /// The total paid GitHub Actions minutes used. + public int? TotalPaidMinutesUsed { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public ActionsBillingUsage() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.ActionsBillingUsage CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.ActionsBillingUsage(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "included_minutes", n => { IncludedMinutes = n.GetIntValue(); } }, + { "minutes_used_breakdown", n => { MinutesUsedBreakdown = n.GetObjectValue(global::Ayllu.Github.Client.Models.ActionsBillingUsage_minutes_used_breakdown.CreateFromDiscriminatorValue); } }, + { "total_minutes_used", n => { TotalMinutesUsed = n.GetIntValue(); } }, + { "total_paid_minutes_used", n => { TotalPaidMinutesUsed = n.GetIntValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteIntValue("included_minutes", IncludedMinutes); + writer.WriteObjectValue("minutes_used_breakdown", MinutesUsedBreakdown); + writer.WriteIntValue("total_minutes_used", TotalMinutesUsed); + writer.WriteIntValue("total_paid_minutes_used", TotalPaidMinutesUsed); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/ActionsBillingUsage_minutes_used_breakdown.cs b/src/Ayllu.Github.Client/Github/Client/Models/ActionsBillingUsage_minutes_used_breakdown.cs new file mode 100644 index 0000000..c34a6ce --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/ActionsBillingUsage_minutes_used_breakdown.cs @@ -0,0 +1,115 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class ActionsBillingUsage_minutes_used_breakdown : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// Total minutes used on macOS runner machines. + public int? MACOS { get; set; } + /// Total minutes used on macOS 12 core runner machines. + public int? Macos12Core { get; set; } + /// Total minutes used on all runner machines. + public int? Total { get; set; } + /// Total minutes used on Ubuntu runner machines. + public int? UBUNTU { get; set; } + /// Total minutes used on Ubuntu 16 core runner machines. + public int? Ubuntu16Core { get; set; } + /// Total minutes used on Ubuntu 32 core runner machines. + public int? Ubuntu32Core { get; set; } + /// Total minutes used on Ubuntu 4 core runner machines. + public int? Ubuntu4Core { get; set; } + /// Total minutes used on Ubuntu 64 core runner machines. + public int? Ubuntu64Core { get; set; } + /// Total minutes used on Ubuntu 8 core runner machines. + public int? Ubuntu8Core { get; set; } + /// Total minutes used on Windows runner machines. + public int? WINDOWS { get; set; } + /// Total minutes used on Windows 16 core runner machines. + public int? Windows16Core { get; set; } + /// Total minutes used on Windows 32 core runner machines. + public int? Windows32Core { get; set; } + /// Total minutes used on Windows 4 core runner machines. + public int? Windows4Core { get; set; } + /// Total minutes used on Windows 64 core runner machines. + public int? Windows64Core { get; set; } + /// Total minutes used on Windows 8 core runner machines. + public int? Windows8Core { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public ActionsBillingUsage_minutes_used_breakdown() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.ActionsBillingUsage_minutes_used_breakdown CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.ActionsBillingUsage_minutes_used_breakdown(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "MACOS", n => { MACOS = n.GetIntValue(); } }, + { "macos_12_core", n => { Macos12Core = n.GetIntValue(); } }, + { "total", n => { Total = n.GetIntValue(); } }, + { "UBUNTU", n => { UBUNTU = n.GetIntValue(); } }, + { "ubuntu_16_core", n => { Ubuntu16Core = n.GetIntValue(); } }, + { "ubuntu_32_core", n => { Ubuntu32Core = n.GetIntValue(); } }, + { "ubuntu_4_core", n => { Ubuntu4Core = n.GetIntValue(); } }, + { "ubuntu_64_core", n => { Ubuntu64Core = n.GetIntValue(); } }, + { "ubuntu_8_core", n => { Ubuntu8Core = n.GetIntValue(); } }, + { "WINDOWS", n => { WINDOWS = n.GetIntValue(); } }, + { "windows_16_core", n => { Windows16Core = n.GetIntValue(); } }, + { "windows_32_core", n => { Windows32Core = n.GetIntValue(); } }, + { "windows_4_core", n => { Windows4Core = n.GetIntValue(); } }, + { "windows_64_core", n => { Windows64Core = n.GetIntValue(); } }, + { "windows_8_core", n => { Windows8Core = n.GetIntValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteIntValue("MACOS", MACOS); + writer.WriteIntValue("macos_12_core", Macos12Core); + writer.WriteIntValue("total", Total); + writer.WriteIntValue("UBUNTU", UBUNTU); + writer.WriteIntValue("ubuntu_16_core", Ubuntu16Core); + writer.WriteIntValue("ubuntu_32_core", Ubuntu32Core); + writer.WriteIntValue("ubuntu_4_core", Ubuntu4Core); + writer.WriteIntValue("ubuntu_64_core", Ubuntu64Core); + writer.WriteIntValue("ubuntu_8_core", Ubuntu8Core); + writer.WriteIntValue("WINDOWS", WINDOWS); + writer.WriteIntValue("windows_16_core", Windows16Core); + writer.WriteIntValue("windows_32_core", Windows32Core); + writer.WriteIntValue("windows_4_core", Windows4Core); + writer.WriteIntValue("windows_64_core", Windows64Core); + writer.WriteIntValue("windows_8_core", Windows8Core); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/ActionsCacheList.cs b/src/Ayllu.Github.Client/Github/Client/Models/ActionsCacheList.cs new file mode 100644 index 0000000..2eca4d4 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/ActionsCacheList.cs @@ -0,0 +1,70 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + /// + /// Repository actions caches + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class ActionsCacheList : IAdditionalDataHolder, IParsable + { + /// Array of caches +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? ActionsCaches { get; set; } +#nullable restore +#else + public List ActionsCaches { get; set; } +#endif + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// Total number of caches + public int? TotalCount { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public ActionsCacheList() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.ActionsCacheList CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.ActionsCacheList(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "actions_caches", n => { ActionsCaches = n.GetCollectionOfObjectValues(global::Ayllu.Github.Client.Models.ActionsCacheList_actions_caches.CreateFromDiscriminatorValue)?.AsList(); } }, + { "total_count", n => { TotalCount = n.GetIntValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteCollectionOfObjectValues("actions_caches", ActionsCaches); + writer.WriteIntValue("total_count", TotalCount); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/ActionsCacheList_actions_caches.cs b/src/Ayllu.Github.Client/Github/Client/Models/ActionsCacheList_actions_caches.cs new file mode 100644 index 0000000..1615446 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/ActionsCacheList_actions_caches.cs @@ -0,0 +1,101 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class ActionsCacheList_actions_caches : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The created_at property + public DateTimeOffset? CreatedAt { get; set; } + /// The id property + public int? Id { get; set; } + /// The key property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Key { get; set; } +#nullable restore +#else + public string Key { get; set; } +#endif + /// The last_accessed_at property + public DateTimeOffset? LastAccessedAt { get; set; } + /// The ref property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Ref { get; set; } +#nullable restore +#else + public string Ref { get; set; } +#endif + /// The size_in_bytes property + public int? SizeInBytes { get; set; } + /// The version property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Version { get; set; } +#nullable restore +#else + public string Version { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public ActionsCacheList_actions_caches() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.ActionsCacheList_actions_caches CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.ActionsCacheList_actions_caches(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "created_at", n => { CreatedAt = n.GetDateTimeOffsetValue(); } }, + { "id", n => { Id = n.GetIntValue(); } }, + { "key", n => { Key = n.GetStringValue(); } }, + { "last_accessed_at", n => { LastAccessedAt = n.GetDateTimeOffsetValue(); } }, + { "ref", n => { Ref = n.GetStringValue(); } }, + { "size_in_bytes", n => { SizeInBytes = n.GetIntValue(); } }, + { "version", n => { Version = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteDateTimeOffsetValue("created_at", CreatedAt); + writer.WriteIntValue("id", Id); + writer.WriteStringValue("key", Key); + writer.WriteDateTimeOffsetValue("last_accessed_at", LastAccessedAt); + writer.WriteStringValue("ref", Ref); + writer.WriteIntValue("size_in_bytes", SizeInBytes); + writer.WriteStringValue("version", Version); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/ActionsCacheUsageByRepository.cs b/src/Ayllu.Github.Client/Github/Client/Models/ActionsCacheUsageByRepository.cs new file mode 100644 index 0000000..e7f3bde --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/ActionsCacheUsageByRepository.cs @@ -0,0 +1,74 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + /// + /// GitHub Actions Cache Usage by repository. + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class ActionsCacheUsageByRepository : IAdditionalDataHolder, IParsable + { + /// The number of active caches in the repository. + public int? ActiveCachesCount { get; set; } + /// The sum of the size in bytes of all the active cache items in the repository. + public int? ActiveCachesSizeInBytes { get; set; } + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The repository owner and name for the cache usage being shown. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? FullName { get; set; } +#nullable restore +#else + public string FullName { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public ActionsCacheUsageByRepository() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.ActionsCacheUsageByRepository CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.ActionsCacheUsageByRepository(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "active_caches_count", n => { ActiveCachesCount = n.GetIntValue(); } }, + { "active_caches_size_in_bytes", n => { ActiveCachesSizeInBytes = n.GetIntValue(); } }, + { "full_name", n => { FullName = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteIntValue("active_caches_count", ActiveCachesCount); + writer.WriteIntValue("active_caches_size_in_bytes", ActiveCachesSizeInBytes); + writer.WriteStringValue("full_name", FullName); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/ActionsCacheUsageOrgEnterprise.cs b/src/Ayllu.Github.Client/Github/Client/Models/ActionsCacheUsageOrgEnterprise.cs new file mode 100644 index 0000000..f7670e4 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/ActionsCacheUsageOrgEnterprise.cs @@ -0,0 +1,63 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class ActionsCacheUsageOrgEnterprise : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The count of active caches across all repositories of an enterprise or an organization. + public int? TotalActiveCachesCount { get; set; } + /// The total size in bytes of all active cache items across all repositories of an enterprise or an organization. + public int? TotalActiveCachesSizeInBytes { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public ActionsCacheUsageOrgEnterprise() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.ActionsCacheUsageOrgEnterprise CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.ActionsCacheUsageOrgEnterprise(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "total_active_caches_count", n => { TotalActiveCachesCount = n.GetIntValue(); } }, + { "total_active_caches_size_in_bytes", n => { TotalActiveCachesSizeInBytes = n.GetIntValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteIntValue("total_active_caches_count", TotalActiveCachesCount); + writer.WriteIntValue("total_active_caches_size_in_bytes", TotalActiveCachesSizeInBytes); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/ActionsDefaultWorkflowPermissions.cs b/src/Ayllu.Github.Client/Github/Client/Models/ActionsDefaultWorkflowPermissions.cs new file mode 100644 index 0000000..fd85ceb --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/ActionsDefaultWorkflowPermissions.cs @@ -0,0 +1,19 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Models +{ + /// The default workflow permissions granted to the GITHUB_TOKEN when running workflows. + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public enum ActionsDefaultWorkflowPermissions + { + [EnumMember(Value = "read")] + #pragma warning disable CS1591 + Read, + #pragma warning restore CS1591 + [EnumMember(Value = "write")] + #pragma warning disable CS1591 + Write, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Models/ActionsForkPrContributorApproval.cs b/src/Ayllu.Github.Client/Github/Client/Models/ActionsForkPrContributorApproval.cs new file mode 100644 index 0000000..4b29fac --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/ActionsForkPrContributorApproval.cs @@ -0,0 +1,59 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class ActionsForkPrContributorApproval : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The policy that controls when fork PR workflows require approval from a maintainer. + public global::Ayllu.Github.Client.Models.ActionsForkPrContributorApproval_approval_policy? ApprovalPolicy { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public ActionsForkPrContributorApproval() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.ActionsForkPrContributorApproval CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.ActionsForkPrContributorApproval(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "approval_policy", n => { ApprovalPolicy = n.GetEnumValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteEnumValue("approval_policy", ApprovalPolicy); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/ActionsForkPrContributorApproval_approval_policy.cs b/src/Ayllu.Github.Client/Github/Client/Models/ActionsForkPrContributorApproval_approval_policy.cs new file mode 100644 index 0000000..7f256d4 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/ActionsForkPrContributorApproval_approval_policy.cs @@ -0,0 +1,23 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Models +{ + /// The policy that controls when fork PR workflows require approval from a maintainer. + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public enum ActionsForkPrContributorApproval_approval_policy + { + [EnumMember(Value = "first_time_contributors_new_to_github")] + #pragma warning disable CS1591 + First_time_contributors_new_to_github, + #pragma warning restore CS1591 + [EnumMember(Value = "first_time_contributors")] + #pragma warning disable CS1591 + First_time_contributors, + #pragma warning restore CS1591 + [EnumMember(Value = "all_external_contributors")] + #pragma warning disable CS1591 + All_external_contributors, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Models/ActionsForkPrWorkflowsPrivateRepos.cs b/src/Ayllu.Github.Client/Github/Client/Models/ActionsForkPrWorkflowsPrivateRepos.cs new file mode 100644 index 0000000..0695337 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/ActionsForkPrWorkflowsPrivateRepos.cs @@ -0,0 +1,71 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class ActionsForkPrWorkflowsPrivateRepos : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// Whether workflows triggered by pull requests from forks require approval from a repository administrator to run. + public bool? RequireApprovalForForkPrWorkflows { get; set; } + /// Whether workflows triggered by pull requests from forks are allowed to run on private repositories. + public bool? RunWorkflowsFromForkPullRequests { get; set; } + /// Whether to make secrets and variables available to workflows triggered by pull requests from forks. + public bool? SendSecretsAndVariables { get; set; } + /// Whether GitHub Actions can create pull requests or submit approving pull request reviews from a workflow triggered by a fork pull request. + public bool? SendWriteTokensToWorkflows { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public ActionsForkPrWorkflowsPrivateRepos() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.ActionsForkPrWorkflowsPrivateRepos CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.ActionsForkPrWorkflowsPrivateRepos(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "require_approval_for_fork_pr_workflows", n => { RequireApprovalForForkPrWorkflows = n.GetBoolValue(); } }, + { "run_workflows_from_fork_pull_requests", n => { RunWorkflowsFromForkPullRequests = n.GetBoolValue(); } }, + { "send_secrets_and_variables", n => { SendSecretsAndVariables = n.GetBoolValue(); } }, + { "send_write_tokens_to_workflows", n => { SendWriteTokensToWorkflows = n.GetBoolValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteBoolValue("require_approval_for_fork_pr_workflows", RequireApprovalForForkPrWorkflows); + writer.WriteBoolValue("run_workflows_from_fork_pull_requests", RunWorkflowsFromForkPullRequests); + writer.WriteBoolValue("send_secrets_and_variables", SendSecretsAndVariables); + writer.WriteBoolValue("send_write_tokens_to_workflows", SendWriteTokensToWorkflows); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/ActionsForkPrWorkflowsPrivateReposRequest.cs b/src/Ayllu.Github.Client/Github/Client/Models/ActionsForkPrWorkflowsPrivateReposRequest.cs new file mode 100644 index 0000000..5d5ea58 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/ActionsForkPrWorkflowsPrivateReposRequest.cs @@ -0,0 +1,71 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class ActionsForkPrWorkflowsPrivateReposRequest : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// Whether workflows triggered by pull requests from forks require approval from a repository administrator to run. + public bool? RequireApprovalForForkPrWorkflows { get; set; } + /// Whether workflows triggered by pull requests from forks are allowed to run on private repositories. + public bool? RunWorkflowsFromForkPullRequests { get; set; } + /// Whether to make secrets and variables available to workflows triggered by pull requests from forks. + public bool? SendSecretsAndVariables { get; set; } + /// Whether GitHub Actions can create pull requests or submit approving pull request reviews from a workflow triggered by a fork pull request. + public bool? SendWriteTokensToWorkflows { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public ActionsForkPrWorkflowsPrivateReposRequest() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.ActionsForkPrWorkflowsPrivateReposRequest CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.ActionsForkPrWorkflowsPrivateReposRequest(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "require_approval_for_fork_pr_workflows", n => { RequireApprovalForForkPrWorkflows = n.GetBoolValue(); } }, + { "run_workflows_from_fork_pull_requests", n => { RunWorkflowsFromForkPullRequests = n.GetBoolValue(); } }, + { "send_secrets_and_variables", n => { SendSecretsAndVariables = n.GetBoolValue(); } }, + { "send_write_tokens_to_workflows", n => { SendWriteTokensToWorkflows = n.GetBoolValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteBoolValue("require_approval_for_fork_pr_workflows", RequireApprovalForForkPrWorkflows); + writer.WriteBoolValue("run_workflows_from_fork_pull_requests", RunWorkflowsFromForkPullRequests); + writer.WriteBoolValue("send_secrets_and_variables", SendSecretsAndVariables); + writer.WriteBoolValue("send_write_tokens_to_workflows", SendWriteTokensToWorkflows); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/ActionsGetDefaultWorkflowPermissions.cs b/src/Ayllu.Github.Client/Github/Client/Models/ActionsGetDefaultWorkflowPermissions.cs new file mode 100644 index 0000000..09a39b9 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/ActionsGetDefaultWorkflowPermissions.cs @@ -0,0 +1,63 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class ActionsGetDefaultWorkflowPermissions : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// Whether GitHub Actions can approve pull requests. Enabling this can be a security risk. + public bool? CanApprovePullRequestReviews { get; set; } + /// The default workflow permissions granted to the GITHUB_TOKEN when running workflows. + public global::Ayllu.Github.Client.Models.ActionsDefaultWorkflowPermissions? DefaultWorkflowPermissions { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public ActionsGetDefaultWorkflowPermissions() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.ActionsGetDefaultWorkflowPermissions CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.ActionsGetDefaultWorkflowPermissions(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "can_approve_pull_request_reviews", n => { CanApprovePullRequestReviews = n.GetBoolValue(); } }, + { "default_workflow_permissions", n => { DefaultWorkflowPermissions = n.GetEnumValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteBoolValue("can_approve_pull_request_reviews", CanApprovePullRequestReviews); + writer.WriteEnumValue("default_workflow_permissions", DefaultWorkflowPermissions); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/ActionsHostedRunner.cs b/src/Ayllu.Github.Client/Github/Client/Models/ActionsHostedRunner.cs new file mode 100644 index 0000000..d1b4b94 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/ActionsHostedRunner.cs @@ -0,0 +1,130 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + /// + /// A Github-hosted hosted runner. + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class ActionsHostedRunner : IAdditionalDataHolder, IParsable + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The unique identifier of the hosted runner. + public int? Id { get; set; } + /// Provides details of a hosted runner image +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.NullableActionsHostedRunnerPoolImage? ImageDetails { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.NullableActionsHostedRunnerPoolImage ImageDetails { get; set; } +#endif + /// The time at which the runner was last used, in ISO 8601 format. + public DateTimeOffset? LastActiveOn { get; set; } + /// Provides details of a particular machine spec. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.ActionsHostedRunnerMachineSpec? MachineSizeDetails { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.ActionsHostedRunnerMachineSpec MachineSizeDetails { get; set; } +#endif + /// The maximum amount of hosted runners. Runners will not scale automatically above this number. Use this setting to limit your cost. + public int? MaximumRunners { get; set; } + /// The name of the hosted runner. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Name { get; set; } +#nullable restore +#else + public string Name { get; set; } +#endif + /// The operating system of the image. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Platform { get; set; } +#nullable restore +#else + public string Platform { get; set; } +#endif + /// Whether public IP is enabled for the hosted runners. + public bool? PublicIpEnabled { get; set; } + /// The public IP ranges when public IP is enabled for the hosted runners. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? PublicIps { get; set; } +#nullable restore +#else + public List PublicIps { get; set; } +#endif + /// The unique identifier of the group that the hosted runner belongs to. + public int? RunnerGroupId { get; set; } + /// The status of the runner. + public global::Ayllu.Github.Client.Models.ActionsHostedRunner_status? Status { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public ActionsHostedRunner() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.ActionsHostedRunner CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.ActionsHostedRunner(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "id", n => { Id = n.GetIntValue(); } }, + { "image_details", n => { ImageDetails = n.GetObjectValue(global::Ayllu.Github.Client.Models.NullableActionsHostedRunnerPoolImage.CreateFromDiscriminatorValue); } }, + { "last_active_on", n => { LastActiveOn = n.GetDateTimeOffsetValue(); } }, + { "machine_size_details", n => { MachineSizeDetails = n.GetObjectValue(global::Ayllu.Github.Client.Models.ActionsHostedRunnerMachineSpec.CreateFromDiscriminatorValue); } }, + { "maximum_runners", n => { MaximumRunners = n.GetIntValue(); } }, + { "name", n => { Name = n.GetStringValue(); } }, + { "platform", n => { Platform = n.GetStringValue(); } }, + { "public_ip_enabled", n => { PublicIpEnabled = n.GetBoolValue(); } }, + { "public_ips", n => { PublicIps = n.GetCollectionOfObjectValues(global::Ayllu.Github.Client.Models.PublicIp.CreateFromDiscriminatorValue)?.AsList(); } }, + { "runner_group_id", n => { RunnerGroupId = n.GetIntValue(); } }, + { "status", n => { Status = n.GetEnumValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteIntValue("id", Id); + writer.WriteObjectValue("image_details", ImageDetails); + writer.WriteDateTimeOffsetValue("last_active_on", LastActiveOn); + writer.WriteObjectValue("machine_size_details", MachineSizeDetails); + writer.WriteIntValue("maximum_runners", MaximumRunners); + writer.WriteStringValue("name", Name); + writer.WriteStringValue("platform", Platform); + writer.WriteBoolValue("public_ip_enabled", PublicIpEnabled); + writer.WriteCollectionOfObjectValues("public_ips", PublicIps); + writer.WriteIntValue("runner_group_id", RunnerGroupId); + writer.WriteEnumValue("status", Status); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/ActionsHostedRunnerImage.cs b/src/Ayllu.Github.Client/Github/Client/Models/ActionsHostedRunnerImage.cs new file mode 100644 index 0000000..6379982 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/ActionsHostedRunnerImage.cs @@ -0,0 +1,94 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + /// + /// Provides details of a hosted runner image + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class ActionsHostedRunnerImage : IAdditionalDataHolder, IParsable + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// Display name for this image. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? DisplayName { get; set; } +#nullable restore +#else + public string DisplayName { get; set; } +#endif + /// The ID of the image. Use this ID for the `image` parameter when creating a new larger runner. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Id { get; set; } +#nullable restore +#else + public string Id { get; set; } +#endif + /// The operating system of the image. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Platform { get; set; } +#nullable restore +#else + public string Platform { get; set; } +#endif + /// Image size in GB. + public int? SizeGb { get; set; } + /// The image provider. + public global::Ayllu.Github.Client.Models.ActionsHostedRunnerImage_source? Source { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public ActionsHostedRunnerImage() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.ActionsHostedRunnerImage CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.ActionsHostedRunnerImage(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "display_name", n => { DisplayName = n.GetStringValue(); } }, + { "id", n => { Id = n.GetStringValue(); } }, + { "platform", n => { Platform = n.GetStringValue(); } }, + { "size_gb", n => { SizeGb = n.GetIntValue(); } }, + { "source", n => { Source = n.GetEnumValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("display_name", DisplayName); + writer.WriteStringValue("id", Id); + writer.WriteStringValue("platform", Platform); + writer.WriteIntValue("size_gb", SizeGb); + writer.WriteEnumValue("source", Source); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/ActionsHostedRunnerImage_source.cs b/src/Ayllu.Github.Client/Github/Client/Models/ActionsHostedRunnerImage_source.cs new file mode 100644 index 0000000..a5f2022 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/ActionsHostedRunnerImage_source.cs @@ -0,0 +1,23 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Models +{ + /// The image provider. + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public enum ActionsHostedRunnerImage_source + { + [EnumMember(Value = "github")] + #pragma warning disable CS1591 + Github, + #pragma warning restore CS1591 + [EnumMember(Value = "partner")] + #pragma warning disable CS1591 + Partner, + #pragma warning restore CS1591 + [EnumMember(Value = "custom")] + #pragma warning disable CS1591 + Custom, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Models/ActionsHostedRunnerLimits.cs b/src/Ayllu.Github.Client/Github/Client/Models/ActionsHostedRunnerLimits.cs new file mode 100644 index 0000000..b994109 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/ActionsHostedRunnerLimits.cs @@ -0,0 +1,65 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class ActionsHostedRunnerLimits : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// Provides details of static public IP limits for GitHub-hosted Hosted Runners +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.ActionsHostedRunnerLimits_public_ips? PublicIps { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.ActionsHostedRunnerLimits_public_ips PublicIps { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public ActionsHostedRunnerLimits() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.ActionsHostedRunnerLimits CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.ActionsHostedRunnerLimits(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "public_ips", n => { PublicIps = n.GetObjectValue(global::Ayllu.Github.Client.Models.ActionsHostedRunnerLimits_public_ips.CreateFromDiscriminatorValue); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteObjectValue("public_ips", PublicIps); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/ActionsHostedRunnerLimits_public_ips.cs b/src/Ayllu.Github.Client/Github/Client/Models/ActionsHostedRunnerLimits_public_ips.cs new file mode 100644 index 0000000..a34d3f4 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/ActionsHostedRunnerLimits_public_ips.cs @@ -0,0 +1,64 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + /// + /// Provides details of static public IP limits for GitHub-hosted Hosted Runners + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class ActionsHostedRunnerLimits_public_ips : IAdditionalDataHolder, IParsable + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The current number of static public IP addresses in use by Hosted Runners. + public int? CurrentUsage { get; set; } + /// The maximum number of static public IP addresses that can be used for Hosted Runners. + public int? Maximum { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public ActionsHostedRunnerLimits_public_ips() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.ActionsHostedRunnerLimits_public_ips CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.ActionsHostedRunnerLimits_public_ips(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "current_usage", n => { CurrentUsage = n.GetIntValue(); } }, + { "maximum", n => { Maximum = n.GetIntValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteIntValue("current_usage", CurrentUsage); + writer.WriteIntValue("maximum", Maximum); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/ActionsHostedRunnerMachineSpec.cs b/src/Ayllu.Github.Client/Github/Client/Models/ActionsHostedRunnerMachineSpec.cs new file mode 100644 index 0000000..de30986 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/ActionsHostedRunnerMachineSpec.cs @@ -0,0 +1,78 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + /// + /// Provides details of a particular machine spec. + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class ActionsHostedRunnerMachineSpec : IAdditionalDataHolder, IParsable + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The number of cores. + public int? CpuCores { get; set; } + /// The ID used for the `size` parameter when creating a new runner. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Id { get; set; } +#nullable restore +#else + public string Id { get; set; } +#endif + /// The available RAM for the machine spec. + public int? MemoryGb { get; set; } + /// The available SSD storage for the machine spec. + public int? StorageGb { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public ActionsHostedRunnerMachineSpec() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.ActionsHostedRunnerMachineSpec CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.ActionsHostedRunnerMachineSpec(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "cpu_cores", n => { CpuCores = n.GetIntValue(); } }, + { "id", n => { Id = n.GetStringValue(); } }, + { "memory_gb", n => { MemoryGb = n.GetIntValue(); } }, + { "storage_gb", n => { StorageGb = n.GetIntValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteIntValue("cpu_cores", CpuCores); + writer.WriteStringValue("id", Id); + writer.WriteIntValue("memory_gb", MemoryGb); + writer.WriteIntValue("storage_gb", StorageGb); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/ActionsHostedRunner_status.cs b/src/Ayllu.Github.Client/Github/Client/Models/ActionsHostedRunner_status.cs new file mode 100644 index 0000000..aff6d5b --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/ActionsHostedRunner_status.cs @@ -0,0 +1,31 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Models +{ + /// The status of the runner. + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public enum ActionsHostedRunner_status + { + [EnumMember(Value = "Ready")] + #pragma warning disable CS1591 + Ready, + #pragma warning restore CS1591 + [EnumMember(Value = "Provisioning")] + #pragma warning disable CS1591 + Provisioning, + #pragma warning restore CS1591 + [EnumMember(Value = "Shutdown")] + #pragma warning disable CS1591 + Shutdown, + #pragma warning restore CS1591 + [EnumMember(Value = "Deleting")] + #pragma warning disable CS1591 + Deleting, + #pragma warning restore CS1591 + [EnumMember(Value = "Stuck")] + #pragma warning disable CS1591 + Stuck, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Models/ActionsOrganizationPermissions.cs b/src/Ayllu.Github.Client/Github/Client/Models/ActionsOrganizationPermissions.cs new file mode 100644 index 0000000..88505e1 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/ActionsOrganizationPermissions.cs @@ -0,0 +1,87 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class ActionsOrganizationPermissions : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The permissions policy that controls the actions and reusable workflows that are allowed to run. + public global::Ayllu.Github.Client.Models.AllowedActions? AllowedActions { get; set; } + /// The policy that controls the repositories in the organization that are allowed to run GitHub Actions. + public global::Ayllu.Github.Client.Models.EnabledRepositories? EnabledRepositories { get; set; } + /// 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`. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? SelectedActionsUrl { get; set; } +#nullable restore +#else + public string SelectedActionsUrl { get; set; } +#endif + /// 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`. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? SelectedRepositoriesUrl { get; set; } +#nullable restore +#else + public string SelectedRepositoriesUrl { get; set; } +#endif + /// Whether actions must be pinned to a full-length commit SHA. + public bool? ShaPinningRequired { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public ActionsOrganizationPermissions() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.ActionsOrganizationPermissions CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.ActionsOrganizationPermissions(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "allowed_actions", n => { AllowedActions = n.GetEnumValue(); } }, + { "enabled_repositories", n => { EnabledRepositories = n.GetEnumValue(); } }, + { "selected_actions_url", n => { SelectedActionsUrl = n.GetStringValue(); } }, + { "selected_repositories_url", n => { SelectedRepositoriesUrl = n.GetStringValue(); } }, + { "sha_pinning_required", n => { ShaPinningRequired = n.GetBoolValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteEnumValue("allowed_actions", AllowedActions); + writer.WriteEnumValue("enabled_repositories", EnabledRepositories); + writer.WriteStringValue("selected_actions_url", SelectedActionsUrl); + writer.WriteStringValue("selected_repositories_url", SelectedRepositoriesUrl); + writer.WriteBoolValue("sha_pinning_required", ShaPinningRequired); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/ActionsPublicKey.cs b/src/Ayllu.Github.Client/Github/Client/Models/ActionsPublicKey.cs new file mode 100644 index 0000000..456d434 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/ActionsPublicKey.cs @@ -0,0 +1,110 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + /// + /// The public key used for setting Actions Secrets. + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class ActionsPublicKey : IAdditionalDataHolder, IParsable + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The created_at property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? CreatedAt { get; set; } +#nullable restore +#else + public string CreatedAt { get; set; } +#endif + /// The id property + public int? Id { get; set; } + /// The Base64 encoded public key. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Key { get; set; } +#nullable restore +#else + public string Key { get; set; } +#endif + /// The identifier for the key. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? KeyId { get; set; } +#nullable restore +#else + public string KeyId { get; set; } +#endif + /// The title property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Title { get; set; } +#nullable restore +#else + public string Title { get; set; } +#endif + /// The url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Url { get; set; } +#nullable restore +#else + public string Url { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public ActionsPublicKey() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.ActionsPublicKey CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.ActionsPublicKey(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "created_at", n => { CreatedAt = n.GetStringValue(); } }, + { "id", n => { Id = n.GetIntValue(); } }, + { "key", n => { Key = n.GetStringValue(); } }, + { "key_id", n => { KeyId = n.GetStringValue(); } }, + { "title", n => { Title = n.GetStringValue(); } }, + { "url", n => { Url = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("created_at", CreatedAt); + writer.WriteIntValue("id", Id); + writer.WriteStringValue("key", Key); + writer.WriteStringValue("key_id", KeyId); + writer.WriteStringValue("title", Title); + writer.WriteStringValue("url", Url); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/ActionsRepositoryPermissions.cs b/src/Ayllu.Github.Client/Github/Client/Models/ActionsRepositoryPermissions.cs new file mode 100644 index 0000000..494e5f7 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/ActionsRepositoryPermissions.cs @@ -0,0 +1,77 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class ActionsRepositoryPermissions : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The permissions policy that controls the actions and reusable workflows that are allowed to run. + public global::Ayllu.Github.Client.Models.AllowedActions? AllowedActions { get; set; } + /// Whether GitHub Actions is enabled on the repository. + public bool? Enabled { get; set; } + /// 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`. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? SelectedActionsUrl { get; set; } +#nullable restore +#else + public string SelectedActionsUrl { get; set; } +#endif + /// Whether actions must be pinned to a full-length commit SHA. + public bool? ShaPinningRequired { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public ActionsRepositoryPermissions() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.ActionsRepositoryPermissions CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.ActionsRepositoryPermissions(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "allowed_actions", n => { AllowedActions = n.GetEnumValue(); } }, + { "enabled", n => { Enabled = n.GetBoolValue(); } }, + { "selected_actions_url", n => { SelectedActionsUrl = n.GetStringValue(); } }, + { "sha_pinning_required", n => { ShaPinningRequired = n.GetBoolValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteEnumValue("allowed_actions", AllowedActions); + writer.WriteBoolValue("enabled", Enabled); + writer.WriteStringValue("selected_actions_url", SelectedActionsUrl); + writer.WriteBoolValue("sha_pinning_required", ShaPinningRequired); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/ActionsSecret.cs b/src/Ayllu.Github.Client/Github/Client/Models/ActionsSecret.cs new file mode 100644 index 0000000..af2a78a --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/ActionsSecret.cs @@ -0,0 +1,74 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + /// + /// Set secrets for GitHub Actions. + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class ActionsSecret : IAdditionalDataHolder, IParsable + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The created_at property + public DateTimeOffset? CreatedAt { get; set; } + /// The name of the secret. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Name { get; set; } +#nullable restore +#else + public string Name { get; set; } +#endif + /// The updated_at property + public DateTimeOffset? UpdatedAt { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public ActionsSecret() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.ActionsSecret CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.ActionsSecret(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "created_at", n => { CreatedAt = n.GetDateTimeOffsetValue(); } }, + { "name", n => { Name = n.GetStringValue(); } }, + { "updated_at", n => { UpdatedAt = n.GetDateTimeOffsetValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteDateTimeOffsetValue("created_at", CreatedAt); + writer.WriteStringValue("name", Name); + writer.WriteDateTimeOffsetValue("updated_at", UpdatedAt); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/ActionsSetDefaultWorkflowPermissions.cs b/src/Ayllu.Github.Client/Github/Client/Models/ActionsSetDefaultWorkflowPermissions.cs new file mode 100644 index 0000000..fd41e3e --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/ActionsSetDefaultWorkflowPermissions.cs @@ -0,0 +1,63 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class ActionsSetDefaultWorkflowPermissions : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// Whether GitHub Actions can approve pull requests. Enabling this can be a security risk. + public bool? CanApprovePullRequestReviews { get; set; } + /// The default workflow permissions granted to the GITHUB_TOKEN when running workflows. + public global::Ayllu.Github.Client.Models.ActionsDefaultWorkflowPermissions? DefaultWorkflowPermissions { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public ActionsSetDefaultWorkflowPermissions() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.ActionsSetDefaultWorkflowPermissions CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.ActionsSetDefaultWorkflowPermissions(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "can_approve_pull_request_reviews", n => { CanApprovePullRequestReviews = n.GetBoolValue(); } }, + { "default_workflow_permissions", n => { DefaultWorkflowPermissions = n.GetEnumValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteBoolValue("can_approve_pull_request_reviews", CanApprovePullRequestReviews); + writer.WriteEnumValue("default_workflow_permissions", DefaultWorkflowPermissions); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/ActionsVariable.cs b/src/Ayllu.Github.Client/Github/Client/Models/ActionsVariable.cs new file mode 100644 index 0000000..92c2edb --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/ActionsVariable.cs @@ -0,0 +1,83 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class ActionsVariable : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The date and time at which the variable was created, in ISO 8601 format':' YYYY-MM-DDTHH:MM:SSZ. + public DateTimeOffset? CreatedAt { get; set; } + /// The name of the variable. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Name { get; set; } +#nullable restore +#else + public string Name { get; set; } +#endif + /// The date and time at which the variable was last updated, in ISO 8601 format':' YYYY-MM-DDTHH:MM:SSZ. + public DateTimeOffset? UpdatedAt { get; set; } + /// The value of the variable. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Value { get; set; } +#nullable restore +#else + public string Value { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public ActionsVariable() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.ActionsVariable CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.ActionsVariable(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "created_at", n => { CreatedAt = n.GetDateTimeOffsetValue(); } }, + { "name", n => { Name = n.GetStringValue(); } }, + { "updated_at", n => { UpdatedAt = n.GetDateTimeOffsetValue(); } }, + { "value", n => { Value = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteDateTimeOffsetValue("created_at", CreatedAt); + writer.WriteStringValue("name", Name); + writer.WriteDateTimeOffsetValue("updated_at", UpdatedAt); + writer.WriteStringValue("value", Value); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/ActionsWorkflowAccessToRepository.cs b/src/Ayllu.Github.Client/Github/Client/Models/ActionsWorkflowAccessToRepository.cs new file mode 100644 index 0000000..c9dd44d --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/ActionsWorkflowAccessToRepository.cs @@ -0,0 +1,59 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class ActionsWorkflowAccessToRepository : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// 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. + public global::Ayllu.Github.Client.Models.ActionsWorkflowAccessToRepository_access_level? AccessLevel { get; set; } + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public ActionsWorkflowAccessToRepository() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.ActionsWorkflowAccessToRepository CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.ActionsWorkflowAccessToRepository(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "access_level", n => { AccessLevel = n.GetEnumValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteEnumValue("access_level", AccessLevel); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/ActionsWorkflowAccessToRepository_access_level.cs b/src/Ayllu.Github.Client/Github/Client/Models/ActionsWorkflowAccessToRepository_access_level.cs new file mode 100644 index 0000000..ed29a0e --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/ActionsWorkflowAccessToRepository_access_level.cs @@ -0,0 +1,23 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Models +{ + /// 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. + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public enum ActionsWorkflowAccessToRepository_access_level + { + [EnumMember(Value = "none")] + #pragma warning disable CS1591 + None, + #pragma warning restore CS1591 + [EnumMember(Value = "user")] + #pragma warning disable CS1591 + User, + #pragma warning restore CS1591 + [EnumMember(Value = "organization")] + #pragma warning disable CS1591 + Organization, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Models/Activity.cs b/src/Ayllu.Github.Client/Github/Client/Models/Activity.cs new file mode 100644 index 0000000..0fbbdfe --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/Activity.cs @@ -0,0 +1,118 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + /// + /// Activity + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class Activity : IAdditionalDataHolder, IParsable + { + /// The type of the activity that was performed. + public global::Ayllu.Github.Client.Models.Activity_activity_type? ActivityType { get; set; } + /// A GitHub user. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.NullableSimpleUser? Actor { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.NullableSimpleUser Actor { get; set; } +#endif + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The SHA of the commit after the activity. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? After { get; set; } +#nullable restore +#else + public string After { get; set; } +#endif + /// The SHA of the commit before the activity. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Before { get; set; } +#nullable restore +#else + public string Before { get; set; } +#endif + /// The id property + public int? Id { get; set; } + /// The node_id property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? NodeId { get; set; } +#nullable restore +#else + public string NodeId { get; set; } +#endif + /// The full Git reference, formatted as `refs/heads/<branch name>`. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Ref { get; set; } +#nullable restore +#else + public string Ref { get; set; } +#endif + /// The time when the activity occurred. + public DateTimeOffset? Timestamp { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public Activity() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.Activity CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.Activity(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "activity_type", n => { ActivityType = n.GetEnumValue(); } }, + { "actor", n => { Actor = n.GetObjectValue(global::Ayllu.Github.Client.Models.NullableSimpleUser.CreateFromDiscriminatorValue); } }, + { "after", n => { After = n.GetStringValue(); } }, + { "before", n => { Before = n.GetStringValue(); } }, + { "id", n => { Id = n.GetIntValue(); } }, + { "node_id", n => { NodeId = n.GetStringValue(); } }, + { "ref", n => { Ref = n.GetStringValue(); } }, + { "timestamp", n => { Timestamp = n.GetDateTimeOffsetValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteEnumValue("activity_type", ActivityType); + writer.WriteObjectValue("actor", Actor); + writer.WriteStringValue("after", After); + writer.WriteStringValue("before", Before); + writer.WriteIntValue("id", Id); + writer.WriteStringValue("node_id", NodeId); + writer.WriteStringValue("ref", Ref); + writer.WriteDateTimeOffsetValue("timestamp", Timestamp); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/Activity_activity_type.cs b/src/Ayllu.Github.Client/Github/Client/Models/Activity_activity_type.cs new file mode 100644 index 0000000..e47b213 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/Activity_activity_type.cs @@ -0,0 +1,35 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Models +{ + /// The type of the activity that was performed. + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public enum Activity_activity_type + { + [EnumMember(Value = "push")] + #pragma warning disable CS1591 + Push, + #pragma warning restore CS1591 + [EnumMember(Value = "force_push")] + #pragma warning disable CS1591 + Force_push, + #pragma warning restore CS1591 + [EnumMember(Value = "branch_deletion")] + #pragma warning disable CS1591 + Branch_deletion, + #pragma warning restore CS1591 + [EnumMember(Value = "branch_creation")] + #pragma warning disable CS1591 + Branch_creation, + #pragma warning restore CS1591 + [EnumMember(Value = "pr_merge")] + #pragma warning disable CS1591 + Pr_merge, + #pragma warning restore CS1591 + [EnumMember(Value = "merge_queue_merge")] + #pragma warning disable CS1591 + Merge_queue_merge, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Models/Actor.cs b/src/Ayllu.Github.Client/Github/Client/Models/Actor.cs new file mode 100644 index 0000000..9df3d7b --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/Actor.cs @@ -0,0 +1,110 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + /// + /// Actor + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class Actor : IAdditionalDataHolder, IParsable + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The avatar_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? AvatarUrl { get; set; } +#nullable restore +#else + public string AvatarUrl { get; set; } +#endif + /// The display_login property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? DisplayLogin { get; set; } +#nullable restore +#else + public string DisplayLogin { get; set; } +#endif + /// The gravatar_id property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? GravatarId { get; set; } +#nullable restore +#else + public string GravatarId { get; set; } +#endif + /// The id property + public int? Id { get; set; } + /// The login property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Login { get; set; } +#nullable restore +#else + public string Login { get; set; } +#endif + /// The url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Url { get; set; } +#nullable restore +#else + public string Url { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public Actor() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.Actor CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.Actor(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "avatar_url", n => { AvatarUrl = n.GetStringValue(); } }, + { "display_login", n => { DisplayLogin = n.GetStringValue(); } }, + { "gravatar_id", n => { GravatarId = n.GetStringValue(); } }, + { "id", n => { Id = n.GetIntValue(); } }, + { "login", n => { Login = n.GetStringValue(); } }, + { "url", n => { Url = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("avatar_url", AvatarUrl); + writer.WriteStringValue("display_login", DisplayLogin); + writer.WriteStringValue("gravatar_id", GravatarId); + writer.WriteIntValue("id", Id); + writer.WriteStringValue("login", Login); + writer.WriteStringValue("url", Url); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/AddedToProjectIssueEvent.cs b/src/Ayllu.Github.Client/Github/Client/Models/AddedToProjectIssueEvent.cs new file mode 100644 index 0000000..98c67fc --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/AddedToProjectIssueEvent.cs @@ -0,0 +1,150 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + /// + /// Added to Project Issue Event + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class AddedToProjectIssueEvent : IAdditionalDataHolder, IParsable + { + /// A GitHub user. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.SimpleUser? Actor { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.SimpleUser Actor { get; set; } +#endif + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The commit_id property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? CommitId { get; set; } +#nullable restore +#else + public string CommitId { get; set; } +#endif + /// The commit_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? CommitUrl { get; set; } +#nullable restore +#else + public string CommitUrl { get; set; } +#endif + /// The created_at property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? CreatedAt { get; set; } +#nullable restore +#else + public string CreatedAt { get; set; } +#endif + /// The event property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Event { get; set; } +#nullable restore +#else + public string Event { get; set; } +#endif + /// The id property + public int? Id { get; set; } + /// The node_id property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? NodeId { get; set; } +#nullable restore +#else + public string NodeId { get; set; } +#endif + /// 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. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.NullableIntegration? PerformedViaGithubApp { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.NullableIntegration PerformedViaGithubApp { get; set; } +#endif + /// The project_card property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.AddedToProjectIssueEvent_project_card? ProjectCard { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.AddedToProjectIssueEvent_project_card ProjectCard { get; set; } +#endif + /// The url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Url { get; set; } +#nullable restore +#else + public string Url { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public AddedToProjectIssueEvent() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.AddedToProjectIssueEvent CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.AddedToProjectIssueEvent(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "actor", n => { Actor = n.GetObjectValue(global::Ayllu.Github.Client.Models.SimpleUser.CreateFromDiscriminatorValue); } }, + { "commit_id", n => { CommitId = n.GetStringValue(); } }, + { "commit_url", n => { CommitUrl = n.GetStringValue(); } }, + { "created_at", n => { CreatedAt = n.GetStringValue(); } }, + { "event", n => { Event = n.GetStringValue(); } }, + { "id", n => { Id = n.GetIntValue(); } }, + { "node_id", n => { NodeId = n.GetStringValue(); } }, + { "performed_via_github_app", n => { PerformedViaGithubApp = n.GetObjectValue(global::Ayllu.Github.Client.Models.NullableIntegration.CreateFromDiscriminatorValue); } }, + { "project_card", n => { ProjectCard = n.GetObjectValue(global::Ayllu.Github.Client.Models.AddedToProjectIssueEvent_project_card.CreateFromDiscriminatorValue); } }, + { "url", n => { Url = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteObjectValue("actor", Actor); + writer.WriteStringValue("commit_id", CommitId); + writer.WriteStringValue("commit_url", CommitUrl); + writer.WriteStringValue("created_at", CreatedAt); + writer.WriteStringValue("event", Event); + writer.WriteIntValue("id", Id); + writer.WriteStringValue("node_id", NodeId); + writer.WriteObjectValue("performed_via_github_app", PerformedViaGithubApp); + writer.WriteObjectValue("project_card", ProjectCard); + writer.WriteStringValue("url", Url); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/AddedToProjectIssueEvent_project_card.cs b/src/Ayllu.Github.Client/Github/Client/Models/AddedToProjectIssueEvent_project_card.cs new file mode 100644 index 0000000..f9bd705 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/AddedToProjectIssueEvent_project_card.cs @@ -0,0 +1,103 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class AddedToProjectIssueEvent_project_card : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The column_name property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? ColumnName { get; set; } +#nullable restore +#else + public string ColumnName { get; set; } +#endif + /// The id property + public int? Id { get; set; } + /// The previous_column_name property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? PreviousColumnName { get; set; } +#nullable restore +#else + public string PreviousColumnName { get; set; } +#endif + /// The project_id property + public int? ProjectId { get; set; } + /// The project_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? ProjectUrl { get; set; } +#nullable restore +#else + public string ProjectUrl { get; set; } +#endif + /// The url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Url { get; set; } +#nullable restore +#else + public string Url { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public AddedToProjectIssueEvent_project_card() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.AddedToProjectIssueEvent_project_card CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.AddedToProjectIssueEvent_project_card(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "column_name", n => { ColumnName = n.GetStringValue(); } }, + { "id", n => { Id = n.GetIntValue(); } }, + { "previous_column_name", n => { PreviousColumnName = n.GetStringValue(); } }, + { "project_id", n => { ProjectId = n.GetIntValue(); } }, + { "project_url", n => { ProjectUrl = n.GetStringValue(); } }, + { "url", n => { Url = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("column_name", ColumnName); + writer.WriteIntValue("id", Id); + writer.WriteStringValue("previous_column_name", PreviousColumnName); + writer.WriteIntValue("project_id", ProjectId); + writer.WriteStringValue("project_url", ProjectUrl); + writer.WriteStringValue("url", Url); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/Alerts503Error.cs b/src/Ayllu.Github.Client/Github/Client/Models/Alerts503Error.cs new file mode 100644 index 0000000..3e89631 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/Alerts503Error.cs @@ -0,0 +1,88 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class Alerts503Error : ApiException, IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The code property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Code { get; set; } +#nullable restore +#else + public string Code { get; set; } +#endif + /// The documentation_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? DocumentationUrl { get; set; } +#nullable restore +#else + public string DocumentationUrl { get; set; } +#endif + /// The primary error message. + public override string Message { get => MessageEscaped ?? string.Empty; } + /// The message property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? MessageEscaped { get; set; } +#nullable restore +#else + public string MessageEscaped { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public Alerts503Error() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.Alerts503Error CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.Alerts503Error(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "code", n => { Code = n.GetStringValue(); } }, + { "documentation_url", n => { DocumentationUrl = n.GetStringValue(); } }, + { "message", n => { MessageEscaped = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("code", Code); + writer.WriteStringValue("documentation_url", DocumentationUrl); + writer.WriteStringValue("message", MessageEscaped); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/AllowedActions.cs b/src/Ayllu.Github.Client/Github/Client/Models/AllowedActions.cs new file mode 100644 index 0000000..bc0e24b --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/AllowedActions.cs @@ -0,0 +1,23 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Models +{ + /// The permissions policy that controls the actions and reusable workflows that are allowed to run. + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public enum AllowedActions + { + [EnumMember(Value = "all")] + #pragma warning disable CS1591 + All, + #pragma warning restore CS1591 + [EnumMember(Value = "local_only")] + #pragma warning disable CS1591 + Local_only, + #pragma warning restore CS1591 + [EnumMember(Value = "selected")] + #pragma warning disable CS1591 + Selected, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Models/Analyses503Error.cs b/src/Ayllu.Github.Client/Github/Client/Models/Analyses503Error.cs new file mode 100644 index 0000000..2297afb --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/Analyses503Error.cs @@ -0,0 +1,88 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class Analyses503Error : ApiException, IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The code property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Code { get; set; } +#nullable restore +#else + public string Code { get; set; } +#endif + /// The documentation_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? DocumentationUrl { get; set; } +#nullable restore +#else + public string DocumentationUrl { get; set; } +#endif + /// The primary error message. + public override string Message { get => MessageEscaped ?? string.Empty; } + /// The message property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? MessageEscaped { get; set; } +#nullable restore +#else + public string MessageEscaped { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public Analyses503Error() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.Analyses503Error CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.Analyses503Error(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "code", n => { Code = n.GetStringValue(); } }, + { "documentation_url", n => { DocumentationUrl = n.GetStringValue(); } }, + { "message", n => { MessageEscaped = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("code", Code); + writer.WriteStringValue("documentation_url", DocumentationUrl); + writer.WriteStringValue("message", MessageEscaped); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/ApiInsightsRouteStats.cs b/src/Ayllu.Github.Client/Github/Client/Models/ApiInsightsRouteStats.cs new file mode 100644 index 0000000..6c6dc5e --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/ApiInsightsRouteStats.cs @@ -0,0 +1,103 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class ApiInsightsRouteStats : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The API path's route template +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? ApiRoute { get; set; } +#nullable restore +#else + public string ApiRoute { get; set; } +#endif + /// The HTTP method +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? HttpMethod { get; set; } +#nullable restore +#else + public string HttpMethod { get; set; } +#endif + /// The last_rate_limited_timestamp property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? LastRateLimitedTimestamp { get; set; } +#nullable restore +#else + public string LastRateLimitedTimestamp { get; set; } +#endif + /// The last_request_timestamp property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? LastRequestTimestamp { get; set; } +#nullable restore +#else + public string LastRequestTimestamp { get; set; } +#endif + /// The total number of requests that were rate limited within the queried time period + public long? RateLimitedRequestCount { get; set; } + /// The total number of requests within the queried time period + public long? TotalRequestCount { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public ApiInsightsRouteStats() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.ApiInsightsRouteStats CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.ApiInsightsRouteStats(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "api_route", n => { ApiRoute = n.GetStringValue(); } }, + { "http_method", n => { HttpMethod = n.GetStringValue(); } }, + { "last_rate_limited_timestamp", n => { LastRateLimitedTimestamp = n.GetStringValue(); } }, + { "last_request_timestamp", n => { LastRequestTimestamp = n.GetStringValue(); } }, + { "rate_limited_request_count", n => { RateLimitedRequestCount = n.GetLongValue(); } }, + { "total_request_count", n => { TotalRequestCount = n.GetLongValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("api_route", ApiRoute); + writer.WriteStringValue("http_method", HttpMethod); + writer.WriteStringValue("last_rate_limited_timestamp", LastRateLimitedTimestamp); + writer.WriteStringValue("last_request_timestamp", LastRequestTimestamp); + writer.WriteLongValue("rate_limited_request_count", RateLimitedRequestCount); + writer.WriteLongValue("total_request_count", TotalRequestCount); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/ApiInsightsSubjectStats.cs b/src/Ayllu.Github.Client/Github/Client/Models/ApiInsightsSubjectStats.cs new file mode 100644 index 0000000..a72e8eb --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/ApiInsightsSubjectStats.cs @@ -0,0 +1,107 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class ApiInsightsSubjectStats : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The last_rate_limited_timestamp property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? LastRateLimitedTimestamp { get; set; } +#nullable restore +#else + public string LastRateLimitedTimestamp { get; set; } +#endif + /// The last_request_timestamp property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? LastRequestTimestamp { get; set; } +#nullable restore +#else + public string LastRequestTimestamp { get; set; } +#endif + /// The rate_limited_request_count property + public int? RateLimitedRequestCount { get; set; } + /// The subject_id property + public long? SubjectId { get; set; } + /// The subject_name property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? SubjectName { get; set; } +#nullable restore +#else + public string SubjectName { get; set; } +#endif + /// The subject_type property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? SubjectType { get; set; } +#nullable restore +#else + public string SubjectType { get; set; } +#endif + /// The total_request_count property + public int? TotalRequestCount { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public ApiInsightsSubjectStats() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.ApiInsightsSubjectStats CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.ApiInsightsSubjectStats(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "last_rate_limited_timestamp", n => { LastRateLimitedTimestamp = n.GetStringValue(); } }, + { "last_request_timestamp", n => { LastRequestTimestamp = n.GetStringValue(); } }, + { "rate_limited_request_count", n => { RateLimitedRequestCount = n.GetIntValue(); } }, + { "subject_id", n => { SubjectId = n.GetLongValue(); } }, + { "subject_name", n => { SubjectName = n.GetStringValue(); } }, + { "subject_type", n => { SubjectType = n.GetStringValue(); } }, + { "total_request_count", n => { TotalRequestCount = n.GetIntValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("last_rate_limited_timestamp", LastRateLimitedTimestamp); + writer.WriteStringValue("last_request_timestamp", LastRequestTimestamp); + writer.WriteIntValue("rate_limited_request_count", RateLimitedRequestCount); + writer.WriteLongValue("subject_id", SubjectId); + writer.WriteStringValue("subject_name", SubjectName); + writer.WriteStringValue("subject_type", SubjectType); + writer.WriteIntValue("total_request_count", TotalRequestCount); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/ApiInsightsSummaryStats.cs b/src/Ayllu.Github.Client/Github/Client/Models/ApiInsightsSummaryStats.cs new file mode 100644 index 0000000..8629407 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/ApiInsightsSummaryStats.cs @@ -0,0 +1,64 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + /// + /// API Insights usage summary stats for an organization + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class ApiInsightsSummaryStats : IAdditionalDataHolder, IParsable + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The total number of requests that were rate limited within the queried time period + public long? RateLimitedRequestCount { get; set; } + /// The total number of requests within the queried time period + public long? TotalRequestCount { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public ApiInsightsSummaryStats() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.ApiInsightsSummaryStats CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.ApiInsightsSummaryStats(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "rate_limited_request_count", n => { RateLimitedRequestCount = n.GetLongValue(); } }, + { "total_request_count", n => { TotalRequestCount = n.GetLongValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteLongValue("rate_limited_request_count", RateLimitedRequestCount); + writer.WriteLongValue("total_request_count", TotalRequestCount); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/ApiInsightsTimeStats.cs b/src/Ayllu.Github.Client/Github/Client/Models/ApiInsightsTimeStats.cs new file mode 100644 index 0000000..a69054b --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/ApiInsightsTimeStats.cs @@ -0,0 +1,73 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class ApiInsightsTimeStats : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The rate_limited_request_count property + public long? RateLimitedRequestCount { get; set; } + /// The timestamp property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Timestamp { get; set; } +#nullable restore +#else + public string Timestamp { get; set; } +#endif + /// The total_request_count property + public long? TotalRequestCount { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public ApiInsightsTimeStats() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.ApiInsightsTimeStats CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.ApiInsightsTimeStats(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "rate_limited_request_count", n => { RateLimitedRequestCount = n.GetLongValue(); } }, + { "timestamp", n => { Timestamp = n.GetStringValue(); } }, + { "total_request_count", n => { TotalRequestCount = n.GetLongValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteLongValue("rate_limited_request_count", RateLimitedRequestCount); + writer.WriteStringValue("timestamp", Timestamp); + writer.WriteLongValue("total_request_count", TotalRequestCount); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/ApiInsightsUserStats.cs b/src/Ayllu.Github.Client/Github/Client/Models/ApiInsightsUserStats.cs new file mode 100644 index 0000000..e77089b --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/ApiInsightsUserStats.cs @@ -0,0 +1,115 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class ApiInsightsUserStats : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// The actor_id property + public long? ActorId { get; set; } + /// The actor_name property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? ActorName { get; set; } +#nullable restore +#else + public string ActorName { get; set; } +#endif + /// The actor_type property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? ActorType { get; set; } +#nullable restore +#else + public string ActorType { get; set; } +#endif + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The integration_id property + public long? IntegrationId { get; set; } + /// The last_rate_limited_timestamp property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? LastRateLimitedTimestamp { get; set; } +#nullable restore +#else + public string LastRateLimitedTimestamp { get; set; } +#endif + /// The last_request_timestamp property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? LastRequestTimestamp { get; set; } +#nullable restore +#else + public string LastRequestTimestamp { get; set; } +#endif + /// The oauth_application_id property + public long? OauthApplicationId { get; set; } + /// The rate_limited_request_count property + public int? RateLimitedRequestCount { get; set; } + /// The total_request_count property + public int? TotalRequestCount { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public ApiInsightsUserStats() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.ApiInsightsUserStats CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.ApiInsightsUserStats(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "actor_id", n => { ActorId = n.GetLongValue(); } }, + { "actor_name", n => { ActorName = n.GetStringValue(); } }, + { "actor_type", n => { ActorType = n.GetStringValue(); } }, + { "integration_id", n => { IntegrationId = n.GetLongValue(); } }, + { "last_rate_limited_timestamp", n => { LastRateLimitedTimestamp = n.GetStringValue(); } }, + { "last_request_timestamp", n => { LastRequestTimestamp = n.GetStringValue(); } }, + { "oauth_application_id", n => { OauthApplicationId = n.GetLongValue(); } }, + { "rate_limited_request_count", n => { RateLimitedRequestCount = n.GetIntValue(); } }, + { "total_request_count", n => { TotalRequestCount = n.GetIntValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteLongValue("actor_id", ActorId); + writer.WriteStringValue("actor_name", ActorName); + writer.WriteStringValue("actor_type", ActorType); + writer.WriteLongValue("integration_id", IntegrationId); + writer.WriteStringValue("last_rate_limited_timestamp", LastRateLimitedTimestamp); + writer.WriteStringValue("last_request_timestamp", LastRequestTimestamp); + writer.WriteLongValue("oauth_application_id", OauthApplicationId); + writer.WriteIntValue("rate_limited_request_count", RateLimitedRequestCount); + writer.WriteIntValue("total_request_count", TotalRequestCount); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/ApiOverview.cs b/src/Ayllu.Github.Client/Github/Client/Models/ApiOverview.cs new file mode 100644 index 0000000..f4d6637 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/ApiOverview.cs @@ -0,0 +1,220 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + /// + /// Api Overview + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class ApiOverview : IAdditionalDataHolder, IParsable + { + /// The actions property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? Actions { get; set; } +#nullable restore +#else + public List Actions { get; set; } +#endif + /// The actions_macos property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? ActionsMacos { get; set; } +#nullable restore +#else + public List ActionsMacos { get; set; } +#endif + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The api property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? Api { get; set; } +#nullable restore +#else + public List Api { get; set; } +#endif + /// The codespaces property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? Codespaces { get; set; } +#nullable restore +#else + public List Codespaces { get; set; } +#endif + /// The copilot property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? Copilot { get; set; } +#nullable restore +#else + public List Copilot { get; set; } +#endif + /// The dependabot property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? Dependabot { get; set; } +#nullable restore +#else + public List Dependabot { get; set; } +#endif + /// The domains property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.ApiOverview_domains? Domains { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.ApiOverview_domains Domains { get; set; } +#endif + /// The git property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? Git { get; set; } +#nullable restore +#else + public List Git { get; set; } +#endif + /// The github_enterprise_importer property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? GithubEnterpriseImporter { get; set; } +#nullable restore +#else + public List GithubEnterpriseImporter { get; set; } +#endif + /// The hooks property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? Hooks { get; set; } +#nullable restore +#else + public List Hooks { get; set; } +#endif + /// The importer property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? Importer { get; set; } +#nullable restore +#else + public List Importer { get; set; } +#endif + /// The packages property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? Packages { get; set; } +#nullable restore +#else + public List Packages { get; set; } +#endif + /// The pages property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? Pages { get; set; } +#nullable restore +#else + public List Pages { get; set; } +#endif + /// The ssh_key_fingerprints property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.ApiOverview_ssh_key_fingerprints? SshKeyFingerprints { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.ApiOverview_ssh_key_fingerprints SshKeyFingerprints { get; set; } +#endif + /// The ssh_keys property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? SshKeys { get; set; } +#nullable restore +#else + public List SshKeys { get; set; } +#endif + /// The verifiable_password_authentication property + public bool? VerifiablePasswordAuthentication { get; set; } + /// The web property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? Web { get; set; } +#nullable restore +#else + public List Web { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public ApiOverview() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.ApiOverview CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.ApiOverview(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "actions", n => { Actions = n.GetCollectionOfPrimitiveValues()?.AsList(); } }, + { "actions_macos", n => { ActionsMacos = n.GetCollectionOfPrimitiveValues()?.AsList(); } }, + { "api", n => { Api = n.GetCollectionOfPrimitiveValues()?.AsList(); } }, + { "codespaces", n => { Codespaces = n.GetCollectionOfPrimitiveValues()?.AsList(); } }, + { "copilot", n => { Copilot = n.GetCollectionOfPrimitiveValues()?.AsList(); } }, + { "dependabot", n => { Dependabot = n.GetCollectionOfPrimitiveValues()?.AsList(); } }, + { "domains", n => { Domains = n.GetObjectValue(global::Ayllu.Github.Client.Models.ApiOverview_domains.CreateFromDiscriminatorValue); } }, + { "git", n => { Git = n.GetCollectionOfPrimitiveValues()?.AsList(); } }, + { "github_enterprise_importer", n => { GithubEnterpriseImporter = n.GetCollectionOfPrimitiveValues()?.AsList(); } }, + { "hooks", n => { Hooks = n.GetCollectionOfPrimitiveValues()?.AsList(); } }, + { "importer", n => { Importer = n.GetCollectionOfPrimitiveValues()?.AsList(); } }, + { "packages", n => { Packages = n.GetCollectionOfPrimitiveValues()?.AsList(); } }, + { "pages", n => { Pages = n.GetCollectionOfPrimitiveValues()?.AsList(); } }, + { "ssh_key_fingerprints", n => { SshKeyFingerprints = n.GetObjectValue(global::Ayllu.Github.Client.Models.ApiOverview_ssh_key_fingerprints.CreateFromDiscriminatorValue); } }, + { "ssh_keys", n => { SshKeys = n.GetCollectionOfPrimitiveValues()?.AsList(); } }, + { "verifiable_password_authentication", n => { VerifiablePasswordAuthentication = n.GetBoolValue(); } }, + { "web", n => { Web = n.GetCollectionOfPrimitiveValues()?.AsList(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteCollectionOfPrimitiveValues("actions", Actions); + writer.WriteCollectionOfPrimitiveValues("actions_macos", ActionsMacos); + writer.WriteCollectionOfPrimitiveValues("api", Api); + writer.WriteCollectionOfPrimitiveValues("codespaces", Codespaces); + writer.WriteCollectionOfPrimitiveValues("copilot", Copilot); + writer.WriteCollectionOfPrimitiveValues("dependabot", Dependabot); + writer.WriteObjectValue("domains", Domains); + writer.WriteCollectionOfPrimitiveValues("git", Git); + writer.WriteCollectionOfPrimitiveValues("github_enterprise_importer", GithubEnterpriseImporter); + writer.WriteCollectionOfPrimitiveValues("hooks", Hooks); + writer.WriteCollectionOfPrimitiveValues("importer", Importer); + writer.WriteCollectionOfPrimitiveValues("packages", Packages); + writer.WriteCollectionOfPrimitiveValues("pages", Pages); + writer.WriteObjectValue("ssh_key_fingerprints", SshKeyFingerprints); + writer.WriteCollectionOfPrimitiveValues("ssh_keys", SshKeys); + writer.WriteBoolValue("verifiable_password_authentication", VerifiablePasswordAuthentication); + writer.WriteCollectionOfPrimitiveValues("web", Web); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/ApiOverview_domains.cs b/src/Ayllu.Github.Client/Github/Client/Models/ApiOverview_domains.cs new file mode 100644 index 0000000..a12c123 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/ApiOverview_domains.cs @@ -0,0 +1,125 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class ApiOverview_domains : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// The actions property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? Actions { get; set; } +#nullable restore +#else + public List Actions { get; set; } +#endif + /// The actions_inbound property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.ApiOverview_domains_actions_inbound? ActionsInbound { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.ApiOverview_domains_actions_inbound ActionsInbound { get; set; } +#endif + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The artifact_attestations property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.ApiOverview_domains_artifact_attestations? ArtifactAttestations { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.ApiOverview_domains_artifact_attestations ArtifactAttestations { get; set; } +#endif + /// The codespaces property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? Codespaces { get; set; } +#nullable restore +#else + public List Codespaces { get; set; } +#endif + /// The copilot property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? Copilot { get; set; } +#nullable restore +#else + public List Copilot { get; set; } +#endif + /// The packages property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? Packages { get; set; } +#nullable restore +#else + public List Packages { get; set; } +#endif + /// The website property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? Website { get; set; } +#nullable restore +#else + public List Website { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public ApiOverview_domains() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.ApiOverview_domains CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.ApiOverview_domains(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "actions", n => { Actions = n.GetCollectionOfPrimitiveValues()?.AsList(); } }, + { "actions_inbound", n => { ActionsInbound = n.GetObjectValue(global::Ayllu.Github.Client.Models.ApiOverview_domains_actions_inbound.CreateFromDiscriminatorValue); } }, + { "artifact_attestations", n => { ArtifactAttestations = n.GetObjectValue(global::Ayllu.Github.Client.Models.ApiOverview_domains_artifact_attestations.CreateFromDiscriminatorValue); } }, + { "codespaces", n => { Codespaces = n.GetCollectionOfPrimitiveValues()?.AsList(); } }, + { "copilot", n => { Copilot = n.GetCollectionOfPrimitiveValues()?.AsList(); } }, + { "packages", n => { Packages = n.GetCollectionOfPrimitiveValues()?.AsList(); } }, + { "website", n => { Website = n.GetCollectionOfPrimitiveValues()?.AsList(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteCollectionOfPrimitiveValues("actions", Actions); + writer.WriteObjectValue("actions_inbound", ActionsInbound); + writer.WriteObjectValue("artifact_attestations", ArtifactAttestations); + writer.WriteCollectionOfPrimitiveValues("codespaces", Codespaces); + writer.WriteCollectionOfPrimitiveValues("copilot", Copilot); + writer.WriteCollectionOfPrimitiveValues("packages", Packages); + writer.WriteCollectionOfPrimitiveValues("website", Website); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/ApiOverview_domains_actions_inbound.cs b/src/Ayllu.Github.Client/Github/Client/Models/ApiOverview_domains_actions_inbound.cs new file mode 100644 index 0000000..78027e2 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/ApiOverview_domains_actions_inbound.cs @@ -0,0 +1,75 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class ApiOverview_domains_actions_inbound : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The full_domains property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? FullDomains { get; set; } +#nullable restore +#else + public List FullDomains { get; set; } +#endif + /// The wildcard_domains property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? WildcardDomains { get; set; } +#nullable restore +#else + public List WildcardDomains { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public ApiOverview_domains_actions_inbound() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.ApiOverview_domains_actions_inbound CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.ApiOverview_domains_actions_inbound(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "full_domains", n => { FullDomains = n.GetCollectionOfPrimitiveValues()?.AsList(); } }, + { "wildcard_domains", n => { WildcardDomains = n.GetCollectionOfPrimitiveValues()?.AsList(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteCollectionOfPrimitiveValues("full_domains", FullDomains); + writer.WriteCollectionOfPrimitiveValues("wildcard_domains", WildcardDomains); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/ApiOverview_domains_artifact_attestations.cs b/src/Ayllu.Github.Client/Github/Client/Models/ApiOverview_domains_artifact_attestations.cs new file mode 100644 index 0000000..973250d --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/ApiOverview_domains_artifact_attestations.cs @@ -0,0 +1,75 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class ApiOverview_domains_artifact_attestations : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The services property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? Services { get; set; } +#nullable restore +#else + public List Services { get; set; } +#endif + /// The trust_domain property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? TrustDomain { get; set; } +#nullable restore +#else + public string TrustDomain { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public ApiOverview_domains_artifact_attestations() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.ApiOverview_domains_artifact_attestations CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.ApiOverview_domains_artifact_attestations(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "services", n => { Services = n.GetCollectionOfPrimitiveValues()?.AsList(); } }, + { "trust_domain", n => { TrustDomain = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteCollectionOfPrimitiveValues("services", Services); + writer.WriteStringValue("trust_domain", TrustDomain); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/ApiOverview_ssh_key_fingerprints.cs b/src/Ayllu.Github.Client/Github/Client/Models/ApiOverview_ssh_key_fingerprints.cs new file mode 100644 index 0000000..1e88c47 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/ApiOverview_ssh_key_fingerprints.cs @@ -0,0 +1,95 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class ApiOverview_ssh_key_fingerprints : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The SHA256_DSA property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? SHA256DSA { get; set; } +#nullable restore +#else + public string SHA256DSA { get; set; } +#endif + /// The SHA256_ECDSA property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? SHA256ECDSA { get; set; } +#nullable restore +#else + public string SHA256ECDSA { get; set; } +#endif + /// The SHA256_ED25519 property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? SHA256ED25519 { get; set; } +#nullable restore +#else + public string SHA256ED25519 { get; set; } +#endif + /// The SHA256_RSA property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? SHA256RSA { get; set; } +#nullable restore +#else + public string SHA256RSA { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public ApiOverview_ssh_key_fingerprints() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.ApiOverview_ssh_key_fingerprints CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.ApiOverview_ssh_key_fingerprints(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "SHA256_DSA", n => { SHA256DSA = n.GetStringValue(); } }, + { "SHA256_ECDSA", n => { SHA256ECDSA = n.GetStringValue(); } }, + { "SHA256_ED25519", n => { SHA256ED25519 = n.GetStringValue(); } }, + { "SHA256_RSA", n => { SHA256RSA = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("SHA256_DSA", SHA256DSA); + writer.WriteStringValue("SHA256_ECDSA", SHA256ECDSA); + writer.WriteStringValue("SHA256_ED25519", SHA256ED25519); + writer.WriteStringValue("SHA256_RSA", SHA256RSA); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/AppPermissions.cs b/src/Ayllu.Github.Client/Github/Client/Models/AppPermissions.cs new file mode 100644 index 0000000..bc8e700 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/AppPermissions.cs @@ -0,0 +1,248 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + /// + /// The permissions granted to the user access token. + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class AppPermissions : IAdditionalDataHolder, IParsable + { + /// The level of permission to grant the access token for GitHub Actions workflows, workflow runs, and artifacts. + public global::Ayllu.Github.Client.Models.AppPermissions_actions? Actions { get; set; } + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The level of permission to grant the access token for repository creation, deletion, settings, teams, and collaborators creation. + public global::Ayllu.Github.Client.Models.AppPermissions_administration? Administration { get; set; } + /// The level of permission to grant the access token for checks on code. + public global::Ayllu.Github.Client.Models.AppPermissions_checks? Checks { get; set; } + /// The level of permission to grant the access token to create, edit, delete, and list Codespaces. + public global::Ayllu.Github.Client.Models.AppPermissions_codespaces? Codespaces { get; set; } + /// The level of permission to grant the access token for repository contents, commits, branches, downloads, releases, and merges. + public global::Ayllu.Github.Client.Models.AppPermissions_contents? Contents { get; set; } + /// The level of permission to grant the access token to manage Dependabot secrets. + public global::Ayllu.Github.Client.Models.AppPermissions_dependabot_secrets? DependabotSecrets { get; set; } + /// The level of permission to grant the access token for deployments and deployment statuses. + public global::Ayllu.Github.Client.Models.AppPermissions_deployments? Deployments { get; set; } + /// The level of permission to grant the access token to manage the email addresses belonging to a user. + public global::Ayllu.Github.Client.Models.AppPermissions_email_addresses? EmailAddresses { get; set; } + /// The level of permission to grant the access token for managing repository environments. + public global::Ayllu.Github.Client.Models.AppPermissions_environments? Environments { get; set; } + /// The level of permission to grant the access token to manage the followers belonging to a user. + public global::Ayllu.Github.Client.Models.AppPermissions_followers? Followers { get; set; } + /// The level of permission to grant the access token to manage git SSH keys. + public global::Ayllu.Github.Client.Models.AppPermissions_git_ssh_keys? GitSshKeys { get; set; } + /// The level of permission to grant the access token to view and manage GPG keys belonging to a user. + public global::Ayllu.Github.Client.Models.AppPermissions_gpg_keys? GpgKeys { get; set; } + /// The level of permission to grant the access token to view and manage interaction limits on a repository. + public global::Ayllu.Github.Client.Models.AppPermissions_interaction_limits? InteractionLimits { get; set; } + /// The level of permission to grant the access token for issues and related comments, assignees, labels, and milestones. + public global::Ayllu.Github.Client.Models.AppPermissions_issues? Issues { get; set; } + /// The level of permission to grant the access token for organization teams and members. + public global::Ayllu.Github.Client.Models.AppPermissions_members? Members { get; set; } + /// The level of permission to grant the access token to search repositories, list collaborators, and access repository metadata. + public global::Ayllu.Github.Client.Models.AppPermissions_metadata? Metadata { get; set; } + /// The level of permission to grant the access token to manage access to an organization. + public global::Ayllu.Github.Client.Models.AppPermissions_organization_administration? OrganizationAdministration { get; set; } + /// The level of permission to grant the access token to view and manage announcement banners for an organization. + public global::Ayllu.Github.Client.Models.AppPermissions_organization_announcement_banners? OrganizationAnnouncementBanners { get; set; } + /// 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 public preview and is subject to change. + public global::Ayllu.Github.Client.Models.AppPermissions_organization_copilot_seat_management? OrganizationCopilotSeatManagement { get; set; } + /// The level of permission to grant the access token for custom organization roles management. + public global::Ayllu.Github.Client.Models.AppPermissions_organization_custom_org_roles? OrganizationCustomOrgRoles { get; set; } + /// The level of permission to grant the access token for custom property management. + public global::Ayllu.Github.Client.Models.AppPermissions_organization_custom_properties? OrganizationCustomProperties { get; set; } + /// The level of permission to grant the access token for custom repository roles management. + public global::Ayllu.Github.Client.Models.AppPermissions_organization_custom_roles? OrganizationCustomRoles { get; set; } + /// The level of permission to grant the access token to view events triggered by an activity in an organization. + public global::Ayllu.Github.Client.Models.AppPermissions_organization_events? OrganizationEvents { get; set; } + /// The level of permission to grant the access token to manage the post-receive hooks for an organization. + public global::Ayllu.Github.Client.Models.AppPermissions_organization_hooks? OrganizationHooks { get; set; } + /// The level of permission to grant the access token for organization packages published to GitHub Packages. + public global::Ayllu.Github.Client.Models.AppPermissions_organization_packages? OrganizationPackages { get; set; } + /// 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. + public global::Ayllu.Github.Client.Models.AppPermissions_organization_personal_access_token_requests? OrganizationPersonalAccessTokenRequests { get; set; } + /// The level of permission to grant the access token for viewing and managing fine-grained personal access token requests to an organization. + public global::Ayllu.Github.Client.Models.AppPermissions_organization_personal_access_tokens? OrganizationPersonalAccessTokens { get; set; } + /// The level of permission to grant the access token for viewing an organization's plan. + public global::Ayllu.Github.Client.Models.AppPermissions_organization_plan? OrganizationPlan { get; set; } + /// The level of permission to grant the access token to manage organization projects and projects public preview (where available). + public global::Ayllu.Github.Client.Models.AppPermissions_organization_projects? OrganizationProjects { get; set; } + /// The level of permission to grant the access token to manage organization secrets. + public global::Ayllu.Github.Client.Models.AppPermissions_organization_secrets? OrganizationSecrets { get; set; } + /// The level of permission to grant the access token to view and manage GitHub Actions self-hosted runners available to an organization. + public global::Ayllu.Github.Client.Models.AppPermissions_organization_self_hosted_runners? OrganizationSelfHostedRunners { get; set; } + /// The level of permission to grant the access token to view and manage users blocked by the organization. + public global::Ayllu.Github.Client.Models.AppPermissions_organization_user_blocking? OrganizationUserBlocking { get; set; } + /// The level of permission to grant the access token for packages published to GitHub Packages. + public global::Ayllu.Github.Client.Models.AppPermissions_packages? Packages { get; set; } + /// The level of permission to grant the access token to retrieve Pages statuses, configuration, and builds, as well as create new builds. + public global::Ayllu.Github.Client.Models.AppPermissions_pages? Pages { get; set; } + /// The level of permission to grant the access token to manage the profile settings belonging to a user. + public global::Ayllu.Github.Client.Models.AppPermissions_profile? Profile { get; set; } + /// The level of permission to grant the access token for pull requests and related comments, assignees, labels, milestones, and merges. + public global::Ayllu.Github.Client.Models.AppPermissions_pull_requests? PullRequests { get; set; } + /// The level of permission to grant the access token to view and edit custom properties for a repository, when allowed by the property. + public global::Ayllu.Github.Client.Models.AppPermissions_repository_custom_properties? RepositoryCustomProperties { get; set; } + /// The level of permission to grant the access token to manage the post-receive hooks for a repository. + public global::Ayllu.Github.Client.Models.AppPermissions_repository_hooks? RepositoryHooks { get; set; } + /// The level of permission to grant the access token to manage repository projects, columns, and cards. + public global::Ayllu.Github.Client.Models.AppPermissions_repository_projects? RepositoryProjects { get; set; } + /// The level of permission to grant the access token to manage repository secrets. + public global::Ayllu.Github.Client.Models.AppPermissions_secrets? Secrets { get; set; } + /// The level of permission to grant the access token to view and manage secret scanning alerts. + public global::Ayllu.Github.Client.Models.AppPermissions_secret_scanning_alerts? SecretScanningAlerts { get; set; } + /// The level of permission to grant the access token to view and manage security events like code scanning alerts. + public global::Ayllu.Github.Client.Models.AppPermissions_security_events? SecurityEvents { get; set; } + /// The level of permission to grant the access token to manage just a single file. + public global::Ayllu.Github.Client.Models.AppPermissions_single_file? SingleFile { get; set; } + /// The level of permission to grant the access token to list and manage repositories a user is starring. + public global::Ayllu.Github.Client.Models.AppPermissions_starring? Starring { get; set; } + /// The level of permission to grant the access token for commit statuses. + public global::Ayllu.Github.Client.Models.AppPermissions_statuses? Statuses { get; set; } + /// The level of permission to grant the access token to manage team discussions and related comments. + public global::Ayllu.Github.Client.Models.AppPermissions_team_discussions? TeamDiscussions { get; set; } + /// The level of permission to grant the access token to manage Dependabot alerts. + public global::Ayllu.Github.Client.Models.AppPermissions_vulnerability_alerts? VulnerabilityAlerts { get; set; } + /// The level of permission to grant the access token to update GitHub Actions workflow files. + public global::Ayllu.Github.Client.Models.AppPermissions_workflows? Workflows { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public AppPermissions() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.AppPermissions CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.AppPermissions(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "actions", n => { Actions = n.GetEnumValue(); } }, + { "administration", n => { Administration = n.GetEnumValue(); } }, + { "checks", n => { Checks = n.GetEnumValue(); } }, + { "codespaces", n => { Codespaces = n.GetEnumValue(); } }, + { "contents", n => { Contents = n.GetEnumValue(); } }, + { "dependabot_secrets", n => { DependabotSecrets = n.GetEnumValue(); } }, + { "deployments", n => { Deployments = n.GetEnumValue(); } }, + { "email_addresses", n => { EmailAddresses = n.GetEnumValue(); } }, + { "environments", n => { Environments = n.GetEnumValue(); } }, + { "followers", n => { Followers = n.GetEnumValue(); } }, + { "git_ssh_keys", n => { GitSshKeys = n.GetEnumValue(); } }, + { "gpg_keys", n => { GpgKeys = n.GetEnumValue(); } }, + { "interaction_limits", n => { InteractionLimits = n.GetEnumValue(); } }, + { "issues", n => { Issues = n.GetEnumValue(); } }, + { "members", n => { Members = n.GetEnumValue(); } }, + { "metadata", n => { Metadata = n.GetEnumValue(); } }, + { "organization_administration", n => { OrganizationAdministration = n.GetEnumValue(); } }, + { "organization_announcement_banners", n => { OrganizationAnnouncementBanners = n.GetEnumValue(); } }, + { "organization_copilot_seat_management", n => { OrganizationCopilotSeatManagement = n.GetEnumValue(); } }, + { "organization_custom_org_roles", n => { OrganizationCustomOrgRoles = n.GetEnumValue(); } }, + { "organization_custom_properties", n => { OrganizationCustomProperties = n.GetEnumValue(); } }, + { "organization_custom_roles", n => { OrganizationCustomRoles = n.GetEnumValue(); } }, + { "organization_events", n => { OrganizationEvents = n.GetEnumValue(); } }, + { "organization_hooks", n => { OrganizationHooks = n.GetEnumValue(); } }, + { "organization_packages", n => { OrganizationPackages = n.GetEnumValue(); } }, + { "organization_personal_access_token_requests", n => { OrganizationPersonalAccessTokenRequests = n.GetEnumValue(); } }, + { "organization_personal_access_tokens", n => { OrganizationPersonalAccessTokens = n.GetEnumValue(); } }, + { "organization_plan", n => { OrganizationPlan = n.GetEnumValue(); } }, + { "organization_projects", n => { OrganizationProjects = n.GetEnumValue(); } }, + { "organization_secrets", n => { OrganizationSecrets = n.GetEnumValue(); } }, + { "organization_self_hosted_runners", n => { OrganizationSelfHostedRunners = n.GetEnumValue(); } }, + { "organization_user_blocking", n => { OrganizationUserBlocking = n.GetEnumValue(); } }, + { "packages", n => { Packages = n.GetEnumValue(); } }, + { "pages", n => { Pages = n.GetEnumValue(); } }, + { "profile", n => { Profile = n.GetEnumValue(); } }, + { "pull_requests", n => { PullRequests = n.GetEnumValue(); } }, + { "repository_custom_properties", n => { RepositoryCustomProperties = n.GetEnumValue(); } }, + { "repository_hooks", n => { RepositoryHooks = n.GetEnumValue(); } }, + { "repository_projects", n => { RepositoryProjects = n.GetEnumValue(); } }, + { "secret_scanning_alerts", n => { SecretScanningAlerts = n.GetEnumValue(); } }, + { "secrets", n => { Secrets = n.GetEnumValue(); } }, + { "security_events", n => { SecurityEvents = n.GetEnumValue(); } }, + { "single_file", n => { SingleFile = n.GetEnumValue(); } }, + { "starring", n => { Starring = n.GetEnumValue(); } }, + { "statuses", n => { Statuses = n.GetEnumValue(); } }, + { "team_discussions", n => { TeamDiscussions = n.GetEnumValue(); } }, + { "vulnerability_alerts", n => { VulnerabilityAlerts = n.GetEnumValue(); } }, + { "workflows", n => { Workflows = n.GetEnumValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteEnumValue("actions", Actions); + writer.WriteEnumValue("administration", Administration); + writer.WriteEnumValue("checks", Checks); + writer.WriteEnumValue("codespaces", Codespaces); + writer.WriteEnumValue("contents", Contents); + writer.WriteEnumValue("dependabot_secrets", DependabotSecrets); + writer.WriteEnumValue("deployments", Deployments); + writer.WriteEnumValue("email_addresses", EmailAddresses); + writer.WriteEnumValue("environments", Environments); + writer.WriteEnumValue("followers", Followers); + writer.WriteEnumValue("git_ssh_keys", GitSshKeys); + writer.WriteEnumValue("gpg_keys", GpgKeys); + writer.WriteEnumValue("interaction_limits", InteractionLimits); + writer.WriteEnumValue("issues", Issues); + writer.WriteEnumValue("members", Members); + writer.WriteEnumValue("metadata", Metadata); + writer.WriteEnumValue("organization_administration", OrganizationAdministration); + writer.WriteEnumValue("organization_announcement_banners", OrganizationAnnouncementBanners); + writer.WriteEnumValue("organization_copilot_seat_management", OrganizationCopilotSeatManagement); + writer.WriteEnumValue("organization_custom_org_roles", OrganizationCustomOrgRoles); + writer.WriteEnumValue("organization_custom_properties", OrganizationCustomProperties); + writer.WriteEnumValue("organization_custom_roles", OrganizationCustomRoles); + writer.WriteEnumValue("organization_events", OrganizationEvents); + writer.WriteEnumValue("organization_hooks", OrganizationHooks); + writer.WriteEnumValue("organization_packages", OrganizationPackages); + writer.WriteEnumValue("organization_personal_access_token_requests", OrganizationPersonalAccessTokenRequests); + writer.WriteEnumValue("organization_personal_access_tokens", OrganizationPersonalAccessTokens); + writer.WriteEnumValue("organization_plan", OrganizationPlan); + writer.WriteEnumValue("organization_projects", OrganizationProjects); + writer.WriteEnumValue("organization_secrets", OrganizationSecrets); + writer.WriteEnumValue("organization_self_hosted_runners", OrganizationSelfHostedRunners); + writer.WriteEnumValue("organization_user_blocking", OrganizationUserBlocking); + writer.WriteEnumValue("packages", Packages); + writer.WriteEnumValue("pages", Pages); + writer.WriteEnumValue("profile", Profile); + writer.WriteEnumValue("pull_requests", PullRequests); + writer.WriteEnumValue("repository_custom_properties", RepositoryCustomProperties); + writer.WriteEnumValue("repository_hooks", RepositoryHooks); + writer.WriteEnumValue("repository_projects", RepositoryProjects); + writer.WriteEnumValue("secrets", Secrets); + writer.WriteEnumValue("secret_scanning_alerts", SecretScanningAlerts); + writer.WriteEnumValue("security_events", SecurityEvents); + writer.WriteEnumValue("single_file", SingleFile); + writer.WriteEnumValue("starring", Starring); + writer.WriteEnumValue("statuses", Statuses); + writer.WriteEnumValue("team_discussions", TeamDiscussions); + writer.WriteEnumValue("vulnerability_alerts", VulnerabilityAlerts); + writer.WriteEnumValue("workflows", Workflows); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/AppPermissions_actions.cs b/src/Ayllu.Github.Client/Github/Client/Models/AppPermissions_actions.cs new file mode 100644 index 0000000..89041bc --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/AppPermissions_actions.cs @@ -0,0 +1,19 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Models +{ + /// The level of permission to grant the access token for GitHub Actions workflows, workflow runs, and artifacts. + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public enum AppPermissions_actions + { + [EnumMember(Value = "read")] + #pragma warning disable CS1591 + Read, + #pragma warning restore CS1591 + [EnumMember(Value = "write")] + #pragma warning disable CS1591 + Write, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Models/AppPermissions_administration.cs b/src/Ayllu.Github.Client/Github/Client/Models/AppPermissions_administration.cs new file mode 100644 index 0000000..ba151e2 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/AppPermissions_administration.cs @@ -0,0 +1,19 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Models +{ + /// The level of permission to grant the access token for repository creation, deletion, settings, teams, and collaborators creation. + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public enum AppPermissions_administration + { + [EnumMember(Value = "read")] + #pragma warning disable CS1591 + Read, + #pragma warning restore CS1591 + [EnumMember(Value = "write")] + #pragma warning disable CS1591 + Write, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Models/AppPermissions_checks.cs b/src/Ayllu.Github.Client/Github/Client/Models/AppPermissions_checks.cs new file mode 100644 index 0000000..a7d3555 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/AppPermissions_checks.cs @@ -0,0 +1,19 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Models +{ + /// The level of permission to grant the access token for checks on code. + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public enum AppPermissions_checks + { + [EnumMember(Value = "read")] + #pragma warning disable CS1591 + Read, + #pragma warning restore CS1591 + [EnumMember(Value = "write")] + #pragma warning disable CS1591 + Write, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Models/AppPermissions_codespaces.cs b/src/Ayllu.Github.Client/Github/Client/Models/AppPermissions_codespaces.cs new file mode 100644 index 0000000..c07e649 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/AppPermissions_codespaces.cs @@ -0,0 +1,19 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Models +{ + /// The level of permission to grant the access token to create, edit, delete, and list Codespaces. + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public enum AppPermissions_codespaces + { + [EnumMember(Value = "read")] + #pragma warning disable CS1591 + Read, + #pragma warning restore CS1591 + [EnumMember(Value = "write")] + #pragma warning disable CS1591 + Write, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Models/AppPermissions_contents.cs b/src/Ayllu.Github.Client/Github/Client/Models/AppPermissions_contents.cs new file mode 100644 index 0000000..59c6a5e --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/AppPermissions_contents.cs @@ -0,0 +1,19 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Models +{ + /// The level of permission to grant the access token for repository contents, commits, branches, downloads, releases, and merges. + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public enum AppPermissions_contents + { + [EnumMember(Value = "read")] + #pragma warning disable CS1591 + Read, + #pragma warning restore CS1591 + [EnumMember(Value = "write")] + #pragma warning disable CS1591 + Write, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Models/AppPermissions_dependabot_secrets.cs b/src/Ayllu.Github.Client/Github/Client/Models/AppPermissions_dependabot_secrets.cs new file mode 100644 index 0000000..84ba218 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/AppPermissions_dependabot_secrets.cs @@ -0,0 +1,19 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Models +{ + /// The level of permission to grant the access token to manage Dependabot secrets. + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public enum AppPermissions_dependabot_secrets + { + [EnumMember(Value = "read")] + #pragma warning disable CS1591 + Read, + #pragma warning restore CS1591 + [EnumMember(Value = "write")] + #pragma warning disable CS1591 + Write, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Models/AppPermissions_deployments.cs b/src/Ayllu.Github.Client/Github/Client/Models/AppPermissions_deployments.cs new file mode 100644 index 0000000..05e8a02 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/AppPermissions_deployments.cs @@ -0,0 +1,19 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Models +{ + /// The level of permission to grant the access token for deployments and deployment statuses. + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public enum AppPermissions_deployments + { + [EnumMember(Value = "read")] + #pragma warning disable CS1591 + Read, + #pragma warning restore CS1591 + [EnumMember(Value = "write")] + #pragma warning disable CS1591 + Write, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Models/AppPermissions_email_addresses.cs b/src/Ayllu.Github.Client/Github/Client/Models/AppPermissions_email_addresses.cs new file mode 100644 index 0000000..1bbb30e --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/AppPermissions_email_addresses.cs @@ -0,0 +1,19 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Models +{ + /// The level of permission to grant the access token to manage the email addresses belonging to a user. + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public enum AppPermissions_email_addresses + { + [EnumMember(Value = "read")] + #pragma warning disable CS1591 + Read, + #pragma warning restore CS1591 + [EnumMember(Value = "write")] + #pragma warning disable CS1591 + Write, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Models/AppPermissions_environments.cs b/src/Ayllu.Github.Client/Github/Client/Models/AppPermissions_environments.cs new file mode 100644 index 0000000..dbe320c --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/AppPermissions_environments.cs @@ -0,0 +1,19 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Models +{ + /// The level of permission to grant the access token for managing repository environments. + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public enum AppPermissions_environments + { + [EnumMember(Value = "read")] + #pragma warning disable CS1591 + Read, + #pragma warning restore CS1591 + [EnumMember(Value = "write")] + #pragma warning disable CS1591 + Write, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Models/AppPermissions_followers.cs b/src/Ayllu.Github.Client/Github/Client/Models/AppPermissions_followers.cs new file mode 100644 index 0000000..59d910a --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/AppPermissions_followers.cs @@ -0,0 +1,19 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Models +{ + /// The level of permission to grant the access token to manage the followers belonging to a user. + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public enum AppPermissions_followers + { + [EnumMember(Value = "read")] + #pragma warning disable CS1591 + Read, + #pragma warning restore CS1591 + [EnumMember(Value = "write")] + #pragma warning disable CS1591 + Write, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Models/AppPermissions_git_ssh_keys.cs b/src/Ayllu.Github.Client/Github/Client/Models/AppPermissions_git_ssh_keys.cs new file mode 100644 index 0000000..b2a8ca2 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/AppPermissions_git_ssh_keys.cs @@ -0,0 +1,19 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Models +{ + /// The level of permission to grant the access token to manage git SSH keys. + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public enum AppPermissions_git_ssh_keys + { + [EnumMember(Value = "read")] + #pragma warning disable CS1591 + Read, + #pragma warning restore CS1591 + [EnumMember(Value = "write")] + #pragma warning disable CS1591 + Write, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Models/AppPermissions_gpg_keys.cs b/src/Ayllu.Github.Client/Github/Client/Models/AppPermissions_gpg_keys.cs new file mode 100644 index 0000000..e54bf70 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/AppPermissions_gpg_keys.cs @@ -0,0 +1,19 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Models +{ + /// The level of permission to grant the access token to view and manage GPG keys belonging to a user. + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public enum AppPermissions_gpg_keys + { + [EnumMember(Value = "read")] + #pragma warning disable CS1591 + Read, + #pragma warning restore CS1591 + [EnumMember(Value = "write")] + #pragma warning disable CS1591 + Write, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Models/AppPermissions_interaction_limits.cs b/src/Ayllu.Github.Client/Github/Client/Models/AppPermissions_interaction_limits.cs new file mode 100644 index 0000000..b3282c1 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/AppPermissions_interaction_limits.cs @@ -0,0 +1,19 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Models +{ + /// The level of permission to grant the access token to view and manage interaction limits on a repository. + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public enum AppPermissions_interaction_limits + { + [EnumMember(Value = "read")] + #pragma warning disable CS1591 + Read, + #pragma warning restore CS1591 + [EnumMember(Value = "write")] + #pragma warning disable CS1591 + Write, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Models/AppPermissions_issues.cs b/src/Ayllu.Github.Client/Github/Client/Models/AppPermissions_issues.cs new file mode 100644 index 0000000..00fbb77 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/AppPermissions_issues.cs @@ -0,0 +1,19 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Models +{ + /// The level of permission to grant the access token for issues and related comments, assignees, labels, and milestones. + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public enum AppPermissions_issues + { + [EnumMember(Value = "read")] + #pragma warning disable CS1591 + Read, + #pragma warning restore CS1591 + [EnumMember(Value = "write")] + #pragma warning disable CS1591 + Write, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Models/AppPermissions_members.cs b/src/Ayllu.Github.Client/Github/Client/Models/AppPermissions_members.cs new file mode 100644 index 0000000..5ae27cf --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/AppPermissions_members.cs @@ -0,0 +1,19 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Models +{ + /// The level of permission to grant the access token for organization teams and members. + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public enum AppPermissions_members + { + [EnumMember(Value = "read")] + #pragma warning disable CS1591 + Read, + #pragma warning restore CS1591 + [EnumMember(Value = "write")] + #pragma warning disable CS1591 + Write, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Models/AppPermissions_metadata.cs b/src/Ayllu.Github.Client/Github/Client/Models/AppPermissions_metadata.cs new file mode 100644 index 0000000..2bd9e69 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/AppPermissions_metadata.cs @@ -0,0 +1,19 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Models +{ + /// The level of permission to grant the access token to search repositories, list collaborators, and access repository metadata. + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public enum AppPermissions_metadata + { + [EnumMember(Value = "read")] + #pragma warning disable CS1591 + Read, + #pragma warning restore CS1591 + [EnumMember(Value = "write")] + #pragma warning disable CS1591 + Write, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Models/AppPermissions_organization_administration.cs b/src/Ayllu.Github.Client/Github/Client/Models/AppPermissions_organization_administration.cs new file mode 100644 index 0000000..d252b5c --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/AppPermissions_organization_administration.cs @@ -0,0 +1,19 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Models +{ + /// The level of permission to grant the access token to manage access to an organization. + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public enum AppPermissions_organization_administration + { + [EnumMember(Value = "read")] + #pragma warning disable CS1591 + Read, + #pragma warning restore CS1591 + [EnumMember(Value = "write")] + #pragma warning disable CS1591 + Write, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Models/AppPermissions_organization_announcement_banners.cs b/src/Ayllu.Github.Client/Github/Client/Models/AppPermissions_organization_announcement_banners.cs new file mode 100644 index 0000000..b5af054 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/AppPermissions_organization_announcement_banners.cs @@ -0,0 +1,19 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Models +{ + /// The level of permission to grant the access token to view and manage announcement banners for an organization. + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public enum AppPermissions_organization_announcement_banners + { + [EnumMember(Value = "read")] + #pragma warning disable CS1591 + Read, + #pragma warning restore CS1591 + [EnumMember(Value = "write")] + #pragma warning disable CS1591 + Write, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Models/AppPermissions_organization_copilot_seat_management.cs b/src/Ayllu.Github.Client/Github/Client/Models/AppPermissions_organization_copilot_seat_management.cs new file mode 100644 index 0000000..16524db --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/AppPermissions_organization_copilot_seat_management.cs @@ -0,0 +1,15 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Models +{ + /// 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 public preview and is subject to change. + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public enum AppPermissions_organization_copilot_seat_management + { + [EnumMember(Value = "write")] + #pragma warning disable CS1591 + Write, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Models/AppPermissions_organization_custom_org_roles.cs b/src/Ayllu.Github.Client/Github/Client/Models/AppPermissions_organization_custom_org_roles.cs new file mode 100644 index 0000000..2e4abf9 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/AppPermissions_organization_custom_org_roles.cs @@ -0,0 +1,19 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Models +{ + /// The level of permission to grant the access token for custom organization roles management. + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public enum AppPermissions_organization_custom_org_roles + { + [EnumMember(Value = "read")] + #pragma warning disable CS1591 + Read, + #pragma warning restore CS1591 + [EnumMember(Value = "write")] + #pragma warning disable CS1591 + Write, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Models/AppPermissions_organization_custom_properties.cs b/src/Ayllu.Github.Client/Github/Client/Models/AppPermissions_organization_custom_properties.cs new file mode 100644 index 0000000..c8cf4f6 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/AppPermissions_organization_custom_properties.cs @@ -0,0 +1,23 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Models +{ + /// The level of permission to grant the access token for custom property management. + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public enum AppPermissions_organization_custom_properties + { + [EnumMember(Value = "read")] + #pragma warning disable CS1591 + Read, + #pragma warning restore CS1591 + [EnumMember(Value = "write")] + #pragma warning disable CS1591 + Write, + #pragma warning restore CS1591 + [EnumMember(Value = "admin")] + #pragma warning disable CS1591 + Admin, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Models/AppPermissions_organization_custom_roles.cs b/src/Ayllu.Github.Client/Github/Client/Models/AppPermissions_organization_custom_roles.cs new file mode 100644 index 0000000..4fb05f0 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/AppPermissions_organization_custom_roles.cs @@ -0,0 +1,19 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Models +{ + /// The level of permission to grant the access token for custom repository roles management. + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public enum AppPermissions_organization_custom_roles + { + [EnumMember(Value = "read")] + #pragma warning disable CS1591 + Read, + #pragma warning restore CS1591 + [EnumMember(Value = "write")] + #pragma warning disable CS1591 + Write, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Models/AppPermissions_organization_events.cs b/src/Ayllu.Github.Client/Github/Client/Models/AppPermissions_organization_events.cs new file mode 100644 index 0000000..4157bb7 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/AppPermissions_organization_events.cs @@ -0,0 +1,15 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Models +{ + /// The level of permission to grant the access token to view events triggered by an activity in an organization. + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public enum AppPermissions_organization_events + { + [EnumMember(Value = "read")] + #pragma warning disable CS1591 + Read, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Models/AppPermissions_organization_hooks.cs b/src/Ayllu.Github.Client/Github/Client/Models/AppPermissions_organization_hooks.cs new file mode 100644 index 0000000..d97abe4 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/AppPermissions_organization_hooks.cs @@ -0,0 +1,19 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Models +{ + /// The level of permission to grant the access token to manage the post-receive hooks for an organization. + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public enum AppPermissions_organization_hooks + { + [EnumMember(Value = "read")] + #pragma warning disable CS1591 + Read, + #pragma warning restore CS1591 + [EnumMember(Value = "write")] + #pragma warning disable CS1591 + Write, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Models/AppPermissions_organization_packages.cs b/src/Ayllu.Github.Client/Github/Client/Models/AppPermissions_organization_packages.cs new file mode 100644 index 0000000..da200d2 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/AppPermissions_organization_packages.cs @@ -0,0 +1,19 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Models +{ + /// The level of permission to grant the access token for organization packages published to GitHub Packages. + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public enum AppPermissions_organization_packages + { + [EnumMember(Value = "read")] + #pragma warning disable CS1591 + Read, + #pragma warning restore CS1591 + [EnumMember(Value = "write")] + #pragma warning disable CS1591 + Write, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Models/AppPermissions_organization_personal_access_token_requests.cs b/src/Ayllu.Github.Client/Github/Client/Models/AppPermissions_organization_personal_access_token_requests.cs new file mode 100644 index 0000000..bdf677b --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/AppPermissions_organization_personal_access_token_requests.cs @@ -0,0 +1,19 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Models +{ + /// 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. + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public enum AppPermissions_organization_personal_access_token_requests + { + [EnumMember(Value = "read")] + #pragma warning disable CS1591 + Read, + #pragma warning restore CS1591 + [EnumMember(Value = "write")] + #pragma warning disable CS1591 + Write, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Models/AppPermissions_organization_personal_access_tokens.cs b/src/Ayllu.Github.Client/Github/Client/Models/AppPermissions_organization_personal_access_tokens.cs new file mode 100644 index 0000000..8b4a306 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/AppPermissions_organization_personal_access_tokens.cs @@ -0,0 +1,19 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Models +{ + /// The level of permission to grant the access token for viewing and managing fine-grained personal access token requests to an organization. + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public enum AppPermissions_organization_personal_access_tokens + { + [EnumMember(Value = "read")] + #pragma warning disable CS1591 + Read, + #pragma warning restore CS1591 + [EnumMember(Value = "write")] + #pragma warning disable CS1591 + Write, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Models/AppPermissions_organization_plan.cs b/src/Ayllu.Github.Client/Github/Client/Models/AppPermissions_organization_plan.cs new file mode 100644 index 0000000..05be940 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/AppPermissions_organization_plan.cs @@ -0,0 +1,15 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Models +{ + /// The level of permission to grant the access token for viewing an organization's plan. + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public enum AppPermissions_organization_plan + { + [EnumMember(Value = "read")] + #pragma warning disable CS1591 + Read, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Models/AppPermissions_organization_projects.cs b/src/Ayllu.Github.Client/Github/Client/Models/AppPermissions_organization_projects.cs new file mode 100644 index 0000000..3f56ccb --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/AppPermissions_organization_projects.cs @@ -0,0 +1,23 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Models +{ + /// The level of permission to grant the access token to manage organization projects and projects public preview (where available). + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public enum AppPermissions_organization_projects + { + [EnumMember(Value = "read")] + #pragma warning disable CS1591 + Read, + #pragma warning restore CS1591 + [EnumMember(Value = "write")] + #pragma warning disable CS1591 + Write, + #pragma warning restore CS1591 + [EnumMember(Value = "admin")] + #pragma warning disable CS1591 + Admin, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Models/AppPermissions_organization_secrets.cs b/src/Ayllu.Github.Client/Github/Client/Models/AppPermissions_organization_secrets.cs new file mode 100644 index 0000000..abf9025 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/AppPermissions_organization_secrets.cs @@ -0,0 +1,19 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Models +{ + /// The level of permission to grant the access token to manage organization secrets. + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public enum AppPermissions_organization_secrets + { + [EnumMember(Value = "read")] + #pragma warning disable CS1591 + Read, + #pragma warning restore CS1591 + [EnumMember(Value = "write")] + #pragma warning disable CS1591 + Write, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Models/AppPermissions_organization_self_hosted_runners.cs b/src/Ayllu.Github.Client/Github/Client/Models/AppPermissions_organization_self_hosted_runners.cs new file mode 100644 index 0000000..e8a7984 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/AppPermissions_organization_self_hosted_runners.cs @@ -0,0 +1,19 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Models +{ + /// The level of permission to grant the access token to view and manage GitHub Actions self-hosted runners available to an organization. + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public enum AppPermissions_organization_self_hosted_runners + { + [EnumMember(Value = "read")] + #pragma warning disable CS1591 + Read, + #pragma warning restore CS1591 + [EnumMember(Value = "write")] + #pragma warning disable CS1591 + Write, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Models/AppPermissions_organization_user_blocking.cs b/src/Ayllu.Github.Client/Github/Client/Models/AppPermissions_organization_user_blocking.cs new file mode 100644 index 0000000..ccd5559 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/AppPermissions_organization_user_blocking.cs @@ -0,0 +1,19 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Models +{ + /// The level of permission to grant the access token to view and manage users blocked by the organization. + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public enum AppPermissions_organization_user_blocking + { + [EnumMember(Value = "read")] + #pragma warning disable CS1591 + Read, + #pragma warning restore CS1591 + [EnumMember(Value = "write")] + #pragma warning disable CS1591 + Write, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Models/AppPermissions_packages.cs b/src/Ayllu.Github.Client/Github/Client/Models/AppPermissions_packages.cs new file mode 100644 index 0000000..c10dcea --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/AppPermissions_packages.cs @@ -0,0 +1,19 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Models +{ + /// The level of permission to grant the access token for packages published to GitHub Packages. + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public enum AppPermissions_packages + { + [EnumMember(Value = "read")] + #pragma warning disable CS1591 + Read, + #pragma warning restore CS1591 + [EnumMember(Value = "write")] + #pragma warning disable CS1591 + Write, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Models/AppPermissions_pages.cs b/src/Ayllu.Github.Client/Github/Client/Models/AppPermissions_pages.cs new file mode 100644 index 0000000..694972c --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/AppPermissions_pages.cs @@ -0,0 +1,19 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Models +{ + /// The level of permission to grant the access token to retrieve Pages statuses, configuration, and builds, as well as create new builds. + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public enum AppPermissions_pages + { + [EnumMember(Value = "read")] + #pragma warning disable CS1591 + Read, + #pragma warning restore CS1591 + [EnumMember(Value = "write")] + #pragma warning disable CS1591 + Write, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Models/AppPermissions_profile.cs b/src/Ayllu.Github.Client/Github/Client/Models/AppPermissions_profile.cs new file mode 100644 index 0000000..a814258 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/AppPermissions_profile.cs @@ -0,0 +1,15 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Models +{ + /// The level of permission to grant the access token to manage the profile settings belonging to a user. + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public enum AppPermissions_profile + { + [EnumMember(Value = "write")] + #pragma warning disable CS1591 + Write, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Models/AppPermissions_pull_requests.cs b/src/Ayllu.Github.Client/Github/Client/Models/AppPermissions_pull_requests.cs new file mode 100644 index 0000000..b05ce9e --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/AppPermissions_pull_requests.cs @@ -0,0 +1,19 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Models +{ + /// The level of permission to grant the access token for pull requests and related comments, assignees, labels, milestones, and merges. + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public enum AppPermissions_pull_requests + { + [EnumMember(Value = "read")] + #pragma warning disable CS1591 + Read, + #pragma warning restore CS1591 + [EnumMember(Value = "write")] + #pragma warning disable CS1591 + Write, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Models/AppPermissions_repository_custom_properties.cs b/src/Ayllu.Github.Client/Github/Client/Models/AppPermissions_repository_custom_properties.cs new file mode 100644 index 0000000..c3b0254 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/AppPermissions_repository_custom_properties.cs @@ -0,0 +1,19 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Models +{ + /// The level of permission to grant the access token to view and edit custom properties for a repository, when allowed by the property. + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public enum AppPermissions_repository_custom_properties + { + [EnumMember(Value = "read")] + #pragma warning disable CS1591 + Read, + #pragma warning restore CS1591 + [EnumMember(Value = "write")] + #pragma warning disable CS1591 + Write, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Models/AppPermissions_repository_hooks.cs b/src/Ayllu.Github.Client/Github/Client/Models/AppPermissions_repository_hooks.cs new file mode 100644 index 0000000..21b90bd --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/AppPermissions_repository_hooks.cs @@ -0,0 +1,19 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Models +{ + /// The level of permission to grant the access token to manage the post-receive hooks for a repository. + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public enum AppPermissions_repository_hooks + { + [EnumMember(Value = "read")] + #pragma warning disable CS1591 + Read, + #pragma warning restore CS1591 + [EnumMember(Value = "write")] + #pragma warning disable CS1591 + Write, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Models/AppPermissions_repository_projects.cs b/src/Ayllu.Github.Client/Github/Client/Models/AppPermissions_repository_projects.cs new file mode 100644 index 0000000..bf39593 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/AppPermissions_repository_projects.cs @@ -0,0 +1,23 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Models +{ + /// The level of permission to grant the access token to manage repository projects, columns, and cards. + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public enum AppPermissions_repository_projects + { + [EnumMember(Value = "read")] + #pragma warning disable CS1591 + Read, + #pragma warning restore CS1591 + [EnumMember(Value = "write")] + #pragma warning disable CS1591 + Write, + #pragma warning restore CS1591 + [EnumMember(Value = "admin")] + #pragma warning disable CS1591 + Admin, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Models/AppPermissions_secret_scanning_alerts.cs b/src/Ayllu.Github.Client/Github/Client/Models/AppPermissions_secret_scanning_alerts.cs new file mode 100644 index 0000000..eccb71f --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/AppPermissions_secret_scanning_alerts.cs @@ -0,0 +1,19 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Models +{ + /// The level of permission to grant the access token to view and manage secret scanning alerts. + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public enum AppPermissions_secret_scanning_alerts + { + [EnumMember(Value = "read")] + #pragma warning disable CS1591 + Read, + #pragma warning restore CS1591 + [EnumMember(Value = "write")] + #pragma warning disable CS1591 + Write, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Models/AppPermissions_secrets.cs b/src/Ayllu.Github.Client/Github/Client/Models/AppPermissions_secrets.cs new file mode 100644 index 0000000..23fef40 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/AppPermissions_secrets.cs @@ -0,0 +1,19 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Models +{ + /// The level of permission to grant the access token to manage repository secrets. + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public enum AppPermissions_secrets + { + [EnumMember(Value = "read")] + #pragma warning disable CS1591 + Read, + #pragma warning restore CS1591 + [EnumMember(Value = "write")] + #pragma warning disable CS1591 + Write, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Models/AppPermissions_security_events.cs b/src/Ayllu.Github.Client/Github/Client/Models/AppPermissions_security_events.cs new file mode 100644 index 0000000..882fa1a --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/AppPermissions_security_events.cs @@ -0,0 +1,19 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Models +{ + /// The level of permission to grant the access token to view and manage security events like code scanning alerts. + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public enum AppPermissions_security_events + { + [EnumMember(Value = "read")] + #pragma warning disable CS1591 + Read, + #pragma warning restore CS1591 + [EnumMember(Value = "write")] + #pragma warning disable CS1591 + Write, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Models/AppPermissions_single_file.cs b/src/Ayllu.Github.Client/Github/Client/Models/AppPermissions_single_file.cs new file mode 100644 index 0000000..a0c4be3 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/AppPermissions_single_file.cs @@ -0,0 +1,19 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Models +{ + /// The level of permission to grant the access token to manage just a single file. + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public enum AppPermissions_single_file + { + [EnumMember(Value = "read")] + #pragma warning disable CS1591 + Read, + #pragma warning restore CS1591 + [EnumMember(Value = "write")] + #pragma warning disable CS1591 + Write, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Models/AppPermissions_starring.cs b/src/Ayllu.Github.Client/Github/Client/Models/AppPermissions_starring.cs new file mode 100644 index 0000000..12acd74 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/AppPermissions_starring.cs @@ -0,0 +1,19 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Models +{ + /// The level of permission to grant the access token to list and manage repositories a user is starring. + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public enum AppPermissions_starring + { + [EnumMember(Value = "read")] + #pragma warning disable CS1591 + Read, + #pragma warning restore CS1591 + [EnumMember(Value = "write")] + #pragma warning disable CS1591 + Write, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Models/AppPermissions_statuses.cs b/src/Ayllu.Github.Client/Github/Client/Models/AppPermissions_statuses.cs new file mode 100644 index 0000000..7183487 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/AppPermissions_statuses.cs @@ -0,0 +1,19 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Models +{ + /// The level of permission to grant the access token for commit statuses. + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public enum AppPermissions_statuses + { + [EnumMember(Value = "read")] + #pragma warning disable CS1591 + Read, + #pragma warning restore CS1591 + [EnumMember(Value = "write")] + #pragma warning disable CS1591 + Write, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Models/AppPermissions_team_discussions.cs b/src/Ayllu.Github.Client/Github/Client/Models/AppPermissions_team_discussions.cs new file mode 100644 index 0000000..810da58 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/AppPermissions_team_discussions.cs @@ -0,0 +1,19 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Models +{ + /// The level of permission to grant the access token to manage team discussions and related comments. + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public enum AppPermissions_team_discussions + { + [EnumMember(Value = "read")] + #pragma warning disable CS1591 + Read, + #pragma warning restore CS1591 + [EnumMember(Value = "write")] + #pragma warning disable CS1591 + Write, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Models/AppPermissions_vulnerability_alerts.cs b/src/Ayllu.Github.Client/Github/Client/Models/AppPermissions_vulnerability_alerts.cs new file mode 100644 index 0000000..5f8ff97 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/AppPermissions_vulnerability_alerts.cs @@ -0,0 +1,19 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Models +{ + /// The level of permission to grant the access token to manage Dependabot alerts. + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public enum AppPermissions_vulnerability_alerts + { + [EnumMember(Value = "read")] + #pragma warning disable CS1591 + Read, + #pragma warning restore CS1591 + [EnumMember(Value = "write")] + #pragma warning disable CS1591 + Write, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Models/AppPermissions_workflows.cs b/src/Ayllu.Github.Client/Github/Client/Models/AppPermissions_workflows.cs new file mode 100644 index 0000000..50b1f8b --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/AppPermissions_workflows.cs @@ -0,0 +1,15 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Models +{ + /// The level of permission to grant the access token to update GitHub Actions workflow files. + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public enum AppPermissions_workflows + { + [EnumMember(Value = "write")] + #pragma warning disable CS1591 + Write, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Models/Artifact.cs b/src/Ayllu.Github.Client/Github/Client/Models/Artifact.cs new file mode 100644 index 0000000..32dfbe6 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/Artifact.cs @@ -0,0 +1,140 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + /// + /// An artifact + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class Artifact : IAdditionalDataHolder, IParsable + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The archive_download_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? ArchiveDownloadUrl { get; set; } +#nullable restore +#else + public string ArchiveDownloadUrl { get; set; } +#endif + /// The created_at property + public DateTimeOffset? CreatedAt { get; set; } + /// The SHA256 digest of the artifact. This field will only be populated on artifacts uploaded with upload-artifact v4 or newer. For older versions, this field will be null. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Digest { get; set; } +#nullable restore +#else + public string Digest { get; set; } +#endif + /// Whether or not the artifact has expired. + public bool? Expired { get; set; } + /// The expires_at property + public DateTimeOffset? ExpiresAt { get; set; } + /// The id property + public int? Id { get; set; } + /// The name of the artifact. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Name { get; set; } +#nullable restore +#else + public string Name { get; set; } +#endif + /// The node_id property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? NodeId { get; set; } +#nullable restore +#else + public string NodeId { get; set; } +#endif + /// The size in bytes of the artifact. + public int? SizeInBytes { get; set; } + /// The updated_at property + public DateTimeOffset? UpdatedAt { get; set; } + /// The url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Url { get; set; } +#nullable restore +#else + public string Url { get; set; } +#endif + /// The workflow_run property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.Artifact_workflow_run? WorkflowRun { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.Artifact_workflow_run WorkflowRun { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public Artifact() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.Artifact CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.Artifact(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "archive_download_url", n => { ArchiveDownloadUrl = n.GetStringValue(); } }, + { "created_at", n => { CreatedAt = n.GetDateTimeOffsetValue(); } }, + { "digest", n => { Digest = n.GetStringValue(); } }, + { "expired", n => { Expired = n.GetBoolValue(); } }, + { "expires_at", n => { ExpiresAt = n.GetDateTimeOffsetValue(); } }, + { "id", n => { Id = n.GetIntValue(); } }, + { "name", n => { Name = n.GetStringValue(); } }, + { "node_id", n => { NodeId = n.GetStringValue(); } }, + { "size_in_bytes", n => { SizeInBytes = n.GetIntValue(); } }, + { "updated_at", n => { UpdatedAt = n.GetDateTimeOffsetValue(); } }, + { "url", n => { Url = n.GetStringValue(); } }, + { "workflow_run", n => { WorkflowRun = n.GetObjectValue(global::Ayllu.Github.Client.Models.Artifact_workflow_run.CreateFromDiscriminatorValue); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("archive_download_url", ArchiveDownloadUrl); + writer.WriteDateTimeOffsetValue("created_at", CreatedAt); + writer.WriteStringValue("digest", Digest); + writer.WriteBoolValue("expired", Expired); + writer.WriteDateTimeOffsetValue("expires_at", ExpiresAt); + writer.WriteIntValue("id", Id); + writer.WriteStringValue("name", Name); + writer.WriteStringValue("node_id", NodeId); + writer.WriteIntValue("size_in_bytes", SizeInBytes); + writer.WriteDateTimeOffsetValue("updated_at", UpdatedAt); + writer.WriteStringValue("url", Url); + writer.WriteObjectValue("workflow_run", WorkflowRun); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/Artifact_workflow_run.cs b/src/Ayllu.Github.Client/Github/Client/Models/Artifact_workflow_run.cs new file mode 100644 index 0000000..d5e55f3 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/Artifact_workflow_run.cs @@ -0,0 +1,87 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class Artifact_workflow_run : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The head_branch property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? HeadBranch { get; set; } +#nullable restore +#else + public string HeadBranch { get; set; } +#endif + /// The head_repository_id property + public int? HeadRepositoryId { get; set; } + /// The head_sha property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? HeadSha { get; set; } +#nullable restore +#else + public string HeadSha { get; set; } +#endif + /// The id property + public int? Id { get; set; } + /// The repository_id property + public int? RepositoryId { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public Artifact_workflow_run() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.Artifact_workflow_run CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.Artifact_workflow_run(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "head_branch", n => { HeadBranch = n.GetStringValue(); } }, + { "head_repository_id", n => { HeadRepositoryId = n.GetIntValue(); } }, + { "head_sha", n => { HeadSha = n.GetStringValue(); } }, + { "id", n => { Id = n.GetIntValue(); } }, + { "repository_id", n => { RepositoryId = n.GetIntValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("head_branch", HeadBranch); + writer.WriteIntValue("head_repository_id", HeadRepositoryId); + writer.WriteStringValue("head_sha", HeadSha); + writer.WriteIntValue("id", Id); + writer.WriteIntValue("repository_id", RepositoryId); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/AssignedIssueEvent.cs b/src/Ayllu.Github.Client/Github/Client/Models/AssignedIssueEvent.cs new file mode 100644 index 0000000..525d2e5 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/AssignedIssueEvent.cs @@ -0,0 +1,160 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + /// + /// Assigned Issue Event + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class AssignedIssueEvent : IAdditionalDataHolder, IParsable + { + /// A GitHub user. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.SimpleUser? Actor { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.SimpleUser Actor { get; set; } +#endif + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// A GitHub user. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.SimpleUser? Assignee { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.SimpleUser Assignee { get; set; } +#endif + /// A GitHub user. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.SimpleUser? Assigner { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.SimpleUser Assigner { get; set; } +#endif + /// The commit_id property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? CommitId { get; set; } +#nullable restore +#else + public string CommitId { get; set; } +#endif + /// The commit_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? CommitUrl { get; set; } +#nullable restore +#else + public string CommitUrl { get; set; } +#endif + /// The created_at property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? CreatedAt { get; set; } +#nullable restore +#else + public string CreatedAt { get; set; } +#endif + /// The event property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Event { get; set; } +#nullable restore +#else + public string Event { get; set; } +#endif + /// The id property + public int? Id { get; set; } + /// The node_id property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? NodeId { get; set; } +#nullable restore +#else + public string NodeId { get; set; } +#endif + /// 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. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.Integration? PerformedViaGithubApp { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.Integration PerformedViaGithubApp { get; set; } +#endif + /// The url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Url { get; set; } +#nullable restore +#else + public string Url { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public AssignedIssueEvent() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.AssignedIssueEvent CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.AssignedIssueEvent(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "actor", n => { Actor = n.GetObjectValue(global::Ayllu.Github.Client.Models.SimpleUser.CreateFromDiscriminatorValue); } }, + { "assignee", n => { Assignee = n.GetObjectValue(global::Ayllu.Github.Client.Models.SimpleUser.CreateFromDiscriminatorValue); } }, + { "assigner", n => { Assigner = n.GetObjectValue(global::Ayllu.Github.Client.Models.SimpleUser.CreateFromDiscriminatorValue); } }, + { "commit_id", n => { CommitId = n.GetStringValue(); } }, + { "commit_url", n => { CommitUrl = n.GetStringValue(); } }, + { "created_at", n => { CreatedAt = n.GetStringValue(); } }, + { "event", n => { Event = n.GetStringValue(); } }, + { "id", n => { Id = n.GetIntValue(); } }, + { "node_id", n => { NodeId = n.GetStringValue(); } }, + { "performed_via_github_app", n => { PerformedViaGithubApp = n.GetObjectValue(global::Ayllu.Github.Client.Models.Integration.CreateFromDiscriminatorValue); } }, + { "url", n => { Url = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteObjectValue("actor", Actor); + writer.WriteObjectValue("assignee", Assignee); + writer.WriteObjectValue("assigner", Assigner); + writer.WriteStringValue("commit_id", CommitId); + writer.WriteStringValue("commit_url", CommitUrl); + writer.WriteStringValue("created_at", CreatedAt); + writer.WriteStringValue("event", Event); + writer.WriteIntValue("id", Id); + writer.WriteStringValue("node_id", NodeId); + writer.WriteObjectValue("performed_via_github_app", PerformedViaGithubApp); + writer.WriteStringValue("url", Url); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/AuthenticationToken.cs b/src/Ayllu.Github.Client/Github/Client/Models/AuthenticationToken.cs new file mode 100644 index 0000000..d597720 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/AuthenticationToken.cs @@ -0,0 +1,104 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + /// + /// Authentication Token + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class AuthenticationToken : IAdditionalDataHolder, IParsable + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The time this token expires + public DateTimeOffset? ExpiresAt { get; set; } + /// The permissions property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.AuthenticationToken_permissions? Permissions { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.AuthenticationToken_permissions Permissions { get; set; } +#endif + /// The repositories this token has access to +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? Repositories { get; set; } +#nullable restore +#else + public List Repositories { get; set; } +#endif + /// Describe whether all repositories have been selected or there's a selection involved + public global::Ayllu.Github.Client.Models.AuthenticationToken_repository_selection? RepositorySelection { get; set; } + /// The single_file property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? SingleFile { get; set; } +#nullable restore +#else + public string SingleFile { get; set; } +#endif + /// The token used for authentication +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Token { get; set; } +#nullable restore +#else + public string Token { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public AuthenticationToken() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.AuthenticationToken CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.AuthenticationToken(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "expires_at", n => { ExpiresAt = n.GetDateTimeOffsetValue(); } }, + { "permissions", n => { Permissions = n.GetObjectValue(global::Ayllu.Github.Client.Models.AuthenticationToken_permissions.CreateFromDiscriminatorValue); } }, + { "repositories", n => { Repositories = n.GetCollectionOfObjectValues(global::Ayllu.Github.Client.Models.Repository.CreateFromDiscriminatorValue)?.AsList(); } }, + { "repository_selection", n => { RepositorySelection = n.GetEnumValue(); } }, + { "single_file", n => { SingleFile = n.GetStringValue(); } }, + { "token", n => { Token = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteDateTimeOffsetValue("expires_at", ExpiresAt); + writer.WriteObjectValue("permissions", Permissions); + writer.WriteCollectionOfObjectValues("repositories", Repositories); + writer.WriteEnumValue("repository_selection", RepositorySelection); + writer.WriteStringValue("single_file", SingleFile); + writer.WriteStringValue("token", Token); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/AuthenticationToken_permissions.cs b/src/Ayllu.Github.Client/Github/Client/Models/AuthenticationToken_permissions.cs new file mode 100644 index 0000000..99c3665 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/AuthenticationToken_permissions.cs @@ -0,0 +1,55 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class AuthenticationToken_permissions : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public AuthenticationToken_permissions() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.AuthenticationToken_permissions CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.AuthenticationToken_permissions(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/AuthenticationToken_repository_selection.cs b/src/Ayllu.Github.Client/Github/Client/Models/AuthenticationToken_repository_selection.cs new file mode 100644 index 0000000..2d392fe --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/AuthenticationToken_repository_selection.cs @@ -0,0 +1,19 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Models +{ + /// Describe whether all repositories have been selected or there's a selection involved + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public enum AuthenticationToken_repository_selection + { + [EnumMember(Value = "all")] + #pragma warning disable CS1591 + All, + #pragma warning restore CS1591 + [EnumMember(Value = "selected")] + #pragma warning disable CS1591 + Selected, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Models/AuthorAssociation.cs b/src/Ayllu.Github.Client/Github/Client/Models/AuthorAssociation.cs new file mode 100644 index 0000000..05532f3 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/AuthorAssociation.cs @@ -0,0 +1,43 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Models +{ + /// How the author is associated with the repository. + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public enum AuthorAssociation + { + [EnumMember(Value = "COLLABORATOR")] + #pragma warning disable CS1591 + COLLABORATOR, + #pragma warning restore CS1591 + [EnumMember(Value = "CONTRIBUTOR")] + #pragma warning disable CS1591 + CONTRIBUTOR, + #pragma warning restore CS1591 + [EnumMember(Value = "FIRST_TIMER")] + #pragma warning disable CS1591 + FIRST_TIMER, + #pragma warning restore CS1591 + [EnumMember(Value = "FIRST_TIME_CONTRIBUTOR")] + #pragma warning disable CS1591 + FIRST_TIME_CONTRIBUTOR, + #pragma warning restore CS1591 + [EnumMember(Value = "MANNEQUIN")] + #pragma warning disable CS1591 + MANNEQUIN, + #pragma warning restore CS1591 + [EnumMember(Value = "MEMBER")] + #pragma warning disable CS1591 + MEMBER, + #pragma warning restore CS1591 + [EnumMember(Value = "NONE")] + #pragma warning disable CS1591 + NONE, + #pragma warning restore CS1591 + [EnumMember(Value = "OWNER")] + #pragma warning disable CS1591 + OWNER, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Models/Authorization.cs b/src/Ayllu.Github.Client/Github/Client/Models/Authorization.cs new file mode 100644 index 0000000..e2e1d16 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/Authorization.cs @@ -0,0 +1,182 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + /// + /// The authorization for an OAuth app, GitHub App, or a Personal Access Token. + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class Authorization : IAdditionalDataHolder, IParsable + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The app property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.Authorization_app? App { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.Authorization_app App { get; set; } +#endif + /// The created_at property + public DateTimeOffset? CreatedAt { get; set; } + /// The expires_at property + public DateTimeOffset? ExpiresAt { get; set; } + /// The fingerprint property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Fingerprint { get; set; } +#nullable restore +#else + public string Fingerprint { get; set; } +#endif + /// The hashed_token property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? HashedToken { get; set; } +#nullable restore +#else + public string HashedToken { get; set; } +#endif + /// The id property + public long? Id { get; set; } + /// The installation property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.NullableScopedInstallation? Installation { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.NullableScopedInstallation Installation { get; set; } +#endif + /// The note property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Note { get; set; } +#nullable restore +#else + public string Note { get; set; } +#endif + /// The note_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? NoteUrl { get; set; } +#nullable restore +#else + public string NoteUrl { get; set; } +#endif + /// A list of scopes that this authorization is in. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? Scopes { get; set; } +#nullable restore +#else + public List Scopes { get; set; } +#endif + /// The token property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Token { get; set; } +#nullable restore +#else + public string Token { get; set; } +#endif + /// The token_last_eight property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? TokenLastEight { get; set; } +#nullable restore +#else + public string TokenLastEight { get; set; } +#endif + /// The updated_at property + public DateTimeOffset? UpdatedAt { get; set; } + /// The url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Url { get; set; } +#nullable restore +#else + public string Url { get; set; } +#endif + /// A GitHub user. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.NullableSimpleUser? User { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.NullableSimpleUser User { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public Authorization() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.Authorization CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.Authorization(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "app", n => { App = n.GetObjectValue(global::Ayllu.Github.Client.Models.Authorization_app.CreateFromDiscriminatorValue); } }, + { "created_at", n => { CreatedAt = n.GetDateTimeOffsetValue(); } }, + { "expires_at", n => { ExpiresAt = n.GetDateTimeOffsetValue(); } }, + { "fingerprint", n => { Fingerprint = n.GetStringValue(); } }, + { "hashed_token", n => { HashedToken = n.GetStringValue(); } }, + { "id", n => { Id = n.GetLongValue(); } }, + { "installation", n => { Installation = n.GetObjectValue(global::Ayllu.Github.Client.Models.NullableScopedInstallation.CreateFromDiscriminatorValue); } }, + { "note", n => { Note = n.GetStringValue(); } }, + { "note_url", n => { NoteUrl = n.GetStringValue(); } }, + { "scopes", n => { Scopes = n.GetCollectionOfPrimitiveValues()?.AsList(); } }, + { "token", n => { Token = n.GetStringValue(); } }, + { "token_last_eight", n => { TokenLastEight = n.GetStringValue(); } }, + { "updated_at", n => { UpdatedAt = n.GetDateTimeOffsetValue(); } }, + { "url", n => { Url = n.GetStringValue(); } }, + { "user", n => { User = n.GetObjectValue(global::Ayllu.Github.Client.Models.NullableSimpleUser.CreateFromDiscriminatorValue); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteObjectValue("app", App); + writer.WriteDateTimeOffsetValue("created_at", CreatedAt); + writer.WriteDateTimeOffsetValue("expires_at", ExpiresAt); + writer.WriteStringValue("fingerprint", Fingerprint); + writer.WriteStringValue("hashed_token", HashedToken); + writer.WriteLongValue("id", Id); + writer.WriteObjectValue("installation", Installation); + writer.WriteStringValue("note", Note); + writer.WriteStringValue("note_url", NoteUrl); + writer.WriteCollectionOfPrimitiveValues("scopes", Scopes); + writer.WriteStringValue("token", Token); + writer.WriteStringValue("token_last_eight", TokenLastEight); + writer.WriteDateTimeOffsetValue("updated_at", UpdatedAt); + writer.WriteStringValue("url", Url); + writer.WriteObjectValue("user", User); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/Authorization_app.cs b/src/Ayllu.Github.Client/Github/Client/Models/Authorization_app.cs new file mode 100644 index 0000000..09ef34d --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/Authorization_app.cs @@ -0,0 +1,85 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class Authorization_app : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The client_id property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? ClientId { get; set; } +#nullable restore +#else + public string ClientId { get; set; } +#endif + /// The name property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Name { get; set; } +#nullable restore +#else + public string Name { get; set; } +#endif + /// The url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Url { get; set; } +#nullable restore +#else + public string Url { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public Authorization_app() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.Authorization_app CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.Authorization_app(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "client_id", n => { ClientId = n.GetStringValue(); } }, + { "name", n => { Name = n.GetStringValue(); } }, + { "url", n => { Url = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("client_id", ClientId); + writer.WriteStringValue("name", Name); + writer.WriteStringValue("url", Url); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/AutoMerge.cs b/src/Ayllu.Github.Client/Github/Client/Models/AutoMerge.cs new file mode 100644 index 0000000..1d4e502 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/AutoMerge.cs @@ -0,0 +1,90 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + /// + /// The status of auto merging a pull request. + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class AutoMerge : IAdditionalDataHolder, IParsable + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// Commit message for the merge commit. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? CommitMessage { get; set; } +#nullable restore +#else + public string CommitMessage { get; set; } +#endif + /// Title for the merge commit message. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? CommitTitle { get; set; } +#nullable restore +#else + public string CommitTitle { get; set; } +#endif + /// A GitHub user. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.SimpleUser? EnabledBy { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.SimpleUser EnabledBy { get; set; } +#endif + /// The merge method to use. + public global::Ayllu.Github.Client.Models.AutoMerge_merge_method? MergeMethod { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public AutoMerge() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.AutoMerge CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.AutoMerge(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "commit_message", n => { CommitMessage = n.GetStringValue(); } }, + { "commit_title", n => { CommitTitle = n.GetStringValue(); } }, + { "enabled_by", n => { EnabledBy = n.GetObjectValue(global::Ayllu.Github.Client.Models.SimpleUser.CreateFromDiscriminatorValue); } }, + { "merge_method", n => { MergeMethod = n.GetEnumValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("commit_message", CommitMessage); + writer.WriteStringValue("commit_title", CommitTitle); + writer.WriteObjectValue("enabled_by", EnabledBy); + writer.WriteEnumValue("merge_method", MergeMethod); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/AutoMerge_merge_method.cs b/src/Ayllu.Github.Client/Github/Client/Models/AutoMerge_merge_method.cs new file mode 100644 index 0000000..6335e53 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/AutoMerge_merge_method.cs @@ -0,0 +1,23 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Models +{ + /// The merge method to use. + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public enum AutoMerge_merge_method + { + [EnumMember(Value = "merge")] + #pragma warning disable CS1591 + Merge, + #pragma warning restore CS1591 + [EnumMember(Value = "squash")] + #pragma warning disable CS1591 + Squash, + #pragma warning restore CS1591 + [EnumMember(Value = "rebase")] + #pragma warning disable CS1591 + Rebase, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Models/Autolink.cs b/src/Ayllu.Github.Client/Github/Client/Models/Autolink.cs new file mode 100644 index 0000000..7427538 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/Autolink.cs @@ -0,0 +1,84 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + /// + /// An autolink reference. + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class Autolink : IAdditionalDataHolder, IParsable + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The id property + public int? Id { get; set; } + /// Whether this autolink reference matches alphanumeric characters. If false, this autolink reference only matches numeric characters. + public bool? IsAlphanumeric { get; set; } + /// The prefix of a key that is linkified. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? KeyPrefix { get; set; } +#nullable restore +#else + public string KeyPrefix { get; set; } +#endif + /// A template for the target URL that is generated if a key was found. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? UrlTemplate { get; set; } +#nullable restore +#else + public string UrlTemplate { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public Autolink() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.Autolink CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.Autolink(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "id", n => { Id = n.GetIntValue(); } }, + { "is_alphanumeric", n => { IsAlphanumeric = n.GetBoolValue(); } }, + { "key_prefix", n => { KeyPrefix = n.GetStringValue(); } }, + { "url_template", n => { UrlTemplate = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteIntValue("id", Id); + writer.WriteBoolValue("is_alphanumeric", IsAlphanumeric); + writer.WriteStringValue("key_prefix", KeyPrefix); + writer.WriteStringValue("url_template", UrlTemplate); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/BaseGist.cs b/src/Ayllu.Github.Client/Github/Client/Models/BaseGist.cs new file mode 100644 index 0000000..1706f17 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/BaseGist.cs @@ -0,0 +1,230 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + /// + /// Base Gist + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class BaseGist : IAdditionalDataHolder, IParsable + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The comments property + public int? Comments { get; set; } + /// The comments_enabled property + public bool? CommentsEnabled { get; set; } + /// The comments_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? CommentsUrl { get; set; } +#nullable restore +#else + public string CommentsUrl { get; set; } +#endif + /// The commits_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? CommitsUrl { get; set; } +#nullable restore +#else + public string CommitsUrl { get; set; } +#endif + /// The created_at property + public DateTimeOffset? CreatedAt { get; set; } + /// The description property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Description { get; set; } +#nullable restore +#else + public string Description { get; set; } +#endif + /// The files property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.BaseGist_files? Files { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.BaseGist_files Files { get; set; } +#endif + /// The forks property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public UntypedNode? Forks { get; set; } +#nullable restore +#else + public UntypedNode Forks { get; set; } +#endif + /// The forks_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? ForksUrl { get; set; } +#nullable restore +#else + public string ForksUrl { get; set; } +#endif + /// The git_pull_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? GitPullUrl { get; set; } +#nullable restore +#else + public string GitPullUrl { get; set; } +#endif + /// The git_push_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? GitPushUrl { get; set; } +#nullable restore +#else + public string GitPushUrl { get; set; } +#endif + /// The history property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public UntypedNode? History { get; set; } +#nullable restore +#else + public UntypedNode History { get; set; } +#endif + /// The html_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? HtmlUrl { get; set; } +#nullable restore +#else + public string HtmlUrl { get; set; } +#endif + /// The id property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Id { get; set; } +#nullable restore +#else + public string Id { get; set; } +#endif + /// The node_id property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? NodeId { get; set; } +#nullable restore +#else + public string NodeId { get; set; } +#endif + /// A GitHub user. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.SimpleUser? Owner { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.SimpleUser Owner { get; set; } +#endif + /// The public property + public bool? Public { get; set; } + /// The truncated property + public bool? Truncated { get; set; } + /// The updated_at property + public DateTimeOffset? UpdatedAt { get; set; } + /// The url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Url { get; set; } +#nullable restore +#else + public string Url { get; set; } +#endif + /// A GitHub user. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.NullableSimpleUser? User { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.NullableSimpleUser User { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public BaseGist() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.BaseGist CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.BaseGist(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "comments", n => { Comments = n.GetIntValue(); } }, + { "comments_enabled", n => { CommentsEnabled = n.GetBoolValue(); } }, + { "comments_url", n => { CommentsUrl = n.GetStringValue(); } }, + { "commits_url", n => { CommitsUrl = n.GetStringValue(); } }, + { "created_at", n => { CreatedAt = n.GetDateTimeOffsetValue(); } }, + { "description", n => { Description = n.GetStringValue(); } }, + { "files", n => { Files = n.GetObjectValue(global::Ayllu.Github.Client.Models.BaseGist_files.CreateFromDiscriminatorValue); } }, + { "forks", n => { Forks = n.GetObjectValue(UntypedNode.CreateFromDiscriminatorValue); } }, + { "forks_url", n => { ForksUrl = n.GetStringValue(); } }, + { "git_pull_url", n => { GitPullUrl = n.GetStringValue(); } }, + { "git_push_url", n => { GitPushUrl = n.GetStringValue(); } }, + { "history", n => { History = n.GetObjectValue(UntypedNode.CreateFromDiscriminatorValue); } }, + { "html_url", n => { HtmlUrl = n.GetStringValue(); } }, + { "id", n => { Id = n.GetStringValue(); } }, + { "node_id", n => { NodeId = n.GetStringValue(); } }, + { "owner", n => { Owner = n.GetObjectValue(global::Ayllu.Github.Client.Models.SimpleUser.CreateFromDiscriminatorValue); } }, + { "public", n => { Public = n.GetBoolValue(); } }, + { "truncated", n => { Truncated = n.GetBoolValue(); } }, + { "updated_at", n => { UpdatedAt = n.GetDateTimeOffsetValue(); } }, + { "url", n => { Url = n.GetStringValue(); } }, + { "user", n => { User = n.GetObjectValue(global::Ayllu.Github.Client.Models.NullableSimpleUser.CreateFromDiscriminatorValue); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteIntValue("comments", Comments); + writer.WriteBoolValue("comments_enabled", CommentsEnabled); + writer.WriteStringValue("comments_url", CommentsUrl); + writer.WriteStringValue("commits_url", CommitsUrl); + writer.WriteDateTimeOffsetValue("created_at", CreatedAt); + writer.WriteStringValue("description", Description); + writer.WriteObjectValue("files", Files); + writer.WriteObjectValue("forks", Forks); + writer.WriteStringValue("forks_url", ForksUrl); + writer.WriteStringValue("git_pull_url", GitPullUrl); + writer.WriteStringValue("git_push_url", GitPushUrl); + writer.WriteObjectValue("history", History); + writer.WriteStringValue("html_url", HtmlUrl); + writer.WriteStringValue("id", Id); + writer.WriteStringValue("node_id", NodeId); + writer.WriteObjectValue("owner", Owner); + writer.WriteBoolValue("public", Public); + writer.WriteBoolValue("truncated", Truncated); + writer.WriteDateTimeOffsetValue("updated_at", UpdatedAt); + writer.WriteStringValue("url", Url); + writer.WriteObjectValue("user", User); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/BaseGist_files.cs b/src/Ayllu.Github.Client/Github/Client/Models/BaseGist_files.cs new file mode 100644 index 0000000..0b0788d --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/BaseGist_files.cs @@ -0,0 +1,55 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class BaseGist_files : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public BaseGist_files() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.BaseGist_files CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.BaseGist_files(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/BasicError.cs b/src/Ayllu.Github.Client/Github/Client/Models/BasicError.cs new file mode 100644 index 0000000..770ab97 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/BasicError.cs @@ -0,0 +1,99 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + /// + /// Basic Error + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class BasicError : ApiException, IAdditionalDataHolder, IParsable + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The documentation_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? DocumentationUrl { get; set; } +#nullable restore +#else + public string DocumentationUrl { get; set; } +#endif + /// The primary error message. + public override string Message { get => MessageEscaped ?? string.Empty; } + /// The message property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? MessageEscaped { get; set; } +#nullable restore +#else + public string MessageEscaped { get; set; } +#endif + /// The status property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Status { get; set; } +#nullable restore +#else + public string Status { get; set; } +#endif + /// The url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Url { get; set; } +#nullable restore +#else + public string Url { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public BasicError() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.BasicError CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.BasicError(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "documentation_url", n => { DocumentationUrl = n.GetStringValue(); } }, + { "message", n => { MessageEscaped = n.GetStringValue(); } }, + { "status", n => { Status = n.GetStringValue(); } }, + { "url", n => { Url = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("documentation_url", DocumentationUrl); + writer.WriteStringValue("message", MessageEscaped); + writer.WriteStringValue("status", Status); + writer.WriteStringValue("url", Url); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/BillingUsageReport.cs b/src/Ayllu.Github.Client/Github/Client/Models/BillingUsageReport.cs new file mode 100644 index 0000000..346a68c --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/BillingUsageReport.cs @@ -0,0 +1,65 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class BillingUsageReport : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The usageItems property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? UsageItems { get; set; } +#nullable restore +#else + public List UsageItems { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public BillingUsageReport() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.BillingUsageReport CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.BillingUsageReport(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "usageItems", n => { UsageItems = n.GetCollectionOfObjectValues(global::Ayllu.Github.Client.Models.BillingUsageReport_usageItems.CreateFromDiscriminatorValue)?.AsList(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteCollectionOfObjectValues("usageItems", UsageItems); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/BillingUsageReport503Error.cs b/src/Ayllu.Github.Client/Github/Client/Models/BillingUsageReport503Error.cs new file mode 100644 index 0000000..5880c08 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/BillingUsageReport503Error.cs @@ -0,0 +1,88 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class BillingUsageReport503Error : ApiException, IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The code property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Code { get; set; } +#nullable restore +#else + public string Code { get; set; } +#endif + /// The documentation_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? DocumentationUrl { get; set; } +#nullable restore +#else + public string DocumentationUrl { get; set; } +#endif + /// The primary error message. + public override string Message { get => MessageEscaped ?? string.Empty; } + /// The message property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? MessageEscaped { get; set; } +#nullable restore +#else + public string MessageEscaped { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public BillingUsageReport503Error() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.BillingUsageReport503Error CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.BillingUsageReport503Error(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "code", n => { Code = n.GetStringValue(); } }, + { "documentation_url", n => { DocumentationUrl = n.GetStringValue(); } }, + { "message", n => { MessageEscaped = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("code", Code); + writer.WriteStringValue("documentation_url", DocumentationUrl); + writer.WriteStringValue("message", MessageEscaped); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/BillingUsageReportUser.cs b/src/Ayllu.Github.Client/Github/Client/Models/BillingUsageReportUser.cs new file mode 100644 index 0000000..6b49944 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/BillingUsageReportUser.cs @@ -0,0 +1,65 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class BillingUsageReportUser : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The usageItems property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? UsageItems { get; set; } +#nullable restore +#else + public List UsageItems { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public BillingUsageReportUser() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.BillingUsageReportUser CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.BillingUsageReportUser(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "usageItems", n => { UsageItems = n.GetCollectionOfObjectValues(global::Ayllu.Github.Client.Models.BillingUsageReportUser_usageItems.CreateFromDiscriminatorValue)?.AsList(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteCollectionOfObjectValues("usageItems", UsageItems); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/BillingUsageReportUser503Error.cs b/src/Ayllu.Github.Client/Github/Client/Models/BillingUsageReportUser503Error.cs new file mode 100644 index 0000000..157a65a --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/BillingUsageReportUser503Error.cs @@ -0,0 +1,88 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class BillingUsageReportUser503Error : ApiException, IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The code property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Code { get; set; } +#nullable restore +#else + public string Code { get; set; } +#endif + /// The documentation_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? DocumentationUrl { get; set; } +#nullable restore +#else + public string DocumentationUrl { get; set; } +#endif + /// The primary error message. + public override string Message { get => MessageEscaped ?? string.Empty; } + /// The message property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? MessageEscaped { get; set; } +#nullable restore +#else + public string MessageEscaped { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public BillingUsageReportUser503Error() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.BillingUsageReportUser503Error CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.BillingUsageReportUser503Error(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "code", n => { Code = n.GetStringValue(); } }, + { "documentation_url", n => { DocumentationUrl = n.GetStringValue(); } }, + { "message", n => { MessageEscaped = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("code", Code); + writer.WriteStringValue("documentation_url", DocumentationUrl); + writer.WriteStringValue("message", MessageEscaped); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/BillingUsageReportUser_usageItems.cs b/src/Ayllu.Github.Client/Github/Client/Models/BillingUsageReportUser_usageItems.cs new file mode 100644 index 0000000..4cf8c1f --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/BillingUsageReportUser_usageItems.cs @@ -0,0 +1,125 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class BillingUsageReportUser_usageItems : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// Date of the usage line item. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Date { get; set; } +#nullable restore +#else + public string Date { get; set; } +#endif + /// Discount amount of the usage line item. + public double? DiscountAmount { get; set; } + /// Gross amount of the usage line item. + public double? GrossAmount { get; set; } + /// Net amount of the usage line item. + public double? NetAmount { get; set; } + /// Price per unit of the usage line item. + public double? PricePerUnit { get; set; } + /// Product name. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Product { get; set; } +#nullable restore +#else + public string Product { get; set; } +#endif + /// Quantity of the usage line item. + public int? Quantity { get; set; } + /// Name of the repository. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? RepositoryName { get; set; } +#nullable restore +#else + public string RepositoryName { get; set; } +#endif + /// SKU name. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Sku { get; set; } +#nullable restore +#else + public string Sku { get; set; } +#endif + /// Unit type of the usage line item. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? UnitType { get; set; } +#nullable restore +#else + public string UnitType { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public BillingUsageReportUser_usageItems() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.BillingUsageReportUser_usageItems CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.BillingUsageReportUser_usageItems(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "date", n => { Date = n.GetStringValue(); } }, + { "discountAmount", n => { DiscountAmount = n.GetDoubleValue(); } }, + { "grossAmount", n => { GrossAmount = n.GetDoubleValue(); } }, + { "netAmount", n => { NetAmount = n.GetDoubleValue(); } }, + { "pricePerUnit", n => { PricePerUnit = n.GetDoubleValue(); } }, + { "product", n => { Product = n.GetStringValue(); } }, + { "quantity", n => { Quantity = n.GetIntValue(); } }, + { "repositoryName", n => { RepositoryName = n.GetStringValue(); } }, + { "sku", n => { Sku = n.GetStringValue(); } }, + { "unitType", n => { UnitType = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("date", Date); + writer.WriteDoubleValue("discountAmount", DiscountAmount); + writer.WriteDoubleValue("grossAmount", GrossAmount); + writer.WriteDoubleValue("netAmount", NetAmount); + writer.WriteDoubleValue("pricePerUnit", PricePerUnit); + writer.WriteStringValue("product", Product); + writer.WriteIntValue("quantity", Quantity); + writer.WriteStringValue("repositoryName", RepositoryName); + writer.WriteStringValue("sku", Sku); + writer.WriteStringValue("unitType", UnitType); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/BillingUsageReport_usageItems.cs b/src/Ayllu.Github.Client/Github/Client/Models/BillingUsageReport_usageItems.cs new file mode 100644 index 0000000..b87d4d6 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/BillingUsageReport_usageItems.cs @@ -0,0 +1,135 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class BillingUsageReport_usageItems : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// Date of the usage line item. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Date { get; set; } +#nullable restore +#else + public string Date { get; set; } +#endif + /// Discount amount of the usage line item. + public double? DiscountAmount { get; set; } + /// Gross amount of the usage line item. + public double? GrossAmount { get; set; } + /// Net amount of the usage line item. + public double? NetAmount { get; set; } + /// Name of the organization. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? OrganizationName { get; set; } +#nullable restore +#else + public string OrganizationName { get; set; } +#endif + /// Price per unit of the usage line item. + public double? PricePerUnit { get; set; } + /// Product name. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Product { get; set; } +#nullable restore +#else + public string Product { get; set; } +#endif + /// Quantity of the usage line item. + public int? Quantity { get; set; } + /// Name of the repository. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? RepositoryName { get; set; } +#nullable restore +#else + public string RepositoryName { get; set; } +#endif + /// SKU name. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Sku { get; set; } +#nullable restore +#else + public string Sku { get; set; } +#endif + /// Unit type of the usage line item. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? UnitType { get; set; } +#nullable restore +#else + public string UnitType { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public BillingUsageReport_usageItems() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.BillingUsageReport_usageItems CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.BillingUsageReport_usageItems(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "date", n => { Date = n.GetStringValue(); } }, + { "discountAmount", n => { DiscountAmount = n.GetDoubleValue(); } }, + { "grossAmount", n => { GrossAmount = n.GetDoubleValue(); } }, + { "netAmount", n => { NetAmount = n.GetDoubleValue(); } }, + { "organizationName", n => { OrganizationName = n.GetStringValue(); } }, + { "pricePerUnit", n => { PricePerUnit = n.GetDoubleValue(); } }, + { "product", n => { Product = n.GetStringValue(); } }, + { "quantity", n => { Quantity = n.GetIntValue(); } }, + { "repositoryName", n => { RepositoryName = n.GetStringValue(); } }, + { "sku", n => { Sku = n.GetStringValue(); } }, + { "unitType", n => { UnitType = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("date", Date); + writer.WriteDoubleValue("discountAmount", DiscountAmount); + writer.WriteDoubleValue("grossAmount", GrossAmount); + writer.WriteDoubleValue("netAmount", NetAmount); + writer.WriteStringValue("organizationName", OrganizationName); + writer.WriteDoubleValue("pricePerUnit", PricePerUnit); + writer.WriteStringValue("product", Product); + writer.WriteIntValue("quantity", Quantity); + writer.WriteStringValue("repositoryName", RepositoryName); + writer.WriteStringValue("sku", Sku); + writer.WriteStringValue("unitType", UnitType); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/Blob.cs b/src/Ayllu.Github.Client/Github/Client/Models/Blob.cs new file mode 100644 index 0000000..007f5d6 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/Blob.cs @@ -0,0 +1,120 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + /// + /// Blob + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class Blob : IAdditionalDataHolder, IParsable + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The content property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Content { get; set; } +#nullable restore +#else + public string Content { get; set; } +#endif + /// The encoding property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Encoding { get; set; } +#nullable restore +#else + public string Encoding { get; set; } +#endif + /// The highlighted_content property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? HighlightedContent { get; set; } +#nullable restore +#else + public string HighlightedContent { get; set; } +#endif + /// The node_id property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? NodeId { get; set; } +#nullable restore +#else + public string NodeId { get; set; } +#endif + /// The sha property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Sha { get; set; } +#nullable restore +#else + public string Sha { get; set; } +#endif + /// The size property + public int? Size { get; set; } + /// The url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Url { get; set; } +#nullable restore +#else + public string Url { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public Blob() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.Blob CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.Blob(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "content", n => { Content = n.GetStringValue(); } }, + { "encoding", n => { Encoding = n.GetStringValue(); } }, + { "highlighted_content", n => { HighlightedContent = n.GetStringValue(); } }, + { "node_id", n => { NodeId = n.GetStringValue(); } }, + { "sha", n => { Sha = n.GetStringValue(); } }, + { "size", n => { Size = n.GetIntValue(); } }, + { "url", n => { Url = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("content", Content); + writer.WriteStringValue("encoding", Encoding); + writer.WriteStringValue("highlighted_content", HighlightedContent); + writer.WriteStringValue("node_id", NodeId); + writer.WriteStringValue("sha", Sha); + writer.WriteIntValue("size", Size); + writer.WriteStringValue("url", Url); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/BranchProtection.cs b/src/Ayllu.Github.Client/Github/Client/Models/BranchProtection.cs new file mode 100644 index 0000000..86fb203 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/BranchProtection.cs @@ -0,0 +1,210 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + /// + /// Branch Protection + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class BranchProtection : IAdditionalDataHolder, IParsable + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The allow_deletions property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.BranchProtection_allow_deletions? AllowDeletions { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.BranchProtection_allow_deletions AllowDeletions { get; set; } +#endif + /// The allow_force_pushes property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.BranchProtection_allow_force_pushes? AllowForcePushes { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.BranchProtection_allow_force_pushes AllowForcePushes { get; set; } +#endif + /// 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. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.BranchProtection_allow_fork_syncing? AllowForkSyncing { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.BranchProtection_allow_fork_syncing AllowForkSyncing { get; set; } +#endif + /// The block_creations property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.BranchProtection_block_creations? BlockCreations { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.BranchProtection_block_creations BlockCreations { get; set; } +#endif + /// The enabled property + public bool? Enabled { get; set; } + /// Protected Branch Admin Enforced +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.ProtectedBranchAdminEnforced? EnforceAdmins { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.ProtectedBranchAdminEnforced EnforceAdmins { get; set; } +#endif + /// Whether to set the branch as read-only. If this is true, users will not be able to push to the branch. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.BranchProtection_lock_branch? LockBranch { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.BranchProtection_lock_branch LockBranch { get; set; } +#endif + /// The name property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Name { get; set; } +#nullable restore +#else + public string Name { get; set; } +#endif + /// The protection_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? ProtectionUrl { get; set; } +#nullable restore +#else + public string ProtectionUrl { get; set; } +#endif + /// The required_conversation_resolution property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.BranchProtection_required_conversation_resolution? RequiredConversationResolution { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.BranchProtection_required_conversation_resolution RequiredConversationResolution { get; set; } +#endif + /// The required_linear_history property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.BranchProtection_required_linear_history? RequiredLinearHistory { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.BranchProtection_required_linear_history RequiredLinearHistory { get; set; } +#endif + /// Protected Branch Pull Request Review +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.ProtectedBranchPullRequestReview? RequiredPullRequestReviews { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.ProtectedBranchPullRequestReview RequiredPullRequestReviews { get; set; } +#endif + /// The required_signatures property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.BranchProtection_required_signatures? RequiredSignatures { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.BranchProtection_required_signatures RequiredSignatures { get; set; } +#endif + /// Protected Branch Required Status Check +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.ProtectedBranchRequiredStatusCheck? RequiredStatusChecks { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.ProtectedBranchRequiredStatusCheck RequiredStatusChecks { get; set; } +#endif + /// Branch Restriction Policy +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.BranchRestrictionPolicy? Restrictions { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.BranchRestrictionPolicy Restrictions { get; set; } +#endif + /// The url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Url { get; set; } +#nullable restore +#else + public string Url { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public BranchProtection() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.BranchProtection CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.BranchProtection(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "allow_deletions", n => { AllowDeletions = n.GetObjectValue(global::Ayllu.Github.Client.Models.BranchProtection_allow_deletions.CreateFromDiscriminatorValue); } }, + { "allow_force_pushes", n => { AllowForcePushes = n.GetObjectValue(global::Ayllu.Github.Client.Models.BranchProtection_allow_force_pushes.CreateFromDiscriminatorValue); } }, + { "allow_fork_syncing", n => { AllowForkSyncing = n.GetObjectValue(global::Ayllu.Github.Client.Models.BranchProtection_allow_fork_syncing.CreateFromDiscriminatorValue); } }, + { "block_creations", n => { BlockCreations = n.GetObjectValue(global::Ayllu.Github.Client.Models.BranchProtection_block_creations.CreateFromDiscriminatorValue); } }, + { "enabled", n => { Enabled = n.GetBoolValue(); } }, + { "enforce_admins", n => { EnforceAdmins = n.GetObjectValue(global::Ayllu.Github.Client.Models.ProtectedBranchAdminEnforced.CreateFromDiscriminatorValue); } }, + { "lock_branch", n => { LockBranch = n.GetObjectValue(global::Ayllu.Github.Client.Models.BranchProtection_lock_branch.CreateFromDiscriminatorValue); } }, + { "name", n => { Name = n.GetStringValue(); } }, + { "protection_url", n => { ProtectionUrl = n.GetStringValue(); } }, + { "required_conversation_resolution", n => { RequiredConversationResolution = n.GetObjectValue(global::Ayllu.Github.Client.Models.BranchProtection_required_conversation_resolution.CreateFromDiscriminatorValue); } }, + { "required_linear_history", n => { RequiredLinearHistory = n.GetObjectValue(global::Ayllu.Github.Client.Models.BranchProtection_required_linear_history.CreateFromDiscriminatorValue); } }, + { "required_pull_request_reviews", n => { RequiredPullRequestReviews = n.GetObjectValue(global::Ayllu.Github.Client.Models.ProtectedBranchPullRequestReview.CreateFromDiscriminatorValue); } }, + { "required_signatures", n => { RequiredSignatures = n.GetObjectValue(global::Ayllu.Github.Client.Models.BranchProtection_required_signatures.CreateFromDiscriminatorValue); } }, + { "required_status_checks", n => { RequiredStatusChecks = n.GetObjectValue(global::Ayllu.Github.Client.Models.ProtectedBranchRequiredStatusCheck.CreateFromDiscriminatorValue); } }, + { "restrictions", n => { Restrictions = n.GetObjectValue(global::Ayllu.Github.Client.Models.BranchRestrictionPolicy.CreateFromDiscriminatorValue); } }, + { "url", n => { Url = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteObjectValue("allow_deletions", AllowDeletions); + writer.WriteObjectValue("allow_force_pushes", AllowForcePushes); + writer.WriteObjectValue("allow_fork_syncing", AllowForkSyncing); + writer.WriteObjectValue("block_creations", BlockCreations); + writer.WriteBoolValue("enabled", Enabled); + writer.WriteObjectValue("enforce_admins", EnforceAdmins); + writer.WriteObjectValue("lock_branch", LockBranch); + writer.WriteStringValue("name", Name); + writer.WriteStringValue("protection_url", ProtectionUrl); + writer.WriteObjectValue("required_conversation_resolution", RequiredConversationResolution); + writer.WriteObjectValue("required_linear_history", RequiredLinearHistory); + writer.WriteObjectValue("required_pull_request_reviews", RequiredPullRequestReviews); + writer.WriteObjectValue("required_signatures", RequiredSignatures); + writer.WriteObjectValue("required_status_checks", RequiredStatusChecks); + writer.WriteObjectValue("restrictions", Restrictions); + writer.WriteStringValue("url", Url); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/BranchProtection_allow_deletions.cs b/src/Ayllu.Github.Client/Github/Client/Models/BranchProtection_allow_deletions.cs new file mode 100644 index 0000000..a00de26 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/BranchProtection_allow_deletions.cs @@ -0,0 +1,59 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class BranchProtection_allow_deletions : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The enabled property + public bool? Enabled { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public BranchProtection_allow_deletions() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.BranchProtection_allow_deletions CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.BranchProtection_allow_deletions(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "enabled", n => { Enabled = n.GetBoolValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteBoolValue("enabled", Enabled); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/BranchProtection_allow_force_pushes.cs b/src/Ayllu.Github.Client/Github/Client/Models/BranchProtection_allow_force_pushes.cs new file mode 100644 index 0000000..fffb665 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/BranchProtection_allow_force_pushes.cs @@ -0,0 +1,59 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class BranchProtection_allow_force_pushes : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The enabled property + public bool? Enabled { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public BranchProtection_allow_force_pushes() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.BranchProtection_allow_force_pushes CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.BranchProtection_allow_force_pushes(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "enabled", n => { Enabled = n.GetBoolValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteBoolValue("enabled", Enabled); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/BranchProtection_allow_fork_syncing.cs b/src/Ayllu.Github.Client/Github/Client/Models/BranchProtection_allow_fork_syncing.cs new file mode 100644 index 0000000..abeb9ca --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/BranchProtection_allow_fork_syncing.cs @@ -0,0 +1,60 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + /// + /// 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. + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class BranchProtection_allow_fork_syncing : IAdditionalDataHolder, IParsable + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The enabled property + public bool? Enabled { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public BranchProtection_allow_fork_syncing() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.BranchProtection_allow_fork_syncing CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.BranchProtection_allow_fork_syncing(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "enabled", n => { Enabled = n.GetBoolValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteBoolValue("enabled", Enabled); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/BranchProtection_block_creations.cs b/src/Ayllu.Github.Client/Github/Client/Models/BranchProtection_block_creations.cs new file mode 100644 index 0000000..4203e51 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/BranchProtection_block_creations.cs @@ -0,0 +1,59 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class BranchProtection_block_creations : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The enabled property + public bool? Enabled { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public BranchProtection_block_creations() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.BranchProtection_block_creations CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.BranchProtection_block_creations(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "enabled", n => { Enabled = n.GetBoolValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteBoolValue("enabled", Enabled); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/BranchProtection_lock_branch.cs b/src/Ayllu.Github.Client/Github/Client/Models/BranchProtection_lock_branch.cs new file mode 100644 index 0000000..a7eaaeb --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/BranchProtection_lock_branch.cs @@ -0,0 +1,60 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + /// + /// Whether to set the branch as read-only. If this is true, users will not be able to push to the branch. + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class BranchProtection_lock_branch : IAdditionalDataHolder, IParsable + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The enabled property + public bool? Enabled { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public BranchProtection_lock_branch() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.BranchProtection_lock_branch CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.BranchProtection_lock_branch(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "enabled", n => { Enabled = n.GetBoolValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteBoolValue("enabled", Enabled); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/BranchProtection_required_conversation_resolution.cs b/src/Ayllu.Github.Client/Github/Client/Models/BranchProtection_required_conversation_resolution.cs new file mode 100644 index 0000000..8cdfe0f --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/BranchProtection_required_conversation_resolution.cs @@ -0,0 +1,59 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class BranchProtection_required_conversation_resolution : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The enabled property + public bool? Enabled { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public BranchProtection_required_conversation_resolution() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.BranchProtection_required_conversation_resolution CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.BranchProtection_required_conversation_resolution(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "enabled", n => { Enabled = n.GetBoolValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteBoolValue("enabled", Enabled); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/BranchProtection_required_linear_history.cs b/src/Ayllu.Github.Client/Github/Client/Models/BranchProtection_required_linear_history.cs new file mode 100644 index 0000000..39841ff --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/BranchProtection_required_linear_history.cs @@ -0,0 +1,59 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class BranchProtection_required_linear_history : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The enabled property + public bool? Enabled { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public BranchProtection_required_linear_history() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.BranchProtection_required_linear_history CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.BranchProtection_required_linear_history(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "enabled", n => { Enabled = n.GetBoolValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteBoolValue("enabled", Enabled); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/BranchProtection_required_signatures.cs b/src/Ayllu.Github.Client/Github/Client/Models/BranchProtection_required_signatures.cs new file mode 100644 index 0000000..81a0137 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/BranchProtection_required_signatures.cs @@ -0,0 +1,69 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class BranchProtection_required_signatures : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The enabled property + public bool? Enabled { get; set; } + /// The url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Url { get; set; } +#nullable restore +#else + public string Url { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public BranchProtection_required_signatures() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.BranchProtection_required_signatures CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.BranchProtection_required_signatures(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "enabled", n => { Enabled = n.GetBoolValue(); } }, + { "url", n => { Url = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteBoolValue("enabled", Enabled); + writer.WriteStringValue("url", Url); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/BranchRestrictionPolicy.cs b/src/Ayllu.Github.Client/Github/Client/Models/BranchRestrictionPolicy.cs new file mode 100644 index 0000000..fbdef63 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/BranchRestrictionPolicy.cs @@ -0,0 +1,126 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + /// + /// Branch Restriction Policy + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class BranchRestrictionPolicy : IAdditionalDataHolder, IParsable + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The apps property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? Apps { get; set; } +#nullable restore +#else + public List Apps { get; set; } +#endif + /// The apps_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? AppsUrl { get; set; } +#nullable restore +#else + public string AppsUrl { get; set; } +#endif + /// The teams property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? Teams { get; set; } +#nullable restore +#else + public List Teams { get; set; } +#endif + /// The teams_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? TeamsUrl { get; set; } +#nullable restore +#else + public string TeamsUrl { get; set; } +#endif + /// The url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Url { get; set; } +#nullable restore +#else + public string Url { get; set; } +#endif + /// The users property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? Users { get; set; } +#nullable restore +#else + public List Users { get; set; } +#endif + /// The users_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? UsersUrl { get; set; } +#nullable restore +#else + public string UsersUrl { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public BranchRestrictionPolicy() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.BranchRestrictionPolicy CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.BranchRestrictionPolicy(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "apps", n => { Apps = n.GetCollectionOfObjectValues(global::Ayllu.Github.Client.Models.BranchRestrictionPolicy_apps.CreateFromDiscriminatorValue)?.AsList(); } }, + { "apps_url", n => { AppsUrl = n.GetStringValue(); } }, + { "teams", n => { Teams = n.GetCollectionOfObjectValues(global::Ayllu.Github.Client.Models.BranchRestrictionPolicy_teams.CreateFromDiscriminatorValue)?.AsList(); } }, + { "teams_url", n => { TeamsUrl = n.GetStringValue(); } }, + { "url", n => { Url = n.GetStringValue(); } }, + { "users", n => { Users = n.GetCollectionOfObjectValues(global::Ayllu.Github.Client.Models.BranchRestrictionPolicy_users.CreateFromDiscriminatorValue)?.AsList(); } }, + { "users_url", n => { UsersUrl = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteCollectionOfObjectValues("apps", Apps); + writer.WriteStringValue("apps_url", AppsUrl); + writer.WriteCollectionOfObjectValues("teams", Teams); + writer.WriteStringValue("teams_url", TeamsUrl); + writer.WriteStringValue("url", Url); + writer.WriteCollectionOfObjectValues("users", Users); + writer.WriteStringValue("users_url", UsersUrl); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/BranchRestrictionPolicy_apps.cs b/src/Ayllu.Github.Client/Github/Client/Models/BranchRestrictionPolicy_apps.cs new file mode 100644 index 0000000..6df4f45 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/BranchRestrictionPolicy_apps.cs @@ -0,0 +1,179 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class BranchRestrictionPolicy_apps : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The client_id property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? ClientId { get; set; } +#nullable restore +#else + public string ClientId { get; set; } +#endif + /// The created_at property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? CreatedAt { get; set; } +#nullable restore +#else + public string CreatedAt { get; set; } +#endif + /// The description property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Description { get; set; } +#nullable restore +#else + public string Description { get; set; } +#endif + /// The events property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? Events { get; set; } +#nullable restore +#else + public List Events { get; set; } +#endif + /// The external_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? ExternalUrl { get; set; } +#nullable restore +#else + public string ExternalUrl { get; set; } +#endif + /// The html_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? HtmlUrl { get; set; } +#nullable restore +#else + public string HtmlUrl { get; set; } +#endif + /// The id property + public int? Id { get; set; } + /// The name property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Name { get; set; } +#nullable restore +#else + public string Name { get; set; } +#endif + /// The node_id property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? NodeId { get; set; } +#nullable restore +#else + public string NodeId { get; set; } +#endif + /// The owner property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.BranchRestrictionPolicy_apps_owner? Owner { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.BranchRestrictionPolicy_apps_owner Owner { get; set; } +#endif + /// The permissions property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.BranchRestrictionPolicy_apps_permissions? Permissions { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.BranchRestrictionPolicy_apps_permissions Permissions { get; set; } +#endif + /// The slug property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Slug { get; set; } +#nullable restore +#else + public string Slug { get; set; } +#endif + /// The updated_at property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? UpdatedAt { get; set; } +#nullable restore +#else + public string UpdatedAt { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public BranchRestrictionPolicy_apps() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.BranchRestrictionPolicy_apps CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.BranchRestrictionPolicy_apps(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "client_id", n => { ClientId = n.GetStringValue(); } }, + { "created_at", n => { CreatedAt = n.GetStringValue(); } }, + { "description", n => { Description = n.GetStringValue(); } }, + { "events", n => { Events = n.GetCollectionOfPrimitiveValues()?.AsList(); } }, + { "external_url", n => { ExternalUrl = n.GetStringValue(); } }, + { "html_url", n => { HtmlUrl = n.GetStringValue(); } }, + { "id", n => { Id = n.GetIntValue(); } }, + { "name", n => { Name = n.GetStringValue(); } }, + { "node_id", n => { NodeId = n.GetStringValue(); } }, + { "owner", n => { Owner = n.GetObjectValue(global::Ayllu.Github.Client.Models.BranchRestrictionPolicy_apps_owner.CreateFromDiscriminatorValue); } }, + { "permissions", n => { Permissions = n.GetObjectValue(global::Ayllu.Github.Client.Models.BranchRestrictionPolicy_apps_permissions.CreateFromDiscriminatorValue); } }, + { "slug", n => { Slug = n.GetStringValue(); } }, + { "updated_at", n => { UpdatedAt = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("client_id", ClientId); + writer.WriteStringValue("created_at", CreatedAt); + writer.WriteStringValue("description", Description); + writer.WriteCollectionOfPrimitiveValues("events", Events); + writer.WriteStringValue("external_url", ExternalUrl); + writer.WriteStringValue("html_url", HtmlUrl); + writer.WriteIntValue("id", Id); + writer.WriteStringValue("name", Name); + writer.WriteStringValue("node_id", NodeId); + writer.WriteObjectValue("owner", Owner); + writer.WriteObjectValue("permissions", Permissions); + writer.WriteStringValue("slug", Slug); + writer.WriteStringValue("updated_at", UpdatedAt); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/BranchRestrictionPolicy_apps_owner.cs b/src/Ayllu.Github.Client/Github/Client/Models/BranchRestrictionPolicy_apps_owner.cs new file mode 100644 index 0000000..adddc63 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/BranchRestrictionPolicy_apps_owner.cs @@ -0,0 +1,283 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class BranchRestrictionPolicy_apps_owner : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The avatar_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? AvatarUrl { get; set; } +#nullable restore +#else + public string AvatarUrl { get; set; } +#endif + /// The description property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Description { get; set; } +#nullable restore +#else + public string Description { get; set; } +#endif + /// The events_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? EventsUrl { get; set; } +#nullable restore +#else + public string EventsUrl { get; set; } +#endif + /// The followers_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? FollowersUrl { get; set; } +#nullable restore +#else + public string FollowersUrl { get; set; } +#endif + /// The following_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? FollowingUrl { get; set; } +#nullable restore +#else + public string FollowingUrl { get; set; } +#endif + /// The gists_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? GistsUrl { get; set; } +#nullable restore +#else + public string GistsUrl { get; set; } +#endif + /// The gravatar_id property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? GravatarId { get; set; } +#nullable restore +#else + public string GravatarId { get; set; } +#endif + /// The hooks_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? HooksUrl { get; set; } +#nullable restore +#else + public string HooksUrl { get; set; } +#endif + /// The html_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? HtmlUrl { get; set; } +#nullable restore +#else + public string HtmlUrl { get; set; } +#endif + /// The id property + public int? Id { get; set; } + /// The issues_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? IssuesUrl { get; set; } +#nullable restore +#else + public string IssuesUrl { get; set; } +#endif + /// The login property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Login { get; set; } +#nullable restore +#else + public string Login { get; set; } +#endif + /// The members_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? MembersUrl { get; set; } +#nullable restore +#else + public string MembersUrl { get; set; } +#endif + /// The node_id property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? NodeId { get; set; } +#nullable restore +#else + public string NodeId { get; set; } +#endif + /// The organizations_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? OrganizationsUrl { get; set; } +#nullable restore +#else + public string OrganizationsUrl { get; set; } +#endif + /// The public_members_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? PublicMembersUrl { get; set; } +#nullable restore +#else + public string PublicMembersUrl { get; set; } +#endif + /// The received_events_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? ReceivedEventsUrl { get; set; } +#nullable restore +#else + public string ReceivedEventsUrl { get; set; } +#endif + /// The repos_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? ReposUrl { get; set; } +#nullable restore +#else + public string ReposUrl { get; set; } +#endif + /// The site_admin property + public bool? SiteAdmin { get; set; } + /// The starred_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? StarredUrl { get; set; } +#nullable restore +#else + public string StarredUrl { get; set; } +#endif + /// The subscriptions_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? SubscriptionsUrl { get; set; } +#nullable restore +#else + public string SubscriptionsUrl { get; set; } +#endif + /// The type property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Type { get; set; } +#nullable restore +#else + public string Type { get; set; } +#endif + /// The url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Url { get; set; } +#nullable restore +#else + public string Url { get; set; } +#endif + /// The user_view_type property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? UserViewType { get; set; } +#nullable restore +#else + public string UserViewType { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public BranchRestrictionPolicy_apps_owner() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.BranchRestrictionPolicy_apps_owner CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.BranchRestrictionPolicy_apps_owner(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "avatar_url", n => { AvatarUrl = n.GetStringValue(); } }, + { "description", n => { Description = n.GetStringValue(); } }, + { "events_url", n => { EventsUrl = n.GetStringValue(); } }, + { "followers_url", n => { FollowersUrl = n.GetStringValue(); } }, + { "following_url", n => { FollowingUrl = n.GetStringValue(); } }, + { "gists_url", n => { GistsUrl = n.GetStringValue(); } }, + { "gravatar_id", n => { GravatarId = n.GetStringValue(); } }, + { "hooks_url", n => { HooksUrl = n.GetStringValue(); } }, + { "html_url", n => { HtmlUrl = n.GetStringValue(); } }, + { "id", n => { Id = n.GetIntValue(); } }, + { "issues_url", n => { IssuesUrl = n.GetStringValue(); } }, + { "login", n => { Login = n.GetStringValue(); } }, + { "members_url", n => { MembersUrl = n.GetStringValue(); } }, + { "node_id", n => { NodeId = n.GetStringValue(); } }, + { "organizations_url", n => { OrganizationsUrl = n.GetStringValue(); } }, + { "public_members_url", n => { PublicMembersUrl = n.GetStringValue(); } }, + { "received_events_url", n => { ReceivedEventsUrl = n.GetStringValue(); } }, + { "repos_url", n => { ReposUrl = n.GetStringValue(); } }, + { "site_admin", n => { SiteAdmin = n.GetBoolValue(); } }, + { "starred_url", n => { StarredUrl = n.GetStringValue(); } }, + { "subscriptions_url", n => { SubscriptionsUrl = n.GetStringValue(); } }, + { "type", n => { Type = n.GetStringValue(); } }, + { "url", n => { Url = n.GetStringValue(); } }, + { "user_view_type", n => { UserViewType = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("avatar_url", AvatarUrl); + writer.WriteStringValue("description", Description); + writer.WriteStringValue("events_url", EventsUrl); + writer.WriteStringValue("followers_url", FollowersUrl); + writer.WriteStringValue("following_url", FollowingUrl); + writer.WriteStringValue("gists_url", GistsUrl); + writer.WriteStringValue("gravatar_id", GravatarId); + writer.WriteStringValue("hooks_url", HooksUrl); + writer.WriteStringValue("html_url", HtmlUrl); + writer.WriteIntValue("id", Id); + writer.WriteStringValue("issues_url", IssuesUrl); + writer.WriteStringValue("login", Login); + writer.WriteStringValue("members_url", MembersUrl); + writer.WriteStringValue("node_id", NodeId); + writer.WriteStringValue("organizations_url", OrganizationsUrl); + writer.WriteStringValue("public_members_url", PublicMembersUrl); + writer.WriteStringValue("received_events_url", ReceivedEventsUrl); + writer.WriteStringValue("repos_url", ReposUrl); + writer.WriteBoolValue("site_admin", SiteAdmin); + writer.WriteStringValue("starred_url", StarredUrl); + writer.WriteStringValue("subscriptions_url", SubscriptionsUrl); + writer.WriteStringValue("type", Type); + writer.WriteStringValue("url", Url); + writer.WriteStringValue("user_view_type", UserViewType); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/BranchRestrictionPolicy_apps_permissions.cs b/src/Ayllu.Github.Client/Github/Client/Models/BranchRestrictionPolicy_apps_permissions.cs new file mode 100644 index 0000000..b950c86 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/BranchRestrictionPolicy_apps_permissions.cs @@ -0,0 +1,95 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class BranchRestrictionPolicy_apps_permissions : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The contents property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Contents { get; set; } +#nullable restore +#else + public string Contents { get; set; } +#endif + /// The issues property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Issues { get; set; } +#nullable restore +#else + public string Issues { get; set; } +#endif + /// The metadata property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Metadata { get; set; } +#nullable restore +#else + public string Metadata { get; set; } +#endif + /// The single_file property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? SingleFile { get; set; } +#nullable restore +#else + public string SingleFile { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public BranchRestrictionPolicy_apps_permissions() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.BranchRestrictionPolicy_apps_permissions CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.BranchRestrictionPolicy_apps_permissions(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "contents", n => { Contents = n.GetStringValue(); } }, + { "issues", n => { Issues = n.GetStringValue(); } }, + { "metadata", n => { Metadata = n.GetStringValue(); } }, + { "single_file", n => { SingleFile = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("contents", Contents); + writer.WriteStringValue("issues", Issues); + writer.WriteStringValue("metadata", Metadata); + writer.WriteStringValue("single_file", SingleFile); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/BranchRestrictionPolicy_teams.cs b/src/Ayllu.Github.Client/Github/Client/Models/BranchRestrictionPolicy_teams.cs new file mode 100644 index 0000000..eff8bff --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/BranchRestrictionPolicy_teams.cs @@ -0,0 +1,179 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class BranchRestrictionPolicy_teams : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The description property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Description { get; set; } +#nullable restore +#else + public string Description { get; set; } +#endif + /// The html_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? HtmlUrl { get; set; } +#nullable restore +#else + public string HtmlUrl { get; set; } +#endif + /// The id property + public int? Id { get; set; } + /// The members_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? MembersUrl { get; set; } +#nullable restore +#else + public string MembersUrl { get; set; } +#endif + /// The name property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Name { get; set; } +#nullable restore +#else + public string Name { get; set; } +#endif + /// The node_id property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? NodeId { get; set; } +#nullable restore +#else + public string NodeId { get; set; } +#endif + /// The notification_setting property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? NotificationSetting { get; set; } +#nullable restore +#else + public string NotificationSetting { get; set; } +#endif + /// The parent property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Parent { get; set; } +#nullable restore +#else + public string Parent { get; set; } +#endif + /// The permission property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Permission { get; set; } +#nullable restore +#else + public string Permission { get; set; } +#endif + /// The privacy property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Privacy { get; set; } +#nullable restore +#else + public string Privacy { get; set; } +#endif + /// The repositories_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? RepositoriesUrl { get; set; } +#nullable restore +#else + public string RepositoriesUrl { get; set; } +#endif + /// The slug property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Slug { get; set; } +#nullable restore +#else + public string Slug { get; set; } +#endif + /// The url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Url { get; set; } +#nullable restore +#else + public string Url { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public BranchRestrictionPolicy_teams() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.BranchRestrictionPolicy_teams CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.BranchRestrictionPolicy_teams(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "description", n => { Description = n.GetStringValue(); } }, + { "html_url", n => { HtmlUrl = n.GetStringValue(); } }, + { "id", n => { Id = n.GetIntValue(); } }, + { "members_url", n => { MembersUrl = n.GetStringValue(); } }, + { "name", n => { Name = n.GetStringValue(); } }, + { "node_id", n => { NodeId = n.GetStringValue(); } }, + { "notification_setting", n => { NotificationSetting = n.GetStringValue(); } }, + { "parent", n => { Parent = n.GetStringValue(); } }, + { "permission", n => { Permission = n.GetStringValue(); } }, + { "privacy", n => { Privacy = n.GetStringValue(); } }, + { "repositories_url", n => { RepositoriesUrl = n.GetStringValue(); } }, + { "slug", n => { Slug = n.GetStringValue(); } }, + { "url", n => { Url = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("description", Description); + writer.WriteStringValue("html_url", HtmlUrl); + writer.WriteIntValue("id", Id); + writer.WriteStringValue("members_url", MembersUrl); + writer.WriteStringValue("name", Name); + writer.WriteStringValue("node_id", NodeId); + writer.WriteStringValue("notification_setting", NotificationSetting); + writer.WriteStringValue("parent", Parent); + writer.WriteStringValue("permission", Permission); + writer.WriteStringValue("privacy", Privacy); + writer.WriteStringValue("repositories_url", RepositoriesUrl); + writer.WriteStringValue("slug", Slug); + writer.WriteStringValue("url", Url); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/BranchRestrictionPolicy_users.cs b/src/Ayllu.Github.Client/Github/Client/Models/BranchRestrictionPolicy_users.cs new file mode 100644 index 0000000..6cb60d5 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/BranchRestrictionPolicy_users.cs @@ -0,0 +1,233 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class BranchRestrictionPolicy_users : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The avatar_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? AvatarUrl { get; set; } +#nullable restore +#else + public string AvatarUrl { get; set; } +#endif + /// The events_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? EventsUrl { get; set; } +#nullable restore +#else + public string EventsUrl { get; set; } +#endif + /// The followers_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? FollowersUrl { get; set; } +#nullable restore +#else + public string FollowersUrl { get; set; } +#endif + /// The following_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? FollowingUrl { get; set; } +#nullable restore +#else + public string FollowingUrl { get; set; } +#endif + /// The gists_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? GistsUrl { get; set; } +#nullable restore +#else + public string GistsUrl { get; set; } +#endif + /// The gravatar_id property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? GravatarId { get; set; } +#nullable restore +#else + public string GravatarId { get; set; } +#endif + /// The html_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? HtmlUrl { get; set; } +#nullable restore +#else + public string HtmlUrl { get; set; } +#endif + /// The id property + public long? Id { get; set; } + /// The login property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Login { get; set; } +#nullable restore +#else + public string Login { get; set; } +#endif + /// The node_id property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? NodeId { get; set; } +#nullable restore +#else + public string NodeId { get; set; } +#endif + /// The organizations_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? OrganizationsUrl { get; set; } +#nullable restore +#else + public string OrganizationsUrl { get; set; } +#endif + /// The received_events_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? ReceivedEventsUrl { get; set; } +#nullable restore +#else + public string ReceivedEventsUrl { get; set; } +#endif + /// The repos_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? ReposUrl { get; set; } +#nullable restore +#else + public string ReposUrl { get; set; } +#endif + /// The site_admin property + public bool? SiteAdmin { get; set; } + /// The starred_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? StarredUrl { get; set; } +#nullable restore +#else + public string StarredUrl { get; set; } +#endif + /// The subscriptions_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? SubscriptionsUrl { get; set; } +#nullable restore +#else + public string SubscriptionsUrl { get; set; } +#endif + /// The type property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Type { get; set; } +#nullable restore +#else + public string Type { get; set; } +#endif + /// The url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Url { get; set; } +#nullable restore +#else + public string Url { get; set; } +#endif + /// The user_view_type property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? UserViewType { get; set; } +#nullable restore +#else + public string UserViewType { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public BranchRestrictionPolicy_users() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.BranchRestrictionPolicy_users CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.BranchRestrictionPolicy_users(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "avatar_url", n => { AvatarUrl = n.GetStringValue(); } }, + { "events_url", n => { EventsUrl = n.GetStringValue(); } }, + { "followers_url", n => { FollowersUrl = n.GetStringValue(); } }, + { "following_url", n => { FollowingUrl = n.GetStringValue(); } }, + { "gists_url", n => { GistsUrl = n.GetStringValue(); } }, + { "gravatar_id", n => { GravatarId = n.GetStringValue(); } }, + { "html_url", n => { HtmlUrl = n.GetStringValue(); } }, + { "id", n => { Id = n.GetLongValue(); } }, + { "login", n => { Login = n.GetStringValue(); } }, + { "node_id", n => { NodeId = n.GetStringValue(); } }, + { "organizations_url", n => { OrganizationsUrl = n.GetStringValue(); } }, + { "received_events_url", n => { ReceivedEventsUrl = n.GetStringValue(); } }, + { "repos_url", n => { ReposUrl = n.GetStringValue(); } }, + { "site_admin", n => { SiteAdmin = n.GetBoolValue(); } }, + { "starred_url", n => { StarredUrl = n.GetStringValue(); } }, + { "subscriptions_url", n => { SubscriptionsUrl = n.GetStringValue(); } }, + { "type", n => { Type = n.GetStringValue(); } }, + { "url", n => { Url = n.GetStringValue(); } }, + { "user_view_type", n => { UserViewType = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("avatar_url", AvatarUrl); + writer.WriteStringValue("events_url", EventsUrl); + writer.WriteStringValue("followers_url", FollowersUrl); + writer.WriteStringValue("following_url", FollowingUrl); + writer.WriteStringValue("gists_url", GistsUrl); + writer.WriteStringValue("gravatar_id", GravatarId); + writer.WriteStringValue("html_url", HtmlUrl); + writer.WriteLongValue("id", Id); + writer.WriteStringValue("login", Login); + writer.WriteStringValue("node_id", NodeId); + writer.WriteStringValue("organizations_url", OrganizationsUrl); + writer.WriteStringValue("received_events_url", ReceivedEventsUrl); + writer.WriteStringValue("repos_url", ReposUrl); + writer.WriteBoolValue("site_admin", SiteAdmin); + writer.WriteStringValue("starred_url", StarredUrl); + writer.WriteStringValue("subscriptions_url", SubscriptionsUrl); + writer.WriteStringValue("type", Type); + writer.WriteStringValue("url", Url); + writer.WriteStringValue("user_view_type", UserViewType); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/BranchShort.cs b/src/Ayllu.Github.Client/Github/Client/Models/BranchShort.cs new file mode 100644 index 0000000..3fa4771 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/BranchShort.cs @@ -0,0 +1,80 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + /// + /// Branch Short + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class BranchShort : IAdditionalDataHolder, IParsable + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The commit property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.BranchShort_commit? Commit { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.BranchShort_commit Commit { get; set; } +#endif + /// The name property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Name { get; set; } +#nullable restore +#else + public string Name { get; set; } +#endif + /// The protected property + public bool? Protected { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public BranchShort() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.BranchShort CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.BranchShort(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "commit", n => { Commit = n.GetObjectValue(global::Ayllu.Github.Client.Models.BranchShort_commit.CreateFromDiscriminatorValue); } }, + { "name", n => { Name = n.GetStringValue(); } }, + { "protected", n => { Protected = n.GetBoolValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteObjectValue("commit", Commit); + writer.WriteStringValue("name", Name); + writer.WriteBoolValue("protected", Protected); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/BranchShort_commit.cs b/src/Ayllu.Github.Client/Github/Client/Models/BranchShort_commit.cs new file mode 100644 index 0000000..bc191f8 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/BranchShort_commit.cs @@ -0,0 +1,75 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class BranchShort_commit : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The sha property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Sha { get; set; } +#nullable restore +#else + public string Sha { get; set; } +#endif + /// The url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Url { get; set; } +#nullable restore +#else + public string Url { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public BranchShort_commit() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.BranchShort_commit CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.BranchShort_commit(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "sha", n => { Sha = n.GetStringValue(); } }, + { "url", n => { Url = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("sha", Sha); + writer.WriteStringValue("url", Url); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/BranchWithProtection.cs b/src/Ayllu.Github.Client/Github/Client/Models/BranchWithProtection.cs new file mode 100644 index 0000000..b780b17 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/BranchWithProtection.cs @@ -0,0 +1,124 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + /// + /// Branch With Protection + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class BranchWithProtection : IAdditionalDataHolder, IParsable + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// Commit +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.Commit? Commit { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.Commit Commit { get; set; } +#endif + /// The _links property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.BranchWithProtection__links? Links { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.BranchWithProtection__links Links { get; set; } +#endif + /// The name property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Name { get; set; } +#nullable restore +#else + public string Name { get; set; } +#endif + /// The pattern property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Pattern { get; set; } +#nullable restore +#else + public string Pattern { get; set; } +#endif + /// The protected property + public bool? Protected { get; set; } + /// Branch Protection +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.BranchProtection? Protection { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.BranchProtection Protection { get; set; } +#endif + /// The protection_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? ProtectionUrl { get; set; } +#nullable restore +#else + public string ProtectionUrl { get; set; } +#endif + /// The required_approving_review_count property + public int? RequiredApprovingReviewCount { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public BranchWithProtection() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.BranchWithProtection CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.BranchWithProtection(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "commit", n => { Commit = n.GetObjectValue(global::Ayllu.Github.Client.Models.Commit.CreateFromDiscriminatorValue); } }, + { "_links", n => { Links = n.GetObjectValue(global::Ayllu.Github.Client.Models.BranchWithProtection__links.CreateFromDiscriminatorValue); } }, + { "name", n => { Name = n.GetStringValue(); } }, + { "pattern", n => { Pattern = n.GetStringValue(); } }, + { "protected", n => { Protected = n.GetBoolValue(); } }, + { "protection", n => { Protection = n.GetObjectValue(global::Ayllu.Github.Client.Models.BranchProtection.CreateFromDiscriminatorValue); } }, + { "protection_url", n => { ProtectionUrl = n.GetStringValue(); } }, + { "required_approving_review_count", n => { RequiredApprovingReviewCount = n.GetIntValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteObjectValue("commit", Commit); + writer.WriteObjectValue("_links", Links); + writer.WriteStringValue("name", Name); + writer.WriteStringValue("pattern", Pattern); + writer.WriteBoolValue("protected", Protected); + writer.WriteObjectValue("protection", Protection); + writer.WriteStringValue("protection_url", ProtectionUrl); + writer.WriteIntValue("required_approving_review_count", RequiredApprovingReviewCount); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/BranchWithProtection__links.cs b/src/Ayllu.Github.Client/Github/Client/Models/BranchWithProtection__links.cs new file mode 100644 index 0000000..b8aca31 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/BranchWithProtection__links.cs @@ -0,0 +1,75 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class BranchWithProtection__links : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The html property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Html { get; set; } +#nullable restore +#else + public string Html { get; set; } +#endif + /// The self property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Self { get; set; } +#nullable restore +#else + public string Self { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public BranchWithProtection__links() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.BranchWithProtection__links CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.BranchWithProtection__links(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "html", n => { Html = n.GetStringValue(); } }, + { "self", n => { Self = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("html", Html); + writer.WriteStringValue("self", Self); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/CampaignState.cs b/src/Ayllu.Github.Client/Github/Client/Models/CampaignState.cs new file mode 100644 index 0000000..1e47bfa --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/CampaignState.cs @@ -0,0 +1,19 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Models +{ + /// Indicates whether a campaign is open or closed + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public enum CampaignState + { + [EnumMember(Value = "open")] + #pragma warning disable CS1591 + Open, + #pragma warning restore CS1591 + [EnumMember(Value = "closed")] + #pragma warning disable CS1591 + Closed, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Models/CampaignSummary.cs b/src/Ayllu.Github.Client/Github/Client/Models/CampaignSummary.cs new file mode 100644 index 0000000..48972d1 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/CampaignSummary.cs @@ -0,0 +1,144 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + /// + /// The campaign metadata and alert stats. + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class CampaignSummary : IAdditionalDataHolder, IParsable + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The alert_stats property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.CampaignSummary_alert_stats? AlertStats { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.CampaignSummary_alert_stats AlertStats { get; set; } +#endif + /// The date and time the campaign was closed, in ISO 8601 format':' YYYY-MM-DDTHH:MM:SSZ. Will be null if the campaign is still open. + public DateTimeOffset? ClosedAt { get; set; } + /// The contact link of the campaign. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? ContactLink { get; set; } +#nullable restore +#else + public string ContactLink { get; set; } +#endif + /// The date and time the campaign was created, in ISO 8601 format':' YYYY-MM-DDTHH:MM:SSZ. + public DateTimeOffset? CreatedAt { get; set; } + /// The campaign description +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Description { get; set; } +#nullable restore +#else + public string Description { get; set; } +#endif + /// The date and time the campaign has ended, in ISO 8601 format':' YYYY-MM-DDTHH:MM:SSZ. + public DateTimeOffset? EndsAt { get; set; } + /// The campaign managers +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? Managers { get; set; } +#nullable restore +#else + public List Managers { get; set; } +#endif + /// The campaign name +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Name { get; set; } +#nullable restore +#else + public string Name { get; set; } +#endif + /// The number of the newly created campaign + public int? Number { get; set; } + /// The date and time the campaign was published, in ISO 8601 format':' YYYY-MM-DDTHH:MM:SSZ. + public DateTimeOffset? PublishedAt { get; set; } + /// Indicates whether a campaign is open or closed + public global::Ayllu.Github.Client.Models.CampaignState? State { get; set; } + /// The campaign team managers +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? TeamManagers { get; set; } +#nullable restore +#else + public List TeamManagers { get; set; } +#endif + /// The date and time the campaign was last updated, in ISO 8601 format':' YYYY-MM-DDTHH:MM:SSZ. + public DateTimeOffset? UpdatedAt { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public CampaignSummary() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.CampaignSummary CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.CampaignSummary(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "alert_stats", n => { AlertStats = n.GetObjectValue(global::Ayllu.Github.Client.Models.CampaignSummary_alert_stats.CreateFromDiscriminatorValue); } }, + { "closed_at", n => { ClosedAt = n.GetDateTimeOffsetValue(); } }, + { "contact_link", n => { ContactLink = n.GetStringValue(); } }, + { "created_at", n => { CreatedAt = n.GetDateTimeOffsetValue(); } }, + { "description", n => { Description = n.GetStringValue(); } }, + { "ends_at", n => { EndsAt = n.GetDateTimeOffsetValue(); } }, + { "managers", n => { Managers = n.GetCollectionOfObjectValues(global::Ayllu.Github.Client.Models.SimpleUser.CreateFromDiscriminatorValue)?.AsList(); } }, + { "name", n => { Name = n.GetStringValue(); } }, + { "number", n => { Number = n.GetIntValue(); } }, + { "published_at", n => { PublishedAt = n.GetDateTimeOffsetValue(); } }, + { "state", n => { State = n.GetEnumValue(); } }, + { "team_managers", n => { TeamManagers = n.GetCollectionOfObjectValues(global::Ayllu.Github.Client.Models.Team.CreateFromDiscriminatorValue)?.AsList(); } }, + { "updated_at", n => { UpdatedAt = n.GetDateTimeOffsetValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteObjectValue("alert_stats", AlertStats); + writer.WriteDateTimeOffsetValue("closed_at", ClosedAt); + writer.WriteStringValue("contact_link", ContactLink); + writer.WriteDateTimeOffsetValue("created_at", CreatedAt); + writer.WriteStringValue("description", Description); + writer.WriteDateTimeOffsetValue("ends_at", EndsAt); + writer.WriteCollectionOfObjectValues("managers", Managers); + writer.WriteStringValue("name", Name); + writer.WriteIntValue("number", Number); + writer.WriteDateTimeOffsetValue("published_at", PublishedAt); + writer.WriteEnumValue("state", State); + writer.WriteCollectionOfObjectValues("team_managers", TeamManagers); + writer.WriteDateTimeOffsetValue("updated_at", UpdatedAt); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/CampaignSummary503Error.cs b/src/Ayllu.Github.Client/Github/Client/Models/CampaignSummary503Error.cs new file mode 100644 index 0000000..84b57d5 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/CampaignSummary503Error.cs @@ -0,0 +1,88 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class CampaignSummary503Error : ApiException, IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The code property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Code { get; set; } +#nullable restore +#else + public string Code { get; set; } +#endif + /// The documentation_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? DocumentationUrl { get; set; } +#nullable restore +#else + public string DocumentationUrl { get; set; } +#endif + /// The primary error message. + public override string Message { get => MessageEscaped ?? string.Empty; } + /// The message property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? MessageEscaped { get; set; } +#nullable restore +#else + public string MessageEscaped { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public CampaignSummary503Error() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.CampaignSummary503Error CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.CampaignSummary503Error(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "code", n => { Code = n.GetStringValue(); } }, + { "documentation_url", n => { DocumentationUrl = n.GetStringValue(); } }, + { "message", n => { MessageEscaped = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("code", Code); + writer.WriteStringValue("documentation_url", DocumentationUrl); + writer.WriteStringValue("message", MessageEscaped); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/CampaignSummary_alert_stats.cs b/src/Ayllu.Github.Client/Github/Client/Models/CampaignSummary_alert_stats.cs new file mode 100644 index 0000000..a503888 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/CampaignSummary_alert_stats.cs @@ -0,0 +1,57 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class CampaignSummary_alert_stats : IParsable + #pragma warning restore CS1591 + { + /// The number of closed alerts + public int? ClosedCount { get; set; } + /// The number of in-progress alerts + public int? InProgressCount { get; set; } + /// The number of open alerts + public int? OpenCount { get; set; } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.CampaignSummary_alert_stats CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.CampaignSummary_alert_stats(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "closed_count", n => { ClosedCount = n.GetIntValue(); } }, + { "in_progress_count", n => { InProgressCount = n.GetIntValue(); } }, + { "open_count", n => { OpenCount = n.GetIntValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteIntValue("closed_count", ClosedCount); + writer.WriteIntValue("in_progress_count", InProgressCount); + writer.WriteIntValue("open_count", OpenCount); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/Campaigns503Error.cs b/src/Ayllu.Github.Client/Github/Client/Models/Campaigns503Error.cs new file mode 100644 index 0000000..2039cba --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/Campaigns503Error.cs @@ -0,0 +1,88 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class Campaigns503Error : ApiException, IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The code property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Code { get; set; } +#nullable restore +#else + public string Code { get; set; } +#endif + /// The documentation_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? DocumentationUrl { get; set; } +#nullable restore +#else + public string DocumentationUrl { get; set; } +#endif + /// The primary error message. + public override string Message { get => MessageEscaped ?? string.Empty; } + /// The message property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? MessageEscaped { get; set; } +#nullable restore +#else + public string MessageEscaped { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public Campaigns503Error() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.Campaigns503Error CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.Campaigns503Error(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "code", n => { Code = n.GetStringValue(); } }, + { "documentation_url", n => { DocumentationUrl = n.GetStringValue(); } }, + { "message", n => { MessageEscaped = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("code", Code); + writer.WriteStringValue("documentation_url", DocumentationUrl); + writer.WriteStringValue("message", MessageEscaped); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/CheckAnnotation.cs b/src/Ayllu.Github.Client/Github/Client/Models/CheckAnnotation.cs new file mode 100644 index 0000000..ebadf02 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/CheckAnnotation.cs @@ -0,0 +1,132 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + /// + /// Check Annotation + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class CheckAnnotation : IAdditionalDataHolder, IParsable + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The annotation_level property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? AnnotationLevel { get; set; } +#nullable restore +#else + public string AnnotationLevel { get; set; } +#endif + /// The blob_href property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? BlobHref { get; set; } +#nullable restore +#else + public string BlobHref { get; set; } +#endif + /// The end_column property + public int? EndColumn { get; set; } + /// The end_line property + public int? EndLine { get; set; } + /// The message property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Message { get; set; } +#nullable restore +#else + public string Message { get; set; } +#endif + /// The path property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Path { get; set; } +#nullable restore +#else + public string Path { get; set; } +#endif + /// The raw_details property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? RawDetails { get; set; } +#nullable restore +#else + public string RawDetails { get; set; } +#endif + /// The start_column property + public int? StartColumn { get; set; } + /// The start_line property + public int? StartLine { get; set; } + /// The title property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Title { get; set; } +#nullable restore +#else + public string Title { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public CheckAnnotation() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.CheckAnnotation CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.CheckAnnotation(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "annotation_level", n => { AnnotationLevel = n.GetStringValue(); } }, + { "blob_href", n => { BlobHref = n.GetStringValue(); } }, + { "end_column", n => { EndColumn = n.GetIntValue(); } }, + { "end_line", n => { EndLine = n.GetIntValue(); } }, + { "message", n => { Message = n.GetStringValue(); } }, + { "path", n => { Path = n.GetStringValue(); } }, + { "raw_details", n => { RawDetails = n.GetStringValue(); } }, + { "start_column", n => { StartColumn = n.GetIntValue(); } }, + { "start_line", n => { StartLine = n.GetIntValue(); } }, + { "title", n => { Title = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("annotation_level", AnnotationLevel); + writer.WriteStringValue("blob_href", BlobHref); + writer.WriteIntValue("end_column", EndColumn); + writer.WriteIntValue("end_line", EndLine); + writer.WriteStringValue("message", Message); + writer.WriteStringValue("path", Path); + writer.WriteStringValue("raw_details", RawDetails); + writer.WriteIntValue("start_column", StartColumn); + writer.WriteIntValue("start_line", StartLine); + writer.WriteStringValue("title", Title); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/CheckAutomatedSecurityFixes.cs b/src/Ayllu.Github.Client/Github/Client/Models/CheckAutomatedSecurityFixes.cs new file mode 100644 index 0000000..5a6e89a --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/CheckAutomatedSecurityFixes.cs @@ -0,0 +1,64 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + /// + /// Check Dependabot security updates + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class CheckAutomatedSecurityFixes : IAdditionalDataHolder, IParsable + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// Whether Dependabot security updates are enabled for the repository. + public bool? Enabled { get; set; } + /// Whether Dependabot security updates are paused for the repository. + public bool? Paused { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public CheckAutomatedSecurityFixes() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.CheckAutomatedSecurityFixes CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.CheckAutomatedSecurityFixes(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "enabled", n => { Enabled = n.GetBoolValue(); } }, + { "paused", n => { Paused = n.GetBoolValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteBoolValue("enabled", Enabled); + writer.WriteBoolValue("paused", Paused); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/CheckRun.cs b/src/Ayllu.Github.Client/Github/Client/Models/CheckRun.cs new file mode 100644 index 0000000..fa85342 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/CheckRun.cs @@ -0,0 +1,196 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + /// + /// A check performed on the code of a given code change + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class CheckRun : IAdditionalDataHolder, IParsable + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// 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. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.NullableIntegration? App { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.NullableIntegration App { get; set; } +#endif + /// The check_suite property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.CheckRun_check_suite? CheckSuite { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.CheckRun_check_suite CheckSuite { get; set; } +#endif + /// The completed_at property + public DateTimeOffset? CompletedAt { get; set; } + /// The conclusion property + public global::Ayllu.Github.Client.Models.CheckRun_conclusion? Conclusion { get; set; } + /// A deployment created as the result of an Actions check run from a workflow that references an environment +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.DeploymentSimple? Deployment { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.DeploymentSimple Deployment { get; set; } +#endif + /// The details_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? DetailsUrl { get; set; } +#nullable restore +#else + public string DetailsUrl { get; set; } +#endif + /// The external_id property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? ExternalId { get; set; } +#nullable restore +#else + public string ExternalId { get; set; } +#endif + /// The SHA of the commit that is being checked. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? HeadSha { get; set; } +#nullable restore +#else + public string HeadSha { get; set; } +#endif + /// The html_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? HtmlUrl { get; set; } +#nullable restore +#else + public string HtmlUrl { get; set; } +#endif + /// The id of the check. + public long? Id { get; set; } + /// The name of the check. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Name { get; set; } +#nullable restore +#else + public string Name { get; set; } +#endif + /// The node_id property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? NodeId { get; set; } +#nullable restore +#else + public string NodeId { get; set; } +#endif + /// The output property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.CheckRun_output? Output { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.CheckRun_output Output { get; set; } +#endif + /// 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. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? PullRequests { get; set; } +#nullable restore +#else + public List PullRequests { get; set; } +#endif + /// The started_at property + public DateTimeOffset? StartedAt { get; set; } + /// The phase of the lifecycle that the check is currently in. Statuses of waiting, requested, and pending are reserved for GitHub Actions check runs. + public global::Ayllu.Github.Client.Models.CheckRun_status? Status { get; set; } + /// The url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Url { get; set; } +#nullable restore +#else + public string Url { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public CheckRun() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.CheckRun CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.CheckRun(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "app", n => { App = n.GetObjectValue(global::Ayllu.Github.Client.Models.NullableIntegration.CreateFromDiscriminatorValue); } }, + { "check_suite", n => { CheckSuite = n.GetObjectValue(global::Ayllu.Github.Client.Models.CheckRun_check_suite.CreateFromDiscriminatorValue); } }, + { "completed_at", n => { CompletedAt = n.GetDateTimeOffsetValue(); } }, + { "conclusion", n => { Conclusion = n.GetEnumValue(); } }, + { "deployment", n => { Deployment = n.GetObjectValue(global::Ayllu.Github.Client.Models.DeploymentSimple.CreateFromDiscriminatorValue); } }, + { "details_url", n => { DetailsUrl = n.GetStringValue(); } }, + { "external_id", n => { ExternalId = n.GetStringValue(); } }, + { "head_sha", n => { HeadSha = n.GetStringValue(); } }, + { "html_url", n => { HtmlUrl = n.GetStringValue(); } }, + { "id", n => { Id = n.GetLongValue(); } }, + { "name", n => { Name = n.GetStringValue(); } }, + { "node_id", n => { NodeId = n.GetStringValue(); } }, + { "output", n => { Output = n.GetObjectValue(global::Ayllu.Github.Client.Models.CheckRun_output.CreateFromDiscriminatorValue); } }, + { "pull_requests", n => { PullRequests = n.GetCollectionOfObjectValues(global::Ayllu.Github.Client.Models.PullRequestMinimal.CreateFromDiscriminatorValue)?.AsList(); } }, + { "started_at", n => { StartedAt = n.GetDateTimeOffsetValue(); } }, + { "status", n => { Status = n.GetEnumValue(); } }, + { "url", n => { Url = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteObjectValue("app", App); + writer.WriteObjectValue("check_suite", CheckSuite); + writer.WriteDateTimeOffsetValue("completed_at", CompletedAt); + writer.WriteEnumValue("conclusion", Conclusion); + writer.WriteObjectValue("deployment", Deployment); + writer.WriteStringValue("details_url", DetailsUrl); + writer.WriteStringValue("external_id", ExternalId); + writer.WriteStringValue("head_sha", HeadSha); + writer.WriteStringValue("html_url", HtmlUrl); + writer.WriteLongValue("id", Id); + writer.WriteStringValue("name", Name); + writer.WriteStringValue("node_id", NodeId); + writer.WriteObjectValue("output", Output); + writer.WriteCollectionOfObjectValues("pull_requests", PullRequests); + writer.WriteDateTimeOffsetValue("started_at", StartedAt); + writer.WriteEnumValue("status", Status); + writer.WriteStringValue("url", Url); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/CheckRun_check_suite.cs b/src/Ayllu.Github.Client/Github/Client/Models/CheckRun_check_suite.cs new file mode 100644 index 0000000..b4479c4 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/CheckRun_check_suite.cs @@ -0,0 +1,59 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class CheckRun_check_suite : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The id property + public int? Id { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public CheckRun_check_suite() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.CheckRun_check_suite CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.CheckRun_check_suite(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "id", n => { Id = n.GetIntValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteIntValue("id", Id); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/CheckRun_conclusion.cs b/src/Ayllu.Github.Client/Github/Client/Models/CheckRun_conclusion.cs new file mode 100644 index 0000000..daf7834 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/CheckRun_conclusion.cs @@ -0,0 +1,40 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public enum CheckRun_conclusion + #pragma warning restore CS1591 + { + [EnumMember(Value = "success")] + #pragma warning disable CS1591 + Success, + #pragma warning restore CS1591 + [EnumMember(Value = "failure")] + #pragma warning disable CS1591 + Failure, + #pragma warning restore CS1591 + [EnumMember(Value = "neutral")] + #pragma warning disable CS1591 + Neutral, + #pragma warning restore CS1591 + [EnumMember(Value = "cancelled")] + #pragma warning disable CS1591 + Cancelled, + #pragma warning restore CS1591 + [EnumMember(Value = "skipped")] + #pragma warning disable CS1591 + Skipped, + #pragma warning restore CS1591 + [EnumMember(Value = "timed_out")] + #pragma warning disable CS1591 + Timed_out, + #pragma warning restore CS1591 + [EnumMember(Value = "action_required")] + #pragma warning disable CS1591 + Action_required, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Models/CheckRun_output.cs b/src/Ayllu.Github.Client/Github/Client/Models/CheckRun_output.cs new file mode 100644 index 0000000..07848af --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/CheckRun_output.cs @@ -0,0 +1,99 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class CheckRun_output : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The annotations_count property + public int? AnnotationsCount { get; set; } + /// The annotations_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? AnnotationsUrl { get; set; } +#nullable restore +#else + public string AnnotationsUrl { get; set; } +#endif + /// The summary property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Summary { get; set; } +#nullable restore +#else + public string Summary { get; set; } +#endif + /// The text property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Text { get; set; } +#nullable restore +#else + public string Text { get; set; } +#endif + /// The title property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Title { get; set; } +#nullable restore +#else + public string Title { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public CheckRun_output() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.CheckRun_output CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.CheckRun_output(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "annotations_count", n => { AnnotationsCount = n.GetIntValue(); } }, + { "annotations_url", n => { AnnotationsUrl = n.GetStringValue(); } }, + { "summary", n => { Summary = n.GetStringValue(); } }, + { "text", n => { Text = n.GetStringValue(); } }, + { "title", n => { Title = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteIntValue("annotations_count", AnnotationsCount); + writer.WriteStringValue("annotations_url", AnnotationsUrl); + writer.WriteStringValue("summary", Summary); + writer.WriteStringValue("text", Text); + writer.WriteStringValue("title", Title); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/CheckRun_status.cs b/src/Ayllu.Github.Client/Github/Client/Models/CheckRun_status.cs new file mode 100644 index 0000000..1fef88b --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/CheckRun_status.cs @@ -0,0 +1,35 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Models +{ + /// The phase of the lifecycle that the check is currently in. Statuses of waiting, requested, and pending are reserved for GitHub Actions check runs. + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public enum CheckRun_status + { + [EnumMember(Value = "queued")] + #pragma warning disable CS1591 + Queued, + #pragma warning restore CS1591 + [EnumMember(Value = "in_progress")] + #pragma warning disable CS1591 + In_progress, + #pragma warning restore CS1591 + [EnumMember(Value = "completed")] + #pragma warning disable CS1591 + Completed, + #pragma warning restore CS1591 + [EnumMember(Value = "waiting")] + #pragma warning disable CS1591 + Waiting, + #pragma warning restore CS1591 + [EnumMember(Value = "requested")] + #pragma warning disable CS1591 + Requested, + #pragma warning restore CS1591 + [EnumMember(Value = "pending")] + #pragma warning disable CS1591 + Pending, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Models/CheckSuite.cs b/src/Ayllu.Github.Client/Github/Client/Models/CheckSuite.cs new file mode 100644 index 0000000..2477714 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/CheckSuite.cs @@ -0,0 +1,198 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + /// + /// A suite of checks performed on the code of a given code change + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class CheckSuite : IAdditionalDataHolder, IParsable + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The after property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? After { get; set; } +#nullable restore +#else + public string After { get; set; } +#endif + /// 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. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.NullableIntegration? App { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.NullableIntegration App { get; set; } +#endif + /// The before property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Before { get; set; } +#nullable restore +#else + public string Before { get; set; } +#endif + /// The check_runs_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? CheckRunsUrl { get; set; } +#nullable restore +#else + public string CheckRunsUrl { get; set; } +#endif + /// The conclusion property + public global::Ayllu.Github.Client.Models.CheckSuite_conclusion? Conclusion { get; set; } + /// The created_at property + public DateTimeOffset? CreatedAt { get; set; } + /// The head_branch property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? HeadBranch { get; set; } +#nullable restore +#else + public string HeadBranch { get; set; } +#endif + /// A commit. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.SimpleCommit? HeadCommit { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.SimpleCommit HeadCommit { get; set; } +#endif + /// The SHA of the head commit that is being checked. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? HeadSha { get; set; } +#nullable restore +#else + public string HeadSha { get; set; } +#endif + /// The id property + public long? Id { get; set; } + /// The latest_check_runs_count property + public int? LatestCheckRunsCount { get; set; } + /// The node_id property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? NodeId { get; set; } +#nullable restore +#else + public string NodeId { get; set; } +#endif + /// The pull_requests property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? PullRequests { get; set; } +#nullable restore +#else + public List PullRequests { get; set; } +#endif + /// Minimal Repository +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.MinimalRepository? Repository { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.MinimalRepository Repository { get; set; } +#endif + /// The rerequestable property + public bool? Rerequestable { get; set; } + /// The runs_rerequestable property + public bool? RunsRerequestable { get; set; } + /// 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. + public global::Ayllu.Github.Client.Models.CheckSuite_status? Status { get; set; } + /// The updated_at property + public DateTimeOffset? UpdatedAt { get; set; } + /// The url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Url { get; set; } +#nullable restore +#else + public string Url { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public CheckSuite() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.CheckSuite CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.CheckSuite(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "after", n => { After = n.GetStringValue(); } }, + { "app", n => { App = n.GetObjectValue(global::Ayllu.Github.Client.Models.NullableIntegration.CreateFromDiscriminatorValue); } }, + { "before", n => { Before = n.GetStringValue(); } }, + { "check_runs_url", n => { CheckRunsUrl = n.GetStringValue(); } }, + { "conclusion", n => { Conclusion = n.GetEnumValue(); } }, + { "created_at", n => { CreatedAt = n.GetDateTimeOffsetValue(); } }, + { "head_branch", n => { HeadBranch = n.GetStringValue(); } }, + { "head_commit", n => { HeadCommit = n.GetObjectValue(global::Ayllu.Github.Client.Models.SimpleCommit.CreateFromDiscriminatorValue); } }, + { "head_sha", n => { HeadSha = n.GetStringValue(); } }, + { "id", n => { Id = n.GetLongValue(); } }, + { "latest_check_runs_count", n => { LatestCheckRunsCount = n.GetIntValue(); } }, + { "node_id", n => { NodeId = n.GetStringValue(); } }, + { "pull_requests", n => { PullRequests = n.GetCollectionOfObjectValues(global::Ayllu.Github.Client.Models.PullRequestMinimal.CreateFromDiscriminatorValue)?.AsList(); } }, + { "repository", n => { Repository = n.GetObjectValue(global::Ayllu.Github.Client.Models.MinimalRepository.CreateFromDiscriminatorValue); } }, + { "rerequestable", n => { Rerequestable = n.GetBoolValue(); } }, + { "runs_rerequestable", n => { RunsRerequestable = n.GetBoolValue(); } }, + { "status", n => { Status = n.GetEnumValue(); } }, + { "updated_at", n => { UpdatedAt = n.GetDateTimeOffsetValue(); } }, + { "url", n => { Url = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("after", After); + writer.WriteObjectValue("app", App); + writer.WriteStringValue("before", Before); + writer.WriteStringValue("check_runs_url", CheckRunsUrl); + writer.WriteEnumValue("conclusion", Conclusion); + writer.WriteDateTimeOffsetValue("created_at", CreatedAt); + writer.WriteStringValue("head_branch", HeadBranch); + writer.WriteObjectValue("head_commit", HeadCommit); + writer.WriteStringValue("head_sha", HeadSha); + writer.WriteLongValue("id", Id); + writer.WriteIntValue("latest_check_runs_count", LatestCheckRunsCount); + writer.WriteStringValue("node_id", NodeId); + writer.WriteCollectionOfObjectValues("pull_requests", PullRequests); + writer.WriteObjectValue("repository", Repository); + writer.WriteBoolValue("rerequestable", Rerequestable); + writer.WriteBoolValue("runs_rerequestable", RunsRerequestable); + writer.WriteEnumValue("status", Status); + writer.WriteDateTimeOffsetValue("updated_at", UpdatedAt); + writer.WriteStringValue("url", Url); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/CheckSuitePreference.cs b/src/Ayllu.Github.Client/Github/Client/Models/CheckSuitePreference.cs new file mode 100644 index 0000000..23d5055 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/CheckSuitePreference.cs @@ -0,0 +1,76 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + /// + /// Check suite configuration preferences for a repository. + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class CheckSuitePreference : IAdditionalDataHolder, IParsable + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The preferences property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.CheckSuitePreference_preferences? Preferences { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.CheckSuitePreference_preferences Preferences { get; set; } +#endif + /// Minimal Repository +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.MinimalRepository? Repository { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.MinimalRepository Repository { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public CheckSuitePreference() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.CheckSuitePreference CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.CheckSuitePreference(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "preferences", n => { Preferences = n.GetObjectValue(global::Ayllu.Github.Client.Models.CheckSuitePreference_preferences.CreateFromDiscriminatorValue); } }, + { "repository", n => { Repository = n.GetObjectValue(global::Ayllu.Github.Client.Models.MinimalRepository.CreateFromDiscriminatorValue); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteObjectValue("preferences", Preferences); + writer.WriteObjectValue("repository", Repository); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/CheckSuitePreference_preferences.cs b/src/Ayllu.Github.Client/Github/Client/Models/CheckSuitePreference_preferences.cs new file mode 100644 index 0000000..488ca78 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/CheckSuitePreference_preferences.cs @@ -0,0 +1,65 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class CheckSuitePreference_preferences : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The auto_trigger_checks property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? AutoTriggerChecks { get; set; } +#nullable restore +#else + public List AutoTriggerChecks { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public CheckSuitePreference_preferences() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.CheckSuitePreference_preferences CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.CheckSuitePreference_preferences(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "auto_trigger_checks", n => { AutoTriggerChecks = n.GetCollectionOfObjectValues(global::Ayllu.Github.Client.Models.CheckSuitePreference_preferences_auto_trigger_checks.CreateFromDiscriminatorValue)?.AsList(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteCollectionOfObjectValues("auto_trigger_checks", AutoTriggerChecks); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/CheckSuitePreference_preferences_auto_trigger_checks.cs b/src/Ayllu.Github.Client/Github/Client/Models/CheckSuitePreference_preferences_auto_trigger_checks.cs new file mode 100644 index 0000000..9fb6068 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/CheckSuitePreference_preferences_auto_trigger_checks.cs @@ -0,0 +1,63 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class CheckSuitePreference_preferences_auto_trigger_checks : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The app_id property + public int? AppId { get; set; } + /// The setting property + public bool? Setting { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public CheckSuitePreference_preferences_auto_trigger_checks() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.CheckSuitePreference_preferences_auto_trigger_checks CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.CheckSuitePreference_preferences_auto_trigger_checks(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "app_id", n => { AppId = n.GetIntValue(); } }, + { "setting", n => { Setting = n.GetBoolValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteIntValue("app_id", AppId); + writer.WriteBoolValue("setting", Setting); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/CheckSuite_conclusion.cs b/src/Ayllu.Github.Client/Github/Client/Models/CheckSuite_conclusion.cs new file mode 100644 index 0000000..2f1b79f --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/CheckSuite_conclusion.cs @@ -0,0 +1,48 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public enum CheckSuite_conclusion + #pragma warning restore CS1591 + { + [EnumMember(Value = "success")] + #pragma warning disable CS1591 + Success, + #pragma warning restore CS1591 + [EnumMember(Value = "failure")] + #pragma warning disable CS1591 + Failure, + #pragma warning restore CS1591 + [EnumMember(Value = "neutral")] + #pragma warning disable CS1591 + Neutral, + #pragma warning restore CS1591 + [EnumMember(Value = "cancelled")] + #pragma warning disable CS1591 + Cancelled, + #pragma warning restore CS1591 + [EnumMember(Value = "skipped")] + #pragma warning disable CS1591 + Skipped, + #pragma warning restore CS1591 + [EnumMember(Value = "timed_out")] + #pragma warning disable CS1591 + Timed_out, + #pragma warning restore CS1591 + [EnumMember(Value = "action_required")] + #pragma warning disable CS1591 + Action_required, + #pragma warning restore CS1591 + [EnumMember(Value = "startup_failure")] + #pragma warning disable CS1591 + Startup_failure, + #pragma warning restore CS1591 + [EnumMember(Value = "stale")] + #pragma warning disable CS1591 + Stale, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Models/CheckSuite_status.cs b/src/Ayllu.Github.Client/Github/Client/Models/CheckSuite_status.cs new file mode 100644 index 0000000..2c428cd --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/CheckSuite_status.cs @@ -0,0 +1,35 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Models +{ + /// 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. + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public enum CheckSuite_status + { + [EnumMember(Value = "queued")] + #pragma warning disable CS1591 + Queued, + #pragma warning restore CS1591 + [EnumMember(Value = "in_progress")] + #pragma warning disable CS1591 + In_progress, + #pragma warning restore CS1591 + [EnumMember(Value = "completed")] + #pragma warning disable CS1591 + Completed, + #pragma warning restore CS1591 + [EnumMember(Value = "waiting")] + #pragma warning disable CS1591 + Waiting, + #pragma warning restore CS1591 + [EnumMember(Value = "requested")] + #pragma warning disable CS1591 + Requested, + #pragma warning restore CS1591 + [EnumMember(Value = "pending")] + #pragma warning disable CS1591 + Pending, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Models/Classroom.cs b/src/Ayllu.Github.Client/Github/Client/Models/Classroom.cs new file mode 100644 index 0000000..130048f --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/Classroom.cs @@ -0,0 +1,94 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + /// + /// A GitHub Classroom classroom + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class Classroom : IAdditionalDataHolder, IParsable + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// Whether classroom is archived. + public bool? Archived { get; set; } + /// Unique identifier of the classroom. + public int? Id { get; set; } + /// The name of the classroom. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Name { get; set; } +#nullable restore +#else + public string Name { get; set; } +#endif + /// A GitHub organization. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.SimpleClassroomOrganization? Organization { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.SimpleClassroomOrganization Organization { get; set; } +#endif + /// The URL of the classroom on GitHub Classroom. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Url { get; set; } +#nullable restore +#else + public string Url { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public Classroom() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.Classroom CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.Classroom(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "archived", n => { Archived = n.GetBoolValue(); } }, + { "id", n => { Id = n.GetIntValue(); } }, + { "name", n => { Name = n.GetStringValue(); } }, + { "organization", n => { Organization = n.GetObjectValue(global::Ayllu.Github.Client.Models.SimpleClassroomOrganization.CreateFromDiscriminatorValue); } }, + { "url", n => { Url = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteBoolValue("archived", Archived); + writer.WriteIntValue("id", Id); + writer.WriteStringValue("name", Name); + writer.WriteObjectValue("organization", Organization); + writer.WriteStringValue("url", Url); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/ClassroomAcceptedAssignment.cs b/src/Ayllu.Github.Client/Github/Client/Models/ClassroomAcceptedAssignment.cs new file mode 100644 index 0000000..5015255 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/ClassroomAcceptedAssignment.cs @@ -0,0 +1,112 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + /// + /// A GitHub Classroom accepted assignment + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class ClassroomAcceptedAssignment : IAdditionalDataHolder, IParsable + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// A GitHub Classroom assignment +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.SimpleClassroomAssignment? Assignment { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.SimpleClassroomAssignment Assignment { get; set; } +#endif + /// Count of student commits. + public int? CommitCount { get; set; } + /// Most recent grade. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Grade { get; set; } +#nullable restore +#else + public string Grade { get; set; } +#endif + /// Unique identifier of the repository. + public int? Id { get; set; } + /// Whether a submission passed. + public bool? Passing { get; set; } + /// A GitHub repository view for Classroom +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.SimpleClassroomRepository? Repository { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.SimpleClassroomRepository Repository { get; set; } +#endif + /// The students property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? Students { get; set; } +#nullable restore +#else + public List Students { get; set; } +#endif + /// Whether an accepted assignment has been submitted. + public bool? Submitted { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public ClassroomAcceptedAssignment() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.ClassroomAcceptedAssignment CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.ClassroomAcceptedAssignment(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "assignment", n => { Assignment = n.GetObjectValue(global::Ayllu.Github.Client.Models.SimpleClassroomAssignment.CreateFromDiscriminatorValue); } }, + { "commit_count", n => { CommitCount = n.GetIntValue(); } }, + { "grade", n => { Grade = n.GetStringValue(); } }, + { "id", n => { Id = n.GetIntValue(); } }, + { "passing", n => { Passing = n.GetBoolValue(); } }, + { "repository", n => { Repository = n.GetObjectValue(global::Ayllu.Github.Client.Models.SimpleClassroomRepository.CreateFromDiscriminatorValue); } }, + { "students", n => { Students = n.GetCollectionOfObjectValues(global::Ayllu.Github.Client.Models.SimpleClassroomUser.CreateFromDiscriminatorValue)?.AsList(); } }, + { "submitted", n => { Submitted = n.GetBoolValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteObjectValue("assignment", Assignment); + writer.WriteIntValue("commit_count", CommitCount); + writer.WriteStringValue("grade", Grade); + writer.WriteIntValue("id", Id); + writer.WriteBoolValue("passing", Passing); + writer.WriteObjectValue("repository", Repository); + writer.WriteCollectionOfObjectValues("students", Students); + writer.WriteBoolValue("submitted", Submitted); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/ClassroomAssignment.cs b/src/Ayllu.Github.Client/Github/Client/Models/ClassroomAssignment.cs new file mode 100644 index 0000000..96c8894 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/ClassroomAssignment.cs @@ -0,0 +1,174 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + /// + /// A GitHub Classroom assignment + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class ClassroomAssignment : IAdditionalDataHolder, IParsable + { + /// The number of students that have accepted the assignment. + public int? Accepted { get; set; } + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// A GitHub Classroom classroom +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.Classroom? Classroom { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.Classroom Classroom { get; set; } +#endif + /// The time at which the assignment is due. + public DateTimeOffset? Deadline { get; set; } + /// The selected editor for the assignment. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Editor { get; set; } +#nullable restore +#else + public string Editor { get; set; } +#endif + /// Whether feedback pull request will be created when a student accepts the assignment. + public bool? FeedbackPullRequestsEnabled { get; set; } + /// Unique identifier of the repository. + public int? Id { get; set; } + /// Whether the invitation link is enabled. Visiting an enabled invitation link will accept the assignment. + public bool? InvitationsEnabled { get; set; } + /// The link that a student can use to accept the assignment. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? InviteLink { get; set; } +#nullable restore +#else + public string InviteLink { get; set; } +#endif + /// The programming language used in the assignment. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Language { get; set; } +#nullable restore +#else + public string Language { get; set; } +#endif + /// The maximum allowable members per team. + public int? MaxMembers { get; set; } + /// The maximum allowable teams for the assignment. + public int? MaxTeams { get; set; } + /// The number of students that have passed the assignment. + public int? Passing { get; set; } + /// Whether an accepted assignment creates a public repository. + public bool? PublicRepo { get; set; } + /// Sluggified name of the assignment. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Slug { get; set; } +#nullable restore +#else + public string Slug { get; set; } +#endif + /// A GitHub repository view for Classroom +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.SimpleClassroomRepository? StarterCodeRepository { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.SimpleClassroomRepository StarterCodeRepository { get; set; } +#endif + /// Whether students are admins on created repository when a student accepts the assignment. + public bool? StudentsAreRepoAdmins { get; set; } + /// The number of students that have submitted the assignment. + public int? Submitted { get; set; } + /// Assignment title. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Title { get; set; } +#nullable restore +#else + public string Title { get; set; } +#endif + /// Whether it's a group assignment or individual assignment. + public global::Ayllu.Github.Client.Models.ClassroomAssignment_type? Type { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public ClassroomAssignment() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.ClassroomAssignment CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.ClassroomAssignment(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "accepted", n => { Accepted = n.GetIntValue(); } }, + { "classroom", n => { Classroom = n.GetObjectValue(global::Ayllu.Github.Client.Models.Classroom.CreateFromDiscriminatorValue); } }, + { "deadline", n => { Deadline = n.GetDateTimeOffsetValue(); } }, + { "editor", n => { Editor = n.GetStringValue(); } }, + { "feedback_pull_requests_enabled", n => { FeedbackPullRequestsEnabled = n.GetBoolValue(); } }, + { "id", n => { Id = n.GetIntValue(); } }, + { "invitations_enabled", n => { InvitationsEnabled = n.GetBoolValue(); } }, + { "invite_link", n => { InviteLink = n.GetStringValue(); } }, + { "language", n => { Language = n.GetStringValue(); } }, + { "max_members", n => { MaxMembers = n.GetIntValue(); } }, + { "max_teams", n => { MaxTeams = n.GetIntValue(); } }, + { "passing", n => { Passing = n.GetIntValue(); } }, + { "public_repo", n => { PublicRepo = n.GetBoolValue(); } }, + { "slug", n => { Slug = n.GetStringValue(); } }, + { "starter_code_repository", n => { StarterCodeRepository = n.GetObjectValue(global::Ayllu.Github.Client.Models.SimpleClassroomRepository.CreateFromDiscriminatorValue); } }, + { "students_are_repo_admins", n => { StudentsAreRepoAdmins = n.GetBoolValue(); } }, + { "submitted", n => { Submitted = n.GetIntValue(); } }, + { "title", n => { Title = n.GetStringValue(); } }, + { "type", n => { Type = n.GetEnumValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteIntValue("accepted", Accepted); + writer.WriteObjectValue("classroom", Classroom); + writer.WriteDateTimeOffsetValue("deadline", Deadline); + writer.WriteStringValue("editor", Editor); + writer.WriteBoolValue("feedback_pull_requests_enabled", FeedbackPullRequestsEnabled); + writer.WriteIntValue("id", Id); + writer.WriteBoolValue("invitations_enabled", InvitationsEnabled); + writer.WriteStringValue("invite_link", InviteLink); + writer.WriteStringValue("language", Language); + writer.WriteIntValue("max_members", MaxMembers); + writer.WriteIntValue("max_teams", MaxTeams); + writer.WriteIntValue("passing", Passing); + writer.WriteBoolValue("public_repo", PublicRepo); + writer.WriteStringValue("slug", Slug); + writer.WriteObjectValue("starter_code_repository", StarterCodeRepository); + writer.WriteBoolValue("students_are_repo_admins", StudentsAreRepoAdmins); + writer.WriteIntValue("submitted", Submitted); + writer.WriteStringValue("title", Title); + writer.WriteEnumValue("type", Type); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/ClassroomAssignmentGrade.cs b/src/Ayllu.Github.Client/Github/Client/Models/ClassroomAssignmentGrade.cs new file mode 100644 index 0000000..eaf1371 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/ClassroomAssignmentGrade.cs @@ -0,0 +1,154 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + /// + /// Grade for a student or groups GitHub Classroom assignment + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class ClassroomAssignmentGrade : IAdditionalDataHolder, IParsable + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// Name of the assignment +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? AssignmentName { get; set; } +#nullable restore +#else + public string AssignmentName { get; set; } +#endif + /// URL of the assignment +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? AssignmentUrl { get; set; } +#nullable restore +#else + public string AssignmentUrl { get; set; } +#endif + /// GitHub username of the student +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? GithubUsername { get; set; } +#nullable restore +#else + public string GithubUsername { get; set; } +#endif + /// If a group assignment, name of the group the student is in +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? GroupName { get; set; } +#nullable restore +#else + public string GroupName { get; set; } +#endif + /// Number of points available for the assignment + public int? PointsAvailable { get; set; } + /// Number of points awarded to the student + public int? PointsAwarded { get; set; } + /// Roster identifier of the student +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? RosterIdentifier { get; set; } +#nullable restore +#else + public string RosterIdentifier { get; set; } +#endif + /// URL of the starter code for the assignment +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? StarterCodeUrl { get; set; } +#nullable restore +#else + public string StarterCodeUrl { get; set; } +#endif + /// Name of the student's assignment repository +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? StudentRepositoryName { get; set; } +#nullable restore +#else + public string StudentRepositoryName { get; set; } +#endif + /// URL of the student's assignment repository +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? StudentRepositoryUrl { get; set; } +#nullable restore +#else + public string StudentRepositoryUrl { get; set; } +#endif + /// Timestamp of the student's assignment submission +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? SubmissionTimestamp { get; set; } +#nullable restore +#else + public string SubmissionTimestamp { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public ClassroomAssignmentGrade() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.ClassroomAssignmentGrade CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.ClassroomAssignmentGrade(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "assignment_name", n => { AssignmentName = n.GetStringValue(); } }, + { "assignment_url", n => { AssignmentUrl = n.GetStringValue(); } }, + { "github_username", n => { GithubUsername = n.GetStringValue(); } }, + { "group_name", n => { GroupName = n.GetStringValue(); } }, + { "points_available", n => { PointsAvailable = n.GetIntValue(); } }, + { "points_awarded", n => { PointsAwarded = n.GetIntValue(); } }, + { "roster_identifier", n => { RosterIdentifier = n.GetStringValue(); } }, + { "starter_code_url", n => { StarterCodeUrl = n.GetStringValue(); } }, + { "student_repository_name", n => { StudentRepositoryName = n.GetStringValue(); } }, + { "student_repository_url", n => { StudentRepositoryUrl = n.GetStringValue(); } }, + { "submission_timestamp", n => { SubmissionTimestamp = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("assignment_name", AssignmentName); + writer.WriteStringValue("assignment_url", AssignmentUrl); + writer.WriteStringValue("github_username", GithubUsername); + writer.WriteStringValue("group_name", GroupName); + writer.WriteIntValue("points_available", PointsAvailable); + writer.WriteIntValue("points_awarded", PointsAwarded); + writer.WriteStringValue("roster_identifier", RosterIdentifier); + writer.WriteStringValue("starter_code_url", StarterCodeUrl); + writer.WriteStringValue("student_repository_name", StudentRepositoryName); + writer.WriteStringValue("student_repository_url", StudentRepositoryUrl); + writer.WriteStringValue("submission_timestamp", SubmissionTimestamp); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/ClassroomAssignment_type.cs b/src/Ayllu.Github.Client/Github/Client/Models/ClassroomAssignment_type.cs new file mode 100644 index 0000000..e9b448a --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/ClassroomAssignment_type.cs @@ -0,0 +1,19 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Models +{ + /// Whether it's a group assignment or individual assignment. + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public enum ClassroomAssignment_type + { + [EnumMember(Value = "individual")] + #pragma warning disable CS1591 + Individual, + #pragma warning restore CS1591 + [EnumMember(Value = "group")] + #pragma warning disable CS1591 + Group, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Models/CloneTraffic.cs b/src/Ayllu.Github.Client/Github/Client/Models/CloneTraffic.cs new file mode 100644 index 0000000..7c78915 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/CloneTraffic.cs @@ -0,0 +1,74 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + /// + /// Clone Traffic + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class CloneTraffic : IAdditionalDataHolder, IParsable + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The clones property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? Clones { get; set; } +#nullable restore +#else + public List Clones { get; set; } +#endif + /// The count property + public int? Count { get; set; } + /// The uniques property + public int? Uniques { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public CloneTraffic() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.CloneTraffic CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.CloneTraffic(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "clones", n => { Clones = n.GetCollectionOfObjectValues(global::Ayllu.Github.Client.Models.Traffic.CreateFromDiscriminatorValue)?.AsList(); } }, + { "count", n => { Count = n.GetIntValue(); } }, + { "uniques", n => { Uniques = n.GetIntValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteCollectionOfObjectValues("clones", Clones); + writer.WriteIntValue("count", Count); + writer.WriteIntValue("uniques", Uniques); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/Code.cs b/src/Ayllu.Github.Client/Github/Client/Models/Code.cs new file mode 100644 index 0000000..fff8048 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/Code.cs @@ -0,0 +1,105 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class Code : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The fragment property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Fragment { get; set; } +#nullable restore +#else + public string Fragment { get; set; } +#endif + /// The matches property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? Matches { get; set; } +#nullable restore +#else + public List Matches { get; set; } +#endif + /// The object_type property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? ObjectType { get; set; } +#nullable restore +#else + public string ObjectType { get; set; } +#endif + /// The object_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? ObjectUrl { get; set; } +#nullable restore +#else + public string ObjectUrl { get; set; } +#endif + /// The property property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Property { get; set; } +#nullable restore +#else + public string Property { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public Code() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.Code CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.Code(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "fragment", n => { Fragment = n.GetStringValue(); } }, + { "matches", n => { Matches = n.GetCollectionOfObjectValues(global::Ayllu.Github.Client.Models.Code_matches.CreateFromDiscriminatorValue)?.AsList(); } }, + { "object_type", n => { ObjectType = n.GetStringValue(); } }, + { "object_url", n => { ObjectUrl = n.GetStringValue(); } }, + { "property", n => { Property = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("fragment", Fragment); + writer.WriteCollectionOfObjectValues("matches", Matches); + writer.WriteStringValue("object_type", ObjectType); + writer.WriteStringValue("object_url", ObjectUrl); + writer.WriteStringValue("property", Property); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/Code503Error.cs b/src/Ayllu.Github.Client/Github/Client/Models/Code503Error.cs new file mode 100644 index 0000000..2e9f885 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/Code503Error.cs @@ -0,0 +1,88 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class Code503Error : ApiException, IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The code property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Code { get; set; } +#nullable restore +#else + public string Code { get; set; } +#endif + /// The documentation_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? DocumentationUrl { get; set; } +#nullable restore +#else + public string DocumentationUrl { get; set; } +#endif + /// The primary error message. + public override string Message { get => MessageEscaped ?? string.Empty; } + /// The message property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? MessageEscaped { get; set; } +#nullable restore +#else + public string MessageEscaped { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public Code503Error() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.Code503Error CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.Code503Error(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "code", n => { Code = n.GetStringValue(); } }, + { "documentation_url", n => { DocumentationUrl = n.GetStringValue(); } }, + { "message", n => { MessageEscaped = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("code", Code); + writer.WriteStringValue("documentation_url", DocumentationUrl); + writer.WriteStringValue("message", MessageEscaped); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/CodeOfConduct.cs b/src/Ayllu.Github.Client/Github/Client/Models/CodeOfConduct.cs new file mode 100644 index 0000000..9aa30e1 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/CodeOfConduct.cs @@ -0,0 +1,106 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + /// + /// Code Of Conduct + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class CodeOfConduct : IAdditionalDataHolder, IParsable + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The body property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Body { get; set; } +#nullable restore +#else + public string Body { get; set; } +#endif + /// The html_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? HtmlUrl { get; set; } +#nullable restore +#else + public string HtmlUrl { get; set; } +#endif + /// The key property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Key { get; set; } +#nullable restore +#else + public string Key { get; set; } +#endif + /// The name property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Name { get; set; } +#nullable restore +#else + public string Name { get; set; } +#endif + /// The url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Url { get; set; } +#nullable restore +#else + public string Url { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public CodeOfConduct() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.CodeOfConduct CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.CodeOfConduct(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "body", n => { Body = n.GetStringValue(); } }, + { "html_url", n => { HtmlUrl = n.GetStringValue(); } }, + { "key", n => { Key = n.GetStringValue(); } }, + { "name", n => { Name = n.GetStringValue(); } }, + { "url", n => { Url = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("body", Body); + writer.WriteStringValue("html_url", HtmlUrl); + writer.WriteStringValue("key", Key); + writer.WriteStringValue("name", Name); + writer.WriteStringValue("url", Url); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/CodeOfConductSimple.cs b/src/Ayllu.Github.Client/Github/Client/Models/CodeOfConductSimple.cs new file mode 100644 index 0000000..2c35620 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/CodeOfConductSimple.cs @@ -0,0 +1,96 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + /// + /// Code of Conduct Simple + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class CodeOfConductSimple : IAdditionalDataHolder, IParsable + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The html_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? HtmlUrl { get; set; } +#nullable restore +#else + public string HtmlUrl { get; set; } +#endif + /// The key property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Key { get; set; } +#nullable restore +#else + public string Key { get; set; } +#endif + /// The name property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Name { get; set; } +#nullable restore +#else + public string Name { get; set; } +#endif + /// The url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Url { get; set; } +#nullable restore +#else + public string Url { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public CodeOfConductSimple() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.CodeOfConductSimple CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.CodeOfConductSimple(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "html_url", n => { HtmlUrl = n.GetStringValue(); } }, + { "key", n => { Key = n.GetStringValue(); } }, + { "name", n => { Name = n.GetStringValue(); } }, + { "url", n => { Url = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("html_url", HtmlUrl); + writer.WriteStringValue("key", Key); + writer.WriteStringValue("name", Name); + writer.WriteStringValue("url", Url); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/CodeScanningAlert.cs b/src/Ayllu.Github.Client/Github/Client/Models/CodeScanningAlert.cs new file mode 100644 index 0000000..37acbc1 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/CodeScanningAlert.cs @@ -0,0 +1,165 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class CodeScanningAlert : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The time that the alert was created in ISO 8601 format: `YYYY-MM-DDTHH:MM:SSZ`. + public DateTimeOffset? CreatedAt { get; private set; } + /// A GitHub user. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.NullableSimpleUser? DismissalApprovedBy { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.NullableSimpleUser DismissalApprovedBy { get; set; } +#endif + /// The time that the alert was dismissed in ISO 8601 format: `YYYY-MM-DDTHH:MM:SSZ`. + public DateTimeOffset? DismissedAt { get; private set; } + /// A GitHub user. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.NullableSimpleUser? DismissedBy { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.NullableSimpleUser DismissedBy { get; set; } +#endif + /// The dismissal comment associated with the dismissal of the alert. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? DismissedComment { get; set; } +#nullable restore +#else + public string DismissedComment { get; set; } +#endif + /// **Required when the state is dismissed.** The reason for dismissing or closing the alert. + public global::Ayllu.Github.Client.Models.CodeScanningAlertDismissedReason? DismissedReason { get; set; } + /// The time that the alert was no longer detected and was considered fixed in ISO 8601 format: `YYYY-MM-DDTHH:MM:SSZ`. + public DateTimeOffset? FixedAt { get; private set; } + /// The GitHub URL of the alert resource. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? HtmlUrl { get; private set; } +#nullable restore +#else + public string HtmlUrl { get; private set; } +#endif + /// The REST API URL for fetching the list of instances for an alert. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? InstancesUrl { get; private set; } +#nullable restore +#else + public string InstancesUrl { get; private set; } +#endif + /// The most_recent_instance property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.CodeScanningAlertInstance? MostRecentInstance { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.CodeScanningAlertInstance MostRecentInstance { get; set; } +#endif + /// The security alert number. + public int? Number { get; private set; } + /// The rule property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.CodeScanningAlertRule? Rule { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.CodeScanningAlertRule Rule { get; set; } +#endif + /// State of a code scanning alert. + public global::Ayllu.Github.Client.Models.CodeScanningAlertState? State { get; set; } + /// The tool property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.CodeScanningAnalysisTool? Tool { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.CodeScanningAnalysisTool Tool { get; set; } +#endif + /// The time that the alert was last updated in ISO 8601 format: `YYYY-MM-DDTHH:MM:SSZ`. + public DateTimeOffset? UpdatedAt { get; private set; } + /// The REST API URL of the alert resource. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Url { get; private set; } +#nullable restore +#else + public string Url { get; private set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public CodeScanningAlert() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.CodeScanningAlert CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.CodeScanningAlert(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "created_at", n => { CreatedAt = n.GetDateTimeOffsetValue(); } }, + { "dismissal_approved_by", n => { DismissalApprovedBy = n.GetObjectValue(global::Ayllu.Github.Client.Models.NullableSimpleUser.CreateFromDiscriminatorValue); } }, + { "dismissed_at", n => { DismissedAt = n.GetDateTimeOffsetValue(); } }, + { "dismissed_by", n => { DismissedBy = n.GetObjectValue(global::Ayllu.Github.Client.Models.NullableSimpleUser.CreateFromDiscriminatorValue); } }, + { "dismissed_comment", n => { DismissedComment = n.GetStringValue(); } }, + { "dismissed_reason", n => { DismissedReason = n.GetEnumValue(); } }, + { "fixed_at", n => { FixedAt = n.GetDateTimeOffsetValue(); } }, + { "html_url", n => { HtmlUrl = n.GetStringValue(); } }, + { "instances_url", n => { InstancesUrl = n.GetStringValue(); } }, + { "most_recent_instance", n => { MostRecentInstance = n.GetObjectValue(global::Ayllu.Github.Client.Models.CodeScanningAlertInstance.CreateFromDiscriminatorValue); } }, + { "number", n => { Number = n.GetIntValue(); } }, + { "rule", n => { Rule = n.GetObjectValue(global::Ayllu.Github.Client.Models.CodeScanningAlertRule.CreateFromDiscriminatorValue); } }, + { "state", n => { State = n.GetEnumValue(); } }, + { "tool", n => { Tool = n.GetObjectValue(global::Ayllu.Github.Client.Models.CodeScanningAnalysisTool.CreateFromDiscriminatorValue); } }, + { "updated_at", n => { UpdatedAt = n.GetDateTimeOffsetValue(); } }, + { "url", n => { Url = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteObjectValue("dismissal_approved_by", DismissalApprovedBy); + writer.WriteObjectValue("dismissed_by", DismissedBy); + writer.WriteStringValue("dismissed_comment", DismissedComment); + writer.WriteEnumValue("dismissed_reason", DismissedReason); + writer.WriteObjectValue("most_recent_instance", MostRecentInstance); + writer.WriteObjectValue("rule", Rule); + writer.WriteEnumValue("state", State); + writer.WriteObjectValue("tool", Tool); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/CodeScanningAlert503Error.cs b/src/Ayllu.Github.Client/Github/Client/Models/CodeScanningAlert503Error.cs new file mode 100644 index 0000000..4edd2a4 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/CodeScanningAlert503Error.cs @@ -0,0 +1,88 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class CodeScanningAlert503Error : ApiException, IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The code property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Code { get; set; } +#nullable restore +#else + public string Code { get; set; } +#endif + /// The documentation_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? DocumentationUrl { get; set; } +#nullable restore +#else + public string DocumentationUrl { get; set; } +#endif + /// The primary error message. + public override string Message { get => MessageEscaped ?? string.Empty; } + /// The message property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? MessageEscaped { get; set; } +#nullable restore +#else + public string MessageEscaped { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public CodeScanningAlert503Error() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.CodeScanningAlert503Error CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.CodeScanningAlert503Error(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "code", n => { Code = n.GetStringValue(); } }, + { "documentation_url", n => { DocumentationUrl = n.GetStringValue(); } }, + { "message", n => { MessageEscaped = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("code", Code); + writer.WriteStringValue("documentation_url", DocumentationUrl); + writer.WriteStringValue("message", MessageEscaped); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/CodeScanningAlertClassification.cs b/src/Ayllu.Github.Client/Github/Client/Models/CodeScanningAlertClassification.cs new file mode 100644 index 0000000..a784e9f --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/CodeScanningAlertClassification.cs @@ -0,0 +1,27 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Models +{ + /// A classification of the file. For example to identify it as generated. + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public enum CodeScanningAlertClassification + { + [EnumMember(Value = "source")] + #pragma warning disable CS1591 + Source, + #pragma warning restore CS1591 + [EnumMember(Value = "generated")] + #pragma warning disable CS1591 + Generated, + #pragma warning restore CS1591 + [EnumMember(Value = "test")] + #pragma warning disable CS1591 + Test, + #pragma warning restore CS1591 + [EnumMember(Value = "library")] + #pragma warning disable CS1591 + Library, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Models/CodeScanningAlertDismissedReason.cs b/src/Ayllu.Github.Client/Github/Client/Models/CodeScanningAlertDismissedReason.cs new file mode 100644 index 0000000..a2fd5af --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/CodeScanningAlertDismissedReason.cs @@ -0,0 +1,23 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Models +{ + /// **Required when the state is dismissed.** The reason for dismissing or closing the alert. + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public enum CodeScanningAlertDismissedReason + { + [EnumMember(Value = "false positive")] + #pragma warning disable CS1591 + FalsePositive, + #pragma warning restore CS1591 + [EnumMember(Value = "won't fix")] + #pragma warning disable CS1591 + WonTFix, + #pragma warning restore CS1591 + [EnumMember(Value = "used in tests")] + #pragma warning disable CS1591 + UsedInTests, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Models/CodeScanningAlertInstance.cs b/src/Ayllu.Github.Client/Github/Client/Models/CodeScanningAlertInstance.cs new file mode 100644 index 0000000..28b0523 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/CodeScanningAlertInstance.cs @@ -0,0 +1,149 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class CodeScanningAlertInstance : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// Identifies the configuration under which the analysis was executed. For example, in GitHub Actions this includes the workflow filename and job name. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? AnalysisKey { get; set; } +#nullable restore +#else + public string AnalysisKey { get; set; } +#endif + /// 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. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Category { get; set; } +#nullable restore +#else + public string Category { get; set; } +#endif + /// Classifications that have been applied to the file that triggered the alert.For example identifying it as documentation, or a generated file. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? Classifications { get; set; } +#nullable restore +#else + public List Classifications { get; set; } +#endif + /// The commit_sha property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? CommitSha { get; set; } +#nullable restore +#else + public string CommitSha { get; set; } +#endif + /// 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. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Environment { get; set; } +#nullable restore +#else + public string Environment { get; set; } +#endif + /// The html_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? HtmlUrl { get; set; } +#nullable restore +#else + public string HtmlUrl { get; set; } +#endif + /// Describe a region within a file for the alert. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.CodeScanningAlertLocation? Location { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.CodeScanningAlertLocation Location { get; set; } +#endif + /// The message property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.CodeScanningAlertInstance_message? Message { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.CodeScanningAlertInstance_message Message { get; set; } +#endif + /// The Git reference, formatted as `refs/pull/<number>/merge`, `refs/pull/<number>/head`,`refs/heads/<branch name>` or simply `<branch name>`. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Ref { get; set; } +#nullable restore +#else + public string Ref { get; set; } +#endif + /// State of a code scanning alert. + public global::Ayllu.Github.Client.Models.CodeScanningAlertState? State { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public CodeScanningAlertInstance() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.CodeScanningAlertInstance CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.CodeScanningAlertInstance(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "analysis_key", n => { AnalysisKey = n.GetStringValue(); } }, + { "category", n => { Category = n.GetStringValue(); } }, + { "classifications", n => { Classifications = n.GetCollectionOfEnumValues()?.AsList(); } }, + { "commit_sha", n => { CommitSha = n.GetStringValue(); } }, + { "environment", n => { Environment = n.GetStringValue(); } }, + { "html_url", n => { HtmlUrl = n.GetStringValue(); } }, + { "location", n => { Location = n.GetObjectValue(global::Ayllu.Github.Client.Models.CodeScanningAlertLocation.CreateFromDiscriminatorValue); } }, + { "message", n => { Message = n.GetObjectValue(global::Ayllu.Github.Client.Models.CodeScanningAlertInstance_message.CreateFromDiscriminatorValue); } }, + { "ref", n => { Ref = n.GetStringValue(); } }, + { "state", n => { State = n.GetEnumValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("analysis_key", AnalysisKey); + writer.WriteStringValue("category", Category); + writer.WriteCollectionOfEnumValues("classifications", Classifications); + writer.WriteStringValue("commit_sha", CommitSha); + writer.WriteStringValue("environment", Environment); + writer.WriteStringValue("html_url", HtmlUrl); + writer.WriteObjectValue("location", Location); + writer.WriteObjectValue("message", Message); + writer.WriteStringValue("ref", Ref); + writer.WriteEnumValue("state", State); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/CodeScanningAlertInstance_message.cs b/src/Ayllu.Github.Client/Github/Client/Models/CodeScanningAlertInstance_message.cs new file mode 100644 index 0000000..94f76ef --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/CodeScanningAlertInstance_message.cs @@ -0,0 +1,65 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class CodeScanningAlertInstance_message : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The text property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Text { get; set; } +#nullable restore +#else + public string Text { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public CodeScanningAlertInstance_message() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.CodeScanningAlertInstance_message CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.CodeScanningAlertInstance_message(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "text", n => { Text = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("text", Text); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/CodeScanningAlertItems.cs b/src/Ayllu.Github.Client/Github/Client/Models/CodeScanningAlertItems.cs new file mode 100644 index 0000000..4e51e29 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/CodeScanningAlertItems.cs @@ -0,0 +1,165 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class CodeScanningAlertItems : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The time that the alert was created in ISO 8601 format: `YYYY-MM-DDTHH:MM:SSZ`. + public DateTimeOffset? CreatedAt { get; private set; } + /// A GitHub user. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.NullableSimpleUser? DismissalApprovedBy { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.NullableSimpleUser DismissalApprovedBy { get; set; } +#endif + /// The time that the alert was dismissed in ISO 8601 format: `YYYY-MM-DDTHH:MM:SSZ`. + public DateTimeOffset? DismissedAt { get; private set; } + /// A GitHub user. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.NullableSimpleUser? DismissedBy { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.NullableSimpleUser DismissedBy { get; set; } +#endif + /// The dismissal comment associated with the dismissal of the alert. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? DismissedComment { get; set; } +#nullable restore +#else + public string DismissedComment { get; set; } +#endif + /// **Required when the state is dismissed.** The reason for dismissing or closing the alert. + public global::Ayllu.Github.Client.Models.CodeScanningAlertDismissedReason? DismissedReason { get; set; } + /// The time that the alert was no longer detected and was considered fixed in ISO 8601 format: `YYYY-MM-DDTHH:MM:SSZ`. + public DateTimeOffset? FixedAt { get; private set; } + /// The GitHub URL of the alert resource. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? HtmlUrl { get; private set; } +#nullable restore +#else + public string HtmlUrl { get; private set; } +#endif + /// The REST API URL for fetching the list of instances for an alert. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? InstancesUrl { get; private set; } +#nullable restore +#else + public string InstancesUrl { get; private set; } +#endif + /// The most_recent_instance property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.CodeScanningAlertInstance? MostRecentInstance { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.CodeScanningAlertInstance MostRecentInstance { get; set; } +#endif + /// The security alert number. + public int? Number { get; private set; } + /// The rule property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.CodeScanningAlertRuleSummary? Rule { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.CodeScanningAlertRuleSummary Rule { get; set; } +#endif + /// State of a code scanning alert. + public global::Ayllu.Github.Client.Models.CodeScanningAlertState? State { get; set; } + /// The tool property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.CodeScanningAnalysisTool? Tool { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.CodeScanningAnalysisTool Tool { get; set; } +#endif + /// The time that the alert was last updated in ISO 8601 format: `YYYY-MM-DDTHH:MM:SSZ`. + public DateTimeOffset? UpdatedAt { get; private set; } + /// The REST API URL of the alert resource. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Url { get; private set; } +#nullable restore +#else + public string Url { get; private set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public CodeScanningAlertItems() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.CodeScanningAlertItems CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.CodeScanningAlertItems(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "created_at", n => { CreatedAt = n.GetDateTimeOffsetValue(); } }, + { "dismissal_approved_by", n => { DismissalApprovedBy = n.GetObjectValue(global::Ayllu.Github.Client.Models.NullableSimpleUser.CreateFromDiscriminatorValue); } }, + { "dismissed_at", n => { DismissedAt = n.GetDateTimeOffsetValue(); } }, + { "dismissed_by", n => { DismissedBy = n.GetObjectValue(global::Ayllu.Github.Client.Models.NullableSimpleUser.CreateFromDiscriminatorValue); } }, + { "dismissed_comment", n => { DismissedComment = n.GetStringValue(); } }, + { "dismissed_reason", n => { DismissedReason = n.GetEnumValue(); } }, + { "fixed_at", n => { FixedAt = n.GetDateTimeOffsetValue(); } }, + { "html_url", n => { HtmlUrl = n.GetStringValue(); } }, + { "instances_url", n => { InstancesUrl = n.GetStringValue(); } }, + { "most_recent_instance", n => { MostRecentInstance = n.GetObjectValue(global::Ayllu.Github.Client.Models.CodeScanningAlertInstance.CreateFromDiscriminatorValue); } }, + { "number", n => { Number = n.GetIntValue(); } }, + { "rule", n => { Rule = n.GetObjectValue(global::Ayllu.Github.Client.Models.CodeScanningAlertRuleSummary.CreateFromDiscriminatorValue); } }, + { "state", n => { State = n.GetEnumValue(); } }, + { "tool", n => { Tool = n.GetObjectValue(global::Ayllu.Github.Client.Models.CodeScanningAnalysisTool.CreateFromDiscriminatorValue); } }, + { "updated_at", n => { UpdatedAt = n.GetDateTimeOffsetValue(); } }, + { "url", n => { Url = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteObjectValue("dismissal_approved_by", DismissalApprovedBy); + writer.WriteObjectValue("dismissed_by", DismissedBy); + writer.WriteStringValue("dismissed_comment", DismissedComment); + writer.WriteEnumValue("dismissed_reason", DismissedReason); + writer.WriteObjectValue("most_recent_instance", MostRecentInstance); + writer.WriteObjectValue("rule", Rule); + writer.WriteEnumValue("state", State); + writer.WriteObjectValue("tool", Tool); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/CodeScanningAlertLocation.cs b/src/Ayllu.Github.Client/Github/Client/Models/CodeScanningAlertLocation.cs new file mode 100644 index 0000000..10e488f --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/CodeScanningAlertLocation.cs @@ -0,0 +1,82 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + /// + /// Describe a region within a file for the alert. + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class CodeScanningAlertLocation : IAdditionalDataHolder, IParsable + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The end_column property + public int? EndColumn { get; set; } + /// The end_line property + public int? EndLine { get; set; } + /// The path property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Path { get; set; } +#nullable restore +#else + public string Path { get; set; } +#endif + /// The start_column property + public int? StartColumn { get; set; } + /// The start_line property + public int? StartLine { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public CodeScanningAlertLocation() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.CodeScanningAlertLocation CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.CodeScanningAlertLocation(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "end_column", n => { EndColumn = n.GetIntValue(); } }, + { "end_line", n => { EndLine = n.GetIntValue(); } }, + { "path", n => { Path = n.GetStringValue(); } }, + { "start_column", n => { StartColumn = n.GetIntValue(); } }, + { "start_line", n => { StartLine = n.GetIntValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteIntValue("end_column", EndColumn); + writer.WriteIntValue("end_line", EndLine); + writer.WriteStringValue("path", Path); + writer.WriteIntValue("start_column", StartColumn); + writer.WriteIntValue("start_line", StartLine); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/CodeScanningAlertRule.cs b/src/Ayllu.Github.Client/Github/Client/Models/CodeScanningAlertRule.cs new file mode 100644 index 0000000..5c7ffa6 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/CodeScanningAlertRule.cs @@ -0,0 +1,133 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class CodeScanningAlertRule : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// A short description of the rule used to detect the alert. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Description { get; set; } +#nullable restore +#else + public string Description { get; set; } +#endif + /// A description of the rule used to detect the alert. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? FullDescription { get; set; } +#nullable restore +#else + public string FullDescription { get; set; } +#endif + /// Detailed documentation for the rule as GitHub Flavored Markdown. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Help { get; set; } +#nullable restore +#else + public string Help { get; set; } +#endif + /// A link to the documentation for the rule used to detect the alert. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? HelpUri { get; set; } +#nullable restore +#else + public string HelpUri { get; set; } +#endif + /// A unique identifier for the rule used to detect the alert. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Id { get; set; } +#nullable restore +#else + public string Id { get; set; } +#endif + /// The name of the rule used to detect the alert. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Name { get; set; } +#nullable restore +#else + public string Name { get; set; } +#endif + /// The security severity of the alert. + public global::Ayllu.Github.Client.Models.CodeScanningAlertRule_security_severity_level? SecuritySeverityLevel { get; set; } + /// The severity of the alert. + public global::Ayllu.Github.Client.Models.CodeScanningAlertRule_severity? Severity { get; set; } + /// A set of tags applicable for the rule. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? Tags { get; set; } +#nullable restore +#else + public List Tags { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public CodeScanningAlertRule() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.CodeScanningAlertRule CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.CodeScanningAlertRule(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "description", n => { Description = n.GetStringValue(); } }, + { "full_description", n => { FullDescription = n.GetStringValue(); } }, + { "help", n => { Help = n.GetStringValue(); } }, + { "help_uri", n => { HelpUri = n.GetStringValue(); } }, + { "id", n => { Id = n.GetStringValue(); } }, + { "name", n => { Name = n.GetStringValue(); } }, + { "security_severity_level", n => { SecuritySeverityLevel = n.GetEnumValue(); } }, + { "severity", n => { Severity = n.GetEnumValue(); } }, + { "tags", n => { Tags = n.GetCollectionOfPrimitiveValues()?.AsList(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("description", Description); + writer.WriteStringValue("full_description", FullDescription); + writer.WriteStringValue("help", Help); + writer.WriteStringValue("help_uri", HelpUri); + writer.WriteStringValue("id", Id); + writer.WriteStringValue("name", Name); + writer.WriteEnumValue("security_severity_level", SecuritySeverityLevel); + writer.WriteEnumValue("severity", Severity); + writer.WriteCollectionOfPrimitiveValues("tags", Tags); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/CodeScanningAlertRuleSummary.cs b/src/Ayllu.Github.Client/Github/Client/Models/CodeScanningAlertRuleSummary.cs new file mode 100644 index 0000000..5b85d07 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/CodeScanningAlertRuleSummary.cs @@ -0,0 +1,133 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class CodeScanningAlertRuleSummary : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// A short description of the rule used to detect the alert. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Description { get; set; } +#nullable restore +#else + public string Description { get; set; } +#endif + /// A description of the rule used to detect the alert. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? FullDescription { get; set; } +#nullable restore +#else + public string FullDescription { get; set; } +#endif + /// Detailed documentation for the rule as GitHub Flavored Markdown. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Help { get; set; } +#nullable restore +#else + public string Help { get; set; } +#endif + /// A link to the documentation for the rule used to detect the alert. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? HelpUri { get; set; } +#nullable restore +#else + public string HelpUri { get; set; } +#endif + /// A unique identifier for the rule used to detect the alert. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Id { get; set; } +#nullable restore +#else + public string Id { get; set; } +#endif + /// The name of the rule used to detect the alert. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Name { get; set; } +#nullable restore +#else + public string Name { get; set; } +#endif + /// The security severity of the alert. + public global::Ayllu.Github.Client.Models.CodeScanningAlertRuleSummary_security_severity_level? SecuritySeverityLevel { get; set; } + /// The severity of the alert. + public global::Ayllu.Github.Client.Models.CodeScanningAlertRuleSummary_severity? Severity { get; set; } + /// A set of tags applicable for the rule. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? Tags { get; set; } +#nullable restore +#else + public List Tags { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public CodeScanningAlertRuleSummary() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.CodeScanningAlertRuleSummary CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.CodeScanningAlertRuleSummary(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "description", n => { Description = n.GetStringValue(); } }, + { "full_description", n => { FullDescription = n.GetStringValue(); } }, + { "help", n => { Help = n.GetStringValue(); } }, + { "help_uri", n => { HelpUri = n.GetStringValue(); } }, + { "id", n => { Id = n.GetStringValue(); } }, + { "name", n => { Name = n.GetStringValue(); } }, + { "security_severity_level", n => { SecuritySeverityLevel = n.GetEnumValue(); } }, + { "severity", n => { Severity = n.GetEnumValue(); } }, + { "tags", n => { Tags = n.GetCollectionOfPrimitiveValues()?.AsList(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("description", Description); + writer.WriteStringValue("full_description", FullDescription); + writer.WriteStringValue("help", Help); + writer.WriteStringValue("help_uri", HelpUri); + writer.WriteStringValue("id", Id); + writer.WriteStringValue("name", Name); + writer.WriteEnumValue("security_severity_level", SecuritySeverityLevel); + writer.WriteEnumValue("severity", Severity); + writer.WriteCollectionOfPrimitiveValues("tags", Tags); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/CodeScanningAlertRuleSummary_security_severity_level.cs b/src/Ayllu.Github.Client/Github/Client/Models/CodeScanningAlertRuleSummary_security_severity_level.cs new file mode 100644 index 0000000..64ee709 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/CodeScanningAlertRuleSummary_security_severity_level.cs @@ -0,0 +1,27 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Models +{ + /// The security severity of the alert. + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public enum CodeScanningAlertRuleSummary_security_severity_level + { + [EnumMember(Value = "low")] + #pragma warning disable CS1591 + Low, + #pragma warning restore CS1591 + [EnumMember(Value = "medium")] + #pragma warning disable CS1591 + Medium, + #pragma warning restore CS1591 + [EnumMember(Value = "high")] + #pragma warning disable CS1591 + High, + #pragma warning restore CS1591 + [EnumMember(Value = "critical")] + #pragma warning disable CS1591 + Critical, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Models/CodeScanningAlertRuleSummary_severity.cs b/src/Ayllu.Github.Client/Github/Client/Models/CodeScanningAlertRuleSummary_severity.cs new file mode 100644 index 0000000..5dc966a --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/CodeScanningAlertRuleSummary_severity.cs @@ -0,0 +1,27 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Models +{ + /// The severity of the alert. + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public enum CodeScanningAlertRuleSummary_severity + { + [EnumMember(Value = "none")] + #pragma warning disable CS1591 + None, + #pragma warning restore CS1591 + [EnumMember(Value = "note")] + #pragma warning disable CS1591 + Note, + #pragma warning restore CS1591 + [EnumMember(Value = "warning")] + #pragma warning disable CS1591 + Warning, + #pragma warning restore CS1591 + [EnumMember(Value = "error")] + #pragma warning disable CS1591 + Error, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Models/CodeScanningAlertRule_security_severity_level.cs b/src/Ayllu.Github.Client/Github/Client/Models/CodeScanningAlertRule_security_severity_level.cs new file mode 100644 index 0000000..ad3a757 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/CodeScanningAlertRule_security_severity_level.cs @@ -0,0 +1,27 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Models +{ + /// The security severity of the alert. + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public enum CodeScanningAlertRule_security_severity_level + { + [EnumMember(Value = "low")] + #pragma warning disable CS1591 + Low, + #pragma warning restore CS1591 + [EnumMember(Value = "medium")] + #pragma warning disable CS1591 + Medium, + #pragma warning restore CS1591 + [EnumMember(Value = "high")] + #pragma warning disable CS1591 + High, + #pragma warning restore CS1591 + [EnumMember(Value = "critical")] + #pragma warning disable CS1591 + Critical, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Models/CodeScanningAlertRule_severity.cs b/src/Ayllu.Github.Client/Github/Client/Models/CodeScanningAlertRule_severity.cs new file mode 100644 index 0000000..d209baf --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/CodeScanningAlertRule_severity.cs @@ -0,0 +1,27 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Models +{ + /// The severity of the alert. + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public enum CodeScanningAlertRule_severity + { + [EnumMember(Value = "none")] + #pragma warning disable CS1591 + None, + #pragma warning restore CS1591 + [EnumMember(Value = "note")] + #pragma warning disable CS1591 + Note, + #pragma warning restore CS1591 + [EnumMember(Value = "warning")] + #pragma warning disable CS1591 + Warning, + #pragma warning restore CS1591 + [EnumMember(Value = "error")] + #pragma warning disable CS1591 + Error, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Models/CodeScanningAlertSetState.cs b/src/Ayllu.Github.Client/Github/Client/Models/CodeScanningAlertSetState.cs new file mode 100644 index 0000000..55cd5df --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/CodeScanningAlertSetState.cs @@ -0,0 +1,19 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Models +{ + /// Sets the state of the code scanning alert. You must provide `dismissed_reason` when you set the state to `dismissed`. + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public enum CodeScanningAlertSetState + { + [EnumMember(Value = "open")] + #pragma warning disable CS1591 + Open, + #pragma warning restore CS1591 + [EnumMember(Value = "dismissed")] + #pragma warning disable CS1591 + Dismissed, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Models/CodeScanningAlertSeverity.cs b/src/Ayllu.Github.Client/Github/Client/Models/CodeScanningAlertSeverity.cs new file mode 100644 index 0000000..c427127 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/CodeScanningAlertSeverity.cs @@ -0,0 +1,39 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Models +{ + /// Severity of a code scanning alert. + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public enum CodeScanningAlertSeverity + { + [EnumMember(Value = "critical")] + #pragma warning disable CS1591 + Critical, + #pragma warning restore CS1591 + [EnumMember(Value = "high")] + #pragma warning disable CS1591 + High, + #pragma warning restore CS1591 + [EnumMember(Value = "medium")] + #pragma warning disable CS1591 + Medium, + #pragma warning restore CS1591 + [EnumMember(Value = "low")] + #pragma warning disable CS1591 + Low, + #pragma warning restore CS1591 + [EnumMember(Value = "warning")] + #pragma warning disable CS1591 + Warning, + #pragma warning restore CS1591 + [EnumMember(Value = "note")] + #pragma warning disable CS1591 + Note, + #pragma warning restore CS1591 + [EnumMember(Value = "error")] + #pragma warning disable CS1591 + Error, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Models/CodeScanningAlertState.cs b/src/Ayllu.Github.Client/Github/Client/Models/CodeScanningAlertState.cs new file mode 100644 index 0000000..f6d37e4 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/CodeScanningAlertState.cs @@ -0,0 +1,23 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Models +{ + /// State of a code scanning alert. + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public enum CodeScanningAlertState + { + [EnumMember(Value = "open")] + #pragma warning disable CS1591 + Open, + #pragma warning restore CS1591 + [EnumMember(Value = "dismissed")] + #pragma warning disable CS1591 + Dismissed, + #pragma warning restore CS1591 + [EnumMember(Value = "fixed")] + #pragma warning disable CS1591 + Fixed, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Models/CodeScanningAlertStateQuery.cs b/src/Ayllu.Github.Client/Github/Client/Models/CodeScanningAlertStateQuery.cs new file mode 100644 index 0000000..0a0307b --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/CodeScanningAlertStateQuery.cs @@ -0,0 +1,27 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Models +{ + /// State of a code scanning alert. + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public enum CodeScanningAlertStateQuery + { + [EnumMember(Value = "open")] + #pragma warning disable CS1591 + Open, + #pragma warning restore CS1591 + [EnumMember(Value = "closed")] + #pragma warning disable CS1591 + Closed, + #pragma warning restore CS1591 + [EnumMember(Value = "dismissed")] + #pragma warning disable CS1591 + Dismissed, + #pragma warning restore CS1591 + [EnumMember(Value = "fixed")] + #pragma warning disable CS1591 + Fixed, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Models/CodeScanningAnalysis.cs b/src/Ayllu.Github.Client/Github/Client/Models/CodeScanningAnalysis.cs new file mode 100644 index 0000000..d0478bf --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/CodeScanningAnalysis.cs @@ -0,0 +1,173 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class CodeScanningAnalysis : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// Identifies the configuration under which the analysis was executed. For example, in GitHub Actions this includes the workflow filename and job name. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? AnalysisKey { get; set; } +#nullable restore +#else + public string AnalysisKey { get; set; } +#endif + /// 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. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Category { get; set; } +#nullable restore +#else + public string Category { get; set; } +#endif + /// The SHA of the commit to which the analysis you are uploading relates. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? CommitSha { get; set; } +#nullable restore +#else + public string CommitSha { get; set; } +#endif + /// The time that the analysis was created in ISO 8601 format: `YYYY-MM-DDTHH:MM:SSZ`. + public DateTimeOffset? CreatedAt { get; private set; } + /// The deletable property + public bool? Deletable { get; set; } + /// Identifies the variable values associated with the environment in which this analysis was performed. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Environment { get; set; } +#nullable restore +#else + public string Environment { get; set; } +#endif + /// The error property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Error { get; set; } +#nullable restore +#else + public string Error { get; set; } +#endif + /// Unique identifier for this analysis. + public int? Id { get; set; } + /// The Git reference, formatted as `refs/pull/<number>/merge`, `refs/pull/<number>/head`,`refs/heads/<branch name>` or simply `<branch name>`. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Ref { get; set; } +#nullable restore +#else + public string Ref { get; set; } +#endif + /// The total number of results in the analysis. + public int? ResultsCount { get; set; } + /// The total number of rules used in the analysis. + public int? RulesCount { get; set; } + /// An identifier for the upload. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? SarifId { get; set; } +#nullable restore +#else + public string SarifId { get; set; } +#endif + /// The tool property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.CodeScanningAnalysisTool? Tool { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.CodeScanningAnalysisTool Tool { get; set; } +#endif + /// The REST API URL of the analysis resource. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Url { get; private set; } +#nullable restore +#else + public string Url { get; private set; } +#endif + /// Warning generated when processing the analysis +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Warning { get; set; } +#nullable restore +#else + public string Warning { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public CodeScanningAnalysis() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.CodeScanningAnalysis CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.CodeScanningAnalysis(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "analysis_key", n => { AnalysisKey = n.GetStringValue(); } }, + { "category", n => { Category = n.GetStringValue(); } }, + { "commit_sha", n => { CommitSha = n.GetStringValue(); } }, + { "created_at", n => { CreatedAt = n.GetDateTimeOffsetValue(); } }, + { "deletable", n => { Deletable = n.GetBoolValue(); } }, + { "environment", n => { Environment = n.GetStringValue(); } }, + { "error", n => { Error = n.GetStringValue(); } }, + { "id", n => { Id = n.GetIntValue(); } }, + { "ref", n => { Ref = n.GetStringValue(); } }, + { "results_count", n => { ResultsCount = n.GetIntValue(); } }, + { "rules_count", n => { RulesCount = n.GetIntValue(); } }, + { "sarif_id", n => { SarifId = n.GetStringValue(); } }, + { "tool", n => { Tool = n.GetObjectValue(global::Ayllu.Github.Client.Models.CodeScanningAnalysisTool.CreateFromDiscriminatorValue); } }, + { "url", n => { Url = n.GetStringValue(); } }, + { "warning", n => { Warning = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("analysis_key", AnalysisKey); + writer.WriteStringValue("category", Category); + writer.WriteStringValue("commit_sha", CommitSha); + writer.WriteBoolValue("deletable", Deletable); + writer.WriteStringValue("environment", Environment); + writer.WriteStringValue("error", Error); + writer.WriteIntValue("id", Id); + writer.WriteStringValue("ref", Ref); + writer.WriteIntValue("results_count", ResultsCount); + writer.WriteIntValue("rules_count", RulesCount); + writer.WriteStringValue("sarif_id", SarifId); + writer.WriteObjectValue("tool", Tool); + writer.WriteStringValue("warning", Warning); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/CodeScanningAnalysis503Error.cs b/src/Ayllu.Github.Client/Github/Client/Models/CodeScanningAnalysis503Error.cs new file mode 100644 index 0000000..17f6973 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/CodeScanningAnalysis503Error.cs @@ -0,0 +1,88 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class CodeScanningAnalysis503Error : ApiException, IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The code property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Code { get; set; } +#nullable restore +#else + public string Code { get; set; } +#endif + /// The documentation_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? DocumentationUrl { get; set; } +#nullable restore +#else + public string DocumentationUrl { get; set; } +#endif + /// The primary error message. + public override string Message { get => MessageEscaped ?? string.Empty; } + /// The message property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? MessageEscaped { get; set; } +#nullable restore +#else + public string MessageEscaped { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public CodeScanningAnalysis503Error() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.CodeScanningAnalysis503Error CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.CodeScanningAnalysis503Error(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "code", n => { Code = n.GetStringValue(); } }, + { "documentation_url", n => { DocumentationUrl = n.GetStringValue(); } }, + { "message", n => { MessageEscaped = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("code", Code); + writer.WriteStringValue("documentation_url", DocumentationUrl); + writer.WriteStringValue("message", MessageEscaped); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/CodeScanningAnalysisDeletion.cs b/src/Ayllu.Github.Client/Github/Client/Models/CodeScanningAnalysisDeletion.cs new file mode 100644 index 0000000..82f8471 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/CodeScanningAnalysisDeletion.cs @@ -0,0 +1,74 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + /// + /// Successful deletion of a code scanning analysis + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class CodeScanningAnalysisDeletion : IAdditionalDataHolder, IParsable + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// Next deletable analysis in chain, with last analysis deletion confirmation +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? ConfirmDeleteUrl { get; private set; } +#nullable restore +#else + public string ConfirmDeleteUrl { get; private set; } +#endif + /// Next deletable analysis in chain, without last analysis deletion confirmation +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? NextAnalysisUrl { get; private set; } +#nullable restore +#else + public string NextAnalysisUrl { get; private set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public CodeScanningAnalysisDeletion() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.CodeScanningAnalysisDeletion CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.CodeScanningAnalysisDeletion(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "confirm_delete_url", n => { ConfirmDeleteUrl = n.GetStringValue(); } }, + { "next_analysis_url", n => { NextAnalysisUrl = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/CodeScanningAnalysisDeletion503Error.cs b/src/Ayllu.Github.Client/Github/Client/Models/CodeScanningAnalysisDeletion503Error.cs new file mode 100644 index 0000000..d679c29 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/CodeScanningAnalysisDeletion503Error.cs @@ -0,0 +1,88 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class CodeScanningAnalysisDeletion503Error : ApiException, IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The code property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Code { get; set; } +#nullable restore +#else + public string Code { get; set; } +#endif + /// The documentation_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? DocumentationUrl { get; set; } +#nullable restore +#else + public string DocumentationUrl { get; set; } +#endif + /// The primary error message. + public override string Message { get => MessageEscaped ?? string.Empty; } + /// The message property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? MessageEscaped { get; set; } +#nullable restore +#else + public string MessageEscaped { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public CodeScanningAnalysisDeletion503Error() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.CodeScanningAnalysisDeletion503Error CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.CodeScanningAnalysisDeletion503Error(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "code", n => { Code = n.GetStringValue(); } }, + { "documentation_url", n => { DocumentationUrl = n.GetStringValue(); } }, + { "message", n => { MessageEscaped = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("code", Code); + writer.WriteStringValue("documentation_url", DocumentationUrl); + writer.WriteStringValue("message", MessageEscaped); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/CodeScanningAnalysisTool.cs b/src/Ayllu.Github.Client/Github/Client/Models/CodeScanningAnalysisTool.cs new file mode 100644 index 0000000..efa3a8d --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/CodeScanningAnalysisTool.cs @@ -0,0 +1,85 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class CodeScanningAnalysisTool : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The GUID of the tool used to generate the code scanning analysis, if provided in the uploaded SARIF data. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Guid { get; set; } +#nullable restore +#else + public string Guid { get; set; } +#endif + /// The name of the tool used to generate the code scanning analysis. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Name { get; set; } +#nullable restore +#else + public string Name { get; set; } +#endif + /// The version of the tool used to generate the code scanning analysis. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Version { get; set; } +#nullable restore +#else + public string Version { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public CodeScanningAnalysisTool() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.CodeScanningAnalysisTool CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.CodeScanningAnalysisTool(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "guid", n => { Guid = n.GetStringValue(); } }, + { "name", n => { Name = n.GetStringValue(); } }, + { "version", n => { Version = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("guid", Guid); + writer.WriteStringValue("name", Name); + writer.WriteStringValue("version", Version); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/CodeScanningAutofix.cs b/src/Ayllu.Github.Client/Github/Client/Models/CodeScanningAutofix.cs new file mode 100644 index 0000000..f9afcdf --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/CodeScanningAutofix.cs @@ -0,0 +1,72 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class CodeScanningAutofix : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The description of an autofix. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Description { get; set; } +#nullable restore +#else + public string Description { get; set; } +#endif + /// The start time of an autofix in ISO 8601 format: `YYYY-MM-DDTHH:MM:SSZ`. + public DateTimeOffset? StartedAt { get; private set; } + /// The status of an autofix. + public global::Ayllu.Github.Client.Models.CodeScanningAutofixStatus? Status { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public CodeScanningAutofix() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.CodeScanningAutofix CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.CodeScanningAutofix(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "description", n => { Description = n.GetStringValue(); } }, + { "started_at", n => { StartedAt = n.GetDateTimeOffsetValue(); } }, + { "status", n => { Status = n.GetEnumValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("description", Description); + writer.WriteEnumValue("status", Status); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/CodeScanningAutofix503Error.cs b/src/Ayllu.Github.Client/Github/Client/Models/CodeScanningAutofix503Error.cs new file mode 100644 index 0000000..f6c531d --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/CodeScanningAutofix503Error.cs @@ -0,0 +1,88 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class CodeScanningAutofix503Error : ApiException, IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The code property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Code { get; set; } +#nullable restore +#else + public string Code { get; set; } +#endif + /// The documentation_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? DocumentationUrl { get; set; } +#nullable restore +#else + public string DocumentationUrl { get; set; } +#endif + /// The primary error message. + public override string Message { get => MessageEscaped ?? string.Empty; } + /// The message property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? MessageEscaped { get; set; } +#nullable restore +#else + public string MessageEscaped { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public CodeScanningAutofix503Error() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.CodeScanningAutofix503Error CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.CodeScanningAutofix503Error(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "code", n => { Code = n.GetStringValue(); } }, + { "documentation_url", n => { DocumentationUrl = n.GetStringValue(); } }, + { "message", n => { MessageEscaped = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("code", Code); + writer.WriteStringValue("documentation_url", DocumentationUrl); + writer.WriteStringValue("message", MessageEscaped); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/CodeScanningAutofixCommits.cs b/src/Ayllu.Github.Client/Github/Client/Models/CodeScanningAutofixCommits.cs new file mode 100644 index 0000000..ecdf15f --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/CodeScanningAutofixCommits.cs @@ -0,0 +1,76 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + /// + /// Commit an autofix for a code scanning alert + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class CodeScanningAutofixCommits : IAdditionalDataHolder, IParsable + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// Commit message to be used. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Message { get; set; } +#nullable restore +#else + public string Message { get; set; } +#endif + /// The Git reference of target branch for the commit. Branch needs to already exist. For more information, see "[Git References](https://git-scm.com/book/en/v2/Git-Internals-Git-References)" in the Git documentation. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? TargetRef { get; set; } +#nullable restore +#else + public string TargetRef { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public CodeScanningAutofixCommits() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.CodeScanningAutofixCommits CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.CodeScanningAutofixCommits(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "message", n => { Message = n.GetStringValue(); } }, + { "target_ref", n => { TargetRef = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("message", Message); + writer.WriteStringValue("target_ref", TargetRef); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/CodeScanningAutofixCommitsResponse.cs b/src/Ayllu.Github.Client/Github/Client/Models/CodeScanningAutofixCommitsResponse.cs new file mode 100644 index 0000000..892e5b3 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/CodeScanningAutofixCommitsResponse.cs @@ -0,0 +1,75 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class CodeScanningAutofixCommitsResponse : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// SHA of commit with autofix. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Sha { get; set; } +#nullable restore +#else + public string Sha { get; set; } +#endif + /// The Git reference of target branch for the commit. For more information, see "[Git References](https://git-scm.com/book/en/v2/Git-Internals-Git-References)" in the Git documentation. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? TargetRef { get; set; } +#nullable restore +#else + public string TargetRef { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public CodeScanningAutofixCommitsResponse() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.CodeScanningAutofixCommitsResponse CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.CodeScanningAutofixCommitsResponse(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "sha", n => { Sha = n.GetStringValue(); } }, + { "target_ref", n => { TargetRef = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("sha", Sha); + writer.WriteStringValue("target_ref", TargetRef); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/CodeScanningAutofixCommitsResponse503Error.cs b/src/Ayllu.Github.Client/Github/Client/Models/CodeScanningAutofixCommitsResponse503Error.cs new file mode 100644 index 0000000..a5ec9b2 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/CodeScanningAutofixCommitsResponse503Error.cs @@ -0,0 +1,88 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class CodeScanningAutofixCommitsResponse503Error : ApiException, IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The code property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Code { get; set; } +#nullable restore +#else + public string Code { get; set; } +#endif + /// The documentation_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? DocumentationUrl { get; set; } +#nullable restore +#else + public string DocumentationUrl { get; set; } +#endif + /// The primary error message. + public override string Message { get => MessageEscaped ?? string.Empty; } + /// The message property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? MessageEscaped { get; set; } +#nullable restore +#else + public string MessageEscaped { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public CodeScanningAutofixCommitsResponse503Error() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.CodeScanningAutofixCommitsResponse503Error CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.CodeScanningAutofixCommitsResponse503Error(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "code", n => { Code = n.GetStringValue(); } }, + { "documentation_url", n => { DocumentationUrl = n.GetStringValue(); } }, + { "message", n => { MessageEscaped = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("code", Code); + writer.WriteStringValue("documentation_url", DocumentationUrl); + writer.WriteStringValue("message", MessageEscaped); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/CodeScanningAutofixStatus.cs b/src/Ayllu.Github.Client/Github/Client/Models/CodeScanningAutofixStatus.cs new file mode 100644 index 0000000..9742084 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/CodeScanningAutofixStatus.cs @@ -0,0 +1,27 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Models +{ + /// The status of an autofix. + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public enum CodeScanningAutofixStatus + { + [EnumMember(Value = "pending")] + #pragma warning disable CS1591 + Pending, + #pragma warning restore CS1591 + [EnumMember(Value = "error")] + #pragma warning disable CS1591 + Error, + #pragma warning restore CS1591 + [EnumMember(Value = "success")] + #pragma warning disable CS1591 + Success, + #pragma warning restore CS1591 + [EnumMember(Value = "outdated")] + #pragma warning disable CS1591 + Outdated, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Models/CodeScanningCodeqlDatabase.cs b/src/Ayllu.Github.Client/Github/Client/Models/CodeScanningCodeqlDatabase.cs new file mode 100644 index 0000000..274d615 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/CodeScanningCodeqlDatabase.cs @@ -0,0 +1,132 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + /// + /// A CodeQL database. + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class CodeScanningCodeqlDatabase : IAdditionalDataHolder, IParsable + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The commit SHA of the repository at the time the CodeQL database was created. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? CommitOid { get; set; } +#nullable restore +#else + public string CommitOid { get; set; } +#endif + /// The MIME type of the CodeQL database file. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? ContentType { get; set; } +#nullable restore +#else + public string ContentType { get; set; } +#endif + /// The date and time at which the CodeQL database was created, in ISO 8601 format':' YYYY-MM-DDTHH:MM:SSZ. + public DateTimeOffset? CreatedAt { get; set; } + /// The ID of the CodeQL database. + public int? Id { get; set; } + /// The language of the CodeQL database. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Language { get; set; } +#nullable restore +#else + public string Language { get; set; } +#endif + /// The name of the CodeQL database. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Name { get; set; } +#nullable restore +#else + public string Name { get; set; } +#endif + /// The size of the CodeQL database file in bytes. + public int? Size { get; set; } + /// The date and time at which the CodeQL database was last updated, in ISO 8601 format':' YYYY-MM-DDTHH:MM:SSZ. + public DateTimeOffset? UpdatedAt { get; set; } + /// A GitHub user. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.SimpleUser? Uploader { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.SimpleUser Uploader { get; set; } +#endif + /// The URL at which to download the CodeQL database. The `Accept` header must be set to the value of the `content_type` property. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Url { get; set; } +#nullable restore +#else + public string Url { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public CodeScanningCodeqlDatabase() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.CodeScanningCodeqlDatabase CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.CodeScanningCodeqlDatabase(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "commit_oid", n => { CommitOid = n.GetStringValue(); } }, + { "content_type", n => { ContentType = n.GetStringValue(); } }, + { "created_at", n => { CreatedAt = n.GetDateTimeOffsetValue(); } }, + { "id", n => { Id = n.GetIntValue(); } }, + { "language", n => { Language = n.GetStringValue(); } }, + { "name", n => { Name = n.GetStringValue(); } }, + { "size", n => { Size = n.GetIntValue(); } }, + { "updated_at", n => { UpdatedAt = n.GetDateTimeOffsetValue(); } }, + { "uploader", n => { Uploader = n.GetObjectValue(global::Ayllu.Github.Client.Models.SimpleUser.CreateFromDiscriminatorValue); } }, + { "url", n => { Url = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("commit_oid", CommitOid); + writer.WriteStringValue("content_type", ContentType); + writer.WriteDateTimeOffsetValue("created_at", CreatedAt); + writer.WriteIntValue("id", Id); + writer.WriteStringValue("language", Language); + writer.WriteStringValue("name", Name); + writer.WriteIntValue("size", Size); + writer.WriteDateTimeOffsetValue("updated_at", UpdatedAt); + writer.WriteObjectValue("uploader", Uploader); + writer.WriteStringValue("url", Url); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/CodeScanningCodeqlDatabase503Error.cs b/src/Ayllu.Github.Client/Github/Client/Models/CodeScanningCodeqlDatabase503Error.cs new file mode 100644 index 0000000..681f968 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/CodeScanningCodeqlDatabase503Error.cs @@ -0,0 +1,88 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class CodeScanningCodeqlDatabase503Error : ApiException, IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The code property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Code { get; set; } +#nullable restore +#else + public string Code { get; set; } +#endif + /// The documentation_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? DocumentationUrl { get; set; } +#nullable restore +#else + public string DocumentationUrl { get; set; } +#endif + /// The primary error message. + public override string Message { get => MessageEscaped ?? string.Empty; } + /// The message property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? MessageEscaped { get; set; } +#nullable restore +#else + public string MessageEscaped { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public CodeScanningCodeqlDatabase503Error() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.CodeScanningCodeqlDatabase503Error CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.CodeScanningCodeqlDatabase503Error(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "code", n => { Code = n.GetStringValue(); } }, + { "documentation_url", n => { DocumentationUrl = n.GetStringValue(); } }, + { "message", n => { MessageEscaped = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("code", Code); + writer.WriteStringValue("documentation_url", DocumentationUrl); + writer.WriteStringValue("message", MessageEscaped); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/CodeScanningDefaultSetup.cs b/src/Ayllu.Github.Client/Github/Client/Models/CodeScanningDefaultSetup.cs new file mode 100644 index 0000000..430c935 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/CodeScanningDefaultSetup.cs @@ -0,0 +1,100 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + /// + /// Configuration for code scanning default setup. + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class CodeScanningDefaultSetup : IAdditionalDataHolder, IParsable + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// Languages to be analyzed. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? Languages { get; set; } +#nullable restore +#else + public List Languages { get; set; } +#endif + /// CodeQL query suite to be used. + public global::Ayllu.Github.Client.Models.CodeScanningDefaultSetup_query_suite? QuerySuite { get; set; } + /// Runner label to be used if the runner type is labeled. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? RunnerLabel { get; set; } +#nullable restore +#else + public string RunnerLabel { get; set; } +#endif + /// Runner type to be used. + public global::Ayllu.Github.Client.Models.CodeScanningDefaultSetup_runner_type? RunnerType { get; set; } + /// The frequency of the periodic analysis. + public global::Ayllu.Github.Client.Models.CodeScanningDefaultSetup_schedule? Schedule { get; set; } + /// Code scanning default setup has been configured or not. + public global::Ayllu.Github.Client.Models.CodeScanningDefaultSetup_state? State { get; set; } + /// Threat model to be used for code scanning analysis. Use `remote` to analyze only network sources and `remote_and_local` to include local sources like filesystem access, command-line arguments, database reads, environment variable and standard input. + public global::Ayllu.Github.Client.Models.CodeScanningDefaultSetup_threat_model? ThreatModel { get; set; } + /// Timestamp of latest configuration update. + public DateTimeOffset? UpdatedAt { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public CodeScanningDefaultSetup() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.CodeScanningDefaultSetup CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.CodeScanningDefaultSetup(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "languages", n => { Languages = n.GetCollectionOfEnumValues()?.AsList(); } }, + { "query_suite", n => { QuerySuite = n.GetEnumValue(); } }, + { "runner_label", n => { RunnerLabel = n.GetStringValue(); } }, + { "runner_type", n => { RunnerType = n.GetEnumValue(); } }, + { "schedule", n => { Schedule = n.GetEnumValue(); } }, + { "state", n => { State = n.GetEnumValue(); } }, + { "threat_model", n => { ThreatModel = n.GetEnumValue(); } }, + { "updated_at", n => { UpdatedAt = n.GetDateTimeOffsetValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteCollectionOfEnumValues("languages", Languages); + writer.WriteEnumValue("query_suite", QuerySuite); + writer.WriteStringValue("runner_label", RunnerLabel); + writer.WriteEnumValue("runner_type", RunnerType); + writer.WriteEnumValue("schedule", Schedule); + writer.WriteEnumValue("state", State); + writer.WriteEnumValue("threat_model", ThreatModel); + writer.WriteDateTimeOffsetValue("updated_at", UpdatedAt); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/CodeScanningDefaultSetup503Error.cs b/src/Ayllu.Github.Client/Github/Client/Models/CodeScanningDefaultSetup503Error.cs new file mode 100644 index 0000000..0c01aa0 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/CodeScanningDefaultSetup503Error.cs @@ -0,0 +1,88 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class CodeScanningDefaultSetup503Error : ApiException, IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The code property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Code { get; set; } +#nullable restore +#else + public string Code { get; set; } +#endif + /// The documentation_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? DocumentationUrl { get; set; } +#nullable restore +#else + public string DocumentationUrl { get; set; } +#endif + /// The primary error message. + public override string Message { get => MessageEscaped ?? string.Empty; } + /// The message property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? MessageEscaped { get; set; } +#nullable restore +#else + public string MessageEscaped { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public CodeScanningDefaultSetup503Error() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.CodeScanningDefaultSetup503Error CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.CodeScanningDefaultSetup503Error(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "code", n => { Code = n.GetStringValue(); } }, + { "documentation_url", n => { DocumentationUrl = n.GetStringValue(); } }, + { "message", n => { MessageEscaped = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("code", Code); + writer.WriteStringValue("documentation_url", DocumentationUrl); + writer.WriteStringValue("message", MessageEscaped); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/CodeScanningDefaultSetupOptions.cs b/src/Ayllu.Github.Client/Github/Client/Models/CodeScanningDefaultSetupOptions.cs new file mode 100644 index 0000000..45b3ae9 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/CodeScanningDefaultSetupOptions.cs @@ -0,0 +1,70 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + /// + /// Feature options for code scanning default setup + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class CodeScanningDefaultSetupOptions : IAdditionalDataHolder, IParsable + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The label of the runner to use for code scanning default setup when runner_type is 'labeled'. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? RunnerLabel { get; set; } +#nullable restore +#else + public string RunnerLabel { get; set; } +#endif + /// Whether to use labeled runners or standard GitHub runners. + public global::Ayllu.Github.Client.Models.CodeScanningDefaultSetupOptions_runner_type? RunnerType { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public CodeScanningDefaultSetupOptions() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.CodeScanningDefaultSetupOptions CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.CodeScanningDefaultSetupOptions(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "runner_label", n => { RunnerLabel = n.GetStringValue(); } }, + { "runner_type", n => { RunnerType = n.GetEnumValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("runner_label", RunnerLabel); + writer.WriteEnumValue("runner_type", RunnerType); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/CodeScanningDefaultSetupOptions_runner_type.cs b/src/Ayllu.Github.Client/Github/Client/Models/CodeScanningDefaultSetupOptions_runner_type.cs new file mode 100644 index 0000000..e8cb1d5 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/CodeScanningDefaultSetupOptions_runner_type.cs @@ -0,0 +1,23 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Models +{ + /// Whether to use labeled runners or standard GitHub runners. + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public enum CodeScanningDefaultSetupOptions_runner_type + { + [EnumMember(Value = "standard")] + #pragma warning disable CS1591 + Standard, + #pragma warning restore CS1591 + [EnumMember(Value = "labeled")] + #pragma warning disable CS1591 + Labeled, + #pragma warning restore CS1591 + [EnumMember(Value = "not_set")] + #pragma warning disable CS1591 + Not_set, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Models/CodeScanningDefaultSetupUpdate.cs b/src/Ayllu.Github.Client/Github/Client/Models/CodeScanningDefaultSetupUpdate.cs new file mode 100644 index 0000000..8cb0fe9 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/CodeScanningDefaultSetupUpdate.cs @@ -0,0 +1,82 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + /// + /// Configuration for code scanning default setup. + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class CodeScanningDefaultSetupUpdate : IParsable + { + /// CodeQL languages to be analyzed. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? Languages { get; set; } +#nullable restore +#else + public List Languages { get; set; } +#endif + /// CodeQL query suite to be used. + public global::Ayllu.Github.Client.Models.CodeScanningDefaultSetupUpdate_query_suite? QuerySuite { get; set; } + /// Runner label to be used if the runner type is labeled. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? RunnerLabel { get; set; } +#nullable restore +#else + public string RunnerLabel { get; set; } +#endif + /// Runner type to be used. + public global::Ayllu.Github.Client.Models.CodeScanningDefaultSetupUpdate_runner_type? RunnerType { get; set; } + /// The desired state of code scanning default setup. + public global::Ayllu.Github.Client.Models.CodeScanningDefaultSetupUpdate_state? State { get; set; } + /// Threat model to be used for code scanning analysis. Use `remote` to analyze only network sources and `remote_and_local` to include local sources like filesystem access, command-line arguments, database reads, environment variable and standard input. + public global::Ayllu.Github.Client.Models.CodeScanningDefaultSetupUpdate_threat_model? ThreatModel { get; set; } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.CodeScanningDefaultSetupUpdate CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.CodeScanningDefaultSetupUpdate(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "languages", n => { Languages = n.GetCollectionOfEnumValues()?.AsList(); } }, + { "query_suite", n => { QuerySuite = n.GetEnumValue(); } }, + { "runner_label", n => { RunnerLabel = n.GetStringValue(); } }, + { "runner_type", n => { RunnerType = n.GetEnumValue(); } }, + { "state", n => { State = n.GetEnumValue(); } }, + { "threat_model", n => { ThreatModel = n.GetEnumValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteCollectionOfEnumValues("languages", Languages); + writer.WriteEnumValue("query_suite", QuerySuite); + writer.WriteStringValue("runner_label", RunnerLabel); + writer.WriteEnumValue("runner_type", RunnerType); + writer.WriteEnumValue("state", State); + writer.WriteEnumValue("threat_model", ThreatModel); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/CodeScanningDefaultSetupUpdate_languages.cs b/src/Ayllu.Github.Client/Github/Client/Models/CodeScanningDefaultSetupUpdate_languages.cs new file mode 100644 index 0000000..ace0acc --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/CodeScanningDefaultSetupUpdate_languages.cs @@ -0,0 +1,48 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public enum CodeScanningDefaultSetupUpdate_languages + #pragma warning restore CS1591 + { + [EnumMember(Value = "actions")] + #pragma warning disable CS1591 + Actions, + #pragma warning restore CS1591 + [EnumMember(Value = "c-cpp")] + #pragma warning disable CS1591 + CCpp, + #pragma warning restore CS1591 + [EnumMember(Value = "csharp")] + #pragma warning disable CS1591 + Csharp, + #pragma warning restore CS1591 + [EnumMember(Value = "go")] + #pragma warning disable CS1591 + Go, + #pragma warning restore CS1591 + [EnumMember(Value = "java-kotlin")] + #pragma warning disable CS1591 + JavaKotlin, + #pragma warning restore CS1591 + [EnumMember(Value = "javascript-typescript")] + #pragma warning disable CS1591 + JavascriptTypescript, + #pragma warning restore CS1591 + [EnumMember(Value = "python")] + #pragma warning disable CS1591 + Python, + #pragma warning restore CS1591 + [EnumMember(Value = "ruby")] + #pragma warning disable CS1591 + Ruby, + #pragma warning restore CS1591 + [EnumMember(Value = "swift")] + #pragma warning disable CS1591 + Swift, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Models/CodeScanningDefaultSetupUpdate_query_suite.cs b/src/Ayllu.Github.Client/Github/Client/Models/CodeScanningDefaultSetupUpdate_query_suite.cs new file mode 100644 index 0000000..a3d4535 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/CodeScanningDefaultSetupUpdate_query_suite.cs @@ -0,0 +1,19 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Models +{ + /// CodeQL query suite to be used. + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public enum CodeScanningDefaultSetupUpdate_query_suite + { + [EnumMember(Value = "default")] + #pragma warning disable CS1591 + Default, + #pragma warning restore CS1591 + [EnumMember(Value = "extended")] + #pragma warning disable CS1591 + Extended, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Models/CodeScanningDefaultSetupUpdate_runner_type.cs b/src/Ayllu.Github.Client/Github/Client/Models/CodeScanningDefaultSetupUpdate_runner_type.cs new file mode 100644 index 0000000..fd0e03d --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/CodeScanningDefaultSetupUpdate_runner_type.cs @@ -0,0 +1,19 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Models +{ + /// Runner type to be used. + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public enum CodeScanningDefaultSetupUpdate_runner_type + { + [EnumMember(Value = "standard")] + #pragma warning disable CS1591 + Standard, + #pragma warning restore CS1591 + [EnumMember(Value = "labeled")] + #pragma warning disable CS1591 + Labeled, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Models/CodeScanningDefaultSetupUpdate_state.cs b/src/Ayllu.Github.Client/Github/Client/Models/CodeScanningDefaultSetupUpdate_state.cs new file mode 100644 index 0000000..2abdadd --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/CodeScanningDefaultSetupUpdate_state.cs @@ -0,0 +1,19 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Models +{ + /// The desired state of code scanning default setup. + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public enum CodeScanningDefaultSetupUpdate_state + { + [EnumMember(Value = "configured")] + #pragma warning disable CS1591 + Configured, + #pragma warning restore CS1591 + [EnumMember(Value = "not-configured")] + #pragma warning disable CS1591 + NotConfigured, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Models/CodeScanningDefaultSetupUpdate_threat_model.cs b/src/Ayllu.Github.Client/Github/Client/Models/CodeScanningDefaultSetupUpdate_threat_model.cs new file mode 100644 index 0000000..48cb9b8 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/CodeScanningDefaultSetupUpdate_threat_model.cs @@ -0,0 +1,19 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Models +{ + /// Threat model to be used for code scanning analysis. Use `remote` to analyze only network sources and `remote_and_local` to include local sources like filesystem access, command-line arguments, database reads, environment variable and standard input. + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public enum CodeScanningDefaultSetupUpdate_threat_model + { + [EnumMember(Value = "remote")] + #pragma warning disable CS1591 + Remote, + #pragma warning restore CS1591 + [EnumMember(Value = "remote_and_local")] + #pragma warning disable CS1591 + Remote_and_local, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Models/CodeScanningDefaultSetup_languages.cs b/src/Ayllu.Github.Client/Github/Client/Models/CodeScanningDefaultSetup_languages.cs new file mode 100644 index 0000000..0d051b0 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/CodeScanningDefaultSetup_languages.cs @@ -0,0 +1,56 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public enum CodeScanningDefaultSetup_languages + #pragma warning restore CS1591 + { + [EnumMember(Value = "actions")] + #pragma warning disable CS1591 + Actions, + #pragma warning restore CS1591 + [EnumMember(Value = "c-cpp")] + #pragma warning disable CS1591 + CCpp, + #pragma warning restore CS1591 + [EnumMember(Value = "csharp")] + #pragma warning disable CS1591 + Csharp, + #pragma warning restore CS1591 + [EnumMember(Value = "go")] + #pragma warning disable CS1591 + Go, + #pragma warning restore CS1591 + [EnumMember(Value = "java-kotlin")] + #pragma warning disable CS1591 + JavaKotlin, + #pragma warning restore CS1591 + [EnumMember(Value = "javascript-typescript")] + #pragma warning disable CS1591 + JavascriptTypescript, + #pragma warning restore CS1591 + [EnumMember(Value = "javascript")] + #pragma warning disable CS1591 + Javascript, + #pragma warning restore CS1591 + [EnumMember(Value = "python")] + #pragma warning disable CS1591 + Python, + #pragma warning restore CS1591 + [EnumMember(Value = "ruby")] + #pragma warning disable CS1591 + Ruby, + #pragma warning restore CS1591 + [EnumMember(Value = "typescript")] + #pragma warning disable CS1591 + Typescript, + #pragma warning restore CS1591 + [EnumMember(Value = "swift")] + #pragma warning disable CS1591 + Swift, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Models/CodeScanningDefaultSetup_query_suite.cs b/src/Ayllu.Github.Client/Github/Client/Models/CodeScanningDefaultSetup_query_suite.cs new file mode 100644 index 0000000..b9649da --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/CodeScanningDefaultSetup_query_suite.cs @@ -0,0 +1,19 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Models +{ + /// CodeQL query suite to be used. + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public enum CodeScanningDefaultSetup_query_suite + { + [EnumMember(Value = "default")] + #pragma warning disable CS1591 + Default, + #pragma warning restore CS1591 + [EnumMember(Value = "extended")] + #pragma warning disable CS1591 + Extended, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Models/CodeScanningDefaultSetup_runner_type.cs b/src/Ayllu.Github.Client/Github/Client/Models/CodeScanningDefaultSetup_runner_type.cs new file mode 100644 index 0000000..6c64fff --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/CodeScanningDefaultSetup_runner_type.cs @@ -0,0 +1,19 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Models +{ + /// Runner type to be used. + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public enum CodeScanningDefaultSetup_runner_type + { + [EnumMember(Value = "standard")] + #pragma warning disable CS1591 + Standard, + #pragma warning restore CS1591 + [EnumMember(Value = "labeled")] + #pragma warning disable CS1591 + Labeled, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Models/CodeScanningDefaultSetup_schedule.cs b/src/Ayllu.Github.Client/Github/Client/Models/CodeScanningDefaultSetup_schedule.cs new file mode 100644 index 0000000..ac32ef4 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/CodeScanningDefaultSetup_schedule.cs @@ -0,0 +1,15 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Models +{ + /// The frequency of the periodic analysis. + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public enum CodeScanningDefaultSetup_schedule + { + [EnumMember(Value = "weekly")] + #pragma warning disable CS1591 + Weekly, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Models/CodeScanningDefaultSetup_state.cs b/src/Ayllu.Github.Client/Github/Client/Models/CodeScanningDefaultSetup_state.cs new file mode 100644 index 0000000..6ca94ca --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/CodeScanningDefaultSetup_state.cs @@ -0,0 +1,19 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Models +{ + /// Code scanning default setup has been configured or not. + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public enum CodeScanningDefaultSetup_state + { + [EnumMember(Value = "configured")] + #pragma warning disable CS1591 + Configured, + #pragma warning restore CS1591 + [EnumMember(Value = "not-configured")] + #pragma warning disable CS1591 + NotConfigured, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Models/CodeScanningDefaultSetup_threat_model.cs b/src/Ayllu.Github.Client/Github/Client/Models/CodeScanningDefaultSetup_threat_model.cs new file mode 100644 index 0000000..f807c5b --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/CodeScanningDefaultSetup_threat_model.cs @@ -0,0 +1,19 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Models +{ + /// Threat model to be used for code scanning analysis. Use `remote` to analyze only network sources and `remote_and_local` to include local sources like filesystem access, command-line arguments, database reads, environment variable and standard input. + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public enum CodeScanningDefaultSetup_threat_model + { + [EnumMember(Value = "remote")] + #pragma warning disable CS1591 + Remote, + #pragma warning restore CS1591 + [EnumMember(Value = "remote_and_local")] + #pragma warning disable CS1591 + Remote_and_local, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Models/CodeScanningOptions.cs b/src/Ayllu.Github.Client/Github/Client/Models/CodeScanningOptions.cs new file mode 100644 index 0000000..6927090 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/CodeScanningOptions.cs @@ -0,0 +1,60 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + /// + /// Security Configuration feature options for code scanning + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class CodeScanningOptions : IAdditionalDataHolder, IParsable + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// Whether to allow repos which use advanced setup + public bool? AllowAdvanced { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public CodeScanningOptions() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.CodeScanningOptions CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.CodeScanningOptions(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "allow_advanced", n => { AllowAdvanced = n.GetBoolValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteBoolValue("allow_advanced", AllowAdvanced); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/CodeScanningOrganizationAlertItems.cs b/src/Ayllu.Github.Client/Github/Client/Models/CodeScanningOrganizationAlertItems.cs new file mode 100644 index 0000000..8d9d452 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/CodeScanningOrganizationAlertItems.cs @@ -0,0 +1,175 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class CodeScanningOrganizationAlertItems : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The time that the alert was created in ISO 8601 format: `YYYY-MM-DDTHH:MM:SSZ`. + public DateTimeOffset? CreatedAt { get; private set; } + /// A GitHub user. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.NullableSimpleUser? DismissalApprovedBy { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.NullableSimpleUser DismissalApprovedBy { get; set; } +#endif + /// The time that the alert was dismissed in ISO 8601 format: `YYYY-MM-DDTHH:MM:SSZ`. + public DateTimeOffset? DismissedAt { get; private set; } + /// A GitHub user. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.NullableSimpleUser? DismissedBy { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.NullableSimpleUser DismissedBy { get; set; } +#endif + /// The dismissal comment associated with the dismissal of the alert. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? DismissedComment { get; set; } +#nullable restore +#else + public string DismissedComment { get; set; } +#endif + /// **Required when the state is dismissed.** The reason for dismissing or closing the alert. + public global::Ayllu.Github.Client.Models.CodeScanningAlertDismissedReason? DismissedReason { get; set; } + /// The time that the alert was no longer detected and was considered fixed in ISO 8601 format: `YYYY-MM-DDTHH:MM:SSZ`. + public DateTimeOffset? FixedAt { get; private set; } + /// The GitHub URL of the alert resource. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? HtmlUrl { get; private set; } +#nullable restore +#else + public string HtmlUrl { get; private set; } +#endif + /// The REST API URL for fetching the list of instances for an alert. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? InstancesUrl { get; private set; } +#nullable restore +#else + public string InstancesUrl { get; private set; } +#endif + /// The most_recent_instance property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.CodeScanningAlertInstance? MostRecentInstance { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.CodeScanningAlertInstance MostRecentInstance { get; set; } +#endif + /// The security alert number. + public int? Number { get; private set; } + /// A GitHub repository. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.SimpleRepository? Repository { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.SimpleRepository Repository { get; set; } +#endif + /// The rule property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.CodeScanningAlertRuleSummary? Rule { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.CodeScanningAlertRuleSummary Rule { get; set; } +#endif + /// State of a code scanning alert. + public global::Ayllu.Github.Client.Models.CodeScanningAlertState? State { get; set; } + /// The tool property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.CodeScanningAnalysisTool? Tool { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.CodeScanningAnalysisTool Tool { get; set; } +#endif + /// The time that the alert was last updated in ISO 8601 format: `YYYY-MM-DDTHH:MM:SSZ`. + public DateTimeOffset? UpdatedAt { get; private set; } + /// The REST API URL of the alert resource. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Url { get; private set; } +#nullable restore +#else + public string Url { get; private set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public CodeScanningOrganizationAlertItems() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.CodeScanningOrganizationAlertItems CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.CodeScanningOrganizationAlertItems(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "created_at", n => { CreatedAt = n.GetDateTimeOffsetValue(); } }, + { "dismissal_approved_by", n => { DismissalApprovedBy = n.GetObjectValue(global::Ayllu.Github.Client.Models.NullableSimpleUser.CreateFromDiscriminatorValue); } }, + { "dismissed_at", n => { DismissedAt = n.GetDateTimeOffsetValue(); } }, + { "dismissed_by", n => { DismissedBy = n.GetObjectValue(global::Ayllu.Github.Client.Models.NullableSimpleUser.CreateFromDiscriminatorValue); } }, + { "dismissed_comment", n => { DismissedComment = n.GetStringValue(); } }, + { "dismissed_reason", n => { DismissedReason = n.GetEnumValue(); } }, + { "fixed_at", n => { FixedAt = n.GetDateTimeOffsetValue(); } }, + { "html_url", n => { HtmlUrl = n.GetStringValue(); } }, + { "instances_url", n => { InstancesUrl = n.GetStringValue(); } }, + { "most_recent_instance", n => { MostRecentInstance = n.GetObjectValue(global::Ayllu.Github.Client.Models.CodeScanningAlertInstance.CreateFromDiscriminatorValue); } }, + { "number", n => { Number = n.GetIntValue(); } }, + { "repository", n => { Repository = n.GetObjectValue(global::Ayllu.Github.Client.Models.SimpleRepository.CreateFromDiscriminatorValue); } }, + { "rule", n => { Rule = n.GetObjectValue(global::Ayllu.Github.Client.Models.CodeScanningAlertRuleSummary.CreateFromDiscriminatorValue); } }, + { "state", n => { State = n.GetEnumValue(); } }, + { "tool", n => { Tool = n.GetObjectValue(global::Ayllu.Github.Client.Models.CodeScanningAnalysisTool.CreateFromDiscriminatorValue); } }, + { "updated_at", n => { UpdatedAt = n.GetDateTimeOffsetValue(); } }, + { "url", n => { Url = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteObjectValue("dismissal_approved_by", DismissalApprovedBy); + writer.WriteObjectValue("dismissed_by", DismissedBy); + writer.WriteStringValue("dismissed_comment", DismissedComment); + writer.WriteEnumValue("dismissed_reason", DismissedReason); + writer.WriteObjectValue("most_recent_instance", MostRecentInstance); + writer.WriteObjectValue("repository", Repository); + writer.WriteObjectValue("rule", Rule); + writer.WriteEnumValue("state", State); + writer.WriteObjectValue("tool", Tool); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/CodeScanningSarifsReceipt.cs b/src/Ayllu.Github.Client/Github/Client/Models/CodeScanningSarifsReceipt.cs new file mode 100644 index 0000000..91ff290 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/CodeScanningSarifsReceipt.cs @@ -0,0 +1,74 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class CodeScanningSarifsReceipt : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// An identifier for the upload. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Id { get; set; } +#nullable restore +#else + public string Id { get; set; } +#endif + /// The REST API URL for checking the status of the upload. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Url { get; private set; } +#nullable restore +#else + public string Url { get; private set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public CodeScanningSarifsReceipt() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.CodeScanningSarifsReceipt CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.CodeScanningSarifsReceipt(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "id", n => { Id = n.GetStringValue(); } }, + { "url", n => { Url = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("id", Id); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/CodeScanningSarifsReceipt503Error.cs b/src/Ayllu.Github.Client/Github/Client/Models/CodeScanningSarifsReceipt503Error.cs new file mode 100644 index 0000000..64f3e68 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/CodeScanningSarifsReceipt503Error.cs @@ -0,0 +1,88 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class CodeScanningSarifsReceipt503Error : ApiException, IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The code property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Code { get; set; } +#nullable restore +#else + public string Code { get; set; } +#endif + /// The documentation_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? DocumentationUrl { get; set; } +#nullable restore +#else + public string DocumentationUrl { get; set; } +#endif + /// The primary error message. + public override string Message { get => MessageEscaped ?? string.Empty; } + /// The message property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? MessageEscaped { get; set; } +#nullable restore +#else + public string MessageEscaped { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public CodeScanningSarifsReceipt503Error() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.CodeScanningSarifsReceipt503Error CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.CodeScanningSarifsReceipt503Error(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "code", n => { Code = n.GetStringValue(); } }, + { "documentation_url", n => { DocumentationUrl = n.GetStringValue(); } }, + { "message", n => { MessageEscaped = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("code", Code); + writer.WriteStringValue("documentation_url", DocumentationUrl); + writer.WriteStringValue("message", MessageEscaped); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/CodeScanningSarifsStatus.cs b/src/Ayllu.Github.Client/Github/Client/Models/CodeScanningSarifsStatus.cs new file mode 100644 index 0000000..fefa8f5 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/CodeScanningSarifsStatus.cs @@ -0,0 +1,77 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class CodeScanningSarifsStatus : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The REST API URL for getting the analyses associated with the upload. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? AnalysesUrl { get; private set; } +#nullable restore +#else + public string AnalysesUrl { get; private set; } +#endif + /// Any errors that ocurred during processing of the delivery. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? Errors { get; private set; } +#nullable restore +#else + public List Errors { get; private set; } +#endif + /// `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. + public global::Ayllu.Github.Client.Models.CodeScanningSarifsStatus_processing_status? ProcessingStatus { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public CodeScanningSarifsStatus() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.CodeScanningSarifsStatus CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.CodeScanningSarifsStatus(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "analyses_url", n => { AnalysesUrl = n.GetStringValue(); } }, + { "errors", n => { Errors = n.GetCollectionOfPrimitiveValues()?.AsList(); } }, + { "processing_status", n => { ProcessingStatus = n.GetEnumValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteEnumValue("processing_status", ProcessingStatus); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/CodeScanningSarifsStatus503Error.cs b/src/Ayllu.Github.Client/Github/Client/Models/CodeScanningSarifsStatus503Error.cs new file mode 100644 index 0000000..9bc6e77 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/CodeScanningSarifsStatus503Error.cs @@ -0,0 +1,88 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class CodeScanningSarifsStatus503Error : ApiException, IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The code property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Code { get; set; } +#nullable restore +#else + public string Code { get; set; } +#endif + /// The documentation_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? DocumentationUrl { get; set; } +#nullable restore +#else + public string DocumentationUrl { get; set; } +#endif + /// The primary error message. + public override string Message { get => MessageEscaped ?? string.Empty; } + /// The message property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? MessageEscaped { get; set; } +#nullable restore +#else + public string MessageEscaped { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public CodeScanningSarifsStatus503Error() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.CodeScanningSarifsStatus503Error CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.CodeScanningSarifsStatus503Error(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "code", n => { Code = n.GetStringValue(); } }, + { "documentation_url", n => { DocumentationUrl = n.GetStringValue(); } }, + { "message", n => { MessageEscaped = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("code", Code); + writer.WriteStringValue("documentation_url", DocumentationUrl); + writer.WriteStringValue("message", MessageEscaped); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/CodeScanningSarifsStatus_processing_status.cs b/src/Ayllu.Github.Client/Github/Client/Models/CodeScanningSarifsStatus_processing_status.cs new file mode 100644 index 0000000..1ed3fa5 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/CodeScanningSarifsStatus_processing_status.cs @@ -0,0 +1,23 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Models +{ + /// `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. + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public enum CodeScanningSarifsStatus_processing_status + { + [EnumMember(Value = "pending")] + #pragma warning disable CS1591 + Pending, + #pragma warning restore CS1591 + [EnumMember(Value = "complete")] + #pragma warning disable CS1591 + Complete, + #pragma warning restore CS1591 + [EnumMember(Value = "failed")] + #pragma warning disable CS1591 + Failed, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Models/CodeScanningVariantAnalysis.cs b/src/Ayllu.Github.Client/Github/Client/Models/CodeScanningVariantAnalysis.cs new file mode 100644 index 0000000..eb89d12 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/CodeScanningVariantAnalysis.cs @@ -0,0 +1,138 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + /// + /// A run of a CodeQL query against one or more repositories. + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class CodeScanningVariantAnalysis : IAdditionalDataHolder, IParsable + { + /// The GitHub Actions workflow run used to execute this variant analysis. This is only available if the workflow run has started. + public int? ActionsWorkflowRunId { get; set; } + /// A GitHub user. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.SimpleUser? Actor { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.SimpleUser Actor { get; set; } +#endif + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// 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. + public DateTimeOffset? CompletedAt { get; set; } + /// A GitHub repository. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.SimpleRepository? ControllerRepo { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.SimpleRepository ControllerRepo { get; set; } +#endif + /// The date and time at which the variant analysis was created, in ISO 8601 format':' YYYY-MM-DDTHH:MM:SSZ. + public DateTimeOffset? CreatedAt { get; set; } + /// The reason for a failure of the variant analysis. This is only available if the variant analysis has failed. + public global::Ayllu.Github.Client.Models.CodeScanningVariantAnalysis_failure_reason? FailureReason { get; set; } + /// The ID of the variant analysis. + public int? Id { get; set; } + /// The language targeted by the CodeQL query + public global::Ayllu.Github.Client.Models.CodeScanningVariantAnalysisLanguage? QueryLanguage { get; set; } + /// The download url for the query pack. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? QueryPackUrl { get; set; } +#nullable restore +#else + public string QueryPackUrl { get; set; } +#endif + /// The scanned_repositories property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? ScannedRepositories { get; set; } +#nullable restore +#else + public List ScannedRepositories { get; set; } +#endif + /// Information about repositories that were skipped from processing. This information is only available to the user that initiated the variant analysis. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.CodeScanningVariantAnalysis_skipped_repositories? SkippedRepositories { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.CodeScanningVariantAnalysis_skipped_repositories SkippedRepositories { get; set; } +#endif + /// The status property + public global::Ayllu.Github.Client.Models.CodeScanningVariantAnalysis_status? Status { get; set; } + /// The date and time at which the variant analysis was last updated, in ISO 8601 format':' YYYY-MM-DDTHH:MM:SSZ. + public DateTimeOffset? UpdatedAt { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public CodeScanningVariantAnalysis() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.CodeScanningVariantAnalysis CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.CodeScanningVariantAnalysis(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "actions_workflow_run_id", n => { ActionsWorkflowRunId = n.GetIntValue(); } }, + { "actor", n => { Actor = n.GetObjectValue(global::Ayllu.Github.Client.Models.SimpleUser.CreateFromDiscriminatorValue); } }, + { "completed_at", n => { CompletedAt = n.GetDateTimeOffsetValue(); } }, + { "controller_repo", n => { ControllerRepo = n.GetObjectValue(global::Ayllu.Github.Client.Models.SimpleRepository.CreateFromDiscriminatorValue); } }, + { "created_at", n => { CreatedAt = n.GetDateTimeOffsetValue(); } }, + { "failure_reason", n => { FailureReason = n.GetEnumValue(); } }, + { "id", n => { Id = n.GetIntValue(); } }, + { "query_language", n => { QueryLanguage = n.GetEnumValue(); } }, + { "query_pack_url", n => { QueryPackUrl = n.GetStringValue(); } }, + { "scanned_repositories", n => { ScannedRepositories = n.GetCollectionOfObjectValues(global::Ayllu.Github.Client.Models.CodeScanningVariantAnalysis_scanned_repositories.CreateFromDiscriminatorValue)?.AsList(); } }, + { "skipped_repositories", n => { SkippedRepositories = n.GetObjectValue(global::Ayllu.Github.Client.Models.CodeScanningVariantAnalysis_skipped_repositories.CreateFromDiscriminatorValue); } }, + { "status", n => { Status = n.GetEnumValue(); } }, + { "updated_at", n => { UpdatedAt = n.GetDateTimeOffsetValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteIntValue("actions_workflow_run_id", ActionsWorkflowRunId); + writer.WriteObjectValue("actor", Actor); + writer.WriteDateTimeOffsetValue("completed_at", CompletedAt); + writer.WriteObjectValue("controller_repo", ControllerRepo); + writer.WriteDateTimeOffsetValue("created_at", CreatedAt); + writer.WriteEnumValue("failure_reason", FailureReason); + writer.WriteIntValue("id", Id); + writer.WriteEnumValue("query_language", QueryLanguage); + writer.WriteStringValue("query_pack_url", QueryPackUrl); + writer.WriteCollectionOfObjectValues("scanned_repositories", ScannedRepositories); + writer.WriteObjectValue("skipped_repositories", SkippedRepositories); + writer.WriteEnumValue("status", Status); + writer.WriteDateTimeOffsetValue("updated_at", UpdatedAt); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/CodeScanningVariantAnalysis503Error.cs b/src/Ayllu.Github.Client/Github/Client/Models/CodeScanningVariantAnalysis503Error.cs new file mode 100644 index 0000000..496e89d --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/CodeScanningVariantAnalysis503Error.cs @@ -0,0 +1,88 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class CodeScanningVariantAnalysis503Error : ApiException, IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The code property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Code { get; set; } +#nullable restore +#else + public string Code { get; set; } +#endif + /// The documentation_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? DocumentationUrl { get; set; } +#nullable restore +#else + public string DocumentationUrl { get; set; } +#endif + /// The primary error message. + public override string Message { get => MessageEscaped ?? string.Empty; } + /// The message property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? MessageEscaped { get; set; } +#nullable restore +#else + public string MessageEscaped { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public CodeScanningVariantAnalysis503Error() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.CodeScanningVariantAnalysis503Error CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.CodeScanningVariantAnalysis503Error(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "code", n => { Code = n.GetStringValue(); } }, + { "documentation_url", n => { DocumentationUrl = n.GetStringValue(); } }, + { "message", n => { MessageEscaped = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("code", Code); + writer.WriteStringValue("documentation_url", DocumentationUrl); + writer.WriteStringValue("message", MessageEscaped); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/CodeScanningVariantAnalysisLanguage.cs b/src/Ayllu.Github.Client/Github/Client/Models/CodeScanningVariantAnalysisLanguage.cs new file mode 100644 index 0000000..1229b4f --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/CodeScanningVariantAnalysisLanguage.cs @@ -0,0 +1,47 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Models +{ + /// The language targeted by the CodeQL query + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public enum CodeScanningVariantAnalysisLanguage + { + [EnumMember(Value = "cpp")] + #pragma warning disable CS1591 + Cpp, + #pragma warning restore CS1591 + [EnumMember(Value = "csharp")] + #pragma warning disable CS1591 + Csharp, + #pragma warning restore CS1591 + [EnumMember(Value = "go")] + #pragma warning disable CS1591 + Go, + #pragma warning restore CS1591 + [EnumMember(Value = "java")] + #pragma warning disable CS1591 + Java, + #pragma warning restore CS1591 + [EnumMember(Value = "javascript")] + #pragma warning disable CS1591 + Javascript, + #pragma warning restore CS1591 + [EnumMember(Value = "python")] + #pragma warning disable CS1591 + Python, + #pragma warning restore CS1591 + [EnumMember(Value = "ruby")] + #pragma warning disable CS1591 + Ruby, + #pragma warning restore CS1591 + [EnumMember(Value = "rust")] + #pragma warning disable CS1591 + Rust, + #pragma warning restore CS1591 + [EnumMember(Value = "swift")] + #pragma warning disable CS1591 + Swift, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Models/CodeScanningVariantAnalysisRepoTask.cs b/src/Ayllu.Github.Client/Github/Client/Models/CodeScanningVariantAnalysisRepoTask.cs new file mode 100644 index 0000000..abdeccc --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/CodeScanningVariantAnalysisRepoTask.cs @@ -0,0 +1,117 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class CodeScanningVariantAnalysisRepoTask : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The new status of the CodeQL variant analysis repository task. + public global::Ayllu.Github.Client.Models.CodeScanningVariantAnalysisStatus? AnalysisStatus { get; set; } + /// The size of the artifact. This is only available for successful analyses. + public int? ArtifactSizeInBytes { get; set; } + /// The URL of the artifact. This is only available for successful analyses. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? ArtifactUrl { get; set; } +#nullable restore +#else + public string ArtifactUrl { get; set; } +#endif + /// The SHA of the commit the CodeQL database was built against. This is only available for successful analyses. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? DatabaseCommitSha { get; set; } +#nullable restore +#else + public string DatabaseCommitSha { get; set; } +#endif + /// The reason of the failure of this repo task. This is only available if the repository task has failed. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? FailureMessage { get; set; } +#nullable restore +#else + public string FailureMessage { get; set; } +#endif + /// A GitHub repository. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.SimpleRepository? Repository { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.SimpleRepository Repository { get; set; } +#endif + /// The number of results in the case of a successful analysis. This is only available for successful analyses. + public int? ResultCount { get; set; } + /// The source location prefix to use. This is only available for successful analyses. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? SourceLocationPrefix { get; set; } +#nullable restore +#else + public string SourceLocationPrefix { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public CodeScanningVariantAnalysisRepoTask() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.CodeScanningVariantAnalysisRepoTask CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.CodeScanningVariantAnalysisRepoTask(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "analysis_status", n => { AnalysisStatus = n.GetEnumValue(); } }, + { "artifact_size_in_bytes", n => { ArtifactSizeInBytes = n.GetIntValue(); } }, + { "artifact_url", n => { ArtifactUrl = n.GetStringValue(); } }, + { "database_commit_sha", n => { DatabaseCommitSha = n.GetStringValue(); } }, + { "failure_message", n => { FailureMessage = n.GetStringValue(); } }, + { "repository", n => { Repository = n.GetObjectValue(global::Ayllu.Github.Client.Models.SimpleRepository.CreateFromDiscriminatorValue); } }, + { "result_count", n => { ResultCount = n.GetIntValue(); } }, + { "source_location_prefix", n => { SourceLocationPrefix = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteEnumValue("analysis_status", AnalysisStatus); + writer.WriteIntValue("artifact_size_in_bytes", ArtifactSizeInBytes); + writer.WriteStringValue("artifact_url", ArtifactUrl); + writer.WriteStringValue("database_commit_sha", DatabaseCommitSha); + writer.WriteStringValue("failure_message", FailureMessage); + writer.WriteObjectValue("repository", Repository); + writer.WriteIntValue("result_count", ResultCount); + writer.WriteStringValue("source_location_prefix", SourceLocationPrefix); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/CodeScanningVariantAnalysisRepoTask503Error.cs b/src/Ayllu.Github.Client/Github/Client/Models/CodeScanningVariantAnalysisRepoTask503Error.cs new file mode 100644 index 0000000..2f05bf7 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/CodeScanningVariantAnalysisRepoTask503Error.cs @@ -0,0 +1,88 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class CodeScanningVariantAnalysisRepoTask503Error : ApiException, IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The code property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Code { get; set; } +#nullable restore +#else + public string Code { get; set; } +#endif + /// The documentation_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? DocumentationUrl { get; set; } +#nullable restore +#else + public string DocumentationUrl { get; set; } +#endif + /// The primary error message. + public override string Message { get => MessageEscaped ?? string.Empty; } + /// The message property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? MessageEscaped { get; set; } +#nullable restore +#else + public string MessageEscaped { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public CodeScanningVariantAnalysisRepoTask503Error() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.CodeScanningVariantAnalysisRepoTask503Error CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.CodeScanningVariantAnalysisRepoTask503Error(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "code", n => { Code = n.GetStringValue(); } }, + { "documentation_url", n => { DocumentationUrl = n.GetStringValue(); } }, + { "message", n => { MessageEscaped = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("code", Code); + writer.WriteStringValue("documentation_url", DocumentationUrl); + writer.WriteStringValue("message", MessageEscaped); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/CodeScanningVariantAnalysisRepository.cs b/src/Ayllu.Github.Client/Github/Client/Models/CodeScanningVariantAnalysisRepository.cs new file mode 100644 index 0000000..0995b67 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/CodeScanningVariantAnalysisRepository.cs @@ -0,0 +1,92 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + /// + /// Repository Identifier + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class CodeScanningVariantAnalysisRepository : IAdditionalDataHolder, IParsable + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The full, globally unique, name of the repository. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? FullName { get; set; } +#nullable restore +#else + public string FullName { get; set; } +#endif + /// A unique identifier of the repository. + public int? Id { get; set; } + /// The name of the repository. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Name { get; set; } +#nullable restore +#else + public string Name { get; set; } +#endif + /// Whether the repository is private. + public bool? Private { get; set; } + /// The stargazers_count property + public int? StargazersCount { get; set; } + /// The updated_at property + public DateTimeOffset? UpdatedAt { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public CodeScanningVariantAnalysisRepository() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.CodeScanningVariantAnalysisRepository CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.CodeScanningVariantAnalysisRepository(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "full_name", n => { FullName = n.GetStringValue(); } }, + { "id", n => { Id = n.GetIntValue(); } }, + { "name", n => { Name = n.GetStringValue(); } }, + { "private", n => { Private = n.GetBoolValue(); } }, + { "stargazers_count", n => { StargazersCount = n.GetIntValue(); } }, + { "updated_at", n => { UpdatedAt = n.GetDateTimeOffsetValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("full_name", FullName); + writer.WriteIntValue("id", Id); + writer.WriteStringValue("name", Name); + writer.WriteBoolValue("private", Private); + writer.WriteIntValue("stargazers_count", StargazersCount); + writer.WriteDateTimeOffsetValue("updated_at", UpdatedAt); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/CodeScanningVariantAnalysisSkippedRepoGroup.cs b/src/Ayllu.Github.Client/Github/Client/Models/CodeScanningVariantAnalysisSkippedRepoGroup.cs new file mode 100644 index 0000000..b675c2c --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/CodeScanningVariantAnalysisSkippedRepoGroup.cs @@ -0,0 +1,69 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class CodeScanningVariantAnalysisSkippedRepoGroup : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// 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. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? Repositories { get; set; } +#nullable restore +#else + public List Repositories { get; set; } +#endif + /// The total number of repositories that were skipped for this reason. + public int? RepositoryCount { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public CodeScanningVariantAnalysisSkippedRepoGroup() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.CodeScanningVariantAnalysisSkippedRepoGroup CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.CodeScanningVariantAnalysisSkippedRepoGroup(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "repositories", n => { Repositories = n.GetCollectionOfObjectValues(global::Ayllu.Github.Client.Models.CodeScanningVariantAnalysisRepository.CreateFromDiscriminatorValue)?.AsList(); } }, + { "repository_count", n => { RepositoryCount = n.GetIntValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteCollectionOfObjectValues("repositories", Repositories); + writer.WriteIntValue("repository_count", RepositoryCount); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/CodeScanningVariantAnalysisStatus.cs b/src/Ayllu.Github.Client/Github/Client/Models/CodeScanningVariantAnalysisStatus.cs new file mode 100644 index 0000000..5319b20 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/CodeScanningVariantAnalysisStatus.cs @@ -0,0 +1,35 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Models +{ + /// The new status of the CodeQL variant analysis repository task. + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public enum CodeScanningVariantAnalysisStatus + { + [EnumMember(Value = "pending")] + #pragma warning disable CS1591 + Pending, + #pragma warning restore CS1591 + [EnumMember(Value = "in_progress")] + #pragma warning disable CS1591 + In_progress, + #pragma warning restore CS1591 + [EnumMember(Value = "succeeded")] + #pragma warning disable CS1591 + Succeeded, + #pragma warning restore CS1591 + [EnumMember(Value = "failed")] + #pragma warning disable CS1591 + Failed, + #pragma warning restore CS1591 + [EnumMember(Value = "canceled")] + #pragma warning disable CS1591 + Canceled, + #pragma warning restore CS1591 + [EnumMember(Value = "timed_out")] + #pragma warning disable CS1591 + Timed_out, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Models/CodeScanningVariantAnalysis_failure_reason.cs b/src/Ayllu.Github.Client/Github/Client/Models/CodeScanningVariantAnalysis_failure_reason.cs new file mode 100644 index 0000000..9c25d82 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/CodeScanningVariantAnalysis_failure_reason.cs @@ -0,0 +1,23 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Models +{ + /// The reason for a failure of the variant analysis. This is only available if the variant analysis has failed. + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public enum CodeScanningVariantAnalysis_failure_reason + { + [EnumMember(Value = "no_repos_queried")] + #pragma warning disable CS1591 + No_repos_queried, + #pragma warning restore CS1591 + [EnumMember(Value = "actions_workflow_run_failed")] + #pragma warning disable CS1591 + Actions_workflow_run_failed, + #pragma warning restore CS1591 + [EnumMember(Value = "internal_error")] + #pragma warning disable CS1591 + Internal_error, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Models/CodeScanningVariantAnalysis_scanned_repositories.cs b/src/Ayllu.Github.Client/Github/Client/Models/CodeScanningVariantAnalysis_scanned_repositories.cs new file mode 100644 index 0000000..4a17f1a --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/CodeScanningVariantAnalysis_scanned_repositories.cs @@ -0,0 +1,87 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class CodeScanningVariantAnalysis_scanned_repositories : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The new status of the CodeQL variant analysis repository task. + public global::Ayllu.Github.Client.Models.CodeScanningVariantAnalysisStatus? AnalysisStatus { get; set; } + /// The size of the artifact. This is only available for successful analyses. + public int? ArtifactSizeInBytes { get; set; } + /// The reason of the failure of this repo task. This is only available if the repository task has failed. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? FailureMessage { get; set; } +#nullable restore +#else + public string FailureMessage { get; set; } +#endif + /// Repository Identifier +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.CodeScanningVariantAnalysisRepository? Repository { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.CodeScanningVariantAnalysisRepository Repository { get; set; } +#endif + /// The number of results in the case of a successful analysis. This is only available for successful analyses. + public int? ResultCount { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public CodeScanningVariantAnalysis_scanned_repositories() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.CodeScanningVariantAnalysis_scanned_repositories CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.CodeScanningVariantAnalysis_scanned_repositories(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "analysis_status", n => { AnalysisStatus = n.GetEnumValue(); } }, + { "artifact_size_in_bytes", n => { ArtifactSizeInBytes = n.GetIntValue(); } }, + { "failure_message", n => { FailureMessage = n.GetStringValue(); } }, + { "repository", n => { Repository = n.GetObjectValue(global::Ayllu.Github.Client.Models.CodeScanningVariantAnalysisRepository.CreateFromDiscriminatorValue); } }, + { "result_count", n => { ResultCount = n.GetIntValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteEnumValue("analysis_status", AnalysisStatus); + writer.WriteIntValue("artifact_size_in_bytes", ArtifactSizeInBytes); + writer.WriteStringValue("failure_message", FailureMessage); + writer.WriteObjectValue("repository", Repository); + writer.WriteIntValue("result_count", ResultCount); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/CodeScanningVariantAnalysis_skipped_repositories.cs b/src/Ayllu.Github.Client/Github/Client/Models/CodeScanningVariantAnalysis_skipped_repositories.cs new file mode 100644 index 0000000..666bb7f --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/CodeScanningVariantAnalysis_skipped_repositories.cs @@ -0,0 +1,96 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + /// + /// Information about repositories that were skipped from processing. This information is only available to the user that initiated the variant analysis. + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class CodeScanningVariantAnalysis_skipped_repositories : IAdditionalDataHolder, IParsable + { + /// The access_mismatch_repos property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.CodeScanningVariantAnalysisSkippedRepoGroup? AccessMismatchRepos { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.CodeScanningVariantAnalysisSkippedRepoGroup AccessMismatchRepos { get; set; } +#endif + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The no_codeql_db_repos property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.CodeScanningVariantAnalysisSkippedRepoGroup? NoCodeqlDbRepos { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.CodeScanningVariantAnalysisSkippedRepoGroup NoCodeqlDbRepos { get; set; } +#endif + /// The not_found_repos property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.CodeScanningVariantAnalysis_skipped_repositories_not_found_repos? NotFoundRepos { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.CodeScanningVariantAnalysis_skipped_repositories_not_found_repos NotFoundRepos { get; set; } +#endif + /// The over_limit_repos property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.CodeScanningVariantAnalysisSkippedRepoGroup? OverLimitRepos { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.CodeScanningVariantAnalysisSkippedRepoGroup OverLimitRepos { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public CodeScanningVariantAnalysis_skipped_repositories() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.CodeScanningVariantAnalysis_skipped_repositories CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.CodeScanningVariantAnalysis_skipped_repositories(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "access_mismatch_repos", n => { AccessMismatchRepos = n.GetObjectValue(global::Ayllu.Github.Client.Models.CodeScanningVariantAnalysisSkippedRepoGroup.CreateFromDiscriminatorValue); } }, + { "no_codeql_db_repos", n => { NoCodeqlDbRepos = n.GetObjectValue(global::Ayllu.Github.Client.Models.CodeScanningVariantAnalysisSkippedRepoGroup.CreateFromDiscriminatorValue); } }, + { "not_found_repos", n => { NotFoundRepos = n.GetObjectValue(global::Ayllu.Github.Client.Models.CodeScanningVariantAnalysis_skipped_repositories_not_found_repos.CreateFromDiscriminatorValue); } }, + { "over_limit_repos", n => { OverLimitRepos = n.GetObjectValue(global::Ayllu.Github.Client.Models.CodeScanningVariantAnalysisSkippedRepoGroup.CreateFromDiscriminatorValue); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteObjectValue("access_mismatch_repos", AccessMismatchRepos); + writer.WriteObjectValue("no_codeql_db_repos", NoCodeqlDbRepos); + writer.WriteObjectValue("not_found_repos", NotFoundRepos); + writer.WriteObjectValue("over_limit_repos", OverLimitRepos); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/CodeScanningVariantAnalysis_skipped_repositories_not_found_repos.cs b/src/Ayllu.Github.Client/Github/Client/Models/CodeScanningVariantAnalysis_skipped_repositories_not_found_repos.cs new file mode 100644 index 0000000..b0c8fbd --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/CodeScanningVariantAnalysis_skipped_repositories_not_found_repos.cs @@ -0,0 +1,69 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class CodeScanningVariantAnalysis_skipped_repositories_not_found_repos : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The total number of repositories that were skipped for this reason. + public int? RepositoryCount { get; set; } + /// A list of full repository names that were skipped. This list may not include all repositories that were skipped. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? RepositoryFullNames { get; set; } +#nullable restore +#else + public List RepositoryFullNames { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public CodeScanningVariantAnalysis_skipped_repositories_not_found_repos() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.CodeScanningVariantAnalysis_skipped_repositories_not_found_repos CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.CodeScanningVariantAnalysis_skipped_repositories_not_found_repos(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "repository_count", n => { RepositoryCount = n.GetIntValue(); } }, + { "repository_full_names", n => { RepositoryFullNames = n.GetCollectionOfPrimitiveValues()?.AsList(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteIntValue("repository_count", RepositoryCount); + writer.WriteCollectionOfPrimitiveValues("repository_full_names", RepositoryFullNames); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/CodeScanningVariantAnalysis_status.cs b/src/Ayllu.Github.Client/Github/Client/Models/CodeScanningVariantAnalysis_status.cs new file mode 100644 index 0000000..1fabf1f --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/CodeScanningVariantAnalysis_status.cs @@ -0,0 +1,28 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public enum CodeScanningVariantAnalysis_status + #pragma warning restore CS1591 + { + [EnumMember(Value = "in_progress")] + #pragma warning disable CS1591 + In_progress, + #pragma warning restore CS1591 + [EnumMember(Value = "succeeded")] + #pragma warning disable CS1591 + Succeeded, + #pragma warning restore CS1591 + [EnumMember(Value = "failed")] + #pragma warning disable CS1591 + Failed, + #pragma warning restore CS1591 + [EnumMember(Value = "cancelled")] + #pragma warning disable CS1591 + Cancelled, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Models/CodeSearchResultItem.cs b/src/Ayllu.Github.Client/Github/Client/Models/CodeSearchResultItem.cs new file mode 100644 index 0000000..eac7a4b --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/CodeSearchResultItem.cs @@ -0,0 +1,168 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + /// + /// Code Search Result Item + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class CodeSearchResultItem : IAdditionalDataHolder, IParsable + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The file_size property + public int? FileSize { get; set; } + /// The git_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? GitUrl { get; set; } +#nullable restore +#else + public string GitUrl { get; set; } +#endif + /// The html_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? HtmlUrl { get; set; } +#nullable restore +#else + public string HtmlUrl { get; set; } +#endif + /// The language property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Language { get; set; } +#nullable restore +#else + public string Language { get; set; } +#endif + /// The last_modified_at property + public DateTimeOffset? LastModifiedAt { get; set; } + /// The line_numbers property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? LineNumbers { get; set; } +#nullable restore +#else + public List LineNumbers { get; set; } +#endif + /// The name property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Name { get; set; } +#nullable restore +#else + public string Name { get; set; } +#endif + /// The path property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Path { get; set; } +#nullable restore +#else + public string Path { get; set; } +#endif + /// Minimal Repository +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.MinimalRepository? Repository { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.MinimalRepository Repository { get; set; } +#endif + /// The score property + public double? Score { get; set; } + /// The sha property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Sha { get; set; } +#nullable restore +#else + public string Sha { get; set; } +#endif + /// The text_matches property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? TextMatches { get; set; } +#nullable restore +#else + public List TextMatches { get; set; } +#endif + /// The url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Url { get; set; } +#nullable restore +#else + public string Url { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public CodeSearchResultItem() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.CodeSearchResultItem CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.CodeSearchResultItem(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "file_size", n => { FileSize = n.GetIntValue(); } }, + { "git_url", n => { GitUrl = n.GetStringValue(); } }, + { "html_url", n => { HtmlUrl = n.GetStringValue(); } }, + { "language", n => { Language = n.GetStringValue(); } }, + { "last_modified_at", n => { LastModifiedAt = n.GetDateTimeOffsetValue(); } }, + { "line_numbers", n => { LineNumbers = n.GetCollectionOfPrimitiveValues()?.AsList(); } }, + { "name", n => { Name = n.GetStringValue(); } }, + { "path", n => { Path = n.GetStringValue(); } }, + { "repository", n => { Repository = n.GetObjectValue(global::Ayllu.Github.Client.Models.MinimalRepository.CreateFromDiscriminatorValue); } }, + { "score", n => { Score = n.GetDoubleValue(); } }, + { "sha", n => { Sha = n.GetStringValue(); } }, + { "text_matches", n => { TextMatches = n.GetCollectionOfObjectValues(global::Ayllu.Github.Client.Models.Code.CreateFromDiscriminatorValue)?.AsList(); } }, + { "url", n => { Url = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteIntValue("file_size", FileSize); + writer.WriteStringValue("git_url", GitUrl); + writer.WriteStringValue("html_url", HtmlUrl); + writer.WriteStringValue("language", Language); + writer.WriteDateTimeOffsetValue("last_modified_at", LastModifiedAt); + writer.WriteCollectionOfPrimitiveValues("line_numbers", LineNumbers); + writer.WriteStringValue("name", Name); + writer.WriteStringValue("path", Path); + writer.WriteObjectValue("repository", Repository); + writer.WriteDoubleValue("score", Score); + writer.WriteStringValue("sha", Sha); + writer.WriteCollectionOfObjectValues("text_matches", TextMatches); + writer.WriteStringValue("url", Url); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/CodeSecurityConfiguration.cs b/src/Ayllu.Github.Client/Github/Client/Models/CodeSecurityConfiguration.cs new file mode 100644 index 0000000..f900626 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/CodeSecurityConfiguration.cs @@ -0,0 +1,216 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + /// + /// A code security configuration + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class CodeSecurityConfiguration : IAdditionalDataHolder, IParsable + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The enablement status of GitHub Advanced Security + public global::Ayllu.Github.Client.Models.CodeSecurityConfiguration_advanced_security? AdvancedSecurity { get; set; } + /// The enablement status of code scanning default setup + public global::Ayllu.Github.Client.Models.CodeSecurityConfiguration_code_scanning_default_setup? CodeScanningDefaultSetup { get; set; } + /// Feature options for code scanning default setup +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.CodeSecurityConfiguration_code_scanning_default_setup_options? CodeScanningDefaultSetupOptions { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.CodeSecurityConfiguration_code_scanning_default_setup_options CodeScanningDefaultSetupOptions { get; set; } +#endif + /// The enablement status of code scanning delegated alert dismissal + public global::Ayllu.Github.Client.Models.CodeSecurityConfiguration_code_scanning_delegated_alert_dismissal? CodeScanningDelegatedAlertDismissal { get; set; } + /// Feature options for code scanning +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.CodeSecurityConfiguration_code_scanning_options? CodeScanningOptions { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.CodeSecurityConfiguration_code_scanning_options CodeScanningOptions { get; set; } +#endif + /// The created_at property + public DateTimeOffset? CreatedAt { get; set; } + /// The enablement status of Dependabot alerts + public global::Ayllu.Github.Client.Models.CodeSecurityConfiguration_dependabot_alerts? DependabotAlerts { get; set; } + /// The enablement status of Dependabot security updates + public global::Ayllu.Github.Client.Models.CodeSecurityConfiguration_dependabot_security_updates? DependabotSecurityUpdates { get; set; } + /// The enablement status of Dependency Graph + public global::Ayllu.Github.Client.Models.CodeSecurityConfiguration_dependency_graph? DependencyGraph { get; set; } + /// The enablement status of Automatic dependency submission + public global::Ayllu.Github.Client.Models.CodeSecurityConfiguration_dependency_graph_autosubmit_action? DependencyGraphAutosubmitAction { get; set; } + /// Feature options for Automatic dependency submission +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.CodeSecurityConfiguration_dependency_graph_autosubmit_action_options? DependencyGraphAutosubmitActionOptions { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.CodeSecurityConfiguration_dependency_graph_autosubmit_action_options DependencyGraphAutosubmitActionOptions { get; set; } +#endif + /// A description of the code security configuration +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Description { get; set; } +#nullable restore +#else + public string Description { get; set; } +#endif + /// The enforcement status for a security configuration + public global::Ayllu.Github.Client.Models.CodeSecurityConfiguration_enforcement? Enforcement { get; set; } + /// The URL of the configuration +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? HtmlUrl { get; set; } +#nullable restore +#else + public string HtmlUrl { get; set; } +#endif + /// The ID of the code security configuration + public int? Id { get; set; } + /// The name of the code security configuration. Must be unique within the organization. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Name { get; set; } +#nullable restore +#else + public string Name { get; set; } +#endif + /// The enablement status of private vulnerability reporting + public global::Ayllu.Github.Client.Models.CodeSecurityConfiguration_private_vulnerability_reporting? PrivateVulnerabilityReporting { get; set; } + /// The enablement status of secret scanning + public global::Ayllu.Github.Client.Models.CodeSecurityConfiguration_secret_scanning? SecretScanning { get; set; } + /// The enablement status of secret scanning delegated alert dismissal + public global::Ayllu.Github.Client.Models.CodeSecurityConfiguration_secret_scanning_delegated_alert_dismissal? SecretScanningDelegatedAlertDismissal { get; set; } + /// The enablement status of secret scanning delegated bypass + public global::Ayllu.Github.Client.Models.CodeSecurityConfiguration_secret_scanning_delegated_bypass? SecretScanningDelegatedBypass { get; set; } + /// Feature options for secret scanning delegated bypass +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.CodeSecurityConfiguration_secret_scanning_delegated_bypass_options? SecretScanningDelegatedBypassOptions { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.CodeSecurityConfiguration_secret_scanning_delegated_bypass_options SecretScanningDelegatedBypassOptions { get; set; } +#endif + /// The enablement status of Copilot secret scanning + public global::Ayllu.Github.Client.Models.CodeSecurityConfiguration_secret_scanning_generic_secrets? SecretScanningGenericSecrets { get; set; } + /// The enablement status of secret scanning non-provider patterns + public global::Ayllu.Github.Client.Models.CodeSecurityConfiguration_secret_scanning_non_provider_patterns? SecretScanningNonProviderPatterns { get; set; } + /// The enablement status of secret scanning push protection + public global::Ayllu.Github.Client.Models.CodeSecurityConfiguration_secret_scanning_push_protection? SecretScanningPushProtection { get; set; } + /// The enablement status of secret scanning validity checks + public global::Ayllu.Github.Client.Models.CodeSecurityConfiguration_secret_scanning_validity_checks? SecretScanningValidityChecks { get; set; } + /// The type of the code security configuration. + public global::Ayllu.Github.Client.Models.CodeSecurityConfiguration_target_type? TargetType { get; set; } + /// The updated_at property + public DateTimeOffset? UpdatedAt { get; set; } + /// The URL of the configuration +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Url { get; set; } +#nullable restore +#else + public string Url { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public CodeSecurityConfiguration() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.CodeSecurityConfiguration CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.CodeSecurityConfiguration(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "advanced_security", n => { AdvancedSecurity = n.GetEnumValue(); } }, + { "code_scanning_default_setup", n => { CodeScanningDefaultSetup = n.GetEnumValue(); } }, + { "code_scanning_default_setup_options", n => { CodeScanningDefaultSetupOptions = n.GetObjectValue(global::Ayllu.Github.Client.Models.CodeSecurityConfiguration_code_scanning_default_setup_options.CreateFromDiscriminatorValue); } }, + { "code_scanning_delegated_alert_dismissal", n => { CodeScanningDelegatedAlertDismissal = n.GetEnumValue(); } }, + { "code_scanning_options", n => { CodeScanningOptions = n.GetObjectValue(global::Ayllu.Github.Client.Models.CodeSecurityConfiguration_code_scanning_options.CreateFromDiscriminatorValue); } }, + { "created_at", n => { CreatedAt = n.GetDateTimeOffsetValue(); } }, + { "dependabot_alerts", n => { DependabotAlerts = n.GetEnumValue(); } }, + { "dependabot_security_updates", n => { DependabotSecurityUpdates = n.GetEnumValue(); } }, + { "dependency_graph", n => { DependencyGraph = n.GetEnumValue(); } }, + { "dependency_graph_autosubmit_action", n => { DependencyGraphAutosubmitAction = n.GetEnumValue(); } }, + { "dependency_graph_autosubmit_action_options", n => { DependencyGraphAutosubmitActionOptions = n.GetObjectValue(global::Ayllu.Github.Client.Models.CodeSecurityConfiguration_dependency_graph_autosubmit_action_options.CreateFromDiscriminatorValue); } }, + { "description", n => { Description = n.GetStringValue(); } }, + { "enforcement", n => { Enforcement = n.GetEnumValue(); } }, + { "html_url", n => { HtmlUrl = n.GetStringValue(); } }, + { "id", n => { Id = n.GetIntValue(); } }, + { "name", n => { Name = n.GetStringValue(); } }, + { "private_vulnerability_reporting", n => { PrivateVulnerabilityReporting = n.GetEnumValue(); } }, + { "secret_scanning", n => { SecretScanning = n.GetEnumValue(); } }, + { "secret_scanning_delegated_alert_dismissal", n => { SecretScanningDelegatedAlertDismissal = n.GetEnumValue(); } }, + { "secret_scanning_delegated_bypass", n => { SecretScanningDelegatedBypass = n.GetEnumValue(); } }, + { "secret_scanning_delegated_bypass_options", n => { SecretScanningDelegatedBypassOptions = n.GetObjectValue(global::Ayllu.Github.Client.Models.CodeSecurityConfiguration_secret_scanning_delegated_bypass_options.CreateFromDiscriminatorValue); } }, + { "secret_scanning_generic_secrets", n => { SecretScanningGenericSecrets = n.GetEnumValue(); } }, + { "secret_scanning_non_provider_patterns", n => { SecretScanningNonProviderPatterns = n.GetEnumValue(); } }, + { "secret_scanning_push_protection", n => { SecretScanningPushProtection = n.GetEnumValue(); } }, + { "secret_scanning_validity_checks", n => { SecretScanningValidityChecks = n.GetEnumValue(); } }, + { "target_type", n => { TargetType = n.GetEnumValue(); } }, + { "updated_at", n => { UpdatedAt = n.GetDateTimeOffsetValue(); } }, + { "url", n => { Url = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteEnumValue("advanced_security", AdvancedSecurity); + writer.WriteEnumValue("code_scanning_default_setup", CodeScanningDefaultSetup); + writer.WriteObjectValue("code_scanning_default_setup_options", CodeScanningDefaultSetupOptions); + writer.WriteEnumValue("code_scanning_delegated_alert_dismissal", CodeScanningDelegatedAlertDismissal); + writer.WriteObjectValue("code_scanning_options", CodeScanningOptions); + writer.WriteDateTimeOffsetValue("created_at", CreatedAt); + writer.WriteEnumValue("dependabot_alerts", DependabotAlerts); + writer.WriteEnumValue("dependabot_security_updates", DependabotSecurityUpdates); + writer.WriteEnumValue("dependency_graph", DependencyGraph); + writer.WriteEnumValue("dependency_graph_autosubmit_action", DependencyGraphAutosubmitAction); + writer.WriteObjectValue("dependency_graph_autosubmit_action_options", DependencyGraphAutosubmitActionOptions); + writer.WriteStringValue("description", Description); + writer.WriteEnumValue("enforcement", Enforcement); + writer.WriteStringValue("html_url", HtmlUrl); + writer.WriteIntValue("id", Id); + writer.WriteStringValue("name", Name); + writer.WriteEnumValue("private_vulnerability_reporting", PrivateVulnerabilityReporting); + writer.WriteEnumValue("secret_scanning", SecretScanning); + writer.WriteEnumValue("secret_scanning_delegated_alert_dismissal", SecretScanningDelegatedAlertDismissal); + writer.WriteEnumValue("secret_scanning_delegated_bypass", SecretScanningDelegatedBypass); + writer.WriteObjectValue("secret_scanning_delegated_bypass_options", SecretScanningDelegatedBypassOptions); + writer.WriteEnumValue("secret_scanning_generic_secrets", SecretScanningGenericSecrets); + writer.WriteEnumValue("secret_scanning_non_provider_patterns", SecretScanningNonProviderPatterns); + writer.WriteEnumValue("secret_scanning_push_protection", SecretScanningPushProtection); + writer.WriteEnumValue("secret_scanning_validity_checks", SecretScanningValidityChecks); + writer.WriteEnumValue("target_type", TargetType); + writer.WriteDateTimeOffsetValue("updated_at", UpdatedAt); + writer.WriteStringValue("url", Url); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/CodeSecurityConfigurationForRepository.cs b/src/Ayllu.Github.Client/Github/Client/Models/CodeSecurityConfigurationForRepository.cs new file mode 100644 index 0000000..6caa3af --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/CodeSecurityConfigurationForRepository.cs @@ -0,0 +1,70 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + /// + /// Code security configuration associated with a repository and attachment status + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class CodeSecurityConfigurationForRepository : IAdditionalDataHolder, IParsable + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// A code security configuration +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.CodeSecurityConfiguration? Configuration { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.CodeSecurityConfiguration Configuration { get; set; } +#endif + /// The attachment status of the code security configuration on the repository. + public global::Ayllu.Github.Client.Models.CodeSecurityConfigurationForRepository_status? Status { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public CodeSecurityConfigurationForRepository() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.CodeSecurityConfigurationForRepository CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.CodeSecurityConfigurationForRepository(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "configuration", n => { Configuration = n.GetObjectValue(global::Ayllu.Github.Client.Models.CodeSecurityConfiguration.CreateFromDiscriminatorValue); } }, + { "status", n => { Status = n.GetEnumValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteObjectValue("configuration", Configuration); + writer.WriteEnumValue("status", Status); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/CodeSecurityConfigurationForRepository_status.cs b/src/Ayllu.Github.Client/Github/Client/Models/CodeSecurityConfigurationForRepository_status.cs new file mode 100644 index 0000000..8e4b5c6 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/CodeSecurityConfigurationForRepository_status.cs @@ -0,0 +1,43 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Models +{ + /// The attachment status of the code security configuration on the repository. + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public enum CodeSecurityConfigurationForRepository_status + { + [EnumMember(Value = "attached")] + #pragma warning disable CS1591 + Attached, + #pragma warning restore CS1591 + [EnumMember(Value = "attaching")] + #pragma warning disable CS1591 + Attaching, + #pragma warning restore CS1591 + [EnumMember(Value = "detached")] + #pragma warning disable CS1591 + Detached, + #pragma warning restore CS1591 + [EnumMember(Value = "removed")] + #pragma warning disable CS1591 + Removed, + #pragma warning restore CS1591 + [EnumMember(Value = "enforced")] + #pragma warning disable CS1591 + Enforced, + #pragma warning restore CS1591 + [EnumMember(Value = "failed")] + #pragma warning disable CS1591 + Failed, + #pragma warning restore CS1591 + [EnumMember(Value = "updating")] + #pragma warning disable CS1591 + Updating, + #pragma warning restore CS1591 + [EnumMember(Value = "removed_by_enterprise")] + #pragma warning disable CS1591 + Removed_by_enterprise, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Models/CodeSecurityConfigurationRepositories.cs b/src/Ayllu.Github.Client/Github/Client/Models/CodeSecurityConfigurationRepositories.cs new file mode 100644 index 0000000..3ae4e6e --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/CodeSecurityConfigurationRepositories.cs @@ -0,0 +1,70 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + /// + /// Repositories associated with a code security configuration and attachment status + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class CodeSecurityConfigurationRepositories : IAdditionalDataHolder, IParsable + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// A GitHub repository. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.SimpleRepository? Repository { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.SimpleRepository Repository { get; set; } +#endif + /// The attachment status of the code security configuration on the repository. + public global::Ayllu.Github.Client.Models.CodeSecurityConfigurationRepositories_status? Status { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public CodeSecurityConfigurationRepositories() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.CodeSecurityConfigurationRepositories CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.CodeSecurityConfigurationRepositories(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "repository", n => { Repository = n.GetObjectValue(global::Ayllu.Github.Client.Models.SimpleRepository.CreateFromDiscriminatorValue); } }, + { "status", n => { Status = n.GetEnumValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteObjectValue("repository", Repository); + writer.WriteEnumValue("status", Status); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/CodeSecurityConfigurationRepositories_status.cs b/src/Ayllu.Github.Client/Github/Client/Models/CodeSecurityConfigurationRepositories_status.cs new file mode 100644 index 0000000..38bd8e5 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/CodeSecurityConfigurationRepositories_status.cs @@ -0,0 +1,43 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Models +{ + /// The attachment status of the code security configuration on the repository. + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public enum CodeSecurityConfigurationRepositories_status + { + [EnumMember(Value = "attached")] + #pragma warning disable CS1591 + Attached, + #pragma warning restore CS1591 + [EnumMember(Value = "attaching")] + #pragma warning disable CS1591 + Attaching, + #pragma warning restore CS1591 + [EnumMember(Value = "detached")] + #pragma warning disable CS1591 + Detached, + #pragma warning restore CS1591 + [EnumMember(Value = "removed")] + #pragma warning disable CS1591 + Removed, + #pragma warning restore CS1591 + [EnumMember(Value = "enforced")] + #pragma warning disable CS1591 + Enforced, + #pragma warning restore CS1591 + [EnumMember(Value = "failed")] + #pragma warning disable CS1591 + Failed, + #pragma warning restore CS1591 + [EnumMember(Value = "updating")] + #pragma warning disable CS1591 + Updating, + #pragma warning restore CS1591 + [EnumMember(Value = "removed_by_enterprise")] + #pragma warning disable CS1591 + Removed_by_enterprise, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Models/CodeSecurityConfiguration_advanced_security.cs b/src/Ayllu.Github.Client/Github/Client/Models/CodeSecurityConfiguration_advanced_security.cs new file mode 100644 index 0000000..7812fc5 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/CodeSecurityConfiguration_advanced_security.cs @@ -0,0 +1,27 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Models +{ + /// The enablement status of GitHub Advanced Security + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public enum CodeSecurityConfiguration_advanced_security + { + [EnumMember(Value = "enabled")] + #pragma warning disable CS1591 + Enabled, + #pragma warning restore CS1591 + [EnumMember(Value = "disabled")] + #pragma warning disable CS1591 + Disabled, + #pragma warning restore CS1591 + [EnumMember(Value = "code_security")] + #pragma warning disable CS1591 + Code_security, + #pragma warning restore CS1591 + [EnumMember(Value = "secret_protection")] + #pragma warning disable CS1591 + Secret_protection, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Models/CodeSecurityConfiguration_code_scanning_default_setup.cs b/src/Ayllu.Github.Client/Github/Client/Models/CodeSecurityConfiguration_code_scanning_default_setup.cs new file mode 100644 index 0000000..966b719 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/CodeSecurityConfiguration_code_scanning_default_setup.cs @@ -0,0 +1,23 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Models +{ + /// The enablement status of code scanning default setup + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public enum CodeSecurityConfiguration_code_scanning_default_setup + { + [EnumMember(Value = "enabled")] + #pragma warning disable CS1591 + Enabled, + #pragma warning restore CS1591 + [EnumMember(Value = "disabled")] + #pragma warning disable CS1591 + Disabled, + #pragma warning restore CS1591 + [EnumMember(Value = "not_set")] + #pragma warning disable CS1591 + Not_set, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Models/CodeSecurityConfiguration_code_scanning_default_setup_options.cs b/src/Ayllu.Github.Client/Github/Client/Models/CodeSecurityConfiguration_code_scanning_default_setup_options.cs new file mode 100644 index 0000000..e37a4b0 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/CodeSecurityConfiguration_code_scanning_default_setup_options.cs @@ -0,0 +1,70 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + /// + /// Feature options for code scanning default setup + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class CodeSecurityConfiguration_code_scanning_default_setup_options : IAdditionalDataHolder, IParsable + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The label of the runner to use for code scanning when runner_type is 'labeled'. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? RunnerLabel { get; set; } +#nullable restore +#else + public string RunnerLabel { get; set; } +#endif + /// Whether to use labeled runners or standard GitHub runners. + public global::Ayllu.Github.Client.Models.CodeSecurityConfiguration_code_scanning_default_setup_options_runner_type? RunnerType { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public CodeSecurityConfiguration_code_scanning_default_setup_options() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.CodeSecurityConfiguration_code_scanning_default_setup_options CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.CodeSecurityConfiguration_code_scanning_default_setup_options(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "runner_label", n => { RunnerLabel = n.GetStringValue(); } }, + { "runner_type", n => { RunnerType = n.GetEnumValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("runner_label", RunnerLabel); + writer.WriteEnumValue("runner_type", RunnerType); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/CodeSecurityConfiguration_code_scanning_default_setup_options_runner_type.cs b/src/Ayllu.Github.Client/Github/Client/Models/CodeSecurityConfiguration_code_scanning_default_setup_options_runner_type.cs new file mode 100644 index 0000000..8574d49 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/CodeSecurityConfiguration_code_scanning_default_setup_options_runner_type.cs @@ -0,0 +1,23 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Models +{ + /// Whether to use labeled runners or standard GitHub runners. + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public enum CodeSecurityConfiguration_code_scanning_default_setup_options_runner_type + { + [EnumMember(Value = "standard")] + #pragma warning disable CS1591 + Standard, + #pragma warning restore CS1591 + [EnumMember(Value = "labeled")] + #pragma warning disable CS1591 + Labeled, + #pragma warning restore CS1591 + [EnumMember(Value = "not_set")] + #pragma warning disable CS1591 + Not_set, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Models/CodeSecurityConfiguration_code_scanning_delegated_alert_dismissal.cs b/src/Ayllu.Github.Client/Github/Client/Models/CodeSecurityConfiguration_code_scanning_delegated_alert_dismissal.cs new file mode 100644 index 0000000..d21353f --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/CodeSecurityConfiguration_code_scanning_delegated_alert_dismissal.cs @@ -0,0 +1,23 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Models +{ + /// The enablement status of code scanning delegated alert dismissal + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public enum CodeSecurityConfiguration_code_scanning_delegated_alert_dismissal + { + [EnumMember(Value = "enabled")] + #pragma warning disable CS1591 + Enabled, + #pragma warning restore CS1591 + [EnumMember(Value = "disabled")] + #pragma warning disable CS1591 + Disabled, + #pragma warning restore CS1591 + [EnumMember(Value = "not_set")] + #pragma warning disable CS1591 + Not_set, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Models/CodeSecurityConfiguration_code_scanning_options.cs b/src/Ayllu.Github.Client/Github/Client/Models/CodeSecurityConfiguration_code_scanning_options.cs new file mode 100644 index 0000000..cbc7dcc --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/CodeSecurityConfiguration_code_scanning_options.cs @@ -0,0 +1,60 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + /// + /// Feature options for code scanning + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class CodeSecurityConfiguration_code_scanning_options : IAdditionalDataHolder, IParsable + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// Whether to allow repos which use advanced setup + public bool? AllowAdvanced { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public CodeSecurityConfiguration_code_scanning_options() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.CodeSecurityConfiguration_code_scanning_options CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.CodeSecurityConfiguration_code_scanning_options(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "allow_advanced", n => { AllowAdvanced = n.GetBoolValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteBoolValue("allow_advanced", AllowAdvanced); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/CodeSecurityConfiguration_dependabot_alerts.cs b/src/Ayllu.Github.Client/Github/Client/Models/CodeSecurityConfiguration_dependabot_alerts.cs new file mode 100644 index 0000000..39b3a17 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/CodeSecurityConfiguration_dependabot_alerts.cs @@ -0,0 +1,23 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Models +{ + /// The enablement status of Dependabot alerts + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public enum CodeSecurityConfiguration_dependabot_alerts + { + [EnumMember(Value = "enabled")] + #pragma warning disable CS1591 + Enabled, + #pragma warning restore CS1591 + [EnumMember(Value = "disabled")] + #pragma warning disable CS1591 + Disabled, + #pragma warning restore CS1591 + [EnumMember(Value = "not_set")] + #pragma warning disable CS1591 + Not_set, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Models/CodeSecurityConfiguration_dependabot_security_updates.cs b/src/Ayllu.Github.Client/Github/Client/Models/CodeSecurityConfiguration_dependabot_security_updates.cs new file mode 100644 index 0000000..d205ff4 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/CodeSecurityConfiguration_dependabot_security_updates.cs @@ -0,0 +1,23 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Models +{ + /// The enablement status of Dependabot security updates + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public enum CodeSecurityConfiguration_dependabot_security_updates + { + [EnumMember(Value = "enabled")] + #pragma warning disable CS1591 + Enabled, + #pragma warning restore CS1591 + [EnumMember(Value = "disabled")] + #pragma warning disable CS1591 + Disabled, + #pragma warning restore CS1591 + [EnumMember(Value = "not_set")] + #pragma warning disable CS1591 + Not_set, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Models/CodeSecurityConfiguration_dependency_graph.cs b/src/Ayllu.Github.Client/Github/Client/Models/CodeSecurityConfiguration_dependency_graph.cs new file mode 100644 index 0000000..6a71afa --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/CodeSecurityConfiguration_dependency_graph.cs @@ -0,0 +1,23 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Models +{ + /// The enablement status of Dependency Graph + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public enum CodeSecurityConfiguration_dependency_graph + { + [EnumMember(Value = "enabled")] + #pragma warning disable CS1591 + Enabled, + #pragma warning restore CS1591 + [EnumMember(Value = "disabled")] + #pragma warning disable CS1591 + Disabled, + #pragma warning restore CS1591 + [EnumMember(Value = "not_set")] + #pragma warning disable CS1591 + Not_set, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Models/CodeSecurityConfiguration_dependency_graph_autosubmit_action.cs b/src/Ayllu.Github.Client/Github/Client/Models/CodeSecurityConfiguration_dependency_graph_autosubmit_action.cs new file mode 100644 index 0000000..3abf4c2 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/CodeSecurityConfiguration_dependency_graph_autosubmit_action.cs @@ -0,0 +1,23 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Models +{ + /// The enablement status of Automatic dependency submission + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public enum CodeSecurityConfiguration_dependency_graph_autosubmit_action + { + [EnumMember(Value = "enabled")] + #pragma warning disable CS1591 + Enabled, + #pragma warning restore CS1591 + [EnumMember(Value = "disabled")] + #pragma warning disable CS1591 + Disabled, + #pragma warning restore CS1591 + [EnumMember(Value = "not_set")] + #pragma warning disable CS1591 + Not_set, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Models/CodeSecurityConfiguration_dependency_graph_autosubmit_action_options.cs b/src/Ayllu.Github.Client/Github/Client/Models/CodeSecurityConfiguration_dependency_graph_autosubmit_action_options.cs new file mode 100644 index 0000000..1f2218c --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/CodeSecurityConfiguration_dependency_graph_autosubmit_action_options.cs @@ -0,0 +1,60 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + /// + /// Feature options for Automatic dependency submission + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class CodeSecurityConfiguration_dependency_graph_autosubmit_action_options : IAdditionalDataHolder, IParsable + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// Whether to use runners labeled with 'dependency-submission' or standard GitHub runners. + public bool? LabeledRunners { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public CodeSecurityConfiguration_dependency_graph_autosubmit_action_options() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.CodeSecurityConfiguration_dependency_graph_autosubmit_action_options CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.CodeSecurityConfiguration_dependency_graph_autosubmit_action_options(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "labeled_runners", n => { LabeledRunners = n.GetBoolValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteBoolValue("labeled_runners", LabeledRunners); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/CodeSecurityConfiguration_enforcement.cs b/src/Ayllu.Github.Client/Github/Client/Models/CodeSecurityConfiguration_enforcement.cs new file mode 100644 index 0000000..7328b71 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/CodeSecurityConfiguration_enforcement.cs @@ -0,0 +1,19 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Models +{ + /// The enforcement status for a security configuration + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public enum CodeSecurityConfiguration_enforcement + { + [EnumMember(Value = "enforced")] + #pragma warning disable CS1591 + Enforced, + #pragma warning restore CS1591 + [EnumMember(Value = "unenforced")] + #pragma warning disable CS1591 + Unenforced, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Models/CodeSecurityConfiguration_private_vulnerability_reporting.cs b/src/Ayllu.Github.Client/Github/Client/Models/CodeSecurityConfiguration_private_vulnerability_reporting.cs new file mode 100644 index 0000000..10f365d --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/CodeSecurityConfiguration_private_vulnerability_reporting.cs @@ -0,0 +1,23 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Models +{ + /// The enablement status of private vulnerability reporting + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public enum CodeSecurityConfiguration_private_vulnerability_reporting + { + [EnumMember(Value = "enabled")] + #pragma warning disable CS1591 + Enabled, + #pragma warning restore CS1591 + [EnumMember(Value = "disabled")] + #pragma warning disable CS1591 + Disabled, + #pragma warning restore CS1591 + [EnumMember(Value = "not_set")] + #pragma warning disable CS1591 + Not_set, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Models/CodeSecurityConfiguration_secret_scanning.cs b/src/Ayllu.Github.Client/Github/Client/Models/CodeSecurityConfiguration_secret_scanning.cs new file mode 100644 index 0000000..a66809a --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/CodeSecurityConfiguration_secret_scanning.cs @@ -0,0 +1,23 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Models +{ + /// The enablement status of secret scanning + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public enum CodeSecurityConfiguration_secret_scanning + { + [EnumMember(Value = "enabled")] + #pragma warning disable CS1591 + Enabled, + #pragma warning restore CS1591 + [EnumMember(Value = "disabled")] + #pragma warning disable CS1591 + Disabled, + #pragma warning restore CS1591 + [EnumMember(Value = "not_set")] + #pragma warning disable CS1591 + Not_set, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Models/CodeSecurityConfiguration_secret_scanning_delegated_alert_dismissal.cs b/src/Ayllu.Github.Client/Github/Client/Models/CodeSecurityConfiguration_secret_scanning_delegated_alert_dismissal.cs new file mode 100644 index 0000000..a6b4744 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/CodeSecurityConfiguration_secret_scanning_delegated_alert_dismissal.cs @@ -0,0 +1,23 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Models +{ + /// The enablement status of secret scanning delegated alert dismissal + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public enum CodeSecurityConfiguration_secret_scanning_delegated_alert_dismissal + { + [EnumMember(Value = "enabled")] + #pragma warning disable CS1591 + Enabled, + #pragma warning restore CS1591 + [EnumMember(Value = "disabled")] + #pragma warning disable CS1591 + Disabled, + #pragma warning restore CS1591 + [EnumMember(Value = "not_set")] + #pragma warning disable CS1591 + Not_set, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Models/CodeSecurityConfiguration_secret_scanning_delegated_bypass.cs b/src/Ayllu.Github.Client/Github/Client/Models/CodeSecurityConfiguration_secret_scanning_delegated_bypass.cs new file mode 100644 index 0000000..5b9e745 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/CodeSecurityConfiguration_secret_scanning_delegated_bypass.cs @@ -0,0 +1,23 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Models +{ + /// The enablement status of secret scanning delegated bypass + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public enum CodeSecurityConfiguration_secret_scanning_delegated_bypass + { + [EnumMember(Value = "enabled")] + #pragma warning disable CS1591 + Enabled, + #pragma warning restore CS1591 + [EnumMember(Value = "disabled")] + #pragma warning disable CS1591 + Disabled, + #pragma warning restore CS1591 + [EnumMember(Value = "not_set")] + #pragma warning disable CS1591 + Not_set, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Models/CodeSecurityConfiguration_secret_scanning_delegated_bypass_options.cs b/src/Ayllu.Github.Client/Github/Client/Models/CodeSecurityConfiguration_secret_scanning_delegated_bypass_options.cs new file mode 100644 index 0000000..2897c0b --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/CodeSecurityConfiguration_secret_scanning_delegated_bypass_options.cs @@ -0,0 +1,66 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + /// + /// Feature options for secret scanning delegated bypass + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class CodeSecurityConfiguration_secret_scanning_delegated_bypass_options : IAdditionalDataHolder, IParsable + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The bypass reviewers for secret scanning delegated bypass +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? Reviewers { get; set; } +#nullable restore +#else + public List Reviewers { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public CodeSecurityConfiguration_secret_scanning_delegated_bypass_options() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.CodeSecurityConfiguration_secret_scanning_delegated_bypass_options CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.CodeSecurityConfiguration_secret_scanning_delegated_bypass_options(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "reviewers", n => { Reviewers = n.GetCollectionOfObjectValues(global::Ayllu.Github.Client.Models.CodeSecurityConfiguration_secret_scanning_delegated_bypass_options_reviewers.CreateFromDiscriminatorValue)?.AsList(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteCollectionOfObjectValues("reviewers", Reviewers); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/CodeSecurityConfiguration_secret_scanning_delegated_bypass_options_reviewers.cs b/src/Ayllu.Github.Client/Github/Client/Models/CodeSecurityConfiguration_secret_scanning_delegated_bypass_options_reviewers.cs new file mode 100644 index 0000000..7bb3d0a --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/CodeSecurityConfiguration_secret_scanning_delegated_bypass_options_reviewers.cs @@ -0,0 +1,63 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class CodeSecurityConfiguration_secret_scanning_delegated_bypass_options_reviewers : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The ID of the team or role selected as a bypass reviewer + public int? ReviewerId { get; set; } + /// The type of the bypass reviewer + public global::Ayllu.Github.Client.Models.CodeSecurityConfiguration_secret_scanning_delegated_bypass_options_reviewers_reviewer_type? ReviewerType { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public CodeSecurityConfiguration_secret_scanning_delegated_bypass_options_reviewers() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.CodeSecurityConfiguration_secret_scanning_delegated_bypass_options_reviewers CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.CodeSecurityConfiguration_secret_scanning_delegated_bypass_options_reviewers(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "reviewer_id", n => { ReviewerId = n.GetIntValue(); } }, + { "reviewer_type", n => { ReviewerType = n.GetEnumValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteIntValue("reviewer_id", ReviewerId); + writer.WriteEnumValue("reviewer_type", ReviewerType); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/CodeSecurityConfiguration_secret_scanning_delegated_bypass_options_reviewers_reviewer_type.cs b/src/Ayllu.Github.Client/Github/Client/Models/CodeSecurityConfiguration_secret_scanning_delegated_bypass_options_reviewers_reviewer_type.cs new file mode 100644 index 0000000..4ab6a90 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/CodeSecurityConfiguration_secret_scanning_delegated_bypass_options_reviewers_reviewer_type.cs @@ -0,0 +1,19 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Models +{ + /// The type of the bypass reviewer + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public enum CodeSecurityConfiguration_secret_scanning_delegated_bypass_options_reviewers_reviewer_type + { + [EnumMember(Value = "TEAM")] + #pragma warning disable CS1591 + TEAM, + #pragma warning restore CS1591 + [EnumMember(Value = "ROLE")] + #pragma warning disable CS1591 + ROLE, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Models/CodeSecurityConfiguration_secret_scanning_generic_secrets.cs b/src/Ayllu.Github.Client/Github/Client/Models/CodeSecurityConfiguration_secret_scanning_generic_secrets.cs new file mode 100644 index 0000000..4107be8 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/CodeSecurityConfiguration_secret_scanning_generic_secrets.cs @@ -0,0 +1,23 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Models +{ + /// The enablement status of Copilot secret scanning + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public enum CodeSecurityConfiguration_secret_scanning_generic_secrets + { + [EnumMember(Value = "enabled")] + #pragma warning disable CS1591 + Enabled, + #pragma warning restore CS1591 + [EnumMember(Value = "disabled")] + #pragma warning disable CS1591 + Disabled, + #pragma warning restore CS1591 + [EnumMember(Value = "not_set")] + #pragma warning disable CS1591 + Not_set, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Models/CodeSecurityConfiguration_secret_scanning_non_provider_patterns.cs b/src/Ayllu.Github.Client/Github/Client/Models/CodeSecurityConfiguration_secret_scanning_non_provider_patterns.cs new file mode 100644 index 0000000..69fbcce --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/CodeSecurityConfiguration_secret_scanning_non_provider_patterns.cs @@ -0,0 +1,23 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Models +{ + /// The enablement status of secret scanning non-provider patterns + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public enum CodeSecurityConfiguration_secret_scanning_non_provider_patterns + { + [EnumMember(Value = "enabled")] + #pragma warning disable CS1591 + Enabled, + #pragma warning restore CS1591 + [EnumMember(Value = "disabled")] + #pragma warning disable CS1591 + Disabled, + #pragma warning restore CS1591 + [EnumMember(Value = "not_set")] + #pragma warning disable CS1591 + Not_set, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Models/CodeSecurityConfiguration_secret_scanning_push_protection.cs b/src/Ayllu.Github.Client/Github/Client/Models/CodeSecurityConfiguration_secret_scanning_push_protection.cs new file mode 100644 index 0000000..2c9ad0f --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/CodeSecurityConfiguration_secret_scanning_push_protection.cs @@ -0,0 +1,23 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Models +{ + /// The enablement status of secret scanning push protection + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public enum CodeSecurityConfiguration_secret_scanning_push_protection + { + [EnumMember(Value = "enabled")] + #pragma warning disable CS1591 + Enabled, + #pragma warning restore CS1591 + [EnumMember(Value = "disabled")] + #pragma warning disable CS1591 + Disabled, + #pragma warning restore CS1591 + [EnumMember(Value = "not_set")] + #pragma warning disable CS1591 + Not_set, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Models/CodeSecurityConfiguration_secret_scanning_validity_checks.cs b/src/Ayllu.Github.Client/Github/Client/Models/CodeSecurityConfiguration_secret_scanning_validity_checks.cs new file mode 100644 index 0000000..c076873 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/CodeSecurityConfiguration_secret_scanning_validity_checks.cs @@ -0,0 +1,23 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Models +{ + /// The enablement status of secret scanning validity checks + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public enum CodeSecurityConfiguration_secret_scanning_validity_checks + { + [EnumMember(Value = "enabled")] + #pragma warning disable CS1591 + Enabled, + #pragma warning restore CS1591 + [EnumMember(Value = "disabled")] + #pragma warning disable CS1591 + Disabled, + #pragma warning restore CS1591 + [EnumMember(Value = "not_set")] + #pragma warning disable CS1591 + Not_set, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Models/CodeSecurityConfiguration_target_type.cs b/src/Ayllu.Github.Client/Github/Client/Models/CodeSecurityConfiguration_target_type.cs new file mode 100644 index 0000000..af6df45 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/CodeSecurityConfiguration_target_type.cs @@ -0,0 +1,23 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Models +{ + /// The type of the code security configuration. + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public enum CodeSecurityConfiguration_target_type + { + [EnumMember(Value = "global")] + #pragma warning disable CS1591 + Global, + #pragma warning restore CS1591 + [EnumMember(Value = "organization")] + #pragma warning disable CS1591 + Organization, + #pragma warning restore CS1591 + [EnumMember(Value = "enterprise")] + #pragma warning disable CS1591 + Enterprise, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Models/CodeSecurityDefaultConfigurations.cs b/src/Ayllu.Github.Client/Github/Client/Models/CodeSecurityDefaultConfigurations.cs new file mode 100644 index 0000000..bc2704d --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/CodeSecurityDefaultConfigurations.cs @@ -0,0 +1,69 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class CodeSecurityDefaultConfigurations : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// A code security configuration +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.CodeSecurityConfiguration? Configuration { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.CodeSecurityConfiguration Configuration { get; set; } +#endif + /// The visibility of newly created repositories for which the code security configuration will be applied to by default + public global::Ayllu.Github.Client.Models.CodeSecurityDefaultConfigurations_default_for_new_repos? DefaultForNewRepos { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public CodeSecurityDefaultConfigurations() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.CodeSecurityDefaultConfigurations CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.CodeSecurityDefaultConfigurations(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "configuration", n => { Configuration = n.GetObjectValue(global::Ayllu.Github.Client.Models.CodeSecurityConfiguration.CreateFromDiscriminatorValue); } }, + { "default_for_new_repos", n => { DefaultForNewRepos = n.GetEnumValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteObjectValue("configuration", Configuration); + writer.WriteEnumValue("default_for_new_repos", DefaultForNewRepos); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/CodeSecurityDefaultConfigurations_default_for_new_repos.cs b/src/Ayllu.Github.Client/Github/Client/Models/CodeSecurityDefaultConfigurations_default_for_new_repos.cs new file mode 100644 index 0000000..b0be205 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/CodeSecurityDefaultConfigurations_default_for_new_repos.cs @@ -0,0 +1,23 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Models +{ + /// The visibility of newly created repositories for which the code security configuration will be applied to by default + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public enum CodeSecurityDefaultConfigurations_default_for_new_repos + { + [EnumMember(Value = "public")] + #pragma warning disable CS1591 + Public, + #pragma warning restore CS1591 + [EnumMember(Value = "private_and_internal")] + #pragma warning disable CS1591 + Private_and_internal, + #pragma warning restore CS1591 + [EnumMember(Value = "all")] + #pragma warning disable CS1591 + All, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Models/Code_matches.cs b/src/Ayllu.Github.Client/Github/Client/Models/Code_matches.cs new file mode 100644 index 0000000..9e2084e --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/Code_matches.cs @@ -0,0 +1,75 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class Code_matches : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The indices property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? Indices { get; set; } +#nullable restore +#else + public List Indices { get; set; } +#endif + /// The text property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Text { get; set; } +#nullable restore +#else + public string Text { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public Code_matches() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.Code_matches CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.Code_matches(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "indices", n => { Indices = n.GetCollectionOfPrimitiveValues()?.AsList(); } }, + { "text", n => { Text = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteCollectionOfPrimitiveValues("indices", Indices); + writer.WriteStringValue("text", Text); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/CodeownersErrors.cs b/src/Ayllu.Github.Client/Github/Client/Models/CodeownersErrors.cs new file mode 100644 index 0000000..dfbcc8f --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/CodeownersErrors.cs @@ -0,0 +1,66 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + /// + /// A list of errors found in a repo's CODEOWNERS file + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class CodeownersErrors : IAdditionalDataHolder, IParsable + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The errors property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? Errors { get; set; } +#nullable restore +#else + public List Errors { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public CodeownersErrors() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.CodeownersErrors CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.CodeownersErrors(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "errors", n => { Errors = n.GetCollectionOfObjectValues(global::Ayllu.Github.Client.Models.CodeownersErrors_errors.CreateFromDiscriminatorValue)?.AsList(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteCollectionOfObjectValues("errors", Errors); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/CodeownersErrors_errors.cs b/src/Ayllu.Github.Client/Github/Client/Models/CodeownersErrors_errors.cs new file mode 100644 index 0000000..e50f1eb --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/CodeownersErrors_errors.cs @@ -0,0 +1,113 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class CodeownersErrors_errors : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The column number where this errors occurs. + public int? Column { get; set; } + /// The type of error. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Kind { get; set; } +#nullable restore +#else + public string Kind { get; set; } +#endif + /// The line number where this errors occurs. + public int? Line { get; set; } + /// 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). +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Message { get; set; } +#nullable restore +#else + public string Message { get; set; } +#endif + /// The path of the file where the error occured. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Path { get; set; } +#nullable restore +#else + public string Path { get; set; } +#endif + /// The contents of the line where the error occurs. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Source { get; set; } +#nullable restore +#else + public string Source { get; set; } +#endif + /// Suggested action to fix the error. This will usually be `null`, but is provided for some common errors. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Suggestion { get; set; } +#nullable restore +#else + public string Suggestion { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public CodeownersErrors_errors() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.CodeownersErrors_errors CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.CodeownersErrors_errors(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "column", n => { Column = n.GetIntValue(); } }, + { "kind", n => { Kind = n.GetStringValue(); } }, + { "line", n => { Line = n.GetIntValue(); } }, + { "message", n => { Message = n.GetStringValue(); } }, + { "path", n => { Path = n.GetStringValue(); } }, + { "source", n => { Source = n.GetStringValue(); } }, + { "suggestion", n => { Suggestion = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteIntValue("column", Column); + writer.WriteStringValue("kind", Kind); + writer.WriteIntValue("line", Line); + writer.WriteStringValue("message", Message); + writer.WriteStringValue("path", Path); + writer.WriteStringValue("source", Source); + writer.WriteStringValue("suggestion", Suggestion); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/Codespace.cs b/src/Ayllu.Github.Client/Github/Client/Models/Codespace.cs new file mode 100644 index 0000000..e732187 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/Codespace.cs @@ -0,0 +1,310 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + /// + /// A codespace. + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class Codespace : IAdditionalDataHolder, IParsable + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// A GitHub user. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.SimpleUser? BillableOwner { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.SimpleUser BillableOwner { get; set; } +#endif + /// The created_at property + public DateTimeOffset? CreatedAt { get; set; } + /// Path to devcontainer.json from repo root used to create Codespace. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? DevcontainerPath { get; set; } +#nullable restore +#else + public string DevcontainerPath { get; set; } +#endif + /// Display name for this codespace. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? DisplayName { get; set; } +#nullable restore +#else + public string DisplayName { get; set; } +#endif + /// UUID identifying this codespace's environment. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? EnvironmentId { get; set; } +#nullable restore +#else + public string EnvironmentId { get; set; } +#endif + /// Details about the codespace's git repository. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.Codespace_git_status? GitStatus { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.Codespace_git_status GitStatus { get; set; } +#endif + /// The id property + public long? Id { get; set; } + /// The number of minutes of inactivity after which this codespace will be automatically stopped. + public int? IdleTimeoutMinutes { get; set; } + /// Text to show user when codespace idle timeout minutes has been overriden by an organization policy +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? IdleTimeoutNotice { get; set; } +#nullable restore +#else + public string IdleTimeoutNotice { get; set; } +#endif + /// The text to display to a user when a codespace has been stopped for a potentially actionable reason. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? LastKnownStopNotice { get; set; } +#nullable restore +#else + public string LastKnownStopNotice { get; set; } +#endif + /// Last known time this codespace was started. + public DateTimeOffset? LastUsedAt { get; set; } + /// The initally assigned location of a new codespace. + public global::Ayllu.Github.Client.Models.Codespace_location? Location { get; set; } + /// A description of the machine powering a codespace. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.NullableCodespaceMachine? Machine { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.NullableCodespaceMachine Machine { get; set; } +#endif + /// API URL to access available alternate machine types for this codespace. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? MachinesUrl { get; set; } +#nullable restore +#else + public string MachinesUrl { get; set; } +#endif + /// Automatically generated name of this codespace. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Name { get; set; } +#nullable restore +#else + public string Name { get; set; } +#endif + /// A GitHub user. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.SimpleUser? Owner { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.SimpleUser Owner { get; set; } +#endif + /// 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. + public bool? PendingOperation { get; set; } + /// Text to show user when codespace is disabled by a pending operation +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? PendingOperationDisabledReason { get; set; } +#nullable restore +#else + public string PendingOperationDisabledReason { get; set; } +#endif + /// Whether the codespace was created from a prebuild. + public bool? Prebuild { get; set; } + /// API URL to publish this codespace to a new repository. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? PublishUrl { get; set; } +#nullable restore +#else + public string PublishUrl { get; set; } +#endif + /// API URL for the Pull Request associated with this codespace, if any. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? PullsUrl { get; set; } +#nullable restore +#else + public string PullsUrl { get; set; } +#endif + /// The recent_folders property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? RecentFolders { get; set; } +#nullable restore +#else + public List RecentFolders { get; set; } +#endif + /// Minimal Repository +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.MinimalRepository? Repository { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.MinimalRepository Repository { get; set; } +#endif + /// When a codespace will be auto-deleted based on the "retention_period_minutes" and "last_used_at" + public DateTimeOffset? RetentionExpiresAt { get; set; } + /// Duration in minutes after codespace has gone idle in which it will be deleted. Must be integer minutes between 0 and 43200 (30 days). + public int? RetentionPeriodMinutes { get; set; } + /// The runtime_constraints property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.Codespace_runtime_constraints? RuntimeConstraints { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.Codespace_runtime_constraints RuntimeConstraints { get; set; } +#endif + /// API URL to start this codespace. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? StartUrl { get; set; } +#nullable restore +#else + public string StartUrl { get; set; } +#endif + /// State of this codespace. + public global::Ayllu.Github.Client.Models.Codespace_state? State { get; set; } + /// API URL to stop this codespace. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? StopUrl { get; set; } +#nullable restore +#else + public string StopUrl { get; set; } +#endif + /// The updated_at property + public DateTimeOffset? UpdatedAt { get; set; } + /// API URL for this codespace. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Url { get; set; } +#nullable restore +#else + public string Url { get; set; } +#endif + /// URL to access this codespace on the web. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? WebUrl { get; set; } +#nullable restore +#else + public string WebUrl { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public Codespace() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.Codespace CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.Codespace(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "billable_owner", n => { BillableOwner = n.GetObjectValue(global::Ayllu.Github.Client.Models.SimpleUser.CreateFromDiscriminatorValue); } }, + { "created_at", n => { CreatedAt = n.GetDateTimeOffsetValue(); } }, + { "devcontainer_path", n => { DevcontainerPath = n.GetStringValue(); } }, + { "display_name", n => { DisplayName = n.GetStringValue(); } }, + { "environment_id", n => { EnvironmentId = n.GetStringValue(); } }, + { "git_status", n => { GitStatus = n.GetObjectValue(global::Ayllu.Github.Client.Models.Codespace_git_status.CreateFromDiscriminatorValue); } }, + { "id", n => { Id = n.GetLongValue(); } }, + { "idle_timeout_minutes", n => { IdleTimeoutMinutes = n.GetIntValue(); } }, + { "idle_timeout_notice", n => { IdleTimeoutNotice = n.GetStringValue(); } }, + { "last_known_stop_notice", n => { LastKnownStopNotice = n.GetStringValue(); } }, + { "last_used_at", n => { LastUsedAt = n.GetDateTimeOffsetValue(); } }, + { "location", n => { Location = n.GetEnumValue(); } }, + { "machine", n => { Machine = n.GetObjectValue(global::Ayllu.Github.Client.Models.NullableCodespaceMachine.CreateFromDiscriminatorValue); } }, + { "machines_url", n => { MachinesUrl = n.GetStringValue(); } }, + { "name", n => { Name = n.GetStringValue(); } }, + { "owner", n => { Owner = n.GetObjectValue(global::Ayllu.Github.Client.Models.SimpleUser.CreateFromDiscriminatorValue); } }, + { "pending_operation", n => { PendingOperation = n.GetBoolValue(); } }, + { "pending_operation_disabled_reason", n => { PendingOperationDisabledReason = n.GetStringValue(); } }, + { "prebuild", n => { Prebuild = n.GetBoolValue(); } }, + { "publish_url", n => { PublishUrl = n.GetStringValue(); } }, + { "pulls_url", n => { PullsUrl = n.GetStringValue(); } }, + { "recent_folders", n => { RecentFolders = n.GetCollectionOfPrimitiveValues()?.AsList(); } }, + { "repository", n => { Repository = n.GetObjectValue(global::Ayllu.Github.Client.Models.MinimalRepository.CreateFromDiscriminatorValue); } }, + { "retention_expires_at", n => { RetentionExpiresAt = n.GetDateTimeOffsetValue(); } }, + { "retention_period_minutes", n => { RetentionPeriodMinutes = n.GetIntValue(); } }, + { "runtime_constraints", n => { RuntimeConstraints = n.GetObjectValue(global::Ayllu.Github.Client.Models.Codespace_runtime_constraints.CreateFromDiscriminatorValue); } }, + { "start_url", n => { StartUrl = n.GetStringValue(); } }, + { "state", n => { State = n.GetEnumValue(); } }, + { "stop_url", n => { StopUrl = n.GetStringValue(); } }, + { "updated_at", n => { UpdatedAt = n.GetDateTimeOffsetValue(); } }, + { "url", n => { Url = n.GetStringValue(); } }, + { "web_url", n => { WebUrl = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteObjectValue("billable_owner", BillableOwner); + writer.WriteDateTimeOffsetValue("created_at", CreatedAt); + writer.WriteStringValue("devcontainer_path", DevcontainerPath); + writer.WriteStringValue("display_name", DisplayName); + writer.WriteStringValue("environment_id", EnvironmentId); + writer.WriteObjectValue("git_status", GitStatus); + writer.WriteLongValue("id", Id); + writer.WriteIntValue("idle_timeout_minutes", IdleTimeoutMinutes); + writer.WriteStringValue("idle_timeout_notice", IdleTimeoutNotice); + writer.WriteStringValue("last_known_stop_notice", LastKnownStopNotice); + writer.WriteDateTimeOffsetValue("last_used_at", LastUsedAt); + writer.WriteEnumValue("location", Location); + writer.WriteObjectValue("machine", Machine); + writer.WriteStringValue("machines_url", MachinesUrl); + writer.WriteStringValue("name", Name); + writer.WriteObjectValue("owner", Owner); + writer.WriteBoolValue("pending_operation", PendingOperation); + writer.WriteStringValue("pending_operation_disabled_reason", PendingOperationDisabledReason); + writer.WriteBoolValue("prebuild", Prebuild); + writer.WriteStringValue("publish_url", PublishUrl); + writer.WriteStringValue("pulls_url", PullsUrl); + writer.WriteCollectionOfPrimitiveValues("recent_folders", RecentFolders); + writer.WriteObjectValue("repository", Repository); + writer.WriteDateTimeOffsetValue("retention_expires_at", RetentionExpiresAt); + writer.WriteIntValue("retention_period_minutes", RetentionPeriodMinutes); + writer.WriteObjectValue("runtime_constraints", RuntimeConstraints); + writer.WriteStringValue("start_url", StartUrl); + writer.WriteEnumValue("state", State); + writer.WriteStringValue("stop_url", StopUrl); + writer.WriteDateTimeOffsetValue("updated_at", UpdatedAt); + writer.WriteStringValue("url", Url); + writer.WriteStringValue("web_url", WebUrl); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/Codespace503Error.cs b/src/Ayllu.Github.Client/Github/Client/Models/Codespace503Error.cs new file mode 100644 index 0000000..f2a2d3f --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/Codespace503Error.cs @@ -0,0 +1,88 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class Codespace503Error : ApiException, IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The code property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Code { get; set; } +#nullable restore +#else + public string Code { get; set; } +#endif + /// The documentation_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? DocumentationUrl { get; set; } +#nullable restore +#else + public string DocumentationUrl { get; set; } +#endif + /// The primary error message. + public override string Message { get => MessageEscaped ?? string.Empty; } + /// The message property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? MessageEscaped { get; set; } +#nullable restore +#else + public string MessageEscaped { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public Codespace503Error() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.Codespace503Error CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.Codespace503Error(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "code", n => { Code = n.GetStringValue(); } }, + { "documentation_url", n => { DocumentationUrl = n.GetStringValue(); } }, + { "message", n => { MessageEscaped = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("code", Code); + writer.WriteStringValue("documentation_url", DocumentationUrl); + writer.WriteStringValue("message", MessageEscaped); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/CodespaceExportDetails.cs b/src/Ayllu.Github.Client/Github/Client/Models/CodespaceExportDetails.cs new file mode 100644 index 0000000..b266134 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/CodespaceExportDetails.cs @@ -0,0 +1,120 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + /// + /// An export of a codespace. Also, latest export details for a codespace can be fetched with id = latest + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class CodespaceExportDetails : IAdditionalDataHolder, IParsable + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// Name of the exported branch +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Branch { get; set; } +#nullable restore +#else + public string Branch { get; set; } +#endif + /// Completion time of the last export operation + public DateTimeOffset? CompletedAt { get; set; } + /// Url for fetching export details +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? ExportUrl { get; set; } +#nullable restore +#else + public string ExportUrl { get; set; } +#endif + /// Web url for the exported branch +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? HtmlUrl { get; set; } +#nullable restore +#else + public string HtmlUrl { get; set; } +#endif + /// Id for the export details +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Id { get; set; } +#nullable restore +#else + public string Id { get; set; } +#endif + /// Git commit SHA of the exported branch +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Sha { get; set; } +#nullable restore +#else + public string Sha { get; set; } +#endif + /// State of the latest export +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? State { get; set; } +#nullable restore +#else + public string State { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public CodespaceExportDetails() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.CodespaceExportDetails CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.CodespaceExportDetails(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "branch", n => { Branch = n.GetStringValue(); } }, + { "completed_at", n => { CompletedAt = n.GetDateTimeOffsetValue(); } }, + { "export_url", n => { ExportUrl = n.GetStringValue(); } }, + { "html_url", n => { HtmlUrl = n.GetStringValue(); } }, + { "id", n => { Id = n.GetStringValue(); } }, + { "sha", n => { Sha = n.GetStringValue(); } }, + { "state", n => { State = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("branch", Branch); + writer.WriteDateTimeOffsetValue("completed_at", CompletedAt); + writer.WriteStringValue("export_url", ExportUrl); + writer.WriteStringValue("html_url", HtmlUrl); + writer.WriteStringValue("id", Id); + writer.WriteStringValue("sha", Sha); + writer.WriteStringValue("state", State); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/CodespaceMachine.cs b/src/Ayllu.Github.Client/Github/Client/Models/CodespaceMachine.cs new file mode 100644 index 0000000..5ec2243 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/CodespaceMachine.cs @@ -0,0 +1,102 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + /// + /// A description of the machine powering a codespace. + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class CodespaceMachine : IAdditionalDataHolder, IParsable + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// How many cores are available to the codespace. + public int? Cpus { get; set; } + /// The display name of the machine includes cores, memory, and storage. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? DisplayName { get; set; } +#nullable restore +#else + public string DisplayName { get; set; } +#endif + /// How much memory is available to the codespace. + public int? MemoryInBytes { get; set; } + /// The name of the machine. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Name { get; set; } +#nullable restore +#else + public string Name { get; set; } +#endif + /// The operating system of the machine. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? OperatingSystem { get; set; } +#nullable restore +#else + public string OperatingSystem { get; set; } +#endif + /// 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. + public global::Ayllu.Github.Client.Models.CodespaceMachine_prebuild_availability? PrebuildAvailability { get; set; } + /// How much storage is available to the codespace. + public int? StorageInBytes { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public CodespaceMachine() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.CodespaceMachine CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.CodespaceMachine(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "cpus", n => { Cpus = n.GetIntValue(); } }, + { "display_name", n => { DisplayName = n.GetStringValue(); } }, + { "memory_in_bytes", n => { MemoryInBytes = n.GetIntValue(); } }, + { "name", n => { Name = n.GetStringValue(); } }, + { "operating_system", n => { OperatingSystem = n.GetStringValue(); } }, + { "prebuild_availability", n => { PrebuildAvailability = n.GetEnumValue(); } }, + { "storage_in_bytes", n => { StorageInBytes = n.GetIntValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteIntValue("cpus", Cpus); + writer.WriteStringValue("display_name", DisplayName); + writer.WriteIntValue("memory_in_bytes", MemoryInBytes); + writer.WriteStringValue("name", Name); + writer.WriteStringValue("operating_system", OperatingSystem); + writer.WriteEnumValue("prebuild_availability", PrebuildAvailability); + writer.WriteIntValue("storage_in_bytes", StorageInBytes); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/CodespaceMachine_prebuild_availability.cs b/src/Ayllu.Github.Client/Github/Client/Models/CodespaceMachine_prebuild_availability.cs new file mode 100644 index 0000000..706babc --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/CodespaceMachine_prebuild_availability.cs @@ -0,0 +1,23 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Models +{ + /// 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. + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public enum CodespaceMachine_prebuild_availability + { + [EnumMember(Value = "none")] + #pragma warning disable CS1591 + None, + #pragma warning restore CS1591 + [EnumMember(Value = "ready")] + #pragma warning disable CS1591 + Ready, + #pragma warning restore CS1591 + [EnumMember(Value = "in_progress")] + #pragma warning disable CS1591 + In_progress, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Models/CodespaceWithFullRepository.cs b/src/Ayllu.Github.Client/Github/Client/Models/CodespaceWithFullRepository.cs new file mode 100644 index 0000000..e3167b9 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/CodespaceWithFullRepository.cs @@ -0,0 +1,300 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + /// + /// A codespace. + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class CodespaceWithFullRepository : IAdditionalDataHolder, IParsable + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// A GitHub user. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.SimpleUser? BillableOwner { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.SimpleUser BillableOwner { get; set; } +#endif + /// The created_at property + public DateTimeOffset? CreatedAt { get; set; } + /// Path to devcontainer.json from repo root used to create Codespace. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? DevcontainerPath { get; set; } +#nullable restore +#else + public string DevcontainerPath { get; set; } +#endif + /// Display name for this codespace. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? DisplayName { get; set; } +#nullable restore +#else + public string DisplayName { get; set; } +#endif + /// UUID identifying this codespace's environment. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? EnvironmentId { get; set; } +#nullable restore +#else + public string EnvironmentId { get; set; } +#endif + /// Details about the codespace's git repository. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.CodespaceWithFullRepository_git_status? GitStatus { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.CodespaceWithFullRepository_git_status GitStatus { get; set; } +#endif + /// The id property + public long? Id { get; set; } + /// The number of minutes of inactivity after which this codespace will be automatically stopped. + public int? IdleTimeoutMinutes { get; set; } + /// Text to show user when codespace idle timeout minutes has been overriden by an organization policy +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? IdleTimeoutNotice { get; set; } +#nullable restore +#else + public string IdleTimeoutNotice { get; set; } +#endif + /// Last known time this codespace was started. + public DateTimeOffset? LastUsedAt { get; set; } + /// The initally assigned location of a new codespace. + public global::Ayllu.Github.Client.Models.CodespaceWithFullRepository_location? Location { get; set; } + /// A description of the machine powering a codespace. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.NullableCodespaceMachine? Machine { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.NullableCodespaceMachine Machine { get; set; } +#endif + /// API URL to access available alternate machine types for this codespace. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? MachinesUrl { get; set; } +#nullable restore +#else + public string MachinesUrl { get; set; } +#endif + /// Automatically generated name of this codespace. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Name { get; set; } +#nullable restore +#else + public string Name { get; set; } +#endif + /// A GitHub user. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.SimpleUser? Owner { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.SimpleUser Owner { get; set; } +#endif + /// 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. + public bool? PendingOperation { get; set; } + /// Text to show user when codespace is disabled by a pending operation +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? PendingOperationDisabledReason { get; set; } +#nullable restore +#else + public string PendingOperationDisabledReason { get; set; } +#endif + /// Whether the codespace was created from a prebuild. + public bool? Prebuild { get; set; } + /// API URL to publish this codespace to a new repository. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? PublishUrl { get; set; } +#nullable restore +#else + public string PublishUrl { get; set; } +#endif + /// API URL for the Pull Request associated with this codespace, if any. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? PullsUrl { get; set; } +#nullable restore +#else + public string PullsUrl { get; set; } +#endif + /// The recent_folders property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? RecentFolders { get; set; } +#nullable restore +#else + public List RecentFolders { get; set; } +#endif + /// Full Repository +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.FullRepository? Repository { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.FullRepository Repository { get; set; } +#endif + /// When a codespace will be auto-deleted based on the "retention_period_minutes" and "last_used_at" + public DateTimeOffset? RetentionExpiresAt { get; set; } + /// Duration in minutes after codespace has gone idle in which it will be deleted. Must be integer minutes between 0 and 43200 (30 days). + public int? RetentionPeriodMinutes { get; set; } + /// The runtime_constraints property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.CodespaceWithFullRepository_runtime_constraints? RuntimeConstraints { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.CodespaceWithFullRepository_runtime_constraints RuntimeConstraints { get; set; } +#endif + /// API URL to start this codespace. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? StartUrl { get; set; } +#nullable restore +#else + public string StartUrl { get; set; } +#endif + /// State of this codespace. + public global::Ayllu.Github.Client.Models.CodespaceWithFullRepository_state? State { get; set; } + /// API URL to stop this codespace. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? StopUrl { get; set; } +#nullable restore +#else + public string StopUrl { get; set; } +#endif + /// The updated_at property + public DateTimeOffset? UpdatedAt { get; set; } + /// API URL for this codespace. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Url { get; set; } +#nullable restore +#else + public string Url { get; set; } +#endif + /// URL to access this codespace on the web. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? WebUrl { get; set; } +#nullable restore +#else + public string WebUrl { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public CodespaceWithFullRepository() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.CodespaceWithFullRepository CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.CodespaceWithFullRepository(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "billable_owner", n => { BillableOwner = n.GetObjectValue(global::Ayllu.Github.Client.Models.SimpleUser.CreateFromDiscriminatorValue); } }, + { "created_at", n => { CreatedAt = n.GetDateTimeOffsetValue(); } }, + { "devcontainer_path", n => { DevcontainerPath = n.GetStringValue(); } }, + { "display_name", n => { DisplayName = n.GetStringValue(); } }, + { "environment_id", n => { EnvironmentId = n.GetStringValue(); } }, + { "git_status", n => { GitStatus = n.GetObjectValue(global::Ayllu.Github.Client.Models.CodespaceWithFullRepository_git_status.CreateFromDiscriminatorValue); } }, + { "id", n => { Id = n.GetLongValue(); } }, + { "idle_timeout_minutes", n => { IdleTimeoutMinutes = n.GetIntValue(); } }, + { "idle_timeout_notice", n => { IdleTimeoutNotice = n.GetStringValue(); } }, + { "last_used_at", n => { LastUsedAt = n.GetDateTimeOffsetValue(); } }, + { "location", n => { Location = n.GetEnumValue(); } }, + { "machine", n => { Machine = n.GetObjectValue(global::Ayllu.Github.Client.Models.NullableCodespaceMachine.CreateFromDiscriminatorValue); } }, + { "machines_url", n => { MachinesUrl = n.GetStringValue(); } }, + { "name", n => { Name = n.GetStringValue(); } }, + { "owner", n => { Owner = n.GetObjectValue(global::Ayllu.Github.Client.Models.SimpleUser.CreateFromDiscriminatorValue); } }, + { "pending_operation", n => { PendingOperation = n.GetBoolValue(); } }, + { "pending_operation_disabled_reason", n => { PendingOperationDisabledReason = n.GetStringValue(); } }, + { "prebuild", n => { Prebuild = n.GetBoolValue(); } }, + { "publish_url", n => { PublishUrl = n.GetStringValue(); } }, + { "pulls_url", n => { PullsUrl = n.GetStringValue(); } }, + { "recent_folders", n => { RecentFolders = n.GetCollectionOfPrimitiveValues()?.AsList(); } }, + { "repository", n => { Repository = n.GetObjectValue(global::Ayllu.Github.Client.Models.FullRepository.CreateFromDiscriminatorValue); } }, + { "retention_expires_at", n => { RetentionExpiresAt = n.GetDateTimeOffsetValue(); } }, + { "retention_period_minutes", n => { RetentionPeriodMinutes = n.GetIntValue(); } }, + { "runtime_constraints", n => { RuntimeConstraints = n.GetObjectValue(global::Ayllu.Github.Client.Models.CodespaceWithFullRepository_runtime_constraints.CreateFromDiscriminatorValue); } }, + { "start_url", n => { StartUrl = n.GetStringValue(); } }, + { "state", n => { State = n.GetEnumValue(); } }, + { "stop_url", n => { StopUrl = n.GetStringValue(); } }, + { "updated_at", n => { UpdatedAt = n.GetDateTimeOffsetValue(); } }, + { "url", n => { Url = n.GetStringValue(); } }, + { "web_url", n => { WebUrl = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteObjectValue("billable_owner", BillableOwner); + writer.WriteDateTimeOffsetValue("created_at", CreatedAt); + writer.WriteStringValue("devcontainer_path", DevcontainerPath); + writer.WriteStringValue("display_name", DisplayName); + writer.WriteStringValue("environment_id", EnvironmentId); + writer.WriteObjectValue("git_status", GitStatus); + writer.WriteLongValue("id", Id); + writer.WriteIntValue("idle_timeout_minutes", IdleTimeoutMinutes); + writer.WriteStringValue("idle_timeout_notice", IdleTimeoutNotice); + writer.WriteDateTimeOffsetValue("last_used_at", LastUsedAt); + writer.WriteEnumValue("location", Location); + writer.WriteObjectValue("machine", Machine); + writer.WriteStringValue("machines_url", MachinesUrl); + writer.WriteStringValue("name", Name); + writer.WriteObjectValue("owner", Owner); + writer.WriteBoolValue("pending_operation", PendingOperation); + writer.WriteStringValue("pending_operation_disabled_reason", PendingOperationDisabledReason); + writer.WriteBoolValue("prebuild", Prebuild); + writer.WriteStringValue("publish_url", PublishUrl); + writer.WriteStringValue("pulls_url", PullsUrl); + writer.WriteCollectionOfPrimitiveValues("recent_folders", RecentFolders); + writer.WriteObjectValue("repository", Repository); + writer.WriteDateTimeOffsetValue("retention_expires_at", RetentionExpiresAt); + writer.WriteIntValue("retention_period_minutes", RetentionPeriodMinutes); + writer.WriteObjectValue("runtime_constraints", RuntimeConstraints); + writer.WriteStringValue("start_url", StartUrl); + writer.WriteEnumValue("state", State); + writer.WriteStringValue("stop_url", StopUrl); + writer.WriteDateTimeOffsetValue("updated_at", UpdatedAt); + writer.WriteStringValue("url", Url); + writer.WriteStringValue("web_url", WebUrl); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/CodespaceWithFullRepository_git_status.cs b/src/Ayllu.Github.Client/Github/Client/Models/CodespaceWithFullRepository_git_status.cs new file mode 100644 index 0000000..0432b32 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/CodespaceWithFullRepository_git_status.cs @@ -0,0 +1,82 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + /// + /// Details about the codespace's git repository. + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class CodespaceWithFullRepository_git_status : IAdditionalDataHolder, IParsable + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The number of commits the local repository is ahead of the remote. + public int? Ahead { get; set; } + /// The number of commits the local repository is behind the remote. + public int? Behind { get; set; } + /// Whether the local repository has uncommitted changes. + public bool? HasUncommittedChanges { get; set; } + /// Whether the local repository has unpushed changes. + public bool? HasUnpushedChanges { get; set; } + /// The current branch (or SHA if in detached HEAD state) of the local repository. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Ref { get; set; } +#nullable restore +#else + public string Ref { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public CodespaceWithFullRepository_git_status() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.CodespaceWithFullRepository_git_status CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.CodespaceWithFullRepository_git_status(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "ahead", n => { Ahead = n.GetIntValue(); } }, + { "behind", n => { Behind = n.GetIntValue(); } }, + { "has_uncommitted_changes", n => { HasUncommittedChanges = n.GetBoolValue(); } }, + { "has_unpushed_changes", n => { HasUnpushedChanges = n.GetBoolValue(); } }, + { "ref", n => { Ref = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteIntValue("ahead", Ahead); + writer.WriteIntValue("behind", Behind); + writer.WriteBoolValue("has_uncommitted_changes", HasUncommittedChanges); + writer.WriteBoolValue("has_unpushed_changes", HasUnpushedChanges); + writer.WriteStringValue("ref", Ref); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/CodespaceWithFullRepository_location.cs b/src/Ayllu.Github.Client/Github/Client/Models/CodespaceWithFullRepository_location.cs new file mode 100644 index 0000000..5011f8a --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/CodespaceWithFullRepository_location.cs @@ -0,0 +1,27 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Models +{ + /// The initally assigned location of a new codespace. + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public enum CodespaceWithFullRepository_location + { + [EnumMember(Value = "EastUs")] + #pragma warning disable CS1591 + EastUs, + #pragma warning restore CS1591 + [EnumMember(Value = "SouthEastAsia")] + #pragma warning disable CS1591 + SouthEastAsia, + #pragma warning restore CS1591 + [EnumMember(Value = "WestEurope")] + #pragma warning disable CS1591 + WestEurope, + #pragma warning restore CS1591 + [EnumMember(Value = "WestUs2")] + #pragma warning disable CS1591 + WestUs2, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Models/CodespaceWithFullRepository_runtime_constraints.cs b/src/Ayllu.Github.Client/Github/Client/Models/CodespaceWithFullRepository_runtime_constraints.cs new file mode 100644 index 0000000..1f04f2e --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/CodespaceWithFullRepository_runtime_constraints.cs @@ -0,0 +1,65 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class CodespaceWithFullRepository_runtime_constraints : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The privacy settings a user can select from when forwarding a port. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? AllowedPortPrivacySettings { get; set; } +#nullable restore +#else + public List AllowedPortPrivacySettings { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public CodespaceWithFullRepository_runtime_constraints() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.CodespaceWithFullRepository_runtime_constraints CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.CodespaceWithFullRepository_runtime_constraints(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "allowed_port_privacy_settings", n => { AllowedPortPrivacySettings = n.GetCollectionOfPrimitiveValues()?.AsList(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteCollectionOfPrimitiveValues("allowed_port_privacy_settings", AllowedPortPrivacySettings); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/CodespaceWithFullRepository_state.cs b/src/Ayllu.Github.Client/Github/Client/Models/CodespaceWithFullRepository_state.cs new file mode 100644 index 0000000..ebeef2b --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/CodespaceWithFullRepository_state.cs @@ -0,0 +1,79 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Models +{ + /// State of this codespace. + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public enum CodespaceWithFullRepository_state + { + [EnumMember(Value = "Unknown")] + #pragma warning disable CS1591 + Unknown, + #pragma warning restore CS1591 + [EnumMember(Value = "Created")] + #pragma warning disable CS1591 + Created, + #pragma warning restore CS1591 + [EnumMember(Value = "Queued")] + #pragma warning disable CS1591 + Queued, + #pragma warning restore CS1591 + [EnumMember(Value = "Provisioning")] + #pragma warning disable CS1591 + Provisioning, + #pragma warning restore CS1591 + [EnumMember(Value = "Available")] + #pragma warning disable CS1591 + Available, + #pragma warning restore CS1591 + [EnumMember(Value = "Awaiting")] + #pragma warning disable CS1591 + Awaiting, + #pragma warning restore CS1591 + [EnumMember(Value = "Unavailable")] + #pragma warning disable CS1591 + Unavailable, + #pragma warning restore CS1591 + [EnumMember(Value = "Deleted")] + #pragma warning disable CS1591 + Deleted, + #pragma warning restore CS1591 + [EnumMember(Value = "Moved")] + #pragma warning disable CS1591 + Moved, + #pragma warning restore CS1591 + [EnumMember(Value = "Shutdown")] + #pragma warning disable CS1591 + Shutdown, + #pragma warning restore CS1591 + [EnumMember(Value = "Archived")] + #pragma warning disable CS1591 + Archived, + #pragma warning restore CS1591 + [EnumMember(Value = "Starting")] + #pragma warning disable CS1591 + Starting, + #pragma warning restore CS1591 + [EnumMember(Value = "ShuttingDown")] + #pragma warning disable CS1591 + ShuttingDown, + #pragma warning restore CS1591 + [EnumMember(Value = "Failed")] + #pragma warning disable CS1591 + Failed, + #pragma warning restore CS1591 + [EnumMember(Value = "Exporting")] + #pragma warning disable CS1591 + Exporting, + #pragma warning restore CS1591 + [EnumMember(Value = "Updating")] + #pragma warning disable CS1591 + Updating, + #pragma warning restore CS1591 + [EnumMember(Value = "Rebuilding")] + #pragma warning disable CS1591 + Rebuilding, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Models/Codespace_git_status.cs b/src/Ayllu.Github.Client/Github/Client/Models/Codespace_git_status.cs new file mode 100644 index 0000000..a3dffa3 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/Codespace_git_status.cs @@ -0,0 +1,82 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + /// + /// Details about the codespace's git repository. + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class Codespace_git_status : IAdditionalDataHolder, IParsable + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The number of commits the local repository is ahead of the remote. + public int? Ahead { get; set; } + /// The number of commits the local repository is behind the remote. + public int? Behind { get; set; } + /// Whether the local repository has uncommitted changes. + public bool? HasUncommittedChanges { get; set; } + /// Whether the local repository has unpushed changes. + public bool? HasUnpushedChanges { get; set; } + /// The current branch (or SHA if in detached HEAD state) of the local repository. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Ref { get; set; } +#nullable restore +#else + public string Ref { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public Codespace_git_status() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.Codespace_git_status CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.Codespace_git_status(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "ahead", n => { Ahead = n.GetIntValue(); } }, + { "behind", n => { Behind = n.GetIntValue(); } }, + { "has_uncommitted_changes", n => { HasUncommittedChanges = n.GetBoolValue(); } }, + { "has_unpushed_changes", n => { HasUnpushedChanges = n.GetBoolValue(); } }, + { "ref", n => { Ref = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteIntValue("ahead", Ahead); + writer.WriteIntValue("behind", Behind); + writer.WriteBoolValue("has_uncommitted_changes", HasUncommittedChanges); + writer.WriteBoolValue("has_unpushed_changes", HasUnpushedChanges); + writer.WriteStringValue("ref", Ref); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/Codespace_location.cs b/src/Ayllu.Github.Client/Github/Client/Models/Codespace_location.cs new file mode 100644 index 0000000..dd9ef89 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/Codespace_location.cs @@ -0,0 +1,27 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Models +{ + /// The initally assigned location of a new codespace. + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public enum Codespace_location + { + [EnumMember(Value = "EastUs")] + #pragma warning disable CS1591 + EastUs, + #pragma warning restore CS1591 + [EnumMember(Value = "SouthEastAsia")] + #pragma warning disable CS1591 + SouthEastAsia, + #pragma warning restore CS1591 + [EnumMember(Value = "WestEurope")] + #pragma warning disable CS1591 + WestEurope, + #pragma warning restore CS1591 + [EnumMember(Value = "WestUs2")] + #pragma warning disable CS1591 + WestUs2, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Models/Codespace_runtime_constraints.cs b/src/Ayllu.Github.Client/Github/Client/Models/Codespace_runtime_constraints.cs new file mode 100644 index 0000000..2df43ab --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/Codespace_runtime_constraints.cs @@ -0,0 +1,65 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class Codespace_runtime_constraints : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The privacy settings a user can select from when forwarding a port. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? AllowedPortPrivacySettings { get; set; } +#nullable restore +#else + public List AllowedPortPrivacySettings { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public Codespace_runtime_constraints() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.Codespace_runtime_constraints CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.Codespace_runtime_constraints(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "allowed_port_privacy_settings", n => { AllowedPortPrivacySettings = n.GetCollectionOfPrimitiveValues()?.AsList(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteCollectionOfPrimitiveValues("allowed_port_privacy_settings", AllowedPortPrivacySettings); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/Codespace_state.cs b/src/Ayllu.Github.Client/Github/Client/Models/Codespace_state.cs new file mode 100644 index 0000000..15621a5 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/Codespace_state.cs @@ -0,0 +1,79 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Models +{ + /// State of this codespace. + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public enum Codespace_state + { + [EnumMember(Value = "Unknown")] + #pragma warning disable CS1591 + Unknown, + #pragma warning restore CS1591 + [EnumMember(Value = "Created")] + #pragma warning disable CS1591 + Created, + #pragma warning restore CS1591 + [EnumMember(Value = "Queued")] + #pragma warning disable CS1591 + Queued, + #pragma warning restore CS1591 + [EnumMember(Value = "Provisioning")] + #pragma warning disable CS1591 + Provisioning, + #pragma warning restore CS1591 + [EnumMember(Value = "Available")] + #pragma warning disable CS1591 + Available, + #pragma warning restore CS1591 + [EnumMember(Value = "Awaiting")] + #pragma warning disable CS1591 + Awaiting, + #pragma warning restore CS1591 + [EnumMember(Value = "Unavailable")] + #pragma warning disable CS1591 + Unavailable, + #pragma warning restore CS1591 + [EnumMember(Value = "Deleted")] + #pragma warning disable CS1591 + Deleted, + #pragma warning restore CS1591 + [EnumMember(Value = "Moved")] + #pragma warning disable CS1591 + Moved, + #pragma warning restore CS1591 + [EnumMember(Value = "Shutdown")] + #pragma warning disable CS1591 + Shutdown, + #pragma warning restore CS1591 + [EnumMember(Value = "Archived")] + #pragma warning disable CS1591 + Archived, + #pragma warning restore CS1591 + [EnumMember(Value = "Starting")] + #pragma warning disable CS1591 + Starting, + #pragma warning restore CS1591 + [EnumMember(Value = "ShuttingDown")] + #pragma warning disable CS1591 + ShuttingDown, + #pragma warning restore CS1591 + [EnumMember(Value = "Failed")] + #pragma warning disable CS1591 + Failed, + #pragma warning restore CS1591 + [EnumMember(Value = "Exporting")] + #pragma warning disable CS1591 + Exporting, + #pragma warning restore CS1591 + [EnumMember(Value = "Updating")] + #pragma warning disable CS1591 + Updating, + #pragma warning restore CS1591 + [EnumMember(Value = "Rebuilding")] + #pragma warning disable CS1591 + Rebuilding, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Models/CodespacesOrgSecret.cs b/src/Ayllu.Github.Client/Github/Client/Models/CodespacesOrgSecret.cs new file mode 100644 index 0000000..1222f92 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/CodespacesOrgSecret.cs @@ -0,0 +1,88 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + /// + /// Secrets for a GitHub Codespace. + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class CodespacesOrgSecret : IAdditionalDataHolder, IParsable + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The date and time at which the secret was created, in ISO 8601 format':' YYYY-MM-DDTHH:MM:SSZ. + public DateTimeOffset? CreatedAt { get; set; } + /// The name of the secret +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Name { get; set; } +#nullable restore +#else + public string Name { get; set; } +#endif + /// The API URL at which the list of repositories this secret is visible to can be retrieved +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? SelectedRepositoriesUrl { get; set; } +#nullable restore +#else + public string SelectedRepositoriesUrl { get; set; } +#endif + /// The date and time at which the secret was created, in ISO 8601 format':' YYYY-MM-DDTHH:MM:SSZ. + public DateTimeOffset? UpdatedAt { get; set; } + /// The type of repositories in the organization that the secret is visible to + public global::Ayllu.Github.Client.Models.CodespacesOrgSecret_visibility? Visibility { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public CodespacesOrgSecret() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.CodespacesOrgSecret CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.CodespacesOrgSecret(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "created_at", n => { CreatedAt = n.GetDateTimeOffsetValue(); } }, + { "name", n => { Name = n.GetStringValue(); } }, + { "selected_repositories_url", n => { SelectedRepositoriesUrl = n.GetStringValue(); } }, + { "updated_at", n => { UpdatedAt = n.GetDateTimeOffsetValue(); } }, + { "visibility", n => { Visibility = n.GetEnumValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteDateTimeOffsetValue("created_at", CreatedAt); + writer.WriteStringValue("name", Name); + writer.WriteStringValue("selected_repositories_url", SelectedRepositoriesUrl); + writer.WriteDateTimeOffsetValue("updated_at", UpdatedAt); + writer.WriteEnumValue("visibility", Visibility); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/CodespacesOrgSecret_visibility.cs b/src/Ayllu.Github.Client/Github/Client/Models/CodespacesOrgSecret_visibility.cs new file mode 100644 index 0000000..85b0171 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/CodespacesOrgSecret_visibility.cs @@ -0,0 +1,23 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Models +{ + /// The type of repositories in the organization that the secret is visible to + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public enum CodespacesOrgSecret_visibility + { + [EnumMember(Value = "all")] + #pragma warning disable CS1591 + All, + #pragma warning restore CS1591 + [EnumMember(Value = "private")] + #pragma warning disable CS1591 + Private, + #pragma warning restore CS1591 + [EnumMember(Value = "selected")] + #pragma warning disable CS1591 + Selected, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Models/CodespacesPermissionsCheckForDevcontainer.cs b/src/Ayllu.Github.Client/Github/Client/Models/CodespacesPermissionsCheckForDevcontainer.cs new file mode 100644 index 0000000..e1e96f3 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/CodespacesPermissionsCheckForDevcontainer.cs @@ -0,0 +1,60 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + /// + /// Permission check result for a given devcontainer config. + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class CodespacesPermissionsCheckForDevcontainer : IAdditionalDataHolder, IParsable + { + /// Whether the user has accepted the permissions defined by the devcontainer config + public bool? Accepted { get; set; } + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public CodespacesPermissionsCheckForDevcontainer() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.CodespacesPermissionsCheckForDevcontainer CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.CodespacesPermissionsCheckForDevcontainer(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "accepted", n => { Accepted = n.GetBoolValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteBoolValue("accepted", Accepted); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/CodespacesPermissionsCheckForDevcontainer503Error.cs b/src/Ayllu.Github.Client/Github/Client/Models/CodespacesPermissionsCheckForDevcontainer503Error.cs new file mode 100644 index 0000000..51d751b --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/CodespacesPermissionsCheckForDevcontainer503Error.cs @@ -0,0 +1,88 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class CodespacesPermissionsCheckForDevcontainer503Error : ApiException, IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The code property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Code { get; set; } +#nullable restore +#else + public string Code { get; set; } +#endif + /// The documentation_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? DocumentationUrl { get; set; } +#nullable restore +#else + public string DocumentationUrl { get; set; } +#endif + /// The primary error message. + public override string Message { get => MessageEscaped ?? string.Empty; } + /// The message property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? MessageEscaped { get; set; } +#nullable restore +#else + public string MessageEscaped { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public CodespacesPermissionsCheckForDevcontainer503Error() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.CodespacesPermissionsCheckForDevcontainer503Error CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.CodespacesPermissionsCheckForDevcontainer503Error(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "code", n => { Code = n.GetStringValue(); } }, + { "documentation_url", n => { DocumentationUrl = n.GetStringValue(); } }, + { "message", n => { MessageEscaped = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("code", Code); + writer.WriteStringValue("documentation_url", DocumentationUrl); + writer.WriteStringValue("message", MessageEscaped); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/CodespacesPublicKey.cs b/src/Ayllu.Github.Client/Github/Client/Models/CodespacesPublicKey.cs new file mode 100644 index 0000000..b845cdc --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/CodespacesPublicKey.cs @@ -0,0 +1,110 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + /// + /// The public key used for setting Codespaces secrets. + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class CodespacesPublicKey : IAdditionalDataHolder, IParsable + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The created_at property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? CreatedAt { get; set; } +#nullable restore +#else + public string CreatedAt { get; set; } +#endif + /// The id property + public int? Id { get; set; } + /// The Base64 encoded public key. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Key { get; set; } +#nullable restore +#else + public string Key { get; set; } +#endif + /// The identifier for the key. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? KeyId { get; set; } +#nullable restore +#else + public string KeyId { get; set; } +#endif + /// The title property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Title { get; set; } +#nullable restore +#else + public string Title { get; set; } +#endif + /// The url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Url { get; set; } +#nullable restore +#else + public string Url { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public CodespacesPublicKey() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.CodespacesPublicKey CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.CodespacesPublicKey(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "created_at", n => { CreatedAt = n.GetStringValue(); } }, + { "id", n => { Id = n.GetIntValue(); } }, + { "key", n => { Key = n.GetStringValue(); } }, + { "key_id", n => { KeyId = n.GetStringValue(); } }, + { "title", n => { Title = n.GetStringValue(); } }, + { "url", n => { Url = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("created_at", CreatedAt); + writer.WriteIntValue("id", Id); + writer.WriteStringValue("key", Key); + writer.WriteStringValue("key_id", KeyId); + writer.WriteStringValue("title", Title); + writer.WriteStringValue("url", Url); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/CodespacesSecret.cs b/src/Ayllu.Github.Client/Github/Client/Models/CodespacesSecret.cs new file mode 100644 index 0000000..2cb631d --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/CodespacesSecret.cs @@ -0,0 +1,88 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + /// + /// Secrets for a GitHub Codespace. + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class CodespacesSecret : IAdditionalDataHolder, IParsable + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The date and time at which the secret was created, in ISO 8601 format':' YYYY-MM-DDTHH:MM:SSZ. + public DateTimeOffset? CreatedAt { get; set; } + /// The name of the secret +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Name { get; set; } +#nullable restore +#else + public string Name { get; set; } +#endif + /// The API URL at which the list of repositories this secret is visible to can be retrieved +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? SelectedRepositoriesUrl { get; set; } +#nullable restore +#else + public string SelectedRepositoriesUrl { get; set; } +#endif + /// The date and time at which the secret was last updated, in ISO 8601 format':' YYYY-MM-DDTHH:MM:SSZ. + public DateTimeOffset? UpdatedAt { get; set; } + /// The type of repositories in the organization that the secret is visible to + public global::Ayllu.Github.Client.Models.CodespacesSecret_visibility? Visibility { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public CodespacesSecret() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.CodespacesSecret CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.CodespacesSecret(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "created_at", n => { CreatedAt = n.GetDateTimeOffsetValue(); } }, + { "name", n => { Name = n.GetStringValue(); } }, + { "selected_repositories_url", n => { SelectedRepositoriesUrl = n.GetStringValue(); } }, + { "updated_at", n => { UpdatedAt = n.GetDateTimeOffsetValue(); } }, + { "visibility", n => { Visibility = n.GetEnumValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteDateTimeOffsetValue("created_at", CreatedAt); + writer.WriteStringValue("name", Name); + writer.WriteStringValue("selected_repositories_url", SelectedRepositoriesUrl); + writer.WriteDateTimeOffsetValue("updated_at", UpdatedAt); + writer.WriteEnumValue("visibility", Visibility); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/CodespacesSecret_visibility.cs b/src/Ayllu.Github.Client/Github/Client/Models/CodespacesSecret_visibility.cs new file mode 100644 index 0000000..6dfb9ce --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/CodespacesSecret_visibility.cs @@ -0,0 +1,23 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Models +{ + /// The type of repositories in the organization that the secret is visible to + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public enum CodespacesSecret_visibility + { + [EnumMember(Value = "all")] + #pragma warning disable CS1591 + All, + #pragma warning restore CS1591 + [EnumMember(Value = "private")] + #pragma warning disable CS1591 + Private, + #pragma warning restore CS1591 + [EnumMember(Value = "selected")] + #pragma warning disable CS1591 + Selected, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Models/CodespacesUserPublicKey.cs b/src/Ayllu.Github.Client/Github/Client/Models/CodespacesUserPublicKey.cs new file mode 100644 index 0000000..33238af --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/CodespacesUserPublicKey.cs @@ -0,0 +1,76 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + /// + /// The public key used for setting user Codespaces' Secrets. + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class CodespacesUserPublicKey : IAdditionalDataHolder, IParsable + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The Base64 encoded public key. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Key { get; set; } +#nullable restore +#else + public string Key { get; set; } +#endif + /// The identifier for the key. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? KeyId { get; set; } +#nullable restore +#else + public string KeyId { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public CodespacesUserPublicKey() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.CodespacesUserPublicKey CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.CodespacesUserPublicKey(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "key", n => { Key = n.GetStringValue(); } }, + { "key_id", n => { KeyId = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("key", Key); + writer.WriteStringValue("key_id", KeyId); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/Collaborator.cs b/src/Ayllu.Github.Client/Github/Client/Models/Collaborator.cs new file mode 100644 index 0000000..5ac6611 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/Collaborator.cs @@ -0,0 +1,274 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + /// + /// Collaborator + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class Collaborator : IAdditionalDataHolder, IParsable + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The avatar_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? AvatarUrl { get; set; } +#nullable restore +#else + public string AvatarUrl { get; set; } +#endif + /// The email property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Email { get; set; } +#nullable restore +#else + public string Email { get; set; } +#endif + /// The events_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? EventsUrl { get; set; } +#nullable restore +#else + public string EventsUrl { get; set; } +#endif + /// The followers_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? FollowersUrl { get; set; } +#nullable restore +#else + public string FollowersUrl { get; set; } +#endif + /// The following_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? FollowingUrl { get; set; } +#nullable restore +#else + public string FollowingUrl { get; set; } +#endif + /// The gists_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? GistsUrl { get; set; } +#nullable restore +#else + public string GistsUrl { get; set; } +#endif + /// The gravatar_id property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? GravatarId { get; set; } +#nullable restore +#else + public string GravatarId { get; set; } +#endif + /// The html_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? HtmlUrl { get; set; } +#nullable restore +#else + public string HtmlUrl { get; set; } +#endif + /// The id property + public long? Id { get; set; } + /// The login property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Login { get; set; } +#nullable restore +#else + public string Login { get; set; } +#endif + /// The name property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Name { get; set; } +#nullable restore +#else + public string Name { get; set; } +#endif + /// The node_id property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? NodeId { get; set; } +#nullable restore +#else + public string NodeId { get; set; } +#endif + /// The organizations_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? OrganizationsUrl { get; set; } +#nullable restore +#else + public string OrganizationsUrl { get; set; } +#endif + /// The permissions property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.Collaborator_permissions? Permissions { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.Collaborator_permissions Permissions { get; set; } +#endif + /// The received_events_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? ReceivedEventsUrl { get; set; } +#nullable restore +#else + public string ReceivedEventsUrl { get; set; } +#endif + /// The repos_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? ReposUrl { get; set; } +#nullable restore +#else + public string ReposUrl { get; set; } +#endif + /// The role_name property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? RoleName { get; set; } +#nullable restore +#else + public string RoleName { get; set; } +#endif + /// The site_admin property + public bool? SiteAdmin { get; set; } + /// The starred_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? StarredUrl { get; set; } +#nullable restore +#else + public string StarredUrl { get; set; } +#endif + /// The subscriptions_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? SubscriptionsUrl { get; set; } +#nullable restore +#else + public string SubscriptionsUrl { get; set; } +#endif + /// The type property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Type { get; set; } +#nullable restore +#else + public string Type { get; set; } +#endif + /// The url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Url { get; set; } +#nullable restore +#else + public string Url { get; set; } +#endif + /// The user_view_type property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? UserViewType { get; set; } +#nullable restore +#else + public string UserViewType { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public Collaborator() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.Collaborator CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.Collaborator(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "avatar_url", n => { AvatarUrl = n.GetStringValue(); } }, + { "email", n => { Email = n.GetStringValue(); } }, + { "events_url", n => { EventsUrl = n.GetStringValue(); } }, + { "followers_url", n => { FollowersUrl = n.GetStringValue(); } }, + { "following_url", n => { FollowingUrl = n.GetStringValue(); } }, + { "gists_url", n => { GistsUrl = n.GetStringValue(); } }, + { "gravatar_id", n => { GravatarId = n.GetStringValue(); } }, + { "html_url", n => { HtmlUrl = n.GetStringValue(); } }, + { "id", n => { Id = n.GetLongValue(); } }, + { "login", n => { Login = n.GetStringValue(); } }, + { "name", n => { Name = n.GetStringValue(); } }, + { "node_id", n => { NodeId = n.GetStringValue(); } }, + { "organizations_url", n => { OrganizationsUrl = n.GetStringValue(); } }, + { "permissions", n => { Permissions = n.GetObjectValue(global::Ayllu.Github.Client.Models.Collaborator_permissions.CreateFromDiscriminatorValue); } }, + { "received_events_url", n => { ReceivedEventsUrl = n.GetStringValue(); } }, + { "repos_url", n => { ReposUrl = n.GetStringValue(); } }, + { "role_name", n => { RoleName = n.GetStringValue(); } }, + { "site_admin", n => { SiteAdmin = n.GetBoolValue(); } }, + { "starred_url", n => { StarredUrl = n.GetStringValue(); } }, + { "subscriptions_url", n => { SubscriptionsUrl = n.GetStringValue(); } }, + { "type", n => { Type = n.GetStringValue(); } }, + { "url", n => { Url = n.GetStringValue(); } }, + { "user_view_type", n => { UserViewType = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("avatar_url", AvatarUrl); + writer.WriteStringValue("email", Email); + writer.WriteStringValue("events_url", EventsUrl); + writer.WriteStringValue("followers_url", FollowersUrl); + writer.WriteStringValue("following_url", FollowingUrl); + writer.WriteStringValue("gists_url", GistsUrl); + writer.WriteStringValue("gravatar_id", GravatarId); + writer.WriteStringValue("html_url", HtmlUrl); + writer.WriteLongValue("id", Id); + writer.WriteStringValue("login", Login); + writer.WriteStringValue("name", Name); + writer.WriteStringValue("node_id", NodeId); + writer.WriteStringValue("organizations_url", OrganizationsUrl); + writer.WriteObjectValue("permissions", Permissions); + writer.WriteStringValue("received_events_url", ReceivedEventsUrl); + writer.WriteStringValue("repos_url", ReposUrl); + writer.WriteStringValue("role_name", RoleName); + writer.WriteBoolValue("site_admin", SiteAdmin); + writer.WriteStringValue("starred_url", StarredUrl); + writer.WriteStringValue("subscriptions_url", SubscriptionsUrl); + writer.WriteStringValue("type", Type); + writer.WriteStringValue("url", Url); + writer.WriteStringValue("user_view_type", UserViewType); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/Collaborator_permissions.cs b/src/Ayllu.Github.Client/Github/Client/Models/Collaborator_permissions.cs new file mode 100644 index 0000000..8dfcd81 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/Collaborator_permissions.cs @@ -0,0 +1,75 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class Collaborator_permissions : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The admin property + public bool? Admin { get; set; } + /// The maintain property + public bool? Maintain { get; set; } + /// The pull property + public bool? Pull { get; set; } + /// The push property + public bool? Push { get; set; } + /// The triage property + public bool? Triage { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public Collaborator_permissions() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.Collaborator_permissions CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.Collaborator_permissions(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "admin", n => { Admin = n.GetBoolValue(); } }, + { "maintain", n => { Maintain = n.GetBoolValue(); } }, + { "pull", n => { Pull = n.GetBoolValue(); } }, + { "push", n => { Push = n.GetBoolValue(); } }, + { "triage", n => { Triage = n.GetBoolValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteBoolValue("admin", Admin); + writer.WriteBoolValue("maintain", Maintain); + writer.WriteBoolValue("pull", Pull); + writer.WriteBoolValue("push", Push); + writer.WriteBoolValue("triage", Triage); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/CombinedBillingUsage.cs b/src/Ayllu.Github.Client/Github/Client/Models/CombinedBillingUsage.cs new file mode 100644 index 0000000..ae1a135 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/CombinedBillingUsage.cs @@ -0,0 +1,67 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class CombinedBillingUsage : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// Numbers of days left in billing cycle. + public int? DaysLeftInBillingCycle { get; set; } + /// Estimated storage space (GB) used in billing cycle. + public int? EstimatedPaidStorageForMonth { get; set; } + /// Estimated sum of free and paid storage space (GB) used in billing cycle. + public int? EstimatedStorageForMonth { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public CombinedBillingUsage() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.CombinedBillingUsage CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.CombinedBillingUsage(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "days_left_in_billing_cycle", n => { DaysLeftInBillingCycle = n.GetIntValue(); } }, + { "estimated_paid_storage_for_month", n => { EstimatedPaidStorageForMonth = n.GetIntValue(); } }, + { "estimated_storage_for_month", n => { EstimatedStorageForMonth = n.GetIntValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteIntValue("days_left_in_billing_cycle", DaysLeftInBillingCycle); + writer.WriteIntValue("estimated_paid_storage_for_month", EstimatedPaidStorageForMonth); + writer.WriteIntValue("estimated_storage_for_month", EstimatedStorageForMonth); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/CombinedCommitStatus.cs b/src/Ayllu.Github.Client/Github/Client/Models/CombinedCommitStatus.cs new file mode 100644 index 0000000..75a8324 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/CombinedCommitStatus.cs @@ -0,0 +1,120 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + /// + /// Combined Commit Status + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class CombinedCommitStatus : IAdditionalDataHolder, IParsable + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The commit_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? CommitUrl { get; set; } +#nullable restore +#else + public string CommitUrl { get; set; } +#endif + /// Minimal Repository +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.MinimalRepository? Repository { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.MinimalRepository Repository { get; set; } +#endif + /// The sha property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Sha { get; set; } +#nullable restore +#else + public string Sha { get; set; } +#endif + /// The state property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? State { get; set; } +#nullable restore +#else + public string State { get; set; } +#endif + /// The statuses property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? Statuses { get; set; } +#nullable restore +#else + public List Statuses { get; set; } +#endif + /// The total_count property + public int? TotalCount { get; set; } + /// The url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Url { get; set; } +#nullable restore +#else + public string Url { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public CombinedCommitStatus() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.CombinedCommitStatus CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.CombinedCommitStatus(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "commit_url", n => { CommitUrl = n.GetStringValue(); } }, + { "repository", n => { Repository = n.GetObjectValue(global::Ayllu.Github.Client.Models.MinimalRepository.CreateFromDiscriminatorValue); } }, + { "sha", n => { Sha = n.GetStringValue(); } }, + { "state", n => { State = n.GetStringValue(); } }, + { "statuses", n => { Statuses = n.GetCollectionOfObjectValues(global::Ayllu.Github.Client.Models.SimpleCommitStatus.CreateFromDiscriminatorValue)?.AsList(); } }, + { "total_count", n => { TotalCount = n.GetIntValue(); } }, + { "url", n => { Url = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("commit_url", CommitUrl); + writer.WriteObjectValue("repository", Repository); + writer.WriteStringValue("sha", Sha); + writer.WriteStringValue("state", State); + writer.WriteCollectionOfObjectValues("statuses", Statuses); + writer.WriteIntValue("total_count", TotalCount); + writer.WriteStringValue("url", Url); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/Commit.cs b/src/Ayllu.Github.Client/Github/Client/Models/Commit.cs new file mode 100644 index 0000000..7a27ab9 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/Commit.cs @@ -0,0 +1,316 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + /// + /// Commit + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class Commit : IAdditionalDataHolder, IParsable + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The author property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.Commit.Commit_author? Author { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.Commit.Commit_author Author { get; set; } +#endif + /// The comments_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? CommentsUrl { get; set; } +#nullable restore +#else + public string CommentsUrl { get; set; } +#endif + /// The commit property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.Commit_commit? CommitProp { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.Commit_commit CommitProp { get; set; } +#endif + /// The committer property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.Commit.Commit_committer? Committer { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.Commit.Commit_committer Committer { get; set; } +#endif + /// The files property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? Files { get; set; } +#nullable restore +#else + public List Files { get; set; } +#endif + /// The html_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? HtmlUrl { get; set; } +#nullable restore +#else + public string HtmlUrl { get; set; } +#endif + /// The node_id property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? NodeId { get; set; } +#nullable restore +#else + public string NodeId { get; set; } +#endif + /// The parents property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? Parents { get; set; } +#nullable restore +#else + public List Parents { get; set; } +#endif + /// The sha property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Sha { get; set; } +#nullable restore +#else + public string Sha { get; set; } +#endif + /// The stats property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.Commit_stats? Stats { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.Commit_stats Stats { get; set; } +#endif + /// The url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Url { get; set; } +#nullable restore +#else + public string Url { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public Commit() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.Commit CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.Commit(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "author", n => { Author = n.GetObjectValue(global::Ayllu.Github.Client.Models.Commit.Commit_author.CreateFromDiscriminatorValue); } }, + { "comments_url", n => { CommentsUrl = n.GetStringValue(); } }, + { "commit", n => { CommitProp = n.GetObjectValue(global::Ayllu.Github.Client.Models.Commit_commit.CreateFromDiscriminatorValue); } }, + { "committer", n => { Committer = n.GetObjectValue(global::Ayllu.Github.Client.Models.Commit.Commit_committer.CreateFromDiscriminatorValue); } }, + { "files", n => { Files = n.GetCollectionOfObjectValues(global::Ayllu.Github.Client.Models.DiffEntry.CreateFromDiscriminatorValue)?.AsList(); } }, + { "html_url", n => { HtmlUrl = n.GetStringValue(); } }, + { "node_id", n => { NodeId = n.GetStringValue(); } }, + { "parents", n => { Parents = n.GetCollectionOfObjectValues(global::Ayllu.Github.Client.Models.Commit_parents.CreateFromDiscriminatorValue)?.AsList(); } }, + { "sha", n => { Sha = n.GetStringValue(); } }, + { "stats", n => { Stats = n.GetObjectValue(global::Ayllu.Github.Client.Models.Commit_stats.CreateFromDiscriminatorValue); } }, + { "url", n => { Url = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteObjectValue("author", Author); + writer.WriteStringValue("comments_url", CommentsUrl); + writer.WriteObjectValue("commit", CommitProp); + writer.WriteObjectValue("committer", Committer); + writer.WriteCollectionOfObjectValues("files", Files); + writer.WriteStringValue("html_url", HtmlUrl); + writer.WriteStringValue("node_id", NodeId); + writer.WriteCollectionOfObjectValues("parents", Parents); + writer.WriteStringValue("sha", Sha); + writer.WriteObjectValue("stats", Stats); + writer.WriteStringValue("url", Url); + writer.WriteAdditionalData(AdditionalData); + } + /// + /// Composed type wrapper for classes , + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class Commit_author : IComposedTypeWrapper, IParsable + { + /// Composed type representation for type +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.EmptyObject? EmptyObject { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.EmptyObject EmptyObject { get; set; } +#endif + /// Composed type representation for type +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.SimpleUser? SimpleUser { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.SimpleUser SimpleUser { get; set; } +#endif + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.Commit.Commit_author CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + var mappingValue = parseNode.GetChildNode("")?.GetStringValue(); + var result = new global::Ayllu.Github.Client.Models.Commit.Commit_author(); + if("empty-object".Equals(mappingValue, StringComparison.OrdinalIgnoreCase)) + { + result.EmptyObject = new global::Ayllu.Github.Client.Models.EmptyObject(); + } + else if("simple-user".Equals(mappingValue, StringComparison.OrdinalIgnoreCase)) + { + result.SimpleUser = new global::Ayllu.Github.Client.Models.SimpleUser(); + } + return result; + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + if(EmptyObject != null) + { + return EmptyObject.GetFieldDeserializers(); + } + else if(SimpleUser != null) + { + return SimpleUser.GetFieldDeserializers(); + } + return new Dictionary>(); + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(EmptyObject != null) + { + writer.WriteObjectValue(null, EmptyObject); + } + else if(SimpleUser != null) + { + writer.WriteObjectValue(null, SimpleUser); + } + } + } + /// + /// Composed type wrapper for classes , + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class Commit_committer : IComposedTypeWrapper, IParsable + { + /// Composed type representation for type +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.EmptyObject? EmptyObject { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.EmptyObject EmptyObject { get; set; } +#endif + /// Composed type representation for type +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.SimpleUser? SimpleUser { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.SimpleUser SimpleUser { get; set; } +#endif + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.Commit.Commit_committer CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + var mappingValue = parseNode.GetChildNode("")?.GetStringValue(); + var result = new global::Ayllu.Github.Client.Models.Commit.Commit_committer(); + if("empty-object".Equals(mappingValue, StringComparison.OrdinalIgnoreCase)) + { + result.EmptyObject = new global::Ayllu.Github.Client.Models.EmptyObject(); + } + else if("simple-user".Equals(mappingValue, StringComparison.OrdinalIgnoreCase)) + { + result.SimpleUser = new global::Ayllu.Github.Client.Models.SimpleUser(); + } + return result; + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + if(EmptyObject != null) + { + return EmptyObject.GetFieldDeserializers(); + } + else if(SimpleUser != null) + { + return SimpleUser.GetFieldDeserializers(); + } + return new Dictionary>(); + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(EmptyObject != null) + { + writer.WriteObjectValue(null, EmptyObject); + } + else if(SimpleUser != null) + { + writer.WriteObjectValue(null, SimpleUser); + } + } + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/Commit503Error.cs b/src/Ayllu.Github.Client/Github/Client/Models/Commit503Error.cs new file mode 100644 index 0000000..1e739bc --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/Commit503Error.cs @@ -0,0 +1,88 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class Commit503Error : ApiException, IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The code property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Code { get; set; } +#nullable restore +#else + public string Code { get; set; } +#endif + /// The documentation_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? DocumentationUrl { get; set; } +#nullable restore +#else + public string DocumentationUrl { get; set; } +#endif + /// The primary error message. + public override string Message { get => MessageEscaped ?? string.Empty; } + /// The message property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? MessageEscaped { get; set; } +#nullable restore +#else + public string MessageEscaped { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public Commit503Error() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.Commit503Error CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.Commit503Error(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "code", n => { Code = n.GetStringValue(); } }, + { "documentation_url", n => { DocumentationUrl = n.GetStringValue(); } }, + { "message", n => { MessageEscaped = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("code", Code); + writer.WriteStringValue("documentation_url", DocumentationUrl); + writer.WriteStringValue("message", MessageEscaped); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/CommitActivity.cs b/src/Ayllu.Github.Client/Github/Client/Models/CommitActivity.cs new file mode 100644 index 0000000..11541e8 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/CommitActivity.cs @@ -0,0 +1,74 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + /// + /// Commit Activity + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class CommitActivity : IAdditionalDataHolder, IParsable + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The days property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? Days { get; set; } +#nullable restore +#else + public List Days { get; set; } +#endif + /// The total property + public int? Total { get; set; } + /// The week property + public int? Week { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public CommitActivity() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.CommitActivity CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.CommitActivity(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "days", n => { Days = n.GetCollectionOfPrimitiveValues()?.AsList(); } }, + { "total", n => { Total = n.GetIntValue(); } }, + { "week", n => { Week = n.GetIntValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteCollectionOfPrimitiveValues("days", Days); + writer.WriteIntValue("total", Total); + writer.WriteIntValue("week", Week); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/CommitComment.cs b/src/Ayllu.Github.Client/Github/Client/Models/CommitComment.cs new file mode 100644 index 0000000..2584b01 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/CommitComment.cs @@ -0,0 +1,160 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + /// + /// Commit Comment + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class CommitComment : IAdditionalDataHolder, IParsable + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// How the author is associated with the repository. + public global::Ayllu.Github.Client.Models.AuthorAssociation? AuthorAssociation { get; set; } + /// The body property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Body { get; set; } +#nullable restore +#else + public string Body { get; set; } +#endif + /// The commit_id property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? CommitId { get; set; } +#nullable restore +#else + public string CommitId { get; set; } +#endif + /// The created_at property + public DateTimeOffset? CreatedAt { get; set; } + /// The html_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? HtmlUrl { get; set; } +#nullable restore +#else + public string HtmlUrl { get; set; } +#endif + /// The id property + public int? Id { get; set; } + /// The line property + public int? Line { get; set; } + /// The node_id property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? NodeId { get; set; } +#nullable restore +#else + public string NodeId { get; set; } +#endif + /// The path property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Path { get; set; } +#nullable restore +#else + public string Path { get; set; } +#endif + /// The position property + public int? Position { get; set; } + /// The reactions property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.ReactionRollup? Reactions { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.ReactionRollup Reactions { get; set; } +#endif + /// The updated_at property + public DateTimeOffset? UpdatedAt { get; set; } + /// The url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Url { get; set; } +#nullable restore +#else + public string Url { get; set; } +#endif + /// A GitHub user. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.NullableSimpleUser? User { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.NullableSimpleUser User { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public CommitComment() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.CommitComment CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.CommitComment(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "author_association", n => { AuthorAssociation = n.GetEnumValue(); } }, + { "body", n => { Body = n.GetStringValue(); } }, + { "commit_id", n => { CommitId = n.GetStringValue(); } }, + { "created_at", n => { CreatedAt = n.GetDateTimeOffsetValue(); } }, + { "html_url", n => { HtmlUrl = n.GetStringValue(); } }, + { "id", n => { Id = n.GetIntValue(); } }, + { "line", n => { Line = n.GetIntValue(); } }, + { "node_id", n => { NodeId = n.GetStringValue(); } }, + { "path", n => { Path = n.GetStringValue(); } }, + { "position", n => { Position = n.GetIntValue(); } }, + { "reactions", n => { Reactions = n.GetObjectValue(global::Ayllu.Github.Client.Models.ReactionRollup.CreateFromDiscriminatorValue); } }, + { "updated_at", n => { UpdatedAt = n.GetDateTimeOffsetValue(); } }, + { "url", n => { Url = n.GetStringValue(); } }, + { "user", n => { User = n.GetObjectValue(global::Ayllu.Github.Client.Models.NullableSimpleUser.CreateFromDiscriminatorValue); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteEnumValue("author_association", AuthorAssociation); + writer.WriteStringValue("body", Body); + writer.WriteStringValue("commit_id", CommitId); + writer.WriteDateTimeOffsetValue("created_at", CreatedAt); + writer.WriteStringValue("html_url", HtmlUrl); + writer.WriteIntValue("id", Id); + writer.WriteIntValue("line", Line); + writer.WriteStringValue("node_id", NodeId); + writer.WriteStringValue("path", Path); + writer.WriteIntValue("position", Position); + writer.WriteObjectValue("reactions", Reactions); + writer.WriteDateTimeOffsetValue("updated_at", UpdatedAt); + writer.WriteStringValue("url", Url); + writer.WriteObjectValue("user", User); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/CommitComparison.cs b/src/Ayllu.Github.Client/Github/Client/Models/CommitComparison.cs new file mode 100644 index 0000000..c0f1c64 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/CommitComparison.cs @@ -0,0 +1,162 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + /// + /// Commit Comparison + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class CommitComparison : IAdditionalDataHolder, IParsable + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The ahead_by property + public int? AheadBy { get; set; } + /// Commit +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.Commit? BaseCommit { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.Commit BaseCommit { get; set; } +#endif + /// The behind_by property + public int? BehindBy { get; set; } + /// The commits property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? Commits { get; set; } +#nullable restore +#else + public List Commits { get; set; } +#endif + /// The diff_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? DiffUrl { get; set; } +#nullable restore +#else + public string DiffUrl { get; set; } +#endif + /// The files property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? Files { get; set; } +#nullable restore +#else + public List Files { get; set; } +#endif + /// The html_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? HtmlUrl { get; set; } +#nullable restore +#else + public string HtmlUrl { get; set; } +#endif + /// Commit +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.Commit? MergeBaseCommit { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.Commit MergeBaseCommit { get; set; } +#endif + /// The patch_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? PatchUrl { get; set; } +#nullable restore +#else + public string PatchUrl { get; set; } +#endif + /// The permalink_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? PermalinkUrl { get; set; } +#nullable restore +#else + public string PermalinkUrl { get; set; } +#endif + /// The status property + public global::Ayllu.Github.Client.Models.CommitComparison_status? Status { get; set; } + /// The total_commits property + public int? TotalCommits { get; set; } + /// The url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Url { get; set; } +#nullable restore +#else + public string Url { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public CommitComparison() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.CommitComparison CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.CommitComparison(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "ahead_by", n => { AheadBy = n.GetIntValue(); } }, + { "base_commit", n => { BaseCommit = n.GetObjectValue(global::Ayllu.Github.Client.Models.Commit.CreateFromDiscriminatorValue); } }, + { "behind_by", n => { BehindBy = n.GetIntValue(); } }, + { "commits", n => { Commits = n.GetCollectionOfObjectValues(global::Ayllu.Github.Client.Models.Commit.CreateFromDiscriminatorValue)?.AsList(); } }, + { "diff_url", n => { DiffUrl = n.GetStringValue(); } }, + { "files", n => { Files = n.GetCollectionOfObjectValues(global::Ayllu.Github.Client.Models.DiffEntry.CreateFromDiscriminatorValue)?.AsList(); } }, + { "html_url", n => { HtmlUrl = n.GetStringValue(); } }, + { "merge_base_commit", n => { MergeBaseCommit = n.GetObjectValue(global::Ayllu.Github.Client.Models.Commit.CreateFromDiscriminatorValue); } }, + { "patch_url", n => { PatchUrl = n.GetStringValue(); } }, + { "permalink_url", n => { PermalinkUrl = n.GetStringValue(); } }, + { "status", n => { Status = n.GetEnumValue(); } }, + { "total_commits", n => { TotalCommits = n.GetIntValue(); } }, + { "url", n => { Url = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteIntValue("ahead_by", AheadBy); + writer.WriteObjectValue("base_commit", BaseCommit); + writer.WriteIntValue("behind_by", BehindBy); + writer.WriteCollectionOfObjectValues("commits", Commits); + writer.WriteStringValue("diff_url", DiffUrl); + writer.WriteCollectionOfObjectValues("files", Files); + writer.WriteStringValue("html_url", HtmlUrl); + writer.WriteObjectValue("merge_base_commit", MergeBaseCommit); + writer.WriteStringValue("patch_url", PatchUrl); + writer.WriteStringValue("permalink_url", PermalinkUrl); + writer.WriteEnumValue("status", Status); + writer.WriteIntValue("total_commits", TotalCommits); + writer.WriteStringValue("url", Url); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/CommitComparison503Error.cs b/src/Ayllu.Github.Client/Github/Client/Models/CommitComparison503Error.cs new file mode 100644 index 0000000..eb6213a --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/CommitComparison503Error.cs @@ -0,0 +1,88 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class CommitComparison503Error : ApiException, IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The code property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Code { get; set; } +#nullable restore +#else + public string Code { get; set; } +#endif + /// The documentation_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? DocumentationUrl { get; set; } +#nullable restore +#else + public string DocumentationUrl { get; set; } +#endif + /// The primary error message. + public override string Message { get => MessageEscaped ?? string.Empty; } + /// The message property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? MessageEscaped { get; set; } +#nullable restore +#else + public string MessageEscaped { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public CommitComparison503Error() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.CommitComparison503Error CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.CommitComparison503Error(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "code", n => { Code = n.GetStringValue(); } }, + { "documentation_url", n => { DocumentationUrl = n.GetStringValue(); } }, + { "message", n => { MessageEscaped = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("code", Code); + writer.WriteStringValue("documentation_url", DocumentationUrl); + writer.WriteStringValue("message", MessageEscaped); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/CommitComparison_status.cs b/src/Ayllu.Github.Client/Github/Client/Models/CommitComparison_status.cs new file mode 100644 index 0000000..1a98fbf --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/CommitComparison_status.cs @@ -0,0 +1,28 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public enum CommitComparison_status + #pragma warning restore CS1591 + { + [EnumMember(Value = "diverged")] + #pragma warning disable CS1591 + Diverged, + #pragma warning restore CS1591 + [EnumMember(Value = "ahead")] + #pragma warning disable CS1591 + Ahead, + #pragma warning restore CS1591 + [EnumMember(Value = "behind")] + #pragma warning disable CS1591 + Behind, + #pragma warning restore CS1591 + [EnumMember(Value = "identical")] + #pragma warning disable CS1591 + Identical, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Models/CommitSearchResultItem.cs b/src/Ayllu.Github.Client/Github/Client/Models/CommitSearchResultItem.cs new file mode 100644 index 0000000..2b75c03 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/CommitSearchResultItem.cs @@ -0,0 +1,170 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + /// + /// Commit Search Result Item + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class CommitSearchResultItem : IAdditionalDataHolder, IParsable + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// A GitHub user. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.NullableSimpleUser? Author { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.NullableSimpleUser Author { get; set; } +#endif + /// The comments_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? CommentsUrl { get; set; } +#nullable restore +#else + public string CommentsUrl { get; set; } +#endif + /// The commit property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.CommitSearchResultItem_commit? Commit { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.CommitSearchResultItem_commit Commit { get; set; } +#endif + /// Metaproperties for Git author/committer information. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.NullableGitUser? Committer { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.NullableGitUser Committer { get; set; } +#endif + /// The html_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? HtmlUrl { get; set; } +#nullable restore +#else + public string HtmlUrl { get; set; } +#endif + /// The node_id property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? NodeId { get; set; } +#nullable restore +#else + public string NodeId { get; set; } +#endif + /// The parents property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? Parents { get; set; } +#nullable restore +#else + public List Parents { get; set; } +#endif + /// Minimal Repository +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.MinimalRepository? Repository { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.MinimalRepository Repository { get; set; } +#endif + /// The score property + public double? Score { get; set; } + /// The sha property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Sha { get; set; } +#nullable restore +#else + public string Sha { get; set; } +#endif + /// The text_matches property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? TextMatches { get; set; } +#nullable restore +#else + public List TextMatches { get; set; } +#endif + /// The url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Url { get; set; } +#nullable restore +#else + public string Url { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public CommitSearchResultItem() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.CommitSearchResultItem CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.CommitSearchResultItem(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "author", n => { Author = n.GetObjectValue(global::Ayllu.Github.Client.Models.NullableSimpleUser.CreateFromDiscriminatorValue); } }, + { "comments_url", n => { CommentsUrl = n.GetStringValue(); } }, + { "commit", n => { Commit = n.GetObjectValue(global::Ayllu.Github.Client.Models.CommitSearchResultItem_commit.CreateFromDiscriminatorValue); } }, + { "committer", n => { Committer = n.GetObjectValue(global::Ayllu.Github.Client.Models.NullableGitUser.CreateFromDiscriminatorValue); } }, + { "html_url", n => { HtmlUrl = n.GetStringValue(); } }, + { "node_id", n => { NodeId = n.GetStringValue(); } }, + { "parents", n => { Parents = n.GetCollectionOfObjectValues(global::Ayllu.Github.Client.Models.CommitSearchResultItem_parents.CreateFromDiscriminatorValue)?.AsList(); } }, + { "repository", n => { Repository = n.GetObjectValue(global::Ayllu.Github.Client.Models.MinimalRepository.CreateFromDiscriminatorValue); } }, + { "score", n => { Score = n.GetDoubleValue(); } }, + { "sha", n => { Sha = n.GetStringValue(); } }, + { "text_matches", n => { TextMatches = n.GetCollectionOfObjectValues(global::Ayllu.Github.Client.Models.Commits.CreateFromDiscriminatorValue)?.AsList(); } }, + { "url", n => { Url = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteObjectValue("author", Author); + writer.WriteStringValue("comments_url", CommentsUrl); + writer.WriteObjectValue("commit", Commit); + writer.WriteObjectValue("committer", Committer); + writer.WriteStringValue("html_url", HtmlUrl); + writer.WriteStringValue("node_id", NodeId); + writer.WriteCollectionOfObjectValues("parents", Parents); + writer.WriteObjectValue("repository", Repository); + writer.WriteDoubleValue("score", Score); + writer.WriteStringValue("sha", Sha); + writer.WriteCollectionOfObjectValues("text_matches", TextMatches); + writer.WriteStringValue("url", Url); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/CommitSearchResultItem_commit.cs b/src/Ayllu.Github.Client/Github/Client/Models/CommitSearchResultItem_commit.cs new file mode 100644 index 0000000..d7a5c27 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/CommitSearchResultItem_commit.cs @@ -0,0 +1,119 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class CommitSearchResultItem_commit : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The author property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.CommitSearchResultItem_commit_author? Author { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.CommitSearchResultItem_commit_author Author { get; set; } +#endif + /// The comment_count property + public int? CommentCount { get; set; } + /// Metaproperties for Git author/committer information. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.NullableGitUser? Committer { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.NullableGitUser Committer { get; set; } +#endif + /// The message property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Message { get; set; } +#nullable restore +#else + public string Message { get; set; } +#endif + /// The tree property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.CommitSearchResultItem_commit_tree? Tree { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.CommitSearchResultItem_commit_tree Tree { get; set; } +#endif + /// The url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Url { get; set; } +#nullable restore +#else + public string Url { get; set; } +#endif + /// The verification property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.Verification? Verification { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.Verification Verification { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public CommitSearchResultItem_commit() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.CommitSearchResultItem_commit CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.CommitSearchResultItem_commit(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "author", n => { Author = n.GetObjectValue(global::Ayllu.Github.Client.Models.CommitSearchResultItem_commit_author.CreateFromDiscriminatorValue); } }, + { "comment_count", n => { CommentCount = n.GetIntValue(); } }, + { "committer", n => { Committer = n.GetObjectValue(global::Ayllu.Github.Client.Models.NullableGitUser.CreateFromDiscriminatorValue); } }, + { "message", n => { Message = n.GetStringValue(); } }, + { "tree", n => { Tree = n.GetObjectValue(global::Ayllu.Github.Client.Models.CommitSearchResultItem_commit_tree.CreateFromDiscriminatorValue); } }, + { "url", n => { Url = n.GetStringValue(); } }, + { "verification", n => { Verification = n.GetObjectValue(global::Ayllu.Github.Client.Models.Verification.CreateFromDiscriminatorValue); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteObjectValue("author", Author); + writer.WriteIntValue("comment_count", CommentCount); + writer.WriteObjectValue("committer", Committer); + writer.WriteStringValue("message", Message); + writer.WriteObjectValue("tree", Tree); + writer.WriteStringValue("url", Url); + writer.WriteObjectValue("verification", Verification); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/CommitSearchResultItem_commit_author.cs b/src/Ayllu.Github.Client/Github/Client/Models/CommitSearchResultItem_commit_author.cs new file mode 100644 index 0000000..18fe81c --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/CommitSearchResultItem_commit_author.cs @@ -0,0 +1,79 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class CommitSearchResultItem_commit_author : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The date property + public DateTimeOffset? Date { get; set; } + /// The email property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Email { get; set; } +#nullable restore +#else + public string Email { get; set; } +#endif + /// The name property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Name { get; set; } +#nullable restore +#else + public string Name { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public CommitSearchResultItem_commit_author() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.CommitSearchResultItem_commit_author CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.CommitSearchResultItem_commit_author(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "date", n => { Date = n.GetDateTimeOffsetValue(); } }, + { "email", n => { Email = n.GetStringValue(); } }, + { "name", n => { Name = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteDateTimeOffsetValue("date", Date); + writer.WriteStringValue("email", Email); + writer.WriteStringValue("name", Name); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/CommitSearchResultItem_commit_tree.cs b/src/Ayllu.Github.Client/Github/Client/Models/CommitSearchResultItem_commit_tree.cs new file mode 100644 index 0000000..cccbd97 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/CommitSearchResultItem_commit_tree.cs @@ -0,0 +1,75 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class CommitSearchResultItem_commit_tree : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The sha property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Sha { get; set; } +#nullable restore +#else + public string Sha { get; set; } +#endif + /// The url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Url { get; set; } +#nullable restore +#else + public string Url { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public CommitSearchResultItem_commit_tree() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.CommitSearchResultItem_commit_tree CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.CommitSearchResultItem_commit_tree(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "sha", n => { Sha = n.GetStringValue(); } }, + { "url", n => { Url = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("sha", Sha); + writer.WriteStringValue("url", Url); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/CommitSearchResultItem_parents.cs b/src/Ayllu.Github.Client/Github/Client/Models/CommitSearchResultItem_parents.cs new file mode 100644 index 0000000..53a4377 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/CommitSearchResultItem_parents.cs @@ -0,0 +1,85 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class CommitSearchResultItem_parents : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The html_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? HtmlUrl { get; set; } +#nullable restore +#else + public string HtmlUrl { get; set; } +#endif + /// The sha property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Sha { get; set; } +#nullable restore +#else + public string Sha { get; set; } +#endif + /// The url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Url { get; set; } +#nullable restore +#else + public string Url { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public CommitSearchResultItem_parents() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.CommitSearchResultItem_parents CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.CommitSearchResultItem_parents(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "html_url", n => { HtmlUrl = n.GetStringValue(); } }, + { "sha", n => { Sha = n.GetStringValue(); } }, + { "url", n => { Url = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("html_url", HtmlUrl); + writer.WriteStringValue("sha", Sha); + writer.WriteStringValue("url", Url); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/Commit_commit.cs b/src/Ayllu.Github.Client/Github/Client/Models/Commit_commit.cs new file mode 100644 index 0000000..1cf7c13 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/Commit_commit.cs @@ -0,0 +1,119 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class Commit_commit : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// Metaproperties for Git author/committer information. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.NullableGitUser? Author { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.NullableGitUser Author { get; set; } +#endif + /// The comment_count property + public int? CommentCount { get; set; } + /// Metaproperties for Git author/committer information. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.NullableGitUser? Committer { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.NullableGitUser Committer { get; set; } +#endif + /// The message property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Message { get; set; } +#nullable restore +#else + public string Message { get; set; } +#endif + /// The tree property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.Commit_commit_tree? Tree { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.Commit_commit_tree Tree { get; set; } +#endif + /// The url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Url { get; set; } +#nullable restore +#else + public string Url { get; set; } +#endif + /// The verification property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.Verification? Verification { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.Verification Verification { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public Commit_commit() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.Commit_commit CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.Commit_commit(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "author", n => { Author = n.GetObjectValue(global::Ayllu.Github.Client.Models.NullableGitUser.CreateFromDiscriminatorValue); } }, + { "comment_count", n => { CommentCount = n.GetIntValue(); } }, + { "committer", n => { Committer = n.GetObjectValue(global::Ayllu.Github.Client.Models.NullableGitUser.CreateFromDiscriminatorValue); } }, + { "message", n => { Message = n.GetStringValue(); } }, + { "tree", n => { Tree = n.GetObjectValue(global::Ayllu.Github.Client.Models.Commit_commit_tree.CreateFromDiscriminatorValue); } }, + { "url", n => { Url = n.GetStringValue(); } }, + { "verification", n => { Verification = n.GetObjectValue(global::Ayllu.Github.Client.Models.Verification.CreateFromDiscriminatorValue); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteObjectValue("author", Author); + writer.WriteIntValue("comment_count", CommentCount); + writer.WriteObjectValue("committer", Committer); + writer.WriteStringValue("message", Message); + writer.WriteObjectValue("tree", Tree); + writer.WriteStringValue("url", Url); + writer.WriteObjectValue("verification", Verification); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/Commit_commit_tree.cs b/src/Ayllu.Github.Client/Github/Client/Models/Commit_commit_tree.cs new file mode 100644 index 0000000..b1d5cc4 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/Commit_commit_tree.cs @@ -0,0 +1,75 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class Commit_commit_tree : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The sha property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Sha { get; set; } +#nullable restore +#else + public string Sha { get; set; } +#endif + /// The url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Url { get; set; } +#nullable restore +#else + public string Url { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public Commit_commit_tree() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.Commit_commit_tree CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.Commit_commit_tree(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "sha", n => { Sha = n.GetStringValue(); } }, + { "url", n => { Url = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("sha", Sha); + writer.WriteStringValue("url", Url); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/Commit_parents.cs b/src/Ayllu.Github.Client/Github/Client/Models/Commit_parents.cs new file mode 100644 index 0000000..3cecf75 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/Commit_parents.cs @@ -0,0 +1,85 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class Commit_parents : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The html_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? HtmlUrl { get; set; } +#nullable restore +#else + public string HtmlUrl { get; set; } +#endif + /// The sha property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Sha { get; set; } +#nullable restore +#else + public string Sha { get; set; } +#endif + /// The url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Url { get; set; } +#nullable restore +#else + public string Url { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public Commit_parents() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.Commit_parents CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.Commit_parents(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "html_url", n => { HtmlUrl = n.GetStringValue(); } }, + { "sha", n => { Sha = n.GetStringValue(); } }, + { "url", n => { Url = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("html_url", HtmlUrl); + writer.WriteStringValue("sha", Sha); + writer.WriteStringValue("url", Url); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/Commit_stats.cs b/src/Ayllu.Github.Client/Github/Client/Models/Commit_stats.cs new file mode 100644 index 0000000..288c525 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/Commit_stats.cs @@ -0,0 +1,67 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class Commit_stats : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The additions property + public int? Additions { get; set; } + /// The deletions property + public int? Deletions { get; set; } + /// The total property + public int? Total { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public Commit_stats() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.Commit_stats CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.Commit_stats(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "additions", n => { Additions = n.GetIntValue(); } }, + { "deletions", n => { Deletions = n.GetIntValue(); } }, + { "total", n => { Total = n.GetIntValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteIntValue("additions", Additions); + writer.WriteIntValue("deletions", Deletions); + writer.WriteIntValue("total", Total); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/Commits.cs b/src/Ayllu.Github.Client/Github/Client/Models/Commits.cs new file mode 100644 index 0000000..bb90778 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/Commits.cs @@ -0,0 +1,105 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class Commits : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The fragment property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Fragment { get; set; } +#nullable restore +#else + public string Fragment { get; set; } +#endif + /// The matches property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? Matches { get; set; } +#nullable restore +#else + public List Matches { get; set; } +#endif + /// The object_type property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? ObjectType { get; set; } +#nullable restore +#else + public string ObjectType { get; set; } +#endif + /// The object_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? ObjectUrl { get; set; } +#nullable restore +#else + public string ObjectUrl { get; set; } +#endif + /// The property property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Property { get; set; } +#nullable restore +#else + public string Property { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public Commits() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.Commits CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.Commits(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "fragment", n => { Fragment = n.GetStringValue(); } }, + { "matches", n => { Matches = n.GetCollectionOfObjectValues(global::Ayllu.Github.Client.Models.Commits_matches.CreateFromDiscriminatorValue)?.AsList(); } }, + { "object_type", n => { ObjectType = n.GetStringValue(); } }, + { "object_url", n => { ObjectUrl = n.GetStringValue(); } }, + { "property", n => { Property = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("fragment", Fragment); + writer.WriteCollectionOfObjectValues("matches", Matches); + writer.WriteStringValue("object_type", ObjectType); + writer.WriteStringValue("object_url", ObjectUrl); + writer.WriteStringValue("property", Property); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/Commits_matches.cs b/src/Ayllu.Github.Client/Github/Client/Models/Commits_matches.cs new file mode 100644 index 0000000..7705f1b --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/Commits_matches.cs @@ -0,0 +1,75 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class Commits_matches : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The indices property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? Indices { get; set; } +#nullable restore +#else + public List Indices { get; set; } +#endif + /// The text property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Text { get; set; } +#nullable restore +#else + public string Text { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public Commits_matches() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.Commits_matches CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.Commits_matches(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "indices", n => { Indices = n.GetCollectionOfPrimitiveValues()?.AsList(); } }, + { "text", n => { Text = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteCollectionOfPrimitiveValues("indices", Indices); + writer.WriteStringValue("text", Text); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/CommunityProfile.cs b/src/Ayllu.Github.Client/Github/Client/Models/CommunityProfile.cs new file mode 100644 index 0000000..d1b716c --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/CommunityProfile.cs @@ -0,0 +1,98 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + /// + /// Community Profile + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class CommunityProfile : IAdditionalDataHolder, IParsable + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The content_reports_enabled property + public bool? ContentReportsEnabled { get; set; } + /// The description property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Description { get; set; } +#nullable restore +#else + public string Description { get; set; } +#endif + /// The documentation property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Documentation { get; set; } +#nullable restore +#else + public string Documentation { get; set; } +#endif + /// The files property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.CommunityProfile_files? Files { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.CommunityProfile_files Files { get; set; } +#endif + /// The health_percentage property + public int? HealthPercentage { get; set; } + /// The updated_at property + public DateTimeOffset? UpdatedAt { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public CommunityProfile() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.CommunityProfile CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.CommunityProfile(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "content_reports_enabled", n => { ContentReportsEnabled = n.GetBoolValue(); } }, + { "description", n => { Description = n.GetStringValue(); } }, + { "documentation", n => { Documentation = n.GetStringValue(); } }, + { "files", n => { Files = n.GetObjectValue(global::Ayllu.Github.Client.Models.CommunityProfile_files.CreateFromDiscriminatorValue); } }, + { "health_percentage", n => { HealthPercentage = n.GetIntValue(); } }, + { "updated_at", n => { UpdatedAt = n.GetDateTimeOffsetValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteBoolValue("content_reports_enabled", ContentReportsEnabled); + writer.WriteStringValue("description", Description); + writer.WriteStringValue("documentation", Documentation); + writer.WriteObjectValue("files", Files); + writer.WriteIntValue("health_percentage", HealthPercentage); + writer.WriteDateTimeOffsetValue("updated_at", UpdatedAt); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/CommunityProfile_files.cs b/src/Ayllu.Github.Client/Github/Client/Models/CommunityProfile_files.cs new file mode 100644 index 0000000..d411d09 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/CommunityProfile_files.cs @@ -0,0 +1,125 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class CommunityProfile_files : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// Code of Conduct Simple +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.NullableCodeOfConductSimple? CodeOfConduct { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.NullableCodeOfConductSimple CodeOfConduct { get; set; } +#endif + /// The code_of_conduct_file property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.NullableCommunityHealthFile? CodeOfConductFile { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.NullableCommunityHealthFile CodeOfConductFile { get; set; } +#endif + /// The contributing property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.NullableCommunityHealthFile? Contributing { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.NullableCommunityHealthFile Contributing { get; set; } +#endif + /// The issue_template property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.NullableCommunityHealthFile? IssueTemplate { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.NullableCommunityHealthFile IssueTemplate { get; set; } +#endif + /// License Simple +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.NullableLicenseSimple? License { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.NullableLicenseSimple License { get; set; } +#endif + /// The pull_request_template property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.NullableCommunityHealthFile? PullRequestTemplate { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.NullableCommunityHealthFile PullRequestTemplate { get; set; } +#endif + /// The readme property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.NullableCommunityHealthFile? Readme { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.NullableCommunityHealthFile Readme { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public CommunityProfile_files() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.CommunityProfile_files CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.CommunityProfile_files(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "code_of_conduct", n => { CodeOfConduct = n.GetObjectValue(global::Ayllu.Github.Client.Models.NullableCodeOfConductSimple.CreateFromDiscriminatorValue); } }, + { "code_of_conduct_file", n => { CodeOfConductFile = n.GetObjectValue(global::Ayllu.Github.Client.Models.NullableCommunityHealthFile.CreateFromDiscriminatorValue); } }, + { "contributing", n => { Contributing = n.GetObjectValue(global::Ayllu.Github.Client.Models.NullableCommunityHealthFile.CreateFromDiscriminatorValue); } }, + { "issue_template", n => { IssueTemplate = n.GetObjectValue(global::Ayllu.Github.Client.Models.NullableCommunityHealthFile.CreateFromDiscriminatorValue); } }, + { "license", n => { License = n.GetObjectValue(global::Ayllu.Github.Client.Models.NullableLicenseSimple.CreateFromDiscriminatorValue); } }, + { "pull_request_template", n => { PullRequestTemplate = n.GetObjectValue(global::Ayllu.Github.Client.Models.NullableCommunityHealthFile.CreateFromDiscriminatorValue); } }, + { "readme", n => { Readme = n.GetObjectValue(global::Ayllu.Github.Client.Models.NullableCommunityHealthFile.CreateFromDiscriminatorValue); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteObjectValue("code_of_conduct", CodeOfConduct); + writer.WriteObjectValue("code_of_conduct_file", CodeOfConductFile); + writer.WriteObjectValue("contributing", Contributing); + writer.WriteObjectValue("issue_template", IssueTemplate); + writer.WriteObjectValue("license", License); + writer.WriteObjectValue("pull_request_template", PullRequestTemplate); + writer.WriteObjectValue("readme", Readme); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/ContentFile.cs b/src/Ayllu.Github.Client/Github/Client/Models/ContentFile.cs new file mode 100644 index 0000000..8285a6a --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/ContentFile.cs @@ -0,0 +1,184 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + /// + /// Content File + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class ContentFile : IAdditionalDataHolder, IParsable + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The content property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Content { get; set; } +#nullable restore +#else + public string Content { get; set; } +#endif + /// The download_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? DownloadUrl { get; set; } +#nullable restore +#else + public string DownloadUrl { get; set; } +#endif + /// The encoding property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Encoding { get; set; } +#nullable restore +#else + public string Encoding { get; set; } +#endif + /// The git_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? GitUrl { get; set; } +#nullable restore +#else + public string GitUrl { get; set; } +#endif + /// The html_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? HtmlUrl { get; set; } +#nullable restore +#else + public string HtmlUrl { get; set; } +#endif + /// The _links property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.ContentFile__links? Links { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.ContentFile__links Links { get; set; } +#endif + /// The name property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Name { get; set; } +#nullable restore +#else + public string Name { get; set; } +#endif + /// The path property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Path { get; set; } +#nullable restore +#else + public string Path { get; set; } +#endif + /// The sha property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Sha { get; set; } +#nullable restore +#else + public string Sha { get; set; } +#endif + /// The size property + public int? Size { get; set; } + /// The submodule_git_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? SubmoduleGitUrl { get; set; } +#nullable restore +#else + public string SubmoduleGitUrl { get; set; } +#endif + /// The target property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Target { get; set; } +#nullable restore +#else + public string Target { get; set; } +#endif + /// The type property + public global::Ayllu.Github.Client.Models.ContentFile_type? Type { get; set; } + /// The url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Url { get; set; } +#nullable restore +#else + public string Url { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public ContentFile() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.ContentFile CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.ContentFile(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "content", n => { Content = n.GetStringValue(); } }, + { "download_url", n => { DownloadUrl = n.GetStringValue(); } }, + { "encoding", n => { Encoding = n.GetStringValue(); } }, + { "git_url", n => { GitUrl = n.GetStringValue(); } }, + { "html_url", n => { HtmlUrl = n.GetStringValue(); } }, + { "_links", n => { Links = n.GetObjectValue(global::Ayllu.Github.Client.Models.ContentFile__links.CreateFromDiscriminatorValue); } }, + { "name", n => { Name = n.GetStringValue(); } }, + { "path", n => { Path = n.GetStringValue(); } }, + { "sha", n => { Sha = n.GetStringValue(); } }, + { "size", n => { Size = n.GetIntValue(); } }, + { "submodule_git_url", n => { SubmoduleGitUrl = n.GetStringValue(); } }, + { "target", n => { Target = n.GetStringValue(); } }, + { "type", n => { Type = n.GetEnumValue(); } }, + { "url", n => { Url = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("content", Content); + writer.WriteStringValue("download_url", DownloadUrl); + writer.WriteStringValue("encoding", Encoding); + writer.WriteStringValue("git_url", GitUrl); + writer.WriteStringValue("html_url", HtmlUrl); + writer.WriteObjectValue("_links", Links); + writer.WriteStringValue("name", Name); + writer.WriteStringValue("path", Path); + writer.WriteStringValue("sha", Sha); + writer.WriteIntValue("size", Size); + writer.WriteStringValue("submodule_git_url", SubmoduleGitUrl); + writer.WriteStringValue("target", Target); + writer.WriteEnumValue("type", Type); + writer.WriteStringValue("url", Url); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/ContentFile__links.cs b/src/Ayllu.Github.Client/Github/Client/Models/ContentFile__links.cs new file mode 100644 index 0000000..c5eb40c --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/ContentFile__links.cs @@ -0,0 +1,85 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class ContentFile__links : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The git property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Git { get; set; } +#nullable restore +#else + public string Git { get; set; } +#endif + /// The html property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Html { get; set; } +#nullable restore +#else + public string Html { get; set; } +#endif + /// The self property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Self { get; set; } +#nullable restore +#else + public string Self { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public ContentFile__links() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.ContentFile__links CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.ContentFile__links(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "git", n => { Git = n.GetStringValue(); } }, + { "html", n => { Html = n.GetStringValue(); } }, + { "self", n => { Self = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("git", Git); + writer.WriteStringValue("html", Html); + writer.WriteStringValue("self", Self); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/ContentFile_type.cs b/src/Ayllu.Github.Client/Github/Client/Models/ContentFile_type.cs new file mode 100644 index 0000000..179887a --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/ContentFile_type.cs @@ -0,0 +1,16 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public enum ContentFile_type + #pragma warning restore CS1591 + { + [EnumMember(Value = "file")] + #pragma warning disable CS1591 + File, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Models/ContentSubmodule.cs b/src/Ayllu.Github.Client/Github/Client/Models/ContentSubmodule.cs new file mode 100644 index 0000000..f6ea818 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/ContentSubmodule.cs @@ -0,0 +1,154 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + /// + /// An object describing a submodule + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class ContentSubmodule : IAdditionalDataHolder, IParsable + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The download_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? DownloadUrl { get; set; } +#nullable restore +#else + public string DownloadUrl { get; set; } +#endif + /// The git_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? GitUrl { get; set; } +#nullable restore +#else + public string GitUrl { get; set; } +#endif + /// The html_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? HtmlUrl { get; set; } +#nullable restore +#else + public string HtmlUrl { get; set; } +#endif + /// The _links property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.ContentSubmodule__links? Links { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.ContentSubmodule__links Links { get; set; } +#endif + /// The name property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Name { get; set; } +#nullable restore +#else + public string Name { get; set; } +#endif + /// The path property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Path { get; set; } +#nullable restore +#else + public string Path { get; set; } +#endif + /// The sha property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Sha { get; set; } +#nullable restore +#else + public string Sha { get; set; } +#endif + /// The size property + public int? Size { get; set; } + /// The submodule_git_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? SubmoduleGitUrl { get; set; } +#nullable restore +#else + public string SubmoduleGitUrl { get; set; } +#endif + /// The type property + public global::Ayllu.Github.Client.Models.ContentSubmodule_type? Type { get; set; } + /// The url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Url { get; set; } +#nullable restore +#else + public string Url { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public ContentSubmodule() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.ContentSubmodule CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.ContentSubmodule(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "download_url", n => { DownloadUrl = n.GetStringValue(); } }, + { "git_url", n => { GitUrl = n.GetStringValue(); } }, + { "html_url", n => { HtmlUrl = n.GetStringValue(); } }, + { "_links", n => { Links = n.GetObjectValue(global::Ayllu.Github.Client.Models.ContentSubmodule__links.CreateFromDiscriminatorValue); } }, + { "name", n => { Name = n.GetStringValue(); } }, + { "path", n => { Path = n.GetStringValue(); } }, + { "sha", n => { Sha = n.GetStringValue(); } }, + { "size", n => { Size = n.GetIntValue(); } }, + { "submodule_git_url", n => { SubmoduleGitUrl = n.GetStringValue(); } }, + { "type", n => { Type = n.GetEnumValue(); } }, + { "url", n => { Url = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("download_url", DownloadUrl); + writer.WriteStringValue("git_url", GitUrl); + writer.WriteStringValue("html_url", HtmlUrl); + writer.WriteObjectValue("_links", Links); + writer.WriteStringValue("name", Name); + writer.WriteStringValue("path", Path); + writer.WriteStringValue("sha", Sha); + writer.WriteIntValue("size", Size); + writer.WriteStringValue("submodule_git_url", SubmoduleGitUrl); + writer.WriteEnumValue("type", Type); + writer.WriteStringValue("url", Url); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/ContentSubmodule__links.cs b/src/Ayllu.Github.Client/Github/Client/Models/ContentSubmodule__links.cs new file mode 100644 index 0000000..583d4b3 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/ContentSubmodule__links.cs @@ -0,0 +1,85 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class ContentSubmodule__links : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The git property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Git { get; set; } +#nullable restore +#else + public string Git { get; set; } +#endif + /// The html property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Html { get; set; } +#nullable restore +#else + public string Html { get; set; } +#endif + /// The self property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Self { get; set; } +#nullable restore +#else + public string Self { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public ContentSubmodule__links() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.ContentSubmodule__links CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.ContentSubmodule__links(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "git", n => { Git = n.GetStringValue(); } }, + { "html", n => { Html = n.GetStringValue(); } }, + { "self", n => { Self = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("git", Git); + writer.WriteStringValue("html", Html); + writer.WriteStringValue("self", Self); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/ContentSubmodule_type.cs b/src/Ayllu.Github.Client/Github/Client/Models/ContentSubmodule_type.cs new file mode 100644 index 0000000..9be1178 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/ContentSubmodule_type.cs @@ -0,0 +1,16 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public enum ContentSubmodule_type + #pragma warning restore CS1591 + { + [EnumMember(Value = "submodule")] + #pragma warning disable CS1591 + Submodule, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Models/ContentSymlink.cs b/src/Ayllu.Github.Client/Github/Client/Models/ContentSymlink.cs new file mode 100644 index 0000000..9794675 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/ContentSymlink.cs @@ -0,0 +1,154 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + /// + /// An object describing a symlink + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class ContentSymlink : IAdditionalDataHolder, IParsable + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The download_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? DownloadUrl { get; set; } +#nullable restore +#else + public string DownloadUrl { get; set; } +#endif + /// The git_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? GitUrl { get; set; } +#nullable restore +#else + public string GitUrl { get; set; } +#endif + /// The html_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? HtmlUrl { get; set; } +#nullable restore +#else + public string HtmlUrl { get; set; } +#endif + /// The _links property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.ContentSymlink__links? Links { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.ContentSymlink__links Links { get; set; } +#endif + /// The name property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Name { get; set; } +#nullable restore +#else + public string Name { get; set; } +#endif + /// The path property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Path { get; set; } +#nullable restore +#else + public string Path { get; set; } +#endif + /// The sha property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Sha { get; set; } +#nullable restore +#else + public string Sha { get; set; } +#endif + /// The size property + public int? Size { get; set; } + /// The target property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Target { get; set; } +#nullable restore +#else + public string Target { get; set; } +#endif + /// The type property + public global::Ayllu.Github.Client.Models.ContentSymlink_type? Type { get; set; } + /// The url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Url { get; set; } +#nullable restore +#else + public string Url { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public ContentSymlink() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.ContentSymlink CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.ContentSymlink(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "download_url", n => { DownloadUrl = n.GetStringValue(); } }, + { "git_url", n => { GitUrl = n.GetStringValue(); } }, + { "html_url", n => { HtmlUrl = n.GetStringValue(); } }, + { "_links", n => { Links = n.GetObjectValue(global::Ayllu.Github.Client.Models.ContentSymlink__links.CreateFromDiscriminatorValue); } }, + { "name", n => { Name = n.GetStringValue(); } }, + { "path", n => { Path = n.GetStringValue(); } }, + { "sha", n => { Sha = n.GetStringValue(); } }, + { "size", n => { Size = n.GetIntValue(); } }, + { "target", n => { Target = n.GetStringValue(); } }, + { "type", n => { Type = n.GetEnumValue(); } }, + { "url", n => { Url = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("download_url", DownloadUrl); + writer.WriteStringValue("git_url", GitUrl); + writer.WriteStringValue("html_url", HtmlUrl); + writer.WriteObjectValue("_links", Links); + writer.WriteStringValue("name", Name); + writer.WriteStringValue("path", Path); + writer.WriteStringValue("sha", Sha); + writer.WriteIntValue("size", Size); + writer.WriteStringValue("target", Target); + writer.WriteEnumValue("type", Type); + writer.WriteStringValue("url", Url); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/ContentSymlink__links.cs b/src/Ayllu.Github.Client/Github/Client/Models/ContentSymlink__links.cs new file mode 100644 index 0000000..f550f7e --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/ContentSymlink__links.cs @@ -0,0 +1,85 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class ContentSymlink__links : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The git property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Git { get; set; } +#nullable restore +#else + public string Git { get; set; } +#endif + /// The html property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Html { get; set; } +#nullable restore +#else + public string Html { get; set; } +#endif + /// The self property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Self { get; set; } +#nullable restore +#else + public string Self { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public ContentSymlink__links() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.ContentSymlink__links CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.ContentSymlink__links(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "git", n => { Git = n.GetStringValue(); } }, + { "html", n => { Html = n.GetStringValue(); } }, + { "self", n => { Self = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("git", Git); + writer.WriteStringValue("html", Html); + writer.WriteStringValue("self", Self); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/ContentSymlink_type.cs b/src/Ayllu.Github.Client/Github/Client/Models/ContentSymlink_type.cs new file mode 100644 index 0000000..14b6f2e --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/ContentSymlink_type.cs @@ -0,0 +1,16 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public enum ContentSymlink_type + #pragma warning restore CS1591 + { + [EnumMember(Value = "symlink")] + #pragma warning disable CS1591 + Symlink, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Models/ContentTraffic.cs b/src/Ayllu.Github.Client/Github/Client/Models/ContentTraffic.cs new file mode 100644 index 0000000..7aed6b7 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/ContentTraffic.cs @@ -0,0 +1,84 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + /// + /// Content Traffic + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class ContentTraffic : IAdditionalDataHolder, IParsable + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The count property + public int? Count { get; set; } + /// The path property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Path { get; set; } +#nullable restore +#else + public string Path { get; set; } +#endif + /// The title property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Title { get; set; } +#nullable restore +#else + public string Title { get; set; } +#endif + /// The uniques property + public int? Uniques { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public ContentTraffic() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.ContentTraffic CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.ContentTraffic(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "count", n => { Count = n.GetIntValue(); } }, + { "path", n => { Path = n.GetStringValue(); } }, + { "title", n => { Title = n.GetStringValue(); } }, + { "uniques", n => { Uniques = n.GetIntValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteIntValue("count", Count); + writer.WriteStringValue("path", Path); + writer.WriteStringValue("title", Title); + writer.WriteIntValue("uniques", Uniques); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/Contributor.cs b/src/Ayllu.Github.Client/Github/Client/Models/Contributor.cs new file mode 100644 index 0000000..d89da53 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/Contributor.cs @@ -0,0 +1,258 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + /// + /// Contributor + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class Contributor : IAdditionalDataHolder, IParsable + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The avatar_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? AvatarUrl { get; set; } +#nullable restore +#else + public string AvatarUrl { get; set; } +#endif + /// The contributions property + public int? Contributions { get; set; } + /// The email property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Email { get; set; } +#nullable restore +#else + public string Email { get; set; } +#endif + /// The events_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? EventsUrl { get; set; } +#nullable restore +#else + public string EventsUrl { get; set; } +#endif + /// The followers_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? FollowersUrl { get; set; } +#nullable restore +#else + public string FollowersUrl { get; set; } +#endif + /// The following_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? FollowingUrl { get; set; } +#nullable restore +#else + public string FollowingUrl { get; set; } +#endif + /// The gists_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? GistsUrl { get; set; } +#nullable restore +#else + public string GistsUrl { get; set; } +#endif + /// The gravatar_id property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? GravatarId { get; set; } +#nullable restore +#else + public string GravatarId { get; set; } +#endif + /// The html_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? HtmlUrl { get; set; } +#nullable restore +#else + public string HtmlUrl { get; set; } +#endif + /// The id property + public int? Id { get; set; } + /// The login property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Login { get; set; } +#nullable restore +#else + public string Login { get; set; } +#endif + /// The name property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Name { get; set; } +#nullable restore +#else + public string Name { get; set; } +#endif + /// The node_id property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? NodeId { get; set; } +#nullable restore +#else + public string NodeId { get; set; } +#endif + /// The organizations_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? OrganizationsUrl { get; set; } +#nullable restore +#else + public string OrganizationsUrl { get; set; } +#endif + /// The received_events_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? ReceivedEventsUrl { get; set; } +#nullable restore +#else + public string ReceivedEventsUrl { get; set; } +#endif + /// The repos_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? ReposUrl { get; set; } +#nullable restore +#else + public string ReposUrl { get; set; } +#endif + /// The site_admin property + public bool? SiteAdmin { get; set; } + /// The starred_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? StarredUrl { get; set; } +#nullable restore +#else + public string StarredUrl { get; set; } +#endif + /// The subscriptions_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? SubscriptionsUrl { get; set; } +#nullable restore +#else + public string SubscriptionsUrl { get; set; } +#endif + /// The type property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Type { get; set; } +#nullable restore +#else + public string Type { get; set; } +#endif + /// The url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Url { get; set; } +#nullable restore +#else + public string Url { get; set; } +#endif + /// The user_view_type property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? UserViewType { get; set; } +#nullable restore +#else + public string UserViewType { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public Contributor() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.Contributor CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.Contributor(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "avatar_url", n => { AvatarUrl = n.GetStringValue(); } }, + { "contributions", n => { Contributions = n.GetIntValue(); } }, + { "email", n => { Email = n.GetStringValue(); } }, + { "events_url", n => { EventsUrl = n.GetStringValue(); } }, + { "followers_url", n => { FollowersUrl = n.GetStringValue(); } }, + { "following_url", n => { FollowingUrl = n.GetStringValue(); } }, + { "gists_url", n => { GistsUrl = n.GetStringValue(); } }, + { "gravatar_id", n => { GravatarId = n.GetStringValue(); } }, + { "html_url", n => { HtmlUrl = n.GetStringValue(); } }, + { "id", n => { Id = n.GetIntValue(); } }, + { "login", n => { Login = n.GetStringValue(); } }, + { "name", n => { Name = n.GetStringValue(); } }, + { "node_id", n => { NodeId = n.GetStringValue(); } }, + { "organizations_url", n => { OrganizationsUrl = n.GetStringValue(); } }, + { "received_events_url", n => { ReceivedEventsUrl = n.GetStringValue(); } }, + { "repos_url", n => { ReposUrl = n.GetStringValue(); } }, + { "site_admin", n => { SiteAdmin = n.GetBoolValue(); } }, + { "starred_url", n => { StarredUrl = n.GetStringValue(); } }, + { "subscriptions_url", n => { SubscriptionsUrl = n.GetStringValue(); } }, + { "type", n => { Type = n.GetStringValue(); } }, + { "url", n => { Url = n.GetStringValue(); } }, + { "user_view_type", n => { UserViewType = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("avatar_url", AvatarUrl); + writer.WriteIntValue("contributions", Contributions); + writer.WriteStringValue("email", Email); + writer.WriteStringValue("events_url", EventsUrl); + writer.WriteStringValue("followers_url", FollowersUrl); + writer.WriteStringValue("following_url", FollowingUrl); + writer.WriteStringValue("gists_url", GistsUrl); + writer.WriteStringValue("gravatar_id", GravatarId); + writer.WriteStringValue("html_url", HtmlUrl); + writer.WriteIntValue("id", Id); + writer.WriteStringValue("login", Login); + writer.WriteStringValue("name", Name); + writer.WriteStringValue("node_id", NodeId); + writer.WriteStringValue("organizations_url", OrganizationsUrl); + writer.WriteStringValue("received_events_url", ReceivedEventsUrl); + writer.WriteStringValue("repos_url", ReposUrl); + writer.WriteBoolValue("site_admin", SiteAdmin); + writer.WriteStringValue("starred_url", StarredUrl); + writer.WriteStringValue("subscriptions_url", SubscriptionsUrl); + writer.WriteStringValue("type", Type); + writer.WriteStringValue("url", Url); + writer.WriteStringValue("user_view_type", UserViewType); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/ContributorActivity.cs b/src/Ayllu.Github.Client/Github/Client/Models/ContributorActivity.cs new file mode 100644 index 0000000..8e3515e --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/ContributorActivity.cs @@ -0,0 +1,80 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + /// + /// Contributor Activity + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class ContributorActivity : IAdditionalDataHolder, IParsable + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// A GitHub user. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.NullableSimpleUser? Author { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.NullableSimpleUser Author { get; set; } +#endif + /// The total property + public int? Total { get; set; } + /// The weeks property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? Weeks { get; set; } +#nullable restore +#else + public List Weeks { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public ContributorActivity() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.ContributorActivity CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.ContributorActivity(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "author", n => { Author = n.GetObjectValue(global::Ayllu.Github.Client.Models.NullableSimpleUser.CreateFromDiscriminatorValue); } }, + { "total", n => { Total = n.GetIntValue(); } }, + { "weeks", n => { Weeks = n.GetCollectionOfObjectValues(global::Ayllu.Github.Client.Models.ContributorActivity_weeks.CreateFromDiscriminatorValue)?.AsList(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteObjectValue("author", Author); + writer.WriteIntValue("total", Total); + writer.WriteCollectionOfObjectValues("weeks", Weeks); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/ContributorActivity_weeks.cs b/src/Ayllu.Github.Client/Github/Client/Models/ContributorActivity_weeks.cs new file mode 100644 index 0000000..89230d3 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/ContributorActivity_weeks.cs @@ -0,0 +1,71 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class ContributorActivity_weeks : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// The a property + public int? A { get; set; } + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The c property + public int? C { get; set; } + /// The d property + public int? D { get; set; } + /// The w property + public int? W { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public ContributorActivity_weeks() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.ContributorActivity_weeks CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.ContributorActivity_weeks(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "a", n => { A = n.GetIntValue(); } }, + { "c", n => { C = n.GetIntValue(); } }, + { "d", n => { D = n.GetIntValue(); } }, + { "w", n => { W = n.GetIntValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteIntValue("a", A); + writer.WriteIntValue("c", C); + writer.WriteIntValue("d", D); + writer.WriteIntValue("w", W); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/ConvertedNoteToIssueIssueEvent.cs b/src/Ayllu.Github.Client/Github/Client/Models/ConvertedNoteToIssueIssueEvent.cs new file mode 100644 index 0000000..6e3d93b --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/ConvertedNoteToIssueIssueEvent.cs @@ -0,0 +1,150 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + /// + /// Converted Note to Issue Issue Event + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class ConvertedNoteToIssueIssueEvent : IAdditionalDataHolder, IParsable + { + /// A GitHub user. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.SimpleUser? Actor { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.SimpleUser Actor { get; set; } +#endif + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The commit_id property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? CommitId { get; set; } +#nullable restore +#else + public string CommitId { get; set; } +#endif + /// The commit_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? CommitUrl { get; set; } +#nullable restore +#else + public string CommitUrl { get; set; } +#endif + /// The created_at property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? CreatedAt { get; set; } +#nullable restore +#else + public string CreatedAt { get; set; } +#endif + /// The event property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Event { get; set; } +#nullable restore +#else + public string Event { get; set; } +#endif + /// The id property + public int? Id { get; set; } + /// The node_id property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? NodeId { get; set; } +#nullable restore +#else + public string NodeId { get; set; } +#endif + /// 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. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.Integration? PerformedViaGithubApp { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.Integration PerformedViaGithubApp { get; set; } +#endif + /// The project_card property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.ConvertedNoteToIssueIssueEvent_project_card? ProjectCard { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.ConvertedNoteToIssueIssueEvent_project_card ProjectCard { get; set; } +#endif + /// The url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Url { get; set; } +#nullable restore +#else + public string Url { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public ConvertedNoteToIssueIssueEvent() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.ConvertedNoteToIssueIssueEvent CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.ConvertedNoteToIssueIssueEvent(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "actor", n => { Actor = n.GetObjectValue(global::Ayllu.Github.Client.Models.SimpleUser.CreateFromDiscriminatorValue); } }, + { "commit_id", n => { CommitId = n.GetStringValue(); } }, + { "commit_url", n => { CommitUrl = n.GetStringValue(); } }, + { "created_at", n => { CreatedAt = n.GetStringValue(); } }, + { "event", n => { Event = n.GetStringValue(); } }, + { "id", n => { Id = n.GetIntValue(); } }, + { "node_id", n => { NodeId = n.GetStringValue(); } }, + { "performed_via_github_app", n => { PerformedViaGithubApp = n.GetObjectValue(global::Ayllu.Github.Client.Models.Integration.CreateFromDiscriminatorValue); } }, + { "project_card", n => { ProjectCard = n.GetObjectValue(global::Ayllu.Github.Client.Models.ConvertedNoteToIssueIssueEvent_project_card.CreateFromDiscriminatorValue); } }, + { "url", n => { Url = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteObjectValue("actor", Actor); + writer.WriteStringValue("commit_id", CommitId); + writer.WriteStringValue("commit_url", CommitUrl); + writer.WriteStringValue("created_at", CreatedAt); + writer.WriteStringValue("event", Event); + writer.WriteIntValue("id", Id); + writer.WriteStringValue("node_id", NodeId); + writer.WriteObjectValue("performed_via_github_app", PerformedViaGithubApp); + writer.WriteObjectValue("project_card", ProjectCard); + writer.WriteStringValue("url", Url); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/ConvertedNoteToIssueIssueEvent_project_card.cs b/src/Ayllu.Github.Client/Github/Client/Models/ConvertedNoteToIssueIssueEvent_project_card.cs new file mode 100644 index 0000000..dea3a7a --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/ConvertedNoteToIssueIssueEvent_project_card.cs @@ -0,0 +1,103 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class ConvertedNoteToIssueIssueEvent_project_card : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The column_name property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? ColumnName { get; set; } +#nullable restore +#else + public string ColumnName { get; set; } +#endif + /// The id property + public int? Id { get; set; } + /// The previous_column_name property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? PreviousColumnName { get; set; } +#nullable restore +#else + public string PreviousColumnName { get; set; } +#endif + /// The project_id property + public int? ProjectId { get; set; } + /// The project_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? ProjectUrl { get; set; } +#nullable restore +#else + public string ProjectUrl { get; set; } +#endif + /// The url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Url { get; set; } +#nullable restore +#else + public string Url { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public ConvertedNoteToIssueIssueEvent_project_card() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.ConvertedNoteToIssueIssueEvent_project_card CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.ConvertedNoteToIssueIssueEvent_project_card(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "column_name", n => { ColumnName = n.GetStringValue(); } }, + { "id", n => { Id = n.GetIntValue(); } }, + { "previous_column_name", n => { PreviousColumnName = n.GetStringValue(); } }, + { "project_id", n => { ProjectId = n.GetIntValue(); } }, + { "project_url", n => { ProjectUrl = n.GetStringValue(); } }, + { "url", n => { Url = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("column_name", ColumnName); + writer.WriteIntValue("id", Id); + writer.WriteStringValue("previous_column_name", PreviousColumnName); + writer.WriteIntValue("project_id", ProjectId); + writer.WriteStringValue("project_url", ProjectUrl); + writer.WriteStringValue("url", Url); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/CopilotDotcomChat.cs b/src/Ayllu.Github.Client/Github/Client/Models/CopilotDotcomChat.cs new file mode 100644 index 0000000..50cf1b0 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/CopilotDotcomChat.cs @@ -0,0 +1,70 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + /// + /// Usage metrics for Copilot Chat in GitHub.com + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class CopilotDotcomChat : IAdditionalDataHolder, IParsable + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// List of model metrics for a custom models and the default model. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? Models { get; set; } +#nullable restore +#else + public List Models { get; set; } +#endif + /// Total number of users who prompted Copilot Chat on github.com at least once. + public int? TotalEngagedUsers { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public CopilotDotcomChat() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.CopilotDotcomChat CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.CopilotDotcomChat(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "models", n => { Models = n.GetCollectionOfObjectValues(global::Ayllu.Github.Client.Models.CopilotDotcomChat_models.CreateFromDiscriminatorValue)?.AsList(); } }, + { "total_engaged_users", n => { TotalEngagedUsers = n.GetIntValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteCollectionOfObjectValues("models", Models); + writer.WriteIntValue("total_engaged_users", TotalEngagedUsers); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/CopilotDotcomChat_models.cs b/src/Ayllu.Github.Client/Github/Client/Models/CopilotDotcomChat_models.cs new file mode 100644 index 0000000..54c8ace --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/CopilotDotcomChat_models.cs @@ -0,0 +1,87 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class CopilotDotcomChat_models : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The training date for the custom model (if applicable). +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? CustomModelTrainingDate { get; set; } +#nullable restore +#else + public string CustomModelTrainingDate { get; set; } +#endif + /// Indicates whether a model is custom or default. + public bool? IsCustomModel { get; set; } + /// Name of the model used for Copilot Chat. If the default model is used will appear as 'default'. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Name { get; set; } +#nullable restore +#else + public string Name { get; set; } +#endif + /// Total number of chats initiated by users on github.com. + public int? TotalChats { get; set; } + /// Total number of users who prompted Copilot Chat on github.com at least once for each model. + public int? TotalEngagedUsers { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public CopilotDotcomChat_models() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.CopilotDotcomChat_models CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.CopilotDotcomChat_models(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "custom_model_training_date", n => { CustomModelTrainingDate = n.GetStringValue(); } }, + { "is_custom_model", n => { IsCustomModel = n.GetBoolValue(); } }, + { "name", n => { Name = n.GetStringValue(); } }, + { "total_chats", n => { TotalChats = n.GetIntValue(); } }, + { "total_engaged_users", n => { TotalEngagedUsers = n.GetIntValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("custom_model_training_date", CustomModelTrainingDate); + writer.WriteBoolValue("is_custom_model", IsCustomModel); + writer.WriteStringValue("name", Name); + writer.WriteIntValue("total_chats", TotalChats); + writer.WriteIntValue("total_engaged_users", TotalEngagedUsers); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/CopilotDotcomPullRequests.cs b/src/Ayllu.Github.Client/Github/Client/Models/CopilotDotcomPullRequests.cs new file mode 100644 index 0000000..0abb659 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/CopilotDotcomPullRequests.cs @@ -0,0 +1,70 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + /// + /// Usage metrics for Copilot for pull requests. + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class CopilotDotcomPullRequests : IAdditionalDataHolder, IParsable + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// Repositories in which users used Copilot for Pull Requests to generate pull request summaries +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? Repositories { get; set; } +#nullable restore +#else + public List Repositories { get; set; } +#endif + /// The number of users who used Copilot for Pull Requests on github.com to generate a pull request summary at least once. + public int? TotalEngagedUsers { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public CopilotDotcomPullRequests() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.CopilotDotcomPullRequests CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.CopilotDotcomPullRequests(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "repositories", n => { Repositories = n.GetCollectionOfObjectValues(global::Ayllu.Github.Client.Models.CopilotDotcomPullRequests_repositories.CreateFromDiscriminatorValue)?.AsList(); } }, + { "total_engaged_users", n => { TotalEngagedUsers = n.GetIntValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteCollectionOfObjectValues("repositories", Repositories); + writer.WriteIntValue("total_engaged_users", TotalEngagedUsers); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/CopilotDotcomPullRequests_repositories.cs b/src/Ayllu.Github.Client/Github/Client/Models/CopilotDotcomPullRequests_repositories.cs new file mode 100644 index 0000000..9eccdf5 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/CopilotDotcomPullRequests_repositories.cs @@ -0,0 +1,79 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class CopilotDotcomPullRequests_repositories : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// List of model metrics for custom models and the default model. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? Models { get; set; } +#nullable restore +#else + public List Models { get; set; } +#endif + /// Repository name +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Name { get; set; } +#nullable restore +#else + public string Name { get; set; } +#endif + /// The number of users who generated pull request summaries using Copilot for Pull Requests in the given repository. + public int? TotalEngagedUsers { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public CopilotDotcomPullRequests_repositories() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.CopilotDotcomPullRequests_repositories CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.CopilotDotcomPullRequests_repositories(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "models", n => { Models = n.GetCollectionOfObjectValues(global::Ayllu.Github.Client.Models.CopilotDotcomPullRequests_repositories_models.CreateFromDiscriminatorValue)?.AsList(); } }, + { "name", n => { Name = n.GetStringValue(); } }, + { "total_engaged_users", n => { TotalEngagedUsers = n.GetIntValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteCollectionOfObjectValues("models", Models); + writer.WriteStringValue("name", Name); + writer.WriteIntValue("total_engaged_users", TotalEngagedUsers); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/CopilotDotcomPullRequests_repositories_models.cs b/src/Ayllu.Github.Client/Github/Client/Models/CopilotDotcomPullRequests_repositories_models.cs new file mode 100644 index 0000000..5c21720 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/CopilotDotcomPullRequests_repositories_models.cs @@ -0,0 +1,87 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class CopilotDotcomPullRequests_repositories_models : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The training date for the custom model. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? CustomModelTrainingDate { get; set; } +#nullable restore +#else + public string CustomModelTrainingDate { get; set; } +#endif + /// Indicates whether a model is custom or default. + public bool? IsCustomModel { get; set; } + /// Name of the model used for Copilot pull request summaries. If the default model is used will appear as 'default'. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Name { get; set; } +#nullable restore +#else + public string Name { get; set; } +#endif + /// The number of users who generated pull request summaries using Copilot for Pull Requests in the given repository and model. + public int? TotalEngagedUsers { get; set; } + /// The number of pull request summaries generated using Copilot for Pull Requests in the given repository. + public int? TotalPrSummariesCreated { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public CopilotDotcomPullRequests_repositories_models() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.CopilotDotcomPullRequests_repositories_models CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.CopilotDotcomPullRequests_repositories_models(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "custom_model_training_date", n => { CustomModelTrainingDate = n.GetStringValue(); } }, + { "is_custom_model", n => { IsCustomModel = n.GetBoolValue(); } }, + { "name", n => { Name = n.GetStringValue(); } }, + { "total_engaged_users", n => { TotalEngagedUsers = n.GetIntValue(); } }, + { "total_pr_summaries_created", n => { TotalPrSummariesCreated = n.GetIntValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("custom_model_training_date", CustomModelTrainingDate); + writer.WriteBoolValue("is_custom_model", IsCustomModel); + writer.WriteStringValue("name", Name); + writer.WriteIntValue("total_engaged_users", TotalEngagedUsers); + writer.WriteIntValue("total_pr_summaries_created", TotalPrSummariesCreated); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/CopilotIdeChat.cs b/src/Ayllu.Github.Client/Github/Client/Models/CopilotIdeChat.cs new file mode 100644 index 0000000..05d6e07 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/CopilotIdeChat.cs @@ -0,0 +1,70 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + /// + /// Usage metrics for Copilot Chat in the IDE. + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class CopilotIdeChat : IAdditionalDataHolder, IParsable + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The editors property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? Editors { get; set; } +#nullable restore +#else + public List Editors { get; set; } +#endif + /// Total number of users who prompted Copilot Chat in the IDE. + public int? TotalEngagedUsers { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public CopilotIdeChat() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.CopilotIdeChat CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.CopilotIdeChat(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "editors", n => { Editors = n.GetCollectionOfObjectValues(global::Ayllu.Github.Client.Models.CopilotIdeChat_editors.CreateFromDiscriminatorValue)?.AsList(); } }, + { "total_engaged_users", n => { TotalEngagedUsers = n.GetIntValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteCollectionOfObjectValues("editors", Editors); + writer.WriteIntValue("total_engaged_users", TotalEngagedUsers); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/CopilotIdeChat_editors.cs b/src/Ayllu.Github.Client/Github/Client/Models/CopilotIdeChat_editors.cs new file mode 100644 index 0000000..75f763f --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/CopilotIdeChat_editors.cs @@ -0,0 +1,80 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + /// + /// Copilot Chat metrics, for active editors. + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class CopilotIdeChat_editors : IAdditionalDataHolder, IParsable + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// List of model metrics for custom models and the default model. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? Models { get; set; } +#nullable restore +#else + public List Models { get; set; } +#endif + /// Name of the given editor. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Name { get; set; } +#nullable restore +#else + public string Name { get; set; } +#endif + /// The number of users who prompted Copilot Chat in the specified editor. + public int? TotalEngagedUsers { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public CopilotIdeChat_editors() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.CopilotIdeChat_editors CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.CopilotIdeChat_editors(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "models", n => { Models = n.GetCollectionOfObjectValues(global::Ayllu.Github.Client.Models.CopilotIdeChat_editors_models.CreateFromDiscriminatorValue)?.AsList(); } }, + { "name", n => { Name = n.GetStringValue(); } }, + { "total_engaged_users", n => { TotalEngagedUsers = n.GetIntValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteCollectionOfObjectValues("models", Models); + writer.WriteStringValue("name", Name); + writer.WriteIntValue("total_engaged_users", TotalEngagedUsers); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/CopilotIdeChat_editors_models.cs b/src/Ayllu.Github.Client/Github/Client/Models/CopilotIdeChat_editors_models.cs new file mode 100644 index 0000000..00a88c9 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/CopilotIdeChat_editors_models.cs @@ -0,0 +1,95 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class CopilotIdeChat_editors_models : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The training date for the custom model. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? CustomModelTrainingDate { get; set; } +#nullable restore +#else + public string CustomModelTrainingDate { get; set; } +#endif + /// Indicates whether a model is custom or default. + public bool? IsCustomModel { get; set; } + /// Name of the model used for Copilot Chat. If the default model is used will appear as 'default'. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Name { get; set; } +#nullable restore +#else + public string Name { get; set; } +#endif + /// The number of times users copied a code suggestion from Copilot Chat using the keyboard, or the 'Copy' UI element, for the given editor. + public int? TotalChatCopyEvents { get; set; } + /// The number of times users accepted a code suggestion from Copilot Chat using the 'Insert Code' UI element, for the given editor. + public int? TotalChatInsertionEvents { get; set; } + /// The total number of chats initiated by users in the given editor and model. + public int? TotalChats { get; set; } + /// The number of users who prompted Copilot Chat in the given editor and model. + public int? TotalEngagedUsers { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public CopilotIdeChat_editors_models() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.CopilotIdeChat_editors_models CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.CopilotIdeChat_editors_models(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "custom_model_training_date", n => { CustomModelTrainingDate = n.GetStringValue(); } }, + { "is_custom_model", n => { IsCustomModel = n.GetBoolValue(); } }, + { "name", n => { Name = n.GetStringValue(); } }, + { "total_chat_copy_events", n => { TotalChatCopyEvents = n.GetIntValue(); } }, + { "total_chat_insertion_events", n => { TotalChatInsertionEvents = n.GetIntValue(); } }, + { "total_chats", n => { TotalChats = n.GetIntValue(); } }, + { "total_engaged_users", n => { TotalEngagedUsers = n.GetIntValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("custom_model_training_date", CustomModelTrainingDate); + writer.WriteBoolValue("is_custom_model", IsCustomModel); + writer.WriteStringValue("name", Name); + writer.WriteIntValue("total_chat_copy_events", TotalChatCopyEvents); + writer.WriteIntValue("total_chat_insertion_events", TotalChatInsertionEvents); + writer.WriteIntValue("total_chats", TotalChats); + writer.WriteIntValue("total_engaged_users", TotalEngagedUsers); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/CopilotIdeCodeCompletions.cs b/src/Ayllu.Github.Client/Github/Client/Models/CopilotIdeCodeCompletions.cs new file mode 100644 index 0000000..8ca28db --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/CopilotIdeCodeCompletions.cs @@ -0,0 +1,80 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + /// + /// Usage metrics for Copilot editor code completions in the IDE. + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class CopilotIdeCodeCompletions : IAdditionalDataHolder, IParsable + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The editors property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? Editors { get; set; } +#nullable restore +#else + public List Editors { get; set; } +#endif + /// Code completion metrics for active languages. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? Languages { get; set; } +#nullable restore +#else + public List Languages { get; set; } +#endif + /// Number of users who accepted at least one Copilot code suggestion, across all active editors. Includes both full and partial acceptances. + public int? TotalEngagedUsers { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public CopilotIdeCodeCompletions() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.CopilotIdeCodeCompletions CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.CopilotIdeCodeCompletions(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "editors", n => { Editors = n.GetCollectionOfObjectValues(global::Ayllu.Github.Client.Models.CopilotIdeCodeCompletions_editors.CreateFromDiscriminatorValue)?.AsList(); } }, + { "languages", n => { Languages = n.GetCollectionOfObjectValues(global::Ayllu.Github.Client.Models.CopilotIdeCodeCompletions_languages.CreateFromDiscriminatorValue)?.AsList(); } }, + { "total_engaged_users", n => { TotalEngagedUsers = n.GetIntValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteCollectionOfObjectValues("editors", Editors); + writer.WriteCollectionOfObjectValues("languages", Languages); + writer.WriteIntValue("total_engaged_users", TotalEngagedUsers); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/CopilotIdeCodeCompletions_editors.cs b/src/Ayllu.Github.Client/Github/Client/Models/CopilotIdeCodeCompletions_editors.cs new file mode 100644 index 0000000..9c691cc --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/CopilotIdeCodeCompletions_editors.cs @@ -0,0 +1,80 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + /// + /// Copilot code completion metrics for active editors. + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class CopilotIdeCodeCompletions_editors : IAdditionalDataHolder, IParsable + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// List of model metrics for custom models and the default model. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? Models { get; set; } +#nullable restore +#else + public List Models { get; set; } +#endif + /// Name of the given editor. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Name { get; set; } +#nullable restore +#else + public string Name { get; set; } +#endif + /// Number of users who accepted at least one Copilot code completion suggestion for the given editor. Includes both full and partial acceptances. + public int? TotalEngagedUsers { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public CopilotIdeCodeCompletions_editors() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.CopilotIdeCodeCompletions_editors CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.CopilotIdeCodeCompletions_editors(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "models", n => { Models = n.GetCollectionOfObjectValues(global::Ayllu.Github.Client.Models.CopilotIdeCodeCompletions_editors_models.CreateFromDiscriminatorValue)?.AsList(); } }, + { "name", n => { Name = n.GetStringValue(); } }, + { "total_engaged_users", n => { TotalEngagedUsers = n.GetIntValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteCollectionOfObjectValues("models", Models); + writer.WriteStringValue("name", Name); + writer.WriteIntValue("total_engaged_users", TotalEngagedUsers); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/CopilotIdeCodeCompletions_editors_models.cs b/src/Ayllu.Github.Client/Github/Client/Models/CopilotIdeCodeCompletions_editors_models.cs new file mode 100644 index 0000000..c9b306f --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/CopilotIdeCodeCompletions_editors_models.cs @@ -0,0 +1,93 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class CopilotIdeCodeCompletions_editors_models : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The training date for the custom model. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? CustomModelTrainingDate { get; set; } +#nullable restore +#else + public string CustomModelTrainingDate { get; set; } +#endif + /// Indicates whether a model is custom or default. + public bool? IsCustomModel { get; set; } + /// Code completion metrics for active languages, for the given editor. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? Languages { get; set; } +#nullable restore +#else + public List Languages { get; set; } +#endif + /// Name of the model used for Copilot code completion suggestions. If the default model is used will appear as 'default'. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Name { get; set; } +#nullable restore +#else + public string Name { get; set; } +#endif + /// Number of users who accepted at least one Copilot code completion suggestion for the given editor, for the given language and model. Includes both full and partial acceptances. + public int? TotalEngagedUsers { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public CopilotIdeCodeCompletions_editors_models() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.CopilotIdeCodeCompletions_editors_models CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.CopilotIdeCodeCompletions_editors_models(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "custom_model_training_date", n => { CustomModelTrainingDate = n.GetStringValue(); } }, + { "is_custom_model", n => { IsCustomModel = n.GetBoolValue(); } }, + { "languages", n => { Languages = n.GetCollectionOfObjectValues(global::Ayllu.Github.Client.Models.CopilotIdeCodeCompletions_editors_models_languages.CreateFromDiscriminatorValue)?.AsList(); } }, + { "name", n => { Name = n.GetStringValue(); } }, + { "total_engaged_users", n => { TotalEngagedUsers = n.GetIntValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("custom_model_training_date", CustomModelTrainingDate); + writer.WriteBoolValue("is_custom_model", IsCustomModel); + writer.WriteCollectionOfObjectValues("languages", Languages); + writer.WriteStringValue("name", Name); + writer.WriteIntValue("total_engaged_users", TotalEngagedUsers); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/CopilotIdeCodeCompletions_editors_models_languages.cs b/src/Ayllu.Github.Client/Github/Client/Models/CopilotIdeCodeCompletions_editors_models_languages.cs new file mode 100644 index 0000000..810a44e --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/CopilotIdeCodeCompletions_editors_models_languages.cs @@ -0,0 +1,86 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + /// + /// Usage metrics for a given language for the given editor for Copilot code completions. + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class CopilotIdeCodeCompletions_editors_models_languages : IAdditionalDataHolder, IParsable + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// Name of the language used for Copilot code completion suggestions, for the given editor. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Name { get; set; } +#nullable restore +#else + public string Name { get; set; } +#endif + /// The number of Copilot code suggestions accepted for the given editor, for the given language. Includes both full and partial acceptances. + public int? TotalCodeAcceptances { get; set; } + /// The number of lines of code accepted from Copilot code suggestions for the given editor, for the given language. + public int? TotalCodeLinesAccepted { get; set; } + /// The number of lines of code suggested by Copilot code completions for the given editor, for the given language. + public int? TotalCodeLinesSuggested { get; set; } + /// The number of Copilot code suggestions generated for the given editor, for the given language. + public int? TotalCodeSuggestions { get; set; } + /// Number of users who accepted at least one Copilot code completion suggestion for the given editor, for the given language. Includes both full and partial acceptances. + public int? TotalEngagedUsers { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public CopilotIdeCodeCompletions_editors_models_languages() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.CopilotIdeCodeCompletions_editors_models_languages CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.CopilotIdeCodeCompletions_editors_models_languages(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "name", n => { Name = n.GetStringValue(); } }, + { "total_code_acceptances", n => { TotalCodeAcceptances = n.GetIntValue(); } }, + { "total_code_lines_accepted", n => { TotalCodeLinesAccepted = n.GetIntValue(); } }, + { "total_code_lines_suggested", n => { TotalCodeLinesSuggested = n.GetIntValue(); } }, + { "total_code_suggestions", n => { TotalCodeSuggestions = n.GetIntValue(); } }, + { "total_engaged_users", n => { TotalEngagedUsers = n.GetIntValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("name", Name); + writer.WriteIntValue("total_code_acceptances", TotalCodeAcceptances); + writer.WriteIntValue("total_code_lines_accepted", TotalCodeLinesAccepted); + writer.WriteIntValue("total_code_lines_suggested", TotalCodeLinesSuggested); + writer.WriteIntValue("total_code_suggestions", TotalCodeSuggestions); + writer.WriteIntValue("total_engaged_users", TotalEngagedUsers); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/CopilotIdeCodeCompletions_languages.cs b/src/Ayllu.Github.Client/Github/Client/Models/CopilotIdeCodeCompletions_languages.cs new file mode 100644 index 0000000..b930094 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/CopilotIdeCodeCompletions_languages.cs @@ -0,0 +1,70 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + /// + /// Usage metrics for a given language for the given editor for Copilot code completions. + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class CopilotIdeCodeCompletions_languages : IAdditionalDataHolder, IParsable + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// Name of the language used for Copilot code completion suggestions. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Name { get; set; } +#nullable restore +#else + public string Name { get; set; } +#endif + /// Number of users who accepted at least one Copilot code completion suggestion for the given language. Includes both full and partial acceptances. + public int? TotalEngagedUsers { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public CopilotIdeCodeCompletions_languages() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.CopilotIdeCodeCompletions_languages CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.CopilotIdeCodeCompletions_languages(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "name", n => { Name = n.GetStringValue(); } }, + { "total_engaged_users", n => { TotalEngagedUsers = n.GetIntValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("name", Name); + writer.WriteIntValue("total_engaged_users", TotalEngagedUsers); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/CopilotOrganizationDetails.cs b/src/Ayllu.Github.Client/Github/Client/Models/CopilotOrganizationDetails.cs new file mode 100644 index 0000000..431ab0c --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/CopilotOrganizationDetails.cs @@ -0,0 +1,90 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + /// + /// Information about the seat breakdown and policies set for an organization with a Copilot Business or Copilot Enterprise subscription. + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class CopilotOrganizationDetails : IAdditionalDataHolder, IParsable + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The organization policy for allowing or disallowing Copilot in the CLI. + public global::Ayllu.Github.Client.Models.CopilotOrganizationDetails_cli? Cli { get; set; } + /// The organization policy for allowing or disallowing Copilot Chat in the IDE. + public global::Ayllu.Github.Client.Models.CopilotOrganizationDetails_ide_chat? IdeChat { get; set; } + /// The Copilot plan of the organization, or the parent enterprise, when applicable. + public global::Ayllu.Github.Client.Models.CopilotOrganizationDetails_plan_type? PlanType { get; set; } + /// The organization policy for allowing or disallowing Copilot features on GitHub.com. + public global::Ayllu.Github.Client.Models.CopilotOrganizationDetails_platform_chat? PlatformChat { get; set; } + /// The organization policy for allowing or blocking suggestions matching public code (duplication detection filter). + public global::Ayllu.Github.Client.Models.CopilotOrganizationDetails_public_code_suggestions? PublicCodeSuggestions { get; set; } + /// The breakdown of Copilot Business seats for the organization. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.CopilotOrganizationSeatBreakdown? SeatBreakdown { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.CopilotOrganizationSeatBreakdown SeatBreakdown { get; set; } +#endif + /// The mode of assigning new seats. + public global::Ayllu.Github.Client.Models.CopilotOrganizationDetails_seat_management_setting? SeatManagementSetting { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public CopilotOrganizationDetails() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.CopilotOrganizationDetails CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.CopilotOrganizationDetails(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "cli", n => { Cli = n.GetEnumValue(); } }, + { "ide_chat", n => { IdeChat = n.GetEnumValue(); } }, + { "plan_type", n => { PlanType = n.GetEnumValue(); } }, + { "platform_chat", n => { PlatformChat = n.GetEnumValue(); } }, + { "public_code_suggestions", n => { PublicCodeSuggestions = n.GetEnumValue(); } }, + { "seat_breakdown", n => { SeatBreakdown = n.GetObjectValue(global::Ayllu.Github.Client.Models.CopilotOrganizationSeatBreakdown.CreateFromDiscriminatorValue); } }, + { "seat_management_setting", n => { SeatManagementSetting = n.GetEnumValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteEnumValue("cli", Cli); + writer.WriteEnumValue("ide_chat", IdeChat); + writer.WriteEnumValue("plan_type", PlanType); + writer.WriteEnumValue("platform_chat", PlatformChat); + writer.WriteEnumValue("public_code_suggestions", PublicCodeSuggestions); + writer.WriteObjectValue("seat_breakdown", SeatBreakdown); + writer.WriteEnumValue("seat_management_setting", SeatManagementSetting); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/CopilotOrganizationDetails_cli.cs b/src/Ayllu.Github.Client/Github/Client/Models/CopilotOrganizationDetails_cli.cs new file mode 100644 index 0000000..6ba561c --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/CopilotOrganizationDetails_cli.cs @@ -0,0 +1,23 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Models +{ + /// The organization policy for allowing or disallowing Copilot in the CLI. + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public enum CopilotOrganizationDetails_cli + { + [EnumMember(Value = "enabled")] + #pragma warning disable CS1591 + Enabled, + #pragma warning restore CS1591 + [EnumMember(Value = "disabled")] + #pragma warning disable CS1591 + Disabled, + #pragma warning restore CS1591 + [EnumMember(Value = "unconfigured")] + #pragma warning disable CS1591 + Unconfigured, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Models/CopilotOrganizationDetails_ide_chat.cs b/src/Ayllu.Github.Client/Github/Client/Models/CopilotOrganizationDetails_ide_chat.cs new file mode 100644 index 0000000..aa41367 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/CopilotOrganizationDetails_ide_chat.cs @@ -0,0 +1,23 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Models +{ + /// The organization policy for allowing or disallowing Copilot Chat in the IDE. + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public enum CopilotOrganizationDetails_ide_chat + { + [EnumMember(Value = "enabled")] + #pragma warning disable CS1591 + Enabled, + #pragma warning restore CS1591 + [EnumMember(Value = "disabled")] + #pragma warning disable CS1591 + Disabled, + #pragma warning restore CS1591 + [EnumMember(Value = "unconfigured")] + #pragma warning disable CS1591 + Unconfigured, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Models/CopilotOrganizationDetails_plan_type.cs b/src/Ayllu.Github.Client/Github/Client/Models/CopilotOrganizationDetails_plan_type.cs new file mode 100644 index 0000000..65705c2 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/CopilotOrganizationDetails_plan_type.cs @@ -0,0 +1,19 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Models +{ + /// The Copilot plan of the organization, or the parent enterprise, when applicable. + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public enum CopilotOrganizationDetails_plan_type + { + [EnumMember(Value = "business")] + #pragma warning disable CS1591 + Business, + #pragma warning restore CS1591 + [EnumMember(Value = "enterprise")] + #pragma warning disable CS1591 + Enterprise, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Models/CopilotOrganizationDetails_platform_chat.cs b/src/Ayllu.Github.Client/Github/Client/Models/CopilotOrganizationDetails_platform_chat.cs new file mode 100644 index 0000000..0f1c302 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/CopilotOrganizationDetails_platform_chat.cs @@ -0,0 +1,23 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Models +{ + /// The organization policy for allowing or disallowing Copilot features on GitHub.com. + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public enum CopilotOrganizationDetails_platform_chat + { + [EnumMember(Value = "enabled")] + #pragma warning disable CS1591 + Enabled, + #pragma warning restore CS1591 + [EnumMember(Value = "disabled")] + #pragma warning disable CS1591 + Disabled, + #pragma warning restore CS1591 + [EnumMember(Value = "unconfigured")] + #pragma warning disable CS1591 + Unconfigured, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Models/CopilotOrganizationDetails_public_code_suggestions.cs b/src/Ayllu.Github.Client/Github/Client/Models/CopilotOrganizationDetails_public_code_suggestions.cs new file mode 100644 index 0000000..5946049 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/CopilotOrganizationDetails_public_code_suggestions.cs @@ -0,0 +1,23 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Models +{ + /// The organization policy for allowing or blocking suggestions matching public code (duplication detection filter). + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public enum CopilotOrganizationDetails_public_code_suggestions + { + [EnumMember(Value = "allow")] + #pragma warning disable CS1591 + Allow, + #pragma warning restore CS1591 + [EnumMember(Value = "block")] + #pragma warning disable CS1591 + Block, + #pragma warning restore CS1591 + [EnumMember(Value = "unconfigured")] + #pragma warning disable CS1591 + Unconfigured, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Models/CopilotOrganizationDetails_seat_management_setting.cs b/src/Ayllu.Github.Client/Github/Client/Models/CopilotOrganizationDetails_seat_management_setting.cs new file mode 100644 index 0000000..100b53b --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/CopilotOrganizationDetails_seat_management_setting.cs @@ -0,0 +1,27 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Models +{ + /// The mode of assigning new seats. + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public enum CopilotOrganizationDetails_seat_management_setting + { + [EnumMember(Value = "assign_all")] + #pragma warning disable CS1591 + Assign_all, + #pragma warning restore CS1591 + [EnumMember(Value = "assign_selected")] + #pragma warning disable CS1591 + Assign_selected, + #pragma warning restore CS1591 + [EnumMember(Value = "disabled")] + #pragma warning disable CS1591 + Disabled, + #pragma warning restore CS1591 + [EnumMember(Value = "unconfigured")] + #pragma warning disable CS1591 + Unconfigured, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Models/CopilotOrganizationSeatBreakdown.cs b/src/Ayllu.Github.Client/Github/Client/Models/CopilotOrganizationSeatBreakdown.cs new file mode 100644 index 0000000..403e3dc --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/CopilotOrganizationSeatBreakdown.cs @@ -0,0 +1,80 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + /// + /// The breakdown of Copilot Business seats for the organization. + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class CopilotOrganizationSeatBreakdown : IAdditionalDataHolder, IParsable + { + /// The number of seats that have used Copilot during the current billing cycle. + public int? ActiveThisCycle { get; set; } + /// Seats added during the current billing cycle. + public int? AddedThisCycle { get; set; } + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The number of seats that have not used Copilot during the current billing cycle. + public int? InactiveThisCycle { get; set; } + /// The number of seats that are pending cancellation at the end of the current billing cycle. + public int? PendingCancellation { get; set; } + /// The number of users who have been invited to receive a Copilot seat through this organization. + public int? PendingInvitation { get; set; } + /// The total number of seats being billed for the organization as of the current billing cycle. + public int? Total { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public CopilotOrganizationSeatBreakdown() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.CopilotOrganizationSeatBreakdown CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.CopilotOrganizationSeatBreakdown(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "active_this_cycle", n => { ActiveThisCycle = n.GetIntValue(); } }, + { "added_this_cycle", n => { AddedThisCycle = n.GetIntValue(); } }, + { "inactive_this_cycle", n => { InactiveThisCycle = n.GetIntValue(); } }, + { "pending_cancellation", n => { PendingCancellation = n.GetIntValue(); } }, + { "pending_invitation", n => { PendingInvitation = n.GetIntValue(); } }, + { "total", n => { Total = n.GetIntValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteIntValue("active_this_cycle", ActiveThisCycle); + writer.WriteIntValue("added_this_cycle", AddedThisCycle); + writer.WriteIntValue("inactive_this_cycle", InactiveThisCycle); + writer.WriteIntValue("pending_cancellation", PendingCancellation); + writer.WriteIntValue("pending_invitation", PendingInvitation); + writer.WriteIntValue("total", Total); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/CopilotSeatDetails.cs b/src/Ayllu.Github.Client/Github/Client/Models/CopilotSeatDetails.cs new file mode 100644 index 0000000..4893689 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/CopilotSeatDetails.cs @@ -0,0 +1,187 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + /// + /// Information about a Copilot Business seat assignment for a user, team, or organization. + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class CopilotSeatDetails : IParsable + { + /// A GitHub user. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.NullableSimpleUser? Assignee { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.NullableSimpleUser Assignee { get; set; } +#endif + /// The team through which the assignee is granted access to GitHub Copilot, if applicable. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.CopilotSeatDetails.CopilotSeatDetails_assigning_team? AssigningTeam { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.CopilotSeatDetails.CopilotSeatDetails_assigning_team AssigningTeam { get; set; } +#endif + /// Timestamp of when the assignee was last granted access to GitHub Copilot, in ISO 8601 format. + public DateTimeOffset? CreatedAt { get; set; } + /// Timestamp of user's last GitHub Copilot activity, in ISO 8601 format. + public DateTimeOffset? LastActivityAt { get; set; } + /// Last editor that was used by the user for a GitHub Copilot completion. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? LastActivityEditor { get; set; } +#nullable restore +#else + public string LastActivityEditor { get; set; } +#endif + /// Timestamp of the last time the user authenticated with GitHub Copilot, in ISO 8601 format. + public DateTimeOffset? LastAuthenticatedAt { get; set; } + /// A GitHub organization. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.NullableOrganizationSimple? Organization { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.NullableOrganizationSimple Organization { get; set; } +#endif + /// 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. + public Date? PendingCancellationDate { get; set; } + /// The Copilot plan of the organization, or the parent enterprise, when applicable. + public global::Ayllu.Github.Client.Models.CopilotSeatDetails_plan_type? PlanType { get; set; } + /// **Closing down notice:** This field is no longer relevant and is closing down. Use the `created_at` field to determine when the assignee was last granted access to GitHub Copilot. Timestamp of when the assignee's GitHub Copilot access was last updated, in ISO 8601 format. + [Obsolete("")] + public DateTimeOffset? UpdatedAt { get; set; } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.CopilotSeatDetails CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.CopilotSeatDetails(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "assignee", n => { Assignee = n.GetObjectValue(global::Ayllu.Github.Client.Models.NullableSimpleUser.CreateFromDiscriminatorValue); } }, + { "assigning_team", n => { AssigningTeam = n.GetObjectValue(global::Ayllu.Github.Client.Models.CopilotSeatDetails.CopilotSeatDetails_assigning_team.CreateFromDiscriminatorValue); } }, + { "created_at", n => { CreatedAt = n.GetDateTimeOffsetValue(); } }, + { "last_activity_at", n => { LastActivityAt = n.GetDateTimeOffsetValue(); } }, + { "last_activity_editor", n => { LastActivityEditor = n.GetStringValue(); } }, + { "last_authenticated_at", n => { LastAuthenticatedAt = n.GetDateTimeOffsetValue(); } }, + { "organization", n => { Organization = n.GetObjectValue(global::Ayllu.Github.Client.Models.NullableOrganizationSimple.CreateFromDiscriminatorValue); } }, + { "pending_cancellation_date", n => { PendingCancellationDate = n.GetDateValue(); } }, + { "plan_type", n => { PlanType = n.GetEnumValue(); } }, + { "updated_at", n => { UpdatedAt = n.GetDateTimeOffsetValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteObjectValue("assignee", Assignee); + writer.WriteObjectValue("assigning_team", AssigningTeam); + writer.WriteDateTimeOffsetValue("created_at", CreatedAt); + writer.WriteDateTimeOffsetValue("last_activity_at", LastActivityAt); + writer.WriteStringValue("last_activity_editor", LastActivityEditor); + writer.WriteDateTimeOffsetValue("last_authenticated_at", LastAuthenticatedAt); + writer.WriteObjectValue("organization", Organization); + writer.WriteDateValue("pending_cancellation_date", PendingCancellationDate); + writer.WriteEnumValue("plan_type", PlanType); + writer.WriteDateTimeOffsetValue("updated_at", UpdatedAt); + } + /// + /// Composed type wrapper for classes , + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class CopilotSeatDetails_assigning_team : IComposedTypeWrapper, IParsable + { + /// Composed type representation for type +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.EnterpriseTeam? EnterpriseTeam { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.EnterpriseTeam EnterpriseTeam { get; set; } +#endif + /// Composed type representation for type +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.Team? Team { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.Team Team { get; set; } +#endif + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.CopilotSeatDetails.CopilotSeatDetails_assigning_team CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + var mappingValue = parseNode.GetChildNode("")?.GetStringValue(); + var result = new global::Ayllu.Github.Client.Models.CopilotSeatDetails.CopilotSeatDetails_assigning_team(); + if("enterprise-team".Equals(mappingValue, StringComparison.OrdinalIgnoreCase)) + { + result.EnterpriseTeam = new global::Ayllu.Github.Client.Models.EnterpriseTeam(); + } + else if("team".Equals(mappingValue, StringComparison.OrdinalIgnoreCase)) + { + result.Team = new global::Ayllu.Github.Client.Models.Team(); + } + return result; + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + if(EnterpriseTeam != null) + { + return EnterpriseTeam.GetFieldDeserializers(); + } + else if(Team != null) + { + return Team.GetFieldDeserializers(); + } + return new Dictionary>(); + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(EnterpriseTeam != null) + { + writer.WriteObjectValue(null, EnterpriseTeam); + } + else if(Team != null) + { + writer.WriteObjectValue(null, Team); + } + } + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/CopilotSeatDetails_plan_type.cs b/src/Ayllu.Github.Client/Github/Client/Models/CopilotSeatDetails_plan_type.cs new file mode 100644 index 0000000..d187712 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/CopilotSeatDetails_plan_type.cs @@ -0,0 +1,23 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Models +{ + /// The Copilot plan of the organization, or the parent enterprise, when applicable. + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public enum CopilotSeatDetails_plan_type + { + [EnumMember(Value = "business")] + #pragma warning disable CS1591 + Business, + #pragma warning restore CS1591 + [EnumMember(Value = "enterprise")] + #pragma warning disable CS1591 + Enterprise, + #pragma warning restore CS1591 + [EnumMember(Value = "unknown")] + #pragma warning disable CS1591 + Unknown, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Models/CopilotUsageMetricsDay.cs b/src/Ayllu.Github.Client/Github/Client/Models/CopilotUsageMetricsDay.cs new file mode 100644 index 0000000..b37a890 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/CopilotUsageMetricsDay.cs @@ -0,0 +1,109 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + /// + /// Copilot usage metrics for a given day. + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class CopilotUsageMetricsDay : IAdditionalDataHolder, IParsable + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// Usage metrics for Copilot Chat in GitHub.com +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.CopilotDotcomChat? CopilotDotcomChat { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.CopilotDotcomChat CopilotDotcomChat { get; set; } +#endif + /// Usage metrics for Copilot for pull requests. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.CopilotDotcomPullRequests? CopilotDotcomPullRequests { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.CopilotDotcomPullRequests CopilotDotcomPullRequests { get; set; } +#endif + /// Usage metrics for Copilot Chat in the IDE. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.CopilotIdeChat? CopilotIdeChat { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.CopilotIdeChat CopilotIdeChat { get; set; } +#endif + /// Usage metrics for Copilot editor code completions in the IDE. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.CopilotIdeCodeCompletions? CopilotIdeCodeCompletions { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.CopilotIdeCodeCompletions CopilotIdeCodeCompletions { get; set; } +#endif + /// The date for which the usage metrics are aggregated, in `YYYY-MM-DD` format. + public Date? Date { get; set; } + /// The total number of Copilot users with activity belonging to any Copilot feature, globally, for the given day. Includes passive activity such as receiving a code suggestion, as well as engagement activity such as accepting a code suggestion or prompting chat. Does not include authentication events. Is not limited to the individual features detailed on the endpoint. + public int? TotalActiveUsers { get; set; } + /// The total number of Copilot users who engaged with any Copilot feature, for the given day. Examples include but are not limited to accepting a code suggestion, prompting Copilot chat, or triggering a PR Summary. Does not include authentication events. Is not limited to the individual features detailed on the endpoint. + public int? TotalEngagedUsers { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public CopilotUsageMetricsDay() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.CopilotUsageMetricsDay CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.CopilotUsageMetricsDay(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "copilot_dotcom_chat", n => { CopilotDotcomChat = n.GetObjectValue(global::Ayllu.Github.Client.Models.CopilotDotcomChat.CreateFromDiscriminatorValue); } }, + { "copilot_dotcom_pull_requests", n => { CopilotDotcomPullRequests = n.GetObjectValue(global::Ayllu.Github.Client.Models.CopilotDotcomPullRequests.CreateFromDiscriminatorValue); } }, + { "copilot_ide_chat", n => { CopilotIdeChat = n.GetObjectValue(global::Ayllu.Github.Client.Models.CopilotIdeChat.CreateFromDiscriminatorValue); } }, + { "copilot_ide_code_completions", n => { CopilotIdeCodeCompletions = n.GetObjectValue(global::Ayllu.Github.Client.Models.CopilotIdeCodeCompletions.CreateFromDiscriminatorValue); } }, + { "date", n => { Date = n.GetDateValue(); } }, + { "total_active_users", n => { TotalActiveUsers = n.GetIntValue(); } }, + { "total_engaged_users", n => { TotalEngagedUsers = n.GetIntValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteObjectValue("copilot_dotcom_chat", CopilotDotcomChat); + writer.WriteObjectValue("copilot_dotcom_pull_requests", CopilotDotcomPullRequests); + writer.WriteObjectValue("copilot_ide_chat", CopilotIdeChat); + writer.WriteObjectValue("copilot_ide_code_completions", CopilotIdeCodeCompletions); + writer.WriteDateValue("date", Date); + writer.WriteIntValue("total_active_users", TotalActiveUsers); + writer.WriteIntValue("total_engaged_users", TotalEngagedUsers); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/CustomDeploymentRuleApp.cs b/src/Ayllu.Github.Client/Github/Client/Models/CustomDeploymentRuleApp.cs new file mode 100644 index 0000000..448ea4b --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/CustomDeploymentRuleApp.cs @@ -0,0 +1,90 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + /// + /// A GitHub App that is providing a custom deployment protection rule. + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class CustomDeploymentRuleApp : IAdditionalDataHolder, IParsable + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The unique identifier of the deployment protection rule integration. + public int? Id { get; set; } + /// The URL for the endpoint to get details about the app. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? IntegrationUrl { get; set; } +#nullable restore +#else + public string IntegrationUrl { get; set; } +#endif + /// The node ID for the deployment protection rule integration. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? NodeId { get; set; } +#nullable restore +#else + public string NodeId { get; set; } +#endif + /// The slugified name of the deployment protection rule integration. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Slug { get; set; } +#nullable restore +#else + public string Slug { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public CustomDeploymentRuleApp() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.CustomDeploymentRuleApp CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.CustomDeploymentRuleApp(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "id", n => { Id = n.GetIntValue(); } }, + { "integration_url", n => { IntegrationUrl = n.GetStringValue(); } }, + { "node_id", n => { NodeId = n.GetStringValue(); } }, + { "slug", n => { Slug = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteIntValue("id", Id); + writer.WriteStringValue("integration_url", IntegrationUrl); + writer.WriteStringValue("node_id", NodeId); + writer.WriteStringValue("slug", Slug); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/CustomProperty.cs b/src/Ayllu.Github.Client/Github/Client/Models/CustomProperty.cs new file mode 100644 index 0000000..90c029b --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/CustomProperty.cs @@ -0,0 +1,189 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + /// + /// Custom property defined on an organization + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class CustomProperty : IAdditionalDataHolder, IParsable + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// An ordered list of the allowed values of the property.The property can have up to 200 allowed values. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? AllowedValues { get; set; } +#nullable restore +#else + public List AllowedValues { get; set; } +#endif + /// Default value of the property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.CustomProperty.CustomProperty_default_value? DefaultValue { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.CustomProperty.CustomProperty_default_value DefaultValue { get; set; } +#endif + /// Short description of the property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Description { get; set; } +#nullable restore +#else + public string Description { get; set; } +#endif + /// The name of the property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? PropertyName { get; set; } +#nullable restore +#else + public string PropertyName { get; set; } +#endif + /// Whether the property is required. + public bool? Required { get; set; } + /// The source type of the property + public global::Ayllu.Github.Client.Models.CustomProperty_source_type? SourceType { get; set; } + /// The URL that can be used to fetch, update, or delete info about this property via the API. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Url { get; set; } +#nullable restore +#else + public string Url { get; set; } +#endif + /// Who can edit the values of the property + public global::Ayllu.Github.Client.Models.CustomProperty_values_editable_by? ValuesEditableBy { get; set; } + /// The type of the value for the property + public global::Ayllu.Github.Client.Models.CustomProperty_value_type? ValueType { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public CustomProperty() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.CustomProperty CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.CustomProperty(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "allowed_values", n => { AllowedValues = n.GetCollectionOfPrimitiveValues()?.AsList(); } }, + { "default_value", n => { DefaultValue = n.GetObjectValue(global::Ayllu.Github.Client.Models.CustomProperty.CustomProperty_default_value.CreateFromDiscriminatorValue); } }, + { "description", n => { Description = n.GetStringValue(); } }, + { "property_name", n => { PropertyName = n.GetStringValue(); } }, + { "required", n => { Required = n.GetBoolValue(); } }, + { "source_type", n => { SourceType = n.GetEnumValue(); } }, + { "url", n => { Url = n.GetStringValue(); } }, + { "value_type", n => { ValueType = n.GetEnumValue(); } }, + { "values_editable_by", n => { ValuesEditableBy = n.GetEnumValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteCollectionOfPrimitiveValues("allowed_values", AllowedValues); + writer.WriteObjectValue("default_value", DefaultValue); + writer.WriteStringValue("description", Description); + writer.WriteStringValue("property_name", PropertyName); + writer.WriteBoolValue("required", Required); + writer.WriteEnumValue("source_type", SourceType); + writer.WriteStringValue("url", Url); + writer.WriteEnumValue("values_editable_by", ValuesEditableBy); + writer.WriteEnumValue("value_type", ValueType); + writer.WriteAdditionalData(AdditionalData); + } + /// + /// Composed type wrapper for classes , List<string> + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class CustomProperty_default_value : IComposedTypeWrapper, IParsable + { + /// Composed type representation for type +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? CustomPropertyDefaultValueString { get; set; } +#nullable restore +#else + public string CustomPropertyDefaultValueString { get; set; } +#endif + /// Composed type representation for type List<string> +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? String { get; set; } +#nullable restore +#else + public List String { get; set; } +#endif + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.CustomProperty.CustomProperty_default_value CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + var mappingValue = parseNode.GetChildNode("")?.GetStringValue(); + var result = new global::Ayllu.Github.Client.Models.CustomProperty.CustomProperty_default_value(); + if(parseNode.GetStringValue() is string customPropertyDefaultValueStringValue) + { + result.CustomPropertyDefaultValueString = customPropertyDefaultValueStringValue; + } + else if(parseNode.GetCollectionOfPrimitiveValues()?.AsList() is List stringValue) + { + result.String = stringValue; + } + return result; + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary>(); + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(CustomPropertyDefaultValueString != null) + { + writer.WriteStringValue(null, CustomPropertyDefaultValueString); + } + else if(String != null) + { + writer.WriteCollectionOfPrimitiveValues(null, String); + } + } + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/CustomPropertySetPayload.cs b/src/Ayllu.Github.Client/Github/Client/Models/CustomPropertySetPayload.cs new file mode 100644 index 0000000..4ae00c4 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/CustomPropertySetPayload.cs @@ -0,0 +1,165 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + /// + /// Custom property set payload + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class CustomPropertySetPayload : IAdditionalDataHolder, IParsable + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// An ordered list of the allowed values of the property.The property can have up to 200 allowed values. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? AllowedValues { get; set; } +#nullable restore +#else + public List AllowedValues { get; set; } +#endif + /// Default value of the property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.CustomPropertySetPayload.CustomPropertySetPayload_default_value? DefaultValue { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.CustomPropertySetPayload.CustomPropertySetPayload_default_value DefaultValue { get; set; } +#endif + /// Short description of the property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Description { get; set; } +#nullable restore +#else + public string Description { get; set; } +#endif + /// Whether the property is required. + public bool? Required { get; set; } + /// Who can edit the values of the property + public global::Ayllu.Github.Client.Models.CustomPropertySetPayload_values_editable_by? ValuesEditableBy { get; set; } + /// The type of the value for the property + public global::Ayllu.Github.Client.Models.CustomPropertySetPayload_value_type? ValueType { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public CustomPropertySetPayload() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.CustomPropertySetPayload CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.CustomPropertySetPayload(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "allowed_values", n => { AllowedValues = n.GetCollectionOfPrimitiveValues()?.AsList(); } }, + { "default_value", n => { DefaultValue = n.GetObjectValue(global::Ayllu.Github.Client.Models.CustomPropertySetPayload.CustomPropertySetPayload_default_value.CreateFromDiscriminatorValue); } }, + { "description", n => { Description = n.GetStringValue(); } }, + { "required", n => { Required = n.GetBoolValue(); } }, + { "value_type", n => { ValueType = n.GetEnumValue(); } }, + { "values_editable_by", n => { ValuesEditableBy = n.GetEnumValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteCollectionOfPrimitiveValues("allowed_values", AllowedValues); + writer.WriteObjectValue("default_value", DefaultValue); + writer.WriteStringValue("description", Description); + writer.WriteBoolValue("required", Required); + writer.WriteEnumValue("values_editable_by", ValuesEditableBy); + writer.WriteEnumValue("value_type", ValueType); + writer.WriteAdditionalData(AdditionalData); + } + /// + /// Composed type wrapper for classes , List<string> + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class CustomPropertySetPayload_default_value : IComposedTypeWrapper, IParsable + { + /// Composed type representation for type +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? CustomPropertySetPayloadDefaultValueString { get; set; } +#nullable restore +#else + public string CustomPropertySetPayloadDefaultValueString { get; set; } +#endif + /// Composed type representation for type List<string> +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? String { get; set; } +#nullable restore +#else + public List String { get; set; } +#endif + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.CustomPropertySetPayload.CustomPropertySetPayload_default_value CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + var mappingValue = parseNode.GetChildNode("")?.GetStringValue(); + var result = new global::Ayllu.Github.Client.Models.CustomPropertySetPayload.CustomPropertySetPayload_default_value(); + if(parseNode.GetStringValue() is string customPropertySetPayloadDefaultValueStringValue) + { + result.CustomPropertySetPayloadDefaultValueString = customPropertySetPayloadDefaultValueStringValue; + } + else if(parseNode.GetCollectionOfPrimitiveValues()?.AsList() is List stringValue) + { + result.String = stringValue; + } + return result; + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary>(); + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(CustomPropertySetPayloadDefaultValueString != null) + { + writer.WriteStringValue(null, CustomPropertySetPayloadDefaultValueString); + } + else if(String != null) + { + writer.WriteCollectionOfPrimitiveValues(null, String); + } + } + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/CustomPropertySetPayload_value_type.cs b/src/Ayllu.Github.Client/Github/Client/Models/CustomPropertySetPayload_value_type.cs new file mode 100644 index 0000000..cd01b89 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/CustomPropertySetPayload_value_type.cs @@ -0,0 +1,27 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Models +{ + /// The type of the value for the property + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public enum CustomPropertySetPayload_value_type + { + [EnumMember(Value = "string")] + #pragma warning disable CS1591 + String, + #pragma warning restore CS1591 + [EnumMember(Value = "single_select")] + #pragma warning disable CS1591 + Single_select, + #pragma warning restore CS1591 + [EnumMember(Value = "multi_select")] + #pragma warning disable CS1591 + Multi_select, + #pragma warning restore CS1591 + [EnumMember(Value = "true_false")] + #pragma warning disable CS1591 + True_false, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Models/CustomPropertySetPayload_values_editable_by.cs b/src/Ayllu.Github.Client/Github/Client/Models/CustomPropertySetPayload_values_editable_by.cs new file mode 100644 index 0000000..c6a9790 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/CustomPropertySetPayload_values_editable_by.cs @@ -0,0 +1,19 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Models +{ + /// Who can edit the values of the property + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public enum CustomPropertySetPayload_values_editable_by + { + [EnumMember(Value = "org_actors")] + #pragma warning disable CS1591 + Org_actors, + #pragma warning restore CS1591 + [EnumMember(Value = "org_and_repo_actors")] + #pragma warning disable CS1591 + Org_and_repo_actors, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Models/CustomPropertyValue.cs b/src/Ayllu.Github.Client/Github/Client/Models/CustomPropertyValue.cs new file mode 100644 index 0000000..ded43e8 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/CustomPropertyValue.cs @@ -0,0 +1,143 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + /// + /// Custom property name and associated value + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class CustomPropertyValue : IAdditionalDataHolder, IParsable + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The name of the property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? PropertyName { get; set; } +#nullable restore +#else + public string PropertyName { get; set; } +#endif + /// The value assigned to the property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.CustomPropertyValue.CustomPropertyValue_value? Value { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.CustomPropertyValue.CustomPropertyValue_value Value { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public CustomPropertyValue() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.CustomPropertyValue CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.CustomPropertyValue(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "property_name", n => { PropertyName = n.GetStringValue(); } }, + { "value", n => { Value = n.GetObjectValue(global::Ayllu.Github.Client.Models.CustomPropertyValue.CustomPropertyValue_value.CreateFromDiscriminatorValue); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("property_name", PropertyName); + writer.WriteObjectValue("value", Value); + writer.WriteAdditionalData(AdditionalData); + } + /// + /// Composed type wrapper for classes , List<string> + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class CustomPropertyValue_value : IComposedTypeWrapper, IParsable + { + /// Composed type representation for type +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? CustomPropertyValueValueString { get; set; } +#nullable restore +#else + public string CustomPropertyValueValueString { get; set; } +#endif + /// Composed type representation for type List<string> +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? String { get; set; } +#nullable restore +#else + public List String { get; set; } +#endif + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.CustomPropertyValue.CustomPropertyValue_value CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + var mappingValue = parseNode.GetChildNode("")?.GetStringValue(); + var result = new global::Ayllu.Github.Client.Models.CustomPropertyValue.CustomPropertyValue_value(); + if(parseNode.GetStringValue() is string customPropertyValueValueStringValue) + { + result.CustomPropertyValueValueString = customPropertyValueValueStringValue; + } + else if(parseNode.GetCollectionOfPrimitiveValues()?.AsList() is List stringValue) + { + result.String = stringValue; + } + return result; + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary>(); + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(CustomPropertyValueValueString != null) + { + writer.WriteStringValue(null, CustomPropertyValueValueString); + } + else if(String != null) + { + writer.WriteCollectionOfPrimitiveValues(null, String); + } + } + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/CustomProperty_source_type.cs b/src/Ayllu.Github.Client/Github/Client/Models/CustomProperty_source_type.cs new file mode 100644 index 0000000..78b31c6 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/CustomProperty_source_type.cs @@ -0,0 +1,19 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Models +{ + /// The source type of the property + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public enum CustomProperty_source_type + { + [EnumMember(Value = "organization")] + #pragma warning disable CS1591 + Organization, + #pragma warning restore CS1591 + [EnumMember(Value = "enterprise")] + #pragma warning disable CS1591 + Enterprise, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Models/CustomProperty_value_type.cs b/src/Ayllu.Github.Client/Github/Client/Models/CustomProperty_value_type.cs new file mode 100644 index 0000000..ef5f015 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/CustomProperty_value_type.cs @@ -0,0 +1,27 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Models +{ + /// The type of the value for the property + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public enum CustomProperty_value_type + { + [EnumMember(Value = "string")] + #pragma warning disable CS1591 + String, + #pragma warning restore CS1591 + [EnumMember(Value = "single_select")] + #pragma warning disable CS1591 + Single_select, + #pragma warning restore CS1591 + [EnumMember(Value = "multi_select")] + #pragma warning disable CS1591 + Multi_select, + #pragma warning restore CS1591 + [EnumMember(Value = "true_false")] + #pragma warning disable CS1591 + True_false, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Models/CustomProperty_values_editable_by.cs b/src/Ayllu.Github.Client/Github/Client/Models/CustomProperty_values_editable_by.cs new file mode 100644 index 0000000..ce83e26 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/CustomProperty_values_editable_by.cs @@ -0,0 +1,19 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Models +{ + /// Who can edit the values of the property + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public enum CustomProperty_values_editable_by + { + [EnumMember(Value = "org_actors")] + #pragma warning disable CS1591 + Org_actors, + #pragma warning restore CS1591 + [EnumMember(Value = "org_and_repo_actors")] + #pragma warning disable CS1591 + Org_and_repo_actors, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Models/CvssSeverities.cs b/src/Ayllu.Github.Client/Github/Client/Models/CvssSeverities.cs new file mode 100644 index 0000000..d5aff53 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/CvssSeverities.cs @@ -0,0 +1,75 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class CvssSeverities : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The cvss_v3 property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.CvssSeverities_cvss_v3? CvssV3 { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.CvssSeverities_cvss_v3 CvssV3 { get; set; } +#endif + /// The cvss_v4 property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.CvssSeverities_cvss_v4? CvssV4 { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.CvssSeverities_cvss_v4 CvssV4 { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public CvssSeverities() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.CvssSeverities CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.CvssSeverities(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "cvss_v3", n => { CvssV3 = n.GetObjectValue(global::Ayllu.Github.Client.Models.CvssSeverities_cvss_v3.CreateFromDiscriminatorValue); } }, + { "cvss_v4", n => { CvssV4 = n.GetObjectValue(global::Ayllu.Github.Client.Models.CvssSeverities_cvss_v4.CreateFromDiscriminatorValue); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteObjectValue("cvss_v3", CvssV3); + writer.WriteObjectValue("cvss_v4", CvssV4); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/CvssSeverities_cvss_v3.cs b/src/Ayllu.Github.Client/Github/Client/Models/CvssSeverities_cvss_v3.cs new file mode 100644 index 0000000..fd1505e --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/CvssSeverities_cvss_v3.cs @@ -0,0 +1,68 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class CvssSeverities_cvss_v3 : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The CVSS 3 score. + public double? Score { get; private set; } + /// The CVSS 3 vector string. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? VectorString { get; set; } +#nullable restore +#else + public string VectorString { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public CvssSeverities_cvss_v3() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.CvssSeverities_cvss_v3 CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.CvssSeverities_cvss_v3(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "score", n => { Score = n.GetDoubleValue(); } }, + { "vector_string", n => { VectorString = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("vector_string", VectorString); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/CvssSeverities_cvss_v4.cs b/src/Ayllu.Github.Client/Github/Client/Models/CvssSeverities_cvss_v4.cs new file mode 100644 index 0000000..18ad151 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/CvssSeverities_cvss_v4.cs @@ -0,0 +1,68 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class CvssSeverities_cvss_v4 : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The CVSS 4 score. + public double? Score { get; private set; } + /// The CVSS 4 vector string. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? VectorString { get; set; } +#nullable restore +#else + public string VectorString { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public CvssSeverities_cvss_v4() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.CvssSeverities_cvss_v4 CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.CvssSeverities_cvss_v4(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "score", n => { Score = n.GetDoubleValue(); } }, + { "vector_string", n => { VectorString = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("vector_string", VectorString); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/Databases503Error.cs b/src/Ayllu.Github.Client/Github/Client/Models/Databases503Error.cs new file mode 100644 index 0000000..d3d5908 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/Databases503Error.cs @@ -0,0 +1,88 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class Databases503Error : ApiException, IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The code property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Code { get; set; } +#nullable restore +#else + public string Code { get; set; } +#endif + /// The documentation_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? DocumentationUrl { get; set; } +#nullable restore +#else + public string DocumentationUrl { get; set; } +#endif + /// The primary error message. + public override string Message { get => MessageEscaped ?? string.Empty; } + /// The message property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? MessageEscaped { get; set; } +#nullable restore +#else + public string MessageEscaped { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public Databases503Error() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.Databases503Error CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.Databases503Error(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "code", n => { Code = n.GetStringValue(); } }, + { "documentation_url", n => { DocumentationUrl = n.GetStringValue(); } }, + { "message", n => { MessageEscaped = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("code", Code); + writer.WriteStringValue("documentation_url", DocumentationUrl); + writer.WriteStringValue("message", MessageEscaped); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/DemilestonedIssueEvent.cs b/src/Ayllu.Github.Client/Github/Client/Models/DemilestonedIssueEvent.cs new file mode 100644 index 0000000..c1122bd --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/DemilestonedIssueEvent.cs @@ -0,0 +1,150 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + /// + /// Demilestoned Issue Event + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class DemilestonedIssueEvent : IAdditionalDataHolder, IParsable + { + /// A GitHub user. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.SimpleUser? Actor { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.SimpleUser Actor { get; set; } +#endif + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The commit_id property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? CommitId { get; set; } +#nullable restore +#else + public string CommitId { get; set; } +#endif + /// The commit_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? CommitUrl { get; set; } +#nullable restore +#else + public string CommitUrl { get; set; } +#endif + /// The created_at property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? CreatedAt { get; set; } +#nullable restore +#else + public string CreatedAt { get; set; } +#endif + /// The event property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Event { get; set; } +#nullable restore +#else + public string Event { get; set; } +#endif + /// The id property + public int? Id { get; set; } + /// The milestone property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.DemilestonedIssueEvent_milestone? Milestone { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.DemilestonedIssueEvent_milestone Milestone { get; set; } +#endif + /// The node_id property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? NodeId { get; set; } +#nullable restore +#else + public string NodeId { get; set; } +#endif + /// 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. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.NullableIntegration? PerformedViaGithubApp { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.NullableIntegration PerformedViaGithubApp { get; set; } +#endif + /// The url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Url { get; set; } +#nullable restore +#else + public string Url { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public DemilestonedIssueEvent() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.DemilestonedIssueEvent CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.DemilestonedIssueEvent(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "actor", n => { Actor = n.GetObjectValue(global::Ayllu.Github.Client.Models.SimpleUser.CreateFromDiscriminatorValue); } }, + { "commit_id", n => { CommitId = n.GetStringValue(); } }, + { "commit_url", n => { CommitUrl = n.GetStringValue(); } }, + { "created_at", n => { CreatedAt = n.GetStringValue(); } }, + { "event", n => { Event = n.GetStringValue(); } }, + { "id", n => { Id = n.GetIntValue(); } }, + { "milestone", n => { Milestone = n.GetObjectValue(global::Ayllu.Github.Client.Models.DemilestonedIssueEvent_milestone.CreateFromDiscriminatorValue); } }, + { "node_id", n => { NodeId = n.GetStringValue(); } }, + { "performed_via_github_app", n => { PerformedViaGithubApp = n.GetObjectValue(global::Ayllu.Github.Client.Models.NullableIntegration.CreateFromDiscriminatorValue); } }, + { "url", n => { Url = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteObjectValue("actor", Actor); + writer.WriteStringValue("commit_id", CommitId); + writer.WriteStringValue("commit_url", CommitUrl); + writer.WriteStringValue("created_at", CreatedAt); + writer.WriteStringValue("event", Event); + writer.WriteIntValue("id", Id); + writer.WriteObjectValue("milestone", Milestone); + writer.WriteStringValue("node_id", NodeId); + writer.WriteObjectValue("performed_via_github_app", PerformedViaGithubApp); + writer.WriteStringValue("url", Url); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/DemilestonedIssueEvent_milestone.cs b/src/Ayllu.Github.Client/Github/Client/Models/DemilestonedIssueEvent_milestone.cs new file mode 100644 index 0000000..38dddf5 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/DemilestonedIssueEvent_milestone.cs @@ -0,0 +1,65 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class DemilestonedIssueEvent_milestone : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The title property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Title { get; set; } +#nullable restore +#else + public string Title { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public DemilestonedIssueEvent_milestone() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.DemilestonedIssueEvent_milestone CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.DemilestonedIssueEvent_milestone(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "title", n => { Title = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("title", Title); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/DependabotAlert.cs b/src/Ayllu.Github.Client/Github/Client/Models/DependabotAlert.cs new file mode 100644 index 0000000..2e57205 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/DependabotAlert.cs @@ -0,0 +1,136 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + /// + /// A Dependabot alert. + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class DependabotAlert : IParsable + { + /// The time that the alert was auto-dismissed in ISO 8601 format: `YYYY-MM-DDTHH:MM:SSZ`. + public DateTimeOffset? AutoDismissedAt { get; private set; } + /// The time that the alert was created in ISO 8601 format: `YYYY-MM-DDTHH:MM:SSZ`. + public DateTimeOffset? CreatedAt { get; private set; } + /// Details for the vulnerable dependency. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.DependabotAlert_dependency? Dependency { get; private set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.DependabotAlert_dependency Dependency { get; private set; } +#endif + /// The time that the alert was dismissed in ISO 8601 format: `YYYY-MM-DDTHH:MM:SSZ`. + public DateTimeOffset? DismissedAt { get; private set; } + /// A GitHub user. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.NullableSimpleUser? DismissedBy { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.NullableSimpleUser DismissedBy { get; set; } +#endif + /// An optional comment associated with the alert's dismissal. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? DismissedComment { get; set; } +#nullable restore +#else + public string DismissedComment { get; set; } +#endif + /// The reason that the alert was dismissed. + public global::Ayllu.Github.Client.Models.DependabotAlert_dismissed_reason? DismissedReason { get; set; } + /// The time that the alert was no longer detected and was considered fixed in ISO 8601 format: `YYYY-MM-DDTHH:MM:SSZ`. + public DateTimeOffset? FixedAt { get; private set; } + /// The GitHub URL of the alert resource. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? HtmlUrl { get; private set; } +#nullable restore +#else + public string HtmlUrl { get; private set; } +#endif + /// The security alert number. + public int? Number { get; private set; } + /// Details for the GitHub Security Advisory. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.DependabotAlertSecurityAdvisory? SecurityAdvisory { get; private set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.DependabotAlertSecurityAdvisory SecurityAdvisory { get; private set; } +#endif + /// Details pertaining to one vulnerable version range for the advisory. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.DependabotAlertSecurityVulnerability? SecurityVulnerability { get; private set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.DependabotAlertSecurityVulnerability SecurityVulnerability { get; private set; } +#endif + /// The state of the Dependabot alert. + public global::Ayllu.Github.Client.Models.DependabotAlert_state? State { get; private set; } + /// The time that the alert was last updated in ISO 8601 format: `YYYY-MM-DDTHH:MM:SSZ`. + public DateTimeOffset? UpdatedAt { get; private set; } + /// The REST API URL of the alert resource. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Url { get; private set; } +#nullable restore +#else + public string Url { get; private set; } +#endif + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.DependabotAlert CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.DependabotAlert(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "auto_dismissed_at", n => { AutoDismissedAt = n.GetDateTimeOffsetValue(); } }, + { "created_at", n => { CreatedAt = n.GetDateTimeOffsetValue(); } }, + { "dependency", n => { Dependency = n.GetObjectValue(global::Ayllu.Github.Client.Models.DependabotAlert_dependency.CreateFromDiscriminatorValue); } }, + { "dismissed_at", n => { DismissedAt = n.GetDateTimeOffsetValue(); } }, + { "dismissed_by", n => { DismissedBy = n.GetObjectValue(global::Ayllu.Github.Client.Models.NullableSimpleUser.CreateFromDiscriminatorValue); } }, + { "dismissed_comment", n => { DismissedComment = n.GetStringValue(); } }, + { "dismissed_reason", n => { DismissedReason = n.GetEnumValue(); } }, + { "fixed_at", n => { FixedAt = n.GetDateTimeOffsetValue(); } }, + { "html_url", n => { HtmlUrl = n.GetStringValue(); } }, + { "number", n => { Number = n.GetIntValue(); } }, + { "security_advisory", n => { SecurityAdvisory = n.GetObjectValue(global::Ayllu.Github.Client.Models.DependabotAlertSecurityAdvisory.CreateFromDiscriminatorValue); } }, + { "security_vulnerability", n => { SecurityVulnerability = n.GetObjectValue(global::Ayllu.Github.Client.Models.DependabotAlertSecurityVulnerability.CreateFromDiscriminatorValue); } }, + { "state", n => { State = n.GetEnumValue(); } }, + { "updated_at", n => { UpdatedAt = n.GetDateTimeOffsetValue(); } }, + { "url", n => { Url = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteObjectValue("dismissed_by", DismissedBy); + writer.WriteStringValue("dismissed_comment", DismissedComment); + writer.WriteEnumValue("dismissed_reason", DismissedReason); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/DependabotAlertPackage.cs b/src/Ayllu.Github.Client/Github/Client/Models/DependabotAlertPackage.cs new file mode 100644 index 0000000..452957e --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/DependabotAlertPackage.cs @@ -0,0 +1,64 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + /// + /// Details for the vulnerable package. + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class DependabotAlertPackage : IParsable + { + /// The package's language or package management ecosystem. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Ecosystem { get; private set; } +#nullable restore +#else + public string Ecosystem { get; private set; } +#endif + /// The unique package name within its ecosystem. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Name { get; private set; } +#nullable restore +#else + public string Name { get; private set; } +#endif + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.DependabotAlertPackage CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.DependabotAlertPackage(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "ecosystem", n => { Ecosystem = n.GetStringValue(); } }, + { "name", n => { Name = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/DependabotAlertSecurityAdvisory.cs b/src/Ayllu.Github.Client/Github/Client/Models/DependabotAlertSecurityAdvisory.cs new file mode 100644 index 0000000..f4eedba --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/DependabotAlertSecurityAdvisory.cs @@ -0,0 +1,158 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + /// + /// Details for the GitHub Security Advisory. + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class DependabotAlertSecurityAdvisory : IParsable + { + /// The unique CVE ID assigned to the advisory. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? CveId { get; private set; } +#nullable restore +#else + public string CveId { get; private set; } +#endif + /// Details for the advisory pertaining to the Common Vulnerability Scoring System. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.DependabotAlertSecurityAdvisory_cvss? Cvss { get; private set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.DependabotAlertSecurityAdvisory_cvss Cvss { get; private set; } +#endif + /// The cvss_severities property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.CvssSeverities? CvssSeverities { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.CvssSeverities CvssSeverities { get; set; } +#endif + /// Details for the advisory pertaining to Common Weakness Enumeration. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? Cwes { get; private set; } +#nullable restore +#else + public List Cwes { get; private set; } +#endif + /// A long-form Markdown-supported description of the advisory. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Description { get; private set; } +#nullable restore +#else + public string Description { get; private set; } +#endif + /// The EPSS scores as calculated by the [Exploit Prediction Scoring System](https://www.first.org/epss). +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.SecurityAdvisoryEpss? Epss { get; private set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.SecurityAdvisoryEpss Epss { get; private set; } +#endif + /// The unique GitHub Security Advisory ID assigned to the advisory. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? GhsaId { get; private set; } +#nullable restore +#else + public string GhsaId { get; private set; } +#endif + /// Values that identify this advisory among security information sources. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? Identifiers { get; private set; } +#nullable restore +#else + public List Identifiers { get; private set; } +#endif + /// The time that the advisory was published in ISO 8601 format: `YYYY-MM-DDTHH:MM:SSZ`. + public DateTimeOffset? PublishedAt { get; private set; } + /// Links to additional advisory information. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? References { get; private set; } +#nullable restore +#else + public List References { get; private set; } +#endif + /// The severity of the advisory. + public global::Ayllu.Github.Client.Models.DependabotAlertSecurityAdvisory_severity? Severity { get; private set; } + /// A short, plain text summary of the advisory. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Summary { get; private set; } +#nullable restore +#else + public string Summary { get; private set; } +#endif + /// The time that the advisory was last modified in ISO 8601 format: `YYYY-MM-DDTHH:MM:SSZ`. + public DateTimeOffset? UpdatedAt { get; private set; } + /// Vulnerable version range information for the advisory. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? Vulnerabilities { get; private set; } +#nullable restore +#else + public List Vulnerabilities { get; private set; } +#endif + /// The time that the advisory was withdrawn in ISO 8601 format: `YYYY-MM-DDTHH:MM:SSZ`. + public DateTimeOffset? WithdrawnAt { get; private set; } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.DependabotAlertSecurityAdvisory CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.DependabotAlertSecurityAdvisory(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "cve_id", n => { CveId = n.GetStringValue(); } }, + { "cvss", n => { Cvss = n.GetObjectValue(global::Ayllu.Github.Client.Models.DependabotAlertSecurityAdvisory_cvss.CreateFromDiscriminatorValue); } }, + { "cvss_severities", n => { CvssSeverities = n.GetObjectValue(global::Ayllu.Github.Client.Models.CvssSeverities.CreateFromDiscriminatorValue); } }, + { "cwes", n => { Cwes = n.GetCollectionOfObjectValues(global::Ayllu.Github.Client.Models.DependabotAlertSecurityAdvisory_cwes.CreateFromDiscriminatorValue)?.AsList(); } }, + { "description", n => { Description = n.GetStringValue(); } }, + { "epss", n => { Epss = n.GetObjectValue(global::Ayllu.Github.Client.Models.SecurityAdvisoryEpss.CreateFromDiscriminatorValue); } }, + { "ghsa_id", n => { GhsaId = n.GetStringValue(); } }, + { "identifiers", n => { Identifiers = n.GetCollectionOfObjectValues(global::Ayllu.Github.Client.Models.DependabotAlertSecurityAdvisory_identifiers.CreateFromDiscriminatorValue)?.AsList(); } }, + { "published_at", n => { PublishedAt = n.GetDateTimeOffsetValue(); } }, + { "references", n => { References = n.GetCollectionOfObjectValues(global::Ayllu.Github.Client.Models.DependabotAlertSecurityAdvisory_references.CreateFromDiscriminatorValue)?.AsList(); } }, + { "severity", n => { Severity = n.GetEnumValue(); } }, + { "summary", n => { Summary = n.GetStringValue(); } }, + { "updated_at", n => { UpdatedAt = n.GetDateTimeOffsetValue(); } }, + { "vulnerabilities", n => { Vulnerabilities = n.GetCollectionOfObjectValues(global::Ayllu.Github.Client.Models.DependabotAlertSecurityVulnerability.CreateFromDiscriminatorValue)?.AsList(); } }, + { "withdrawn_at", n => { WithdrawnAt = n.GetDateTimeOffsetValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteObjectValue("cvss_severities", CvssSeverities); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/DependabotAlertSecurityAdvisory_cvss.cs b/src/Ayllu.Github.Client/Github/Client/Models/DependabotAlertSecurityAdvisory_cvss.cs new file mode 100644 index 0000000..1231c37 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/DependabotAlertSecurityAdvisory_cvss.cs @@ -0,0 +1,58 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + /// + /// Details for the advisory pertaining to the Common Vulnerability Scoring System. + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class DependabotAlertSecurityAdvisory_cvss : IParsable + { + /// The overall CVSS score of the advisory. + public double? Score { get; private set; } + /// The full CVSS vector string for the advisory. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? VectorString { get; private set; } +#nullable restore +#else + public string VectorString { get; private set; } +#endif + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.DependabotAlertSecurityAdvisory_cvss CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.DependabotAlertSecurityAdvisory_cvss(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "score", n => { Score = n.GetDoubleValue(); } }, + { "vector_string", n => { VectorString = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/DependabotAlertSecurityAdvisory_cwes.cs b/src/Ayllu.Github.Client/Github/Client/Models/DependabotAlertSecurityAdvisory_cwes.cs new file mode 100644 index 0000000..34e9966 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/DependabotAlertSecurityAdvisory_cwes.cs @@ -0,0 +1,64 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + /// + /// A CWE weakness assigned to the advisory. + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class DependabotAlertSecurityAdvisory_cwes : IParsable + { + /// The unique CWE ID. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? CweId { get; private set; } +#nullable restore +#else + public string CweId { get; private set; } +#endif + /// The short, plain text name of the CWE. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Name { get; private set; } +#nullable restore +#else + public string Name { get; private set; } +#endif + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.DependabotAlertSecurityAdvisory_cwes CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.DependabotAlertSecurityAdvisory_cwes(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "cwe_id", n => { CweId = n.GetStringValue(); } }, + { "name", n => { Name = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/DependabotAlertSecurityAdvisory_identifiers.cs b/src/Ayllu.Github.Client/Github/Client/Models/DependabotAlertSecurityAdvisory_identifiers.cs new file mode 100644 index 0000000..ebb5b2e --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/DependabotAlertSecurityAdvisory_identifiers.cs @@ -0,0 +1,58 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + /// + /// An advisory identifier. + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class DependabotAlertSecurityAdvisory_identifiers : IParsable + { + /// The type of advisory identifier. + public global::Ayllu.Github.Client.Models.DependabotAlertSecurityAdvisory_identifiers_type? Type { get; private set; } + /// The value of the advisory identifer. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Value { get; private set; } +#nullable restore +#else + public string Value { get; private set; } +#endif + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.DependabotAlertSecurityAdvisory_identifiers CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.DependabotAlertSecurityAdvisory_identifiers(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "type", n => { Type = n.GetEnumValue(); } }, + { "value", n => { Value = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/DependabotAlertSecurityAdvisory_identifiers_type.cs b/src/Ayllu.Github.Client/Github/Client/Models/DependabotAlertSecurityAdvisory_identifiers_type.cs new file mode 100644 index 0000000..5d6c350 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/DependabotAlertSecurityAdvisory_identifiers_type.cs @@ -0,0 +1,19 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Models +{ + /// The type of advisory identifier. + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public enum DependabotAlertSecurityAdvisory_identifiers_type + { + [EnumMember(Value = "CVE")] + #pragma warning disable CS1591 + CVE, + #pragma warning restore CS1591 + [EnumMember(Value = "GHSA")] + #pragma warning disable CS1591 + GHSA, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Models/DependabotAlertSecurityAdvisory_references.cs b/src/Ayllu.Github.Client/Github/Client/Models/DependabotAlertSecurityAdvisory_references.cs new file mode 100644 index 0000000..904ea3e --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/DependabotAlertSecurityAdvisory_references.cs @@ -0,0 +1,55 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + /// + /// A link to additional advisory information. + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class DependabotAlertSecurityAdvisory_references : IParsable + { + /// The URL of the reference. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Url { get; private set; } +#nullable restore +#else + public string Url { get; private set; } +#endif + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.DependabotAlertSecurityAdvisory_references CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.DependabotAlertSecurityAdvisory_references(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "url", n => { Url = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/DependabotAlertSecurityAdvisory_severity.cs b/src/Ayllu.Github.Client/Github/Client/Models/DependabotAlertSecurityAdvisory_severity.cs new file mode 100644 index 0000000..a268912 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/DependabotAlertSecurityAdvisory_severity.cs @@ -0,0 +1,27 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Models +{ + /// The severity of the advisory. + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public enum DependabotAlertSecurityAdvisory_severity + { + [EnumMember(Value = "low")] + #pragma warning disable CS1591 + Low, + #pragma warning restore CS1591 + [EnumMember(Value = "medium")] + #pragma warning disable CS1591 + Medium, + #pragma warning restore CS1591 + [EnumMember(Value = "high")] + #pragma warning disable CS1591 + High, + #pragma warning restore CS1591 + [EnumMember(Value = "critical")] + #pragma warning disable CS1591 + Critical, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Models/DependabotAlertSecurityVulnerability.cs b/src/Ayllu.Github.Client/Github/Client/Models/DependabotAlertSecurityVulnerability.cs new file mode 100644 index 0000000..f399408 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/DependabotAlertSecurityVulnerability.cs @@ -0,0 +1,76 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + /// + /// Details pertaining to one vulnerable version range for the advisory. + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class DependabotAlertSecurityVulnerability : IParsable + { + /// Details pertaining to the package version that patches this vulnerability. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.DependabotAlertSecurityVulnerability_first_patched_version? FirstPatchedVersion { get; private set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.DependabotAlertSecurityVulnerability_first_patched_version FirstPatchedVersion { get; private set; } +#endif + /// Details for the vulnerable package. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.DependabotAlertPackage? Package { get; private set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.DependabotAlertPackage Package { get; private set; } +#endif + /// The severity of the vulnerability. + public global::Ayllu.Github.Client.Models.DependabotAlertSecurityVulnerability_severity? Severity { get; private set; } + /// Conditions that identify vulnerable versions of this vulnerability's package. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? VulnerableVersionRange { get; private set; } +#nullable restore +#else + public string VulnerableVersionRange { get; private set; } +#endif + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.DependabotAlertSecurityVulnerability CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.DependabotAlertSecurityVulnerability(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "first_patched_version", n => { FirstPatchedVersion = n.GetObjectValue(global::Ayllu.Github.Client.Models.DependabotAlertSecurityVulnerability_first_patched_version.CreateFromDiscriminatorValue); } }, + { "package", n => { Package = n.GetObjectValue(global::Ayllu.Github.Client.Models.DependabotAlertPackage.CreateFromDiscriminatorValue); } }, + { "severity", n => { Severity = n.GetEnumValue(); } }, + { "vulnerable_version_range", n => { VulnerableVersionRange = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/DependabotAlertSecurityVulnerability_first_patched_version.cs b/src/Ayllu.Github.Client/Github/Client/Models/DependabotAlertSecurityVulnerability_first_patched_version.cs new file mode 100644 index 0000000..b040c12 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/DependabotAlertSecurityVulnerability_first_patched_version.cs @@ -0,0 +1,55 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + /// + /// Details pertaining to the package version that patches this vulnerability. + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class DependabotAlertSecurityVulnerability_first_patched_version : IParsable + { + /// The package version that patches this vulnerability. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Identifier { get; private set; } +#nullable restore +#else + public string Identifier { get; private set; } +#endif + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.DependabotAlertSecurityVulnerability_first_patched_version CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.DependabotAlertSecurityVulnerability_first_patched_version(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "identifier", n => { Identifier = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/DependabotAlertSecurityVulnerability_severity.cs b/src/Ayllu.Github.Client/Github/Client/Models/DependabotAlertSecurityVulnerability_severity.cs new file mode 100644 index 0000000..568a90f --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/DependabotAlertSecurityVulnerability_severity.cs @@ -0,0 +1,27 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Models +{ + /// The severity of the vulnerability. + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public enum DependabotAlertSecurityVulnerability_severity + { + [EnumMember(Value = "low")] + #pragma warning disable CS1591 + Low, + #pragma warning restore CS1591 + [EnumMember(Value = "medium")] + #pragma warning disable CS1591 + Medium, + #pragma warning restore CS1591 + [EnumMember(Value = "high")] + #pragma warning disable CS1591 + High, + #pragma warning restore CS1591 + [EnumMember(Value = "critical")] + #pragma warning disable CS1591 + Critical, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Models/DependabotAlertWithRepository.cs b/src/Ayllu.Github.Client/Github/Client/Models/DependabotAlertWithRepository.cs new file mode 100644 index 0000000..8542526 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/DependabotAlertWithRepository.cs @@ -0,0 +1,146 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + /// + /// A Dependabot alert. + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class DependabotAlertWithRepository : IParsable + { + /// The time that the alert was auto-dismissed in ISO 8601 format: `YYYY-MM-DDTHH:MM:SSZ`. + public DateTimeOffset? AutoDismissedAt { get; private set; } + /// The time that the alert was created in ISO 8601 format: `YYYY-MM-DDTHH:MM:SSZ`. + public DateTimeOffset? CreatedAt { get; private set; } + /// Details for the vulnerable dependency. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.DependabotAlertWithRepository_dependency? Dependency { get; private set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.DependabotAlertWithRepository_dependency Dependency { get; private set; } +#endif + /// The time that the alert was dismissed in ISO 8601 format: `YYYY-MM-DDTHH:MM:SSZ`. + public DateTimeOffset? DismissedAt { get; private set; } + /// A GitHub user. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.NullableSimpleUser? DismissedBy { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.NullableSimpleUser DismissedBy { get; set; } +#endif + /// An optional comment associated with the alert's dismissal. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? DismissedComment { get; set; } +#nullable restore +#else + public string DismissedComment { get; set; } +#endif + /// The reason that the alert was dismissed. + public global::Ayllu.Github.Client.Models.DependabotAlertWithRepository_dismissed_reason? DismissedReason { get; set; } + /// The time that the alert was no longer detected and was considered fixed in ISO 8601 format: `YYYY-MM-DDTHH:MM:SSZ`. + public DateTimeOffset? FixedAt { get; private set; } + /// The GitHub URL of the alert resource. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? HtmlUrl { get; private set; } +#nullable restore +#else + public string HtmlUrl { get; private set; } +#endif + /// The security alert number. + public int? Number { get; private set; } + /// A GitHub repository. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.SimpleRepository? Repository { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.SimpleRepository Repository { get; set; } +#endif + /// Details for the GitHub Security Advisory. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.DependabotAlertSecurityAdvisory? SecurityAdvisory { get; private set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.DependabotAlertSecurityAdvisory SecurityAdvisory { get; private set; } +#endif + /// Details pertaining to one vulnerable version range for the advisory. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.DependabotAlertSecurityVulnerability? SecurityVulnerability { get; private set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.DependabotAlertSecurityVulnerability SecurityVulnerability { get; private set; } +#endif + /// The state of the Dependabot alert. + public global::Ayllu.Github.Client.Models.DependabotAlertWithRepository_state? State { get; private set; } + /// The time that the alert was last updated in ISO 8601 format: `YYYY-MM-DDTHH:MM:SSZ`. + public DateTimeOffset? UpdatedAt { get; private set; } + /// The REST API URL of the alert resource. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Url { get; private set; } +#nullable restore +#else + public string Url { get; private set; } +#endif + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.DependabotAlertWithRepository CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.DependabotAlertWithRepository(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "auto_dismissed_at", n => { AutoDismissedAt = n.GetDateTimeOffsetValue(); } }, + { "created_at", n => { CreatedAt = n.GetDateTimeOffsetValue(); } }, + { "dependency", n => { Dependency = n.GetObjectValue(global::Ayllu.Github.Client.Models.DependabotAlertWithRepository_dependency.CreateFromDiscriminatorValue); } }, + { "dismissed_at", n => { DismissedAt = n.GetDateTimeOffsetValue(); } }, + { "dismissed_by", n => { DismissedBy = n.GetObjectValue(global::Ayllu.Github.Client.Models.NullableSimpleUser.CreateFromDiscriminatorValue); } }, + { "dismissed_comment", n => { DismissedComment = n.GetStringValue(); } }, + { "dismissed_reason", n => { DismissedReason = n.GetEnumValue(); } }, + { "fixed_at", n => { FixedAt = n.GetDateTimeOffsetValue(); } }, + { "html_url", n => { HtmlUrl = n.GetStringValue(); } }, + { "number", n => { Number = n.GetIntValue(); } }, + { "repository", n => { Repository = n.GetObjectValue(global::Ayllu.Github.Client.Models.SimpleRepository.CreateFromDiscriminatorValue); } }, + { "security_advisory", n => { SecurityAdvisory = n.GetObjectValue(global::Ayllu.Github.Client.Models.DependabotAlertSecurityAdvisory.CreateFromDiscriminatorValue); } }, + { "security_vulnerability", n => { SecurityVulnerability = n.GetObjectValue(global::Ayllu.Github.Client.Models.DependabotAlertSecurityVulnerability.CreateFromDiscriminatorValue); } }, + { "state", n => { State = n.GetEnumValue(); } }, + { "updated_at", n => { UpdatedAt = n.GetDateTimeOffsetValue(); } }, + { "url", n => { Url = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteObjectValue("dismissed_by", DismissedBy); + writer.WriteStringValue("dismissed_comment", DismissedComment); + writer.WriteEnumValue("dismissed_reason", DismissedReason); + writer.WriteObjectValue("repository", Repository); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/DependabotAlertWithRepository_dependency.cs b/src/Ayllu.Github.Client/Github/Client/Models/DependabotAlertWithRepository_dependency.cs new file mode 100644 index 0000000..729ab80 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/DependabotAlertWithRepository_dependency.cs @@ -0,0 +1,80 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + /// + /// Details for the vulnerable dependency. + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class DependabotAlertWithRepository_dependency : IAdditionalDataHolder, IParsable + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The full path to the dependency manifest file, relative to the root of the repository. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? ManifestPath { get; private set; } +#nullable restore +#else + public string ManifestPath { get; private set; } +#endif + /// Details for the vulnerable package. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.DependabotAlertPackage? Package { get; private set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.DependabotAlertPackage Package { get; private set; } +#endif + /// The vulnerable dependency's relationship to your project.> [!NOTE]> We are rolling out support for dependency relationship across ecosystems. This value will be "unknown" for all dependencies in unsupported ecosystems. + public global::Ayllu.Github.Client.Models.DependabotAlertWithRepository_dependency_relationship? Relationship { get; private set; } + /// The execution scope of the vulnerable dependency. + public global::Ayllu.Github.Client.Models.DependabotAlertWithRepository_dependency_scope? Scope { get; private set; } + /// + /// Instantiates a new and sets the default values. + /// + public DependabotAlertWithRepository_dependency() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.DependabotAlertWithRepository_dependency CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.DependabotAlertWithRepository_dependency(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "manifest_path", n => { ManifestPath = n.GetStringValue(); } }, + { "package", n => { Package = n.GetObjectValue(global::Ayllu.Github.Client.Models.DependabotAlertPackage.CreateFromDiscriminatorValue); } }, + { "relationship", n => { Relationship = n.GetEnumValue(); } }, + { "scope", n => { Scope = n.GetEnumValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/DependabotAlertWithRepository_dependency_relationship.cs b/src/Ayllu.Github.Client/Github/Client/Models/DependabotAlertWithRepository_dependency_relationship.cs new file mode 100644 index 0000000..b939e54 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/DependabotAlertWithRepository_dependency_relationship.cs @@ -0,0 +1,23 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Models +{ + /// The vulnerable dependency's relationship to your project.> [!NOTE]> We are rolling out support for dependency relationship across ecosystems. This value will be "unknown" for all dependencies in unsupported ecosystems. + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public enum DependabotAlertWithRepository_dependency_relationship + { + [EnumMember(Value = "unknown")] + #pragma warning disable CS1591 + Unknown, + #pragma warning restore CS1591 + [EnumMember(Value = "direct")] + #pragma warning disable CS1591 + Direct, + #pragma warning restore CS1591 + [EnumMember(Value = "transitive")] + #pragma warning disable CS1591 + Transitive, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Models/DependabotAlertWithRepository_dependency_scope.cs b/src/Ayllu.Github.Client/Github/Client/Models/DependabotAlertWithRepository_dependency_scope.cs new file mode 100644 index 0000000..4a6a6ee --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/DependabotAlertWithRepository_dependency_scope.cs @@ -0,0 +1,19 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Models +{ + /// The execution scope of the vulnerable dependency. + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public enum DependabotAlertWithRepository_dependency_scope + { + [EnumMember(Value = "development")] + #pragma warning disable CS1591 + Development, + #pragma warning restore CS1591 + [EnumMember(Value = "runtime")] + #pragma warning disable CS1591 + Runtime, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Models/DependabotAlertWithRepository_dismissed_reason.cs b/src/Ayllu.Github.Client/Github/Client/Models/DependabotAlertWithRepository_dismissed_reason.cs new file mode 100644 index 0000000..6640e94 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/DependabotAlertWithRepository_dismissed_reason.cs @@ -0,0 +1,31 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Models +{ + /// The reason that the alert was dismissed. + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public enum DependabotAlertWithRepository_dismissed_reason + { + [EnumMember(Value = "fix_started")] + #pragma warning disable CS1591 + Fix_started, + #pragma warning restore CS1591 + [EnumMember(Value = "inaccurate")] + #pragma warning disable CS1591 + Inaccurate, + #pragma warning restore CS1591 + [EnumMember(Value = "no_bandwidth")] + #pragma warning disable CS1591 + No_bandwidth, + #pragma warning restore CS1591 + [EnumMember(Value = "not_used")] + #pragma warning disable CS1591 + Not_used, + #pragma warning restore CS1591 + [EnumMember(Value = "tolerable_risk")] + #pragma warning disable CS1591 + Tolerable_risk, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Models/DependabotAlertWithRepository_state.cs b/src/Ayllu.Github.Client/Github/Client/Models/DependabotAlertWithRepository_state.cs new file mode 100644 index 0000000..0f50c9c --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/DependabotAlertWithRepository_state.cs @@ -0,0 +1,27 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Models +{ + /// The state of the Dependabot alert. + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public enum DependabotAlertWithRepository_state + { + [EnumMember(Value = "auto_dismissed")] + #pragma warning disable CS1591 + Auto_dismissed, + #pragma warning restore CS1591 + [EnumMember(Value = "dismissed")] + #pragma warning disable CS1591 + Dismissed, + #pragma warning restore CS1591 + [EnumMember(Value = "fixed")] + #pragma warning disable CS1591 + Fixed, + #pragma warning restore CS1591 + [EnumMember(Value = "open")] + #pragma warning disable CS1591 + Open, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Models/DependabotAlert_dependency.cs b/src/Ayllu.Github.Client/Github/Client/Models/DependabotAlert_dependency.cs new file mode 100644 index 0000000..cd60a93 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/DependabotAlert_dependency.cs @@ -0,0 +1,80 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + /// + /// Details for the vulnerable dependency. + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class DependabotAlert_dependency : IAdditionalDataHolder, IParsable + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The full path to the dependency manifest file, relative to the root of the repository. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? ManifestPath { get; private set; } +#nullable restore +#else + public string ManifestPath { get; private set; } +#endif + /// Details for the vulnerable package. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.DependabotAlertPackage? Package { get; private set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.DependabotAlertPackage Package { get; private set; } +#endif + /// The vulnerable dependency's relationship to your project.> [!NOTE]> We are rolling out support for dependency relationship across ecosystems. This value will be "unknown" for all dependencies in unsupported ecosystems. + public global::Ayllu.Github.Client.Models.DependabotAlert_dependency_relationship? Relationship { get; private set; } + /// The execution scope of the vulnerable dependency. + public global::Ayllu.Github.Client.Models.DependabotAlert_dependency_scope? Scope { get; private set; } + /// + /// Instantiates a new and sets the default values. + /// + public DependabotAlert_dependency() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.DependabotAlert_dependency CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.DependabotAlert_dependency(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "manifest_path", n => { ManifestPath = n.GetStringValue(); } }, + { "package", n => { Package = n.GetObjectValue(global::Ayllu.Github.Client.Models.DependabotAlertPackage.CreateFromDiscriminatorValue); } }, + { "relationship", n => { Relationship = n.GetEnumValue(); } }, + { "scope", n => { Scope = n.GetEnumValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/DependabotAlert_dependency_relationship.cs b/src/Ayllu.Github.Client/Github/Client/Models/DependabotAlert_dependency_relationship.cs new file mode 100644 index 0000000..a4d3170 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/DependabotAlert_dependency_relationship.cs @@ -0,0 +1,23 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Models +{ + /// The vulnerable dependency's relationship to your project.> [!NOTE]> We are rolling out support for dependency relationship across ecosystems. This value will be "unknown" for all dependencies in unsupported ecosystems. + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public enum DependabotAlert_dependency_relationship + { + [EnumMember(Value = "unknown")] + #pragma warning disable CS1591 + Unknown, + #pragma warning restore CS1591 + [EnumMember(Value = "direct")] + #pragma warning disable CS1591 + Direct, + #pragma warning restore CS1591 + [EnumMember(Value = "transitive")] + #pragma warning disable CS1591 + Transitive, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Models/DependabotAlert_dependency_scope.cs b/src/Ayllu.Github.Client/Github/Client/Models/DependabotAlert_dependency_scope.cs new file mode 100644 index 0000000..d0c1f4c --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/DependabotAlert_dependency_scope.cs @@ -0,0 +1,19 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Models +{ + /// The execution scope of the vulnerable dependency. + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public enum DependabotAlert_dependency_scope + { + [EnumMember(Value = "development")] + #pragma warning disable CS1591 + Development, + #pragma warning restore CS1591 + [EnumMember(Value = "runtime")] + #pragma warning disable CS1591 + Runtime, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Models/DependabotAlert_dismissed_reason.cs b/src/Ayllu.Github.Client/Github/Client/Models/DependabotAlert_dismissed_reason.cs new file mode 100644 index 0000000..94f1075 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/DependabotAlert_dismissed_reason.cs @@ -0,0 +1,31 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Models +{ + /// The reason that the alert was dismissed. + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public enum DependabotAlert_dismissed_reason + { + [EnumMember(Value = "fix_started")] + #pragma warning disable CS1591 + Fix_started, + #pragma warning restore CS1591 + [EnumMember(Value = "inaccurate")] + #pragma warning disable CS1591 + Inaccurate, + #pragma warning restore CS1591 + [EnumMember(Value = "no_bandwidth")] + #pragma warning disable CS1591 + No_bandwidth, + #pragma warning restore CS1591 + [EnumMember(Value = "not_used")] + #pragma warning disable CS1591 + Not_used, + #pragma warning restore CS1591 + [EnumMember(Value = "tolerable_risk")] + #pragma warning disable CS1591 + Tolerable_risk, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Models/DependabotAlert_state.cs b/src/Ayllu.Github.Client/Github/Client/Models/DependabotAlert_state.cs new file mode 100644 index 0000000..0326960 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/DependabotAlert_state.cs @@ -0,0 +1,27 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Models +{ + /// The state of the Dependabot alert. + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public enum DependabotAlert_state + { + [EnumMember(Value = "auto_dismissed")] + #pragma warning disable CS1591 + Auto_dismissed, + #pragma warning restore CS1591 + [EnumMember(Value = "dismissed")] + #pragma warning disable CS1591 + Dismissed, + #pragma warning restore CS1591 + [EnumMember(Value = "fixed")] + #pragma warning disable CS1591 + Fixed, + #pragma warning restore CS1591 + [EnumMember(Value = "open")] + #pragma warning disable CS1591 + Open, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Models/DependabotPublicKey.cs b/src/Ayllu.Github.Client/Github/Client/Models/DependabotPublicKey.cs new file mode 100644 index 0000000..17af7e9 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/DependabotPublicKey.cs @@ -0,0 +1,76 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + /// + /// The public key used for setting Dependabot Secrets. + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class DependabotPublicKey : IAdditionalDataHolder, IParsable + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The Base64 encoded public key. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Key { get; set; } +#nullable restore +#else + public string Key { get; set; } +#endif + /// The identifier for the key. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? KeyId { get; set; } +#nullable restore +#else + public string KeyId { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public DependabotPublicKey() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.DependabotPublicKey CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.DependabotPublicKey(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "key", n => { Key = n.GetStringValue(); } }, + { "key_id", n => { KeyId = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("key", Key); + writer.WriteStringValue("key_id", KeyId); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/DependabotRepositoryAccessDetails.cs b/src/Ayllu.Github.Client/Github/Client/Models/DependabotRepositoryAccessDetails.cs new file mode 100644 index 0000000..14fe2e3 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/DependabotRepositoryAccessDetails.cs @@ -0,0 +1,60 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + /// + /// Information about repositories that Dependabot is able to access in an organization + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class DependabotRepositoryAccessDetails : IParsable + { + /// The accessible_repositories property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? AccessibleRepositories { get; set; } +#nullable restore +#else + public List AccessibleRepositories { get; set; } +#endif + /// The default repository access level for Dependabot updates. + public global::Ayllu.Github.Client.Models.DependabotRepositoryAccessDetails_default_level? DefaultLevel { get; set; } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.DependabotRepositoryAccessDetails CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.DependabotRepositoryAccessDetails(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "accessible_repositories", n => { AccessibleRepositories = n.GetCollectionOfObjectValues(global::Ayllu.Github.Client.Models.NullableSimpleRepository.CreateFromDiscriminatorValue)?.AsList(); } }, + { "default_level", n => { DefaultLevel = n.GetEnumValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteCollectionOfObjectValues("accessible_repositories", AccessibleRepositories); + writer.WriteEnumValue("default_level", DefaultLevel); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/DependabotRepositoryAccessDetails_default_level.cs b/src/Ayllu.Github.Client/Github/Client/Models/DependabotRepositoryAccessDetails_default_level.cs new file mode 100644 index 0000000..a72e15d --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/DependabotRepositoryAccessDetails_default_level.cs @@ -0,0 +1,19 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Models +{ + /// The default repository access level for Dependabot updates. + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public enum DependabotRepositoryAccessDetails_default_level + { + [EnumMember(Value = "public")] + #pragma warning disable CS1591 + Public, + #pragma warning restore CS1591 + [EnumMember(Value = "internal")] + #pragma warning disable CS1591 + Internal, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Models/DependabotSecret.cs b/src/Ayllu.Github.Client/Github/Client/Models/DependabotSecret.cs new file mode 100644 index 0000000..af798fc --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/DependabotSecret.cs @@ -0,0 +1,74 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + /// + /// Set secrets for Dependabot. + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class DependabotSecret : IAdditionalDataHolder, IParsable + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The created_at property + public DateTimeOffset? CreatedAt { get; set; } + /// The name of the secret. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Name { get; set; } +#nullable restore +#else + public string Name { get; set; } +#endif + /// The updated_at property + public DateTimeOffset? UpdatedAt { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public DependabotSecret() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.DependabotSecret CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.DependabotSecret(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "created_at", n => { CreatedAt = n.GetDateTimeOffsetValue(); } }, + { "name", n => { Name = n.GetStringValue(); } }, + { "updated_at", n => { UpdatedAt = n.GetDateTimeOffsetValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteDateTimeOffsetValue("created_at", CreatedAt); + writer.WriteStringValue("name", Name); + writer.WriteDateTimeOffsetValue("updated_at", UpdatedAt); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/DependencyGraphDiff.cs b/src/Ayllu.Github.Client/Github/Client/Models/DependencyGraphDiff.cs new file mode 100644 index 0000000..a1c6298 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/DependencyGraphDiff.cs @@ -0,0 +1,143 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class DependencyGraphDiff : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The change_type property + public global::Ayllu.Github.Client.Models.DependencyGraphDiff_change_type? ChangeType { get; set; } + /// The ecosystem property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Ecosystem { get; set; } +#nullable restore +#else + public string Ecosystem { get; set; } +#endif + /// The license property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? License { get; set; } +#nullable restore +#else + public string License { get; set; } +#endif + /// The manifest property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Manifest { get; set; } +#nullable restore +#else + public string Manifest { get; set; } +#endif + /// The name property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Name { get; set; } +#nullable restore +#else + public string Name { get; set; } +#endif + /// The package_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? PackageUrl { get; set; } +#nullable restore +#else + public string PackageUrl { get; set; } +#endif + /// 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. + public global::Ayllu.Github.Client.Models.DependencyGraphDiff_scope? Scope { get; set; } + /// The source_repository_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? SourceRepositoryUrl { get; set; } +#nullable restore +#else + public string SourceRepositoryUrl { get; set; } +#endif + /// The version property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Version { get; set; } +#nullable restore +#else + public string Version { get; set; } +#endif + /// The vulnerabilities property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? Vulnerabilities { get; set; } +#nullable restore +#else + public List Vulnerabilities { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public DependencyGraphDiff() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.DependencyGraphDiff CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.DependencyGraphDiff(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "change_type", n => { ChangeType = n.GetEnumValue(); } }, + { "ecosystem", n => { Ecosystem = n.GetStringValue(); } }, + { "license", n => { License = n.GetStringValue(); } }, + { "manifest", n => { Manifest = n.GetStringValue(); } }, + { "name", n => { Name = n.GetStringValue(); } }, + { "package_url", n => { PackageUrl = n.GetStringValue(); } }, + { "scope", n => { Scope = n.GetEnumValue(); } }, + { "source_repository_url", n => { SourceRepositoryUrl = n.GetStringValue(); } }, + { "version", n => { Version = n.GetStringValue(); } }, + { "vulnerabilities", n => { Vulnerabilities = n.GetCollectionOfObjectValues(global::Ayllu.Github.Client.Models.DependencyGraphDiff_vulnerabilities.CreateFromDiscriminatorValue)?.AsList(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteEnumValue("change_type", ChangeType); + writer.WriteStringValue("ecosystem", Ecosystem); + writer.WriteStringValue("license", License); + writer.WriteStringValue("manifest", Manifest); + writer.WriteStringValue("name", Name); + writer.WriteStringValue("package_url", PackageUrl); + writer.WriteEnumValue("scope", Scope); + writer.WriteStringValue("source_repository_url", SourceRepositoryUrl); + writer.WriteStringValue("version", Version); + writer.WriteCollectionOfObjectValues("vulnerabilities", Vulnerabilities); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/DependencyGraphDiff_change_type.cs b/src/Ayllu.Github.Client/Github/Client/Models/DependencyGraphDiff_change_type.cs new file mode 100644 index 0000000..90c0505 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/DependencyGraphDiff_change_type.cs @@ -0,0 +1,20 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public enum DependencyGraphDiff_change_type + #pragma warning restore CS1591 + { + [EnumMember(Value = "added")] + #pragma warning disable CS1591 + Added, + #pragma warning restore CS1591 + [EnumMember(Value = "removed")] + #pragma warning disable CS1591 + Removed, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Models/DependencyGraphDiff_scope.cs b/src/Ayllu.Github.Client/Github/Client/Models/DependencyGraphDiff_scope.cs new file mode 100644 index 0000000..dd62627 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/DependencyGraphDiff_scope.cs @@ -0,0 +1,23 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Models +{ + /// 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. + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public enum DependencyGraphDiff_scope + { + [EnumMember(Value = "unknown")] + #pragma warning disable CS1591 + Unknown, + #pragma warning restore CS1591 + [EnumMember(Value = "runtime")] + #pragma warning disable CS1591 + Runtime, + #pragma warning restore CS1591 + [EnumMember(Value = "development")] + #pragma warning disable CS1591 + Development, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Models/DependencyGraphDiff_vulnerabilities.cs b/src/Ayllu.Github.Client/Github/Client/Models/DependencyGraphDiff_vulnerabilities.cs new file mode 100644 index 0000000..c8ba4ff --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/DependencyGraphDiff_vulnerabilities.cs @@ -0,0 +1,95 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class DependencyGraphDiff_vulnerabilities : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The advisory_ghsa_id property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? AdvisoryGhsaId { get; set; } +#nullable restore +#else + public string AdvisoryGhsaId { get; set; } +#endif + /// The advisory_summary property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? AdvisorySummary { get; set; } +#nullable restore +#else + public string AdvisorySummary { get; set; } +#endif + /// The advisory_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? AdvisoryUrl { get; set; } +#nullable restore +#else + public string AdvisoryUrl { get; set; } +#endif + /// The severity property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Severity { get; set; } +#nullable restore +#else + public string Severity { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public DependencyGraphDiff_vulnerabilities() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.DependencyGraphDiff_vulnerabilities CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.DependencyGraphDiff_vulnerabilities(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "advisory_ghsa_id", n => { AdvisoryGhsaId = n.GetStringValue(); } }, + { "advisory_summary", n => { AdvisorySummary = n.GetStringValue(); } }, + { "advisory_url", n => { AdvisoryUrl = n.GetStringValue(); } }, + { "severity", n => { Severity = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("advisory_ghsa_id", AdvisoryGhsaId); + writer.WriteStringValue("advisory_summary", AdvisorySummary); + writer.WriteStringValue("advisory_url", AdvisoryUrl); + writer.WriteStringValue("severity", Severity); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/DependencyGraphSpdxSbom.cs b/src/Ayllu.Github.Client/Github/Client/Models/DependencyGraphSpdxSbom.cs new file mode 100644 index 0000000..dd4ae21 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/DependencyGraphSpdxSbom.cs @@ -0,0 +1,66 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + /// + /// A schema for the SPDX JSON format returned by the Dependency Graph. + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class DependencyGraphSpdxSbom : IAdditionalDataHolder, IParsable + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The sbom property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.DependencyGraphSpdxSbom_sbom? Sbom { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.DependencyGraphSpdxSbom_sbom Sbom { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public DependencyGraphSpdxSbom() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.DependencyGraphSpdxSbom CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.DependencyGraphSpdxSbom(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "sbom", n => { Sbom = n.GetObjectValue(global::Ayllu.Github.Client.Models.DependencyGraphSpdxSbom_sbom.CreateFromDiscriminatorValue); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteObjectValue("sbom", Sbom); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/DependencyGraphSpdxSbom_sbom.cs b/src/Ayllu.Github.Client/Github/Client/Models/DependencyGraphSpdxSbom_sbom.cs new file mode 100644 index 0000000..bb291fe --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/DependencyGraphSpdxSbom_sbom.cs @@ -0,0 +1,145 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class DependencyGraphSpdxSbom_sbom : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// An optional comment about the SPDX document. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Comment { get; set; } +#nullable restore +#else + public string Comment { get; set; } +#endif + /// The creationInfo property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.DependencyGraphSpdxSbom_sbom_creationInfo? CreationInfo { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.DependencyGraphSpdxSbom_sbom_creationInfo CreationInfo { get; set; } +#endif + /// The license under which the SPDX document is licensed. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? DataLicense { get; set; } +#nullable restore +#else + public string DataLicense { get; set; } +#endif + /// The namespace for the SPDX document. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? DocumentNamespace { get; set; } +#nullable restore +#else + public string DocumentNamespace { get; set; } +#endif + /// The name of the SPDX document. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Name { get; set; } +#nullable restore +#else + public string Name { get; set; } +#endif + /// The packages property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? Packages { get; set; } +#nullable restore +#else + public List Packages { get; set; } +#endif + /// The relationships property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? Relationships { get; set; } +#nullable restore +#else + public List Relationships { get; set; } +#endif + /// The SPDX identifier for the SPDX document. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? SPDXID { get; set; } +#nullable restore +#else + public string SPDXID { get; set; } +#endif + /// The version of the SPDX specification that this document conforms to. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? SpdxVersion { get; set; } +#nullable restore +#else + public string SpdxVersion { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public DependencyGraphSpdxSbom_sbom() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.DependencyGraphSpdxSbom_sbom CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.DependencyGraphSpdxSbom_sbom(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "comment", n => { Comment = n.GetStringValue(); } }, + { "creationInfo", n => { CreationInfo = n.GetObjectValue(global::Ayllu.Github.Client.Models.DependencyGraphSpdxSbom_sbom_creationInfo.CreateFromDiscriminatorValue); } }, + { "dataLicense", n => { DataLicense = n.GetStringValue(); } }, + { "documentNamespace", n => { DocumentNamespace = n.GetStringValue(); } }, + { "name", n => { Name = n.GetStringValue(); } }, + { "packages", n => { Packages = n.GetCollectionOfObjectValues(global::Ayllu.Github.Client.Models.DependencyGraphSpdxSbom_sbom_packages.CreateFromDiscriminatorValue)?.AsList(); } }, + { "relationships", n => { Relationships = n.GetCollectionOfObjectValues(global::Ayllu.Github.Client.Models.DependencyGraphSpdxSbom_sbom_relationships.CreateFromDiscriminatorValue)?.AsList(); } }, + { "SPDXID", n => { SPDXID = n.GetStringValue(); } }, + { "spdxVersion", n => { SpdxVersion = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("comment", Comment); + writer.WriteObjectValue("creationInfo", CreationInfo); + writer.WriteStringValue("dataLicense", DataLicense); + writer.WriteStringValue("documentNamespace", DocumentNamespace); + writer.WriteStringValue("name", Name); + writer.WriteCollectionOfObjectValues("packages", Packages); + writer.WriteCollectionOfObjectValues("relationships", Relationships); + writer.WriteStringValue("SPDXID", SPDXID); + writer.WriteStringValue("spdxVersion", SpdxVersion); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/DependencyGraphSpdxSbom_sbom_creationInfo.cs b/src/Ayllu.Github.Client/Github/Client/Models/DependencyGraphSpdxSbom_sbom_creationInfo.cs new file mode 100644 index 0000000..6d4b738 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/DependencyGraphSpdxSbom_sbom_creationInfo.cs @@ -0,0 +1,75 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class DependencyGraphSpdxSbom_sbom_creationInfo : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The date and time the SPDX document was created. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Created { get; set; } +#nullable restore +#else + public string Created { get; set; } +#endif + /// The tools that were used to generate the SPDX document. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? Creators { get; set; } +#nullable restore +#else + public List Creators { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public DependencyGraphSpdxSbom_sbom_creationInfo() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.DependencyGraphSpdxSbom_sbom_creationInfo CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.DependencyGraphSpdxSbom_sbom_creationInfo(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "created", n => { Created = n.GetStringValue(); } }, + { "creators", n => { Creators = n.GetCollectionOfPrimitiveValues()?.AsList(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("created", Created); + writer.WriteCollectionOfPrimitiveValues("creators", Creators); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/DependencyGraphSpdxSbom_sbom_packages.cs b/src/Ayllu.Github.Client/Github/Client/Models/DependencyGraphSpdxSbom_sbom_packages.cs new file mode 100644 index 0000000..9b6caf9 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/DependencyGraphSpdxSbom_sbom_packages.cs @@ -0,0 +1,149 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class DependencyGraphSpdxSbom_sbom_packages : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The copyright holders of the package, and any dates present with those notices, if available. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? CopyrightText { get; set; } +#nullable restore +#else + public string CopyrightText { get; set; } +#endif + /// The location where the package can be downloaded,or NOASSERTION if this has not been determined. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? DownloadLocation { get; set; } +#nullable restore +#else + public string DownloadLocation { get; set; } +#endif + /// The externalRefs property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? ExternalRefs { get; set; } +#nullable restore +#else + public List ExternalRefs { get; set; } +#endif + /// Whether the package's file content has been subjected toanalysis during the creation of the SPDX document. + public bool? FilesAnalyzed { get; set; } + /// The license of the package as determined while creating the SPDX document. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? LicenseConcluded { get; set; } +#nullable restore +#else + public string LicenseConcluded { get; set; } +#endif + /// The license of the package as declared by its author, or NOASSERTION if this informationwas not available when the SPDX document was created. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? LicenseDeclared { get; set; } +#nullable restore +#else + public string LicenseDeclared { get; set; } +#endif + /// The name of the package. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Name { get; set; } +#nullable restore +#else + public string Name { get; set; } +#endif + /// A unique SPDX identifier for the package. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? SPDXID { get; set; } +#nullable restore +#else + public string SPDXID { get; set; } +#endif + /// The distribution source of this package, or NOASSERTION if this was not determined. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Supplier { get; set; } +#nullable restore +#else + public string Supplier { get; set; } +#endif + /// The version of the package. If the package does not have an exact version specified,a version range is given. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? VersionInfo { get; set; } +#nullable restore +#else + public string VersionInfo { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public DependencyGraphSpdxSbom_sbom_packages() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.DependencyGraphSpdxSbom_sbom_packages CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.DependencyGraphSpdxSbom_sbom_packages(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "copyrightText", n => { CopyrightText = n.GetStringValue(); } }, + { "downloadLocation", n => { DownloadLocation = n.GetStringValue(); } }, + { "externalRefs", n => { ExternalRefs = n.GetCollectionOfObjectValues(global::Ayllu.Github.Client.Models.DependencyGraphSpdxSbom_sbom_packages_externalRefs.CreateFromDiscriminatorValue)?.AsList(); } }, + { "filesAnalyzed", n => { FilesAnalyzed = n.GetBoolValue(); } }, + { "licenseConcluded", n => { LicenseConcluded = n.GetStringValue(); } }, + { "licenseDeclared", n => { LicenseDeclared = n.GetStringValue(); } }, + { "name", n => { Name = n.GetStringValue(); } }, + { "SPDXID", n => { SPDXID = n.GetStringValue(); } }, + { "supplier", n => { Supplier = n.GetStringValue(); } }, + { "versionInfo", n => { VersionInfo = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("copyrightText", CopyrightText); + writer.WriteStringValue("downloadLocation", DownloadLocation); + writer.WriteCollectionOfObjectValues("externalRefs", ExternalRefs); + writer.WriteBoolValue("filesAnalyzed", FilesAnalyzed); + writer.WriteStringValue("licenseConcluded", LicenseConcluded); + writer.WriteStringValue("licenseDeclared", LicenseDeclared); + writer.WriteStringValue("name", Name); + writer.WriteStringValue("SPDXID", SPDXID); + writer.WriteStringValue("supplier", Supplier); + writer.WriteStringValue("versionInfo", VersionInfo); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/DependencyGraphSpdxSbom_sbom_packages_externalRefs.cs b/src/Ayllu.Github.Client/Github/Client/Models/DependencyGraphSpdxSbom_sbom_packages_externalRefs.cs new file mode 100644 index 0000000..f9fa94b --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/DependencyGraphSpdxSbom_sbom_packages_externalRefs.cs @@ -0,0 +1,85 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class DependencyGraphSpdxSbom_sbom_packages_externalRefs : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The category of reference to an external resource this reference refers to. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? ReferenceCategory { get; set; } +#nullable restore +#else + public string ReferenceCategory { get; set; } +#endif + /// A locator for the particular external resource this reference refers to. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? ReferenceLocator { get; set; } +#nullable restore +#else + public string ReferenceLocator { get; set; } +#endif + /// The category of reference to an external resource this reference refers to. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? ReferenceType { get; set; } +#nullable restore +#else + public string ReferenceType { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public DependencyGraphSpdxSbom_sbom_packages_externalRefs() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.DependencyGraphSpdxSbom_sbom_packages_externalRefs CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.DependencyGraphSpdxSbom_sbom_packages_externalRefs(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "referenceCategory", n => { ReferenceCategory = n.GetStringValue(); } }, + { "referenceLocator", n => { ReferenceLocator = n.GetStringValue(); } }, + { "referenceType", n => { ReferenceType = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("referenceCategory", ReferenceCategory); + writer.WriteStringValue("referenceLocator", ReferenceLocator); + writer.WriteStringValue("referenceType", ReferenceType); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/DependencyGraphSpdxSbom_sbom_relationships.cs b/src/Ayllu.Github.Client/Github/Client/Models/DependencyGraphSpdxSbom_sbom_relationships.cs new file mode 100644 index 0000000..c7e88ba --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/DependencyGraphSpdxSbom_sbom_relationships.cs @@ -0,0 +1,85 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class DependencyGraphSpdxSbom_sbom_relationships : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The SPDX identifier of the package that is the target of the relationship. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? RelatedSpdxElement { get; set; } +#nullable restore +#else + public string RelatedSpdxElement { get; set; } +#endif + /// The type of relationship between the two SPDX elements. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? RelationshipType { get; set; } +#nullable restore +#else + public string RelationshipType { get; set; } +#endif + /// The SPDX identifier of the package that is the source of the relationship. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? SpdxElementId { get; set; } +#nullable restore +#else + public string SpdxElementId { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public DependencyGraphSpdxSbom_sbom_relationships() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.DependencyGraphSpdxSbom_sbom_relationships CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.DependencyGraphSpdxSbom_sbom_relationships(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "relatedSpdxElement", n => { RelatedSpdxElement = n.GetStringValue(); } }, + { "relationshipType", n => { RelationshipType = n.GetStringValue(); } }, + { "spdxElementId", n => { SpdxElementId = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("relatedSpdxElement", RelatedSpdxElement); + writer.WriteStringValue("relationshipType", RelationshipType); + writer.WriteStringValue("spdxElementId", SpdxElementId); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/DeployKey.cs b/src/Ayllu.Github.Client/Github/Client/Models/DeployKey.cs new file mode 100644 index 0000000..0d6210e --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/DeployKey.cs @@ -0,0 +1,126 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + /// + /// An SSH key granting access to a single repository. + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class DeployKey : IAdditionalDataHolder, IParsable + { + /// The added_by property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? AddedBy { get; set; } +#nullable restore +#else + public string AddedBy { get; set; } +#endif + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The created_at property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? CreatedAt { get; set; } +#nullable restore +#else + public string CreatedAt { get; set; } +#endif + /// The enabled property + public bool? Enabled { get; set; } + /// The id property + public int? Id { get; set; } + /// The key property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Key { get; set; } +#nullable restore +#else + public string Key { get; set; } +#endif + /// The last_used property + public DateTimeOffset? LastUsed { get; set; } + /// The read_only property + public bool? ReadOnly { get; set; } + /// The title property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Title { get; set; } +#nullable restore +#else + public string Title { get; set; } +#endif + /// The url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Url { get; set; } +#nullable restore +#else + public string Url { get; set; } +#endif + /// The verified property + public bool? Verified { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public DeployKey() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.DeployKey CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.DeployKey(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "added_by", n => { AddedBy = n.GetStringValue(); } }, + { "created_at", n => { CreatedAt = n.GetStringValue(); } }, + { "enabled", n => { Enabled = n.GetBoolValue(); } }, + { "id", n => { Id = n.GetIntValue(); } }, + { "key", n => { Key = n.GetStringValue(); } }, + { "last_used", n => { LastUsed = n.GetDateTimeOffsetValue(); } }, + { "read_only", n => { ReadOnly = n.GetBoolValue(); } }, + { "title", n => { Title = n.GetStringValue(); } }, + { "url", n => { Url = n.GetStringValue(); } }, + { "verified", n => { Verified = n.GetBoolValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("added_by", AddedBy); + writer.WriteStringValue("created_at", CreatedAt); + writer.WriteBoolValue("enabled", Enabled); + writer.WriteIntValue("id", Id); + writer.WriteStringValue("key", Key); + writer.WriteDateTimeOffsetValue("last_used", LastUsed); + writer.WriteBoolValue("read_only", ReadOnly); + writer.WriteStringValue("title", Title); + writer.WriteStringValue("url", Url); + writer.WriteBoolValue("verified", Verified); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/Deployment.cs b/src/Ayllu.Github.Client/Github/Client/Models/Deployment.cs new file mode 100644 index 0000000..c0df305 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/Deployment.cs @@ -0,0 +1,206 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + /// + /// A request for a specific ref(branch,sha,tag) to be deployed + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class Deployment : IAdditionalDataHolder, IParsable + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The created_at property + public DateTimeOffset? CreatedAt { get; set; } + /// A GitHub user. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.NullableSimpleUser? Creator { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.NullableSimpleUser Creator { get; set; } +#endif + /// The description property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Description { get; set; } +#nullable restore +#else + public string Description { get; set; } +#endif + /// Name for the target deployment environment. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Environment { get; set; } +#nullable restore +#else + public string Environment { get; set; } +#endif + /// Unique identifier of the deployment + public long? Id { get; set; } + /// The node_id property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? NodeId { get; set; } +#nullable restore +#else + public string NodeId { get; set; } +#endif + /// The original_environment property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? OriginalEnvironment { get; set; } +#nullable restore +#else + public string OriginalEnvironment { get; set; } +#endif + /// The payload property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Payload { get; set; } +#nullable restore +#else + public string Payload { get; set; } +#endif + /// 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. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.NullableIntegration? PerformedViaGithubApp { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.NullableIntegration PerformedViaGithubApp { get; set; } +#endif + /// Specifies if the given environment is one that end-users directly interact with. Default: false. + public bool? ProductionEnvironment { get; set; } + /// The ref to deploy. This can be a branch, tag, or sha. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Ref { get; set; } +#nullable restore +#else + public string Ref { get; set; } +#endif + /// The repository_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? RepositoryUrl { get; set; } +#nullable restore +#else + public string RepositoryUrl { get; set; } +#endif + /// The sha property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Sha { get; set; } +#nullable restore +#else + public string Sha { get; set; } +#endif + /// The statuses_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? StatusesUrl { get; set; } +#nullable restore +#else + public string StatusesUrl { get; set; } +#endif + /// Parameter to specify a task to execute +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Task { get; set; } +#nullable restore +#else + public string Task { get; set; } +#endif + /// Specifies if the given environment is will no longer exist at some point in the future. Default: false. + public bool? TransientEnvironment { get; set; } + /// The updated_at property + public DateTimeOffset? UpdatedAt { get; set; } + /// The url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Url { get; set; } +#nullable restore +#else + public string Url { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public Deployment() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.Deployment CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.Deployment(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "created_at", n => { CreatedAt = n.GetDateTimeOffsetValue(); } }, + { "creator", n => { Creator = n.GetObjectValue(global::Ayllu.Github.Client.Models.NullableSimpleUser.CreateFromDiscriminatorValue); } }, + { "description", n => { Description = n.GetStringValue(); } }, + { "environment", n => { Environment = n.GetStringValue(); } }, + { "id", n => { Id = n.GetLongValue(); } }, + { "node_id", n => { NodeId = n.GetStringValue(); } }, + { "original_environment", n => { OriginalEnvironment = n.GetStringValue(); } }, + { "payload", n => { Payload = n.GetStringValue(); } }, + { "performed_via_github_app", n => { PerformedViaGithubApp = n.GetObjectValue(global::Ayllu.Github.Client.Models.NullableIntegration.CreateFromDiscriminatorValue); } }, + { "production_environment", n => { ProductionEnvironment = n.GetBoolValue(); } }, + { "ref", n => { Ref = n.GetStringValue(); } }, + { "repository_url", n => { RepositoryUrl = n.GetStringValue(); } }, + { "sha", n => { Sha = n.GetStringValue(); } }, + { "statuses_url", n => { StatusesUrl = n.GetStringValue(); } }, + { "task", n => { Task = n.GetStringValue(); } }, + { "transient_environment", n => { TransientEnvironment = n.GetBoolValue(); } }, + { "updated_at", n => { UpdatedAt = n.GetDateTimeOffsetValue(); } }, + { "url", n => { Url = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteDateTimeOffsetValue("created_at", CreatedAt); + writer.WriteObjectValue("creator", Creator); + writer.WriteStringValue("description", Description); + writer.WriteStringValue("environment", Environment); + writer.WriteLongValue("id", Id); + writer.WriteStringValue("node_id", NodeId); + writer.WriteStringValue("original_environment", OriginalEnvironment); + writer.WriteStringValue("payload", Payload); + writer.WriteObjectValue("performed_via_github_app", PerformedViaGithubApp); + writer.WriteBoolValue("production_environment", ProductionEnvironment); + writer.WriteStringValue("ref", Ref); + writer.WriteStringValue("repository_url", RepositoryUrl); + writer.WriteStringValue("sha", Sha); + writer.WriteStringValue("statuses_url", StatusesUrl); + writer.WriteStringValue("task", Task); + writer.WriteBoolValue("transient_environment", TransientEnvironment); + writer.WriteDateTimeOffsetValue("updated_at", UpdatedAt); + writer.WriteStringValue("url", Url); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/DeploymentBranchPolicy.cs b/src/Ayllu.Github.Client/Github/Client/Models/DeploymentBranchPolicy.cs new file mode 100644 index 0000000..6b1d12a --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/DeploymentBranchPolicy.cs @@ -0,0 +1,84 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + /// + /// Details of a deployment branch or tag policy. + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class DeploymentBranchPolicy : IAdditionalDataHolder, IParsable + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The unique identifier of the branch or tag policy. + public int? Id { get; set; } + /// The name pattern that branches or tags must match in order to deploy to the environment. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Name { get; set; } +#nullable restore +#else + public string Name { get; set; } +#endif + /// The node_id property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? NodeId { get; set; } +#nullable restore +#else + public string NodeId { get; set; } +#endif + /// Whether this rule targets a branch or tag. + public global::Ayllu.Github.Client.Models.DeploymentBranchPolicy_type? Type { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public DeploymentBranchPolicy() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.DeploymentBranchPolicy CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.DeploymentBranchPolicy(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "id", n => { Id = n.GetIntValue(); } }, + { "name", n => { Name = n.GetStringValue(); } }, + { "node_id", n => { NodeId = n.GetStringValue(); } }, + { "type", n => { Type = n.GetEnumValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteIntValue("id", Id); + writer.WriteStringValue("name", Name); + writer.WriteStringValue("node_id", NodeId); + writer.WriteEnumValue("type", Type); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/DeploymentBranchPolicyNamePattern.cs b/src/Ayllu.Github.Client/Github/Client/Models/DeploymentBranchPolicyNamePattern.cs new file mode 100644 index 0000000..d5acde5 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/DeploymentBranchPolicyNamePattern.cs @@ -0,0 +1,65 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class DeploymentBranchPolicyNamePattern : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// 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). +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Name { get; set; } +#nullable restore +#else + public string Name { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public DeploymentBranchPolicyNamePattern() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.DeploymentBranchPolicyNamePattern CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.DeploymentBranchPolicyNamePattern(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "name", n => { Name = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("name", Name); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/DeploymentBranchPolicyNamePatternWithType.cs b/src/Ayllu.Github.Client/Github/Client/Models/DeploymentBranchPolicyNamePatternWithType.cs new file mode 100644 index 0000000..22130e2 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/DeploymentBranchPolicyNamePatternWithType.cs @@ -0,0 +1,69 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class DeploymentBranchPolicyNamePatternWithType : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// 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). +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Name { get; set; } +#nullable restore +#else + public string Name { get; set; } +#endif + /// Whether this rule targets a branch or tag + public global::Ayllu.Github.Client.Models.DeploymentBranchPolicyNamePatternWithType_type? Type { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public DeploymentBranchPolicyNamePatternWithType() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.DeploymentBranchPolicyNamePatternWithType CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.DeploymentBranchPolicyNamePatternWithType(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "name", n => { Name = n.GetStringValue(); } }, + { "type", n => { Type = n.GetEnumValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("name", Name); + writer.WriteEnumValue("type", Type); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/DeploymentBranchPolicyNamePatternWithType_type.cs b/src/Ayllu.Github.Client/Github/Client/Models/DeploymentBranchPolicyNamePatternWithType_type.cs new file mode 100644 index 0000000..51a3b9a --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/DeploymentBranchPolicyNamePatternWithType_type.cs @@ -0,0 +1,19 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Models +{ + /// Whether this rule targets a branch or tag + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public enum DeploymentBranchPolicyNamePatternWithType_type + { + [EnumMember(Value = "branch")] + #pragma warning disable CS1591 + Branch, + #pragma warning restore CS1591 + [EnumMember(Value = "tag")] + #pragma warning disable CS1591 + Tag, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Models/DeploymentBranchPolicySettings.cs b/src/Ayllu.Github.Client/Github/Client/Models/DeploymentBranchPolicySettings.cs new file mode 100644 index 0000000..70bfaf9 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/DeploymentBranchPolicySettings.cs @@ -0,0 +1,64 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + /// + /// The type of deployment branch policy for this environment. To allow all branches to deploy, set to `null`. + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class DeploymentBranchPolicySettings : IAdditionalDataHolder, IParsable + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// 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`. + public bool? CustomBranchPolicies { get; set; } + /// 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`. + public bool? ProtectedBranches { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public DeploymentBranchPolicySettings() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.DeploymentBranchPolicySettings CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.DeploymentBranchPolicySettings(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "custom_branch_policies", n => { CustomBranchPolicies = n.GetBoolValue(); } }, + { "protected_branches", n => { ProtectedBranches = n.GetBoolValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteBoolValue("custom_branch_policies", CustomBranchPolicies); + writer.WriteBoolValue("protected_branches", ProtectedBranches); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/DeploymentBranchPolicy_type.cs b/src/Ayllu.Github.Client/Github/Client/Models/DeploymentBranchPolicy_type.cs new file mode 100644 index 0000000..165828d --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/DeploymentBranchPolicy_type.cs @@ -0,0 +1,19 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Models +{ + /// Whether this rule targets a branch or tag. + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public enum DeploymentBranchPolicy_type + { + [EnumMember(Value = "branch")] + #pragma warning disable CS1591 + Branch, + #pragma warning restore CS1591 + [EnumMember(Value = "tag")] + #pragma warning disable CS1591 + Tag, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Models/DeploymentProtectionRule.cs b/src/Ayllu.Github.Client/Github/Client/Models/DeploymentProtectionRule.cs new file mode 100644 index 0000000..cb80c9c --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/DeploymentProtectionRule.cs @@ -0,0 +1,84 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + /// + /// Deployment protection rule + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class DeploymentProtectionRule : IAdditionalDataHolder, IParsable + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// A GitHub App that is providing a custom deployment protection rule. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.CustomDeploymentRuleApp? App { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.CustomDeploymentRuleApp App { get; set; } +#endif + /// Whether the deployment protection rule is enabled for the environment. + public bool? Enabled { get; set; } + /// The unique identifier for the deployment protection rule. + public int? Id { get; set; } + /// The node ID for the deployment protection rule. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? NodeId { get; set; } +#nullable restore +#else + public string NodeId { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public DeploymentProtectionRule() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.DeploymentProtectionRule CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.DeploymentProtectionRule(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "app", n => { App = n.GetObjectValue(global::Ayllu.Github.Client.Models.CustomDeploymentRuleApp.CreateFromDiscriminatorValue); } }, + { "enabled", n => { Enabled = n.GetBoolValue(); } }, + { "id", n => { Id = n.GetIntValue(); } }, + { "node_id", n => { NodeId = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteObjectValue("app", App); + writer.WriteBoolValue("enabled", Enabled); + writer.WriteIntValue("id", Id); + writer.WriteStringValue("node_id", NodeId); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/DeploymentReviewerType.cs b/src/Ayllu.Github.Client/Github/Client/Models/DeploymentReviewerType.cs new file mode 100644 index 0000000..a011ab2 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/DeploymentReviewerType.cs @@ -0,0 +1,19 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Models +{ + /// The type of reviewer. + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public enum DeploymentReviewerType + { + [EnumMember(Value = "User")] + #pragma warning disable CS1591 + User, + #pragma warning restore CS1591 + [EnumMember(Value = "Team")] + #pragma warning disable CS1591 + Team, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Models/DeploymentSimple.cs b/src/Ayllu.Github.Client/Github/Client/Models/DeploymentSimple.cs new file mode 100644 index 0000000..670797c --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/DeploymentSimple.cs @@ -0,0 +1,166 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + /// + /// A deployment created as the result of an Actions check run from a workflow that references an environment + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class DeploymentSimple : IAdditionalDataHolder, IParsable + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The created_at property + public DateTimeOffset? CreatedAt { get; set; } + /// The description property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Description { get; set; } +#nullable restore +#else + public string Description { get; set; } +#endif + /// Name for the target deployment environment. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Environment { get; set; } +#nullable restore +#else + public string Environment { get; set; } +#endif + /// Unique identifier of the deployment + public int? Id { get; set; } + /// The node_id property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? NodeId { get; set; } +#nullable restore +#else + public string NodeId { get; set; } +#endif + /// The original_environment property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? OriginalEnvironment { get; set; } +#nullable restore +#else + public string OriginalEnvironment { get; set; } +#endif + /// 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. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.NullableIntegration? PerformedViaGithubApp { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.NullableIntegration PerformedViaGithubApp { get; set; } +#endif + /// Specifies if the given environment is one that end-users directly interact with. Default: false. + public bool? ProductionEnvironment { get; set; } + /// The repository_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? RepositoryUrl { get; set; } +#nullable restore +#else + public string RepositoryUrl { get; set; } +#endif + /// The statuses_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? StatusesUrl { get; set; } +#nullable restore +#else + public string StatusesUrl { get; set; } +#endif + /// Parameter to specify a task to execute +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Task { get; set; } +#nullable restore +#else + public string Task { get; set; } +#endif + /// Specifies if the given environment is will no longer exist at some point in the future. Default: false. + public bool? TransientEnvironment { get; set; } + /// The updated_at property + public DateTimeOffset? UpdatedAt { get; set; } + /// The url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Url { get; set; } +#nullable restore +#else + public string Url { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public DeploymentSimple() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.DeploymentSimple CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.DeploymentSimple(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "created_at", n => { CreatedAt = n.GetDateTimeOffsetValue(); } }, + { "description", n => { Description = n.GetStringValue(); } }, + { "environment", n => { Environment = n.GetStringValue(); } }, + { "id", n => { Id = n.GetIntValue(); } }, + { "node_id", n => { NodeId = n.GetStringValue(); } }, + { "original_environment", n => { OriginalEnvironment = n.GetStringValue(); } }, + { "performed_via_github_app", n => { PerformedViaGithubApp = n.GetObjectValue(global::Ayllu.Github.Client.Models.NullableIntegration.CreateFromDiscriminatorValue); } }, + { "production_environment", n => { ProductionEnvironment = n.GetBoolValue(); } }, + { "repository_url", n => { RepositoryUrl = n.GetStringValue(); } }, + { "statuses_url", n => { StatusesUrl = n.GetStringValue(); } }, + { "task", n => { Task = n.GetStringValue(); } }, + { "transient_environment", n => { TransientEnvironment = n.GetBoolValue(); } }, + { "updated_at", n => { UpdatedAt = n.GetDateTimeOffsetValue(); } }, + { "url", n => { Url = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteDateTimeOffsetValue("created_at", CreatedAt); + writer.WriteStringValue("description", Description); + writer.WriteStringValue("environment", Environment); + writer.WriteIntValue("id", Id); + writer.WriteStringValue("node_id", NodeId); + writer.WriteStringValue("original_environment", OriginalEnvironment); + writer.WriteObjectValue("performed_via_github_app", PerformedViaGithubApp); + writer.WriteBoolValue("production_environment", ProductionEnvironment); + writer.WriteStringValue("repository_url", RepositoryUrl); + writer.WriteStringValue("statuses_url", StatusesUrl); + writer.WriteStringValue("task", Task); + writer.WriteBoolValue("transient_environment", TransientEnvironment); + writer.WriteDateTimeOffsetValue("updated_at", UpdatedAt); + writer.WriteStringValue("url", Url); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/DeploymentStatus.cs b/src/Ayllu.Github.Client/Github/Client/Models/DeploymentStatus.cs new file mode 100644 index 0000000..de361eb --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/DeploymentStatus.cs @@ -0,0 +1,182 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + /// + /// The status of a deployment. + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class DeploymentStatus : IAdditionalDataHolder, IParsable + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The created_at property + public DateTimeOffset? CreatedAt { get; set; } + /// A GitHub user. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.NullableSimpleUser? Creator { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.NullableSimpleUser Creator { get; set; } +#endif + /// The deployment_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? DeploymentUrl { get; set; } +#nullable restore +#else + public string DeploymentUrl { get; set; } +#endif + /// A short description of the status. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Description { get; set; } +#nullable restore +#else + public string Description { get; set; } +#endif + /// The environment of the deployment that the status is for. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Environment { get; set; } +#nullable restore +#else + public string Environment { get; set; } +#endif + /// The URL for accessing your environment. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? EnvironmentUrl { get; set; } +#nullable restore +#else + public string EnvironmentUrl { get; set; } +#endif + /// The id property + public long? Id { get; set; } + /// The URL to associate with this status. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? LogUrl { get; set; } +#nullable restore +#else + public string LogUrl { get; set; } +#endif + /// The node_id property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? NodeId { get; set; } +#nullable restore +#else + public string NodeId { get; set; } +#endif + /// 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. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.NullableIntegration? PerformedViaGithubApp { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.NullableIntegration PerformedViaGithubApp { get; set; } +#endif + /// The repository_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? RepositoryUrl { get; set; } +#nullable restore +#else + public string RepositoryUrl { get; set; } +#endif + /// The state of the status. + public global::Ayllu.Github.Client.Models.DeploymentStatus_state? State { get; set; } + /// Closing down notice: the URL to associate with this status. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? TargetUrl { get; set; } +#nullable restore +#else + public string TargetUrl { get; set; } +#endif + /// The updated_at property + public DateTimeOffset? UpdatedAt { get; set; } + /// The url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Url { get; set; } +#nullable restore +#else + public string Url { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public DeploymentStatus() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.DeploymentStatus CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.DeploymentStatus(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "created_at", n => { CreatedAt = n.GetDateTimeOffsetValue(); } }, + { "creator", n => { Creator = n.GetObjectValue(global::Ayllu.Github.Client.Models.NullableSimpleUser.CreateFromDiscriminatorValue); } }, + { "deployment_url", n => { DeploymentUrl = n.GetStringValue(); } }, + { "description", n => { Description = n.GetStringValue(); } }, + { "environment", n => { Environment = n.GetStringValue(); } }, + { "environment_url", n => { EnvironmentUrl = n.GetStringValue(); } }, + { "id", n => { Id = n.GetLongValue(); } }, + { "log_url", n => { LogUrl = n.GetStringValue(); } }, + { "node_id", n => { NodeId = n.GetStringValue(); } }, + { "performed_via_github_app", n => { PerformedViaGithubApp = n.GetObjectValue(global::Ayllu.Github.Client.Models.NullableIntegration.CreateFromDiscriminatorValue); } }, + { "repository_url", n => { RepositoryUrl = n.GetStringValue(); } }, + { "state", n => { State = n.GetEnumValue(); } }, + { "target_url", n => { TargetUrl = n.GetStringValue(); } }, + { "updated_at", n => { UpdatedAt = n.GetDateTimeOffsetValue(); } }, + { "url", n => { Url = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteDateTimeOffsetValue("created_at", CreatedAt); + writer.WriteObjectValue("creator", Creator); + writer.WriteStringValue("deployment_url", DeploymentUrl); + writer.WriteStringValue("description", Description); + writer.WriteStringValue("environment", Environment); + writer.WriteStringValue("environment_url", EnvironmentUrl); + writer.WriteLongValue("id", Id); + writer.WriteStringValue("log_url", LogUrl); + writer.WriteStringValue("node_id", NodeId); + writer.WriteObjectValue("performed_via_github_app", PerformedViaGithubApp); + writer.WriteStringValue("repository_url", RepositoryUrl); + writer.WriteEnumValue("state", State); + writer.WriteStringValue("target_url", TargetUrl); + writer.WriteDateTimeOffsetValue("updated_at", UpdatedAt); + writer.WriteStringValue("url", Url); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/DeploymentStatus_state.cs b/src/Ayllu.Github.Client/Github/Client/Models/DeploymentStatus_state.cs new file mode 100644 index 0000000..9718248 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/DeploymentStatus_state.cs @@ -0,0 +1,39 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Models +{ + /// The state of the status. + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public enum DeploymentStatus_state + { + [EnumMember(Value = "error")] + #pragma warning disable CS1591 + Error, + #pragma warning restore CS1591 + [EnumMember(Value = "failure")] + #pragma warning disable CS1591 + Failure, + #pragma warning restore CS1591 + [EnumMember(Value = "inactive")] + #pragma warning disable CS1591 + Inactive, + #pragma warning restore CS1591 + [EnumMember(Value = "pending")] + #pragma warning disable CS1591 + Pending, + #pragma warning restore CS1591 + [EnumMember(Value = "success")] + #pragma warning disable CS1591 + Success, + #pragma warning restore CS1591 + [EnumMember(Value = "queued")] + #pragma warning disable CS1591 + Queued, + #pragma warning restore CS1591 + [EnumMember(Value = "in_progress")] + #pragma warning disable CS1591 + In_progress, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Models/DiffEntry.cs b/src/Ayllu.Github.Client/Github/Client/Models/DiffEntry.cs new file mode 100644 index 0000000..fd3db65 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/DiffEntry.cs @@ -0,0 +1,142 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + /// + /// Diff Entry + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class DiffEntry : IAdditionalDataHolder, IParsable + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The additions property + public int? Additions { get; set; } + /// The blob_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? BlobUrl { get; set; } +#nullable restore +#else + public string BlobUrl { get; set; } +#endif + /// The changes property + public int? Changes { get; set; } + /// The contents_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? ContentsUrl { get; set; } +#nullable restore +#else + public string ContentsUrl { get; set; } +#endif + /// The deletions property + public int? Deletions { get; set; } + /// The filename property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Filename { get; set; } +#nullable restore +#else + public string Filename { get; set; } +#endif + /// The patch property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Patch { get; set; } +#nullable restore +#else + public string Patch { get; set; } +#endif + /// The previous_filename property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? PreviousFilename { get; set; } +#nullable restore +#else + public string PreviousFilename { get; set; } +#endif + /// The raw_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? RawUrl { get; set; } +#nullable restore +#else + public string RawUrl { get; set; } +#endif + /// The sha property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Sha { get; set; } +#nullable restore +#else + public string Sha { get; set; } +#endif + /// The status property + public global::Ayllu.Github.Client.Models.DiffEntry_status? Status { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public DiffEntry() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.DiffEntry CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.DiffEntry(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "additions", n => { Additions = n.GetIntValue(); } }, + { "blob_url", n => { BlobUrl = n.GetStringValue(); } }, + { "changes", n => { Changes = n.GetIntValue(); } }, + { "contents_url", n => { ContentsUrl = n.GetStringValue(); } }, + { "deletions", n => { Deletions = n.GetIntValue(); } }, + { "filename", n => { Filename = n.GetStringValue(); } }, + { "patch", n => { Patch = n.GetStringValue(); } }, + { "previous_filename", n => { PreviousFilename = n.GetStringValue(); } }, + { "raw_url", n => { RawUrl = n.GetStringValue(); } }, + { "sha", n => { Sha = n.GetStringValue(); } }, + { "status", n => { Status = n.GetEnumValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteIntValue("additions", Additions); + writer.WriteStringValue("blob_url", BlobUrl); + writer.WriteIntValue("changes", Changes); + writer.WriteStringValue("contents_url", ContentsUrl); + writer.WriteIntValue("deletions", Deletions); + writer.WriteStringValue("filename", Filename); + writer.WriteStringValue("patch", Patch); + writer.WriteStringValue("previous_filename", PreviousFilename); + writer.WriteStringValue("raw_url", RawUrl); + writer.WriteStringValue("sha", Sha); + writer.WriteEnumValue("status", Status); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/DiffEntry_status.cs b/src/Ayllu.Github.Client/Github/Client/Models/DiffEntry_status.cs new file mode 100644 index 0000000..aad4f9a --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/DiffEntry_status.cs @@ -0,0 +1,40 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public enum DiffEntry_status + #pragma warning restore CS1591 + { + [EnumMember(Value = "added")] + #pragma warning disable CS1591 + Added, + #pragma warning restore CS1591 + [EnumMember(Value = "removed")] + #pragma warning disable CS1591 + Removed, + #pragma warning restore CS1591 + [EnumMember(Value = "modified")] + #pragma warning disable CS1591 + Modified, + #pragma warning restore CS1591 + [EnumMember(Value = "renamed")] + #pragma warning disable CS1591 + Renamed, + #pragma warning restore CS1591 + [EnumMember(Value = "copied")] + #pragma warning disable CS1591 + Copied, + #pragma warning restore CS1591 + [EnumMember(Value = "changed")] + #pragma warning disable CS1591 + Changed, + #pragma warning restore CS1591 + [EnumMember(Value = "unchanged")] + #pragma warning disable CS1591 + Unchanged, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Models/Email.cs b/src/Ayllu.Github.Client/Github/Client/Models/Email.cs new file mode 100644 index 0000000..c392326 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/Email.cs @@ -0,0 +1,84 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + /// + /// Email + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class Email : IAdditionalDataHolder, IParsable + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The email property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? EmailProp { get; set; } +#nullable restore +#else + public string EmailProp { get; set; } +#endif + /// The primary property + public bool? Primary { get; set; } + /// The verified property + public bool? Verified { get; set; } + /// The visibility property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Visibility { get; set; } +#nullable restore +#else + public string Visibility { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public Email() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.Email CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.Email(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "email", n => { EmailProp = n.GetStringValue(); } }, + { "primary", n => { Primary = n.GetBoolValue(); } }, + { "verified", n => { Verified = n.GetBoolValue(); } }, + { "visibility", n => { Visibility = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("email", EmailProp); + writer.WriteBoolValue("primary", Primary); + writer.WriteBoolValue("verified", Verified); + writer.WriteStringValue("visibility", Visibility); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/EmptyObject.cs b/src/Ayllu.Github.Client/Github/Client/Models/EmptyObject.cs new file mode 100644 index 0000000..5ab6682 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/EmptyObject.cs @@ -0,0 +1,46 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + /// + /// An object without any properties. + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class EmptyObject : IParsable + { + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.EmptyObject CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.EmptyObject(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/EmptyObject503Error.cs b/src/Ayllu.Github.Client/Github/Client/Models/EmptyObject503Error.cs new file mode 100644 index 0000000..6320c69 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/EmptyObject503Error.cs @@ -0,0 +1,88 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class EmptyObject503Error : ApiException, IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The code property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Code { get; set; } +#nullable restore +#else + public string Code { get; set; } +#endif + /// The documentation_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? DocumentationUrl { get; set; } +#nullable restore +#else + public string DocumentationUrl { get; set; } +#endif + /// The primary error message. + public override string Message { get => MessageEscaped ?? string.Empty; } + /// The message property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? MessageEscaped { get; set; } +#nullable restore +#else + public string MessageEscaped { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public EmptyObject503Error() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.EmptyObject503Error CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.EmptyObject503Error(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "code", n => { Code = n.GetStringValue(); } }, + { "documentation_url", n => { DocumentationUrl = n.GetStringValue(); } }, + { "message", n => { MessageEscaped = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("code", Code); + writer.WriteStringValue("documentation_url", DocumentationUrl); + writer.WriteStringValue("message", MessageEscaped); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/EnabledRepositories.cs b/src/Ayllu.Github.Client/Github/Client/Models/EnabledRepositories.cs new file mode 100644 index 0000000..1133313 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/EnabledRepositories.cs @@ -0,0 +1,23 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Models +{ + /// The policy that controls the repositories in the organization that are allowed to run GitHub Actions. + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public enum EnabledRepositories + { + [EnumMember(Value = "all")] + #pragma warning disable CS1591 + All, + #pragma warning restore CS1591 + [EnumMember(Value = "none")] + #pragma warning disable CS1591 + None, + #pragma warning restore CS1591 + [EnumMember(Value = "selected")] + #pragma warning disable CS1591 + Selected, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Models/Enterprise.cs b/src/Ayllu.Github.Client/Github/Client/Models/Enterprise.cs new file mode 100644 index 0000000..5d0337d --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/Enterprise.cs @@ -0,0 +1,138 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + /// + /// An enterprise on GitHub. + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class Enterprise : IAdditionalDataHolder, IParsable + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The avatar_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? AvatarUrl { get; set; } +#nullable restore +#else + public string AvatarUrl { get; set; } +#endif + /// The created_at property + public DateTimeOffset? CreatedAt { get; set; } + /// A short description of the enterprise. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Description { get; set; } +#nullable restore +#else + public string Description { get; set; } +#endif + /// The html_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? HtmlUrl { get; set; } +#nullable restore +#else + public string HtmlUrl { get; set; } +#endif + /// Unique identifier of the enterprise + public int? Id { get; set; } + /// The name of the enterprise. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Name { get; set; } +#nullable restore +#else + public string Name { get; set; } +#endif + /// The node_id property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? NodeId { get; set; } +#nullable restore +#else + public string NodeId { get; set; } +#endif + /// The slug url identifier for the enterprise. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Slug { get; set; } +#nullable restore +#else + public string Slug { get; set; } +#endif + /// The updated_at property + public DateTimeOffset? UpdatedAt { get; set; } + /// The enterprise's website URL. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? WebsiteUrl { get; set; } +#nullable restore +#else + public string WebsiteUrl { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public Enterprise() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.Enterprise CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.Enterprise(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "avatar_url", n => { AvatarUrl = n.GetStringValue(); } }, + { "created_at", n => { CreatedAt = n.GetDateTimeOffsetValue(); } }, + { "description", n => { Description = n.GetStringValue(); } }, + { "html_url", n => { HtmlUrl = n.GetStringValue(); } }, + { "id", n => { Id = n.GetIntValue(); } }, + { "name", n => { Name = n.GetStringValue(); } }, + { "node_id", n => { NodeId = n.GetStringValue(); } }, + { "slug", n => { Slug = n.GetStringValue(); } }, + { "updated_at", n => { UpdatedAt = n.GetDateTimeOffsetValue(); } }, + { "website_url", n => { WebsiteUrl = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("avatar_url", AvatarUrl); + writer.WriteDateTimeOffsetValue("created_at", CreatedAt); + writer.WriteStringValue("description", Description); + writer.WriteStringValue("html_url", HtmlUrl); + writer.WriteIntValue("id", Id); + writer.WriteStringValue("name", Name); + writer.WriteStringValue("node_id", NodeId); + writer.WriteStringValue("slug", Slug); + writer.WriteDateTimeOffsetValue("updated_at", UpdatedAt); + writer.WriteStringValue("website_url", WebsiteUrl); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/EnterpriseTeam.cs b/src/Ayllu.Github.Client/Github/Client/Models/EnterpriseTeam.cs new file mode 100644 index 0000000..569d189 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/EnterpriseTeam.cs @@ -0,0 +1,168 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + /// + /// Group of enterprise owners and/or members + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class EnterpriseTeam : IAdditionalDataHolder, IParsable + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The created_at property + public DateTimeOffset? CreatedAt { get; set; } + /// The description property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Description { get; set; } +#nullable restore +#else + public string Description { get; set; } +#endif + /// The group_id property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? GroupId { get; set; } +#nullable restore +#else + public string GroupId { get; set; } +#endif + /// The group_name property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? GroupName { get; set; } +#nullable restore +#else + public string GroupName { get; set; } +#endif + /// The html_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? HtmlUrl { get; set; } +#nullable restore +#else + public string HtmlUrl { get; set; } +#endif + /// The id property + public long? Id { get; set; } + /// The members_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? MembersUrl { get; set; } +#nullable restore +#else + public string MembersUrl { get; set; } +#endif + /// The name property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Name { get; set; } +#nullable restore +#else + public string Name { get; set; } +#endif + /// The organization_selection_type property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? OrganizationSelectionType { get; set; } +#nullable restore +#else + public string OrganizationSelectionType { get; set; } +#endif + /// The slug property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Slug { get; set; } +#nullable restore +#else + public string Slug { get; set; } +#endif + /// The sync_to_organizations property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? SyncToOrganizations { get; set; } +#nullable restore +#else + public string SyncToOrganizations { get; set; } +#endif + /// The updated_at property + public DateTimeOffset? UpdatedAt { get; set; } + /// The url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Url { get; set; } +#nullable restore +#else + public string Url { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public EnterpriseTeam() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.EnterpriseTeam CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.EnterpriseTeam(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "created_at", n => { CreatedAt = n.GetDateTimeOffsetValue(); } }, + { "description", n => { Description = n.GetStringValue(); } }, + { "group_id", n => { GroupId = n.GetStringValue(); } }, + { "group_name", n => { GroupName = n.GetStringValue(); } }, + { "html_url", n => { HtmlUrl = n.GetStringValue(); } }, + { "id", n => { Id = n.GetLongValue(); } }, + { "members_url", n => { MembersUrl = n.GetStringValue(); } }, + { "name", n => { Name = n.GetStringValue(); } }, + { "organization_selection_type", n => { OrganizationSelectionType = n.GetStringValue(); } }, + { "slug", n => { Slug = n.GetStringValue(); } }, + { "sync_to_organizations", n => { SyncToOrganizations = n.GetStringValue(); } }, + { "updated_at", n => { UpdatedAt = n.GetDateTimeOffsetValue(); } }, + { "url", n => { Url = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteDateTimeOffsetValue("created_at", CreatedAt); + writer.WriteStringValue("description", Description); + writer.WriteStringValue("group_id", GroupId); + writer.WriteStringValue("group_name", GroupName); + writer.WriteStringValue("html_url", HtmlUrl); + writer.WriteLongValue("id", Id); + writer.WriteStringValue("members_url", MembersUrl); + writer.WriteStringValue("name", Name); + writer.WriteStringValue("organization_selection_type", OrganizationSelectionType); + writer.WriteStringValue("slug", Slug); + writer.WriteStringValue("sync_to_organizations", SyncToOrganizations); + writer.WriteDateTimeOffsetValue("updated_at", UpdatedAt); + writer.WriteStringValue("url", Url); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/EnvironmentApprovals.cs b/src/Ayllu.Github.Client/Github/Client/Models/EnvironmentApprovals.cs new file mode 100644 index 0000000..2d96086 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/EnvironmentApprovals.cs @@ -0,0 +1,90 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + /// + /// An entry in the reviews log for environment deployments + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class EnvironmentApprovals : IAdditionalDataHolder, IParsable + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The comment submitted with the deployment review +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Comment { get; set; } +#nullable restore +#else + public string Comment { get; set; } +#endif + /// The list of environments that were approved or rejected +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? Environments { get; set; } +#nullable restore +#else + public List Environments { get; set; } +#endif + /// Whether deployment to the environment(s) was approved or rejected or pending (with comments) + public global::Ayllu.Github.Client.Models.EnvironmentApprovals_state? State { get; set; } + /// A GitHub user. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.SimpleUser? User { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.SimpleUser User { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public EnvironmentApprovals() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.EnvironmentApprovals CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.EnvironmentApprovals(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "comment", n => { Comment = n.GetStringValue(); } }, + { "environments", n => { Environments = n.GetCollectionOfObjectValues(global::Ayllu.Github.Client.Models.EnvironmentApprovals_environments.CreateFromDiscriminatorValue)?.AsList(); } }, + { "state", n => { State = n.GetEnumValue(); } }, + { "user", n => { User = n.GetObjectValue(global::Ayllu.Github.Client.Models.SimpleUser.CreateFromDiscriminatorValue); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("comment", Comment); + writer.WriteCollectionOfObjectValues("environments", Environments); + writer.WriteEnumValue("state", State); + writer.WriteObjectValue("user", User); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/EnvironmentApprovals_environments.cs b/src/Ayllu.Github.Client/Github/Client/Models/EnvironmentApprovals_environments.cs new file mode 100644 index 0000000..80517bb --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/EnvironmentApprovals_environments.cs @@ -0,0 +1,107 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class EnvironmentApprovals_environments : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The time that the environment was created, in ISO 8601 format. + public DateTimeOffset? CreatedAt { get; set; } + /// The html_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? HtmlUrl { get; set; } +#nullable restore +#else + public string HtmlUrl { get; set; } +#endif + /// The id of the environment. + public int? Id { get; set; } + /// The name of the environment. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Name { get; set; } +#nullable restore +#else + public string Name { get; set; } +#endif + /// The node_id property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? NodeId { get; set; } +#nullable restore +#else + public string NodeId { get; set; } +#endif + /// The time that the environment was last updated, in ISO 8601 format. + public DateTimeOffset? UpdatedAt { get; set; } + /// The url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Url { get; set; } +#nullable restore +#else + public string Url { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public EnvironmentApprovals_environments() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.EnvironmentApprovals_environments CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.EnvironmentApprovals_environments(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "created_at", n => { CreatedAt = n.GetDateTimeOffsetValue(); } }, + { "html_url", n => { HtmlUrl = n.GetStringValue(); } }, + { "id", n => { Id = n.GetIntValue(); } }, + { "name", n => { Name = n.GetStringValue(); } }, + { "node_id", n => { NodeId = n.GetStringValue(); } }, + { "updated_at", n => { UpdatedAt = n.GetDateTimeOffsetValue(); } }, + { "url", n => { Url = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteDateTimeOffsetValue("created_at", CreatedAt); + writer.WriteStringValue("html_url", HtmlUrl); + writer.WriteIntValue("id", Id); + writer.WriteStringValue("name", Name); + writer.WriteStringValue("node_id", NodeId); + writer.WriteDateTimeOffsetValue("updated_at", UpdatedAt); + writer.WriteStringValue("url", Url); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/EnvironmentApprovals_state.cs b/src/Ayllu.Github.Client/Github/Client/Models/EnvironmentApprovals_state.cs new file mode 100644 index 0000000..df0077f --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/EnvironmentApprovals_state.cs @@ -0,0 +1,23 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Models +{ + /// Whether deployment to the environment(s) was approved or rejected or pending (with comments) + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public enum EnvironmentApprovals_state + { + [EnumMember(Value = "approved")] + #pragma warning disable CS1591 + Approved, + #pragma warning restore CS1591 + [EnumMember(Value = "rejected")] + #pragma warning disable CS1591 + Rejected, + #pragma warning restore CS1591 + [EnumMember(Value = "pending")] + #pragma warning disable CS1591 + Pending, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Models/EnvironmentObject.cs b/src/Ayllu.Github.Client/Github/Client/Models/EnvironmentObject.cs new file mode 100644 index 0000000..5c8e717 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/EnvironmentObject.cs @@ -0,0 +1,194 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + /// + /// Details of a deployment environment + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class EnvironmentObject : IAdditionalDataHolder, IParsable + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The time that the environment was created, in ISO 8601 format. + public DateTimeOffset? CreatedAt { get; set; } + /// The type of deployment branch policy for this environment. To allow all branches to deploy, set to `null`. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.DeploymentBranchPolicySettings? DeploymentBranchPolicy { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.DeploymentBranchPolicySettings DeploymentBranchPolicy { get; set; } +#endif + /// The html_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? HtmlUrl { get; set; } +#nullable restore +#else + public string HtmlUrl { get; set; } +#endif + /// The id of the environment. + public long? Id { get; set; } + /// The name of the environment. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Name { get; set; } +#nullable restore +#else + public string Name { get; set; } +#endif + /// The node_id property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? NodeId { get; set; } +#nullable restore +#else + public string NodeId { get; set; } +#endif + /// Built-in deployment protection rules for the environment. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? ProtectionRules { get; set; } +#nullable restore +#else + public List ProtectionRules { get; set; } +#endif + /// The time that the environment was last updated, in ISO 8601 format. + public DateTimeOffset? UpdatedAt { get; set; } + /// The url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Url { get; set; } +#nullable restore +#else + public string Url { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public EnvironmentObject() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.EnvironmentObject CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.EnvironmentObject(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "created_at", n => { CreatedAt = n.GetDateTimeOffsetValue(); } }, + { "deployment_branch_policy", n => { DeploymentBranchPolicy = n.GetObjectValue(global::Ayllu.Github.Client.Models.DeploymentBranchPolicySettings.CreateFromDiscriminatorValue); } }, + { "html_url", n => { HtmlUrl = n.GetStringValue(); } }, + { "id", n => { Id = n.GetLongValue(); } }, + { "name", n => { Name = n.GetStringValue(); } }, + { "node_id", n => { NodeId = n.GetStringValue(); } }, + { "protection_rules", n => { ProtectionRules = n.GetCollectionOfObjectValues(global::Ayllu.Github.Client.Models.EnvironmentObject.Environment_protection_rules.CreateFromDiscriminatorValue)?.AsList(); } }, + { "updated_at", n => { UpdatedAt = n.GetDateTimeOffsetValue(); } }, + { "url", n => { Url = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteDateTimeOffsetValue("created_at", CreatedAt); + writer.WriteObjectValue("deployment_branch_policy", DeploymentBranchPolicy); + writer.WriteStringValue("html_url", HtmlUrl); + writer.WriteLongValue("id", Id); + writer.WriteStringValue("name", Name); + writer.WriteStringValue("node_id", NodeId); + writer.WriteCollectionOfObjectValues("protection_rules", ProtectionRules); + writer.WriteDateTimeOffsetValue("updated_at", UpdatedAt); + writer.WriteStringValue("url", Url); + writer.WriteAdditionalData(AdditionalData); + } + /// + /// Composed type wrapper for classes , , + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class Environment_protection_rules : IComposedTypeWrapper, IParsable + { + /// Composed type representation for type +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.Environment_protection_rulesMember1? EnvironmentProtectionRulesMember1 { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.Environment_protection_rulesMember1 EnvironmentProtectionRulesMember1 { get; set; } +#endif + /// Composed type representation for type +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.Environment_protection_rulesMember2? EnvironmentProtectionRulesMember2 { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.Environment_protection_rulesMember2 EnvironmentProtectionRulesMember2 { get; set; } +#endif + /// Composed type representation for type +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.Environment_protection_rulesMember3? EnvironmentProtectionRulesMember3 { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.Environment_protection_rulesMember3 EnvironmentProtectionRulesMember3 { get; set; } +#endif + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.EnvironmentObject.Environment_protection_rules CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + var result = new global::Ayllu.Github.Client.Models.EnvironmentObject.Environment_protection_rules(); + result.EnvironmentProtectionRulesMember1 = new global::Ayllu.Github.Client.Models.Environment_protection_rulesMember1(); + result.EnvironmentProtectionRulesMember2 = new global::Ayllu.Github.Client.Models.Environment_protection_rulesMember2(); + result.EnvironmentProtectionRulesMember3 = new global::Ayllu.Github.Client.Models.Environment_protection_rulesMember3(); + return result; + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + if(EnvironmentProtectionRulesMember1 != null || EnvironmentProtectionRulesMember2 != null || EnvironmentProtectionRulesMember3 != null) + { + return ParseNodeHelper.MergeDeserializersForIntersectionWrapper(EnvironmentProtectionRulesMember1, EnvironmentProtectionRulesMember2, EnvironmentProtectionRulesMember3); + } + return new Dictionary>(); + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteObjectValue(null, EnvironmentProtectionRulesMember1, EnvironmentProtectionRulesMember2, EnvironmentProtectionRulesMember3); + } + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/Environment_protection_rulesMember1.cs b/src/Ayllu.Github.Client/Github/Client/Models/Environment_protection_rulesMember1.cs new file mode 100644 index 0000000..29b3929 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/Environment_protection_rulesMember1.cs @@ -0,0 +1,83 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class Environment_protection_rulesMember1 : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The id property + public int? Id { get; set; } + /// The node_id property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? NodeId { get; set; } +#nullable restore +#else + public string NodeId { get; set; } +#endif + /// The type property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Type { get; set; } +#nullable restore +#else + public string Type { get; set; } +#endif + /// 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). + public int? WaitTimer { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public Environment_protection_rulesMember1() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.Environment_protection_rulesMember1 CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.Environment_protection_rulesMember1(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "id", n => { Id = n.GetIntValue(); } }, + { "node_id", n => { NodeId = n.GetStringValue(); } }, + { "type", n => { Type = n.GetStringValue(); } }, + { "wait_timer", n => { WaitTimer = n.GetIntValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteIntValue("id", Id); + writer.WriteStringValue("node_id", NodeId); + writer.WriteStringValue("type", Type); + writer.WriteIntValue("wait_timer", WaitTimer); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/Environment_protection_rulesMember2.cs b/src/Ayllu.Github.Client/Github/Client/Models/Environment_protection_rulesMember2.cs new file mode 100644 index 0000000..17adf06 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/Environment_protection_rulesMember2.cs @@ -0,0 +1,93 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class Environment_protection_rulesMember2 : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The id property + public int? Id { get; set; } + /// The node_id property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? NodeId { get; set; } +#nullable restore +#else + public string NodeId { get; set; } +#endif + /// Whether deployments to this environment can be approved by the user who created the deployment. + public bool? PreventSelfReview { get; set; } + /// 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. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? Reviewers { get; set; } +#nullable restore +#else + public List Reviewers { get; set; } +#endif + /// The type property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Type { get; set; } +#nullable restore +#else + public string Type { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public Environment_protection_rulesMember2() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.Environment_protection_rulesMember2 CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.Environment_protection_rulesMember2(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "id", n => { Id = n.GetIntValue(); } }, + { "node_id", n => { NodeId = n.GetStringValue(); } }, + { "prevent_self_review", n => { PreventSelfReview = n.GetBoolValue(); } }, + { "reviewers", n => { Reviewers = n.GetCollectionOfObjectValues(global::Ayllu.Github.Client.Models.Environment_protection_rulesMember2_reviewers.CreateFromDiscriminatorValue)?.AsList(); } }, + { "type", n => { Type = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteIntValue("id", Id); + writer.WriteStringValue("node_id", NodeId); + writer.WriteBoolValue("prevent_self_review", PreventSelfReview); + writer.WriteCollectionOfObjectValues("reviewers", Reviewers); + writer.WriteStringValue("type", Type); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/Environment_protection_rulesMember2_reviewers.cs b/src/Ayllu.Github.Client/Github/Client/Models/Environment_protection_rulesMember2_reviewers.cs new file mode 100644 index 0000000..6a64e71 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/Environment_protection_rulesMember2_reviewers.cs @@ -0,0 +1,126 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class Environment_protection_rulesMember2_reviewers : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The reviewer property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.Environment_protection_rulesMember2_reviewers.Environment_protection_rulesMember2_reviewers_reviewer? Reviewer { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.Environment_protection_rulesMember2_reviewers.Environment_protection_rulesMember2_reviewers_reviewer Reviewer { get; set; } +#endif + /// The type of reviewer. + public global::Ayllu.Github.Client.Models.DeploymentReviewerType? Type { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public Environment_protection_rulesMember2_reviewers() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.Environment_protection_rulesMember2_reviewers CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.Environment_protection_rulesMember2_reviewers(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "reviewer", n => { Reviewer = n.GetObjectValue(global::Ayllu.Github.Client.Models.Environment_protection_rulesMember2_reviewers.Environment_protection_rulesMember2_reviewers_reviewer.CreateFromDiscriminatorValue); } }, + { "type", n => { Type = n.GetEnumValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteObjectValue("reviewer", Reviewer); + writer.WriteEnumValue("type", Type); + writer.WriteAdditionalData(AdditionalData); + } + /// + /// Composed type wrapper for classes , + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class Environment_protection_rulesMember2_reviewers_reviewer : IComposedTypeWrapper, IParsable + { + /// Composed type representation for type +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.SimpleUser? SimpleUser { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.SimpleUser SimpleUser { get; set; } +#endif + /// Composed type representation for type +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.Team? Team { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.Team Team { get; set; } +#endif + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.Environment_protection_rulesMember2_reviewers.Environment_protection_rulesMember2_reviewers_reviewer CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + var result = new global::Ayllu.Github.Client.Models.Environment_protection_rulesMember2_reviewers.Environment_protection_rulesMember2_reviewers_reviewer(); + result.SimpleUser = new global::Ayllu.Github.Client.Models.SimpleUser(); + result.Team = new global::Ayllu.Github.Client.Models.Team(); + return result; + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + if(SimpleUser != null || Team != null) + { + return ParseNodeHelper.MergeDeserializersForIntersectionWrapper(SimpleUser, Team); + } + return new Dictionary>(); + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteObjectValue(null, SimpleUser, Team); + } + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/Environment_protection_rulesMember3.cs b/src/Ayllu.Github.Client/Github/Client/Models/Environment_protection_rulesMember3.cs new file mode 100644 index 0000000..745d79d --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/Environment_protection_rulesMember3.cs @@ -0,0 +1,79 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class Environment_protection_rulesMember3 : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The id property + public int? Id { get; set; } + /// The node_id property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? NodeId { get; set; } +#nullable restore +#else + public string NodeId { get; set; } +#endif + /// The type property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Type { get; set; } +#nullable restore +#else + public string Type { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public Environment_protection_rulesMember3() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.Environment_protection_rulesMember3 CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.Environment_protection_rulesMember3(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "id", n => { Id = n.GetIntValue(); } }, + { "node_id", n => { NodeId = n.GetStringValue(); } }, + { "type", n => { Type = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteIntValue("id", Id); + writer.WriteStringValue("node_id", NodeId); + writer.WriteStringValue("type", Type); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/Event.cs b/src/Ayllu.Github.Client/Github/Client/Models/Event.cs new file mode 100644 index 0000000..ba353f2 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/Event.cs @@ -0,0 +1,124 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + /// + /// Event + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class Event : IAdditionalDataHolder, IParsable + { + /// Actor +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.Actor? Actor { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.Actor Actor { get; set; } +#endif + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The created_at property + public DateTimeOffset? CreatedAt { get; set; } + /// The id property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Id { get; set; } +#nullable restore +#else + public string Id { get; set; } +#endif + /// Actor +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.Actor? Org { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.Actor Org { get; set; } +#endif + /// The payload property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.Event_payload? Payload { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.Event_payload Payload { get; set; } +#endif + /// The public property + public bool? Public { get; set; } + /// The repo property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.Event_repo? Repo { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.Event_repo Repo { get; set; } +#endif + /// The type property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Type { get; set; } +#nullable restore +#else + public string Type { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public Event() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.Event CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.Event(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "actor", n => { Actor = n.GetObjectValue(global::Ayllu.Github.Client.Models.Actor.CreateFromDiscriminatorValue); } }, + { "created_at", n => { CreatedAt = n.GetDateTimeOffsetValue(); } }, + { "id", n => { Id = n.GetStringValue(); } }, + { "org", n => { Org = n.GetObjectValue(global::Ayllu.Github.Client.Models.Actor.CreateFromDiscriminatorValue); } }, + { "payload", n => { Payload = n.GetObjectValue(global::Ayllu.Github.Client.Models.Event_payload.CreateFromDiscriminatorValue); } }, + { "public", n => { Public = n.GetBoolValue(); } }, + { "repo", n => { Repo = n.GetObjectValue(global::Ayllu.Github.Client.Models.Event_repo.CreateFromDiscriminatorValue); } }, + { "type", n => { Type = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteObjectValue("actor", Actor); + writer.WriteDateTimeOffsetValue("created_at", CreatedAt); + writer.WriteStringValue("id", Id); + writer.WriteObjectValue("org", Org); + writer.WriteObjectValue("payload", Payload); + writer.WriteBoolValue("public", Public); + writer.WriteObjectValue("repo", Repo); + writer.WriteStringValue("type", Type); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/Event_payload.cs b/src/Ayllu.Github.Client/Github/Client/Models/Event_payload.cs new file mode 100644 index 0000000..dbc6153 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/Event_payload.cs @@ -0,0 +1,95 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class Event_payload : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// The action property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Action { get; set; } +#nullable restore +#else + public string Action { get; set; } +#endif + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// Comments provide a way for people to collaborate on an issue. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.IssueComment? Comment { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.IssueComment Comment { get; set; } +#endif + /// Issues are a great way to keep track of tasks, enhancements, and bugs for your projects. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.Issue? Issue { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.Issue Issue { get; set; } +#endif + /// The pages property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? Pages { get; set; } +#nullable restore +#else + public List Pages { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public Event_payload() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.Event_payload CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.Event_payload(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "action", n => { Action = n.GetStringValue(); } }, + { "comment", n => { Comment = n.GetObjectValue(global::Ayllu.Github.Client.Models.IssueComment.CreateFromDiscriminatorValue); } }, + { "issue", n => { Issue = n.GetObjectValue(global::Ayllu.Github.Client.Models.Issue.CreateFromDiscriminatorValue); } }, + { "pages", n => { Pages = n.GetCollectionOfObjectValues(global::Ayllu.Github.Client.Models.Event_payload_pages.CreateFromDiscriminatorValue)?.AsList(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("action", Action); + writer.WriteObjectValue("comment", Comment); + writer.WriteObjectValue("issue", Issue); + writer.WriteCollectionOfObjectValues("pages", Pages); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/Event_payload_pages.cs b/src/Ayllu.Github.Client/Github/Client/Models/Event_payload_pages.cs new file mode 100644 index 0000000..818ce66 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/Event_payload_pages.cs @@ -0,0 +1,115 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class Event_payload_pages : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// The action property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Action { get; set; } +#nullable restore +#else + public string Action { get; set; } +#endif + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The html_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? HtmlUrl { get; set; } +#nullable restore +#else + public string HtmlUrl { get; set; } +#endif + /// The page_name property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? PageName { get; set; } +#nullable restore +#else + public string PageName { get; set; } +#endif + /// The sha property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Sha { get; set; } +#nullable restore +#else + public string Sha { get; set; } +#endif + /// The summary property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Summary { get; set; } +#nullable restore +#else + public string Summary { get; set; } +#endif + /// The title property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Title { get; set; } +#nullable restore +#else + public string Title { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public Event_payload_pages() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.Event_payload_pages CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.Event_payload_pages(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "action", n => { Action = n.GetStringValue(); } }, + { "html_url", n => { HtmlUrl = n.GetStringValue(); } }, + { "page_name", n => { PageName = n.GetStringValue(); } }, + { "sha", n => { Sha = n.GetStringValue(); } }, + { "summary", n => { Summary = n.GetStringValue(); } }, + { "title", n => { Title = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("action", Action); + writer.WriteStringValue("html_url", HtmlUrl); + writer.WriteStringValue("page_name", PageName); + writer.WriteStringValue("sha", Sha); + writer.WriteStringValue("summary", Summary); + writer.WriteStringValue("title", Title); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/Event_repo.cs b/src/Ayllu.Github.Client/Github/Client/Models/Event_repo.cs new file mode 100644 index 0000000..5bf10d6 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/Event_repo.cs @@ -0,0 +1,79 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class Event_repo : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The id property + public int? Id { get; set; } + /// The name property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Name { get; set; } +#nullable restore +#else + public string Name { get; set; } +#endif + /// The url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Url { get; set; } +#nullable restore +#else + public string Url { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public Event_repo() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.Event_repo CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.Event_repo(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "id", n => { Id = n.GetIntValue(); } }, + { "name", n => { Name = n.GetStringValue(); } }, + { "url", n => { Url = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteIntValue("id", Id); + writer.WriteStringValue("name", Name); + writer.WriteStringValue("url", Url); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/Events503Error.cs b/src/Ayllu.Github.Client/Github/Client/Models/Events503Error.cs new file mode 100644 index 0000000..af51489 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/Events503Error.cs @@ -0,0 +1,88 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class Events503Error : ApiException, IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The code property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Code { get; set; } +#nullable restore +#else + public string Code { get; set; } +#endif + /// The documentation_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? DocumentationUrl { get; set; } +#nullable restore +#else + public string DocumentationUrl { get; set; } +#endif + /// The primary error message. + public override string Message { get => MessageEscaped ?? string.Empty; } + /// The message property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? MessageEscaped { get; set; } +#nullable restore +#else + public string MessageEscaped { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public Events503Error() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.Events503Error CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.Events503Error(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "code", n => { Code = n.GetStringValue(); } }, + { "documentation_url", n => { DocumentationUrl = n.GetStringValue(); } }, + { "message", n => { MessageEscaped = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("code", Code); + writer.WriteStringValue("documentation_url", DocumentationUrl); + writer.WriteStringValue("message", MessageEscaped); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/Feed.cs b/src/Ayllu.Github.Client/Github/Client/Models/Feed.cs new file mode 100644 index 0000000..61da606 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/Feed.cs @@ -0,0 +1,166 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + /// + /// Feed + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class Feed : IAdditionalDataHolder, IParsable + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The current_user_actor_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? CurrentUserActorUrl { get; set; } +#nullable restore +#else + public string CurrentUserActorUrl { get; set; } +#endif + /// The current_user_organization_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? CurrentUserOrganizationUrl { get; set; } +#nullable restore +#else + public string CurrentUserOrganizationUrl { get; set; } +#endif + /// The current_user_organization_urls property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? CurrentUserOrganizationUrls { get; set; } +#nullable restore +#else + public List CurrentUserOrganizationUrls { get; set; } +#endif + /// The current_user_public_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? CurrentUserPublicUrl { get; set; } +#nullable restore +#else + public string CurrentUserPublicUrl { get; set; } +#endif + /// The current_user_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? CurrentUserUrl { get; set; } +#nullable restore +#else + public string CurrentUserUrl { get; set; } +#endif + /// The _links property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.Feed__links? Links { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.Feed__links Links { get; set; } +#endif + /// A feed of discussions for a given repository and category. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? RepositoryDiscussionsCategoryUrl { get; set; } +#nullable restore +#else + public string RepositoryDiscussionsCategoryUrl { get; set; } +#endif + /// A feed of discussions for a given repository. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? RepositoryDiscussionsUrl { get; set; } +#nullable restore +#else + public string RepositoryDiscussionsUrl { get; set; } +#endif + /// The security_advisories_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? SecurityAdvisoriesUrl { get; set; } +#nullable restore +#else + public string SecurityAdvisoriesUrl { get; set; } +#endif + /// The timeline_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? TimelineUrl { get; set; } +#nullable restore +#else + public string TimelineUrl { get; set; } +#endif + /// The user_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? UserUrl { get; set; } +#nullable restore +#else + public string UserUrl { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public Feed() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.Feed CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.Feed(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "current_user_actor_url", n => { CurrentUserActorUrl = n.GetStringValue(); } }, + { "current_user_organization_url", n => { CurrentUserOrganizationUrl = n.GetStringValue(); } }, + { "current_user_organization_urls", n => { CurrentUserOrganizationUrls = n.GetCollectionOfPrimitiveValues()?.AsList(); } }, + { "current_user_public_url", n => { CurrentUserPublicUrl = n.GetStringValue(); } }, + { "current_user_url", n => { CurrentUserUrl = n.GetStringValue(); } }, + { "_links", n => { Links = n.GetObjectValue(global::Ayllu.Github.Client.Models.Feed__links.CreateFromDiscriminatorValue); } }, + { "repository_discussions_category_url", n => { RepositoryDiscussionsCategoryUrl = n.GetStringValue(); } }, + { "repository_discussions_url", n => { RepositoryDiscussionsUrl = n.GetStringValue(); } }, + { "security_advisories_url", n => { SecurityAdvisoriesUrl = n.GetStringValue(); } }, + { "timeline_url", n => { TimelineUrl = n.GetStringValue(); } }, + { "user_url", n => { UserUrl = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("current_user_actor_url", CurrentUserActorUrl); + writer.WriteStringValue("current_user_organization_url", CurrentUserOrganizationUrl); + writer.WriteCollectionOfPrimitiveValues("current_user_organization_urls", CurrentUserOrganizationUrls); + writer.WriteStringValue("current_user_public_url", CurrentUserPublicUrl); + writer.WriteStringValue("current_user_url", CurrentUserUrl); + writer.WriteObjectValue("_links", Links); + writer.WriteStringValue("repository_discussions_category_url", RepositoryDiscussionsCategoryUrl); + writer.WriteStringValue("repository_discussions_url", RepositoryDiscussionsUrl); + writer.WriteStringValue("security_advisories_url", SecurityAdvisoriesUrl); + writer.WriteStringValue("timeline_url", TimelineUrl); + writer.WriteStringValue("user_url", UserUrl); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/Feed__links.cs b/src/Ayllu.Github.Client/Github/Client/Models/Feed__links.cs new file mode 100644 index 0000000..f06ab0b --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/Feed__links.cs @@ -0,0 +1,155 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class Feed__links : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// Hypermedia Link with Type +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.LinkWithType? CurrentUser { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.LinkWithType CurrentUser { get; set; } +#endif + /// Hypermedia Link with Type +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.LinkWithType? CurrentUserActor { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.LinkWithType CurrentUserActor { get; set; } +#endif + /// Hypermedia Link with Type +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.LinkWithType? CurrentUserOrganization { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.LinkWithType CurrentUserOrganization { get; set; } +#endif + /// The current_user_organizations property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? CurrentUserOrganizations { get; set; } +#nullable restore +#else + public List CurrentUserOrganizations { get; set; } +#endif + /// Hypermedia Link with Type +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.LinkWithType? CurrentUserPublic { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.LinkWithType CurrentUserPublic { get; set; } +#endif + /// Hypermedia Link with Type +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.LinkWithType? RepositoryDiscussions { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.LinkWithType RepositoryDiscussions { get; set; } +#endif + /// Hypermedia Link with Type +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.LinkWithType? RepositoryDiscussionsCategory { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.LinkWithType RepositoryDiscussionsCategory { get; set; } +#endif + /// Hypermedia Link with Type +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.LinkWithType? SecurityAdvisories { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.LinkWithType SecurityAdvisories { get; set; } +#endif + /// Hypermedia Link with Type +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.LinkWithType? Timeline { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.LinkWithType Timeline { get; set; } +#endif + /// Hypermedia Link with Type +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.LinkWithType? User { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.LinkWithType User { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public Feed__links() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.Feed__links CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.Feed__links(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "current_user", n => { CurrentUser = n.GetObjectValue(global::Ayllu.Github.Client.Models.LinkWithType.CreateFromDiscriminatorValue); } }, + { "current_user_actor", n => { CurrentUserActor = n.GetObjectValue(global::Ayllu.Github.Client.Models.LinkWithType.CreateFromDiscriminatorValue); } }, + { "current_user_organization", n => { CurrentUserOrganization = n.GetObjectValue(global::Ayllu.Github.Client.Models.LinkWithType.CreateFromDiscriminatorValue); } }, + { "current_user_organizations", n => { CurrentUserOrganizations = n.GetCollectionOfObjectValues(global::Ayllu.Github.Client.Models.LinkWithType.CreateFromDiscriminatorValue)?.AsList(); } }, + { "current_user_public", n => { CurrentUserPublic = n.GetObjectValue(global::Ayllu.Github.Client.Models.LinkWithType.CreateFromDiscriminatorValue); } }, + { "repository_discussions", n => { RepositoryDiscussions = n.GetObjectValue(global::Ayllu.Github.Client.Models.LinkWithType.CreateFromDiscriminatorValue); } }, + { "repository_discussions_category", n => { RepositoryDiscussionsCategory = n.GetObjectValue(global::Ayllu.Github.Client.Models.LinkWithType.CreateFromDiscriminatorValue); } }, + { "security_advisories", n => { SecurityAdvisories = n.GetObjectValue(global::Ayllu.Github.Client.Models.LinkWithType.CreateFromDiscriminatorValue); } }, + { "timeline", n => { Timeline = n.GetObjectValue(global::Ayllu.Github.Client.Models.LinkWithType.CreateFromDiscriminatorValue); } }, + { "user", n => { User = n.GetObjectValue(global::Ayllu.Github.Client.Models.LinkWithType.CreateFromDiscriminatorValue); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteObjectValue("current_user", CurrentUser); + writer.WriteObjectValue("current_user_actor", CurrentUserActor); + writer.WriteObjectValue("current_user_organization", CurrentUserOrganization); + writer.WriteCollectionOfObjectValues("current_user_organizations", CurrentUserOrganizations); + writer.WriteObjectValue("current_user_public", CurrentUserPublic); + writer.WriteObjectValue("repository_discussions", RepositoryDiscussions); + writer.WriteObjectValue("repository_discussions_category", RepositoryDiscussionsCategory); + writer.WriteObjectValue("security_advisories", SecurityAdvisories); + writer.WriteObjectValue("timeline", Timeline); + writer.WriteObjectValue("user", User); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/FileCommit.cs b/src/Ayllu.Github.Client/Github/Client/Models/FileCommit.cs new file mode 100644 index 0000000..8c628e9 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/FileCommit.cs @@ -0,0 +1,76 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + /// + /// File Commit + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class FileCommit : IAdditionalDataHolder, IParsable + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The commit property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.FileCommit_commit? Commit { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.FileCommit_commit Commit { get; set; } +#endif + /// The content property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.FileCommit_content? Content { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.FileCommit_content Content { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public FileCommit() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.FileCommit CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.FileCommit(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "commit", n => { Commit = n.GetObjectValue(global::Ayllu.Github.Client.Models.FileCommit_commit.CreateFromDiscriminatorValue); } }, + { "content", n => { Content = n.GetObjectValue(global::Ayllu.Github.Client.Models.FileCommit_content.CreateFromDiscriminatorValue); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteObjectValue("commit", Commit); + writer.WriteObjectValue("content", Content); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/FileCommit503Error.cs b/src/Ayllu.Github.Client/Github/Client/Models/FileCommit503Error.cs new file mode 100644 index 0000000..959f85c --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/FileCommit503Error.cs @@ -0,0 +1,88 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class FileCommit503Error : ApiException, IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The code property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Code { get; set; } +#nullable restore +#else + public string Code { get; set; } +#endif + /// The documentation_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? DocumentationUrl { get; set; } +#nullable restore +#else + public string DocumentationUrl { get; set; } +#endif + /// The primary error message. + public override string Message { get => MessageEscaped ?? string.Empty; } + /// The message property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? MessageEscaped { get; set; } +#nullable restore +#else + public string MessageEscaped { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public FileCommit503Error() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.FileCommit503Error CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.FileCommit503Error(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "code", n => { Code = n.GetStringValue(); } }, + { "documentation_url", n => { DocumentationUrl = n.GetStringValue(); } }, + { "message", n => { MessageEscaped = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("code", Code); + writer.WriteStringValue("documentation_url", DocumentationUrl); + writer.WriteStringValue("message", MessageEscaped); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/FileCommit_commit.cs b/src/Ayllu.Github.Client/Github/Client/Models/FileCommit_commit.cs new file mode 100644 index 0000000..a3a10f0 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/FileCommit_commit.cs @@ -0,0 +1,155 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class FileCommit_commit : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The author property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.FileCommit_commit_author? Author { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.FileCommit_commit_author Author { get; set; } +#endif + /// The committer property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.FileCommit_commit_committer? Committer { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.FileCommit_commit_committer Committer { get; set; } +#endif + /// The html_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? HtmlUrl { get; set; } +#nullable restore +#else + public string HtmlUrl { get; set; } +#endif + /// The message property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Message { get; set; } +#nullable restore +#else + public string Message { get; set; } +#endif + /// The node_id property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? NodeId { get; set; } +#nullable restore +#else + public string NodeId { get; set; } +#endif + /// The parents property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? Parents { get; set; } +#nullable restore +#else + public List Parents { get; set; } +#endif + /// The sha property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Sha { get; set; } +#nullable restore +#else + public string Sha { get; set; } +#endif + /// The tree property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.FileCommit_commit_tree? Tree { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.FileCommit_commit_tree Tree { get; set; } +#endif + /// The url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Url { get; set; } +#nullable restore +#else + public string Url { get; set; } +#endif + /// The verification property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.FileCommit_commit_verification? Verification { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.FileCommit_commit_verification Verification { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public FileCommit_commit() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.FileCommit_commit CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.FileCommit_commit(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "author", n => { Author = n.GetObjectValue(global::Ayllu.Github.Client.Models.FileCommit_commit_author.CreateFromDiscriminatorValue); } }, + { "committer", n => { Committer = n.GetObjectValue(global::Ayllu.Github.Client.Models.FileCommit_commit_committer.CreateFromDiscriminatorValue); } }, + { "html_url", n => { HtmlUrl = n.GetStringValue(); } }, + { "message", n => { Message = n.GetStringValue(); } }, + { "node_id", n => { NodeId = n.GetStringValue(); } }, + { "parents", n => { Parents = n.GetCollectionOfObjectValues(global::Ayllu.Github.Client.Models.FileCommit_commit_parents.CreateFromDiscriminatorValue)?.AsList(); } }, + { "sha", n => { Sha = n.GetStringValue(); } }, + { "tree", n => { Tree = n.GetObjectValue(global::Ayllu.Github.Client.Models.FileCommit_commit_tree.CreateFromDiscriminatorValue); } }, + { "url", n => { Url = n.GetStringValue(); } }, + { "verification", n => { Verification = n.GetObjectValue(global::Ayllu.Github.Client.Models.FileCommit_commit_verification.CreateFromDiscriminatorValue); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteObjectValue("author", Author); + writer.WriteObjectValue("committer", Committer); + writer.WriteStringValue("html_url", HtmlUrl); + writer.WriteStringValue("message", Message); + writer.WriteStringValue("node_id", NodeId); + writer.WriteCollectionOfObjectValues("parents", Parents); + writer.WriteStringValue("sha", Sha); + writer.WriteObjectValue("tree", Tree); + writer.WriteStringValue("url", Url); + writer.WriteObjectValue("verification", Verification); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/FileCommit_commit_author.cs b/src/Ayllu.Github.Client/Github/Client/Models/FileCommit_commit_author.cs new file mode 100644 index 0000000..c519fb9 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/FileCommit_commit_author.cs @@ -0,0 +1,85 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class FileCommit_commit_author : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The date property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Date { get; set; } +#nullable restore +#else + public string Date { get; set; } +#endif + /// The email property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Email { get; set; } +#nullable restore +#else + public string Email { get; set; } +#endif + /// The name property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Name { get; set; } +#nullable restore +#else + public string Name { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public FileCommit_commit_author() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.FileCommit_commit_author CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.FileCommit_commit_author(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "date", n => { Date = n.GetStringValue(); } }, + { "email", n => { Email = n.GetStringValue(); } }, + { "name", n => { Name = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("date", Date); + writer.WriteStringValue("email", Email); + writer.WriteStringValue("name", Name); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/FileCommit_commit_committer.cs b/src/Ayllu.Github.Client/Github/Client/Models/FileCommit_commit_committer.cs new file mode 100644 index 0000000..77a7ee3 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/FileCommit_commit_committer.cs @@ -0,0 +1,85 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class FileCommit_commit_committer : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The date property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Date { get; set; } +#nullable restore +#else + public string Date { get; set; } +#endif + /// The email property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Email { get; set; } +#nullable restore +#else + public string Email { get; set; } +#endif + /// The name property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Name { get; set; } +#nullable restore +#else + public string Name { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public FileCommit_commit_committer() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.FileCommit_commit_committer CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.FileCommit_commit_committer(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "date", n => { Date = n.GetStringValue(); } }, + { "email", n => { Email = n.GetStringValue(); } }, + { "name", n => { Name = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("date", Date); + writer.WriteStringValue("email", Email); + writer.WriteStringValue("name", Name); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/FileCommit_commit_parents.cs b/src/Ayllu.Github.Client/Github/Client/Models/FileCommit_commit_parents.cs new file mode 100644 index 0000000..2314121 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/FileCommit_commit_parents.cs @@ -0,0 +1,85 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class FileCommit_commit_parents : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The html_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? HtmlUrl { get; set; } +#nullable restore +#else + public string HtmlUrl { get; set; } +#endif + /// The sha property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Sha { get; set; } +#nullable restore +#else + public string Sha { get; set; } +#endif + /// The url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Url { get; set; } +#nullable restore +#else + public string Url { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public FileCommit_commit_parents() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.FileCommit_commit_parents CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.FileCommit_commit_parents(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "html_url", n => { HtmlUrl = n.GetStringValue(); } }, + { "sha", n => { Sha = n.GetStringValue(); } }, + { "url", n => { Url = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("html_url", HtmlUrl); + writer.WriteStringValue("sha", Sha); + writer.WriteStringValue("url", Url); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/FileCommit_commit_tree.cs b/src/Ayllu.Github.Client/Github/Client/Models/FileCommit_commit_tree.cs new file mode 100644 index 0000000..2fe3ddd --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/FileCommit_commit_tree.cs @@ -0,0 +1,75 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class FileCommit_commit_tree : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The sha property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Sha { get; set; } +#nullable restore +#else + public string Sha { get; set; } +#endif + /// The url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Url { get; set; } +#nullable restore +#else + public string Url { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public FileCommit_commit_tree() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.FileCommit_commit_tree CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.FileCommit_commit_tree(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "sha", n => { Sha = n.GetStringValue(); } }, + { "url", n => { Url = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("sha", Sha); + writer.WriteStringValue("url", Url); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/FileCommit_commit_verification.cs b/src/Ayllu.Github.Client/Github/Client/Models/FileCommit_commit_verification.cs new file mode 100644 index 0000000..88fb69e --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/FileCommit_commit_verification.cs @@ -0,0 +1,99 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class FileCommit_commit_verification : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The payload property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Payload { get; set; } +#nullable restore +#else + public string Payload { get; set; } +#endif + /// The reason property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Reason { get; set; } +#nullable restore +#else + public string Reason { get; set; } +#endif + /// The signature property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Signature { get; set; } +#nullable restore +#else + public string Signature { get; set; } +#endif + /// The verified property + public bool? Verified { get; set; } + /// The verified_at property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? VerifiedAt { get; set; } +#nullable restore +#else + public string VerifiedAt { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public FileCommit_commit_verification() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.FileCommit_commit_verification CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.FileCommit_commit_verification(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "payload", n => { Payload = n.GetStringValue(); } }, + { "reason", n => { Reason = n.GetStringValue(); } }, + { "signature", n => { Signature = n.GetStringValue(); } }, + { "verified", n => { Verified = n.GetBoolValue(); } }, + { "verified_at", n => { VerifiedAt = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("payload", Payload); + writer.WriteStringValue("reason", Reason); + writer.WriteStringValue("signature", Signature); + writer.WriteBoolValue("verified", Verified); + writer.WriteStringValue("verified_at", VerifiedAt); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/FileCommit_content.cs b/src/Ayllu.Github.Client/Github/Client/Models/FileCommit_content.cs new file mode 100644 index 0000000..dc5a674 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/FileCommit_content.cs @@ -0,0 +1,149 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class FileCommit_content : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The download_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? DownloadUrl { get; set; } +#nullable restore +#else + public string DownloadUrl { get; set; } +#endif + /// The git_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? GitUrl { get; set; } +#nullable restore +#else + public string GitUrl { get; set; } +#endif + /// The html_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? HtmlUrl { get; set; } +#nullable restore +#else + public string HtmlUrl { get; set; } +#endif + /// The _links property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.FileCommit_content__links? Links { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.FileCommit_content__links Links { get; set; } +#endif + /// The name property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Name { get; set; } +#nullable restore +#else + public string Name { get; set; } +#endif + /// The path property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Path { get; set; } +#nullable restore +#else + public string Path { get; set; } +#endif + /// The sha property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Sha { get; set; } +#nullable restore +#else + public string Sha { get; set; } +#endif + /// The size property + public int? Size { get; set; } + /// The type property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Type { get; set; } +#nullable restore +#else + public string Type { get; set; } +#endif + /// The url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Url { get; set; } +#nullable restore +#else + public string Url { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public FileCommit_content() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.FileCommit_content CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.FileCommit_content(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "download_url", n => { DownloadUrl = n.GetStringValue(); } }, + { "git_url", n => { GitUrl = n.GetStringValue(); } }, + { "html_url", n => { HtmlUrl = n.GetStringValue(); } }, + { "_links", n => { Links = n.GetObjectValue(global::Ayllu.Github.Client.Models.FileCommit_content__links.CreateFromDiscriminatorValue); } }, + { "name", n => { Name = n.GetStringValue(); } }, + { "path", n => { Path = n.GetStringValue(); } }, + { "sha", n => { Sha = n.GetStringValue(); } }, + { "size", n => { Size = n.GetIntValue(); } }, + { "type", n => { Type = n.GetStringValue(); } }, + { "url", n => { Url = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("download_url", DownloadUrl); + writer.WriteStringValue("git_url", GitUrl); + writer.WriteStringValue("html_url", HtmlUrl); + writer.WriteObjectValue("_links", Links); + writer.WriteStringValue("name", Name); + writer.WriteStringValue("path", Path); + writer.WriteStringValue("sha", Sha); + writer.WriteIntValue("size", Size); + writer.WriteStringValue("type", Type); + writer.WriteStringValue("url", Url); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/FileCommit_content__links.cs b/src/Ayllu.Github.Client/Github/Client/Models/FileCommit_content__links.cs new file mode 100644 index 0000000..c10a1ba --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/FileCommit_content__links.cs @@ -0,0 +1,85 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class FileCommit_content__links : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The git property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Git { get; set; } +#nullable restore +#else + public string Git { get; set; } +#endif + /// The html property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Html { get; set; } +#nullable restore +#else + public string Html { get; set; } +#endif + /// The self property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Self { get; set; } +#nullable restore +#else + public string Self { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public FileCommit_content__links() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.FileCommit_content__links CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.FileCommit_content__links(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "git", n => { Git = n.GetStringValue(); } }, + { "html", n => { Html = n.GetStringValue(); } }, + { "self", n => { Self = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("git", Git); + writer.WriteStringValue("html", Html); + writer.WriteStringValue("self", Self); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/Files503Error.cs b/src/Ayllu.Github.Client/Github/Client/Models/Files503Error.cs new file mode 100644 index 0000000..dd8c11d --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/Files503Error.cs @@ -0,0 +1,88 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class Files503Error : ApiException, IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The code property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Code { get; set; } +#nullable restore +#else + public string Code { get; set; } +#endif + /// The documentation_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? DocumentationUrl { get; set; } +#nullable restore +#else + public string DocumentationUrl { get; set; } +#endif + /// The primary error message. + public override string Message { get => MessageEscaped ?? string.Empty; } + /// The message property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? MessageEscaped { get; set; } +#nullable restore +#else + public string MessageEscaped { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public Files503Error() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.Files503Error CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.Files503Error(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "code", n => { Code = n.GetStringValue(); } }, + { "documentation_url", n => { DocumentationUrl = n.GetStringValue(); } }, + { "message", n => { MessageEscaped = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("code", Code); + writer.WriteStringValue("documentation_url", DocumentationUrl); + writer.WriteStringValue("message", MessageEscaped); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/FullRepository.cs b/src/Ayllu.Github.Client/Github/Client/Models/FullRepository.cs new file mode 100644 index 0000000..6dbd7af --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/FullRepository.cs @@ -0,0 +1,852 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + /// + /// Full Repository + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class FullRepository : IAdditionalDataHolder, IParsable + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The allow_auto_merge property + public bool? AllowAutoMerge { get; set; } + /// The allow_forking property + public bool? AllowForking { get; set; } + /// The allow_merge_commit property + public bool? AllowMergeCommit { get; set; } + /// The allow_rebase_merge property + public bool? AllowRebaseMerge { get; set; } + /// The allow_squash_merge property + public bool? AllowSquashMerge { get; set; } + /// The allow_update_branch property + public bool? AllowUpdateBranch { get; set; } + /// Whether anonymous git access is allowed. + public bool? AnonymousAccessEnabled { get; set; } + /// The archived property + public bool? Archived { get; set; } + /// The archive_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? ArchiveUrl { get; set; } +#nullable restore +#else + public string ArchiveUrl { get; set; } +#endif + /// The assignees_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? AssigneesUrl { get; set; } +#nullable restore +#else + public string AssigneesUrl { get; set; } +#endif + /// The blobs_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? BlobsUrl { get; set; } +#nullable restore +#else + public string BlobsUrl { get; set; } +#endif + /// The branches_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? BranchesUrl { get; set; } +#nullable restore +#else + public string BranchesUrl { get; set; } +#endif + /// The clone_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? CloneUrl { get; set; } +#nullable restore +#else + public string CloneUrl { get; set; } +#endif + /// Code of Conduct Simple +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.CodeOfConductSimple? CodeOfConduct { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.CodeOfConductSimple CodeOfConduct { get; set; } +#endif + /// The collaborators_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? CollaboratorsUrl { get; set; } +#nullable restore +#else + public string CollaboratorsUrl { get; set; } +#endif + /// The comments_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? CommentsUrl { get; set; } +#nullable restore +#else + public string CommentsUrl { get; set; } +#endif + /// The commits_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? CommitsUrl { get; set; } +#nullable restore +#else + public string CommitsUrl { get; set; } +#endif + /// The compare_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? CompareUrl { get; set; } +#nullable restore +#else + public string CompareUrl { get; set; } +#endif + /// The contents_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? ContentsUrl { get; set; } +#nullable restore +#else + public string ContentsUrl { get; set; } +#endif + /// The contributors_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? ContributorsUrl { get; set; } +#nullable restore +#else + public string ContributorsUrl { get; set; } +#endif + /// The created_at property + public DateTimeOffset? CreatedAt { get; set; } + /// 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. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.FullRepository_custom_properties? CustomProperties { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.FullRepository_custom_properties CustomProperties { get; set; } +#endif + /// The default_branch property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? DefaultBranch { get; set; } +#nullable restore +#else + public string DefaultBranch { get; set; } +#endif + /// The delete_branch_on_merge property + public bool? DeleteBranchOnMerge { get; set; } + /// The deployments_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? DeploymentsUrl { get; set; } +#nullable restore +#else + public string DeploymentsUrl { get; set; } +#endif + /// The description property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Description { get; set; } +#nullable restore +#else + public string Description { get; set; } +#endif + /// Returns whether or not this repository disabled. + public bool? Disabled { get; set; } + /// The downloads_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? DownloadsUrl { get; set; } +#nullable restore +#else + public string DownloadsUrl { get; set; } +#endif + /// The events_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? EventsUrl { get; set; } +#nullable restore +#else + public string EventsUrl { get; set; } +#endif + /// The fork property + public bool? Fork { get; set; } + /// The forks property + public int? Forks { get; set; } + /// The forks_count property + public int? ForksCount { get; set; } + /// The forks_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? ForksUrl { get; set; } +#nullable restore +#else + public string ForksUrl { get; set; } +#endif + /// The full_name property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? FullName { get; set; } +#nullable restore +#else + public string FullName { get; set; } +#endif + /// The git_commits_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? GitCommitsUrl { get; set; } +#nullable restore +#else + public string GitCommitsUrl { get; set; } +#endif + /// The git_refs_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? GitRefsUrl { get; set; } +#nullable restore +#else + public string GitRefsUrl { get; set; } +#endif + /// The git_tags_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? GitTagsUrl { get; set; } +#nullable restore +#else + public string GitTagsUrl { get; set; } +#endif + /// The git_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? GitUrl { get; set; } +#nullable restore +#else + public string GitUrl { get; set; } +#endif + /// The has_discussions property + public bool? HasDiscussions { get; set; } + /// The has_downloads property + public bool? HasDownloads { get; set; } + /// The has_issues property + public bool? HasIssues { get; set; } + /// The has_pages property + public bool? HasPages { get; set; } + /// The has_projects property + public bool? HasProjects { get; set; } + /// The has_wiki property + public bool? HasWiki { get; set; } + /// The homepage property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Homepage { get; set; } +#nullable restore +#else + public string Homepage { get; set; } +#endif + /// The hooks_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? HooksUrl { get; set; } +#nullable restore +#else + public string HooksUrl { get; set; } +#endif + /// The html_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? HtmlUrl { get; set; } +#nullable restore +#else + public string HtmlUrl { get; set; } +#endif + /// The id property + public long? Id { get; set; } + /// The issue_comment_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? IssueCommentUrl { get; set; } +#nullable restore +#else + public string IssueCommentUrl { get; set; } +#endif + /// The issue_events_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? IssueEventsUrl { get; set; } +#nullable restore +#else + public string IssueEventsUrl { get; set; } +#endif + /// The issues_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? IssuesUrl { get; set; } +#nullable restore +#else + public string IssuesUrl { get; set; } +#endif + /// The is_template property + public bool? IsTemplate { get; set; } + /// The keys_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? KeysUrl { get; set; } +#nullable restore +#else + public string KeysUrl { get; set; } +#endif + /// The labels_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? LabelsUrl { get; set; } +#nullable restore +#else + public string LabelsUrl { get; set; } +#endif + /// The language property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Language { get; set; } +#nullable restore +#else + public string Language { get; set; } +#endif + /// The languages_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? LanguagesUrl { get; set; } +#nullable restore +#else + public string LanguagesUrl { get; set; } +#endif + /// License Simple +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.NullableLicenseSimple? License { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.NullableLicenseSimple License { get; set; } +#endif + /// The master_branch property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? MasterBranch { get; set; } +#nullable restore +#else + public string MasterBranch { get; set; } +#endif + /// 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. + public global::Ayllu.Github.Client.Models.FullRepository_merge_commit_message? MergeCommitMessage { get; set; } + /// 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). + public global::Ayllu.Github.Client.Models.FullRepository_merge_commit_title? MergeCommitTitle { get; set; } + /// The merges_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? MergesUrl { get; set; } +#nullable restore +#else + public string MergesUrl { get; set; } +#endif + /// The milestones_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? MilestonesUrl { get; set; } +#nullable restore +#else + public string MilestonesUrl { get; set; } +#endif + /// The mirror_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? MirrorUrl { get; set; } +#nullable restore +#else + public string MirrorUrl { get; set; } +#endif + /// The name property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Name { get; set; } +#nullable restore +#else + public string Name { get; set; } +#endif + /// The network_count property + public int? NetworkCount { get; set; } + /// The node_id property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? NodeId { get; set; } +#nullable restore +#else + public string NodeId { get; set; } +#endif + /// The notifications_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? NotificationsUrl { get; set; } +#nullable restore +#else + public string NotificationsUrl { get; set; } +#endif + /// The open_issues property + public int? OpenIssues { get; set; } + /// The open_issues_count property + public int? OpenIssuesCount { get; set; } + /// A GitHub user. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.NullableSimpleUser? Organization { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.NullableSimpleUser Organization { get; set; } +#endif + /// A GitHub user. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.SimpleUser? Owner { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.SimpleUser Owner { get; set; } +#endif + /// A repository on GitHub. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.Repository? Parent { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.Repository Parent { get; set; } +#endif + /// The permissions property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.FullRepository_permissions? Permissions { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.FullRepository_permissions Permissions { get; set; } +#endif + /// The private property + public bool? Private { get; set; } + /// The pulls_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? PullsUrl { get; set; } +#nullable restore +#else + public string PullsUrl { get; set; } +#endif + /// The pushed_at property + public DateTimeOffset? PushedAt { get; set; } + /// The releases_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? ReleasesUrl { get; set; } +#nullable restore +#else + public string ReleasesUrl { get; set; } +#endif + /// The security_and_analysis property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.SecurityAndAnalysis? SecurityAndAnalysis { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.SecurityAndAnalysis SecurityAndAnalysis { get; set; } +#endif + /// The size of the repository, in kilobytes. Size is calculated hourly. When a repository is initially created, the size is 0. + public int? Size { get; set; } + /// A repository on GitHub. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.Repository? Source { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.Repository Source { get; set; } +#endif + /// 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. + public global::Ayllu.Github.Client.Models.FullRepository_squash_merge_commit_message? SquashMergeCommitMessage { get; set; } + /// 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). + public global::Ayllu.Github.Client.Models.FullRepository_squash_merge_commit_title? SquashMergeCommitTitle { get; set; } + /// The ssh_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? SshUrl { get; set; } +#nullable restore +#else + public string SshUrl { get; set; } +#endif + /// The stargazers_count property + public int? StargazersCount { get; set; } + /// The stargazers_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? StargazersUrl { get; set; } +#nullable restore +#else + public string StargazersUrl { get; set; } +#endif + /// The statuses_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? StatusesUrl { get; set; } +#nullable restore +#else + public string StatusesUrl { get; set; } +#endif + /// The subscribers_count property + public int? SubscribersCount { get; set; } + /// The subscribers_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? SubscribersUrl { get; set; } +#nullable restore +#else + public string SubscribersUrl { get; set; } +#endif + /// The subscription_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? SubscriptionUrl { get; set; } +#nullable restore +#else + public string SubscriptionUrl { get; set; } +#endif + /// The svn_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? SvnUrl { get; set; } +#nullable restore +#else + public string SvnUrl { get; set; } +#endif + /// The tags_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? TagsUrl { get; set; } +#nullable restore +#else + public string TagsUrl { get; set; } +#endif + /// The teams_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? TeamsUrl { get; set; } +#nullable restore +#else + public string TeamsUrl { get; set; } +#endif + /// The temp_clone_token property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? TempCloneToken { get; set; } +#nullable restore +#else + public string TempCloneToken { get; set; } +#endif + /// A repository on GitHub. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.NullableRepository? TemplateRepository { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.NullableRepository TemplateRepository { get; set; } +#endif + /// The topics property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? Topics { get; set; } +#nullable restore +#else + public List Topics { get; set; } +#endif + /// The trees_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? TreesUrl { get; set; } +#nullable restore +#else + public string TreesUrl { get; set; } +#endif + /// The updated_at property + public DateTimeOffset? UpdatedAt { get; set; } + /// The url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Url { get; set; } +#nullable restore +#else + public string Url { get; set; } +#endif + /// The use_squash_pr_title_as_default property + public bool? UseSquashPrTitleAsDefault { get; set; } + /// The repository visibility: public, private, or internal. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Visibility { get; set; } +#nullable restore +#else + public string Visibility { get; set; } +#endif + /// The watchers property + public int? Watchers { get; set; } + /// The watchers_count property + public int? WatchersCount { get; set; } + /// The web_commit_signoff_required property + public bool? WebCommitSignoffRequired { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public FullRepository() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.FullRepository CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.FullRepository(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "allow_auto_merge", n => { AllowAutoMerge = n.GetBoolValue(); } }, + { "allow_forking", n => { AllowForking = n.GetBoolValue(); } }, + { "allow_merge_commit", n => { AllowMergeCommit = n.GetBoolValue(); } }, + { "allow_rebase_merge", n => { AllowRebaseMerge = n.GetBoolValue(); } }, + { "allow_squash_merge", n => { AllowSquashMerge = n.GetBoolValue(); } }, + { "allow_update_branch", n => { AllowUpdateBranch = n.GetBoolValue(); } }, + { "anonymous_access_enabled", n => { AnonymousAccessEnabled = n.GetBoolValue(); } }, + { "archive_url", n => { ArchiveUrl = n.GetStringValue(); } }, + { "archived", n => { Archived = n.GetBoolValue(); } }, + { "assignees_url", n => { AssigneesUrl = n.GetStringValue(); } }, + { "blobs_url", n => { BlobsUrl = n.GetStringValue(); } }, + { "branches_url", n => { BranchesUrl = n.GetStringValue(); } }, + { "clone_url", n => { CloneUrl = n.GetStringValue(); } }, + { "code_of_conduct", n => { CodeOfConduct = n.GetObjectValue(global::Ayllu.Github.Client.Models.CodeOfConductSimple.CreateFromDiscriminatorValue); } }, + { "collaborators_url", n => { CollaboratorsUrl = n.GetStringValue(); } }, + { "comments_url", n => { CommentsUrl = n.GetStringValue(); } }, + { "commits_url", n => { CommitsUrl = n.GetStringValue(); } }, + { "compare_url", n => { CompareUrl = n.GetStringValue(); } }, + { "contents_url", n => { ContentsUrl = n.GetStringValue(); } }, + { "contributors_url", n => { ContributorsUrl = n.GetStringValue(); } }, + { "created_at", n => { CreatedAt = n.GetDateTimeOffsetValue(); } }, + { "custom_properties", n => { CustomProperties = n.GetObjectValue(global::Ayllu.Github.Client.Models.FullRepository_custom_properties.CreateFromDiscriminatorValue); } }, + { "default_branch", n => { DefaultBranch = n.GetStringValue(); } }, + { "delete_branch_on_merge", n => { DeleteBranchOnMerge = n.GetBoolValue(); } }, + { "deployments_url", n => { DeploymentsUrl = n.GetStringValue(); } }, + { "description", n => { Description = n.GetStringValue(); } }, + { "disabled", n => { Disabled = n.GetBoolValue(); } }, + { "downloads_url", n => { DownloadsUrl = n.GetStringValue(); } }, + { "events_url", n => { EventsUrl = n.GetStringValue(); } }, + { "fork", n => { Fork = n.GetBoolValue(); } }, + { "forks", n => { Forks = n.GetIntValue(); } }, + { "forks_count", n => { ForksCount = n.GetIntValue(); } }, + { "forks_url", n => { ForksUrl = n.GetStringValue(); } }, + { "full_name", n => { FullName = n.GetStringValue(); } }, + { "git_commits_url", n => { GitCommitsUrl = n.GetStringValue(); } }, + { "git_refs_url", n => { GitRefsUrl = n.GetStringValue(); } }, + { "git_tags_url", n => { GitTagsUrl = n.GetStringValue(); } }, + { "git_url", n => { GitUrl = n.GetStringValue(); } }, + { "has_discussions", n => { HasDiscussions = n.GetBoolValue(); } }, + { "has_downloads", n => { HasDownloads = n.GetBoolValue(); } }, + { "has_issues", n => { HasIssues = n.GetBoolValue(); } }, + { "has_pages", n => { HasPages = n.GetBoolValue(); } }, + { "has_projects", n => { HasProjects = n.GetBoolValue(); } }, + { "has_wiki", n => { HasWiki = n.GetBoolValue(); } }, + { "homepage", n => { Homepage = n.GetStringValue(); } }, + { "hooks_url", n => { HooksUrl = n.GetStringValue(); } }, + { "html_url", n => { HtmlUrl = n.GetStringValue(); } }, + { "id", n => { Id = n.GetLongValue(); } }, + { "is_template", n => { IsTemplate = n.GetBoolValue(); } }, + { "issue_comment_url", n => { IssueCommentUrl = n.GetStringValue(); } }, + { "issue_events_url", n => { IssueEventsUrl = n.GetStringValue(); } }, + { "issues_url", n => { IssuesUrl = n.GetStringValue(); } }, + { "keys_url", n => { KeysUrl = n.GetStringValue(); } }, + { "labels_url", n => { LabelsUrl = n.GetStringValue(); } }, + { "language", n => { Language = n.GetStringValue(); } }, + { "languages_url", n => { LanguagesUrl = n.GetStringValue(); } }, + { "license", n => { License = n.GetObjectValue(global::Ayllu.Github.Client.Models.NullableLicenseSimple.CreateFromDiscriminatorValue); } }, + { "master_branch", n => { MasterBranch = n.GetStringValue(); } }, + { "merge_commit_message", n => { MergeCommitMessage = n.GetEnumValue(); } }, + { "merge_commit_title", n => { MergeCommitTitle = n.GetEnumValue(); } }, + { "merges_url", n => { MergesUrl = n.GetStringValue(); } }, + { "milestones_url", n => { MilestonesUrl = n.GetStringValue(); } }, + { "mirror_url", n => { MirrorUrl = n.GetStringValue(); } }, + { "name", n => { Name = n.GetStringValue(); } }, + { "network_count", n => { NetworkCount = n.GetIntValue(); } }, + { "node_id", n => { NodeId = n.GetStringValue(); } }, + { "notifications_url", n => { NotificationsUrl = n.GetStringValue(); } }, + { "open_issues", n => { OpenIssues = n.GetIntValue(); } }, + { "open_issues_count", n => { OpenIssuesCount = n.GetIntValue(); } }, + { "organization", n => { Organization = n.GetObjectValue(global::Ayllu.Github.Client.Models.NullableSimpleUser.CreateFromDiscriminatorValue); } }, + { "owner", n => { Owner = n.GetObjectValue(global::Ayllu.Github.Client.Models.SimpleUser.CreateFromDiscriminatorValue); } }, + { "parent", n => { Parent = n.GetObjectValue(global::Ayllu.Github.Client.Models.Repository.CreateFromDiscriminatorValue); } }, + { "permissions", n => { Permissions = n.GetObjectValue(global::Ayllu.Github.Client.Models.FullRepository_permissions.CreateFromDiscriminatorValue); } }, + { "private", n => { Private = n.GetBoolValue(); } }, + { "pulls_url", n => { PullsUrl = n.GetStringValue(); } }, + { "pushed_at", n => { PushedAt = n.GetDateTimeOffsetValue(); } }, + { "releases_url", n => { ReleasesUrl = n.GetStringValue(); } }, + { "security_and_analysis", n => { SecurityAndAnalysis = n.GetObjectValue(global::Ayllu.Github.Client.Models.SecurityAndAnalysis.CreateFromDiscriminatorValue); } }, + { "size", n => { Size = n.GetIntValue(); } }, + { "source", n => { Source = n.GetObjectValue(global::Ayllu.Github.Client.Models.Repository.CreateFromDiscriminatorValue); } }, + { "squash_merge_commit_message", n => { SquashMergeCommitMessage = n.GetEnumValue(); } }, + { "squash_merge_commit_title", n => { SquashMergeCommitTitle = n.GetEnumValue(); } }, + { "ssh_url", n => { SshUrl = n.GetStringValue(); } }, + { "stargazers_count", n => { StargazersCount = n.GetIntValue(); } }, + { "stargazers_url", n => { StargazersUrl = n.GetStringValue(); } }, + { "statuses_url", n => { StatusesUrl = n.GetStringValue(); } }, + { "subscribers_count", n => { SubscribersCount = n.GetIntValue(); } }, + { "subscribers_url", n => { SubscribersUrl = n.GetStringValue(); } }, + { "subscription_url", n => { SubscriptionUrl = n.GetStringValue(); } }, + { "svn_url", n => { SvnUrl = n.GetStringValue(); } }, + { "tags_url", n => { TagsUrl = n.GetStringValue(); } }, + { "teams_url", n => { TeamsUrl = n.GetStringValue(); } }, + { "temp_clone_token", n => { TempCloneToken = n.GetStringValue(); } }, + { "template_repository", n => { TemplateRepository = n.GetObjectValue(global::Ayllu.Github.Client.Models.NullableRepository.CreateFromDiscriminatorValue); } }, + { "topics", n => { Topics = n.GetCollectionOfPrimitiveValues()?.AsList(); } }, + { "trees_url", n => { TreesUrl = n.GetStringValue(); } }, + { "updated_at", n => { UpdatedAt = n.GetDateTimeOffsetValue(); } }, + { "url", n => { Url = n.GetStringValue(); } }, + { "use_squash_pr_title_as_default", n => { UseSquashPrTitleAsDefault = n.GetBoolValue(); } }, + { "visibility", n => { Visibility = n.GetStringValue(); } }, + { "watchers", n => { Watchers = n.GetIntValue(); } }, + { "watchers_count", n => { WatchersCount = n.GetIntValue(); } }, + { "web_commit_signoff_required", n => { WebCommitSignoffRequired = n.GetBoolValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteBoolValue("allow_auto_merge", AllowAutoMerge); + writer.WriteBoolValue("allow_forking", AllowForking); + writer.WriteBoolValue("allow_merge_commit", AllowMergeCommit); + writer.WriteBoolValue("allow_rebase_merge", AllowRebaseMerge); + writer.WriteBoolValue("allow_squash_merge", AllowSquashMerge); + writer.WriteBoolValue("allow_update_branch", AllowUpdateBranch); + writer.WriteBoolValue("anonymous_access_enabled", AnonymousAccessEnabled); + writer.WriteBoolValue("archived", Archived); + writer.WriteStringValue("archive_url", ArchiveUrl); + writer.WriteStringValue("assignees_url", AssigneesUrl); + writer.WriteStringValue("blobs_url", BlobsUrl); + writer.WriteStringValue("branches_url", BranchesUrl); + writer.WriteStringValue("clone_url", CloneUrl); + writer.WriteObjectValue("code_of_conduct", CodeOfConduct); + writer.WriteStringValue("collaborators_url", CollaboratorsUrl); + writer.WriteStringValue("comments_url", CommentsUrl); + writer.WriteStringValue("commits_url", CommitsUrl); + writer.WriteStringValue("compare_url", CompareUrl); + writer.WriteStringValue("contents_url", ContentsUrl); + writer.WriteStringValue("contributors_url", ContributorsUrl); + writer.WriteDateTimeOffsetValue("created_at", CreatedAt); + writer.WriteObjectValue("custom_properties", CustomProperties); + writer.WriteStringValue("default_branch", DefaultBranch); + writer.WriteBoolValue("delete_branch_on_merge", DeleteBranchOnMerge); + writer.WriteStringValue("deployments_url", DeploymentsUrl); + writer.WriteStringValue("description", Description); + writer.WriteBoolValue("disabled", Disabled); + writer.WriteStringValue("downloads_url", DownloadsUrl); + writer.WriteStringValue("events_url", EventsUrl); + writer.WriteBoolValue("fork", Fork); + writer.WriteIntValue("forks", Forks); + writer.WriteIntValue("forks_count", ForksCount); + writer.WriteStringValue("forks_url", ForksUrl); + writer.WriteStringValue("full_name", FullName); + writer.WriteStringValue("git_commits_url", GitCommitsUrl); + writer.WriteStringValue("git_refs_url", GitRefsUrl); + writer.WriteStringValue("git_tags_url", GitTagsUrl); + writer.WriteStringValue("git_url", GitUrl); + writer.WriteBoolValue("has_discussions", HasDiscussions); + writer.WriteBoolValue("has_downloads", HasDownloads); + writer.WriteBoolValue("has_issues", HasIssues); + writer.WriteBoolValue("has_pages", HasPages); + writer.WriteBoolValue("has_projects", HasProjects); + writer.WriteBoolValue("has_wiki", HasWiki); + writer.WriteStringValue("homepage", Homepage); + writer.WriteStringValue("hooks_url", HooksUrl); + writer.WriteStringValue("html_url", HtmlUrl); + writer.WriteLongValue("id", Id); + writer.WriteStringValue("issue_comment_url", IssueCommentUrl); + writer.WriteStringValue("issue_events_url", IssueEventsUrl); + writer.WriteStringValue("issues_url", IssuesUrl); + writer.WriteBoolValue("is_template", IsTemplate); + writer.WriteStringValue("keys_url", KeysUrl); + writer.WriteStringValue("labels_url", LabelsUrl); + writer.WriteStringValue("language", Language); + writer.WriteStringValue("languages_url", LanguagesUrl); + writer.WriteObjectValue("license", License); + writer.WriteStringValue("master_branch", MasterBranch); + writer.WriteEnumValue("merge_commit_message", MergeCommitMessage); + writer.WriteEnumValue("merge_commit_title", MergeCommitTitle); + writer.WriteStringValue("merges_url", MergesUrl); + writer.WriteStringValue("milestones_url", MilestonesUrl); + writer.WriteStringValue("mirror_url", MirrorUrl); + writer.WriteStringValue("name", Name); + writer.WriteIntValue("network_count", NetworkCount); + writer.WriteStringValue("node_id", NodeId); + writer.WriteStringValue("notifications_url", NotificationsUrl); + writer.WriteIntValue("open_issues", OpenIssues); + writer.WriteIntValue("open_issues_count", OpenIssuesCount); + writer.WriteObjectValue("organization", Organization); + writer.WriteObjectValue("owner", Owner); + writer.WriteObjectValue("parent", Parent); + writer.WriteObjectValue("permissions", Permissions); + writer.WriteBoolValue("private", Private); + writer.WriteStringValue("pulls_url", PullsUrl); + writer.WriteDateTimeOffsetValue("pushed_at", PushedAt); + writer.WriteStringValue("releases_url", ReleasesUrl); + writer.WriteObjectValue("security_and_analysis", SecurityAndAnalysis); + writer.WriteIntValue("size", Size); + writer.WriteObjectValue("source", Source); + writer.WriteEnumValue("squash_merge_commit_message", SquashMergeCommitMessage); + writer.WriteEnumValue("squash_merge_commit_title", SquashMergeCommitTitle); + writer.WriteStringValue("ssh_url", SshUrl); + writer.WriteIntValue("stargazers_count", StargazersCount); + writer.WriteStringValue("stargazers_url", StargazersUrl); + writer.WriteStringValue("statuses_url", StatusesUrl); + writer.WriteIntValue("subscribers_count", SubscribersCount); + writer.WriteStringValue("subscribers_url", SubscribersUrl); + writer.WriteStringValue("subscription_url", SubscriptionUrl); + writer.WriteStringValue("svn_url", SvnUrl); + writer.WriteStringValue("tags_url", TagsUrl); + writer.WriteStringValue("teams_url", TeamsUrl); + writer.WriteStringValue("temp_clone_token", TempCloneToken); + writer.WriteObjectValue("template_repository", TemplateRepository); + writer.WriteCollectionOfPrimitiveValues("topics", Topics); + writer.WriteStringValue("trees_url", TreesUrl); + writer.WriteDateTimeOffsetValue("updated_at", UpdatedAt); + writer.WriteStringValue("url", Url); + writer.WriteBoolValue("use_squash_pr_title_as_default", UseSquashPrTitleAsDefault); + writer.WriteStringValue("visibility", Visibility); + writer.WriteIntValue("watchers", Watchers); + writer.WriteIntValue("watchers_count", WatchersCount); + writer.WriteBoolValue("web_commit_signoff_required", WebCommitSignoffRequired); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/FullRepository_custom_properties.cs b/src/Ayllu.Github.Client/Github/Client/Models/FullRepository_custom_properties.cs new file mode 100644 index 0000000..70ea43c --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/FullRepository_custom_properties.cs @@ -0,0 +1,56 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + /// + /// 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. + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class FullRepository_custom_properties : IAdditionalDataHolder, IParsable + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public FullRepository_custom_properties() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.FullRepository_custom_properties CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.FullRepository_custom_properties(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/FullRepository_merge_commit_message.cs b/src/Ayllu.Github.Client/Github/Client/Models/FullRepository_merge_commit_message.cs new file mode 100644 index 0000000..b288a8c --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/FullRepository_merge_commit_message.cs @@ -0,0 +1,23 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Models +{ + /// 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. + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public enum FullRepository_merge_commit_message + { + [EnumMember(Value = "PR_BODY")] + #pragma warning disable CS1591 + PR_BODY, + #pragma warning restore CS1591 + [EnumMember(Value = "PR_TITLE")] + #pragma warning disable CS1591 + PR_TITLE, + #pragma warning restore CS1591 + [EnumMember(Value = "BLANK")] + #pragma warning disable CS1591 + BLANK, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Models/FullRepository_merge_commit_title.cs b/src/Ayllu.Github.Client/Github/Client/Models/FullRepository_merge_commit_title.cs new file mode 100644 index 0000000..6b815e1 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/FullRepository_merge_commit_title.cs @@ -0,0 +1,19 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Models +{ + /// 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). + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public enum FullRepository_merge_commit_title + { + [EnumMember(Value = "PR_TITLE")] + #pragma warning disable CS1591 + PR_TITLE, + #pragma warning restore CS1591 + [EnumMember(Value = "MERGE_MESSAGE")] + #pragma warning disable CS1591 + MERGE_MESSAGE, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Models/FullRepository_permissions.cs b/src/Ayllu.Github.Client/Github/Client/Models/FullRepository_permissions.cs new file mode 100644 index 0000000..ea7cf69 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/FullRepository_permissions.cs @@ -0,0 +1,75 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class FullRepository_permissions : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The admin property + public bool? Admin { get; set; } + /// The maintain property + public bool? Maintain { get; set; } + /// The pull property + public bool? Pull { get; set; } + /// The push property + public bool? Push { get; set; } + /// The triage property + public bool? Triage { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public FullRepository_permissions() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.FullRepository_permissions CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.FullRepository_permissions(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "admin", n => { Admin = n.GetBoolValue(); } }, + { "maintain", n => { Maintain = n.GetBoolValue(); } }, + { "pull", n => { Pull = n.GetBoolValue(); } }, + { "push", n => { Push = n.GetBoolValue(); } }, + { "triage", n => { Triage = n.GetBoolValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteBoolValue("admin", Admin); + writer.WriteBoolValue("maintain", Maintain); + writer.WriteBoolValue("pull", Pull); + writer.WriteBoolValue("push", Push); + writer.WriteBoolValue("triage", Triage); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/FullRepository_squash_merge_commit_message.cs b/src/Ayllu.Github.Client/Github/Client/Models/FullRepository_squash_merge_commit_message.cs new file mode 100644 index 0000000..155d74a --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/FullRepository_squash_merge_commit_message.cs @@ -0,0 +1,23 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Models +{ + /// 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. + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public enum FullRepository_squash_merge_commit_message + { + [EnumMember(Value = "PR_BODY")] + #pragma warning disable CS1591 + PR_BODY, + #pragma warning restore CS1591 + [EnumMember(Value = "COMMIT_MESSAGES")] + #pragma warning disable CS1591 + COMMIT_MESSAGES, + #pragma warning restore CS1591 + [EnumMember(Value = "BLANK")] + #pragma warning disable CS1591 + BLANK, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Models/FullRepository_squash_merge_commit_title.cs b/src/Ayllu.Github.Client/Github/Client/Models/FullRepository_squash_merge_commit_title.cs new file mode 100644 index 0000000..2ab3053 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/FullRepository_squash_merge_commit_title.cs @@ -0,0 +1,19 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Models +{ + /// 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). + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public enum FullRepository_squash_merge_commit_title + { + [EnumMember(Value = "PR_TITLE")] + #pragma warning disable CS1591 + PR_TITLE, + #pragma warning restore CS1591 + [EnumMember(Value = "COMMIT_OR_PR_TITLE")] + #pragma warning disable CS1591 + COMMIT_OR_PR_TITLE, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Models/GistComment.cs b/src/Ayllu.Github.Client/Github/Client/Models/GistComment.cs new file mode 100644 index 0000000..6831460 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/GistComment.cs @@ -0,0 +1,112 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + /// + /// A comment made to a gist. + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class GistComment : IAdditionalDataHolder, IParsable + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// How the author is associated with the repository. + public global::Ayllu.Github.Client.Models.AuthorAssociation? AuthorAssociation { get; set; } + /// The comment text. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Body { get; set; } +#nullable restore +#else + public string Body { get; set; } +#endif + /// The created_at property + public DateTimeOffset? CreatedAt { get; set; } + /// The id property + public int? Id { get; set; } + /// The node_id property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? NodeId { get; set; } +#nullable restore +#else + public string NodeId { get; set; } +#endif + /// The updated_at property + public DateTimeOffset? UpdatedAt { get; set; } + /// The url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Url { get; set; } +#nullable restore +#else + public string Url { get; set; } +#endif + /// A GitHub user. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.NullableSimpleUser? User { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.NullableSimpleUser User { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public GistComment() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.GistComment CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.GistComment(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "author_association", n => { AuthorAssociation = n.GetEnumValue(); } }, + { "body", n => { Body = n.GetStringValue(); } }, + { "created_at", n => { CreatedAt = n.GetDateTimeOffsetValue(); } }, + { "id", n => { Id = n.GetIntValue(); } }, + { "node_id", n => { NodeId = n.GetStringValue(); } }, + { "updated_at", n => { UpdatedAt = n.GetDateTimeOffsetValue(); } }, + { "url", n => { Url = n.GetStringValue(); } }, + { "user", n => { User = n.GetObjectValue(global::Ayllu.Github.Client.Models.NullableSimpleUser.CreateFromDiscriminatorValue); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteEnumValue("author_association", AuthorAssociation); + writer.WriteStringValue("body", Body); + writer.WriteDateTimeOffsetValue("created_at", CreatedAt); + writer.WriteIntValue("id", Id); + writer.WriteStringValue("node_id", NodeId); + writer.WriteDateTimeOffsetValue("updated_at", UpdatedAt); + writer.WriteStringValue("url", Url); + writer.WriteObjectValue("user", User); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/GistComment403Error.cs b/src/Ayllu.Github.Client/Github/Client/Models/GistComment403Error.cs new file mode 100644 index 0000000..af7935f --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/GistComment403Error.cs @@ -0,0 +1,88 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class GistComment403Error : ApiException, IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The block property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.GistComment403Error_block? Block { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.GistComment403Error_block Block { get; set; } +#endif + /// The documentation_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? DocumentationUrl { get; set; } +#nullable restore +#else + public string DocumentationUrl { get; set; } +#endif + /// The primary error message. + public override string Message { get => MessageEscaped ?? string.Empty; } + /// The message property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? MessageEscaped { get; set; } +#nullable restore +#else + public string MessageEscaped { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public GistComment403Error() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.GistComment403Error CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.GistComment403Error(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "block", n => { Block = n.GetObjectValue(global::Ayllu.Github.Client.Models.GistComment403Error_block.CreateFromDiscriminatorValue); } }, + { "documentation_url", n => { DocumentationUrl = n.GetStringValue(); } }, + { "message", n => { MessageEscaped = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteObjectValue("block", Block); + writer.WriteStringValue("documentation_url", DocumentationUrl); + writer.WriteStringValue("message", MessageEscaped); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/GistComment403Error_block.cs b/src/Ayllu.Github.Client/Github/Client/Models/GistComment403Error_block.cs new file mode 100644 index 0000000..8a14385 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/GistComment403Error_block.cs @@ -0,0 +1,85 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class GistComment403Error_block : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The created_at property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? CreatedAt { get; set; } +#nullable restore +#else + public string CreatedAt { get; set; } +#endif + /// The html_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? HtmlUrl { get; set; } +#nullable restore +#else + public string HtmlUrl { get; set; } +#endif + /// The reason property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Reason { get; set; } +#nullable restore +#else + public string Reason { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public GistComment403Error_block() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.GistComment403Error_block CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.GistComment403Error_block(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "created_at", n => { CreatedAt = n.GetStringValue(); } }, + { "html_url", n => { HtmlUrl = n.GetStringValue(); } }, + { "reason", n => { Reason = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("created_at", CreatedAt); + writer.WriteStringValue("html_url", HtmlUrl); + writer.WriteStringValue("reason", Reason); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/GistCommit.cs b/src/Ayllu.Github.Client/Github/Client/Models/GistCommit.cs new file mode 100644 index 0000000..2025370 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/GistCommit.cs @@ -0,0 +1,100 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + /// + /// Gist Commit + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class GistCommit : IAdditionalDataHolder, IParsable + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The change_status property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.GistCommit_change_status? ChangeStatus { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.GistCommit_change_status ChangeStatus { get; set; } +#endif + /// The committed_at property + public DateTimeOffset? CommittedAt { get; set; } + /// The url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Url { get; set; } +#nullable restore +#else + public string Url { get; set; } +#endif + /// A GitHub user. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.NullableSimpleUser? User { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.NullableSimpleUser User { get; set; } +#endif + /// The version property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Version { get; set; } +#nullable restore +#else + public string Version { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public GistCommit() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.GistCommit CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.GistCommit(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "change_status", n => { ChangeStatus = n.GetObjectValue(global::Ayllu.Github.Client.Models.GistCommit_change_status.CreateFromDiscriminatorValue); } }, + { "committed_at", n => { CommittedAt = n.GetDateTimeOffsetValue(); } }, + { "url", n => { Url = n.GetStringValue(); } }, + { "user", n => { User = n.GetObjectValue(global::Ayllu.Github.Client.Models.NullableSimpleUser.CreateFromDiscriminatorValue); } }, + { "version", n => { Version = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteObjectValue("change_status", ChangeStatus); + writer.WriteDateTimeOffsetValue("committed_at", CommittedAt); + writer.WriteStringValue("url", Url); + writer.WriteObjectValue("user", User); + writer.WriteStringValue("version", Version); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/GistCommit_change_status.cs b/src/Ayllu.Github.Client/Github/Client/Models/GistCommit_change_status.cs new file mode 100644 index 0000000..efba586 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/GistCommit_change_status.cs @@ -0,0 +1,67 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class GistCommit_change_status : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The additions property + public int? Additions { get; set; } + /// The deletions property + public int? Deletions { get; set; } + /// The total property + public int? Total { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public GistCommit_change_status() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.GistCommit_change_status CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.GistCommit_change_status(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "additions", n => { Additions = n.GetIntValue(); } }, + { "deletions", n => { Deletions = n.GetIntValue(); } }, + { "total", n => { Total = n.GetIntValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteIntValue("additions", Additions); + writer.WriteIntValue("deletions", Deletions); + writer.WriteIntValue("total", Total); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/GistHistory.cs b/src/Ayllu.Github.Client/Github/Client/Models/GistHistory.cs new file mode 100644 index 0000000..91d84e2 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/GistHistory.cs @@ -0,0 +1,100 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + /// + /// Gist History + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class GistHistory : IAdditionalDataHolder, IParsable + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The change_status property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.GistHistory_change_status? ChangeStatus { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.GistHistory_change_status ChangeStatus { get; set; } +#endif + /// The committed_at property + public DateTimeOffset? CommittedAt { get; set; } + /// The url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Url { get; set; } +#nullable restore +#else + public string Url { get; set; } +#endif + /// A GitHub user. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.NullableSimpleUser? User { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.NullableSimpleUser User { get; set; } +#endif + /// The version property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Version { get; set; } +#nullable restore +#else + public string Version { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public GistHistory() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.GistHistory CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.GistHistory(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "change_status", n => { ChangeStatus = n.GetObjectValue(global::Ayllu.Github.Client.Models.GistHistory_change_status.CreateFromDiscriminatorValue); } }, + { "committed_at", n => { CommittedAt = n.GetDateTimeOffsetValue(); } }, + { "url", n => { Url = n.GetStringValue(); } }, + { "user", n => { User = n.GetObjectValue(global::Ayllu.Github.Client.Models.NullableSimpleUser.CreateFromDiscriminatorValue); } }, + { "version", n => { Version = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteObjectValue("change_status", ChangeStatus); + writer.WriteDateTimeOffsetValue("committed_at", CommittedAt); + writer.WriteStringValue("url", Url); + writer.WriteObjectValue("user", User); + writer.WriteStringValue("version", Version); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/GistHistory_change_status.cs b/src/Ayllu.Github.Client/Github/Client/Models/GistHistory_change_status.cs new file mode 100644 index 0000000..879a2c5 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/GistHistory_change_status.cs @@ -0,0 +1,67 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class GistHistory_change_status : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The additions property + public int? Additions { get; set; } + /// The deletions property + public int? Deletions { get; set; } + /// The total property + public int? Total { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public GistHistory_change_status() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.GistHistory_change_status CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.GistHistory_change_status(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "additions", n => { Additions = n.GetIntValue(); } }, + { "deletions", n => { Deletions = n.GetIntValue(); } }, + { "total", n => { Total = n.GetIntValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteIntValue("additions", Additions); + writer.WriteIntValue("deletions", Deletions); + writer.WriteIntValue("total", Total); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/GistSimple.cs b/src/Ayllu.Github.Client/Github/Client/Models/GistSimple.cs new file mode 100644 index 0000000..b130d44 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/GistSimple.cs @@ -0,0 +1,254 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + /// + /// Gist Simple + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class GistSimple : IAdditionalDataHolder, IParsable + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The comments property + public int? Comments { get; set; } + /// The comments_enabled property + public bool? CommentsEnabled { get; set; } + /// The comments_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? CommentsUrl { get; set; } +#nullable restore +#else + public string CommentsUrl { get; set; } +#endif + /// The commits_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? CommitsUrl { get; set; } +#nullable restore +#else + public string CommitsUrl { get; set; } +#endif + /// The created_at property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? CreatedAt { get; set; } +#nullable restore +#else + public string CreatedAt { get; set; } +#endif + /// The description property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Description { get; set; } +#nullable restore +#else + public string Description { get; set; } +#endif + /// The files property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.GistSimple_files? Files { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.GistSimple_files Files { get; set; } +#endif + /// Gist +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.GistSimple_fork_of? ForkOf { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.GistSimple_fork_of ForkOf { get; set; } +#endif + /// The forks property + [Obsolete("")] +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? Forks { get; set; } +#nullable restore +#else + public List Forks { get; set; } +#endif + /// The forks_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? ForksUrl { get; set; } +#nullable restore +#else + public string ForksUrl { get; set; } +#endif + /// The git_pull_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? GitPullUrl { get; set; } +#nullable restore +#else + public string GitPullUrl { get; set; } +#endif + /// The git_push_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? GitPushUrl { get; set; } +#nullable restore +#else + public string GitPushUrl { get; set; } +#endif + /// The history property + [Obsolete("")] +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? History { get; set; } +#nullable restore +#else + public List History { get; set; } +#endif + /// The html_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? HtmlUrl { get; set; } +#nullable restore +#else + public string HtmlUrl { get; set; } +#endif + /// The id property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Id { get; set; } +#nullable restore +#else + public string Id { get; set; } +#endif + /// The node_id property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? NodeId { get; set; } +#nullable restore +#else + public string NodeId { get; set; } +#endif + /// A GitHub user. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.SimpleUser? Owner { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.SimpleUser Owner { get; set; } +#endif + /// The public property + public bool? Public { get; set; } + /// The truncated property + public bool? Truncated { get; set; } + /// The updated_at property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? UpdatedAt { get; set; } +#nullable restore +#else + public string UpdatedAt { get; set; } +#endif + /// The url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Url { get; set; } +#nullable restore +#else + public string Url { get; set; } +#endif + /// The user property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? User { get; set; } +#nullable restore +#else + public string User { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public GistSimple() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.GistSimple CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.GistSimple(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "comments", n => { Comments = n.GetIntValue(); } }, + { "comments_enabled", n => { CommentsEnabled = n.GetBoolValue(); } }, + { "comments_url", n => { CommentsUrl = n.GetStringValue(); } }, + { "commits_url", n => { CommitsUrl = n.GetStringValue(); } }, + { "created_at", n => { CreatedAt = n.GetStringValue(); } }, + { "description", n => { Description = n.GetStringValue(); } }, + { "files", n => { Files = n.GetObjectValue(global::Ayllu.Github.Client.Models.GistSimple_files.CreateFromDiscriminatorValue); } }, + { "fork_of", n => { ForkOf = n.GetObjectValue(global::Ayllu.Github.Client.Models.GistSimple_fork_of.CreateFromDiscriminatorValue); } }, + { "forks", n => { Forks = n.GetCollectionOfObjectValues(global::Ayllu.Github.Client.Models.GistSimple_forks.CreateFromDiscriminatorValue)?.AsList(); } }, + { "forks_url", n => { ForksUrl = n.GetStringValue(); } }, + { "git_pull_url", n => { GitPullUrl = n.GetStringValue(); } }, + { "git_push_url", n => { GitPushUrl = n.GetStringValue(); } }, + { "history", n => { History = n.GetCollectionOfObjectValues(global::Ayllu.Github.Client.Models.GistHistory.CreateFromDiscriminatorValue)?.AsList(); } }, + { "html_url", n => { HtmlUrl = n.GetStringValue(); } }, + { "id", n => { Id = n.GetStringValue(); } }, + { "node_id", n => { NodeId = n.GetStringValue(); } }, + { "owner", n => { Owner = n.GetObjectValue(global::Ayllu.Github.Client.Models.SimpleUser.CreateFromDiscriminatorValue); } }, + { "public", n => { Public = n.GetBoolValue(); } }, + { "truncated", n => { Truncated = n.GetBoolValue(); } }, + { "updated_at", n => { UpdatedAt = n.GetStringValue(); } }, + { "url", n => { Url = n.GetStringValue(); } }, + { "user", n => { User = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteIntValue("comments", Comments); + writer.WriteBoolValue("comments_enabled", CommentsEnabled); + writer.WriteStringValue("comments_url", CommentsUrl); + writer.WriteStringValue("commits_url", CommitsUrl); + writer.WriteStringValue("created_at", CreatedAt); + writer.WriteStringValue("description", Description); + writer.WriteObjectValue("files", Files); + writer.WriteObjectValue("fork_of", ForkOf); + writer.WriteCollectionOfObjectValues("forks", Forks); + writer.WriteStringValue("forks_url", ForksUrl); + writer.WriteStringValue("git_pull_url", GitPullUrl); + writer.WriteStringValue("git_push_url", GitPushUrl); + writer.WriteCollectionOfObjectValues("history", History); + writer.WriteStringValue("html_url", HtmlUrl); + writer.WriteStringValue("id", Id); + writer.WriteStringValue("node_id", NodeId); + writer.WriteObjectValue("owner", Owner); + writer.WriteBoolValue("public", Public); + writer.WriteBoolValue("truncated", Truncated); + writer.WriteStringValue("updated_at", UpdatedAt); + writer.WriteStringValue("url", Url); + writer.WriteStringValue("user", User); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/GistSimple403Error.cs b/src/Ayllu.Github.Client/Github/Client/Models/GistSimple403Error.cs new file mode 100644 index 0000000..f925cda --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/GistSimple403Error.cs @@ -0,0 +1,88 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class GistSimple403Error : ApiException, IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The block property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.GistSimple403Error_block? Block { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.GistSimple403Error_block Block { get; set; } +#endif + /// The documentation_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? DocumentationUrl { get; set; } +#nullable restore +#else + public string DocumentationUrl { get; set; } +#endif + /// The primary error message. + public override string Message { get => MessageEscaped ?? string.Empty; } + /// The message property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? MessageEscaped { get; set; } +#nullable restore +#else + public string MessageEscaped { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public GistSimple403Error() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.GistSimple403Error CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.GistSimple403Error(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "block", n => { Block = n.GetObjectValue(global::Ayllu.Github.Client.Models.GistSimple403Error_block.CreateFromDiscriminatorValue); } }, + { "documentation_url", n => { DocumentationUrl = n.GetStringValue(); } }, + { "message", n => { MessageEscaped = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteObjectValue("block", Block); + writer.WriteStringValue("documentation_url", DocumentationUrl); + writer.WriteStringValue("message", MessageEscaped); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/GistSimple403Error_block.cs b/src/Ayllu.Github.Client/Github/Client/Models/GistSimple403Error_block.cs new file mode 100644 index 0000000..456d2be --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/GistSimple403Error_block.cs @@ -0,0 +1,85 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class GistSimple403Error_block : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The created_at property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? CreatedAt { get; set; } +#nullable restore +#else + public string CreatedAt { get; set; } +#endif + /// The html_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? HtmlUrl { get; set; } +#nullable restore +#else + public string HtmlUrl { get; set; } +#endif + /// The reason property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Reason { get; set; } +#nullable restore +#else + public string Reason { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public GistSimple403Error_block() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.GistSimple403Error_block CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.GistSimple403Error_block(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "created_at", n => { CreatedAt = n.GetStringValue(); } }, + { "html_url", n => { HtmlUrl = n.GetStringValue(); } }, + { "reason", n => { Reason = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("created_at", CreatedAt); + writer.WriteStringValue("html_url", HtmlUrl); + writer.WriteStringValue("reason", Reason); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/GistSimple_files.cs b/src/Ayllu.Github.Client/Github/Client/Models/GistSimple_files.cs new file mode 100644 index 0000000..5cec860 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/GistSimple_files.cs @@ -0,0 +1,55 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class GistSimple_files : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public GistSimple_files() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.GistSimple_files CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.GistSimple_files(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/GistSimple_fork_of.cs b/src/Ayllu.Github.Client/Github/Client/Models/GistSimple_fork_of.cs new file mode 100644 index 0000000..f5e7796 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/GistSimple_fork_of.cs @@ -0,0 +1,230 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + /// + /// Gist + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class GistSimple_fork_of : IAdditionalDataHolder, IParsable + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The comments property + public int? Comments { get; set; } + /// The comments_enabled property + public bool? CommentsEnabled { get; set; } + /// The comments_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? CommentsUrl { get; set; } +#nullable restore +#else + public string CommentsUrl { get; set; } +#endif + /// The commits_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? CommitsUrl { get; set; } +#nullable restore +#else + public string CommitsUrl { get; set; } +#endif + /// The created_at property + public DateTimeOffset? CreatedAt { get; set; } + /// The description property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Description { get; set; } +#nullable restore +#else + public string Description { get; set; } +#endif + /// The files property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.GistSimple_fork_of_files? Files { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.GistSimple_fork_of_files Files { get; set; } +#endif + /// The forks property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public UntypedNode? Forks { get; set; } +#nullable restore +#else + public UntypedNode Forks { get; set; } +#endif + /// The forks_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? ForksUrl { get; set; } +#nullable restore +#else + public string ForksUrl { get; set; } +#endif + /// The git_pull_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? GitPullUrl { get; set; } +#nullable restore +#else + public string GitPullUrl { get; set; } +#endif + /// The git_push_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? GitPushUrl { get; set; } +#nullable restore +#else + public string GitPushUrl { get; set; } +#endif + /// The history property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public UntypedNode? History { get; set; } +#nullable restore +#else + public UntypedNode History { get; set; } +#endif + /// The html_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? HtmlUrl { get; set; } +#nullable restore +#else + public string HtmlUrl { get; set; } +#endif + /// The id property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Id { get; set; } +#nullable restore +#else + public string Id { get; set; } +#endif + /// The node_id property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? NodeId { get; set; } +#nullable restore +#else + public string NodeId { get; set; } +#endif + /// A GitHub user. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.NullableSimpleUser? Owner { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.NullableSimpleUser Owner { get; set; } +#endif + /// The public property + public bool? Public { get; set; } + /// The truncated property + public bool? Truncated { get; set; } + /// The updated_at property + public DateTimeOffset? UpdatedAt { get; set; } + /// The url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Url { get; set; } +#nullable restore +#else + public string Url { get; set; } +#endif + /// A GitHub user. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.NullableSimpleUser? User { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.NullableSimpleUser User { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public GistSimple_fork_of() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.GistSimple_fork_of CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.GistSimple_fork_of(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "comments", n => { Comments = n.GetIntValue(); } }, + { "comments_enabled", n => { CommentsEnabled = n.GetBoolValue(); } }, + { "comments_url", n => { CommentsUrl = n.GetStringValue(); } }, + { "commits_url", n => { CommitsUrl = n.GetStringValue(); } }, + { "created_at", n => { CreatedAt = n.GetDateTimeOffsetValue(); } }, + { "description", n => { Description = n.GetStringValue(); } }, + { "files", n => { Files = n.GetObjectValue(global::Ayllu.Github.Client.Models.GistSimple_fork_of_files.CreateFromDiscriminatorValue); } }, + { "forks", n => { Forks = n.GetObjectValue(UntypedNode.CreateFromDiscriminatorValue); } }, + { "forks_url", n => { ForksUrl = n.GetStringValue(); } }, + { "git_pull_url", n => { GitPullUrl = n.GetStringValue(); } }, + { "git_push_url", n => { GitPushUrl = n.GetStringValue(); } }, + { "history", n => { History = n.GetObjectValue(UntypedNode.CreateFromDiscriminatorValue); } }, + { "html_url", n => { HtmlUrl = n.GetStringValue(); } }, + { "id", n => { Id = n.GetStringValue(); } }, + { "node_id", n => { NodeId = n.GetStringValue(); } }, + { "owner", n => { Owner = n.GetObjectValue(global::Ayllu.Github.Client.Models.NullableSimpleUser.CreateFromDiscriminatorValue); } }, + { "public", n => { Public = n.GetBoolValue(); } }, + { "truncated", n => { Truncated = n.GetBoolValue(); } }, + { "updated_at", n => { UpdatedAt = n.GetDateTimeOffsetValue(); } }, + { "url", n => { Url = n.GetStringValue(); } }, + { "user", n => { User = n.GetObjectValue(global::Ayllu.Github.Client.Models.NullableSimpleUser.CreateFromDiscriminatorValue); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteIntValue("comments", Comments); + writer.WriteBoolValue("comments_enabled", CommentsEnabled); + writer.WriteStringValue("comments_url", CommentsUrl); + writer.WriteStringValue("commits_url", CommitsUrl); + writer.WriteDateTimeOffsetValue("created_at", CreatedAt); + writer.WriteStringValue("description", Description); + writer.WriteObjectValue("files", Files); + writer.WriteObjectValue("forks", Forks); + writer.WriteStringValue("forks_url", ForksUrl); + writer.WriteStringValue("git_pull_url", GitPullUrl); + writer.WriteStringValue("git_push_url", GitPushUrl); + writer.WriteObjectValue("history", History); + writer.WriteStringValue("html_url", HtmlUrl); + writer.WriteStringValue("id", Id); + writer.WriteStringValue("node_id", NodeId); + writer.WriteObjectValue("owner", Owner); + writer.WriteBoolValue("public", Public); + writer.WriteBoolValue("truncated", Truncated); + writer.WriteDateTimeOffsetValue("updated_at", UpdatedAt); + writer.WriteStringValue("url", Url); + writer.WriteObjectValue("user", User); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/GistSimple_fork_of_files.cs b/src/Ayllu.Github.Client/Github/Client/Models/GistSimple_fork_of_files.cs new file mode 100644 index 0000000..468fbf3 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/GistSimple_fork_of_files.cs @@ -0,0 +1,55 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class GistSimple_fork_of_files : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public GistSimple_fork_of_files() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.GistSimple_fork_of_files CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.GistSimple_fork_of_files(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/GistSimple_forks.cs b/src/Ayllu.Github.Client/Github/Client/Models/GistSimple_forks.cs new file mode 100644 index 0000000..88242e6 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/GistSimple_forks.cs @@ -0,0 +1,93 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class GistSimple_forks : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The created_at property + public DateTimeOffset? CreatedAt { get; set; } + /// The id property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Id { get; set; } +#nullable restore +#else + public string Id { get; set; } +#endif + /// The updated_at property + public DateTimeOffset? UpdatedAt { get; set; } + /// The url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Url { get; set; } +#nullable restore +#else + public string Url { get; set; } +#endif + /// Public User +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.PublicUser? User { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.PublicUser User { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public GistSimple_forks() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.GistSimple_forks CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.GistSimple_forks(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "created_at", n => { CreatedAt = n.GetDateTimeOffsetValue(); } }, + { "id", n => { Id = n.GetStringValue(); } }, + { "updated_at", n => { UpdatedAt = n.GetDateTimeOffsetValue(); } }, + { "url", n => { Url = n.GetStringValue(); } }, + { "user", n => { User = n.GetObjectValue(global::Ayllu.Github.Client.Models.PublicUser.CreateFromDiscriminatorValue); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteDateTimeOffsetValue("created_at", CreatedAt); + writer.WriteStringValue("id", Id); + writer.WriteDateTimeOffsetValue("updated_at", UpdatedAt); + writer.WriteStringValue("url", Url); + writer.WriteObjectValue("user", User); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/GitCommit.cs b/src/Ayllu.Github.Client/Github/Client/Models/GitCommit.cs new file mode 100644 index 0000000..cd13e65 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/GitCommit.cs @@ -0,0 +1,156 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + /// + /// Low-level Git commit operations within a repository + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class GitCommit : IAdditionalDataHolder, IParsable + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// Identifying information for the git-user +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.GitCommit_author? Author { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.GitCommit_author Author { get; set; } +#endif + /// Identifying information for the git-user +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.GitCommit_committer? Committer { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.GitCommit_committer Committer { get; set; } +#endif + /// The html_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? HtmlUrl { get; set; } +#nullable restore +#else + public string HtmlUrl { get; set; } +#endif + /// Message describing the purpose of the commit +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Message { get; set; } +#nullable restore +#else + public string Message { get; set; } +#endif + /// The node_id property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? NodeId { get; set; } +#nullable restore +#else + public string NodeId { get; set; } +#endif + /// The parents property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? Parents { get; set; } +#nullable restore +#else + public List Parents { get; set; } +#endif + /// SHA for the commit +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Sha { get; set; } +#nullable restore +#else + public string Sha { get; set; } +#endif + /// The tree property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.GitCommit_tree? Tree { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.GitCommit_tree Tree { get; set; } +#endif + /// The url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Url { get; set; } +#nullable restore +#else + public string Url { get; set; } +#endif + /// The verification property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.GitCommit_verification? Verification { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.GitCommit_verification Verification { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public GitCommit() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.GitCommit CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.GitCommit(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "author", n => { Author = n.GetObjectValue(global::Ayllu.Github.Client.Models.GitCommit_author.CreateFromDiscriminatorValue); } }, + { "committer", n => { Committer = n.GetObjectValue(global::Ayllu.Github.Client.Models.GitCommit_committer.CreateFromDiscriminatorValue); } }, + { "html_url", n => { HtmlUrl = n.GetStringValue(); } }, + { "message", n => { Message = n.GetStringValue(); } }, + { "node_id", n => { NodeId = n.GetStringValue(); } }, + { "parents", n => { Parents = n.GetCollectionOfObjectValues(global::Ayllu.Github.Client.Models.GitCommit_parents.CreateFromDiscriminatorValue)?.AsList(); } }, + { "sha", n => { Sha = n.GetStringValue(); } }, + { "tree", n => { Tree = n.GetObjectValue(global::Ayllu.Github.Client.Models.GitCommit_tree.CreateFromDiscriminatorValue); } }, + { "url", n => { Url = n.GetStringValue(); } }, + { "verification", n => { Verification = n.GetObjectValue(global::Ayllu.Github.Client.Models.GitCommit_verification.CreateFromDiscriminatorValue); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteObjectValue("author", Author); + writer.WriteObjectValue("committer", Committer); + writer.WriteStringValue("html_url", HtmlUrl); + writer.WriteStringValue("message", Message); + writer.WriteStringValue("node_id", NodeId); + writer.WriteCollectionOfObjectValues("parents", Parents); + writer.WriteStringValue("sha", Sha); + writer.WriteObjectValue("tree", Tree); + writer.WriteStringValue("url", Url); + writer.WriteObjectValue("verification", Verification); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/GitCommit_author.cs b/src/Ayllu.Github.Client/Github/Client/Models/GitCommit_author.cs new file mode 100644 index 0000000..77abfde --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/GitCommit_author.cs @@ -0,0 +1,80 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + /// + /// Identifying information for the git-user + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class GitCommit_author : IAdditionalDataHolder, IParsable + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// Timestamp of the commit + public DateTimeOffset? Date { get; set; } + /// Git email address of the user +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Email { get; set; } +#nullable restore +#else + public string Email { get; set; } +#endif + /// Name of the git user +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Name { get; set; } +#nullable restore +#else + public string Name { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public GitCommit_author() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.GitCommit_author CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.GitCommit_author(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "date", n => { Date = n.GetDateTimeOffsetValue(); } }, + { "email", n => { Email = n.GetStringValue(); } }, + { "name", n => { Name = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteDateTimeOffsetValue("date", Date); + writer.WriteStringValue("email", Email); + writer.WriteStringValue("name", Name); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/GitCommit_committer.cs b/src/Ayllu.Github.Client/Github/Client/Models/GitCommit_committer.cs new file mode 100644 index 0000000..55cdf04 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/GitCommit_committer.cs @@ -0,0 +1,80 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + /// + /// Identifying information for the git-user + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class GitCommit_committer : IAdditionalDataHolder, IParsable + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// Timestamp of the commit + public DateTimeOffset? Date { get; set; } + /// Git email address of the user +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Email { get; set; } +#nullable restore +#else + public string Email { get; set; } +#endif + /// Name of the git user +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Name { get; set; } +#nullable restore +#else + public string Name { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public GitCommit_committer() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.GitCommit_committer CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.GitCommit_committer(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "date", n => { Date = n.GetDateTimeOffsetValue(); } }, + { "email", n => { Email = n.GetStringValue(); } }, + { "name", n => { Name = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteDateTimeOffsetValue("date", Date); + writer.WriteStringValue("email", Email); + writer.WriteStringValue("name", Name); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/GitCommit_parents.cs b/src/Ayllu.Github.Client/Github/Client/Models/GitCommit_parents.cs new file mode 100644 index 0000000..b86f6e8 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/GitCommit_parents.cs @@ -0,0 +1,85 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class GitCommit_parents : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The html_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? HtmlUrl { get; set; } +#nullable restore +#else + public string HtmlUrl { get; set; } +#endif + /// SHA for the commit +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Sha { get; set; } +#nullable restore +#else + public string Sha { get; set; } +#endif + /// The url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Url { get; set; } +#nullable restore +#else + public string Url { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public GitCommit_parents() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.GitCommit_parents CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.GitCommit_parents(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "html_url", n => { HtmlUrl = n.GetStringValue(); } }, + { "sha", n => { Sha = n.GetStringValue(); } }, + { "url", n => { Url = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("html_url", HtmlUrl); + writer.WriteStringValue("sha", Sha); + writer.WriteStringValue("url", Url); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/GitCommit_tree.cs b/src/Ayllu.Github.Client/Github/Client/Models/GitCommit_tree.cs new file mode 100644 index 0000000..be9a080 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/GitCommit_tree.cs @@ -0,0 +1,75 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class GitCommit_tree : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// SHA for the commit +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Sha { get; set; } +#nullable restore +#else + public string Sha { get; set; } +#endif + /// The url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Url { get; set; } +#nullable restore +#else + public string Url { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public GitCommit_tree() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.GitCommit_tree CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.GitCommit_tree(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "sha", n => { Sha = n.GetStringValue(); } }, + { "url", n => { Url = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("sha", Sha); + writer.WriteStringValue("url", Url); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/GitCommit_verification.cs b/src/Ayllu.Github.Client/Github/Client/Models/GitCommit_verification.cs new file mode 100644 index 0000000..1822d70 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/GitCommit_verification.cs @@ -0,0 +1,99 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class GitCommit_verification : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The payload property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Payload { get; set; } +#nullable restore +#else + public string Payload { get; set; } +#endif + /// The reason property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Reason { get; set; } +#nullable restore +#else + public string Reason { get; set; } +#endif + /// The signature property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Signature { get; set; } +#nullable restore +#else + public string Signature { get; set; } +#endif + /// The verified property + public bool? Verified { get; set; } + /// The verified_at property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? VerifiedAt { get; set; } +#nullable restore +#else + public string VerifiedAt { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public GitCommit_verification() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.GitCommit_verification CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.GitCommit_verification(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "payload", n => { Payload = n.GetStringValue(); } }, + { "reason", n => { Reason = n.GetStringValue(); } }, + { "signature", n => { Signature = n.GetStringValue(); } }, + { "verified", n => { Verified = n.GetBoolValue(); } }, + { "verified_at", n => { VerifiedAt = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("payload", Payload); + writer.WriteStringValue("reason", Reason); + writer.WriteStringValue("signature", Signature); + writer.WriteBoolValue("verified", Verified); + writer.WriteStringValue("verified_at", VerifiedAt); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/GitRef.cs b/src/Ayllu.Github.Client/Github/Client/Models/GitRef.cs new file mode 100644 index 0000000..6ca2600 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/GitRef.cs @@ -0,0 +1,96 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + /// + /// Git references within a repository + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class GitRef : IAdditionalDataHolder, IParsable + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The node_id property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? NodeId { get; set; } +#nullable restore +#else + public string NodeId { get; set; } +#endif + /// The object property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.GitRef_object? Object { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.GitRef_object Object { get; set; } +#endif + /// The ref property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Ref { get; set; } +#nullable restore +#else + public string Ref { get; set; } +#endif + /// The url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Url { get; set; } +#nullable restore +#else + public string Url { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public GitRef() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.GitRef CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.GitRef(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "node_id", n => { NodeId = n.GetStringValue(); } }, + { "object", n => { Object = n.GetObjectValue(global::Ayllu.Github.Client.Models.GitRef_object.CreateFromDiscriminatorValue); } }, + { "ref", n => { Ref = n.GetStringValue(); } }, + { "url", n => { Url = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("node_id", NodeId); + writer.WriteObjectValue("object", Object); + writer.WriteStringValue("ref", Ref); + writer.WriteStringValue("url", Url); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/GitRef_object.cs b/src/Ayllu.Github.Client/Github/Client/Models/GitRef_object.cs new file mode 100644 index 0000000..76c7215 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/GitRef_object.cs @@ -0,0 +1,85 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class GitRef_object : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// SHA for the reference +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Sha { get; set; } +#nullable restore +#else + public string Sha { get; set; } +#endif + /// The type property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Type { get; set; } +#nullable restore +#else + public string Type { get; set; } +#endif + /// The url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Url { get; set; } +#nullable restore +#else + public string Url { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public GitRef_object() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.GitRef_object CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.GitRef_object(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "sha", n => { Sha = n.GetStringValue(); } }, + { "type", n => { Type = n.GetStringValue(); } }, + { "url", n => { Url = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("sha", Sha); + writer.WriteStringValue("type", Type); + writer.WriteStringValue("url", Url); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/GitTag.cs b/src/Ayllu.Github.Client/Github/Client/Models/GitTag.cs new file mode 100644 index 0000000..6894160 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/GitTag.cs @@ -0,0 +1,136 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + /// + /// Metadata for a Git tag + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class GitTag : IAdditionalDataHolder, IParsable + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// Message describing the purpose of the tag +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Message { get; set; } +#nullable restore +#else + public string Message { get; set; } +#endif + /// The node_id property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? NodeId { get; set; } +#nullable restore +#else + public string NodeId { get; set; } +#endif + /// The object property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.GitTag_object? Object { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.GitTag_object Object { get; set; } +#endif + /// The sha property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Sha { get; set; } +#nullable restore +#else + public string Sha { get; set; } +#endif + /// Name of the tag +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Tag { get; set; } +#nullable restore +#else + public string Tag { get; set; } +#endif + /// The tagger property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.GitTag_tagger? Tagger { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.GitTag_tagger Tagger { get; set; } +#endif + /// URL for the tag +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Url { get; set; } +#nullable restore +#else + public string Url { get; set; } +#endif + /// The verification property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.Verification? Verification { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.Verification Verification { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public GitTag() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.GitTag CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.GitTag(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "message", n => { Message = n.GetStringValue(); } }, + { "node_id", n => { NodeId = n.GetStringValue(); } }, + { "object", n => { Object = n.GetObjectValue(global::Ayllu.Github.Client.Models.GitTag_object.CreateFromDiscriminatorValue); } }, + { "sha", n => { Sha = n.GetStringValue(); } }, + { "tag", n => { Tag = n.GetStringValue(); } }, + { "tagger", n => { Tagger = n.GetObjectValue(global::Ayllu.Github.Client.Models.GitTag_tagger.CreateFromDiscriminatorValue); } }, + { "url", n => { Url = n.GetStringValue(); } }, + { "verification", n => { Verification = n.GetObjectValue(global::Ayllu.Github.Client.Models.Verification.CreateFromDiscriminatorValue); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("message", Message); + writer.WriteStringValue("node_id", NodeId); + writer.WriteObjectValue("object", Object); + writer.WriteStringValue("sha", Sha); + writer.WriteStringValue("tag", Tag); + writer.WriteObjectValue("tagger", Tagger); + writer.WriteStringValue("url", Url); + writer.WriteObjectValue("verification", Verification); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/GitTag_object.cs b/src/Ayllu.Github.Client/Github/Client/Models/GitTag_object.cs new file mode 100644 index 0000000..74015f8 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/GitTag_object.cs @@ -0,0 +1,85 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class GitTag_object : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The sha property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Sha { get; set; } +#nullable restore +#else + public string Sha { get; set; } +#endif + /// The type property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Type { get; set; } +#nullable restore +#else + public string Type { get; set; } +#endif + /// The url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Url { get; set; } +#nullable restore +#else + public string Url { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public GitTag_object() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.GitTag_object CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.GitTag_object(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "sha", n => { Sha = n.GetStringValue(); } }, + { "type", n => { Type = n.GetStringValue(); } }, + { "url", n => { Url = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("sha", Sha); + writer.WriteStringValue("type", Type); + writer.WriteStringValue("url", Url); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/GitTag_tagger.cs b/src/Ayllu.Github.Client/Github/Client/Models/GitTag_tagger.cs new file mode 100644 index 0000000..2770aee --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/GitTag_tagger.cs @@ -0,0 +1,85 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class GitTag_tagger : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The date property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Date { get; set; } +#nullable restore +#else + public string Date { get; set; } +#endif + /// The email property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Email { get; set; } +#nullable restore +#else + public string Email { get; set; } +#endif + /// The name property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Name { get; set; } +#nullable restore +#else + public string Name { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public GitTag_tagger() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.GitTag_tagger CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.GitTag_tagger(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "date", n => { Date = n.GetStringValue(); } }, + { "email", n => { Email = n.GetStringValue(); } }, + { "name", n => { Name = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("date", Date); + writer.WriteStringValue("email", Email); + writer.WriteStringValue("name", Name); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/GitTree.cs b/src/Ayllu.Github.Client/Github/Client/Models/GitTree.cs new file mode 100644 index 0000000..478f12b --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/GitTree.cs @@ -0,0 +1,90 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + /// + /// The hierarchy between files in a Git repository. + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class GitTree : IAdditionalDataHolder, IParsable + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The sha property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Sha { get; set; } +#nullable restore +#else + public string Sha { get; set; } +#endif + /// Objects specifying a tree structure +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? Tree { get; set; } +#nullable restore +#else + public List Tree { get; set; } +#endif + /// The truncated property + public bool? Truncated { get; set; } + /// The url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Url { get; set; } +#nullable restore +#else + public string Url { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public GitTree() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.GitTree CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.GitTree(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "sha", n => { Sha = n.GetStringValue(); } }, + { "tree", n => { Tree = n.GetCollectionOfObjectValues(global::Ayllu.Github.Client.Models.GitTree_tree.CreateFromDiscriminatorValue)?.AsList(); } }, + { "truncated", n => { Truncated = n.GetBoolValue(); } }, + { "url", n => { Url = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("sha", Sha); + writer.WriteCollectionOfObjectValues("tree", Tree); + writer.WriteBoolValue("truncated", Truncated); + writer.WriteStringValue("url", Url); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/GitTree_tree.cs b/src/Ayllu.Github.Client/Github/Client/Models/GitTree_tree.cs new file mode 100644 index 0000000..cecb688 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/GitTree_tree.cs @@ -0,0 +1,109 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class GitTree_tree : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The mode property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Mode { get; set; } +#nullable restore +#else + public string Mode { get; set; } +#endif + /// The path property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Path { get; set; } +#nullable restore +#else + public string Path { get; set; } +#endif + /// The sha property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Sha { get; set; } +#nullable restore +#else + public string Sha { get; set; } +#endif + /// The size property + public int? Size { get; set; } + /// The type property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Type { get; set; } +#nullable restore +#else + public string Type { get; set; } +#endif + /// The url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Url { get; set; } +#nullable restore +#else + public string Url { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public GitTree_tree() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.GitTree_tree CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.GitTree_tree(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "mode", n => { Mode = n.GetStringValue(); } }, + { "path", n => { Path = n.GetStringValue(); } }, + { "sha", n => { Sha = n.GetStringValue(); } }, + { "size", n => { Size = n.GetIntValue(); } }, + { "type", n => { Type = n.GetStringValue(); } }, + { "url", n => { Url = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("mode", Mode); + writer.WriteStringValue("path", Path); + writer.WriteStringValue("sha", Sha); + writer.WriteIntValue("size", Size); + writer.WriteStringValue("type", Type); + writer.WriteStringValue("url", Url); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/GitignoreTemplate.cs b/src/Ayllu.Github.Client/Github/Client/Models/GitignoreTemplate.cs new file mode 100644 index 0000000..d0e0af0 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/GitignoreTemplate.cs @@ -0,0 +1,76 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + /// + /// Gitignore Template + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class GitignoreTemplate : IAdditionalDataHolder, IParsable + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The name property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Name { get; set; } +#nullable restore +#else + public string Name { get; set; } +#endif + /// The source property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Source { get; set; } +#nullable restore +#else + public string Source { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public GitignoreTemplate() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.GitignoreTemplate CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.GitignoreTemplate(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "name", n => { Name = n.GetStringValue(); } }, + { "source", n => { Source = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("name", Name); + writer.WriteStringValue("source", Source); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/GlobalAdvisory.cs b/src/Ayllu.Github.Client/Github/Client/Models/GlobalAdvisory.cs new file mode 100644 index 0000000..2190e38 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/GlobalAdvisory.cs @@ -0,0 +1,220 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + /// + /// A GitHub Security Advisory. + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class GlobalAdvisory : IParsable + { + /// The users who contributed to the advisory. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? Credits { get; private set; } +#nullable restore +#else + public List Credits { get; private set; } +#endif + /// The Common Vulnerabilities and Exposures (CVE) ID. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? CveId { get; private set; } +#nullable restore +#else + public string CveId { get; private set; } +#endif + /// The cvss property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.GlobalAdvisory_cvss? Cvss { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.GlobalAdvisory_cvss Cvss { get; set; } +#endif + /// The cvss_severities property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.CvssSeverities? CvssSeverities { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.CvssSeverities CvssSeverities { get; set; } +#endif + /// The cwes property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? Cwes { get; set; } +#nullable restore +#else + public List Cwes { get; set; } +#endif + /// A detailed description of what the advisory entails. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Description { get; set; } +#nullable restore +#else + public string Description { get; set; } +#endif + /// The EPSS scores as calculated by the [Exploit Prediction Scoring System](https://www.first.org/epss). +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.SecurityAdvisoryEpss? Epss { get; private set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.SecurityAdvisoryEpss Epss { get; private set; } +#endif + /// The GitHub Security Advisory ID. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? GhsaId { get; private set; } +#nullable restore +#else + public string GhsaId { get; private set; } +#endif + /// The date and time of when the advisory was reviewed by GitHub, in ISO 8601 format. + public DateTimeOffset? GithubReviewedAt { get; private set; } + /// The URL for the advisory. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? HtmlUrl { get; private set; } +#nullable restore +#else + public string HtmlUrl { get; private set; } +#endif + /// The identifiers property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? Identifiers { get; private set; } +#nullable restore +#else + public List Identifiers { get; private set; } +#endif + /// 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. + public DateTimeOffset? NvdPublishedAt { get; private set; } + /// The date and time of when the advisory was published, in ISO 8601 format. + public DateTimeOffset? PublishedAt { get; private set; } + /// The references property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? References { get; set; } +#nullable restore +#else + public List References { get; set; } +#endif + /// The API URL for the repository advisory. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? RepositoryAdvisoryUrl { get; private set; } +#nullable restore +#else + public string RepositoryAdvisoryUrl { get; private set; } +#endif + /// The severity of the advisory. + public global::Ayllu.Github.Client.Models.GlobalAdvisory_severity? Severity { get; set; } + /// The URL of the advisory's source code. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? SourceCodeLocation { get; set; } +#nullable restore +#else + public string SourceCodeLocation { get; set; } +#endif + /// A short summary of the advisory. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Summary { get; set; } +#nullable restore +#else + public string Summary { get; set; } +#endif + /// The type of advisory. + public global::Ayllu.Github.Client.Models.GlobalAdvisory_type? Type { get; private set; } + /// The date and time of when the advisory was last updated, in ISO 8601 format. + public DateTimeOffset? UpdatedAt { get; private set; } + /// The API URL for the advisory. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Url { get; private set; } +#nullable restore +#else + public string Url { get; private set; } +#endif + /// The products and respective version ranges affected by the advisory. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? Vulnerabilities { get; set; } +#nullable restore +#else + public List Vulnerabilities { get; set; } +#endif + /// The date and time of when the advisory was withdrawn, in ISO 8601 format. + public DateTimeOffset? WithdrawnAt { get; private set; } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.GlobalAdvisory CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.GlobalAdvisory(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "credits", n => { Credits = n.GetCollectionOfObjectValues(global::Ayllu.Github.Client.Models.GlobalAdvisory_credits.CreateFromDiscriminatorValue)?.AsList(); } }, + { "cve_id", n => { CveId = n.GetStringValue(); } }, + { "cvss", n => { Cvss = n.GetObjectValue(global::Ayllu.Github.Client.Models.GlobalAdvisory_cvss.CreateFromDiscriminatorValue); } }, + { "cvss_severities", n => { CvssSeverities = n.GetObjectValue(global::Ayllu.Github.Client.Models.CvssSeverities.CreateFromDiscriminatorValue); } }, + { "cwes", n => { Cwes = n.GetCollectionOfObjectValues(global::Ayllu.Github.Client.Models.GlobalAdvisory_cwes.CreateFromDiscriminatorValue)?.AsList(); } }, + { "description", n => { Description = n.GetStringValue(); } }, + { "epss", n => { Epss = n.GetObjectValue(global::Ayllu.Github.Client.Models.SecurityAdvisoryEpss.CreateFromDiscriminatorValue); } }, + { "ghsa_id", n => { GhsaId = n.GetStringValue(); } }, + { "github_reviewed_at", n => { GithubReviewedAt = n.GetDateTimeOffsetValue(); } }, + { "html_url", n => { HtmlUrl = n.GetStringValue(); } }, + { "identifiers", n => { Identifiers = n.GetCollectionOfObjectValues(global::Ayllu.Github.Client.Models.GlobalAdvisory_identifiers.CreateFromDiscriminatorValue)?.AsList(); } }, + { "nvd_published_at", n => { NvdPublishedAt = n.GetDateTimeOffsetValue(); } }, + { "published_at", n => { PublishedAt = n.GetDateTimeOffsetValue(); } }, + { "references", n => { References = n.GetCollectionOfPrimitiveValues()?.AsList(); } }, + { "repository_advisory_url", n => { RepositoryAdvisoryUrl = n.GetStringValue(); } }, + { "severity", n => { Severity = n.GetEnumValue(); } }, + { "source_code_location", n => { SourceCodeLocation = n.GetStringValue(); } }, + { "summary", n => { Summary = n.GetStringValue(); } }, + { "type", n => { Type = n.GetEnumValue(); } }, + { "updated_at", n => { UpdatedAt = n.GetDateTimeOffsetValue(); } }, + { "url", n => { Url = n.GetStringValue(); } }, + { "vulnerabilities", n => { Vulnerabilities = n.GetCollectionOfObjectValues(global::Ayllu.Github.Client.Models.Vulnerability.CreateFromDiscriminatorValue)?.AsList(); } }, + { "withdrawn_at", n => { WithdrawnAt = n.GetDateTimeOffsetValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteObjectValue("cvss", Cvss); + writer.WriteObjectValue("cvss_severities", CvssSeverities); + writer.WriteCollectionOfObjectValues("cwes", Cwes); + writer.WriteStringValue("description", Description); + writer.WriteCollectionOfPrimitiveValues("references", References); + writer.WriteEnumValue("severity", Severity); + writer.WriteStringValue("source_code_location", SourceCodeLocation); + writer.WriteStringValue("summary", Summary); + writer.WriteCollectionOfObjectValues("vulnerabilities", Vulnerabilities); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/GlobalAdvisory_credits.cs b/src/Ayllu.Github.Client/Github/Client/Models/GlobalAdvisory_credits.cs new file mode 100644 index 0000000..b159b14 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/GlobalAdvisory_credits.cs @@ -0,0 +1,69 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class GlobalAdvisory_credits : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The type of credit the user is receiving. + public global::Ayllu.Github.Client.Models.SecurityAdvisoryCreditTypes? Type { get; set; } + /// A GitHub user. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.SimpleUser? User { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.SimpleUser User { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public GlobalAdvisory_credits() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.GlobalAdvisory_credits CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.GlobalAdvisory_credits(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "type", n => { Type = n.GetEnumValue(); } }, + { "user", n => { User = n.GetObjectValue(global::Ayllu.Github.Client.Models.SimpleUser.CreateFromDiscriminatorValue); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteEnumValue("type", Type); + writer.WriteObjectValue("user", User); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/GlobalAdvisory_cvss.cs b/src/Ayllu.Github.Client/Github/Client/Models/GlobalAdvisory_cvss.cs new file mode 100644 index 0000000..3629267 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/GlobalAdvisory_cvss.cs @@ -0,0 +1,68 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class GlobalAdvisory_cvss : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The CVSS score. + public double? Score { get; private set; } + /// The CVSS vector. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? VectorString { get; set; } +#nullable restore +#else + public string VectorString { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public GlobalAdvisory_cvss() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.GlobalAdvisory_cvss CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.GlobalAdvisory_cvss(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "score", n => { Score = n.GetDoubleValue(); } }, + { "vector_string", n => { VectorString = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("vector_string", VectorString); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/GlobalAdvisory_cwes.cs b/src/Ayllu.Github.Client/Github/Client/Models/GlobalAdvisory_cwes.cs new file mode 100644 index 0000000..6f4871b --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/GlobalAdvisory_cwes.cs @@ -0,0 +1,74 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class GlobalAdvisory_cwes : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The Common Weakness Enumeration (CWE) identifier. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? CweId { get; set; } +#nullable restore +#else + public string CweId { get; set; } +#endif + /// The name of the CWE. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Name { get; private set; } +#nullable restore +#else + public string Name { get; private set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public GlobalAdvisory_cwes() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.GlobalAdvisory_cwes CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.GlobalAdvisory_cwes(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "cwe_id", n => { CweId = n.GetStringValue(); } }, + { "name", n => { Name = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("cwe_id", CweId); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/GlobalAdvisory_identifiers.cs b/src/Ayllu.Github.Client/Github/Client/Models/GlobalAdvisory_identifiers.cs new file mode 100644 index 0000000..6ed2dc0 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/GlobalAdvisory_identifiers.cs @@ -0,0 +1,69 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class GlobalAdvisory_identifiers : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The type of identifier. + public global::Ayllu.Github.Client.Models.GlobalAdvisory_identifiers_type? Type { get; set; } + /// The identifier value. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Value { get; set; } +#nullable restore +#else + public string Value { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public GlobalAdvisory_identifiers() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.GlobalAdvisory_identifiers CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.GlobalAdvisory_identifiers(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "type", n => { Type = n.GetEnumValue(); } }, + { "value", n => { Value = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteEnumValue("type", Type); + writer.WriteStringValue("value", Value); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/GlobalAdvisory_identifiers_type.cs b/src/Ayllu.Github.Client/Github/Client/Models/GlobalAdvisory_identifiers_type.cs new file mode 100644 index 0000000..8c0ca1e --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/GlobalAdvisory_identifiers_type.cs @@ -0,0 +1,19 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Models +{ + /// The type of identifier. + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public enum GlobalAdvisory_identifiers_type + { + [EnumMember(Value = "CVE")] + #pragma warning disable CS1591 + CVE, + #pragma warning restore CS1591 + [EnumMember(Value = "GHSA")] + #pragma warning disable CS1591 + GHSA, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Models/GlobalAdvisory_severity.cs b/src/Ayllu.Github.Client/Github/Client/Models/GlobalAdvisory_severity.cs new file mode 100644 index 0000000..51fd160 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/GlobalAdvisory_severity.cs @@ -0,0 +1,31 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Models +{ + /// The severity of the advisory. + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public enum GlobalAdvisory_severity + { + [EnumMember(Value = "critical")] + #pragma warning disable CS1591 + Critical, + #pragma warning restore CS1591 + [EnumMember(Value = "high")] + #pragma warning disable CS1591 + High, + #pragma warning restore CS1591 + [EnumMember(Value = "medium")] + #pragma warning disable CS1591 + Medium, + #pragma warning restore CS1591 + [EnumMember(Value = "low")] + #pragma warning disable CS1591 + Low, + #pragma warning restore CS1591 + [EnumMember(Value = "unknown")] + #pragma warning disable CS1591 + Unknown, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Models/GlobalAdvisory_type.cs b/src/Ayllu.Github.Client/Github/Client/Models/GlobalAdvisory_type.cs new file mode 100644 index 0000000..346c75e --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/GlobalAdvisory_type.cs @@ -0,0 +1,23 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Models +{ + /// The type of advisory. + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public enum GlobalAdvisory_type + { + [EnumMember(Value = "reviewed")] + #pragma warning disable CS1591 + Reviewed, + #pragma warning restore CS1591 + [EnumMember(Value = "unreviewed")] + #pragma warning disable CS1591 + Unreviewed, + #pragma warning restore CS1591 + [EnumMember(Value = "malware")] + #pragma warning disable CS1591 + Malware, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Models/GpgKey.cs b/src/Ayllu.Github.Client/Github/Client/Models/GpgKey.cs new file mode 100644 index 0000000..9d1dfe1 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/GpgKey.cs @@ -0,0 +1,152 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + /// + /// A unique encryption key + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class GpgKey : IAdditionalDataHolder, IParsable + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The can_certify property + public bool? CanCertify { get; set; } + /// The can_encrypt_comms property + public bool? CanEncryptComms { get; set; } + /// The can_encrypt_storage property + public bool? CanEncryptStorage { get; set; } + /// The can_sign property + public bool? CanSign { get; set; } + /// The created_at property + public DateTimeOffset? CreatedAt { get; set; } + /// The emails property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? Emails { get; set; } +#nullable restore +#else + public List Emails { get; set; } +#endif + /// The expires_at property + public DateTimeOffset? ExpiresAt { get; set; } + /// The id property + public long? Id { get; set; } + /// The key_id property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? KeyId { get; set; } +#nullable restore +#else + public string KeyId { get; set; } +#endif + /// The name property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Name { get; set; } +#nullable restore +#else + public string Name { get; set; } +#endif + /// The primary_key_id property + public int? PrimaryKeyId { get; set; } + /// The public_key property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? PublicKey { get; set; } +#nullable restore +#else + public string PublicKey { get; set; } +#endif + /// The raw_key property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? RawKey { get; set; } +#nullable restore +#else + public string RawKey { get; set; } +#endif + /// The revoked property + public bool? Revoked { get; set; } + /// The subkeys property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? Subkeys { get; set; } +#nullable restore +#else + public List Subkeys { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public GpgKey() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.GpgKey CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.GpgKey(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "can_certify", n => { CanCertify = n.GetBoolValue(); } }, + { "can_encrypt_comms", n => { CanEncryptComms = n.GetBoolValue(); } }, + { "can_encrypt_storage", n => { CanEncryptStorage = n.GetBoolValue(); } }, + { "can_sign", n => { CanSign = n.GetBoolValue(); } }, + { "created_at", n => { CreatedAt = n.GetDateTimeOffsetValue(); } }, + { "emails", n => { Emails = n.GetCollectionOfObjectValues(global::Ayllu.Github.Client.Models.GpgKey_emails.CreateFromDiscriminatorValue)?.AsList(); } }, + { "expires_at", n => { ExpiresAt = n.GetDateTimeOffsetValue(); } }, + { "id", n => { Id = n.GetLongValue(); } }, + { "key_id", n => { KeyId = n.GetStringValue(); } }, + { "name", n => { Name = n.GetStringValue(); } }, + { "primary_key_id", n => { PrimaryKeyId = n.GetIntValue(); } }, + { "public_key", n => { PublicKey = n.GetStringValue(); } }, + { "raw_key", n => { RawKey = n.GetStringValue(); } }, + { "revoked", n => { Revoked = n.GetBoolValue(); } }, + { "subkeys", n => { Subkeys = n.GetCollectionOfObjectValues(global::Ayllu.Github.Client.Models.GpgKey_subkeys.CreateFromDiscriminatorValue)?.AsList(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteBoolValue("can_certify", CanCertify); + writer.WriteBoolValue("can_encrypt_comms", CanEncryptComms); + writer.WriteBoolValue("can_encrypt_storage", CanEncryptStorage); + writer.WriteBoolValue("can_sign", CanSign); + writer.WriteDateTimeOffsetValue("created_at", CreatedAt); + writer.WriteCollectionOfObjectValues("emails", Emails); + writer.WriteDateTimeOffsetValue("expires_at", ExpiresAt); + writer.WriteLongValue("id", Id); + writer.WriteStringValue("key_id", KeyId); + writer.WriteStringValue("name", Name); + writer.WriteIntValue("primary_key_id", PrimaryKeyId); + writer.WriteStringValue("public_key", PublicKey); + writer.WriteStringValue("raw_key", RawKey); + writer.WriteBoolValue("revoked", Revoked); + writer.WriteCollectionOfObjectValues("subkeys", Subkeys); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/GpgKey_emails.cs b/src/Ayllu.Github.Client/Github/Client/Models/GpgKey_emails.cs new file mode 100644 index 0000000..0f9e9c7 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/GpgKey_emails.cs @@ -0,0 +1,69 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class GpgKey_emails : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The email property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Email { get; set; } +#nullable restore +#else + public string Email { get; set; } +#endif + /// The verified property + public bool? Verified { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public GpgKey_emails() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.GpgKey_emails CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.GpgKey_emails(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "email", n => { Email = n.GetStringValue(); } }, + { "verified", n => { Verified = n.GetBoolValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("email", Email); + writer.WriteBoolValue("verified", Verified); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/GpgKey_subkeys.cs b/src/Ayllu.Github.Client/Github/Client/Models/GpgKey_subkeys.cs new file mode 100644 index 0000000..4f66f09 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/GpgKey_subkeys.cs @@ -0,0 +1,153 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class GpgKey_subkeys : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The can_certify property + public bool? CanCertify { get; set; } + /// The can_encrypt_comms property + public bool? CanEncryptComms { get; set; } + /// The can_encrypt_storage property + public bool? CanEncryptStorage { get; set; } + /// The can_sign property + public bool? CanSign { get; set; } + /// The created_at property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? CreatedAt { get; set; } +#nullable restore +#else + public string CreatedAt { get; set; } +#endif + /// The emails property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? Emails { get; set; } +#nullable restore +#else + public List Emails { get; set; } +#endif + /// The expires_at property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? ExpiresAt { get; set; } +#nullable restore +#else + public string ExpiresAt { get; set; } +#endif + /// The id property + public long? Id { get; set; } + /// The key_id property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? KeyId { get; set; } +#nullable restore +#else + public string KeyId { get; set; } +#endif + /// The primary_key_id property + public int? PrimaryKeyId { get; set; } + /// The public_key property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? PublicKey { get; set; } +#nullable restore +#else + public string PublicKey { get; set; } +#endif + /// The raw_key property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? RawKey { get; set; } +#nullable restore +#else + public string RawKey { get; set; } +#endif + /// The revoked property + public bool? Revoked { get; set; } + /// The subkeys property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public UntypedNode? Subkeys { get; set; } +#nullable restore +#else + public UntypedNode Subkeys { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public GpgKey_subkeys() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.GpgKey_subkeys CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.GpgKey_subkeys(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "can_certify", n => { CanCertify = n.GetBoolValue(); } }, + { "can_encrypt_comms", n => { CanEncryptComms = n.GetBoolValue(); } }, + { "can_encrypt_storage", n => { CanEncryptStorage = n.GetBoolValue(); } }, + { "can_sign", n => { CanSign = n.GetBoolValue(); } }, + { "created_at", n => { CreatedAt = n.GetStringValue(); } }, + { "emails", n => { Emails = n.GetCollectionOfObjectValues(global::Ayllu.Github.Client.Models.GpgKey_subkeys_emails.CreateFromDiscriminatorValue)?.AsList(); } }, + { "expires_at", n => { ExpiresAt = n.GetStringValue(); } }, + { "id", n => { Id = n.GetLongValue(); } }, + { "key_id", n => { KeyId = n.GetStringValue(); } }, + { "primary_key_id", n => { PrimaryKeyId = n.GetIntValue(); } }, + { "public_key", n => { PublicKey = n.GetStringValue(); } }, + { "raw_key", n => { RawKey = n.GetStringValue(); } }, + { "revoked", n => { Revoked = n.GetBoolValue(); } }, + { "subkeys", n => { Subkeys = n.GetObjectValue(UntypedNode.CreateFromDiscriminatorValue); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteBoolValue("can_certify", CanCertify); + writer.WriteBoolValue("can_encrypt_comms", CanEncryptComms); + writer.WriteBoolValue("can_encrypt_storage", CanEncryptStorage); + writer.WriteBoolValue("can_sign", CanSign); + writer.WriteStringValue("created_at", CreatedAt); + writer.WriteCollectionOfObjectValues("emails", Emails); + writer.WriteStringValue("expires_at", ExpiresAt); + writer.WriteLongValue("id", Id); + writer.WriteStringValue("key_id", KeyId); + writer.WriteIntValue("primary_key_id", PrimaryKeyId); + writer.WriteStringValue("public_key", PublicKey); + writer.WriteStringValue("raw_key", RawKey); + writer.WriteBoolValue("revoked", Revoked); + writer.WriteObjectValue("subkeys", Subkeys); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/GpgKey_subkeys_emails.cs b/src/Ayllu.Github.Client/Github/Client/Models/GpgKey_subkeys_emails.cs new file mode 100644 index 0000000..166fd6a --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/GpgKey_subkeys_emails.cs @@ -0,0 +1,69 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class GpgKey_subkeys_emails : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The email property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Email { get; set; } +#nullable restore +#else + public string Email { get; set; } +#endif + /// The verified property + public bool? Verified { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public GpgKey_subkeys_emails() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.GpgKey_subkeys_emails CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.GpgKey_subkeys_emails(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "email", n => { Email = n.GetStringValue(); } }, + { "verified", n => { Verified = n.GetBoolValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("email", Email); + writer.WriteBoolValue("verified", Verified); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/Hook.cs b/src/Ayllu.Github.Client/Github/Client/Models/Hook.cs new file mode 100644 index 0000000..e091e47 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/Hook.cs @@ -0,0 +1,162 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + /// + /// Webhooks for repositories. + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class Hook : IAdditionalDataHolder, IParsable + { + /// Determines whether the hook is actually triggered on pushes. + public bool? Active { get; set; } + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// Configuration object of the webhook +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.WebhookConfig? Config { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.WebhookConfig Config { get; set; } +#endif + /// The created_at property + public DateTimeOffset? CreatedAt { get; set; } + /// The deliveries_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? DeliveriesUrl { get; set; } +#nullable restore +#else + public string DeliveriesUrl { get; set; } +#endif + /// Determines what events the hook is triggered for. Default: ['push']. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? Events { get; set; } +#nullable restore +#else + public List Events { get; set; } +#endif + /// Unique identifier of the webhook. + public int? Id { get; set; } + /// The last_response property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.HookResponse? LastResponse { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.HookResponse LastResponse { get; set; } +#endif + /// The name of a valid service, use 'web' for a webhook. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Name { get; set; } +#nullable restore +#else + public string Name { get; set; } +#endif + /// The ping_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? PingUrl { get; set; } +#nullable restore +#else + public string PingUrl { get; set; } +#endif + /// The test_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? TestUrl { get; set; } +#nullable restore +#else + public string TestUrl { get; set; } +#endif + /// The type property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Type { get; set; } +#nullable restore +#else + public string Type { get; set; } +#endif + /// The updated_at property + public DateTimeOffset? UpdatedAt { get; set; } + /// The url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Url { get; set; } +#nullable restore +#else + public string Url { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public Hook() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.Hook CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.Hook(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "active", n => { Active = n.GetBoolValue(); } }, + { "config", n => { Config = n.GetObjectValue(global::Ayllu.Github.Client.Models.WebhookConfig.CreateFromDiscriminatorValue); } }, + { "created_at", n => { CreatedAt = n.GetDateTimeOffsetValue(); } }, + { "deliveries_url", n => { DeliveriesUrl = n.GetStringValue(); } }, + { "events", n => { Events = n.GetCollectionOfPrimitiveValues()?.AsList(); } }, + { "id", n => { Id = n.GetIntValue(); } }, + { "last_response", n => { LastResponse = n.GetObjectValue(global::Ayllu.Github.Client.Models.HookResponse.CreateFromDiscriminatorValue); } }, + { "name", n => { Name = n.GetStringValue(); } }, + { "ping_url", n => { PingUrl = n.GetStringValue(); } }, + { "test_url", n => { TestUrl = n.GetStringValue(); } }, + { "type", n => { Type = n.GetStringValue(); } }, + { "updated_at", n => { UpdatedAt = n.GetDateTimeOffsetValue(); } }, + { "url", n => { Url = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteBoolValue("active", Active); + writer.WriteObjectValue("config", Config); + writer.WriteDateTimeOffsetValue("created_at", CreatedAt); + writer.WriteStringValue("deliveries_url", DeliveriesUrl); + writer.WriteCollectionOfPrimitiveValues("events", Events); + writer.WriteIntValue("id", Id); + writer.WriteObjectValue("last_response", LastResponse); + writer.WriteStringValue("name", Name); + writer.WriteStringValue("ping_url", PingUrl); + writer.WriteStringValue("test_url", TestUrl); + writer.WriteStringValue("type", Type); + writer.WriteDateTimeOffsetValue("updated_at", UpdatedAt); + writer.WriteStringValue("url", Url); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/HookDelivery.cs b/src/Ayllu.Github.Client/Github/Client/Models/HookDelivery.cs new file mode 100644 index 0000000..fd6ee4a --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/HookDelivery.cs @@ -0,0 +1,158 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + /// + /// Delivery made by a webhook. + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class HookDelivery : IAdditionalDataHolder, IParsable + { + /// The type of activity for the event that triggered the delivery. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Action { get; set; } +#nullable restore +#else + public string Action { get; set; } +#endif + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// Time when the delivery was delivered. + public DateTimeOffset? DeliveredAt { get; set; } + /// Time spent delivering. + public double? Duration { get; set; } + /// The event that triggered the delivery. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Event { get; set; } +#nullable restore +#else + public string Event { get; set; } +#endif + /// Unique identifier for the event (shared with all deliveries for all webhooks that subscribe to this event). +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Guid { get; set; } +#nullable restore +#else + public string Guid { get; set; } +#endif + /// Unique identifier of the delivery. + public int? Id { get; set; } + /// The id of the GitHub App installation associated with this event. + public int? InstallationId { get; set; } + /// Whether the delivery is a redelivery. + public bool? Redelivery { get; set; } + /// The id of the repository associated with this event. + public int? RepositoryId { get; set; } + /// The request property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.HookDelivery_request? Request { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.HookDelivery_request Request { get; set; } +#endif + /// The response property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.HookDelivery_response? Response { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.HookDelivery_response Response { get; set; } +#endif + /// Description of the status of the attempted delivery +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Status { get; set; } +#nullable restore +#else + public string Status { get; set; } +#endif + /// Status code received when delivery was made. + public int? StatusCode { get; set; } + /// Time when the webhook delivery was throttled. + public DateTimeOffset? ThrottledAt { get; set; } + /// The URL target of the delivery. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Url { get; set; } +#nullable restore +#else + public string Url { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public HookDelivery() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.HookDelivery CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.HookDelivery(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "action", n => { Action = n.GetStringValue(); } }, + { "delivered_at", n => { DeliveredAt = n.GetDateTimeOffsetValue(); } }, + { "duration", n => { Duration = n.GetDoubleValue(); } }, + { "event", n => { Event = n.GetStringValue(); } }, + { "guid", n => { Guid = n.GetStringValue(); } }, + { "id", n => { Id = n.GetIntValue(); } }, + { "installation_id", n => { InstallationId = n.GetIntValue(); } }, + { "redelivery", n => { Redelivery = n.GetBoolValue(); } }, + { "repository_id", n => { RepositoryId = n.GetIntValue(); } }, + { "request", n => { Request = n.GetObjectValue(global::Ayllu.Github.Client.Models.HookDelivery_request.CreateFromDiscriminatorValue); } }, + { "response", n => { Response = n.GetObjectValue(global::Ayllu.Github.Client.Models.HookDelivery_response.CreateFromDiscriminatorValue); } }, + { "status", n => { Status = n.GetStringValue(); } }, + { "status_code", n => { StatusCode = n.GetIntValue(); } }, + { "throttled_at", n => { ThrottledAt = n.GetDateTimeOffsetValue(); } }, + { "url", n => { Url = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("action", Action); + writer.WriteDateTimeOffsetValue("delivered_at", DeliveredAt); + writer.WriteDoubleValue("duration", Duration); + writer.WriteStringValue("event", Event); + writer.WriteStringValue("guid", Guid); + writer.WriteIntValue("id", Id); + writer.WriteIntValue("installation_id", InstallationId); + writer.WriteBoolValue("redelivery", Redelivery); + writer.WriteIntValue("repository_id", RepositoryId); + writer.WriteObjectValue("request", Request); + writer.WriteObjectValue("response", Response); + writer.WriteStringValue("status", Status); + writer.WriteIntValue("status_code", StatusCode); + writer.WriteDateTimeOffsetValue("throttled_at", ThrottledAt); + writer.WriteStringValue("url", Url); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/HookDeliveryItem.cs b/src/Ayllu.Github.Client/Github/Client/Models/HookDeliveryItem.cs new file mode 100644 index 0000000..4fe4f7b --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/HookDeliveryItem.cs @@ -0,0 +1,128 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + /// + /// Delivery made by a webhook, without request and response information. + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class HookDeliveryItem : IAdditionalDataHolder, IParsable + { + /// The type of activity for the event that triggered the delivery. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Action { get; set; } +#nullable restore +#else + public string Action { get; set; } +#endif + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// Time when the webhook delivery occurred. + public DateTimeOffset? DeliveredAt { get; set; } + /// Time spent delivering. + public double? Duration { get; set; } + /// The event that triggered the delivery. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Event { get; set; } +#nullable restore +#else + public string Event { get; set; } +#endif + /// Unique identifier for the event (shared with all deliveries for all webhooks that subscribe to this event). +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Guid { get; set; } +#nullable restore +#else + public string Guid { get; set; } +#endif + /// Unique identifier of the webhook delivery. + public long? Id { get; set; } + /// The id of the GitHub App installation associated with this event. + public long? InstallationId { get; set; } + /// Whether the webhook delivery is a redelivery. + public bool? Redelivery { get; set; } + /// The id of the repository associated with this event. + public long? RepositoryId { get; set; } + /// Describes the response returned after attempting the delivery. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Status { get; set; } +#nullable restore +#else + public string Status { get; set; } +#endif + /// Status code received when delivery was made. + public int? StatusCode { get; set; } + /// Time when the webhook delivery was throttled. + public DateTimeOffset? ThrottledAt { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public HookDeliveryItem() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.HookDeliveryItem CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.HookDeliveryItem(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "action", n => { Action = n.GetStringValue(); } }, + { "delivered_at", n => { DeliveredAt = n.GetDateTimeOffsetValue(); } }, + { "duration", n => { Duration = n.GetDoubleValue(); } }, + { "event", n => { Event = n.GetStringValue(); } }, + { "guid", n => { Guid = n.GetStringValue(); } }, + { "id", n => { Id = n.GetLongValue(); } }, + { "installation_id", n => { InstallationId = n.GetLongValue(); } }, + { "redelivery", n => { Redelivery = n.GetBoolValue(); } }, + { "repository_id", n => { RepositoryId = n.GetLongValue(); } }, + { "status", n => { Status = n.GetStringValue(); } }, + { "status_code", n => { StatusCode = n.GetIntValue(); } }, + { "throttled_at", n => { ThrottledAt = n.GetDateTimeOffsetValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("action", Action); + writer.WriteDateTimeOffsetValue("delivered_at", DeliveredAt); + writer.WriteDoubleValue("duration", Duration); + writer.WriteStringValue("event", Event); + writer.WriteStringValue("guid", Guid); + writer.WriteLongValue("id", Id); + writer.WriteLongValue("installation_id", InstallationId); + writer.WriteBoolValue("redelivery", Redelivery); + writer.WriteLongValue("repository_id", RepositoryId); + writer.WriteStringValue("status", Status); + writer.WriteIntValue("status_code", StatusCode); + writer.WriteDateTimeOffsetValue("throttled_at", ThrottledAt); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/HookDelivery_request.cs b/src/Ayllu.Github.Client/Github/Client/Models/HookDelivery_request.cs new file mode 100644 index 0000000..a8f2bc8 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/HookDelivery_request.cs @@ -0,0 +1,75 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class HookDelivery_request : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The request headers sent with the webhook delivery. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.HookDelivery_request_headers? Headers { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.HookDelivery_request_headers Headers { get; set; } +#endif + /// The webhook payload. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.HookDelivery_request_payload? Payload { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.HookDelivery_request_payload Payload { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public HookDelivery_request() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.HookDelivery_request CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.HookDelivery_request(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "headers", n => { Headers = n.GetObjectValue(global::Ayllu.Github.Client.Models.HookDelivery_request_headers.CreateFromDiscriminatorValue); } }, + { "payload", n => { Payload = n.GetObjectValue(global::Ayllu.Github.Client.Models.HookDelivery_request_payload.CreateFromDiscriminatorValue); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteObjectValue("headers", Headers); + writer.WriteObjectValue("payload", Payload); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/HookDelivery_request_headers.cs b/src/Ayllu.Github.Client/Github/Client/Models/HookDelivery_request_headers.cs new file mode 100644 index 0000000..6db710c --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/HookDelivery_request_headers.cs @@ -0,0 +1,56 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + /// + /// The request headers sent with the webhook delivery. + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class HookDelivery_request_headers : IAdditionalDataHolder, IParsable + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public HookDelivery_request_headers() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.HookDelivery_request_headers CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.HookDelivery_request_headers(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/HookDelivery_request_payload.cs b/src/Ayllu.Github.Client/Github/Client/Models/HookDelivery_request_payload.cs new file mode 100644 index 0000000..8fe1ca2 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/HookDelivery_request_payload.cs @@ -0,0 +1,56 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + /// + /// The webhook payload. + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class HookDelivery_request_payload : IAdditionalDataHolder, IParsable + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public HookDelivery_request_payload() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.HookDelivery_request_payload CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.HookDelivery_request_payload(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/HookDelivery_response.cs b/src/Ayllu.Github.Client/Github/Client/Models/HookDelivery_response.cs new file mode 100644 index 0000000..29ae2a5 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/HookDelivery_response.cs @@ -0,0 +1,75 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class HookDelivery_response : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The response headers received when the delivery was made. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.HookDelivery_response_headers? Headers { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.HookDelivery_response_headers Headers { get; set; } +#endif + /// The response payload received. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Payload { get; set; } +#nullable restore +#else + public string Payload { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public HookDelivery_response() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.HookDelivery_response CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.HookDelivery_response(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "headers", n => { Headers = n.GetObjectValue(global::Ayllu.Github.Client.Models.HookDelivery_response_headers.CreateFromDiscriminatorValue); } }, + { "payload", n => { Payload = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteObjectValue("headers", Headers); + writer.WriteStringValue("payload", Payload); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/HookDelivery_response_headers.cs b/src/Ayllu.Github.Client/Github/Client/Models/HookDelivery_response_headers.cs new file mode 100644 index 0000000..667eb35 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/HookDelivery_response_headers.cs @@ -0,0 +1,56 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + /// + /// The response headers received when the delivery was made. + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class HookDelivery_response_headers : IAdditionalDataHolder, IParsable + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public HookDelivery_response_headers() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.HookDelivery_response_headers CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.HookDelivery_response_headers(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/HookResponse.cs b/src/Ayllu.Github.Client/Github/Client/Models/HookResponse.cs new file mode 100644 index 0000000..97f14ba --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/HookResponse.cs @@ -0,0 +1,79 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class HookResponse : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The code property + public int? Code { get; set; } + /// The message property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Message { get; set; } +#nullable restore +#else + public string Message { get; set; } +#endif + /// The status property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Status { get; set; } +#nullable restore +#else + public string Status { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public HookResponse() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.HookResponse CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.HookResponse(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "code", n => { Code = n.GetIntValue(); } }, + { "message", n => { Message = n.GetStringValue(); } }, + { "status", n => { Status = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteIntValue("code", Code); + writer.WriteStringValue("message", Message); + writer.WriteStringValue("status", Status); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/Hovercard.cs b/src/Ayllu.Github.Client/Github/Client/Models/Hovercard.cs new file mode 100644 index 0000000..87d25d0 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/Hovercard.cs @@ -0,0 +1,66 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + /// + /// Hovercard + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class Hovercard : IAdditionalDataHolder, IParsable + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The contexts property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? Contexts { get; set; } +#nullable restore +#else + public List Contexts { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public Hovercard() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.Hovercard CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.Hovercard(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "contexts", n => { Contexts = n.GetCollectionOfObjectValues(global::Ayllu.Github.Client.Models.Hovercard_contexts.CreateFromDiscriminatorValue)?.AsList(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteCollectionOfObjectValues("contexts", Contexts); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/Hovercard_contexts.cs b/src/Ayllu.Github.Client/Github/Client/Models/Hovercard_contexts.cs new file mode 100644 index 0000000..2487aed --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/Hovercard_contexts.cs @@ -0,0 +1,75 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class Hovercard_contexts : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The message property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Message { get; set; } +#nullable restore +#else + public string Message { get; set; } +#endif + /// The octicon property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Octicon { get; set; } +#nullable restore +#else + public string Octicon { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public Hovercard_contexts() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.Hovercard_contexts CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.Hovercard_contexts(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "message", n => { Message = n.GetStringValue(); } }, + { "octicon", n => { Octicon = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("message", Message); + writer.WriteStringValue("octicon", Octicon); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/Import.cs b/src/Ayllu.Github.Client/Github/Client/Models/Import.cs new file mode 100644 index 0000000..52caa2d --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/Import.cs @@ -0,0 +1,232 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + /// + /// A repository import from an external source. + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class Import : IAdditionalDataHolder, IParsable + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The authors_count property + public int? AuthorsCount { get; set; } + /// The authors_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? AuthorsUrl { get; set; } +#nullable restore +#else + public string AuthorsUrl { get; set; } +#endif + /// The commit_count property + public int? CommitCount { get; set; } + /// The error_message property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? ErrorMessage { get; set; } +#nullable restore +#else + public string ErrorMessage { get; set; } +#endif + /// The failed_step property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? FailedStep { get; set; } +#nullable restore +#else + public string FailedStep { get; set; } +#endif + /// The has_large_files property + public bool? HasLargeFiles { get; set; } + /// The html_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? HtmlUrl { get; set; } +#nullable restore +#else + public string HtmlUrl { get; set; } +#endif + /// The import_percent property + public int? ImportPercent { get; set; } + /// The large_files_count property + public int? LargeFilesCount { get; set; } + /// The large_files_size property + public int? LargeFilesSize { get; set; } + /// The message property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Message { get; set; } +#nullable restore +#else + public string Message { get; set; } +#endif + /// The project_choices property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? ProjectChoices { get; set; } +#nullable restore +#else + public List ProjectChoices { get; set; } +#endif + /// The push_percent property + public int? PushPercent { get; set; } + /// The repository_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? RepositoryUrl { get; set; } +#nullable restore +#else + public string RepositoryUrl { get; set; } +#endif + /// The status property + public global::Ayllu.Github.Client.Models.Import_status? Status { get; set; } + /// The status_text property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? StatusText { get; set; } +#nullable restore +#else + public string StatusText { get; set; } +#endif + /// The svc_root property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? SvcRoot { get; set; } +#nullable restore +#else + public string SvcRoot { get; set; } +#endif + /// The svn_root property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? SvnRoot { get; set; } +#nullable restore +#else + public string SvnRoot { get; set; } +#endif + /// The tfvc_project property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? TfvcProject { get; set; } +#nullable restore +#else + public string TfvcProject { get; set; } +#endif + /// The url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Url { get; set; } +#nullable restore +#else + public string Url { get; set; } +#endif + /// The use_lfs property + public bool? UseLfs { get; set; } + /// The vcs property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Vcs { get; set; } +#nullable restore +#else + public string Vcs { get; set; } +#endif + /// The URL of the originating repository. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? VcsUrl { get; set; } +#nullable restore +#else + public string VcsUrl { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public Import() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.Import CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.Import(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "authors_count", n => { AuthorsCount = n.GetIntValue(); } }, + { "authors_url", n => { AuthorsUrl = n.GetStringValue(); } }, + { "commit_count", n => { CommitCount = n.GetIntValue(); } }, + { "error_message", n => { ErrorMessage = n.GetStringValue(); } }, + { "failed_step", n => { FailedStep = n.GetStringValue(); } }, + { "has_large_files", n => { HasLargeFiles = n.GetBoolValue(); } }, + { "html_url", n => { HtmlUrl = n.GetStringValue(); } }, + { "import_percent", n => { ImportPercent = n.GetIntValue(); } }, + { "large_files_count", n => { LargeFilesCount = n.GetIntValue(); } }, + { "large_files_size", n => { LargeFilesSize = n.GetIntValue(); } }, + { "message", n => { Message = n.GetStringValue(); } }, + { "project_choices", n => { ProjectChoices = n.GetCollectionOfObjectValues(global::Ayllu.Github.Client.Models.Import_project_choices.CreateFromDiscriminatorValue)?.AsList(); } }, + { "push_percent", n => { PushPercent = n.GetIntValue(); } }, + { "repository_url", n => { RepositoryUrl = n.GetStringValue(); } }, + { "status", n => { Status = n.GetEnumValue(); } }, + { "status_text", n => { StatusText = n.GetStringValue(); } }, + { "svc_root", n => { SvcRoot = n.GetStringValue(); } }, + { "svn_root", n => { SvnRoot = n.GetStringValue(); } }, + { "tfvc_project", n => { TfvcProject = n.GetStringValue(); } }, + { "url", n => { Url = n.GetStringValue(); } }, + { "use_lfs", n => { UseLfs = n.GetBoolValue(); } }, + { "vcs", n => { Vcs = n.GetStringValue(); } }, + { "vcs_url", n => { VcsUrl = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteIntValue("authors_count", AuthorsCount); + writer.WriteStringValue("authors_url", AuthorsUrl); + writer.WriteIntValue("commit_count", CommitCount); + writer.WriteStringValue("error_message", ErrorMessage); + writer.WriteStringValue("failed_step", FailedStep); + writer.WriteBoolValue("has_large_files", HasLargeFiles); + writer.WriteStringValue("html_url", HtmlUrl); + writer.WriteIntValue("import_percent", ImportPercent); + writer.WriteIntValue("large_files_count", LargeFilesCount); + writer.WriteIntValue("large_files_size", LargeFilesSize); + writer.WriteStringValue("message", Message); + writer.WriteCollectionOfObjectValues("project_choices", ProjectChoices); + writer.WriteIntValue("push_percent", PushPercent); + writer.WriteStringValue("repository_url", RepositoryUrl); + writer.WriteEnumValue("status", Status); + writer.WriteStringValue("status_text", StatusText); + writer.WriteStringValue("svc_root", SvcRoot); + writer.WriteStringValue("svn_root", SvnRoot); + writer.WriteStringValue("tfvc_project", TfvcProject); + writer.WriteStringValue("url", Url); + writer.WriteBoolValue("use_lfs", UseLfs); + writer.WriteStringValue("vcs", Vcs); + writer.WriteStringValue("vcs_url", VcsUrl); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/Import_project_choices.cs b/src/Ayllu.Github.Client/Github/Client/Models/Import_project_choices.cs new file mode 100644 index 0000000..3e70e45 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/Import_project_choices.cs @@ -0,0 +1,85 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class Import_project_choices : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The human_name property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? HumanName { get; set; } +#nullable restore +#else + public string HumanName { get; set; } +#endif + /// The tfvc_project property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? TfvcProject { get; set; } +#nullable restore +#else + public string TfvcProject { get; set; } +#endif + /// The vcs property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Vcs { get; set; } +#nullable restore +#else + public string Vcs { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public Import_project_choices() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.Import_project_choices CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.Import_project_choices(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "human_name", n => { HumanName = n.GetStringValue(); } }, + { "tfvc_project", n => { TfvcProject = n.GetStringValue(); } }, + { "vcs", n => { Vcs = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("human_name", HumanName); + writer.WriteStringValue("tfvc_project", TfvcProject); + writer.WriteStringValue("vcs", Vcs); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/Import_status.cs b/src/Ayllu.Github.Client/Github/Client/Models/Import_status.cs new file mode 100644 index 0000000..1aa65b2 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/Import_status.cs @@ -0,0 +1,76 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public enum Import_status + #pragma warning restore CS1591 + { + [EnumMember(Value = "auth")] + #pragma warning disable CS1591 + Auth, + #pragma warning restore CS1591 + [EnumMember(Value = "error")] + #pragma warning disable CS1591 + Error, + #pragma warning restore CS1591 + [EnumMember(Value = "none")] + #pragma warning disable CS1591 + None, + #pragma warning restore CS1591 + [EnumMember(Value = "detecting")] + #pragma warning disable CS1591 + Detecting, + #pragma warning restore CS1591 + [EnumMember(Value = "choose")] + #pragma warning disable CS1591 + Choose, + #pragma warning restore CS1591 + [EnumMember(Value = "auth_failed")] + #pragma warning disable CS1591 + Auth_failed, + #pragma warning restore CS1591 + [EnumMember(Value = "importing")] + #pragma warning disable CS1591 + Importing, + #pragma warning restore CS1591 + [EnumMember(Value = "mapping")] + #pragma warning disable CS1591 + Mapping, + #pragma warning restore CS1591 + [EnumMember(Value = "waiting_to_push")] + #pragma warning disable CS1591 + Waiting_to_push, + #pragma warning restore CS1591 + [EnumMember(Value = "pushing")] + #pragma warning disable CS1591 + Pushing, + #pragma warning restore CS1591 + [EnumMember(Value = "complete")] + #pragma warning disable CS1591 + Complete, + #pragma warning restore CS1591 + [EnumMember(Value = "setup")] + #pragma warning disable CS1591 + Setup, + #pragma warning restore CS1591 + [EnumMember(Value = "unknown")] + #pragma warning disable CS1591 + Unknown, + #pragma warning restore CS1591 + [EnumMember(Value = "detection_found_multiple")] + #pragma warning disable CS1591 + Detection_found_multiple, + #pragma warning restore CS1591 + [EnumMember(Value = "detection_found_nothing")] + #pragma warning disable CS1591 + Detection_found_nothing, + #pragma warning restore CS1591 + [EnumMember(Value = "detection_needs_auth")] + #pragma warning disable CS1591 + Detection_needs_auth, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Models/Installation.cs b/src/Ayllu.Github.Client/Github/Client/Models/Installation.cs new file mode 100644 index 0000000..6929536 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/Installation.cs @@ -0,0 +1,275 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + /// + /// Installation + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class Installation : IAdditionalDataHolder, IParsable + { + /// The access_tokens_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? AccessTokensUrl { get; set; } +#nullable restore +#else + public string AccessTokensUrl { get; set; } +#endif + /// The account property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.Installation.Installation_account? Account { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.Installation.Installation_account Account { get; set; } +#endif + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The app_id property + public int? AppId { get; set; } + /// The app_slug property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? AppSlug { get; set; } +#nullable restore +#else + public string AppSlug { get; set; } +#endif + /// The client_id property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? ClientId { get; set; } +#nullable restore +#else + public string ClientId { get; set; } +#endif + /// The contact_email property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? ContactEmail { get; set; } +#nullable restore +#else + public string ContactEmail { get; set; } +#endif + /// The created_at property + public DateTimeOffset? CreatedAt { get; set; } + /// The events property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? Events { get; set; } +#nullable restore +#else + public List Events { get; set; } +#endif + /// The has_multiple_single_files property + public bool? HasMultipleSingleFiles { get; set; } + /// The html_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? HtmlUrl { get; set; } +#nullable restore +#else + public string HtmlUrl { get; set; } +#endif + /// The ID of the installation. + public int? Id { get; set; } + /// The permissions granted to the user access token. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.AppPermissions? Permissions { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.AppPermissions Permissions { get; set; } +#endif + /// The repositories_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? RepositoriesUrl { get; set; } +#nullable restore +#else + public string RepositoriesUrl { get; set; } +#endif + /// Describe whether all repositories have been selected or there's a selection involved + public global::Ayllu.Github.Client.Models.Installation_repository_selection? RepositorySelection { get; set; } + /// The single_file_name property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? SingleFileName { get; set; } +#nullable restore +#else + public string SingleFileName { get; set; } +#endif + /// The single_file_paths property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? SingleFilePaths { get; set; } +#nullable restore +#else + public List SingleFilePaths { get; set; } +#endif + /// The suspended_at property + public DateTimeOffset? SuspendedAt { get; set; } + /// A GitHub user. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.NullableSimpleUser? SuspendedBy { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.NullableSimpleUser SuspendedBy { get; set; } +#endif + /// The ID of the user or organization this token is being scoped to. + public int? TargetId { get; set; } + /// The target_type property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? TargetType { get; set; } +#nullable restore +#else + public string TargetType { get; set; } +#endif + /// The updated_at property + public DateTimeOffset? UpdatedAt { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public Installation() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.Installation CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.Installation(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "access_tokens_url", n => { AccessTokensUrl = n.GetStringValue(); } }, + { "account", n => { Account = n.GetObjectValue(global::Ayllu.Github.Client.Models.Installation.Installation_account.CreateFromDiscriminatorValue); } }, + { "app_id", n => { AppId = n.GetIntValue(); } }, + { "app_slug", n => { AppSlug = n.GetStringValue(); } }, + { "client_id", n => { ClientId = n.GetStringValue(); } }, + { "contact_email", n => { ContactEmail = n.GetStringValue(); } }, + { "created_at", n => { CreatedAt = n.GetDateTimeOffsetValue(); } }, + { "events", n => { Events = n.GetCollectionOfPrimitiveValues()?.AsList(); } }, + { "has_multiple_single_files", n => { HasMultipleSingleFiles = n.GetBoolValue(); } }, + { "html_url", n => { HtmlUrl = n.GetStringValue(); } }, + { "id", n => { Id = n.GetIntValue(); } }, + { "permissions", n => { Permissions = n.GetObjectValue(global::Ayllu.Github.Client.Models.AppPermissions.CreateFromDiscriminatorValue); } }, + { "repositories_url", n => { RepositoriesUrl = n.GetStringValue(); } }, + { "repository_selection", n => { RepositorySelection = n.GetEnumValue(); } }, + { "single_file_name", n => { SingleFileName = n.GetStringValue(); } }, + { "single_file_paths", n => { SingleFilePaths = n.GetCollectionOfPrimitiveValues()?.AsList(); } }, + { "suspended_at", n => { SuspendedAt = n.GetDateTimeOffsetValue(); } }, + { "suspended_by", n => { SuspendedBy = n.GetObjectValue(global::Ayllu.Github.Client.Models.NullableSimpleUser.CreateFromDiscriminatorValue); } }, + { "target_id", n => { TargetId = n.GetIntValue(); } }, + { "target_type", n => { TargetType = n.GetStringValue(); } }, + { "updated_at", n => { UpdatedAt = n.GetDateTimeOffsetValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("access_tokens_url", AccessTokensUrl); + writer.WriteObjectValue("account", Account); + writer.WriteIntValue("app_id", AppId); + writer.WriteStringValue("app_slug", AppSlug); + writer.WriteStringValue("client_id", ClientId); + writer.WriteStringValue("contact_email", ContactEmail); + writer.WriteDateTimeOffsetValue("created_at", CreatedAt); + writer.WriteCollectionOfPrimitiveValues("events", Events); + writer.WriteBoolValue("has_multiple_single_files", HasMultipleSingleFiles); + writer.WriteStringValue("html_url", HtmlUrl); + writer.WriteIntValue("id", Id); + writer.WriteObjectValue("permissions", Permissions); + writer.WriteStringValue("repositories_url", RepositoriesUrl); + writer.WriteEnumValue("repository_selection", RepositorySelection); + writer.WriteStringValue("single_file_name", SingleFileName); + writer.WriteCollectionOfPrimitiveValues("single_file_paths", SingleFilePaths); + writer.WriteDateTimeOffsetValue("suspended_at", SuspendedAt); + writer.WriteObjectValue("suspended_by", SuspendedBy); + writer.WriteIntValue("target_id", TargetId); + writer.WriteStringValue("target_type", TargetType); + writer.WriteDateTimeOffsetValue("updated_at", UpdatedAt); + writer.WriteAdditionalData(AdditionalData); + } + /// + /// Composed type wrapper for classes , + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class Installation_account : IComposedTypeWrapper, IParsable + { + /// Composed type representation for type +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.Enterprise? Enterprise { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.Enterprise Enterprise { get; set; } +#endif + /// Composed type representation for type +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.SimpleUser? SimpleUser { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.SimpleUser SimpleUser { get; set; } +#endif + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.Installation.Installation_account CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + var result = new global::Ayllu.Github.Client.Models.Installation.Installation_account(); + result.Enterprise = new global::Ayllu.Github.Client.Models.Enterprise(); + result.SimpleUser = new global::Ayllu.Github.Client.Models.SimpleUser(); + return result; + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + if(Enterprise != null || SimpleUser != null) + { + return ParseNodeHelper.MergeDeserializersForIntersectionWrapper(Enterprise, SimpleUser); + } + return new Dictionary>(); + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteObjectValue(null, Enterprise, SimpleUser); + } + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/InstallationToken.cs b/src/Ayllu.Github.Client/Github/Client/Models/InstallationToken.cs new file mode 100644 index 0000000..a38a173 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/InstallationToken.cs @@ -0,0 +1,124 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + /// + /// Authentication token for a GitHub App installed on a user or org. + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class InstallationToken : IAdditionalDataHolder, IParsable + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The expires_at property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? ExpiresAt { get; set; } +#nullable restore +#else + public string ExpiresAt { get; set; } +#endif + /// The has_multiple_single_files property + public bool? HasMultipleSingleFiles { get; set; } + /// The permissions granted to the user access token. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.AppPermissions? Permissions { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.AppPermissions Permissions { get; set; } +#endif + /// The repositories property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? Repositories { get; set; } +#nullable restore +#else + public List Repositories { get; set; } +#endif + /// The repository_selection property + public global::Ayllu.Github.Client.Models.InstallationToken_repository_selection? RepositorySelection { get; set; } + /// The single_file property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? SingleFile { get; set; } +#nullable restore +#else + public string SingleFile { get; set; } +#endif + /// The single_file_paths property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? SingleFilePaths { get; set; } +#nullable restore +#else + public List SingleFilePaths { get; set; } +#endif + /// The token property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Token { get; set; } +#nullable restore +#else + public string Token { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public InstallationToken() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.InstallationToken CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.InstallationToken(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "expires_at", n => { ExpiresAt = n.GetStringValue(); } }, + { "has_multiple_single_files", n => { HasMultipleSingleFiles = n.GetBoolValue(); } }, + { "permissions", n => { Permissions = n.GetObjectValue(global::Ayllu.Github.Client.Models.AppPermissions.CreateFromDiscriminatorValue); } }, + { "repositories", n => { Repositories = n.GetCollectionOfObjectValues(global::Ayllu.Github.Client.Models.Repository.CreateFromDiscriminatorValue)?.AsList(); } }, + { "repository_selection", n => { RepositorySelection = n.GetEnumValue(); } }, + { "single_file", n => { SingleFile = n.GetStringValue(); } }, + { "single_file_paths", n => { SingleFilePaths = n.GetCollectionOfPrimitiveValues()?.AsList(); } }, + { "token", n => { Token = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("expires_at", ExpiresAt); + writer.WriteBoolValue("has_multiple_single_files", HasMultipleSingleFiles); + writer.WriteObjectValue("permissions", Permissions); + writer.WriteCollectionOfObjectValues("repositories", Repositories); + writer.WriteEnumValue("repository_selection", RepositorySelection); + writer.WriteStringValue("single_file", SingleFile); + writer.WriteCollectionOfPrimitiveValues("single_file_paths", SingleFilePaths); + writer.WriteStringValue("token", Token); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/InstallationToken_repository_selection.cs b/src/Ayllu.Github.Client/Github/Client/Models/InstallationToken_repository_selection.cs new file mode 100644 index 0000000..fa4cac8 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/InstallationToken_repository_selection.cs @@ -0,0 +1,20 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public enum InstallationToken_repository_selection + #pragma warning restore CS1591 + { + [EnumMember(Value = "all")] + #pragma warning disable CS1591 + All, + #pragma warning restore CS1591 + [EnumMember(Value = "selected")] + #pragma warning disable CS1591 + Selected, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Models/Installation_repository_selection.cs b/src/Ayllu.Github.Client/Github/Client/Models/Installation_repository_selection.cs new file mode 100644 index 0000000..87fa63e --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/Installation_repository_selection.cs @@ -0,0 +1,19 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Models +{ + /// Describe whether all repositories have been selected or there's a selection involved + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public enum Installation_repository_selection + { + [EnumMember(Value = "all")] + #pragma warning disable CS1591 + All, + #pragma warning restore CS1591 + [EnumMember(Value = "selected")] + #pragma warning disable CS1591 + Selected, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Models/Instances503Error.cs b/src/Ayllu.Github.Client/Github/Client/Models/Instances503Error.cs new file mode 100644 index 0000000..09978ab --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/Instances503Error.cs @@ -0,0 +1,88 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class Instances503Error : ApiException, IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The code property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Code { get; set; } +#nullable restore +#else + public string Code { get; set; } +#endif + /// The documentation_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? DocumentationUrl { get; set; } +#nullable restore +#else + public string DocumentationUrl { get; set; } +#endif + /// The primary error message. + public override string Message { get => MessageEscaped ?? string.Empty; } + /// The message property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? MessageEscaped { get; set; } +#nullable restore +#else + public string MessageEscaped { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public Instances503Error() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.Instances503Error CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.Instances503Error(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "code", n => { Code = n.GetStringValue(); } }, + { "documentation_url", n => { DocumentationUrl = n.GetStringValue(); } }, + { "message", n => { MessageEscaped = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("code", Code); + writer.WriteStringValue("documentation_url", DocumentationUrl); + writer.WriteStringValue("message", MessageEscaped); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/Integration.cs b/src/Ayllu.Github.Client/Github/Client/Models/Integration.cs new file mode 100644 index 0000000..67f9690 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/Integration.cs @@ -0,0 +1,247 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + /// + /// 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. + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class Integration : IAdditionalDataHolder, IParsable + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The client_id property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? ClientId { get; set; } +#nullable restore +#else + public string ClientId { get; set; } +#endif + /// The created_at property + public DateTimeOffset? CreatedAt { get; set; } + /// The description property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Description { get; set; } +#nullable restore +#else + public string Description { get; set; } +#endif + /// The list of events for the GitHub app. Note that the `installation_target`, `security_advisory`, and `meta` events are not included because they are global events and not specific to an installation. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? Events { get; set; } +#nullable restore +#else + public List Events { get; set; } +#endif + /// The external_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? ExternalUrl { get; set; } +#nullable restore +#else + public string ExternalUrl { get; set; } +#endif + /// The html_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? HtmlUrl { get; set; } +#nullable restore +#else + public string HtmlUrl { get; set; } +#endif + /// Unique identifier of the GitHub app + public int? Id { get; set; } + /// The number of installations associated with the GitHub app. Only returned when the integration is requesting details about itself. + public int? InstallationsCount { get; set; } + /// The name of the GitHub app +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Name { get; set; } +#nullable restore +#else + public string Name { get; set; } +#endif + /// The node_id property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? NodeId { get; set; } +#nullable restore +#else + public string NodeId { get; set; } +#endif + /// The owner property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.Integration.Integration_owner? Owner { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.Integration.Integration_owner Owner { get; set; } +#endif + /// The set of permissions for the GitHub app +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.Integration_permissions? Permissions { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.Integration_permissions Permissions { get; set; } +#endif + /// The slug name of the GitHub app +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Slug { get; set; } +#nullable restore +#else + public string Slug { get; set; } +#endif + /// The updated_at property + public DateTimeOffset? UpdatedAt { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public Integration() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.Integration CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.Integration(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "client_id", n => { ClientId = n.GetStringValue(); } }, + { "created_at", n => { CreatedAt = n.GetDateTimeOffsetValue(); } }, + { "description", n => { Description = n.GetStringValue(); } }, + { "events", n => { Events = n.GetCollectionOfPrimitiveValues()?.AsList(); } }, + { "external_url", n => { ExternalUrl = n.GetStringValue(); } }, + { "html_url", n => { HtmlUrl = n.GetStringValue(); } }, + { "id", n => { Id = n.GetIntValue(); } }, + { "installations_count", n => { InstallationsCount = n.GetIntValue(); } }, + { "name", n => { Name = n.GetStringValue(); } }, + { "node_id", n => { NodeId = n.GetStringValue(); } }, + { "owner", n => { Owner = n.GetObjectValue(global::Ayllu.Github.Client.Models.Integration.Integration_owner.CreateFromDiscriminatorValue); } }, + { "permissions", n => { Permissions = n.GetObjectValue(global::Ayllu.Github.Client.Models.Integration_permissions.CreateFromDiscriminatorValue); } }, + { "slug", n => { Slug = n.GetStringValue(); } }, + { "updated_at", n => { UpdatedAt = n.GetDateTimeOffsetValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("client_id", ClientId); + writer.WriteDateTimeOffsetValue("created_at", CreatedAt); + writer.WriteStringValue("description", Description); + writer.WriteCollectionOfPrimitiveValues("events", Events); + writer.WriteStringValue("external_url", ExternalUrl); + writer.WriteStringValue("html_url", HtmlUrl); + writer.WriteIntValue("id", Id); + writer.WriteIntValue("installations_count", InstallationsCount); + writer.WriteStringValue("name", Name); + writer.WriteStringValue("node_id", NodeId); + writer.WriteObjectValue("owner", Owner); + writer.WriteObjectValue("permissions", Permissions); + writer.WriteStringValue("slug", Slug); + writer.WriteDateTimeOffsetValue("updated_at", UpdatedAt); + writer.WriteAdditionalData(AdditionalData); + } + /// + /// Composed type wrapper for classes , + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class Integration_owner : IComposedTypeWrapper, IParsable + { + /// Composed type representation for type +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.Enterprise? Enterprise { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.Enterprise Enterprise { get; set; } +#endif + /// Composed type representation for type +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.SimpleUser? SimpleUser { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.SimpleUser SimpleUser { get; set; } +#endif + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.Integration.Integration_owner CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + var mappingValue = parseNode.GetChildNode("")?.GetStringValue(); + var result = new global::Ayllu.Github.Client.Models.Integration.Integration_owner(); + if("enterprise".Equals(mappingValue, StringComparison.OrdinalIgnoreCase)) + { + result.Enterprise = new global::Ayllu.Github.Client.Models.Enterprise(); + } + else if("simple-user".Equals(mappingValue, StringComparison.OrdinalIgnoreCase)) + { + result.SimpleUser = new global::Ayllu.Github.Client.Models.SimpleUser(); + } + return result; + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + if(Enterprise != null) + { + return Enterprise.GetFieldDeserializers(); + } + else if(SimpleUser != null) + { + return SimpleUser.GetFieldDeserializers(); + } + return new Dictionary>(); + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(Enterprise != null) + { + writer.WriteObjectValue(null, Enterprise); + } + else if(SimpleUser != null) + { + writer.WriteObjectValue(null, SimpleUser); + } + } + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/IntegrationInstallationRequest.cs b/src/Ayllu.Github.Client/Github/Client/Models/IntegrationInstallationRequest.cs new file mode 100644 index 0000000..2ba8dcc --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/IntegrationInstallationRequest.cs @@ -0,0 +1,151 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + /// + /// Request to install an integration on a target + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class IntegrationInstallationRequest : IAdditionalDataHolder, IParsable + { + /// The account property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.IntegrationInstallationRequest.IntegrationInstallationRequest_account? Account { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.IntegrationInstallationRequest.IntegrationInstallationRequest_account Account { get; set; } +#endif + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The created_at property + public DateTimeOffset? CreatedAt { get; set; } + /// Unique identifier of the request installation. + public int? Id { get; set; } + /// The node_id property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? NodeId { get; set; } +#nullable restore +#else + public string NodeId { get; set; } +#endif + /// A GitHub user. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.SimpleUser? Requester { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.SimpleUser Requester { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public IntegrationInstallationRequest() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.IntegrationInstallationRequest CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.IntegrationInstallationRequest(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "account", n => { Account = n.GetObjectValue(global::Ayllu.Github.Client.Models.IntegrationInstallationRequest.IntegrationInstallationRequest_account.CreateFromDiscriminatorValue); } }, + { "created_at", n => { CreatedAt = n.GetDateTimeOffsetValue(); } }, + { "id", n => { Id = n.GetIntValue(); } }, + { "node_id", n => { NodeId = n.GetStringValue(); } }, + { "requester", n => { Requester = n.GetObjectValue(global::Ayllu.Github.Client.Models.SimpleUser.CreateFromDiscriminatorValue); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteObjectValue("account", Account); + writer.WriteDateTimeOffsetValue("created_at", CreatedAt); + writer.WriteIntValue("id", Id); + writer.WriteStringValue("node_id", NodeId); + writer.WriteObjectValue("requester", Requester); + writer.WriteAdditionalData(AdditionalData); + } + /// + /// Composed type wrapper for classes , + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class IntegrationInstallationRequest_account : IComposedTypeWrapper, IParsable + { + /// Composed type representation for type +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.Enterprise? Enterprise { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.Enterprise Enterprise { get; set; } +#endif + /// Composed type representation for type +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.SimpleUser? SimpleUser { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.SimpleUser SimpleUser { get; set; } +#endif + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.IntegrationInstallationRequest.IntegrationInstallationRequest_account CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + var result = new global::Ayllu.Github.Client.Models.IntegrationInstallationRequest.IntegrationInstallationRequest_account(); + result.Enterprise = new global::Ayllu.Github.Client.Models.Enterprise(); + result.SimpleUser = new global::Ayllu.Github.Client.Models.SimpleUser(); + return result; + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + if(Enterprise != null || SimpleUser != null) + { + return ParseNodeHelper.MergeDeserializersForIntersectionWrapper(Enterprise, SimpleUser); + } + return new Dictionary>(); + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteObjectValue(null, Enterprise, SimpleUser); + } + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/Integration_permissions.cs b/src/Ayllu.Github.Client/Github/Client/Models/Integration_permissions.cs new file mode 100644 index 0000000..7218b74 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/Integration_permissions.cs @@ -0,0 +1,106 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + /// + /// The set of permissions for the GitHub app + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class Integration_permissions : IAdditionalDataHolder, IParsable + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The checks property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Checks { get; set; } +#nullable restore +#else + public string Checks { get; set; } +#endif + /// The contents property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Contents { get; set; } +#nullable restore +#else + public string Contents { get; set; } +#endif + /// The deployments property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Deployments { get; set; } +#nullable restore +#else + public string Deployments { get; set; } +#endif + /// The issues property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Issues { get; set; } +#nullable restore +#else + public string Issues { get; set; } +#endif + /// The metadata property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Metadata { get; set; } +#nullable restore +#else + public string Metadata { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public Integration_permissions() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.Integration_permissions CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.Integration_permissions(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "checks", n => { Checks = n.GetStringValue(); } }, + { "contents", n => { Contents = n.GetStringValue(); } }, + { "deployments", n => { Deployments = n.GetStringValue(); } }, + { "issues", n => { Issues = n.GetStringValue(); } }, + { "metadata", n => { Metadata = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("checks", Checks); + writer.WriteStringValue("contents", Contents); + writer.WriteStringValue("deployments", Deployments); + writer.WriteStringValue("issues", Issues); + writer.WriteStringValue("metadata", Metadata); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/InteractionExpiry.cs b/src/Ayllu.Github.Client/Github/Client/Models/InteractionExpiry.cs new file mode 100644 index 0000000..247b0f6 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/InteractionExpiry.cs @@ -0,0 +1,31 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Models +{ + /// The duration of the interaction restriction. Default: `one_day`. + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public enum InteractionExpiry + { + [EnumMember(Value = "one_day")] + #pragma warning disable CS1591 + One_day, + #pragma warning restore CS1591 + [EnumMember(Value = "three_days")] + #pragma warning disable CS1591 + Three_days, + #pragma warning restore CS1591 + [EnumMember(Value = "one_week")] + #pragma warning disable CS1591 + One_week, + #pragma warning restore CS1591 + [EnumMember(Value = "one_month")] + #pragma warning disable CS1591 + One_month, + #pragma warning restore CS1591 + [EnumMember(Value = "six_months")] + #pragma warning disable CS1591 + Six_months, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Models/InteractionGroup.cs b/src/Ayllu.Github.Client/Github/Client/Models/InteractionGroup.cs new file mode 100644 index 0000000..2dcc853 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/InteractionGroup.cs @@ -0,0 +1,23 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Models +{ + /// The type of GitHub user that can comment, open issues, or create pull requests while the interaction limit is in effect. + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public enum InteractionGroup + { + [EnumMember(Value = "existing_users")] + #pragma warning disable CS1591 + Existing_users, + #pragma warning restore CS1591 + [EnumMember(Value = "contributors_only")] + #pragma warning disable CS1591 + Contributors_only, + #pragma warning restore CS1591 + [EnumMember(Value = "collaborators_only")] + #pragma warning disable CS1591 + Collaborators_only, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Models/InteractionLimit.cs b/src/Ayllu.Github.Client/Github/Client/Models/InteractionLimit.cs new file mode 100644 index 0000000..9272923 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/InteractionLimit.cs @@ -0,0 +1,64 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + /// + /// Limit interactions to a specific type of user for a specified duration + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class InteractionLimit : IAdditionalDataHolder, IParsable + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The duration of the interaction restriction. Default: `one_day`. + public global::Ayllu.Github.Client.Models.InteractionExpiry? Expiry { get; set; } + /// The type of GitHub user that can comment, open issues, or create pull requests while the interaction limit is in effect. + public global::Ayllu.Github.Client.Models.InteractionGroup? Limit { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public InteractionLimit() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.InteractionLimit CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.InteractionLimit(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "expiry", n => { Expiry = n.GetEnumValue(); } }, + { "limit", n => { Limit = n.GetEnumValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteEnumValue("expiry", Expiry); + writer.WriteEnumValue("limit", Limit); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/InteractionLimitResponse.cs b/src/Ayllu.Github.Client/Github/Client/Models/InteractionLimitResponse.cs new file mode 100644 index 0000000..2b4c74f --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/InteractionLimitResponse.cs @@ -0,0 +1,74 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + /// + /// Interaction limit settings. + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class InteractionLimitResponse : IAdditionalDataHolder, IParsable + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The expires_at property + public DateTimeOffset? ExpiresAt { get; set; } + /// The type of GitHub user that can comment, open issues, or create pull requests while the interaction limit is in effect. + public global::Ayllu.Github.Client.Models.InteractionGroup? Limit { get; set; } + /// The origin property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Origin { get; set; } +#nullable restore +#else + public string Origin { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public InteractionLimitResponse() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.InteractionLimitResponse CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.InteractionLimitResponse(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "expires_at", n => { ExpiresAt = n.GetDateTimeOffsetValue(); } }, + { "limit", n => { Limit = n.GetEnumValue(); } }, + { "origin", n => { Origin = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteDateTimeOffsetValue("expires_at", ExpiresAt); + writer.WriteEnumValue("limit", Limit); + writer.WriteStringValue("origin", Origin); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/Issue.cs b/src/Ayllu.Github.Client/Github/Client/Models/Issue.cs new file mode 100644 index 0000000..fed56d7 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/Issue.cs @@ -0,0 +1,376 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + /// + /// Issues are a great way to keep track of tasks, enhancements, and bugs for your projects. + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class Issue : IAdditionalDataHolder, IParsable + { + /// The active_lock_reason property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? ActiveLockReason { get; set; } +#nullable restore +#else + public string ActiveLockReason { get; set; } +#endif + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// A GitHub user. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.NullableSimpleUser? Assignee { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.NullableSimpleUser Assignee { get; set; } +#endif + /// The assignees property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? Assignees { get; set; } +#nullable restore +#else + public List Assignees { get; set; } +#endif + /// How the author is associated with the repository. + public global::Ayllu.Github.Client.Models.AuthorAssociation? AuthorAssociation { get; set; } + /// Contents of the issue +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Body { get; set; } +#nullable restore +#else + public string Body { get; set; } +#endif + /// The body_html property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? BodyHtml { get; set; } +#nullable restore +#else + public string BodyHtml { get; set; } +#endif + /// The body_text property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? BodyText { get; set; } +#nullable restore +#else + public string BodyText { get; set; } +#endif + /// The closed_at property + public DateTimeOffset? ClosedAt { get; set; } + /// A GitHub user. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.NullableSimpleUser? ClosedBy { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.NullableSimpleUser ClosedBy { get; set; } +#endif + /// The comments property + public int? Comments { get; set; } + /// The comments_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? CommentsUrl { get; set; } +#nullable restore +#else + public string CommentsUrl { get; set; } +#endif + /// The created_at property + public DateTimeOffset? CreatedAt { get; set; } + /// The draft property + public bool? Draft { get; set; } + /// The events_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? EventsUrl { get; set; } +#nullable restore +#else + public string EventsUrl { get; set; } +#endif + /// The html_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? HtmlUrl { get; set; } +#nullable restore +#else + public string HtmlUrl { get; set; } +#endif + /// The id property + public long? Id { get; set; } + /// The issue_dependencies_summary property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.IssueDependenciesSummary? IssueDependenciesSummary { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.IssueDependenciesSummary IssueDependenciesSummary { get; set; } +#endif + /// The issue_field_values property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? IssueFieldValues { get; set; } +#nullable restore +#else + public List IssueFieldValues { get; set; } +#endif + /// 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 +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? Labels { get; set; } +#nullable restore +#else + public List Labels { get; set; } +#endif + /// The labels_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? LabelsUrl { get; set; } +#nullable restore +#else + public string LabelsUrl { get; set; } +#endif + /// The locked property + public bool? Locked { get; set; } + /// A collection of related issues and pull requests. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.NullableMilestone? Milestone { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.NullableMilestone Milestone { get; set; } +#endif + /// The node_id property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? NodeId { get; set; } +#nullable restore +#else + public string NodeId { get; set; } +#endif + /// Number uniquely identifying the issue within its repository + public int? Number { get; set; } + /// 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. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.NullableIntegration? PerformedViaGithubApp { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.NullableIntegration PerformedViaGithubApp { get; set; } +#endif + /// The pull_request property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.Issue_pull_request? PullRequest { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.Issue_pull_request PullRequest { get; set; } +#endif + /// The reactions property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.ReactionRollup? Reactions { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.ReactionRollup Reactions { get; set; } +#endif + /// A repository on GitHub. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.Repository? Repository { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.Repository Repository { get; set; } +#endif + /// The repository_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? RepositoryUrl { get; set; } +#nullable restore +#else + public string RepositoryUrl { get; set; } +#endif + /// State of the issue; either 'open' or 'closed' +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? State { get; set; } +#nullable restore +#else + public string State { get; set; } +#endif + /// The reason for the current state + public global::Ayllu.Github.Client.Models.Issue_state_reason? StateReason { get; set; } + /// The sub_issues_summary property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.SubIssuesSummary? SubIssuesSummary { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.SubIssuesSummary SubIssuesSummary { get; set; } +#endif + /// The timeline_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? TimelineUrl { get; set; } +#nullable restore +#else + public string TimelineUrl { get; set; } +#endif + /// Title of the issue +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Title { get; set; } +#nullable restore +#else + public string Title { get; set; } +#endif + /// The type of issue. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.IssueType? Type { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.IssueType Type { get; set; } +#endif + /// The updated_at property + public DateTimeOffset? UpdatedAt { get; set; } + /// URL for the issue +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Url { get; set; } +#nullable restore +#else + public string Url { get; set; } +#endif + /// A GitHub user. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.NullableSimpleUser? User { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.NullableSimpleUser User { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public Issue() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.Issue CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.Issue(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "active_lock_reason", n => { ActiveLockReason = n.GetStringValue(); } }, + { "assignee", n => { Assignee = n.GetObjectValue(global::Ayllu.Github.Client.Models.NullableSimpleUser.CreateFromDiscriminatorValue); } }, + { "assignees", n => { Assignees = n.GetCollectionOfObjectValues(global::Ayllu.Github.Client.Models.SimpleUser.CreateFromDiscriminatorValue)?.AsList(); } }, + { "author_association", n => { AuthorAssociation = n.GetEnumValue(); } }, + { "body", n => { Body = n.GetStringValue(); } }, + { "body_html", n => { BodyHtml = n.GetStringValue(); } }, + { "body_text", n => { BodyText = n.GetStringValue(); } }, + { "closed_at", n => { ClosedAt = n.GetDateTimeOffsetValue(); } }, + { "closed_by", n => { ClosedBy = n.GetObjectValue(global::Ayllu.Github.Client.Models.NullableSimpleUser.CreateFromDiscriminatorValue); } }, + { "comments", n => { Comments = n.GetIntValue(); } }, + { "comments_url", n => { CommentsUrl = n.GetStringValue(); } }, + { "created_at", n => { CreatedAt = n.GetDateTimeOffsetValue(); } }, + { "draft", n => { Draft = n.GetBoolValue(); } }, + { "events_url", n => { EventsUrl = n.GetStringValue(); } }, + { "html_url", n => { HtmlUrl = n.GetStringValue(); } }, + { "id", n => { Id = n.GetLongValue(); } }, + { "issue_dependencies_summary", n => { IssueDependenciesSummary = n.GetObjectValue(global::Ayllu.Github.Client.Models.IssueDependenciesSummary.CreateFromDiscriminatorValue); } }, + { "issue_field_values", n => { IssueFieldValues = n.GetCollectionOfObjectValues(global::Ayllu.Github.Client.Models.IssueFieldValue.CreateFromDiscriminatorValue)?.AsList(); } }, + { "labels", n => { Labels = n.GetCollectionOfPrimitiveValues()?.AsList(); } }, + { "labels_url", n => { LabelsUrl = n.GetStringValue(); } }, + { "locked", n => { Locked = n.GetBoolValue(); } }, + { "milestone", n => { Milestone = n.GetObjectValue(global::Ayllu.Github.Client.Models.NullableMilestone.CreateFromDiscriminatorValue); } }, + { "node_id", n => { NodeId = n.GetStringValue(); } }, + { "number", n => { Number = n.GetIntValue(); } }, + { "performed_via_github_app", n => { PerformedViaGithubApp = n.GetObjectValue(global::Ayllu.Github.Client.Models.NullableIntegration.CreateFromDiscriminatorValue); } }, + { "pull_request", n => { PullRequest = n.GetObjectValue(global::Ayllu.Github.Client.Models.Issue_pull_request.CreateFromDiscriminatorValue); } }, + { "reactions", n => { Reactions = n.GetObjectValue(global::Ayllu.Github.Client.Models.ReactionRollup.CreateFromDiscriminatorValue); } }, + { "repository", n => { Repository = n.GetObjectValue(global::Ayllu.Github.Client.Models.Repository.CreateFromDiscriminatorValue); } }, + { "repository_url", n => { RepositoryUrl = n.GetStringValue(); } }, + { "state", n => { State = n.GetStringValue(); } }, + { "state_reason", n => { StateReason = n.GetEnumValue(); } }, + { "sub_issues_summary", n => { SubIssuesSummary = n.GetObjectValue(global::Ayllu.Github.Client.Models.SubIssuesSummary.CreateFromDiscriminatorValue); } }, + { "timeline_url", n => { TimelineUrl = n.GetStringValue(); } }, + { "title", n => { Title = n.GetStringValue(); } }, + { "type", n => { Type = n.GetObjectValue(global::Ayllu.Github.Client.Models.IssueType.CreateFromDiscriminatorValue); } }, + { "updated_at", n => { UpdatedAt = n.GetDateTimeOffsetValue(); } }, + { "url", n => { Url = n.GetStringValue(); } }, + { "user", n => { User = n.GetObjectValue(global::Ayllu.Github.Client.Models.NullableSimpleUser.CreateFromDiscriminatorValue); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("active_lock_reason", ActiveLockReason); + writer.WriteObjectValue("assignee", Assignee); + writer.WriteCollectionOfObjectValues("assignees", Assignees); + writer.WriteEnumValue("author_association", AuthorAssociation); + writer.WriteStringValue("body", Body); + writer.WriteStringValue("body_html", BodyHtml); + writer.WriteStringValue("body_text", BodyText); + writer.WriteDateTimeOffsetValue("closed_at", ClosedAt); + writer.WriteObjectValue("closed_by", ClosedBy); + writer.WriteIntValue("comments", Comments); + writer.WriteStringValue("comments_url", CommentsUrl); + writer.WriteDateTimeOffsetValue("created_at", CreatedAt); + writer.WriteBoolValue("draft", Draft); + writer.WriteStringValue("events_url", EventsUrl); + writer.WriteStringValue("html_url", HtmlUrl); + writer.WriteLongValue("id", Id); + writer.WriteObjectValue("issue_dependencies_summary", IssueDependenciesSummary); + writer.WriteCollectionOfObjectValues("issue_field_values", IssueFieldValues); + writer.WriteCollectionOfPrimitiveValues("labels", Labels); + writer.WriteStringValue("labels_url", LabelsUrl); + writer.WriteBoolValue("locked", Locked); + writer.WriteObjectValue("milestone", Milestone); + writer.WriteStringValue("node_id", NodeId); + writer.WriteIntValue("number", Number); + writer.WriteObjectValue("performed_via_github_app", PerformedViaGithubApp); + writer.WriteObjectValue("pull_request", PullRequest); + writer.WriteObjectValue("reactions", Reactions); + writer.WriteObjectValue("repository", Repository); + writer.WriteStringValue("repository_url", RepositoryUrl); + writer.WriteStringValue("state", State); + writer.WriteEnumValue("state_reason", StateReason); + writer.WriteObjectValue("sub_issues_summary", SubIssuesSummary); + writer.WriteStringValue("timeline_url", TimelineUrl); + writer.WriteStringValue("title", Title); + writer.WriteObjectValue("type", Type); + writer.WriteDateTimeOffsetValue("updated_at", UpdatedAt); + writer.WriteStringValue("url", Url); + writer.WriteObjectValue("user", User); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/Issue503Error.cs b/src/Ayllu.Github.Client/Github/Client/Models/Issue503Error.cs new file mode 100644 index 0000000..44b0ebb --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/Issue503Error.cs @@ -0,0 +1,88 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class Issue503Error : ApiException, IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The code property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Code { get; set; } +#nullable restore +#else + public string Code { get; set; } +#endif + /// The documentation_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? DocumentationUrl { get; set; } +#nullable restore +#else + public string DocumentationUrl { get; set; } +#endif + /// The primary error message. + public override string Message { get => MessageEscaped ?? string.Empty; } + /// The message property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? MessageEscaped { get; set; } +#nullable restore +#else + public string MessageEscaped { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public Issue503Error() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.Issue503Error CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.Issue503Error(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "code", n => { Code = n.GetStringValue(); } }, + { "documentation_url", n => { DocumentationUrl = n.GetStringValue(); } }, + { "message", n => { MessageEscaped = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("code", Code); + writer.WriteStringValue("documentation_url", DocumentationUrl); + writer.WriteStringValue("message", MessageEscaped); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/IssueComment.cs b/src/Ayllu.Github.Client/Github/Client/Models/IssueComment.cs new file mode 100644 index 0000000..f041391 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/IssueComment.cs @@ -0,0 +1,172 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + /// + /// Comments provide a way for people to collaborate on an issue. + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class IssueComment : IAdditionalDataHolder, IParsable + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// How the author is associated with the repository. + public global::Ayllu.Github.Client.Models.AuthorAssociation? AuthorAssociation { get; set; } + /// Contents of the issue comment +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Body { get; set; } +#nullable restore +#else + public string Body { get; set; } +#endif + /// The body_html property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? BodyHtml { get; set; } +#nullable restore +#else + public string BodyHtml { get; set; } +#endif + /// The body_text property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? BodyText { get; set; } +#nullable restore +#else + public string BodyText { get; set; } +#endif + /// The created_at property + public DateTimeOffset? CreatedAt { get; set; } + /// The html_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? HtmlUrl { get; set; } +#nullable restore +#else + public string HtmlUrl { get; set; } +#endif + /// Unique identifier of the issue comment + public long? Id { get; set; } + /// The issue_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? IssueUrl { get; set; } +#nullable restore +#else + public string IssueUrl { get; set; } +#endif + /// The node_id property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? NodeId { get; set; } +#nullable restore +#else + public string NodeId { get; set; } +#endif + /// 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. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.NullableIntegration? PerformedViaGithubApp { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.NullableIntegration PerformedViaGithubApp { get; set; } +#endif + /// The reactions property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.ReactionRollup? Reactions { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.ReactionRollup Reactions { get; set; } +#endif + /// The updated_at property + public DateTimeOffset? UpdatedAt { get; set; } + /// URL for the issue comment +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Url { get; set; } +#nullable restore +#else + public string Url { get; set; } +#endif + /// A GitHub user. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.NullableSimpleUser? User { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.NullableSimpleUser User { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public IssueComment() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.IssueComment CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.IssueComment(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "author_association", n => { AuthorAssociation = n.GetEnumValue(); } }, + { "body", n => { Body = n.GetStringValue(); } }, + { "body_html", n => { BodyHtml = n.GetStringValue(); } }, + { "body_text", n => { BodyText = n.GetStringValue(); } }, + { "created_at", n => { CreatedAt = n.GetDateTimeOffsetValue(); } }, + { "html_url", n => { HtmlUrl = n.GetStringValue(); } }, + { "id", n => { Id = n.GetLongValue(); } }, + { "issue_url", n => { IssueUrl = n.GetStringValue(); } }, + { "node_id", n => { NodeId = n.GetStringValue(); } }, + { "performed_via_github_app", n => { PerformedViaGithubApp = n.GetObjectValue(global::Ayllu.Github.Client.Models.NullableIntegration.CreateFromDiscriminatorValue); } }, + { "reactions", n => { Reactions = n.GetObjectValue(global::Ayllu.Github.Client.Models.ReactionRollup.CreateFromDiscriminatorValue); } }, + { "updated_at", n => { UpdatedAt = n.GetDateTimeOffsetValue(); } }, + { "url", n => { Url = n.GetStringValue(); } }, + { "user", n => { User = n.GetObjectValue(global::Ayllu.Github.Client.Models.NullableSimpleUser.CreateFromDiscriminatorValue); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteEnumValue("author_association", AuthorAssociation); + writer.WriteStringValue("body", Body); + writer.WriteStringValue("body_html", BodyHtml); + writer.WriteStringValue("body_text", BodyText); + writer.WriteDateTimeOffsetValue("created_at", CreatedAt); + writer.WriteStringValue("html_url", HtmlUrl); + writer.WriteLongValue("id", Id); + writer.WriteStringValue("issue_url", IssueUrl); + writer.WriteStringValue("node_id", NodeId); + writer.WriteObjectValue("performed_via_github_app", PerformedViaGithubApp); + writer.WriteObjectValue("reactions", Reactions); + writer.WriteDateTimeOffsetValue("updated_at", UpdatedAt); + writer.WriteStringValue("url", Url); + writer.WriteObjectValue("user", User); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/IssueDependenciesSummary.cs b/src/Ayllu.Github.Client/Github/Client/Models/IssueDependenciesSummary.cs new file mode 100644 index 0000000..bbd9fd0 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/IssueDependenciesSummary.cs @@ -0,0 +1,71 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class IssueDependenciesSummary : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The blocked_by property + public int? BlockedBy { get; set; } + /// The blocking property + public int? Blocking { get; set; } + /// The total_blocked_by property + public int? TotalBlockedBy { get; set; } + /// The total_blocking property + public int? TotalBlocking { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public IssueDependenciesSummary() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.IssueDependenciesSummary CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.IssueDependenciesSummary(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "blocked_by", n => { BlockedBy = n.GetIntValue(); } }, + { "blocking", n => { Blocking = n.GetIntValue(); } }, + { "total_blocked_by", n => { TotalBlockedBy = n.GetIntValue(); } }, + { "total_blocking", n => { TotalBlocking = n.GetIntValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteIntValue("blocked_by", BlockedBy); + writer.WriteIntValue("blocking", Blocking); + writer.WriteIntValue("total_blocked_by", TotalBlockedBy); + writer.WriteIntValue("total_blocking", TotalBlocking); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/IssueEvent.cs b/src/Ayllu.Github.Client/Github/Client/Models/IssueEvent.cs new file mode 100644 index 0000000..b5bb562 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/IssueEvent.cs @@ -0,0 +1,258 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + /// + /// Issue Event + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class IssueEvent : IAdditionalDataHolder, IParsable + { + /// A GitHub user. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.NullableSimpleUser? Actor { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.NullableSimpleUser Actor { get; set; } +#endif + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// A GitHub user. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.NullableSimpleUser? Assignee { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.NullableSimpleUser Assignee { get; set; } +#endif + /// A GitHub user. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.NullableSimpleUser? Assigner { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.NullableSimpleUser Assigner { get; set; } +#endif + /// How the author is associated with the repository. + public global::Ayllu.Github.Client.Models.AuthorAssociation? AuthorAssociation { get; set; } + /// The commit_id property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? CommitId { get; set; } +#nullable restore +#else + public string CommitId { get; set; } +#endif + /// The commit_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? CommitUrl { get; set; } +#nullable restore +#else + public string CommitUrl { get; set; } +#endif + /// The created_at property + public DateTimeOffset? CreatedAt { get; set; } + /// The dismissed_review property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.IssueEventDismissedReview? DismissedReview { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.IssueEventDismissedReview DismissedReview { get; set; } +#endif + /// The event property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Event { get; set; } +#nullable restore +#else + public string Event { get; set; } +#endif + /// The id property + public long? Id { get; set; } + /// Issues are a great way to keep track of tasks, enhancements, and bugs for your projects. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.NullableIssue? Issue { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.NullableIssue Issue { get; set; } +#endif + /// Issue Event Label +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.IssueEventLabel? Label { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.IssueEventLabel Label { get; set; } +#endif + /// The lock_reason property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? LockReason { get; set; } +#nullable restore +#else + public string LockReason { get; set; } +#endif + /// Issue Event Milestone +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.IssueEventMilestone? Milestone { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.IssueEventMilestone Milestone { get; set; } +#endif + /// The node_id property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? NodeId { get; set; } +#nullable restore +#else + public string NodeId { get; set; } +#endif + /// 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. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.NullableIntegration? PerformedViaGithubApp { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.NullableIntegration PerformedViaGithubApp { get; set; } +#endif + /// Issue Event Project Card +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.IssueEventProjectCard? ProjectCard { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.IssueEventProjectCard ProjectCard { get; set; } +#endif + /// Issue Event Rename +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.IssueEventRename? Rename { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.IssueEventRename Rename { get; set; } +#endif + /// A GitHub user. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.NullableSimpleUser? RequestedReviewer { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.NullableSimpleUser RequestedReviewer { get; set; } +#endif + /// Groups of organization members that gives permissions on specified repositories. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.Team? RequestedTeam { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.Team RequestedTeam { get; set; } +#endif + /// A GitHub user. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.NullableSimpleUser? ReviewRequester { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.NullableSimpleUser ReviewRequester { get; set; } +#endif + /// The url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Url { get; set; } +#nullable restore +#else + public string Url { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public IssueEvent() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.IssueEvent CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.IssueEvent(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "actor", n => { Actor = n.GetObjectValue(global::Ayllu.Github.Client.Models.NullableSimpleUser.CreateFromDiscriminatorValue); } }, + { "assignee", n => { Assignee = n.GetObjectValue(global::Ayllu.Github.Client.Models.NullableSimpleUser.CreateFromDiscriminatorValue); } }, + { "assigner", n => { Assigner = n.GetObjectValue(global::Ayllu.Github.Client.Models.NullableSimpleUser.CreateFromDiscriminatorValue); } }, + { "author_association", n => { AuthorAssociation = n.GetEnumValue(); } }, + { "commit_id", n => { CommitId = n.GetStringValue(); } }, + { "commit_url", n => { CommitUrl = n.GetStringValue(); } }, + { "created_at", n => { CreatedAt = n.GetDateTimeOffsetValue(); } }, + { "dismissed_review", n => { DismissedReview = n.GetObjectValue(global::Ayllu.Github.Client.Models.IssueEventDismissedReview.CreateFromDiscriminatorValue); } }, + { "event", n => { Event = n.GetStringValue(); } }, + { "id", n => { Id = n.GetLongValue(); } }, + { "issue", n => { Issue = n.GetObjectValue(global::Ayllu.Github.Client.Models.NullableIssue.CreateFromDiscriminatorValue); } }, + { "label", n => { Label = n.GetObjectValue(global::Ayllu.Github.Client.Models.IssueEventLabel.CreateFromDiscriminatorValue); } }, + { "lock_reason", n => { LockReason = n.GetStringValue(); } }, + { "milestone", n => { Milestone = n.GetObjectValue(global::Ayllu.Github.Client.Models.IssueEventMilestone.CreateFromDiscriminatorValue); } }, + { "node_id", n => { NodeId = n.GetStringValue(); } }, + { "performed_via_github_app", n => { PerformedViaGithubApp = n.GetObjectValue(global::Ayllu.Github.Client.Models.NullableIntegration.CreateFromDiscriminatorValue); } }, + { "project_card", n => { ProjectCard = n.GetObjectValue(global::Ayllu.Github.Client.Models.IssueEventProjectCard.CreateFromDiscriminatorValue); } }, + { "rename", n => { Rename = n.GetObjectValue(global::Ayllu.Github.Client.Models.IssueEventRename.CreateFromDiscriminatorValue); } }, + { "requested_reviewer", n => { RequestedReviewer = n.GetObjectValue(global::Ayllu.Github.Client.Models.NullableSimpleUser.CreateFromDiscriminatorValue); } }, + { "requested_team", n => { RequestedTeam = n.GetObjectValue(global::Ayllu.Github.Client.Models.Team.CreateFromDiscriminatorValue); } }, + { "review_requester", n => { ReviewRequester = n.GetObjectValue(global::Ayllu.Github.Client.Models.NullableSimpleUser.CreateFromDiscriminatorValue); } }, + { "url", n => { Url = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteObjectValue("actor", Actor); + writer.WriteObjectValue("assignee", Assignee); + writer.WriteObjectValue("assigner", Assigner); + writer.WriteEnumValue("author_association", AuthorAssociation); + writer.WriteStringValue("commit_id", CommitId); + writer.WriteStringValue("commit_url", CommitUrl); + writer.WriteDateTimeOffsetValue("created_at", CreatedAt); + writer.WriteObjectValue("dismissed_review", DismissedReview); + writer.WriteStringValue("event", Event); + writer.WriteLongValue("id", Id); + writer.WriteObjectValue("issue", Issue); + writer.WriteObjectValue("label", Label); + writer.WriteStringValue("lock_reason", LockReason); + writer.WriteObjectValue("milestone", Milestone); + writer.WriteStringValue("node_id", NodeId); + writer.WriteObjectValue("performed_via_github_app", PerformedViaGithubApp); + writer.WriteObjectValue("project_card", ProjectCard); + writer.WriteObjectValue("rename", Rename); + writer.WriteObjectValue("requested_reviewer", RequestedReviewer); + writer.WriteObjectValue("requested_team", RequestedTeam); + writer.WriteObjectValue("review_requester", ReviewRequester); + writer.WriteStringValue("url", Url); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/IssueEventDismissedReview.cs b/src/Ayllu.Github.Client/Github/Client/Models/IssueEventDismissedReview.cs new file mode 100644 index 0000000..02c39ae --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/IssueEventDismissedReview.cs @@ -0,0 +1,89 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class IssueEventDismissedReview : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The dismissal_commit_id property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? DismissalCommitId { get; set; } +#nullable restore +#else + public string DismissalCommitId { get; set; } +#endif + /// The dismissal_message property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? DismissalMessage { get; set; } +#nullable restore +#else + public string DismissalMessage { get; set; } +#endif + /// The review_id property + public int? ReviewId { get; set; } + /// The state property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? State { get; set; } +#nullable restore +#else + public string State { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public IssueEventDismissedReview() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.IssueEventDismissedReview CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.IssueEventDismissedReview(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "dismissal_commit_id", n => { DismissalCommitId = n.GetStringValue(); } }, + { "dismissal_message", n => { DismissalMessage = n.GetStringValue(); } }, + { "review_id", n => { ReviewId = n.GetIntValue(); } }, + { "state", n => { State = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("dismissal_commit_id", DismissalCommitId); + writer.WriteStringValue("dismissal_message", DismissalMessage); + writer.WriteIntValue("review_id", ReviewId); + writer.WriteStringValue("state", State); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/IssueEventForIssue.cs b/src/Ayllu.Github.Client/Github/Client/Models/IssueEventForIssue.cs new file mode 100644 index 0000000..8fc5805 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/IssueEventForIssue.cs @@ -0,0 +1,185 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + /// + /// Composed type wrapper for classes , , , , , , , , , , , , , , + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class IssueEventForIssue : IComposedTypeWrapper, IParsable + { + /// Composed type representation for type +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.AddedToProjectIssueEvent? AddedToProjectIssueEvent { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.AddedToProjectIssueEvent AddedToProjectIssueEvent { get; set; } +#endif + /// Composed type representation for type +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.AssignedIssueEvent? AssignedIssueEvent { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.AssignedIssueEvent AssignedIssueEvent { get; set; } +#endif + /// Composed type representation for type +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.ConvertedNoteToIssueIssueEvent? ConvertedNoteToIssueIssueEvent { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.ConvertedNoteToIssueIssueEvent ConvertedNoteToIssueIssueEvent { get; set; } +#endif + /// Composed type representation for type +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.DemilestonedIssueEvent? DemilestonedIssueEvent { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.DemilestonedIssueEvent DemilestonedIssueEvent { get; set; } +#endif + /// Composed type representation for type +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.LabeledIssueEvent? LabeledIssueEvent { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.LabeledIssueEvent LabeledIssueEvent { get; set; } +#endif + /// Composed type representation for type +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.LockedIssueEvent? LockedIssueEvent { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.LockedIssueEvent LockedIssueEvent { get; set; } +#endif + /// Composed type representation for type +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.MilestonedIssueEvent? MilestonedIssueEvent { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.MilestonedIssueEvent MilestonedIssueEvent { get; set; } +#endif + /// Composed type representation for type +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.MovedColumnInProjectIssueEvent? MovedColumnInProjectIssueEvent { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.MovedColumnInProjectIssueEvent MovedColumnInProjectIssueEvent { get; set; } +#endif + /// Composed type representation for type +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.RemovedFromProjectIssueEvent? RemovedFromProjectIssueEvent { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.RemovedFromProjectIssueEvent RemovedFromProjectIssueEvent { get; set; } +#endif + /// Composed type representation for type +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.RenamedIssueEvent? RenamedIssueEvent { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.RenamedIssueEvent RenamedIssueEvent { get; set; } +#endif + /// Composed type representation for type +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.ReviewDismissedIssueEvent? ReviewDismissedIssueEvent { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.ReviewDismissedIssueEvent ReviewDismissedIssueEvent { get; set; } +#endif + /// Composed type representation for type +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.ReviewRequestedIssueEvent? ReviewRequestedIssueEvent { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.ReviewRequestedIssueEvent ReviewRequestedIssueEvent { get; set; } +#endif + /// Composed type representation for type +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.ReviewRequestRemovedIssueEvent? ReviewRequestRemovedIssueEvent { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.ReviewRequestRemovedIssueEvent ReviewRequestRemovedIssueEvent { get; set; } +#endif + /// Composed type representation for type +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.UnassignedIssueEvent? UnassignedIssueEvent { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.UnassignedIssueEvent UnassignedIssueEvent { get; set; } +#endif + /// Composed type representation for type +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.UnlabeledIssueEvent? UnlabeledIssueEvent { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.UnlabeledIssueEvent UnlabeledIssueEvent { get; set; } +#endif + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.IssueEventForIssue CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + var result = new global::Ayllu.Github.Client.Models.IssueEventForIssue(); + result.AddedToProjectIssueEvent = new global::Ayllu.Github.Client.Models.AddedToProjectIssueEvent(); + result.AssignedIssueEvent = new global::Ayllu.Github.Client.Models.AssignedIssueEvent(); + result.ConvertedNoteToIssueIssueEvent = new global::Ayllu.Github.Client.Models.ConvertedNoteToIssueIssueEvent(); + result.DemilestonedIssueEvent = new global::Ayllu.Github.Client.Models.DemilestonedIssueEvent(); + result.LabeledIssueEvent = new global::Ayllu.Github.Client.Models.LabeledIssueEvent(); + result.LockedIssueEvent = new global::Ayllu.Github.Client.Models.LockedIssueEvent(); + result.MilestonedIssueEvent = new global::Ayllu.Github.Client.Models.MilestonedIssueEvent(); + result.MovedColumnInProjectIssueEvent = new global::Ayllu.Github.Client.Models.MovedColumnInProjectIssueEvent(); + result.RemovedFromProjectIssueEvent = new global::Ayllu.Github.Client.Models.RemovedFromProjectIssueEvent(); + result.RenamedIssueEvent = new global::Ayllu.Github.Client.Models.RenamedIssueEvent(); + result.ReviewDismissedIssueEvent = new global::Ayllu.Github.Client.Models.ReviewDismissedIssueEvent(); + result.ReviewRequestedIssueEvent = new global::Ayllu.Github.Client.Models.ReviewRequestedIssueEvent(); + result.ReviewRequestRemovedIssueEvent = new global::Ayllu.Github.Client.Models.ReviewRequestRemovedIssueEvent(); + result.UnassignedIssueEvent = new global::Ayllu.Github.Client.Models.UnassignedIssueEvent(); + result.UnlabeledIssueEvent = new global::Ayllu.Github.Client.Models.UnlabeledIssueEvent(); + return result; + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + if(AddedToProjectIssueEvent != null || AssignedIssueEvent != null || ConvertedNoteToIssueIssueEvent != null || DemilestonedIssueEvent != null || LabeledIssueEvent != null || LockedIssueEvent != null || MilestonedIssueEvent != null || MovedColumnInProjectIssueEvent != null || RemovedFromProjectIssueEvent != null || RenamedIssueEvent != null || ReviewDismissedIssueEvent != null || ReviewRequestedIssueEvent != null || ReviewRequestRemovedIssueEvent != null || UnassignedIssueEvent != null || UnlabeledIssueEvent != null) + { + return ParseNodeHelper.MergeDeserializersForIntersectionWrapper(AddedToProjectIssueEvent, AssignedIssueEvent, ConvertedNoteToIssueIssueEvent, DemilestonedIssueEvent, LabeledIssueEvent, LockedIssueEvent, MilestonedIssueEvent, MovedColumnInProjectIssueEvent, RemovedFromProjectIssueEvent, RenamedIssueEvent, ReviewDismissedIssueEvent, ReviewRequestedIssueEvent, ReviewRequestRemovedIssueEvent, UnassignedIssueEvent, UnlabeledIssueEvent); + } + return new Dictionary>(); + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteObjectValue(null, AddedToProjectIssueEvent, AssignedIssueEvent, ConvertedNoteToIssueIssueEvent, DemilestonedIssueEvent, LabeledIssueEvent, LockedIssueEvent, MilestonedIssueEvent, MovedColumnInProjectIssueEvent, RemovedFromProjectIssueEvent, RenamedIssueEvent, ReviewDismissedIssueEvent, ReviewRequestedIssueEvent, ReviewRequestRemovedIssueEvent, UnassignedIssueEvent, UnlabeledIssueEvent); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/IssueEventLabel.cs b/src/Ayllu.Github.Client/Github/Client/Models/IssueEventLabel.cs new file mode 100644 index 0000000..82c7941 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/IssueEventLabel.cs @@ -0,0 +1,76 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + /// + /// Issue Event Label + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class IssueEventLabel : IAdditionalDataHolder, IParsable + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The color property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Color { get; set; } +#nullable restore +#else + public string Color { get; set; } +#endif + /// The name property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Name { get; set; } +#nullable restore +#else + public string Name { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public IssueEventLabel() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.IssueEventLabel CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.IssueEventLabel(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "color", n => { Color = n.GetStringValue(); } }, + { "name", n => { Name = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("color", Color); + writer.WriteStringValue("name", Name); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/IssueEventMilestone.cs b/src/Ayllu.Github.Client/Github/Client/Models/IssueEventMilestone.cs new file mode 100644 index 0000000..690887e --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/IssueEventMilestone.cs @@ -0,0 +1,66 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + /// + /// Issue Event Milestone + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class IssueEventMilestone : IAdditionalDataHolder, IParsable + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The title property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Title { get; set; } +#nullable restore +#else + public string Title { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public IssueEventMilestone() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.IssueEventMilestone CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.IssueEventMilestone(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "title", n => { Title = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("title", Title); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/IssueEventProjectCard.cs b/src/Ayllu.Github.Client/Github/Client/Models/IssueEventProjectCard.cs new file mode 100644 index 0000000..9e65540 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/IssueEventProjectCard.cs @@ -0,0 +1,104 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + /// + /// Issue Event Project Card + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class IssueEventProjectCard : IAdditionalDataHolder, IParsable + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The column_name property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? ColumnName { get; set; } +#nullable restore +#else + public string ColumnName { get; set; } +#endif + /// The id property + public int? Id { get; set; } + /// The previous_column_name property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? PreviousColumnName { get; set; } +#nullable restore +#else + public string PreviousColumnName { get; set; } +#endif + /// The project_id property + public int? ProjectId { get; set; } + /// The project_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? ProjectUrl { get; set; } +#nullable restore +#else + public string ProjectUrl { get; set; } +#endif + /// The url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Url { get; set; } +#nullable restore +#else + public string Url { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public IssueEventProjectCard() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.IssueEventProjectCard CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.IssueEventProjectCard(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "column_name", n => { ColumnName = n.GetStringValue(); } }, + { "id", n => { Id = n.GetIntValue(); } }, + { "previous_column_name", n => { PreviousColumnName = n.GetStringValue(); } }, + { "project_id", n => { ProjectId = n.GetIntValue(); } }, + { "project_url", n => { ProjectUrl = n.GetStringValue(); } }, + { "url", n => { Url = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("column_name", ColumnName); + writer.WriteIntValue("id", Id); + writer.WriteStringValue("previous_column_name", PreviousColumnName); + writer.WriteIntValue("project_id", ProjectId); + writer.WriteStringValue("project_url", ProjectUrl); + writer.WriteStringValue("url", Url); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/IssueEventRename.cs b/src/Ayllu.Github.Client/Github/Client/Models/IssueEventRename.cs new file mode 100644 index 0000000..b4cab53 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/IssueEventRename.cs @@ -0,0 +1,76 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + /// + /// Issue Event Rename + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class IssueEventRename : IAdditionalDataHolder, IParsable + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The from property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? From { get; set; } +#nullable restore +#else + public string From { get; set; } +#endif + /// The to property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? To { get; set; } +#nullable restore +#else + public string To { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public IssueEventRename() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.IssueEventRename CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.IssueEventRename(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "from", n => { From = n.GetStringValue(); } }, + { "to", n => { To = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("from", From); + writer.WriteStringValue("to", To); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/IssueFieldValue.cs b/src/Ayllu.Github.Client/Github/Client/Models/IssueFieldValue.cs new file mode 100644 index 0000000..e833f8b --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/IssueFieldValue.cs @@ -0,0 +1,164 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + /// + /// A value assigned to an issue field + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class IssueFieldValue : IAdditionalDataHolder, IParsable + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The data type of the issue field + public global::Ayllu.Github.Client.Models.IssueFieldValue_data_type? DataType { get; set; } + /// Unique identifier for the issue field. + public long? IssueFieldId { get; set; } + /// The node_id property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? NodeId { get; set; } +#nullable restore +#else + public string NodeId { get; set; } +#endif + /// Details about the selected option (only present for single_select fields) +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.IssueFieldValue_single_select_option? SingleSelectOption { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.IssueFieldValue_single_select_option SingleSelectOption { get; set; } +#endif + /// The value of the issue field +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.IssueFieldValue.IssueFieldValue_value? Value { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.IssueFieldValue.IssueFieldValue_value Value { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public IssueFieldValue() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.IssueFieldValue CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.IssueFieldValue(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "data_type", n => { DataType = n.GetEnumValue(); } }, + { "issue_field_id", n => { IssueFieldId = n.GetLongValue(); } }, + { "node_id", n => { NodeId = n.GetStringValue(); } }, + { "single_select_option", n => { SingleSelectOption = n.GetObjectValue(global::Ayllu.Github.Client.Models.IssueFieldValue_single_select_option.CreateFromDiscriminatorValue); } }, + { "value", n => { Value = n.GetObjectValue(global::Ayllu.Github.Client.Models.IssueFieldValue.IssueFieldValue_value.CreateFromDiscriminatorValue); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteEnumValue("data_type", DataType); + writer.WriteLongValue("issue_field_id", IssueFieldId); + writer.WriteStringValue("node_id", NodeId); + writer.WriteObjectValue("single_select_option", SingleSelectOption); + writer.WriteObjectValue("value", Value); + writer.WriteAdditionalData(AdditionalData); + } + /// + /// Composed type wrapper for classes , , + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class IssueFieldValue_value : IComposedTypeWrapper, IParsable + { + /// Composed type representation for type + public double? Double { get; set; } + /// Composed type representation for type + public int? Integer { get; set; } + /// Composed type representation for type +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? String { get; set; } +#nullable restore +#else + public string String { get; set; } +#endif + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.IssueFieldValue.IssueFieldValue_value CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + var result = new global::Ayllu.Github.Client.Models.IssueFieldValue.IssueFieldValue_value(); + if(parseNode.GetDoubleValue() is double doubleValue) + { + result.Double = doubleValue; + } + else if(parseNode.GetIntValue() is int integerValue) + { + result.Integer = integerValue; + } + else if(parseNode.GetStringValue() is string stringValue) + { + result.String = stringValue; + } + return result; + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary>(); + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(Double != null) + { + writer.WriteDoubleValue(null, Double); + } + else if(Integer != null) + { + writer.WriteIntValue(null, Integer); + } + else if(String != null) + { + writer.WriteStringValue(null, String); + } + } + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/IssueFieldValue_data_type.cs b/src/Ayllu.Github.Client/Github/Client/Models/IssueFieldValue_data_type.cs new file mode 100644 index 0000000..70456e7 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/IssueFieldValue_data_type.cs @@ -0,0 +1,27 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Models +{ + /// The data type of the issue field + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public enum IssueFieldValue_data_type + { + [EnumMember(Value = "text")] + #pragma warning disable CS1591 + Text, + #pragma warning restore CS1591 + [EnumMember(Value = "single_select")] + #pragma warning disable CS1591 + Single_select, + #pragma warning restore CS1591 + [EnumMember(Value = "number")] + #pragma warning disable CS1591 + Number, + #pragma warning restore CS1591 + [EnumMember(Value = "date")] + #pragma warning disable CS1591 + Date, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Models/IssueFieldValue_single_select_option.cs b/src/Ayllu.Github.Client/Github/Client/Models/IssueFieldValue_single_select_option.cs new file mode 100644 index 0000000..e73c08d --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/IssueFieldValue_single_select_option.cs @@ -0,0 +1,80 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + /// + /// Details about the selected option (only present for single_select fields) + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class IssueFieldValue_single_select_option : IAdditionalDataHolder, IParsable + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The color of the option +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Color { get; set; } +#nullable restore +#else + public string Color { get; set; } +#endif + /// Unique identifier for the option. + public long? Id { get; set; } + /// The name of the option +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Name { get; set; } +#nullable restore +#else + public string Name { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public IssueFieldValue_single_select_option() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.IssueFieldValue_single_select_option CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.IssueFieldValue_single_select_option(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "color", n => { Color = n.GetStringValue(); } }, + { "id", n => { Id = n.GetLongValue(); } }, + { "name", n => { Name = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("color", Color); + writer.WriteLongValue("id", Id); + writer.WriteStringValue("name", Name); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/IssueSearchResultItem.cs b/src/Ayllu.Github.Client/Github/Client/Models/IssueSearchResultItem.cs new file mode 100644 index 0000000..5136a22 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/IssueSearchResultItem.cs @@ -0,0 +1,386 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + /// + /// Issue Search Result Item + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class IssueSearchResultItem : IAdditionalDataHolder, IParsable + { + /// The active_lock_reason property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? ActiveLockReason { get; set; } +#nullable restore +#else + public string ActiveLockReason { get; set; } +#endif + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// A GitHub user. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.NullableSimpleUser? Assignee { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.NullableSimpleUser Assignee { get; set; } +#endif + /// The assignees property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? Assignees { get; set; } +#nullable restore +#else + public List Assignees { get; set; } +#endif + /// How the author is associated with the repository. + public global::Ayllu.Github.Client.Models.AuthorAssociation? AuthorAssociation { get; set; } + /// The body property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Body { get; set; } +#nullable restore +#else + public string Body { get; set; } +#endif + /// The body_html property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? BodyHtml { get; set; } +#nullable restore +#else + public string BodyHtml { get; set; } +#endif + /// The body_text property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? BodyText { get; set; } +#nullable restore +#else + public string BodyText { get; set; } +#endif + /// The closed_at property + public DateTimeOffset? ClosedAt { get; set; } + /// The comments property + public int? Comments { get; set; } + /// The comments_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? CommentsUrl { get; set; } +#nullable restore +#else + public string CommentsUrl { get; set; } +#endif + /// The created_at property + public DateTimeOffset? CreatedAt { get; set; } + /// The draft property + public bool? Draft { get; set; } + /// The events_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? EventsUrl { get; set; } +#nullable restore +#else + public string EventsUrl { get; set; } +#endif + /// The html_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? HtmlUrl { get; set; } +#nullable restore +#else + public string HtmlUrl { get; set; } +#endif + /// The id property + public long? Id { get; set; } + /// The issue_dependencies_summary property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.IssueDependenciesSummary? IssueDependenciesSummary { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.IssueDependenciesSummary IssueDependenciesSummary { get; set; } +#endif + /// The issue_field_values property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? IssueFieldValues { get; set; } +#nullable restore +#else + public List IssueFieldValues { get; set; } +#endif + /// The labels property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? Labels { get; set; } +#nullable restore +#else + public List Labels { get; set; } +#endif + /// The labels_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? LabelsUrl { get; set; } +#nullable restore +#else + public string LabelsUrl { get; set; } +#endif + /// The locked property + public bool? Locked { get; set; } + /// A collection of related issues and pull requests. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.NullableMilestone? Milestone { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.NullableMilestone Milestone { get; set; } +#endif + /// The node_id property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? NodeId { get; set; } +#nullable restore +#else + public string NodeId { get; set; } +#endif + /// The number property + public int? Number { get; set; } + /// 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. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.NullableIntegration? PerformedViaGithubApp { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.NullableIntegration PerformedViaGithubApp { get; set; } +#endif + /// The pull_request property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.IssueSearchResultItem_pull_request? PullRequest { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.IssueSearchResultItem_pull_request PullRequest { get; set; } +#endif + /// The reactions property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.ReactionRollup? Reactions { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.ReactionRollup Reactions { get; set; } +#endif + /// A repository on GitHub. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.Repository? Repository { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.Repository Repository { get; set; } +#endif + /// The repository_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? RepositoryUrl { get; set; } +#nullable restore +#else + public string RepositoryUrl { get; set; } +#endif + /// The score property + public double? Score { get; set; } + /// The state property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? State { get; set; } +#nullable restore +#else + public string State { get; set; } +#endif + /// The state_reason property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? StateReason { get; set; } +#nullable restore +#else + public string StateReason { get; set; } +#endif + /// The sub_issues_summary property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.SubIssuesSummary? SubIssuesSummary { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.SubIssuesSummary SubIssuesSummary { get; set; } +#endif + /// The text_matches property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? TextMatches { get; set; } +#nullable restore +#else + public List TextMatches { get; set; } +#endif + /// The timeline_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? TimelineUrl { get; set; } +#nullable restore +#else + public string TimelineUrl { get; set; } +#endif + /// The title property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Title { get; set; } +#nullable restore +#else + public string Title { get; set; } +#endif + /// The type of issue. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.IssueType? Type { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.IssueType Type { get; set; } +#endif + /// The updated_at property + public DateTimeOffset? UpdatedAt { get; set; } + /// The url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Url { get; set; } +#nullable restore +#else + public string Url { get; set; } +#endif + /// A GitHub user. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.NullableSimpleUser? User { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.NullableSimpleUser User { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public IssueSearchResultItem() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.IssueSearchResultItem CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.IssueSearchResultItem(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "active_lock_reason", n => { ActiveLockReason = n.GetStringValue(); } }, + { "assignee", n => { Assignee = n.GetObjectValue(global::Ayllu.Github.Client.Models.NullableSimpleUser.CreateFromDiscriminatorValue); } }, + { "assignees", n => { Assignees = n.GetCollectionOfObjectValues(global::Ayllu.Github.Client.Models.SimpleUser.CreateFromDiscriminatorValue)?.AsList(); } }, + { "author_association", n => { AuthorAssociation = n.GetEnumValue(); } }, + { "body", n => { Body = n.GetStringValue(); } }, + { "body_html", n => { BodyHtml = n.GetStringValue(); } }, + { "body_text", n => { BodyText = n.GetStringValue(); } }, + { "closed_at", n => { ClosedAt = n.GetDateTimeOffsetValue(); } }, + { "comments", n => { Comments = n.GetIntValue(); } }, + { "comments_url", n => { CommentsUrl = n.GetStringValue(); } }, + { "created_at", n => { CreatedAt = n.GetDateTimeOffsetValue(); } }, + { "draft", n => { Draft = n.GetBoolValue(); } }, + { "events_url", n => { EventsUrl = n.GetStringValue(); } }, + { "html_url", n => { HtmlUrl = n.GetStringValue(); } }, + { "id", n => { Id = n.GetLongValue(); } }, + { "issue_dependencies_summary", n => { IssueDependenciesSummary = n.GetObjectValue(global::Ayllu.Github.Client.Models.IssueDependenciesSummary.CreateFromDiscriminatorValue); } }, + { "issue_field_values", n => { IssueFieldValues = n.GetCollectionOfObjectValues(global::Ayllu.Github.Client.Models.IssueFieldValue.CreateFromDiscriminatorValue)?.AsList(); } }, + { "labels", n => { Labels = n.GetCollectionOfObjectValues(global::Ayllu.Github.Client.Models.IssueSearchResultItem_labels.CreateFromDiscriminatorValue)?.AsList(); } }, + { "labels_url", n => { LabelsUrl = n.GetStringValue(); } }, + { "locked", n => { Locked = n.GetBoolValue(); } }, + { "milestone", n => { Milestone = n.GetObjectValue(global::Ayllu.Github.Client.Models.NullableMilestone.CreateFromDiscriminatorValue); } }, + { "node_id", n => { NodeId = n.GetStringValue(); } }, + { "number", n => { Number = n.GetIntValue(); } }, + { "performed_via_github_app", n => { PerformedViaGithubApp = n.GetObjectValue(global::Ayllu.Github.Client.Models.NullableIntegration.CreateFromDiscriminatorValue); } }, + { "pull_request", n => { PullRequest = n.GetObjectValue(global::Ayllu.Github.Client.Models.IssueSearchResultItem_pull_request.CreateFromDiscriminatorValue); } }, + { "reactions", n => { Reactions = n.GetObjectValue(global::Ayllu.Github.Client.Models.ReactionRollup.CreateFromDiscriminatorValue); } }, + { "repository", n => { Repository = n.GetObjectValue(global::Ayllu.Github.Client.Models.Repository.CreateFromDiscriminatorValue); } }, + { "repository_url", n => { RepositoryUrl = n.GetStringValue(); } }, + { "score", n => { Score = n.GetDoubleValue(); } }, + { "state", n => { State = n.GetStringValue(); } }, + { "state_reason", n => { StateReason = n.GetStringValue(); } }, + { "sub_issues_summary", n => { SubIssuesSummary = n.GetObjectValue(global::Ayllu.Github.Client.Models.SubIssuesSummary.CreateFromDiscriminatorValue); } }, + { "text_matches", n => { TextMatches = n.GetCollectionOfObjectValues(global::Ayllu.Github.Client.Models.Issues.CreateFromDiscriminatorValue)?.AsList(); } }, + { "timeline_url", n => { TimelineUrl = n.GetStringValue(); } }, + { "title", n => { Title = n.GetStringValue(); } }, + { "type", n => { Type = n.GetObjectValue(global::Ayllu.Github.Client.Models.IssueType.CreateFromDiscriminatorValue); } }, + { "updated_at", n => { UpdatedAt = n.GetDateTimeOffsetValue(); } }, + { "url", n => { Url = n.GetStringValue(); } }, + { "user", n => { User = n.GetObjectValue(global::Ayllu.Github.Client.Models.NullableSimpleUser.CreateFromDiscriminatorValue); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("active_lock_reason", ActiveLockReason); + writer.WriteObjectValue("assignee", Assignee); + writer.WriteCollectionOfObjectValues("assignees", Assignees); + writer.WriteEnumValue("author_association", AuthorAssociation); + writer.WriteStringValue("body", Body); + writer.WriteStringValue("body_html", BodyHtml); + writer.WriteStringValue("body_text", BodyText); + writer.WriteDateTimeOffsetValue("closed_at", ClosedAt); + writer.WriteIntValue("comments", Comments); + writer.WriteStringValue("comments_url", CommentsUrl); + writer.WriteDateTimeOffsetValue("created_at", CreatedAt); + writer.WriteBoolValue("draft", Draft); + writer.WriteStringValue("events_url", EventsUrl); + writer.WriteStringValue("html_url", HtmlUrl); + writer.WriteLongValue("id", Id); + writer.WriteObjectValue("issue_dependencies_summary", IssueDependenciesSummary); + writer.WriteCollectionOfObjectValues("issue_field_values", IssueFieldValues); + writer.WriteCollectionOfObjectValues("labels", Labels); + writer.WriteStringValue("labels_url", LabelsUrl); + writer.WriteBoolValue("locked", Locked); + writer.WriteObjectValue("milestone", Milestone); + writer.WriteStringValue("node_id", NodeId); + writer.WriteIntValue("number", Number); + writer.WriteObjectValue("performed_via_github_app", PerformedViaGithubApp); + writer.WriteObjectValue("pull_request", PullRequest); + writer.WriteObjectValue("reactions", Reactions); + writer.WriteObjectValue("repository", Repository); + writer.WriteStringValue("repository_url", RepositoryUrl); + writer.WriteDoubleValue("score", Score); + writer.WriteStringValue("state", State); + writer.WriteStringValue("state_reason", StateReason); + writer.WriteObjectValue("sub_issues_summary", SubIssuesSummary); + writer.WriteCollectionOfObjectValues("text_matches", TextMatches); + writer.WriteStringValue("timeline_url", TimelineUrl); + writer.WriteStringValue("title", Title); + writer.WriteObjectValue("type", Type); + writer.WriteDateTimeOffsetValue("updated_at", UpdatedAt); + writer.WriteStringValue("url", Url); + writer.WriteObjectValue("user", User); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/IssueSearchResultItem_labels.cs b/src/Ayllu.Github.Client/Github/Client/Models/IssueSearchResultItem_labels.cs new file mode 100644 index 0000000..00e8866 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/IssueSearchResultItem_labels.cs @@ -0,0 +1,113 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class IssueSearchResultItem_labels : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The color property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Color { get; set; } +#nullable restore +#else + public string Color { get; set; } +#endif + /// The default property + public bool? Default { get; set; } + /// The description property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Description { get; set; } +#nullable restore +#else + public string Description { get; set; } +#endif + /// The id property + public long? Id { get; set; } + /// The name property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Name { get; set; } +#nullable restore +#else + public string Name { get; set; } +#endif + /// The node_id property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? NodeId { get; set; } +#nullable restore +#else + public string NodeId { get; set; } +#endif + /// The url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Url { get; set; } +#nullable restore +#else + public string Url { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public IssueSearchResultItem_labels() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.IssueSearchResultItem_labels CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.IssueSearchResultItem_labels(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "color", n => { Color = n.GetStringValue(); } }, + { "default", n => { Default = n.GetBoolValue(); } }, + { "description", n => { Description = n.GetStringValue(); } }, + { "id", n => { Id = n.GetLongValue(); } }, + { "name", n => { Name = n.GetStringValue(); } }, + { "node_id", n => { NodeId = n.GetStringValue(); } }, + { "url", n => { Url = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("color", Color); + writer.WriteBoolValue("default", Default); + writer.WriteStringValue("description", Description); + writer.WriteLongValue("id", Id); + writer.WriteStringValue("name", Name); + writer.WriteStringValue("node_id", NodeId); + writer.WriteStringValue("url", Url); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/IssueSearchResultItem_pull_request.cs b/src/Ayllu.Github.Client/Github/Client/Models/IssueSearchResultItem_pull_request.cs new file mode 100644 index 0000000..6edfecd --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/IssueSearchResultItem_pull_request.cs @@ -0,0 +1,99 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class IssueSearchResultItem_pull_request : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The diff_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? DiffUrl { get; set; } +#nullable restore +#else + public string DiffUrl { get; set; } +#endif + /// The html_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? HtmlUrl { get; set; } +#nullable restore +#else + public string HtmlUrl { get; set; } +#endif + /// The merged_at property + public DateTimeOffset? MergedAt { get; set; } + /// The patch_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? PatchUrl { get; set; } +#nullable restore +#else + public string PatchUrl { get; set; } +#endif + /// The url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Url { get; set; } +#nullable restore +#else + public string Url { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public IssueSearchResultItem_pull_request() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.IssueSearchResultItem_pull_request CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.IssueSearchResultItem_pull_request(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "diff_url", n => { DiffUrl = n.GetStringValue(); } }, + { "html_url", n => { HtmlUrl = n.GetStringValue(); } }, + { "merged_at", n => { MergedAt = n.GetDateTimeOffsetValue(); } }, + { "patch_url", n => { PatchUrl = n.GetStringValue(); } }, + { "url", n => { Url = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("diff_url", DiffUrl); + writer.WriteStringValue("html_url", HtmlUrl); + writer.WriteDateTimeOffsetValue("merged_at", MergedAt); + writer.WriteStringValue("patch_url", PatchUrl); + writer.WriteStringValue("url", Url); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/IssueType.cs b/src/Ayllu.Github.Client/Github/Client/Models/IssueType.cs new file mode 100644 index 0000000..a61721b --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/IssueType.cs @@ -0,0 +1,106 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + /// + /// The type of issue. + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class IssueType : IAdditionalDataHolder, IParsable + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The color of the issue type. + public global::Ayllu.Github.Client.Models.IssueType_color? Color { get; set; } + /// The time the issue type created. + public DateTimeOffset? CreatedAt { get; set; } + /// The description of the issue type. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Description { get; set; } +#nullable restore +#else + public string Description { get; set; } +#endif + /// The unique identifier of the issue type. + public int? Id { get; set; } + /// The enabled state of the issue type. + public bool? IsEnabled { get; set; } + /// The name of the issue type. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Name { get; set; } +#nullable restore +#else + public string Name { get; set; } +#endif + /// The node identifier of the issue type. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? NodeId { get; set; } +#nullable restore +#else + public string NodeId { get; set; } +#endif + /// The time the issue type last updated. + public DateTimeOffset? UpdatedAt { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public IssueType() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.IssueType CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.IssueType(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "color", n => { Color = n.GetEnumValue(); } }, + { "created_at", n => { CreatedAt = n.GetDateTimeOffsetValue(); } }, + { "description", n => { Description = n.GetStringValue(); } }, + { "id", n => { Id = n.GetIntValue(); } }, + { "is_enabled", n => { IsEnabled = n.GetBoolValue(); } }, + { "name", n => { Name = n.GetStringValue(); } }, + { "node_id", n => { NodeId = n.GetStringValue(); } }, + { "updated_at", n => { UpdatedAt = n.GetDateTimeOffsetValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteEnumValue("color", Color); + writer.WriteDateTimeOffsetValue("created_at", CreatedAt); + writer.WriteStringValue("description", Description); + writer.WriteIntValue("id", Id); + writer.WriteBoolValue("is_enabled", IsEnabled); + writer.WriteStringValue("name", Name); + writer.WriteStringValue("node_id", NodeId); + writer.WriteDateTimeOffsetValue("updated_at", UpdatedAt); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/IssueType_color.cs b/src/Ayllu.Github.Client/Github/Client/Models/IssueType_color.cs new file mode 100644 index 0000000..4beeb39 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/IssueType_color.cs @@ -0,0 +1,43 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Models +{ + /// The color of the issue type. + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public enum IssueType_color + { + [EnumMember(Value = "gray")] + #pragma warning disable CS1591 + Gray, + #pragma warning restore CS1591 + [EnumMember(Value = "blue")] + #pragma warning disable CS1591 + Blue, + #pragma warning restore CS1591 + [EnumMember(Value = "green")] + #pragma warning disable CS1591 + Green, + #pragma warning restore CS1591 + [EnumMember(Value = "yellow")] + #pragma warning disable CS1591 + Yellow, + #pragma warning restore CS1591 + [EnumMember(Value = "orange")] + #pragma warning disable CS1591 + Orange, + #pragma warning restore CS1591 + [EnumMember(Value = "red")] + #pragma warning disable CS1591 + Red, + #pragma warning restore CS1591 + [EnumMember(Value = "pink")] + #pragma warning disable CS1591 + Pink, + #pragma warning restore CS1591 + [EnumMember(Value = "purple")] + #pragma warning disable CS1591 + Purple, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Models/Issue_pull_request.cs b/src/Ayllu.Github.Client/Github/Client/Models/Issue_pull_request.cs new file mode 100644 index 0000000..3ca527f --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/Issue_pull_request.cs @@ -0,0 +1,99 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class Issue_pull_request : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The diff_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? DiffUrl { get; set; } +#nullable restore +#else + public string DiffUrl { get; set; } +#endif + /// The html_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? HtmlUrl { get; set; } +#nullable restore +#else + public string HtmlUrl { get; set; } +#endif + /// The merged_at property + public DateTimeOffset? MergedAt { get; set; } + /// The patch_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? PatchUrl { get; set; } +#nullable restore +#else + public string PatchUrl { get; set; } +#endif + /// The url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Url { get; set; } +#nullable restore +#else + public string Url { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public Issue_pull_request() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.Issue_pull_request CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.Issue_pull_request(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "diff_url", n => { DiffUrl = n.GetStringValue(); } }, + { "html_url", n => { HtmlUrl = n.GetStringValue(); } }, + { "merged_at", n => { MergedAt = n.GetDateTimeOffsetValue(); } }, + { "patch_url", n => { PatchUrl = n.GetStringValue(); } }, + { "url", n => { Url = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("diff_url", DiffUrl); + writer.WriteStringValue("html_url", HtmlUrl); + writer.WriteDateTimeOffsetValue("merged_at", MergedAt); + writer.WriteStringValue("patch_url", PatchUrl); + writer.WriteStringValue("url", Url); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/Issue_state_reason.cs b/src/Ayllu.Github.Client/Github/Client/Models/Issue_state_reason.cs new file mode 100644 index 0000000..0bb0166 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/Issue_state_reason.cs @@ -0,0 +1,27 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Models +{ + /// The reason for the current state + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public enum Issue_state_reason + { + [EnumMember(Value = "completed")] + #pragma warning disable CS1591 + Completed, + #pragma warning restore CS1591 + [EnumMember(Value = "reopened")] + #pragma warning disable CS1591 + Reopened, + #pragma warning restore CS1591 + [EnumMember(Value = "not_planned")] + #pragma warning disable CS1591 + Not_planned, + #pragma warning restore CS1591 + [EnumMember(Value = "duplicate")] + #pragma warning disable CS1591 + Duplicate, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Models/Issues.cs b/src/Ayllu.Github.Client/Github/Client/Models/Issues.cs new file mode 100644 index 0000000..0f25b4a --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/Issues.cs @@ -0,0 +1,105 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class Issues : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The fragment property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Fragment { get; set; } +#nullable restore +#else + public string Fragment { get; set; } +#endif + /// The matches property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? Matches { get; set; } +#nullable restore +#else + public List Matches { get; set; } +#endif + /// The object_type property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? ObjectType { get; set; } +#nullable restore +#else + public string ObjectType { get; set; } +#endif + /// The object_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? ObjectUrl { get; set; } +#nullable restore +#else + public string ObjectUrl { get; set; } +#endif + /// The property property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Property { get; set; } +#nullable restore +#else + public string Property { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public Issues() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.Issues CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.Issues(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "fragment", n => { Fragment = n.GetStringValue(); } }, + { "matches", n => { Matches = n.GetCollectionOfObjectValues(global::Ayllu.Github.Client.Models.Issues_matches.CreateFromDiscriminatorValue)?.AsList(); } }, + { "object_type", n => { ObjectType = n.GetStringValue(); } }, + { "object_url", n => { ObjectUrl = n.GetStringValue(); } }, + { "property", n => { Property = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("fragment", Fragment); + writer.WriteCollectionOfObjectValues("matches", Matches); + writer.WriteStringValue("object_type", ObjectType); + writer.WriteStringValue("object_url", ObjectUrl); + writer.WriteStringValue("property", Property); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/Issues503Error.cs b/src/Ayllu.Github.Client/Github/Client/Models/Issues503Error.cs new file mode 100644 index 0000000..017dbfb --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/Issues503Error.cs @@ -0,0 +1,88 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class Issues503Error : ApiException, IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The code property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Code { get; set; } +#nullable restore +#else + public string Code { get; set; } +#endif + /// The documentation_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? DocumentationUrl { get; set; } +#nullable restore +#else + public string DocumentationUrl { get; set; } +#endif + /// The primary error message. + public override string Message { get => MessageEscaped ?? string.Empty; } + /// The message property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? MessageEscaped { get; set; } +#nullable restore +#else + public string MessageEscaped { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public Issues503Error() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.Issues503Error CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.Issues503Error(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "code", n => { Code = n.GetStringValue(); } }, + { "documentation_url", n => { DocumentationUrl = n.GetStringValue(); } }, + { "message", n => { MessageEscaped = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("code", Code); + writer.WriteStringValue("documentation_url", DocumentationUrl); + writer.WriteStringValue("message", MessageEscaped); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/Issues_matches.cs b/src/Ayllu.Github.Client/Github/Client/Models/Issues_matches.cs new file mode 100644 index 0000000..0eebc22 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/Issues_matches.cs @@ -0,0 +1,75 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class Issues_matches : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The indices property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? Indices { get; set; } +#nullable restore +#else + public List Indices { get; set; } +#endif + /// The text property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Text { get; set; } +#nullable restore +#else + public string Text { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public Issues_matches() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.Issues_matches CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.Issues_matches(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "indices", n => { Indices = n.GetCollectionOfPrimitiveValues()?.AsList(); } }, + { "text", n => { Text = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteCollectionOfPrimitiveValues("indices", Indices); + writer.WriteStringValue("text", Text); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/Job.cs b/src/Ayllu.Github.Client/Github/Client/Models/Job.cs new file mode 100644 index 0000000..abf3578 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/Job.cs @@ -0,0 +1,226 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + /// + /// Information of a job execution in a workflow run + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class Job : IAdditionalDataHolder, IParsable + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The check_run_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? CheckRunUrl { get; set; } +#nullable restore +#else + public string CheckRunUrl { get; set; } +#endif + /// The time that the job finished, in ISO 8601 format. + public DateTimeOffset? CompletedAt { get; set; } + /// The outcome of the job. + public global::Ayllu.Github.Client.Models.Job_conclusion? Conclusion { get; set; } + /// The time that the job created, in ISO 8601 format. + public DateTimeOffset? CreatedAt { get; set; } + /// The name of the current branch. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? HeadBranch { get; set; } +#nullable restore +#else + public string HeadBranch { get; set; } +#endif + /// The SHA of the commit that is being run. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? HeadSha { get; set; } +#nullable restore +#else + public string HeadSha { get; set; } +#endif + /// The html_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? HtmlUrl { get; set; } +#nullable restore +#else + public string HtmlUrl { get; set; } +#endif + /// The id of the job. + public int? Id { get; set; } + /// Labels for the workflow job. Specified by the "runs_on" attribute in the action's workflow file. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? Labels { get; set; } +#nullable restore +#else + public List Labels { get; set; } +#endif + /// The name of the job. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Name { get; set; } +#nullable restore +#else + public string Name { get; set; } +#endif + /// The node_id property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? NodeId { get; set; } +#nullable restore +#else + public string NodeId { get; set; } +#endif + /// Attempt number of the associated workflow run, 1 for first attempt and higher if the workflow was re-run. + public int? RunAttempt { get; set; } + /// The id of the associated workflow run. + public int? RunId { get; set; } + /// 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.) + public int? RunnerGroupId { get; set; } + /// 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.) +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? RunnerGroupName { get; set; } +#nullable restore +#else + public string RunnerGroupName { get; set; } +#endif + /// The ID of the runner to which this job has been assigned. (If a runner hasn't yet been assigned, this will be null.) + public int? RunnerId { get; set; } + /// The name of the runner to which this job has been assigned. (If a runner hasn't yet been assigned, this will be null.) +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? RunnerName { get; set; } +#nullable restore +#else + public string RunnerName { get; set; } +#endif + /// The run_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? RunUrl { get; set; } +#nullable restore +#else + public string RunUrl { get; set; } +#endif + /// The time that the job started, in ISO 8601 format. + public DateTimeOffset? StartedAt { get; set; } + /// The phase of the lifecycle that the job is currently in. + public global::Ayllu.Github.Client.Models.Job_status? Status { get; set; } + /// Steps in this job. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? Steps { get; set; } +#nullable restore +#else + public List Steps { get; set; } +#endif + /// The url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Url { get; set; } +#nullable restore +#else + public string Url { get; set; } +#endif + /// The name of the workflow. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? WorkflowName { get; set; } +#nullable restore +#else + public string WorkflowName { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public Job() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.Job CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.Job(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "check_run_url", n => { CheckRunUrl = n.GetStringValue(); } }, + { "completed_at", n => { CompletedAt = n.GetDateTimeOffsetValue(); } }, + { "conclusion", n => { Conclusion = n.GetEnumValue(); } }, + { "created_at", n => { CreatedAt = n.GetDateTimeOffsetValue(); } }, + { "head_branch", n => { HeadBranch = n.GetStringValue(); } }, + { "head_sha", n => { HeadSha = n.GetStringValue(); } }, + { "html_url", n => { HtmlUrl = n.GetStringValue(); } }, + { "id", n => { Id = n.GetIntValue(); } }, + { "labels", n => { Labels = n.GetCollectionOfPrimitiveValues()?.AsList(); } }, + { "name", n => { Name = n.GetStringValue(); } }, + { "node_id", n => { NodeId = n.GetStringValue(); } }, + { "run_attempt", n => { RunAttempt = n.GetIntValue(); } }, + { "run_id", n => { RunId = n.GetIntValue(); } }, + { "run_url", n => { RunUrl = n.GetStringValue(); } }, + { "runner_group_id", n => { RunnerGroupId = n.GetIntValue(); } }, + { "runner_group_name", n => { RunnerGroupName = n.GetStringValue(); } }, + { "runner_id", n => { RunnerId = n.GetIntValue(); } }, + { "runner_name", n => { RunnerName = n.GetStringValue(); } }, + { "started_at", n => { StartedAt = n.GetDateTimeOffsetValue(); } }, + { "status", n => { Status = n.GetEnumValue(); } }, + { "steps", n => { Steps = n.GetCollectionOfObjectValues(global::Ayllu.Github.Client.Models.Job_steps.CreateFromDiscriminatorValue)?.AsList(); } }, + { "url", n => { Url = n.GetStringValue(); } }, + { "workflow_name", n => { WorkflowName = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("check_run_url", CheckRunUrl); + writer.WriteDateTimeOffsetValue("completed_at", CompletedAt); + writer.WriteEnumValue("conclusion", Conclusion); + writer.WriteDateTimeOffsetValue("created_at", CreatedAt); + writer.WriteStringValue("head_branch", HeadBranch); + writer.WriteStringValue("head_sha", HeadSha); + writer.WriteStringValue("html_url", HtmlUrl); + writer.WriteIntValue("id", Id); + writer.WriteCollectionOfPrimitiveValues("labels", Labels); + writer.WriteStringValue("name", Name); + writer.WriteStringValue("node_id", NodeId); + writer.WriteIntValue("run_attempt", RunAttempt); + writer.WriteIntValue("run_id", RunId); + writer.WriteIntValue("runner_group_id", RunnerGroupId); + writer.WriteStringValue("runner_group_name", RunnerGroupName); + writer.WriteIntValue("runner_id", RunnerId); + writer.WriteStringValue("runner_name", RunnerName); + writer.WriteStringValue("run_url", RunUrl); + writer.WriteDateTimeOffsetValue("started_at", StartedAt); + writer.WriteEnumValue("status", Status); + writer.WriteCollectionOfObjectValues("steps", Steps); + writer.WriteStringValue("url", Url); + writer.WriteStringValue("workflow_name", WorkflowName); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/Job_conclusion.cs b/src/Ayllu.Github.Client/Github/Client/Models/Job_conclusion.cs new file mode 100644 index 0000000..cf7f039 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/Job_conclusion.cs @@ -0,0 +1,39 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Models +{ + /// The outcome of the job. + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public enum Job_conclusion + { + [EnumMember(Value = "success")] + #pragma warning disable CS1591 + Success, + #pragma warning restore CS1591 + [EnumMember(Value = "failure")] + #pragma warning disable CS1591 + Failure, + #pragma warning restore CS1591 + [EnumMember(Value = "neutral")] + #pragma warning disable CS1591 + Neutral, + #pragma warning restore CS1591 + [EnumMember(Value = "cancelled")] + #pragma warning disable CS1591 + Cancelled, + #pragma warning restore CS1591 + [EnumMember(Value = "skipped")] + #pragma warning disable CS1591 + Skipped, + #pragma warning restore CS1591 + [EnumMember(Value = "timed_out")] + #pragma warning disable CS1591 + Timed_out, + #pragma warning restore CS1591 + [EnumMember(Value = "action_required")] + #pragma warning disable CS1591 + Action_required, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Models/Job_status.cs b/src/Ayllu.Github.Client/Github/Client/Models/Job_status.cs new file mode 100644 index 0000000..f809dc5 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/Job_status.cs @@ -0,0 +1,35 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Models +{ + /// The phase of the lifecycle that the job is currently in. + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public enum Job_status + { + [EnumMember(Value = "queued")] + #pragma warning disable CS1591 + Queued, + #pragma warning restore CS1591 + [EnumMember(Value = "in_progress")] + #pragma warning disable CS1591 + In_progress, + #pragma warning restore CS1591 + [EnumMember(Value = "completed")] + #pragma warning disable CS1591 + Completed, + #pragma warning restore CS1591 + [EnumMember(Value = "waiting")] + #pragma warning disable CS1591 + Waiting, + #pragma warning restore CS1591 + [EnumMember(Value = "requested")] + #pragma warning disable CS1591 + Requested, + #pragma warning restore CS1591 + [EnumMember(Value = "pending")] + #pragma warning disable CS1591 + Pending, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Models/Job_steps.cs b/src/Ayllu.Github.Client/Github/Client/Models/Job_steps.cs new file mode 100644 index 0000000..c4c5beb --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/Job_steps.cs @@ -0,0 +1,91 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class Job_steps : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The time that the job finished, in ISO 8601 format. + public DateTimeOffset? CompletedAt { get; set; } + /// The outcome of the job. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Conclusion { get; set; } +#nullable restore +#else + public string Conclusion { get; set; } +#endif + /// The name of the job. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Name { get; set; } +#nullable restore +#else + public string Name { get; set; } +#endif + /// The number property + public int? Number { get; set; } + /// The time that the step started, in ISO 8601 format. + public DateTimeOffset? StartedAt { get; set; } + /// The phase of the lifecycle that the job is currently in. + public global::Ayllu.Github.Client.Models.Job_steps_status? Status { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public Job_steps() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.Job_steps CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.Job_steps(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "completed_at", n => { CompletedAt = n.GetDateTimeOffsetValue(); } }, + { "conclusion", n => { Conclusion = n.GetStringValue(); } }, + { "name", n => { Name = n.GetStringValue(); } }, + { "number", n => { Number = n.GetIntValue(); } }, + { "started_at", n => { StartedAt = n.GetDateTimeOffsetValue(); } }, + { "status", n => { Status = n.GetEnumValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteDateTimeOffsetValue("completed_at", CompletedAt); + writer.WriteStringValue("conclusion", Conclusion); + writer.WriteStringValue("name", Name); + writer.WriteIntValue("number", Number); + writer.WriteDateTimeOffsetValue("started_at", StartedAt); + writer.WriteEnumValue("status", Status); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/Job_steps_status.cs b/src/Ayllu.Github.Client/Github/Client/Models/Job_steps_status.cs new file mode 100644 index 0000000..d16dffe --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/Job_steps_status.cs @@ -0,0 +1,23 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Models +{ + /// The phase of the lifecycle that the job is currently in. + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public enum Job_steps_status + { + [EnumMember(Value = "queued")] + #pragma warning disable CS1591 + Queued, + #pragma warning restore CS1591 + [EnumMember(Value = "in_progress")] + #pragma warning disable CS1591 + In_progress, + #pragma warning restore CS1591 + [EnumMember(Value = "completed")] + #pragma warning disable CS1591 + Completed, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Models/Key.cs b/src/Ayllu.Github.Client/Github/Client/Models/Key.cs new file mode 100644 index 0000000..963de39 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/Key.cs @@ -0,0 +1,106 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + /// + /// Key + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class Key : IAdditionalDataHolder, IParsable + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The created_at property + public DateTimeOffset? CreatedAt { get; set; } + /// The id property + public long? Id { get; set; } + /// The key property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? KeyProp { get; set; } +#nullable restore +#else + public string KeyProp { get; set; } +#endif + /// The last_used property + public DateTimeOffset? LastUsed { get; set; } + /// The read_only property + public bool? ReadOnly { get; set; } + /// The title property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Title { get; set; } +#nullable restore +#else + public string Title { get; set; } +#endif + /// The url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Url { get; set; } +#nullable restore +#else + public string Url { get; set; } +#endif + /// The verified property + public bool? Verified { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public Key() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.Key CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.Key(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "created_at", n => { CreatedAt = n.GetDateTimeOffsetValue(); } }, + { "id", n => { Id = n.GetLongValue(); } }, + { "key", n => { KeyProp = n.GetStringValue(); } }, + { "last_used", n => { LastUsed = n.GetDateTimeOffsetValue(); } }, + { "read_only", n => { ReadOnly = n.GetBoolValue(); } }, + { "title", n => { Title = n.GetStringValue(); } }, + { "url", n => { Url = n.GetStringValue(); } }, + { "verified", n => { Verified = n.GetBoolValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteDateTimeOffsetValue("created_at", CreatedAt); + writer.WriteLongValue("id", Id); + writer.WriteStringValue("key", KeyProp); + writer.WriteDateTimeOffsetValue("last_used", LastUsed); + writer.WriteBoolValue("read_only", ReadOnly); + writer.WriteStringValue("title", Title); + writer.WriteStringValue("url", Url); + writer.WriteBoolValue("verified", Verified); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/KeySimple.cs b/src/Ayllu.Github.Client/Github/Client/Models/KeySimple.cs new file mode 100644 index 0000000..354b5b8 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/KeySimple.cs @@ -0,0 +1,78 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + /// + /// Key Simple + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class KeySimple : IAdditionalDataHolder, IParsable + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The created_at property + public DateTimeOffset? CreatedAt { get; set; } + /// The id property + public int? Id { get; set; } + /// The key property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Key { get; set; } +#nullable restore +#else + public string Key { get; set; } +#endif + /// The last_used property + public DateTimeOffset? LastUsed { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public KeySimple() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.KeySimple CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.KeySimple(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "created_at", n => { CreatedAt = n.GetDateTimeOffsetValue(); } }, + { "id", n => { Id = n.GetIntValue(); } }, + { "key", n => { Key = n.GetStringValue(); } }, + { "last_used", n => { LastUsed = n.GetDateTimeOffsetValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteDateTimeOffsetValue("created_at", CreatedAt); + writer.WriteIntValue("id", Id); + writer.WriteStringValue("key", Key); + writer.WriteDateTimeOffsetValue("last_used", LastUsed); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/Label.cs b/src/Ayllu.Github.Client/Github/Client/Models/Label.cs new file mode 100644 index 0000000..ef8ff7f --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/Label.cs @@ -0,0 +1,114 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + /// + /// Color-coded labels help you categorize and filter your issues (just like labels in Gmail). + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class Label : IAdditionalDataHolder, IParsable + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// 6-character hex code, without the leading #, identifying the color +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Color { get; set; } +#nullable restore +#else + public string Color { get; set; } +#endif + /// Whether this label comes by default in a new repository. + public bool? Default { get; set; } + /// Optional description of the label, such as its purpose. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Description { get; set; } +#nullable restore +#else + public string Description { get; set; } +#endif + /// Unique identifier for the label. + public long? Id { get; set; } + /// The name of the label. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Name { get; set; } +#nullable restore +#else + public string Name { get; set; } +#endif + /// The node_id property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? NodeId { get; set; } +#nullable restore +#else + public string NodeId { get; set; } +#endif + /// URL for the label +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Url { get; set; } +#nullable restore +#else + public string Url { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public Label() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.Label CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.Label(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "color", n => { Color = n.GetStringValue(); } }, + { "default", n => { Default = n.GetBoolValue(); } }, + { "description", n => { Description = n.GetStringValue(); } }, + { "id", n => { Id = n.GetLongValue(); } }, + { "name", n => { Name = n.GetStringValue(); } }, + { "node_id", n => { NodeId = n.GetStringValue(); } }, + { "url", n => { Url = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("color", Color); + writer.WriteBoolValue("default", Default); + writer.WriteStringValue("description", Description); + writer.WriteLongValue("id", Id); + writer.WriteStringValue("name", Name); + writer.WriteStringValue("node_id", NodeId); + writer.WriteStringValue("url", Url); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/LabelSearchResultItem.cs b/src/Ayllu.Github.Client/Github/Client/Models/LabelSearchResultItem.cs new file mode 100644 index 0000000..3f547ad --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/LabelSearchResultItem.cs @@ -0,0 +1,128 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + /// + /// Label Search Result Item + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class LabelSearchResultItem : IAdditionalDataHolder, IParsable + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The color property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Color { get; set; } +#nullable restore +#else + public string Color { get; set; } +#endif + /// The default property + public bool? Default { get; set; } + /// The description property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Description { get; set; } +#nullable restore +#else + public string Description { get; set; } +#endif + /// The id property + public int? Id { get; set; } + /// The name property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Name { get; set; } +#nullable restore +#else + public string Name { get; set; } +#endif + /// The node_id property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? NodeId { get; set; } +#nullable restore +#else + public string NodeId { get; set; } +#endif + /// The score property + public double? Score { get; set; } + /// The text_matches property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? TextMatches { get; set; } +#nullable restore +#else + public List TextMatches { get; set; } +#endif + /// The url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Url { get; set; } +#nullable restore +#else + public string Url { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public LabelSearchResultItem() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.LabelSearchResultItem CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.LabelSearchResultItem(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "color", n => { Color = n.GetStringValue(); } }, + { "default", n => { Default = n.GetBoolValue(); } }, + { "description", n => { Description = n.GetStringValue(); } }, + { "id", n => { Id = n.GetIntValue(); } }, + { "name", n => { Name = n.GetStringValue(); } }, + { "node_id", n => { NodeId = n.GetStringValue(); } }, + { "score", n => { Score = n.GetDoubleValue(); } }, + { "text_matches", n => { TextMatches = n.GetCollectionOfObjectValues(global::Ayllu.Github.Client.Models.Labels.CreateFromDiscriminatorValue)?.AsList(); } }, + { "url", n => { Url = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("color", Color); + writer.WriteBoolValue("default", Default); + writer.WriteStringValue("description", Description); + writer.WriteIntValue("id", Id); + writer.WriteStringValue("name", Name); + writer.WriteStringValue("node_id", NodeId); + writer.WriteDoubleValue("score", Score); + writer.WriteCollectionOfObjectValues("text_matches", TextMatches); + writer.WriteStringValue("url", Url); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/LabeledIssueEvent.cs b/src/Ayllu.Github.Client/Github/Client/Models/LabeledIssueEvent.cs new file mode 100644 index 0000000..713c6a3 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/LabeledIssueEvent.cs @@ -0,0 +1,150 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + /// + /// Labeled Issue Event + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class LabeledIssueEvent : IAdditionalDataHolder, IParsable + { + /// A GitHub user. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.SimpleUser? Actor { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.SimpleUser Actor { get; set; } +#endif + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The commit_id property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? CommitId { get; set; } +#nullable restore +#else + public string CommitId { get; set; } +#endif + /// The commit_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? CommitUrl { get; set; } +#nullable restore +#else + public string CommitUrl { get; set; } +#endif + /// The created_at property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? CreatedAt { get; set; } +#nullable restore +#else + public string CreatedAt { get; set; } +#endif + /// The event property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Event { get; set; } +#nullable restore +#else + public string Event { get; set; } +#endif + /// The id property + public int? Id { get; set; } + /// The label property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.LabeledIssueEvent_label? Label { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.LabeledIssueEvent_label Label { get; set; } +#endif + /// The node_id property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? NodeId { get; set; } +#nullable restore +#else + public string NodeId { get; set; } +#endif + /// 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. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.NullableIntegration? PerformedViaGithubApp { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.NullableIntegration PerformedViaGithubApp { get; set; } +#endif + /// The url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Url { get; set; } +#nullable restore +#else + public string Url { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public LabeledIssueEvent() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.LabeledIssueEvent CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.LabeledIssueEvent(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "actor", n => { Actor = n.GetObjectValue(global::Ayllu.Github.Client.Models.SimpleUser.CreateFromDiscriminatorValue); } }, + { "commit_id", n => { CommitId = n.GetStringValue(); } }, + { "commit_url", n => { CommitUrl = n.GetStringValue(); } }, + { "created_at", n => { CreatedAt = n.GetStringValue(); } }, + { "event", n => { Event = n.GetStringValue(); } }, + { "id", n => { Id = n.GetIntValue(); } }, + { "label", n => { Label = n.GetObjectValue(global::Ayllu.Github.Client.Models.LabeledIssueEvent_label.CreateFromDiscriminatorValue); } }, + { "node_id", n => { NodeId = n.GetStringValue(); } }, + { "performed_via_github_app", n => { PerformedViaGithubApp = n.GetObjectValue(global::Ayllu.Github.Client.Models.NullableIntegration.CreateFromDiscriminatorValue); } }, + { "url", n => { Url = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteObjectValue("actor", Actor); + writer.WriteStringValue("commit_id", CommitId); + writer.WriteStringValue("commit_url", CommitUrl); + writer.WriteStringValue("created_at", CreatedAt); + writer.WriteStringValue("event", Event); + writer.WriteIntValue("id", Id); + writer.WriteObjectValue("label", Label); + writer.WriteStringValue("node_id", NodeId); + writer.WriteObjectValue("performed_via_github_app", PerformedViaGithubApp); + writer.WriteStringValue("url", Url); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/LabeledIssueEvent_label.cs b/src/Ayllu.Github.Client/Github/Client/Models/LabeledIssueEvent_label.cs new file mode 100644 index 0000000..90518b9 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/LabeledIssueEvent_label.cs @@ -0,0 +1,75 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class LabeledIssueEvent_label : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The color property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Color { get; set; } +#nullable restore +#else + public string Color { get; set; } +#endif + /// The name property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Name { get; set; } +#nullable restore +#else + public string Name { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public LabeledIssueEvent_label() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.LabeledIssueEvent_label CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.LabeledIssueEvent_label(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "color", n => { Color = n.GetStringValue(); } }, + { "name", n => { Name = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("color", Color); + writer.WriteStringValue("name", Name); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/Labels.cs b/src/Ayllu.Github.Client/Github/Client/Models/Labels.cs new file mode 100644 index 0000000..afd3c69 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/Labels.cs @@ -0,0 +1,105 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class Labels : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The fragment property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Fragment { get; set; } +#nullable restore +#else + public string Fragment { get; set; } +#endif + /// The matches property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? Matches { get; set; } +#nullable restore +#else + public List Matches { get; set; } +#endif + /// The object_type property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? ObjectType { get; set; } +#nullable restore +#else + public string ObjectType { get; set; } +#endif + /// The object_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? ObjectUrl { get; set; } +#nullable restore +#else + public string ObjectUrl { get; set; } +#endif + /// The property property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Property { get; set; } +#nullable restore +#else + public string Property { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public Labels() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.Labels CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.Labels(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "fragment", n => { Fragment = n.GetStringValue(); } }, + { "matches", n => { Matches = n.GetCollectionOfObjectValues(global::Ayllu.Github.Client.Models.Labels_matches.CreateFromDiscriminatorValue)?.AsList(); } }, + { "object_type", n => { ObjectType = n.GetStringValue(); } }, + { "object_url", n => { ObjectUrl = n.GetStringValue(); } }, + { "property", n => { Property = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("fragment", Fragment); + writer.WriteCollectionOfObjectValues("matches", Matches); + writer.WriteStringValue("object_type", ObjectType); + writer.WriteStringValue("object_url", ObjectUrl); + writer.WriteStringValue("property", Property); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/Labels_matches.cs b/src/Ayllu.Github.Client/Github/Client/Models/Labels_matches.cs new file mode 100644 index 0000000..caf2a16 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/Labels_matches.cs @@ -0,0 +1,75 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class Labels_matches : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The indices property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? Indices { get; set; } +#nullable restore +#else + public List Indices { get; set; } +#endif + /// The text property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Text { get; set; } +#nullable restore +#else + public string Text { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public Labels_matches() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.Labels_matches CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.Labels_matches(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "indices", n => { Indices = n.GetCollectionOfPrimitiveValues()?.AsList(); } }, + { "text", n => { Text = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteCollectionOfPrimitiveValues("indices", Indices); + writer.WriteStringValue("text", Text); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/Language.cs b/src/Ayllu.Github.Client/Github/Client/Models/Language.cs new file mode 100644 index 0000000..47beb1f --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/Language.cs @@ -0,0 +1,56 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + /// + /// Language + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class Language : IAdditionalDataHolder, IParsable + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public Language() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.Language CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.Language(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/License.cs b/src/Ayllu.Github.Client/Github/Client/Models/License.cs new file mode 100644 index 0000000..d92e666 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/License.cs @@ -0,0 +1,180 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + /// + /// License + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class License : IAdditionalDataHolder, IParsable + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The body property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Body { get; set; } +#nullable restore +#else + public string Body { get; set; } +#endif + /// The conditions property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? Conditions { get; set; } +#nullable restore +#else + public List Conditions { get; set; } +#endif + /// The description property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Description { get; set; } +#nullable restore +#else + public string Description { get; set; } +#endif + /// The featured property + public bool? Featured { get; set; } + /// The html_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? HtmlUrl { get; set; } +#nullable restore +#else + public string HtmlUrl { get; set; } +#endif + /// The implementation property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Implementation { get; set; } +#nullable restore +#else + public string Implementation { get; set; } +#endif + /// The key property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Key { get; set; } +#nullable restore +#else + public string Key { get; set; } +#endif + /// The limitations property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? Limitations { get; set; } +#nullable restore +#else + public List Limitations { get; set; } +#endif + /// The name property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Name { get; set; } +#nullable restore +#else + public string Name { get; set; } +#endif + /// The node_id property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? NodeId { get; set; } +#nullable restore +#else + public string NodeId { get; set; } +#endif + /// The permissions property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? Permissions { get; set; } +#nullable restore +#else + public List Permissions { get; set; } +#endif + /// The spdx_id property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? SpdxId { get; set; } +#nullable restore +#else + public string SpdxId { get; set; } +#endif + /// The url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Url { get; set; } +#nullable restore +#else + public string Url { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public License() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.License CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.License(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "body", n => { Body = n.GetStringValue(); } }, + { "conditions", n => { Conditions = n.GetCollectionOfPrimitiveValues()?.AsList(); } }, + { "description", n => { Description = n.GetStringValue(); } }, + { "featured", n => { Featured = n.GetBoolValue(); } }, + { "html_url", n => { HtmlUrl = n.GetStringValue(); } }, + { "implementation", n => { Implementation = n.GetStringValue(); } }, + { "key", n => { Key = n.GetStringValue(); } }, + { "limitations", n => { Limitations = n.GetCollectionOfPrimitiveValues()?.AsList(); } }, + { "name", n => { Name = n.GetStringValue(); } }, + { "node_id", n => { NodeId = n.GetStringValue(); } }, + { "permissions", n => { Permissions = n.GetCollectionOfPrimitiveValues()?.AsList(); } }, + { "spdx_id", n => { SpdxId = n.GetStringValue(); } }, + { "url", n => { Url = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("body", Body); + writer.WriteCollectionOfPrimitiveValues("conditions", Conditions); + writer.WriteStringValue("description", Description); + writer.WriteBoolValue("featured", Featured); + writer.WriteStringValue("html_url", HtmlUrl); + writer.WriteStringValue("implementation", Implementation); + writer.WriteStringValue("key", Key); + writer.WriteCollectionOfPrimitiveValues("limitations", Limitations); + writer.WriteStringValue("name", Name); + writer.WriteStringValue("node_id", NodeId); + writer.WriteCollectionOfPrimitiveValues("permissions", Permissions); + writer.WriteStringValue("spdx_id", SpdxId); + writer.WriteStringValue("url", Url); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/LicenseContent.cs b/src/Ayllu.Github.Client/Github/Client/Models/LicenseContent.cs new file mode 100644 index 0000000..7bca022 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/LicenseContent.cs @@ -0,0 +1,180 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + /// + /// License Content + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class LicenseContent : IAdditionalDataHolder, IParsable + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The content property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Content { get; set; } +#nullable restore +#else + public string Content { get; set; } +#endif + /// The download_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? DownloadUrl { get; set; } +#nullable restore +#else + public string DownloadUrl { get; set; } +#endif + /// The encoding property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Encoding { get; set; } +#nullable restore +#else + public string Encoding { get; set; } +#endif + /// The git_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? GitUrl { get; set; } +#nullable restore +#else + public string GitUrl { get; set; } +#endif + /// The html_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? HtmlUrl { get; set; } +#nullable restore +#else + public string HtmlUrl { get; set; } +#endif + /// License Simple +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.NullableLicenseSimple? License { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.NullableLicenseSimple License { get; set; } +#endif + /// The _links property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.LicenseContent__links? Links { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.LicenseContent__links Links { get; set; } +#endif + /// The name property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Name { get; set; } +#nullable restore +#else + public string Name { get; set; } +#endif + /// The path property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Path { get; set; } +#nullable restore +#else + public string Path { get; set; } +#endif + /// The sha property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Sha { get; set; } +#nullable restore +#else + public string Sha { get; set; } +#endif + /// The size property + public int? Size { get; set; } + /// The type property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Type { get; set; } +#nullable restore +#else + public string Type { get; set; } +#endif + /// The url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Url { get; set; } +#nullable restore +#else + public string Url { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public LicenseContent() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.LicenseContent CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.LicenseContent(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "content", n => { Content = n.GetStringValue(); } }, + { "download_url", n => { DownloadUrl = n.GetStringValue(); } }, + { "encoding", n => { Encoding = n.GetStringValue(); } }, + { "git_url", n => { GitUrl = n.GetStringValue(); } }, + { "html_url", n => { HtmlUrl = n.GetStringValue(); } }, + { "license", n => { License = n.GetObjectValue(global::Ayllu.Github.Client.Models.NullableLicenseSimple.CreateFromDiscriminatorValue); } }, + { "_links", n => { Links = n.GetObjectValue(global::Ayllu.Github.Client.Models.LicenseContent__links.CreateFromDiscriminatorValue); } }, + { "name", n => { Name = n.GetStringValue(); } }, + { "path", n => { Path = n.GetStringValue(); } }, + { "sha", n => { Sha = n.GetStringValue(); } }, + { "size", n => { Size = n.GetIntValue(); } }, + { "type", n => { Type = n.GetStringValue(); } }, + { "url", n => { Url = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("content", Content); + writer.WriteStringValue("download_url", DownloadUrl); + writer.WriteStringValue("encoding", Encoding); + writer.WriteStringValue("git_url", GitUrl); + writer.WriteStringValue("html_url", HtmlUrl); + writer.WriteObjectValue("license", License); + writer.WriteObjectValue("_links", Links); + writer.WriteStringValue("name", Name); + writer.WriteStringValue("path", Path); + writer.WriteStringValue("sha", Sha); + writer.WriteIntValue("size", Size); + writer.WriteStringValue("type", Type); + writer.WriteStringValue("url", Url); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/LicenseContent__links.cs b/src/Ayllu.Github.Client/Github/Client/Models/LicenseContent__links.cs new file mode 100644 index 0000000..d6bfe36 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/LicenseContent__links.cs @@ -0,0 +1,85 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class LicenseContent__links : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The git property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Git { get; set; } +#nullable restore +#else + public string Git { get; set; } +#endif + /// The html property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Html { get; set; } +#nullable restore +#else + public string Html { get; set; } +#endif + /// The self property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Self { get; set; } +#nullable restore +#else + public string Self { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public LicenseContent__links() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.LicenseContent__links CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.LicenseContent__links(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "git", n => { Git = n.GetStringValue(); } }, + { "html", n => { Html = n.GetStringValue(); } }, + { "self", n => { Self = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("git", Git); + writer.WriteStringValue("html", Html); + writer.WriteStringValue("self", Self); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/LicenseSimple.cs b/src/Ayllu.Github.Client/Github/Client/Models/LicenseSimple.cs new file mode 100644 index 0000000..f6b0ddd --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/LicenseSimple.cs @@ -0,0 +1,116 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + /// + /// License Simple + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class LicenseSimple : IAdditionalDataHolder, IParsable + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The html_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? HtmlUrl { get; set; } +#nullable restore +#else + public string HtmlUrl { get; set; } +#endif + /// The key property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Key { get; set; } +#nullable restore +#else + public string Key { get; set; } +#endif + /// The name property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Name { get; set; } +#nullable restore +#else + public string Name { get; set; } +#endif + /// The node_id property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? NodeId { get; set; } +#nullable restore +#else + public string NodeId { get; set; } +#endif + /// The spdx_id property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? SpdxId { get; set; } +#nullable restore +#else + public string SpdxId { get; set; } +#endif + /// The url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Url { get; set; } +#nullable restore +#else + public string Url { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public LicenseSimple() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.LicenseSimple CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.LicenseSimple(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "html_url", n => { HtmlUrl = n.GetStringValue(); } }, + { "key", n => { Key = n.GetStringValue(); } }, + { "name", n => { Name = n.GetStringValue(); } }, + { "node_id", n => { NodeId = n.GetStringValue(); } }, + { "spdx_id", n => { SpdxId = n.GetStringValue(); } }, + { "url", n => { Url = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("html_url", HtmlUrl); + writer.WriteStringValue("key", Key); + writer.WriteStringValue("name", Name); + writer.WriteStringValue("node_id", NodeId); + writer.WriteStringValue("spdx_id", SpdxId); + writer.WriteStringValue("url", Url); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/Link.cs b/src/Ayllu.Github.Client/Github/Client/Models/Link.cs new file mode 100644 index 0000000..84383a6 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/Link.cs @@ -0,0 +1,66 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + /// + /// Hypermedia Link + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class Link : IAdditionalDataHolder, IParsable + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The href property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Href { get; set; } +#nullable restore +#else + public string Href { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public Link() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.Link CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.Link(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "href", n => { Href = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("href", Href); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/LinkWithType.cs b/src/Ayllu.Github.Client/Github/Client/Models/LinkWithType.cs new file mode 100644 index 0000000..1f32c64 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/LinkWithType.cs @@ -0,0 +1,76 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + /// + /// Hypermedia Link with Type + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class LinkWithType : IAdditionalDataHolder, IParsable + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The href property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Href { get; set; } +#nullable restore +#else + public string Href { get; set; } +#endif + /// The type property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Type { get; set; } +#nullable restore +#else + public string Type { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public LinkWithType() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.LinkWithType CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.LinkWithType(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "href", n => { Href = n.GetStringValue(); } }, + { "type", n => { Type = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("href", Href); + writer.WriteStringValue("type", Type); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/Locations503Error.cs b/src/Ayllu.Github.Client/Github/Client/Models/Locations503Error.cs new file mode 100644 index 0000000..dd53617 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/Locations503Error.cs @@ -0,0 +1,88 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class Locations503Error : ApiException, IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The code property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Code { get; set; } +#nullable restore +#else + public string Code { get; set; } +#endif + /// The documentation_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? DocumentationUrl { get; set; } +#nullable restore +#else + public string DocumentationUrl { get; set; } +#endif + /// The primary error message. + public override string Message { get => MessageEscaped ?? string.Empty; } + /// The message property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? MessageEscaped { get; set; } +#nullable restore +#else + public string MessageEscaped { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public Locations503Error() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.Locations503Error CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.Locations503Error(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "code", n => { Code = n.GetStringValue(); } }, + { "documentation_url", n => { DocumentationUrl = n.GetStringValue(); } }, + { "message", n => { MessageEscaped = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("code", Code); + writer.WriteStringValue("documentation_url", DocumentationUrl); + writer.WriteStringValue("message", MessageEscaped); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/LockedIssueEvent.cs b/src/Ayllu.Github.Client/Github/Client/Models/LockedIssueEvent.cs new file mode 100644 index 0000000..17b561b --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/LockedIssueEvent.cs @@ -0,0 +1,150 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + /// + /// Locked Issue Event + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class LockedIssueEvent : IAdditionalDataHolder, IParsable + { + /// A GitHub user. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.SimpleUser? Actor { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.SimpleUser Actor { get; set; } +#endif + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The commit_id property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? CommitId { get; set; } +#nullable restore +#else + public string CommitId { get; set; } +#endif + /// The commit_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? CommitUrl { get; set; } +#nullable restore +#else + public string CommitUrl { get; set; } +#endif + /// The created_at property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? CreatedAt { get; set; } +#nullable restore +#else + public string CreatedAt { get; set; } +#endif + /// The event property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Event { get; set; } +#nullable restore +#else + public string Event { get; set; } +#endif + /// The id property + public int? Id { get; set; } + /// The lock_reason property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? LockReason { get; set; } +#nullable restore +#else + public string LockReason { get; set; } +#endif + /// The node_id property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? NodeId { get; set; } +#nullable restore +#else + public string NodeId { get; set; } +#endif + /// 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. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.NullableIntegration? PerformedViaGithubApp { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.NullableIntegration PerformedViaGithubApp { get; set; } +#endif + /// The url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Url { get; set; } +#nullable restore +#else + public string Url { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public LockedIssueEvent() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.LockedIssueEvent CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.LockedIssueEvent(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "actor", n => { Actor = n.GetObjectValue(global::Ayllu.Github.Client.Models.SimpleUser.CreateFromDiscriminatorValue); } }, + { "commit_id", n => { CommitId = n.GetStringValue(); } }, + { "commit_url", n => { CommitUrl = n.GetStringValue(); } }, + { "created_at", n => { CreatedAt = n.GetStringValue(); } }, + { "event", n => { Event = n.GetStringValue(); } }, + { "id", n => { Id = n.GetIntValue(); } }, + { "lock_reason", n => { LockReason = n.GetStringValue(); } }, + { "node_id", n => { NodeId = n.GetStringValue(); } }, + { "performed_via_github_app", n => { PerformedViaGithubApp = n.GetObjectValue(global::Ayllu.Github.Client.Models.NullableIntegration.CreateFromDiscriminatorValue); } }, + { "url", n => { Url = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteObjectValue("actor", Actor); + writer.WriteStringValue("commit_id", CommitId); + writer.WriteStringValue("commit_url", CommitUrl); + writer.WriteStringValue("created_at", CreatedAt); + writer.WriteStringValue("event", Event); + writer.WriteIntValue("id", Id); + writer.WriteStringValue("lock_reason", LockReason); + writer.WriteStringValue("node_id", NodeId); + writer.WriteObjectValue("performed_via_github_app", PerformedViaGithubApp); + writer.WriteStringValue("url", Url); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/MarketplaceAccount.cs b/src/Ayllu.Github.Client/Github/Client/Models/MarketplaceAccount.cs new file mode 100644 index 0000000..1f49444 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/MarketplaceAccount.cs @@ -0,0 +1,119 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class MarketplaceAccount : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The email property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Email { get; set; } +#nullable restore +#else + public string Email { get; set; } +#endif + /// The id property + public int? Id { get; set; } + /// The login property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Login { get; set; } +#nullable restore +#else + public string Login { get; set; } +#endif + /// The node_id property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? NodeId { get; set; } +#nullable restore +#else + public string NodeId { get; set; } +#endif + /// The organization_billing_email property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? OrganizationBillingEmail { get; set; } +#nullable restore +#else + public string OrganizationBillingEmail { get; set; } +#endif + /// The type property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Type { get; set; } +#nullable restore +#else + public string Type { get; set; } +#endif + /// The url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Url { get; set; } +#nullable restore +#else + public string Url { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public MarketplaceAccount() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.MarketplaceAccount CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.MarketplaceAccount(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "email", n => { Email = n.GetStringValue(); } }, + { "id", n => { Id = n.GetIntValue(); } }, + { "login", n => { Login = n.GetStringValue(); } }, + { "node_id", n => { NodeId = n.GetStringValue(); } }, + { "organization_billing_email", n => { OrganizationBillingEmail = n.GetStringValue(); } }, + { "type", n => { Type = n.GetStringValue(); } }, + { "url", n => { Url = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("email", Email); + writer.WriteIntValue("id", Id); + writer.WriteStringValue("login", Login); + writer.WriteStringValue("node_id", NodeId); + writer.WriteStringValue("organization_billing_email", OrganizationBillingEmail); + writer.WriteStringValue("type", Type); + writer.WriteStringValue("url", Url); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/MarketplaceListingPlan.cs b/src/Ayllu.Github.Client/Github/Client/Models/MarketplaceListingPlan.cs new file mode 100644 index 0000000..a086e28 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/MarketplaceListingPlan.cs @@ -0,0 +1,150 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + /// + /// Marketplace Listing Plan + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class MarketplaceListingPlan : IAdditionalDataHolder, IParsable + { + /// The accounts_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? AccountsUrl { get; set; } +#nullable restore +#else + public string AccountsUrl { get; set; } +#endif + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The bullets property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? Bullets { get; set; } +#nullable restore +#else + public List Bullets { get; set; } +#endif + /// The description property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Description { get; set; } +#nullable restore +#else + public string Description { get; set; } +#endif + /// The has_free_trial property + public bool? HasFreeTrial { get; set; } + /// The id property + public int? Id { get; set; } + /// The monthly_price_in_cents property + public int? MonthlyPriceInCents { get; set; } + /// The name property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Name { get; set; } +#nullable restore +#else + public string Name { get; set; } +#endif + /// The number property + public int? Number { get; set; } + /// The price_model property + public global::Ayllu.Github.Client.Models.MarketplaceListingPlan_price_model? PriceModel { get; set; } + /// The state property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? State { get; set; } +#nullable restore +#else + public string State { get; set; } +#endif + /// The unit_name property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? UnitName { get; set; } +#nullable restore +#else + public string UnitName { get; set; } +#endif + /// The url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Url { get; set; } +#nullable restore +#else + public string Url { get; set; } +#endif + /// The yearly_price_in_cents property + public int? YearlyPriceInCents { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public MarketplaceListingPlan() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.MarketplaceListingPlan CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.MarketplaceListingPlan(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "accounts_url", n => { AccountsUrl = n.GetStringValue(); } }, + { "bullets", n => { Bullets = n.GetCollectionOfPrimitiveValues()?.AsList(); } }, + { "description", n => { Description = n.GetStringValue(); } }, + { "has_free_trial", n => { HasFreeTrial = n.GetBoolValue(); } }, + { "id", n => { Id = n.GetIntValue(); } }, + { "monthly_price_in_cents", n => { MonthlyPriceInCents = n.GetIntValue(); } }, + { "name", n => { Name = n.GetStringValue(); } }, + { "number", n => { Number = n.GetIntValue(); } }, + { "price_model", n => { PriceModel = n.GetEnumValue(); } }, + { "state", n => { State = n.GetStringValue(); } }, + { "unit_name", n => { UnitName = n.GetStringValue(); } }, + { "url", n => { Url = n.GetStringValue(); } }, + { "yearly_price_in_cents", n => { YearlyPriceInCents = n.GetIntValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("accounts_url", AccountsUrl); + writer.WriteCollectionOfPrimitiveValues("bullets", Bullets); + writer.WriteStringValue("description", Description); + writer.WriteBoolValue("has_free_trial", HasFreeTrial); + writer.WriteIntValue("id", Id); + writer.WriteIntValue("monthly_price_in_cents", MonthlyPriceInCents); + writer.WriteStringValue("name", Name); + writer.WriteIntValue("number", Number); + writer.WriteEnumValue("price_model", PriceModel); + writer.WriteStringValue("state", State); + writer.WriteStringValue("unit_name", UnitName); + writer.WriteStringValue("url", Url); + writer.WriteIntValue("yearly_price_in_cents", YearlyPriceInCents); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/MarketplaceListingPlan_price_model.cs b/src/Ayllu.Github.Client/Github/Client/Models/MarketplaceListingPlan_price_model.cs new file mode 100644 index 0000000..516746c --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/MarketplaceListingPlan_price_model.cs @@ -0,0 +1,24 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public enum MarketplaceListingPlan_price_model + #pragma warning restore CS1591 + { + [EnumMember(Value = "FREE")] + #pragma warning disable CS1591 + FREE, + #pragma warning restore CS1591 + [EnumMember(Value = "FLAT_RATE")] + #pragma warning disable CS1591 + FLAT_RATE, + #pragma warning restore CS1591 + [EnumMember(Value = "PER_UNIT")] + #pragma warning disable CS1591 + PER_UNIT, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Models/MarketplacePurchase.cs b/src/Ayllu.Github.Client/Github/Client/Models/MarketplacePurchase.cs new file mode 100644 index 0000000..f4b159e --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/MarketplacePurchase.cs @@ -0,0 +1,130 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + /// + /// Marketplace Purchase + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class MarketplacePurchase : IAdditionalDataHolder, IParsable + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The email property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Email { get; set; } +#nullable restore +#else + public string Email { get; set; } +#endif + /// The id property + public int? Id { get; set; } + /// The login property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Login { get; set; } +#nullable restore +#else + public string Login { get; set; } +#endif + /// The marketplace_pending_change property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.MarketplacePurchase_marketplace_pending_change? MarketplacePendingChange { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.MarketplacePurchase_marketplace_pending_change MarketplacePendingChange { get; set; } +#endif + /// The marketplace_purchase property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.MarketplacePurchase_marketplace_purchase? MarketplacePurchaseProp { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.MarketplacePurchase_marketplace_purchase MarketplacePurchaseProp { get; set; } +#endif + /// The organization_billing_email property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? OrganizationBillingEmail { get; set; } +#nullable restore +#else + public string OrganizationBillingEmail { get; set; } +#endif + /// The type property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Type { get; set; } +#nullable restore +#else + public string Type { get; set; } +#endif + /// The url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Url { get; set; } +#nullable restore +#else + public string Url { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public MarketplacePurchase() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.MarketplacePurchase CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.MarketplacePurchase(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "email", n => { Email = n.GetStringValue(); } }, + { "id", n => { Id = n.GetIntValue(); } }, + { "login", n => { Login = n.GetStringValue(); } }, + { "marketplace_pending_change", n => { MarketplacePendingChange = n.GetObjectValue(global::Ayllu.Github.Client.Models.MarketplacePurchase_marketplace_pending_change.CreateFromDiscriminatorValue); } }, + { "marketplace_purchase", n => { MarketplacePurchaseProp = n.GetObjectValue(global::Ayllu.Github.Client.Models.MarketplacePurchase_marketplace_purchase.CreateFromDiscriminatorValue); } }, + { "organization_billing_email", n => { OrganizationBillingEmail = n.GetStringValue(); } }, + { "type", n => { Type = n.GetStringValue(); } }, + { "url", n => { Url = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("email", Email); + writer.WriteIntValue("id", Id); + writer.WriteStringValue("login", Login); + writer.WriteObjectValue("marketplace_pending_change", MarketplacePendingChange); + writer.WriteObjectValue("marketplace_purchase", MarketplacePurchaseProp); + writer.WriteStringValue("organization_billing_email", OrganizationBillingEmail); + writer.WriteStringValue("type", Type); + writer.WriteStringValue("url", Url); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/MarketplacePurchase_marketplace_pending_change.cs b/src/Ayllu.Github.Client/Github/Client/Models/MarketplacePurchase_marketplace_pending_change.cs new file mode 100644 index 0000000..3d61a0a --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/MarketplacePurchase_marketplace_pending_change.cs @@ -0,0 +1,87 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class MarketplacePurchase_marketplace_pending_change : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The effective_date property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? EffectiveDate { get; set; } +#nullable restore +#else + public string EffectiveDate { get; set; } +#endif + /// The id property + public int? Id { get; set; } + /// The is_installed property + public bool? IsInstalled { get; set; } + /// Marketplace Listing Plan +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.MarketplaceListingPlan? Plan { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.MarketplaceListingPlan Plan { get; set; } +#endif + /// The unit_count property + public int? UnitCount { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public MarketplacePurchase_marketplace_pending_change() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.MarketplacePurchase_marketplace_pending_change CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.MarketplacePurchase_marketplace_pending_change(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "effective_date", n => { EffectiveDate = n.GetStringValue(); } }, + { "id", n => { Id = n.GetIntValue(); } }, + { "is_installed", n => { IsInstalled = n.GetBoolValue(); } }, + { "plan", n => { Plan = n.GetObjectValue(global::Ayllu.Github.Client.Models.MarketplaceListingPlan.CreateFromDiscriminatorValue); } }, + { "unit_count", n => { UnitCount = n.GetIntValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("effective_date", EffectiveDate); + writer.WriteIntValue("id", Id); + writer.WriteBoolValue("is_installed", IsInstalled); + writer.WriteObjectValue("plan", Plan); + writer.WriteIntValue("unit_count", UnitCount); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/MarketplacePurchase_marketplace_purchase.cs b/src/Ayllu.Github.Client/Github/Client/Models/MarketplacePurchase_marketplace_purchase.cs new file mode 100644 index 0000000..c5cbe1b --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/MarketplacePurchase_marketplace_purchase.cs @@ -0,0 +1,117 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class MarketplacePurchase_marketplace_purchase : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The billing_cycle property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? BillingCycle { get; set; } +#nullable restore +#else + public string BillingCycle { get; set; } +#endif + /// The free_trial_ends_on property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? FreeTrialEndsOn { get; set; } +#nullable restore +#else + public string FreeTrialEndsOn { get; set; } +#endif + /// The is_installed property + public bool? IsInstalled { get; set; } + /// The next_billing_date property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? NextBillingDate { get; set; } +#nullable restore +#else + public string NextBillingDate { get; set; } +#endif + /// The on_free_trial property + public bool? OnFreeTrial { get; set; } + /// Marketplace Listing Plan +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.MarketplaceListingPlan? Plan { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.MarketplaceListingPlan Plan { get; set; } +#endif + /// The unit_count property + public int? UnitCount { get; set; } + /// The updated_at property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? UpdatedAt { get; set; } +#nullable restore +#else + public string UpdatedAt { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public MarketplacePurchase_marketplace_purchase() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.MarketplacePurchase_marketplace_purchase CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.MarketplacePurchase_marketplace_purchase(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "billing_cycle", n => { BillingCycle = n.GetStringValue(); } }, + { "free_trial_ends_on", n => { FreeTrialEndsOn = n.GetStringValue(); } }, + { "is_installed", n => { IsInstalled = n.GetBoolValue(); } }, + { "next_billing_date", n => { NextBillingDate = n.GetStringValue(); } }, + { "on_free_trial", n => { OnFreeTrial = n.GetBoolValue(); } }, + { "plan", n => { Plan = n.GetObjectValue(global::Ayllu.Github.Client.Models.MarketplaceListingPlan.CreateFromDiscriminatorValue); } }, + { "unit_count", n => { UnitCount = n.GetIntValue(); } }, + { "updated_at", n => { UpdatedAt = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("billing_cycle", BillingCycle); + writer.WriteStringValue("free_trial_ends_on", FreeTrialEndsOn); + writer.WriteBoolValue("is_installed", IsInstalled); + writer.WriteStringValue("next_billing_date", NextBillingDate); + writer.WriteBoolValue("on_free_trial", OnFreeTrial); + writer.WriteObjectValue("plan", Plan); + writer.WriteIntValue("unit_count", UnitCount); + writer.WriteStringValue("updated_at", UpdatedAt); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/MergedUpstream.cs b/src/Ayllu.Github.Client/Github/Client/Models/MergedUpstream.cs new file mode 100644 index 0000000..f55a386 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/MergedUpstream.cs @@ -0,0 +1,80 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + /// + /// Results of a successful merge upstream request + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class MergedUpstream : IAdditionalDataHolder, IParsable + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The base_branch property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? BaseBranch { get; set; } +#nullable restore +#else + public string BaseBranch { get; set; } +#endif + /// The merge_type property + public global::Ayllu.Github.Client.Models.MergedUpstream_merge_type? MergeType { get; set; } + /// The message property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Message { get; set; } +#nullable restore +#else + public string Message { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public MergedUpstream() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.MergedUpstream CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.MergedUpstream(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "base_branch", n => { BaseBranch = n.GetStringValue(); } }, + { "merge_type", n => { MergeType = n.GetEnumValue(); } }, + { "message", n => { Message = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("base_branch", BaseBranch); + writer.WriteEnumValue("merge_type", MergeType); + writer.WriteStringValue("message", Message); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/MergedUpstream_merge_type.cs b/src/Ayllu.Github.Client/Github/Client/Models/MergedUpstream_merge_type.cs new file mode 100644 index 0000000..c7ebeea --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/MergedUpstream_merge_type.cs @@ -0,0 +1,24 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public enum MergedUpstream_merge_type + #pragma warning restore CS1591 + { + [EnumMember(Value = "merge")] + #pragma warning disable CS1591 + Merge, + #pragma warning restore CS1591 + [EnumMember(Value = "fast-forward")] + #pragma warning disable CS1591 + FastForward, + #pragma warning restore CS1591 + [EnumMember(Value = "none")] + #pragma warning disable CS1591 + None, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Models/Metadata.cs b/src/Ayllu.Github.Client/Github/Client/Models/Metadata.cs new file mode 100644 index 0000000..33c10cc --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/Metadata.cs @@ -0,0 +1,56 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + /// + /// User-defined metadata to store domain-specific information limited to 8 keys with scalar values. + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class Metadata : IAdditionalDataHolder, IParsable + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public Metadata() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.Metadata CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.Metadata(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/Migration.cs b/src/Ayllu.Github.Client/Github/Client/Models/Migration.cs new file mode 100644 index 0000000..38c8fac --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/Migration.cs @@ -0,0 +1,176 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + /// + /// A migration. + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class Migration : IAdditionalDataHolder, IParsable + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The archive_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? ArchiveUrl { get; set; } +#nullable restore +#else + public string ArchiveUrl { get; set; } +#endif + /// The created_at property + public DateTimeOffset? CreatedAt { get; set; } + /// Exclude related items from being returned in the response in order to improve performance of the request. The array can include any of: `"repositories"`. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? Exclude { get; set; } +#nullable restore +#else + public List Exclude { get; set; } +#endif + /// The exclude_attachments property + public bool? ExcludeAttachments { get; set; } + /// The exclude_git_data property + public bool? ExcludeGitData { get; set; } + /// The exclude_metadata property + public bool? ExcludeMetadata { get; set; } + /// The exclude_owner_projects property + public bool? ExcludeOwnerProjects { get; set; } + /// The exclude_releases property + public bool? ExcludeReleases { get; set; } + /// The guid property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Guid { get; set; } +#nullable restore +#else + public string Guid { get; set; } +#endif + /// The id property + public long? Id { get; set; } + /// The lock_repositories property + public bool? LockRepositories { get; set; } + /// The node_id property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? NodeId { get; set; } +#nullable restore +#else + public string NodeId { get; set; } +#endif + /// The org_metadata_only property + public bool? OrgMetadataOnly { get; set; } + /// A GitHub user. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.NullableSimpleUser? Owner { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.NullableSimpleUser Owner { get; set; } +#endif + /// The repositories included in the migration. Only returned for export migrations. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? Repositories { get; set; } +#nullable restore +#else + public List Repositories { get; set; } +#endif + /// The state property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? State { get; set; } +#nullable restore +#else + public string State { get; set; } +#endif + /// The updated_at property + public DateTimeOffset? UpdatedAt { get; set; } + /// The url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Url { get; set; } +#nullable restore +#else + public string Url { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public Migration() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.Migration CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.Migration(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "archive_url", n => { ArchiveUrl = n.GetStringValue(); } }, + { "created_at", n => { CreatedAt = n.GetDateTimeOffsetValue(); } }, + { "exclude", n => { Exclude = n.GetCollectionOfPrimitiveValues()?.AsList(); } }, + { "exclude_attachments", n => { ExcludeAttachments = n.GetBoolValue(); } }, + { "exclude_git_data", n => { ExcludeGitData = n.GetBoolValue(); } }, + { "exclude_metadata", n => { ExcludeMetadata = n.GetBoolValue(); } }, + { "exclude_owner_projects", n => { ExcludeOwnerProjects = n.GetBoolValue(); } }, + { "exclude_releases", n => { ExcludeReleases = n.GetBoolValue(); } }, + { "guid", n => { Guid = n.GetStringValue(); } }, + { "id", n => { Id = n.GetLongValue(); } }, + { "lock_repositories", n => { LockRepositories = n.GetBoolValue(); } }, + { "node_id", n => { NodeId = n.GetStringValue(); } }, + { "org_metadata_only", n => { OrgMetadataOnly = n.GetBoolValue(); } }, + { "owner", n => { Owner = n.GetObjectValue(global::Ayllu.Github.Client.Models.NullableSimpleUser.CreateFromDiscriminatorValue); } }, + { "repositories", n => { Repositories = n.GetCollectionOfObjectValues(global::Ayllu.Github.Client.Models.Repository.CreateFromDiscriminatorValue)?.AsList(); } }, + { "state", n => { State = n.GetStringValue(); } }, + { "updated_at", n => { UpdatedAt = n.GetDateTimeOffsetValue(); } }, + { "url", n => { Url = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("archive_url", ArchiveUrl); + writer.WriteDateTimeOffsetValue("created_at", CreatedAt); + writer.WriteCollectionOfPrimitiveValues("exclude", Exclude); + writer.WriteBoolValue("exclude_attachments", ExcludeAttachments); + writer.WriteBoolValue("exclude_git_data", ExcludeGitData); + writer.WriteBoolValue("exclude_metadata", ExcludeMetadata); + writer.WriteBoolValue("exclude_owner_projects", ExcludeOwnerProjects); + writer.WriteBoolValue("exclude_releases", ExcludeReleases); + writer.WriteStringValue("guid", Guid); + writer.WriteLongValue("id", Id); + writer.WriteBoolValue("lock_repositories", LockRepositories); + writer.WriteStringValue("node_id", NodeId); + writer.WriteBoolValue("org_metadata_only", OrgMetadataOnly); + writer.WriteObjectValue("owner", Owner); + writer.WriteCollectionOfObjectValues("repositories", Repositories); + writer.WriteStringValue("state", State); + writer.WriteDateTimeOffsetValue("updated_at", UpdatedAt); + writer.WriteStringValue("url", Url); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/Milestone.cs b/src/Ayllu.Github.Client/Github/Client/Models/Milestone.cs new file mode 100644 index 0000000..3bb77b8 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/Milestone.cs @@ -0,0 +1,163 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + /// + /// A collection of related issues and pull requests. + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class Milestone : IAdditionalDataHolder, IParsable + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The closed_at property + public DateTimeOffset? ClosedAt { get; set; } + /// The closed_issues property + public int? ClosedIssues { get; set; } + /// The created_at property + public DateTimeOffset? CreatedAt { get; set; } + /// A GitHub user. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.NullableSimpleUser? Creator { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.NullableSimpleUser Creator { get; set; } +#endif + /// The description property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Description { get; set; } +#nullable restore +#else + public string Description { get; set; } +#endif + /// The due_on property + public DateTimeOffset? DueOn { get; set; } + /// The html_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? HtmlUrl { get; set; } +#nullable restore +#else + public string HtmlUrl { get; set; } +#endif + /// The id property + public int? Id { get; set; } + /// The labels_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? LabelsUrl { get; set; } +#nullable restore +#else + public string LabelsUrl { get; set; } +#endif + /// The node_id property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? NodeId { get; set; } +#nullable restore +#else + public string NodeId { get; set; } +#endif + /// The number of the milestone. + public int? Number { get; set; } + /// The open_issues property + public int? OpenIssues { get; set; } + /// The state of the milestone. + public global::Ayllu.Github.Client.Models.Milestone_state? State { get; set; } + /// The title of the milestone. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Title { get; set; } +#nullable restore +#else + public string Title { get; set; } +#endif + /// The updated_at property + public DateTimeOffset? UpdatedAt { get; set; } + /// The url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Url { get; set; } +#nullable restore +#else + public string Url { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public Milestone() + { + AdditionalData = new Dictionary(); + State = global::Ayllu.Github.Client.Models.Milestone_state.Open; + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.Milestone CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.Milestone(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "closed_at", n => { ClosedAt = n.GetDateTimeOffsetValue(); } }, + { "closed_issues", n => { ClosedIssues = n.GetIntValue(); } }, + { "created_at", n => { CreatedAt = n.GetDateTimeOffsetValue(); } }, + { "creator", n => { Creator = n.GetObjectValue(global::Ayllu.Github.Client.Models.NullableSimpleUser.CreateFromDiscriminatorValue); } }, + { "description", n => { Description = n.GetStringValue(); } }, + { "due_on", n => { DueOn = n.GetDateTimeOffsetValue(); } }, + { "html_url", n => { HtmlUrl = n.GetStringValue(); } }, + { "id", n => { Id = n.GetIntValue(); } }, + { "labels_url", n => { LabelsUrl = n.GetStringValue(); } }, + { "node_id", n => { NodeId = n.GetStringValue(); } }, + { "number", n => { Number = n.GetIntValue(); } }, + { "open_issues", n => { OpenIssues = n.GetIntValue(); } }, + { "state", n => { State = n.GetEnumValue(); } }, + { "title", n => { Title = n.GetStringValue(); } }, + { "updated_at", n => { UpdatedAt = n.GetDateTimeOffsetValue(); } }, + { "url", n => { Url = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteDateTimeOffsetValue("closed_at", ClosedAt); + writer.WriteIntValue("closed_issues", ClosedIssues); + writer.WriteDateTimeOffsetValue("created_at", CreatedAt); + writer.WriteObjectValue("creator", Creator); + writer.WriteStringValue("description", Description); + writer.WriteDateTimeOffsetValue("due_on", DueOn); + writer.WriteStringValue("html_url", HtmlUrl); + writer.WriteIntValue("id", Id); + writer.WriteStringValue("labels_url", LabelsUrl); + writer.WriteStringValue("node_id", NodeId); + writer.WriteIntValue("number", Number); + writer.WriteIntValue("open_issues", OpenIssues); + writer.WriteEnumValue("state", State); + writer.WriteStringValue("title", Title); + writer.WriteDateTimeOffsetValue("updated_at", UpdatedAt); + writer.WriteStringValue("url", Url); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/Milestone_state.cs b/src/Ayllu.Github.Client/Github/Client/Models/Milestone_state.cs new file mode 100644 index 0000000..b84eab6 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/Milestone_state.cs @@ -0,0 +1,19 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Models +{ + /// The state of the milestone. + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public enum Milestone_state + { + [EnumMember(Value = "open")] + #pragma warning disable CS1591 + Open, + #pragma warning restore CS1591 + [EnumMember(Value = "closed")] + #pragma warning disable CS1591 + Closed, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Models/MilestonedIssueEvent.cs b/src/Ayllu.Github.Client/Github/Client/Models/MilestonedIssueEvent.cs new file mode 100644 index 0000000..d07c99b --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/MilestonedIssueEvent.cs @@ -0,0 +1,150 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + /// + /// Milestoned Issue Event + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class MilestonedIssueEvent : IAdditionalDataHolder, IParsable + { + /// A GitHub user. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.SimpleUser? Actor { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.SimpleUser Actor { get; set; } +#endif + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The commit_id property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? CommitId { get; set; } +#nullable restore +#else + public string CommitId { get; set; } +#endif + /// The commit_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? CommitUrl { get; set; } +#nullable restore +#else + public string CommitUrl { get; set; } +#endif + /// The created_at property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? CreatedAt { get; set; } +#nullable restore +#else + public string CreatedAt { get; set; } +#endif + /// The event property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Event { get; set; } +#nullable restore +#else + public string Event { get; set; } +#endif + /// The id property + public int? Id { get; set; } + /// The milestone property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.MilestonedIssueEvent_milestone? Milestone { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.MilestonedIssueEvent_milestone Milestone { get; set; } +#endif + /// The node_id property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? NodeId { get; set; } +#nullable restore +#else + public string NodeId { get; set; } +#endif + /// 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. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.NullableIntegration? PerformedViaGithubApp { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.NullableIntegration PerformedViaGithubApp { get; set; } +#endif + /// The url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Url { get; set; } +#nullable restore +#else + public string Url { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public MilestonedIssueEvent() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.MilestonedIssueEvent CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.MilestonedIssueEvent(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "actor", n => { Actor = n.GetObjectValue(global::Ayllu.Github.Client.Models.SimpleUser.CreateFromDiscriminatorValue); } }, + { "commit_id", n => { CommitId = n.GetStringValue(); } }, + { "commit_url", n => { CommitUrl = n.GetStringValue(); } }, + { "created_at", n => { CreatedAt = n.GetStringValue(); } }, + { "event", n => { Event = n.GetStringValue(); } }, + { "id", n => { Id = n.GetIntValue(); } }, + { "milestone", n => { Milestone = n.GetObjectValue(global::Ayllu.Github.Client.Models.MilestonedIssueEvent_milestone.CreateFromDiscriminatorValue); } }, + { "node_id", n => { NodeId = n.GetStringValue(); } }, + { "performed_via_github_app", n => { PerformedViaGithubApp = n.GetObjectValue(global::Ayllu.Github.Client.Models.NullableIntegration.CreateFromDiscriminatorValue); } }, + { "url", n => { Url = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteObjectValue("actor", Actor); + writer.WriteStringValue("commit_id", CommitId); + writer.WriteStringValue("commit_url", CommitUrl); + writer.WriteStringValue("created_at", CreatedAt); + writer.WriteStringValue("event", Event); + writer.WriteIntValue("id", Id); + writer.WriteObjectValue("milestone", Milestone); + writer.WriteStringValue("node_id", NodeId); + writer.WriteObjectValue("performed_via_github_app", PerformedViaGithubApp); + writer.WriteStringValue("url", Url); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/MilestonedIssueEvent_milestone.cs b/src/Ayllu.Github.Client/Github/Client/Models/MilestonedIssueEvent_milestone.cs new file mode 100644 index 0000000..0e57075 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/MilestonedIssueEvent_milestone.cs @@ -0,0 +1,65 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class MilestonedIssueEvent_milestone : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The title property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Title { get; set; } +#nullable restore +#else + public string Title { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public MilestonedIssueEvent_milestone() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.MilestonedIssueEvent_milestone CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.MilestonedIssueEvent_milestone(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "title", n => { Title = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("title", Title); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/MinimalRepository.cs b/src/Ayllu.Github.Client/Github/Client/Models/MinimalRepository.cs new file mode 100644 index 0000000..58285f3 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/MinimalRepository.cs @@ -0,0 +1,768 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + /// + /// Minimal Repository + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class MinimalRepository : IAdditionalDataHolder, IParsable + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The allow_forking property + public bool? AllowForking { get; set; } + /// The archived property + public bool? Archived { get; set; } + /// The archive_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? ArchiveUrl { get; set; } +#nullable restore +#else + public string ArchiveUrl { get; set; } +#endif + /// The assignees_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? AssigneesUrl { get; set; } +#nullable restore +#else + public string AssigneesUrl { get; set; } +#endif + /// The blobs_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? BlobsUrl { get; set; } +#nullable restore +#else + public string BlobsUrl { get; set; } +#endif + /// The branches_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? BranchesUrl { get; set; } +#nullable restore +#else + public string BranchesUrl { get; set; } +#endif + /// The clone_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? CloneUrl { get; set; } +#nullable restore +#else + public string CloneUrl { get; set; } +#endif + /// Code Of Conduct +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.CodeOfConduct? CodeOfConduct { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.CodeOfConduct CodeOfConduct { get; set; } +#endif + /// The collaborators_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? CollaboratorsUrl { get; set; } +#nullable restore +#else + public string CollaboratorsUrl { get; set; } +#endif + /// The comments_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? CommentsUrl { get; set; } +#nullable restore +#else + public string CommentsUrl { get; set; } +#endif + /// The commits_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? CommitsUrl { get; set; } +#nullable restore +#else + public string CommitsUrl { get; set; } +#endif + /// The compare_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? CompareUrl { get; set; } +#nullable restore +#else + public string CompareUrl { get; set; } +#endif + /// The contents_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? ContentsUrl { get; set; } +#nullable restore +#else + public string ContentsUrl { get; set; } +#endif + /// The contributors_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? ContributorsUrl { get; set; } +#nullable restore +#else + public string ContributorsUrl { get; set; } +#endif + /// The created_at property + public DateTimeOffset? CreatedAt { get; set; } + /// 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. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.MinimalRepository_custom_properties? CustomProperties { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.MinimalRepository_custom_properties CustomProperties { get; set; } +#endif + /// The default_branch property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? DefaultBranch { get; set; } +#nullable restore +#else + public string DefaultBranch { get; set; } +#endif + /// The delete_branch_on_merge property + public bool? DeleteBranchOnMerge { get; set; } + /// The deployments_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? DeploymentsUrl { get; set; } +#nullable restore +#else + public string DeploymentsUrl { get; set; } +#endif + /// The description property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Description { get; set; } +#nullable restore +#else + public string Description { get; set; } +#endif + /// The disabled property + public bool? Disabled { get; set; } + /// The downloads_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? DownloadsUrl { get; set; } +#nullable restore +#else + public string DownloadsUrl { get; set; } +#endif + /// The events_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? EventsUrl { get; set; } +#nullable restore +#else + public string EventsUrl { get; set; } +#endif + /// The fork property + public bool? Fork { get; set; } + /// The forks property + public int? Forks { get; set; } + /// The forks_count property + public int? ForksCount { get; set; } + /// The forks_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? ForksUrl { get; set; } +#nullable restore +#else + public string ForksUrl { get; set; } +#endif + /// The full_name property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? FullName { get; set; } +#nullable restore +#else + public string FullName { get; set; } +#endif + /// The git_commits_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? GitCommitsUrl { get; set; } +#nullable restore +#else + public string GitCommitsUrl { get; set; } +#endif + /// The git_refs_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? GitRefsUrl { get; set; } +#nullable restore +#else + public string GitRefsUrl { get; set; } +#endif + /// The git_tags_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? GitTagsUrl { get; set; } +#nullable restore +#else + public string GitTagsUrl { get; set; } +#endif + /// The git_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? GitUrl { get; set; } +#nullable restore +#else + public string GitUrl { get; set; } +#endif + /// The has_discussions property + public bool? HasDiscussions { get; set; } + /// The has_downloads property + public bool? HasDownloads { get; set; } + /// The has_issues property + public bool? HasIssues { get; set; } + /// The has_pages property + public bool? HasPages { get; set; } + /// The has_projects property + public bool? HasProjects { get; set; } + /// The has_wiki property + public bool? HasWiki { get; set; } + /// The homepage property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Homepage { get; set; } +#nullable restore +#else + public string Homepage { get; set; } +#endif + /// The hooks_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? HooksUrl { get; set; } +#nullable restore +#else + public string HooksUrl { get; set; } +#endif + /// The html_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? HtmlUrl { get; set; } +#nullable restore +#else + public string HtmlUrl { get; set; } +#endif + /// The id property + public long? Id { get; set; } + /// The issue_comment_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? IssueCommentUrl { get; set; } +#nullable restore +#else + public string IssueCommentUrl { get; set; } +#endif + /// The issue_events_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? IssueEventsUrl { get; set; } +#nullable restore +#else + public string IssueEventsUrl { get; set; } +#endif + /// The issues_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? IssuesUrl { get; set; } +#nullable restore +#else + public string IssuesUrl { get; set; } +#endif + /// The is_template property + public bool? IsTemplate { get; set; } + /// The keys_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? KeysUrl { get; set; } +#nullable restore +#else + public string KeysUrl { get; set; } +#endif + /// The labels_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? LabelsUrl { get; set; } +#nullable restore +#else + public string LabelsUrl { get; set; } +#endif + /// The language property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Language { get; set; } +#nullable restore +#else + public string Language { get; set; } +#endif + /// The languages_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? LanguagesUrl { get; set; } +#nullable restore +#else + public string LanguagesUrl { get; set; } +#endif + /// The license property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.MinimalRepository_license? License { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.MinimalRepository_license License { get; set; } +#endif + /// The merges_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? MergesUrl { get; set; } +#nullable restore +#else + public string MergesUrl { get; set; } +#endif + /// The milestones_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? MilestonesUrl { get; set; } +#nullable restore +#else + public string MilestonesUrl { get; set; } +#endif + /// The mirror_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? MirrorUrl { get; set; } +#nullable restore +#else + public string MirrorUrl { get; set; } +#endif + /// The name property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Name { get; set; } +#nullable restore +#else + public string Name { get; set; } +#endif + /// The network_count property + public int? NetworkCount { get; set; } + /// The node_id property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? NodeId { get; set; } +#nullable restore +#else + public string NodeId { get; set; } +#endif + /// The notifications_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? NotificationsUrl { get; set; } +#nullable restore +#else + public string NotificationsUrl { get; set; } +#endif + /// The open_issues property + public int? OpenIssues { get; set; } + /// The open_issues_count property + public int? OpenIssuesCount { get; set; } + /// A GitHub user. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.SimpleUser? Owner { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.SimpleUser Owner { get; set; } +#endif + /// The permissions property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.MinimalRepository_permissions? Permissions { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.MinimalRepository_permissions Permissions { get; set; } +#endif + /// The private property + public bool? Private { get; set; } + /// The pulls_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? PullsUrl { get; set; } +#nullable restore +#else + public string PullsUrl { get; set; } +#endif + /// The pushed_at property + public DateTimeOffset? PushedAt { get; set; } + /// The releases_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? ReleasesUrl { get; set; } +#nullable restore +#else + public string ReleasesUrl { get; set; } +#endif + /// The role_name property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? RoleName { get; set; } +#nullable restore +#else + public string RoleName { get; set; } +#endif + /// The security_and_analysis property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.SecurityAndAnalysis? SecurityAndAnalysis { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.SecurityAndAnalysis SecurityAndAnalysis { get; set; } +#endif + /// The size of the repository, in kilobytes. Size is calculated hourly. When a repository is initially created, the size is 0. + public int? Size { get; set; } + /// The ssh_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? SshUrl { get; set; } +#nullable restore +#else + public string SshUrl { get; set; } +#endif + /// The stargazers_count property + public int? StargazersCount { get; set; } + /// The stargazers_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? StargazersUrl { get; set; } +#nullable restore +#else + public string StargazersUrl { get; set; } +#endif + /// The statuses_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? StatusesUrl { get; set; } +#nullable restore +#else + public string StatusesUrl { get; set; } +#endif + /// The subscribers_count property + public int? SubscribersCount { get; set; } + /// The subscribers_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? SubscribersUrl { get; set; } +#nullable restore +#else + public string SubscribersUrl { get; set; } +#endif + /// The subscription_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? SubscriptionUrl { get; set; } +#nullable restore +#else + public string SubscriptionUrl { get; set; } +#endif + /// The svn_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? SvnUrl { get; set; } +#nullable restore +#else + public string SvnUrl { get; set; } +#endif + /// The tags_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? TagsUrl { get; set; } +#nullable restore +#else + public string TagsUrl { get; set; } +#endif + /// The teams_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? TeamsUrl { get; set; } +#nullable restore +#else + public string TeamsUrl { get; set; } +#endif + /// The temp_clone_token property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? TempCloneToken { get; set; } +#nullable restore +#else + public string TempCloneToken { get; set; } +#endif + /// The topics property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? Topics { get; set; } +#nullable restore +#else + public List Topics { get; set; } +#endif + /// The trees_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? TreesUrl { get; set; } +#nullable restore +#else + public string TreesUrl { get; set; } +#endif + /// The updated_at property + public DateTimeOffset? UpdatedAt { get; set; } + /// The url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Url { get; set; } +#nullable restore +#else + public string Url { get; set; } +#endif + /// The visibility property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Visibility { get; set; } +#nullable restore +#else + public string Visibility { get; set; } +#endif + /// The watchers property + public int? Watchers { get; set; } + /// The watchers_count property + public int? WatchersCount { get; set; } + /// The web_commit_signoff_required property + public bool? WebCommitSignoffRequired { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public MinimalRepository() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.MinimalRepository CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.MinimalRepository(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "allow_forking", n => { AllowForking = n.GetBoolValue(); } }, + { "archive_url", n => { ArchiveUrl = n.GetStringValue(); } }, + { "archived", n => { Archived = n.GetBoolValue(); } }, + { "assignees_url", n => { AssigneesUrl = n.GetStringValue(); } }, + { "blobs_url", n => { BlobsUrl = n.GetStringValue(); } }, + { "branches_url", n => { BranchesUrl = n.GetStringValue(); } }, + { "clone_url", n => { CloneUrl = n.GetStringValue(); } }, + { "code_of_conduct", n => { CodeOfConduct = n.GetObjectValue(global::Ayllu.Github.Client.Models.CodeOfConduct.CreateFromDiscriminatorValue); } }, + { "collaborators_url", n => { CollaboratorsUrl = n.GetStringValue(); } }, + { "comments_url", n => { CommentsUrl = n.GetStringValue(); } }, + { "commits_url", n => { CommitsUrl = n.GetStringValue(); } }, + { "compare_url", n => { CompareUrl = n.GetStringValue(); } }, + { "contents_url", n => { ContentsUrl = n.GetStringValue(); } }, + { "contributors_url", n => { ContributorsUrl = n.GetStringValue(); } }, + { "created_at", n => { CreatedAt = n.GetDateTimeOffsetValue(); } }, + { "custom_properties", n => { CustomProperties = n.GetObjectValue(global::Ayllu.Github.Client.Models.MinimalRepository_custom_properties.CreateFromDiscriminatorValue); } }, + { "default_branch", n => { DefaultBranch = n.GetStringValue(); } }, + { "delete_branch_on_merge", n => { DeleteBranchOnMerge = n.GetBoolValue(); } }, + { "deployments_url", n => { DeploymentsUrl = n.GetStringValue(); } }, + { "description", n => { Description = n.GetStringValue(); } }, + { "disabled", n => { Disabled = n.GetBoolValue(); } }, + { "downloads_url", n => { DownloadsUrl = n.GetStringValue(); } }, + { "events_url", n => { EventsUrl = n.GetStringValue(); } }, + { "fork", n => { Fork = n.GetBoolValue(); } }, + { "forks", n => { Forks = n.GetIntValue(); } }, + { "forks_count", n => { ForksCount = n.GetIntValue(); } }, + { "forks_url", n => { ForksUrl = n.GetStringValue(); } }, + { "full_name", n => { FullName = n.GetStringValue(); } }, + { "git_commits_url", n => { GitCommitsUrl = n.GetStringValue(); } }, + { "git_refs_url", n => { GitRefsUrl = n.GetStringValue(); } }, + { "git_tags_url", n => { GitTagsUrl = n.GetStringValue(); } }, + { "git_url", n => { GitUrl = n.GetStringValue(); } }, + { "has_discussions", n => { HasDiscussions = n.GetBoolValue(); } }, + { "has_downloads", n => { HasDownloads = n.GetBoolValue(); } }, + { "has_issues", n => { HasIssues = n.GetBoolValue(); } }, + { "has_pages", n => { HasPages = n.GetBoolValue(); } }, + { "has_projects", n => { HasProjects = n.GetBoolValue(); } }, + { "has_wiki", n => { HasWiki = n.GetBoolValue(); } }, + { "homepage", n => { Homepage = n.GetStringValue(); } }, + { "hooks_url", n => { HooksUrl = n.GetStringValue(); } }, + { "html_url", n => { HtmlUrl = n.GetStringValue(); } }, + { "id", n => { Id = n.GetLongValue(); } }, + { "is_template", n => { IsTemplate = n.GetBoolValue(); } }, + { "issue_comment_url", n => { IssueCommentUrl = n.GetStringValue(); } }, + { "issue_events_url", n => { IssueEventsUrl = n.GetStringValue(); } }, + { "issues_url", n => { IssuesUrl = n.GetStringValue(); } }, + { "keys_url", n => { KeysUrl = n.GetStringValue(); } }, + { "labels_url", n => { LabelsUrl = n.GetStringValue(); } }, + { "language", n => { Language = n.GetStringValue(); } }, + { "languages_url", n => { LanguagesUrl = n.GetStringValue(); } }, + { "license", n => { License = n.GetObjectValue(global::Ayllu.Github.Client.Models.MinimalRepository_license.CreateFromDiscriminatorValue); } }, + { "merges_url", n => { MergesUrl = n.GetStringValue(); } }, + { "milestones_url", n => { MilestonesUrl = n.GetStringValue(); } }, + { "mirror_url", n => { MirrorUrl = n.GetStringValue(); } }, + { "name", n => { Name = n.GetStringValue(); } }, + { "network_count", n => { NetworkCount = n.GetIntValue(); } }, + { "node_id", n => { NodeId = n.GetStringValue(); } }, + { "notifications_url", n => { NotificationsUrl = n.GetStringValue(); } }, + { "open_issues", n => { OpenIssues = n.GetIntValue(); } }, + { "open_issues_count", n => { OpenIssuesCount = n.GetIntValue(); } }, + { "owner", n => { Owner = n.GetObjectValue(global::Ayllu.Github.Client.Models.SimpleUser.CreateFromDiscriminatorValue); } }, + { "permissions", n => { Permissions = n.GetObjectValue(global::Ayllu.Github.Client.Models.MinimalRepository_permissions.CreateFromDiscriminatorValue); } }, + { "private", n => { Private = n.GetBoolValue(); } }, + { "pulls_url", n => { PullsUrl = n.GetStringValue(); } }, + { "pushed_at", n => { PushedAt = n.GetDateTimeOffsetValue(); } }, + { "releases_url", n => { ReleasesUrl = n.GetStringValue(); } }, + { "role_name", n => { RoleName = n.GetStringValue(); } }, + { "security_and_analysis", n => { SecurityAndAnalysis = n.GetObjectValue(global::Ayllu.Github.Client.Models.SecurityAndAnalysis.CreateFromDiscriminatorValue); } }, + { "size", n => { Size = n.GetIntValue(); } }, + { "ssh_url", n => { SshUrl = n.GetStringValue(); } }, + { "stargazers_count", n => { StargazersCount = n.GetIntValue(); } }, + { "stargazers_url", n => { StargazersUrl = n.GetStringValue(); } }, + { "statuses_url", n => { StatusesUrl = n.GetStringValue(); } }, + { "subscribers_count", n => { SubscribersCount = n.GetIntValue(); } }, + { "subscribers_url", n => { SubscribersUrl = n.GetStringValue(); } }, + { "subscription_url", n => { SubscriptionUrl = n.GetStringValue(); } }, + { "svn_url", n => { SvnUrl = n.GetStringValue(); } }, + { "tags_url", n => { TagsUrl = n.GetStringValue(); } }, + { "teams_url", n => { TeamsUrl = n.GetStringValue(); } }, + { "temp_clone_token", n => { TempCloneToken = n.GetStringValue(); } }, + { "topics", n => { Topics = n.GetCollectionOfPrimitiveValues()?.AsList(); } }, + { "trees_url", n => { TreesUrl = n.GetStringValue(); } }, + { "updated_at", n => { UpdatedAt = n.GetDateTimeOffsetValue(); } }, + { "url", n => { Url = n.GetStringValue(); } }, + { "visibility", n => { Visibility = n.GetStringValue(); } }, + { "watchers", n => { Watchers = n.GetIntValue(); } }, + { "watchers_count", n => { WatchersCount = n.GetIntValue(); } }, + { "web_commit_signoff_required", n => { WebCommitSignoffRequired = n.GetBoolValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteBoolValue("allow_forking", AllowForking); + writer.WriteBoolValue("archived", Archived); + writer.WriteStringValue("archive_url", ArchiveUrl); + writer.WriteStringValue("assignees_url", AssigneesUrl); + writer.WriteStringValue("blobs_url", BlobsUrl); + writer.WriteStringValue("branches_url", BranchesUrl); + writer.WriteStringValue("clone_url", CloneUrl); + writer.WriteObjectValue("code_of_conduct", CodeOfConduct); + writer.WriteStringValue("collaborators_url", CollaboratorsUrl); + writer.WriteStringValue("comments_url", CommentsUrl); + writer.WriteStringValue("commits_url", CommitsUrl); + writer.WriteStringValue("compare_url", CompareUrl); + writer.WriteStringValue("contents_url", ContentsUrl); + writer.WriteStringValue("contributors_url", ContributorsUrl); + writer.WriteDateTimeOffsetValue("created_at", CreatedAt); + writer.WriteObjectValue("custom_properties", CustomProperties); + writer.WriteStringValue("default_branch", DefaultBranch); + writer.WriteBoolValue("delete_branch_on_merge", DeleteBranchOnMerge); + writer.WriteStringValue("deployments_url", DeploymentsUrl); + writer.WriteStringValue("description", Description); + writer.WriteBoolValue("disabled", Disabled); + writer.WriteStringValue("downloads_url", DownloadsUrl); + writer.WriteStringValue("events_url", EventsUrl); + writer.WriteBoolValue("fork", Fork); + writer.WriteIntValue("forks", Forks); + writer.WriteIntValue("forks_count", ForksCount); + writer.WriteStringValue("forks_url", ForksUrl); + writer.WriteStringValue("full_name", FullName); + writer.WriteStringValue("git_commits_url", GitCommitsUrl); + writer.WriteStringValue("git_refs_url", GitRefsUrl); + writer.WriteStringValue("git_tags_url", GitTagsUrl); + writer.WriteStringValue("git_url", GitUrl); + writer.WriteBoolValue("has_discussions", HasDiscussions); + writer.WriteBoolValue("has_downloads", HasDownloads); + writer.WriteBoolValue("has_issues", HasIssues); + writer.WriteBoolValue("has_pages", HasPages); + writer.WriteBoolValue("has_projects", HasProjects); + writer.WriteBoolValue("has_wiki", HasWiki); + writer.WriteStringValue("homepage", Homepage); + writer.WriteStringValue("hooks_url", HooksUrl); + writer.WriteStringValue("html_url", HtmlUrl); + writer.WriteLongValue("id", Id); + writer.WriteStringValue("issue_comment_url", IssueCommentUrl); + writer.WriteStringValue("issue_events_url", IssueEventsUrl); + writer.WriteStringValue("issues_url", IssuesUrl); + writer.WriteBoolValue("is_template", IsTemplate); + writer.WriteStringValue("keys_url", KeysUrl); + writer.WriteStringValue("labels_url", LabelsUrl); + writer.WriteStringValue("language", Language); + writer.WriteStringValue("languages_url", LanguagesUrl); + writer.WriteObjectValue("license", License); + writer.WriteStringValue("merges_url", MergesUrl); + writer.WriteStringValue("milestones_url", MilestonesUrl); + writer.WriteStringValue("mirror_url", MirrorUrl); + writer.WriteStringValue("name", Name); + writer.WriteIntValue("network_count", NetworkCount); + writer.WriteStringValue("node_id", NodeId); + writer.WriteStringValue("notifications_url", NotificationsUrl); + writer.WriteIntValue("open_issues", OpenIssues); + writer.WriteIntValue("open_issues_count", OpenIssuesCount); + writer.WriteObjectValue("owner", Owner); + writer.WriteObjectValue("permissions", Permissions); + writer.WriteBoolValue("private", Private); + writer.WriteStringValue("pulls_url", PullsUrl); + writer.WriteDateTimeOffsetValue("pushed_at", PushedAt); + writer.WriteStringValue("releases_url", ReleasesUrl); + writer.WriteStringValue("role_name", RoleName); + writer.WriteObjectValue("security_and_analysis", SecurityAndAnalysis); + writer.WriteIntValue("size", Size); + writer.WriteStringValue("ssh_url", SshUrl); + writer.WriteIntValue("stargazers_count", StargazersCount); + writer.WriteStringValue("stargazers_url", StargazersUrl); + writer.WriteStringValue("statuses_url", StatusesUrl); + writer.WriteIntValue("subscribers_count", SubscribersCount); + writer.WriteStringValue("subscribers_url", SubscribersUrl); + writer.WriteStringValue("subscription_url", SubscriptionUrl); + writer.WriteStringValue("svn_url", SvnUrl); + writer.WriteStringValue("tags_url", TagsUrl); + writer.WriteStringValue("teams_url", TeamsUrl); + writer.WriteStringValue("temp_clone_token", TempCloneToken); + writer.WriteCollectionOfPrimitiveValues("topics", Topics); + writer.WriteStringValue("trees_url", TreesUrl); + writer.WriteDateTimeOffsetValue("updated_at", UpdatedAt); + writer.WriteStringValue("url", Url); + writer.WriteStringValue("visibility", Visibility); + writer.WriteIntValue("watchers", Watchers); + writer.WriteIntValue("watchers_count", WatchersCount); + writer.WriteBoolValue("web_commit_signoff_required", WebCommitSignoffRequired); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/MinimalRepository_custom_properties.cs b/src/Ayllu.Github.Client/Github/Client/Models/MinimalRepository_custom_properties.cs new file mode 100644 index 0000000..31faf81 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/MinimalRepository_custom_properties.cs @@ -0,0 +1,56 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + /// + /// 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. + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class MinimalRepository_custom_properties : IAdditionalDataHolder, IParsable + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public MinimalRepository_custom_properties() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.MinimalRepository_custom_properties CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.MinimalRepository_custom_properties(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/MinimalRepository_license.cs b/src/Ayllu.Github.Client/Github/Client/Models/MinimalRepository_license.cs new file mode 100644 index 0000000..6b93c0d --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/MinimalRepository_license.cs @@ -0,0 +1,105 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class MinimalRepository_license : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The key property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Key { get; set; } +#nullable restore +#else + public string Key { get; set; } +#endif + /// The name property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Name { get; set; } +#nullable restore +#else + public string Name { get; set; } +#endif + /// The node_id property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? NodeId { get; set; } +#nullable restore +#else + public string NodeId { get; set; } +#endif + /// The spdx_id property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? SpdxId { get; set; } +#nullable restore +#else + public string SpdxId { get; set; } +#endif + /// The url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Url { get; set; } +#nullable restore +#else + public string Url { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public MinimalRepository_license() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.MinimalRepository_license CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.MinimalRepository_license(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "key", n => { Key = n.GetStringValue(); } }, + { "name", n => { Name = n.GetStringValue(); } }, + { "node_id", n => { NodeId = n.GetStringValue(); } }, + { "spdx_id", n => { SpdxId = n.GetStringValue(); } }, + { "url", n => { Url = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("key", Key); + writer.WriteStringValue("name", Name); + writer.WriteStringValue("node_id", NodeId); + writer.WriteStringValue("spdx_id", SpdxId); + writer.WriteStringValue("url", Url); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/MinimalRepository_permissions.cs b/src/Ayllu.Github.Client/Github/Client/Models/MinimalRepository_permissions.cs new file mode 100644 index 0000000..ce31e4d --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/MinimalRepository_permissions.cs @@ -0,0 +1,75 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class MinimalRepository_permissions : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The admin property + public bool? Admin { get; set; } + /// The maintain property + public bool? Maintain { get; set; } + /// The pull property + public bool? Pull { get; set; } + /// The push property + public bool? Push { get; set; } + /// The triage property + public bool? Triage { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public MinimalRepository_permissions() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.MinimalRepository_permissions CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.MinimalRepository_permissions(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "admin", n => { Admin = n.GetBoolValue(); } }, + { "maintain", n => { Maintain = n.GetBoolValue(); } }, + { "pull", n => { Pull = n.GetBoolValue(); } }, + { "push", n => { Push = n.GetBoolValue(); } }, + { "triage", n => { Triage = n.GetBoolValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteBoolValue("admin", Admin); + writer.WriteBoolValue("maintain", Maintain); + writer.WriteBoolValue("pull", Pull); + writer.WriteBoolValue("push", Push); + writer.WriteBoolValue("triage", Triage); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/MovedColumnInProjectIssueEvent.cs b/src/Ayllu.Github.Client/Github/Client/Models/MovedColumnInProjectIssueEvent.cs new file mode 100644 index 0000000..4a7ff0b --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/MovedColumnInProjectIssueEvent.cs @@ -0,0 +1,150 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + /// + /// Moved Column in Project Issue Event + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class MovedColumnInProjectIssueEvent : IAdditionalDataHolder, IParsable + { + /// A GitHub user. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.SimpleUser? Actor { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.SimpleUser Actor { get; set; } +#endif + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The commit_id property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? CommitId { get; set; } +#nullable restore +#else + public string CommitId { get; set; } +#endif + /// The commit_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? CommitUrl { get; set; } +#nullable restore +#else + public string CommitUrl { get; set; } +#endif + /// The created_at property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? CreatedAt { get; set; } +#nullable restore +#else + public string CreatedAt { get; set; } +#endif + /// The event property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Event { get; set; } +#nullable restore +#else + public string Event { get; set; } +#endif + /// The id property + public int? Id { get; set; } + /// The node_id property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? NodeId { get; set; } +#nullable restore +#else + public string NodeId { get; set; } +#endif + /// 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. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.NullableIntegration? PerformedViaGithubApp { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.NullableIntegration PerformedViaGithubApp { get; set; } +#endif + /// The project_card property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.MovedColumnInProjectIssueEvent_project_card? ProjectCard { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.MovedColumnInProjectIssueEvent_project_card ProjectCard { get; set; } +#endif + /// The url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Url { get; set; } +#nullable restore +#else + public string Url { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public MovedColumnInProjectIssueEvent() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.MovedColumnInProjectIssueEvent CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.MovedColumnInProjectIssueEvent(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "actor", n => { Actor = n.GetObjectValue(global::Ayllu.Github.Client.Models.SimpleUser.CreateFromDiscriminatorValue); } }, + { "commit_id", n => { CommitId = n.GetStringValue(); } }, + { "commit_url", n => { CommitUrl = n.GetStringValue(); } }, + { "created_at", n => { CreatedAt = n.GetStringValue(); } }, + { "event", n => { Event = n.GetStringValue(); } }, + { "id", n => { Id = n.GetIntValue(); } }, + { "node_id", n => { NodeId = n.GetStringValue(); } }, + { "performed_via_github_app", n => { PerformedViaGithubApp = n.GetObjectValue(global::Ayllu.Github.Client.Models.NullableIntegration.CreateFromDiscriminatorValue); } }, + { "project_card", n => { ProjectCard = n.GetObjectValue(global::Ayllu.Github.Client.Models.MovedColumnInProjectIssueEvent_project_card.CreateFromDiscriminatorValue); } }, + { "url", n => { Url = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteObjectValue("actor", Actor); + writer.WriteStringValue("commit_id", CommitId); + writer.WriteStringValue("commit_url", CommitUrl); + writer.WriteStringValue("created_at", CreatedAt); + writer.WriteStringValue("event", Event); + writer.WriteIntValue("id", Id); + writer.WriteStringValue("node_id", NodeId); + writer.WriteObjectValue("performed_via_github_app", PerformedViaGithubApp); + writer.WriteObjectValue("project_card", ProjectCard); + writer.WriteStringValue("url", Url); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/MovedColumnInProjectIssueEvent_project_card.cs b/src/Ayllu.Github.Client/Github/Client/Models/MovedColumnInProjectIssueEvent_project_card.cs new file mode 100644 index 0000000..0257305 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/MovedColumnInProjectIssueEvent_project_card.cs @@ -0,0 +1,103 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class MovedColumnInProjectIssueEvent_project_card : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The column_name property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? ColumnName { get; set; } +#nullable restore +#else + public string ColumnName { get; set; } +#endif + /// The id property + public int? Id { get; set; } + /// The previous_column_name property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? PreviousColumnName { get; set; } +#nullable restore +#else + public string PreviousColumnName { get; set; } +#endif + /// The project_id property + public int? ProjectId { get; set; } + /// The project_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? ProjectUrl { get; set; } +#nullable restore +#else + public string ProjectUrl { get; set; } +#endif + /// The url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Url { get; set; } +#nullable restore +#else + public string Url { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public MovedColumnInProjectIssueEvent_project_card() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.MovedColumnInProjectIssueEvent_project_card CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.MovedColumnInProjectIssueEvent_project_card(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "column_name", n => { ColumnName = n.GetStringValue(); } }, + { "id", n => { Id = n.GetIntValue(); } }, + { "previous_column_name", n => { PreviousColumnName = n.GetStringValue(); } }, + { "project_id", n => { ProjectId = n.GetIntValue(); } }, + { "project_url", n => { ProjectUrl = n.GetStringValue(); } }, + { "url", n => { Url = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("column_name", ColumnName); + writer.WriteIntValue("id", Id); + writer.WriteStringValue("previous_column_name", PreviousColumnName); + writer.WriteIntValue("project_id", ProjectId); + writer.WriteStringValue("project_url", ProjectUrl); + writer.WriteStringValue("url", Url); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/NetworkConfiguration.cs b/src/Ayllu.Github.Client/Github/Client/Models/NetworkConfiguration.cs new file mode 100644 index 0000000..7dc6683 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/NetworkConfiguration.cs @@ -0,0 +1,94 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + /// + /// A hosted compute network configuration. + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class NetworkConfiguration : IAdditionalDataHolder, IParsable + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The hosted compute service the network configuration supports. + public global::Ayllu.Github.Client.Models.NetworkConfiguration_compute_service? ComputeService { get; set; } + /// The time at which the network configuration was created, in ISO 8601 format. + public DateTimeOffset? CreatedOn { get; set; } + /// The unique identifier of the network configuration. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Id { get; set; } +#nullable restore +#else + public string Id { get; set; } +#endif + /// The name of the network configuration. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Name { get; set; } +#nullable restore +#else + public string Name { get; set; } +#endif + /// The unique identifier of each network settings in the configuration. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? NetworkSettingsIds { get; set; } +#nullable restore +#else + public List NetworkSettingsIds { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public NetworkConfiguration() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.NetworkConfiguration CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.NetworkConfiguration(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "compute_service", n => { ComputeService = n.GetEnumValue(); } }, + { "created_on", n => { CreatedOn = n.GetDateTimeOffsetValue(); } }, + { "id", n => { Id = n.GetStringValue(); } }, + { "name", n => { Name = n.GetStringValue(); } }, + { "network_settings_ids", n => { NetworkSettingsIds = n.GetCollectionOfPrimitiveValues()?.AsList(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteEnumValue("compute_service", ComputeService); + writer.WriteDateTimeOffsetValue("created_on", CreatedOn); + writer.WriteStringValue("id", Id); + writer.WriteStringValue("name", Name); + writer.WriteCollectionOfPrimitiveValues("network_settings_ids", NetworkSettingsIds); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/NetworkConfiguration_compute_service.cs b/src/Ayllu.Github.Client/Github/Client/Models/NetworkConfiguration_compute_service.cs new file mode 100644 index 0000000..3689c19 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/NetworkConfiguration_compute_service.cs @@ -0,0 +1,23 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Models +{ + /// The hosted compute service the network configuration supports. + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public enum NetworkConfiguration_compute_service + { + [EnumMember(Value = "none")] + #pragma warning disable CS1591 + None, + #pragma warning restore CS1591 + [EnumMember(Value = "actions")] + #pragma warning disable CS1591 + Actions, + #pragma warning restore CS1591 + [EnumMember(Value = "codespaces")] + #pragma warning disable CS1591 + Codespaces, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Models/NetworkSettings.cs b/src/Ayllu.Github.Client/Github/Client/Models/NetworkSettings.cs new file mode 100644 index 0000000..fa3a152 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/NetworkSettings.cs @@ -0,0 +1,106 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + /// + /// A hosted compute network settings resource. + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class NetworkSettings : IAdditionalDataHolder, IParsable + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The unique identifier of the network settings resource. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Id { get; set; } +#nullable restore +#else + public string Id { get; set; } +#endif + /// The name of the network settings resource. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Name { get; set; } +#nullable restore +#else + public string Name { get; set; } +#endif + /// The identifier of the network configuration that is using this settings resource. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? NetworkConfigurationId { get; set; } +#nullable restore +#else + public string NetworkConfigurationId { get; set; } +#endif + /// The location of the subnet this network settings resource is configured for. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Region { get; set; } +#nullable restore +#else + public string Region { get; set; } +#endif + /// The subnet this network settings resource is configured for. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? SubnetId { get; set; } +#nullable restore +#else + public string SubnetId { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public NetworkSettings() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.NetworkSettings CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.NetworkSettings(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "id", n => { Id = n.GetStringValue(); } }, + { "name", n => { Name = n.GetStringValue(); } }, + { "network_configuration_id", n => { NetworkConfigurationId = n.GetStringValue(); } }, + { "region", n => { Region = n.GetStringValue(); } }, + { "subnet_id", n => { SubnetId = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("id", Id); + writer.WriteStringValue("name", Name); + writer.WriteStringValue("network_configuration_id", NetworkConfigurationId); + writer.WriteStringValue("region", Region); + writer.WriteStringValue("subnet_id", SubnetId); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/NullableActionsHostedRunnerPoolImage.cs b/src/Ayllu.Github.Client/Github/Client/Models/NullableActionsHostedRunnerPoolImage.cs new file mode 100644 index 0000000..2084342 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/NullableActionsHostedRunnerPoolImage.cs @@ -0,0 +1,84 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + /// + /// Provides details of a hosted runner image + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class NullableActionsHostedRunnerPoolImage : IAdditionalDataHolder, IParsable + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// Display name for this image. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? DisplayName { get; set; } +#nullable restore +#else + public string DisplayName { get; set; } +#endif + /// The ID of the image. Use this ID for the `image` parameter when creating a new larger runner. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Id { get; set; } +#nullable restore +#else + public string Id { get; set; } +#endif + /// Image size in GB. + public int? SizeGb { get; set; } + /// The image provider. + public global::Ayllu.Github.Client.Models.NullableActionsHostedRunnerPoolImage_source? Source { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public NullableActionsHostedRunnerPoolImage() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.NullableActionsHostedRunnerPoolImage CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.NullableActionsHostedRunnerPoolImage(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "display_name", n => { DisplayName = n.GetStringValue(); } }, + { "id", n => { Id = n.GetStringValue(); } }, + { "size_gb", n => { SizeGb = n.GetIntValue(); } }, + { "source", n => { Source = n.GetEnumValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("display_name", DisplayName); + writer.WriteStringValue("id", Id); + writer.WriteIntValue("size_gb", SizeGb); + writer.WriteEnumValue("source", Source); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/NullableActionsHostedRunnerPoolImage_source.cs b/src/Ayllu.Github.Client/Github/Client/Models/NullableActionsHostedRunnerPoolImage_source.cs new file mode 100644 index 0000000..ce0d2e5 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/NullableActionsHostedRunnerPoolImage_source.cs @@ -0,0 +1,23 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Models +{ + /// The image provider. + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public enum NullableActionsHostedRunnerPoolImage_source + { + [EnumMember(Value = "github")] + #pragma warning disable CS1591 + Github, + #pragma warning restore CS1591 + [EnumMember(Value = "partner")] + #pragma warning disable CS1591 + Partner, + #pragma warning restore CS1591 + [EnumMember(Value = "custom")] + #pragma warning disable CS1591 + Custom, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Models/NullableCodeOfConductSimple.cs b/src/Ayllu.Github.Client/Github/Client/Models/NullableCodeOfConductSimple.cs new file mode 100644 index 0000000..ec162db --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/NullableCodeOfConductSimple.cs @@ -0,0 +1,96 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + /// + /// Code of Conduct Simple + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class NullableCodeOfConductSimple : IAdditionalDataHolder, IParsable + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The html_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? HtmlUrl { get; set; } +#nullable restore +#else + public string HtmlUrl { get; set; } +#endif + /// The key property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Key { get; set; } +#nullable restore +#else + public string Key { get; set; } +#endif + /// The name property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Name { get; set; } +#nullable restore +#else + public string Name { get; set; } +#endif + /// The url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Url { get; set; } +#nullable restore +#else + public string Url { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public NullableCodeOfConductSimple() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.NullableCodeOfConductSimple CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.NullableCodeOfConductSimple(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "html_url", n => { HtmlUrl = n.GetStringValue(); } }, + { "key", n => { Key = n.GetStringValue(); } }, + { "name", n => { Name = n.GetStringValue(); } }, + { "url", n => { Url = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("html_url", HtmlUrl); + writer.WriteStringValue("key", Key); + writer.WriteStringValue("name", Name); + writer.WriteStringValue("url", Url); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/NullableCodespaceMachine.cs b/src/Ayllu.Github.Client/Github/Client/Models/NullableCodespaceMachine.cs new file mode 100644 index 0000000..474ed81 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/NullableCodespaceMachine.cs @@ -0,0 +1,102 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + /// + /// A description of the machine powering a codespace. + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class NullableCodespaceMachine : IAdditionalDataHolder, IParsable + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// How many cores are available to the codespace. + public int? Cpus { get; set; } + /// The display name of the machine includes cores, memory, and storage. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? DisplayName { get; set; } +#nullable restore +#else + public string DisplayName { get; set; } +#endif + /// How much memory is available to the codespace. + public int? MemoryInBytes { get; set; } + /// The name of the machine. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Name { get; set; } +#nullable restore +#else + public string Name { get; set; } +#endif + /// The operating system of the machine. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? OperatingSystem { get; set; } +#nullable restore +#else + public string OperatingSystem { get; set; } +#endif + /// 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. + public global::Ayllu.Github.Client.Models.NullableCodespaceMachine_prebuild_availability? PrebuildAvailability { get; set; } + /// How much storage is available to the codespace. + public int? StorageInBytes { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public NullableCodespaceMachine() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.NullableCodespaceMachine CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.NullableCodespaceMachine(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "cpus", n => { Cpus = n.GetIntValue(); } }, + { "display_name", n => { DisplayName = n.GetStringValue(); } }, + { "memory_in_bytes", n => { MemoryInBytes = n.GetIntValue(); } }, + { "name", n => { Name = n.GetStringValue(); } }, + { "operating_system", n => { OperatingSystem = n.GetStringValue(); } }, + { "prebuild_availability", n => { PrebuildAvailability = n.GetEnumValue(); } }, + { "storage_in_bytes", n => { StorageInBytes = n.GetIntValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteIntValue("cpus", Cpus); + writer.WriteStringValue("display_name", DisplayName); + writer.WriteIntValue("memory_in_bytes", MemoryInBytes); + writer.WriteStringValue("name", Name); + writer.WriteStringValue("operating_system", OperatingSystem); + writer.WriteEnumValue("prebuild_availability", PrebuildAvailability); + writer.WriteIntValue("storage_in_bytes", StorageInBytes); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/NullableCodespaceMachine_prebuild_availability.cs b/src/Ayllu.Github.Client/Github/Client/Models/NullableCodespaceMachine_prebuild_availability.cs new file mode 100644 index 0000000..a63284c --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/NullableCodespaceMachine_prebuild_availability.cs @@ -0,0 +1,23 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Models +{ + /// 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. + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public enum NullableCodespaceMachine_prebuild_availability + { + [EnumMember(Value = "none")] + #pragma warning disable CS1591 + None, + #pragma warning restore CS1591 + [EnumMember(Value = "ready")] + #pragma warning disable CS1591 + Ready, + #pragma warning restore CS1591 + [EnumMember(Value = "in_progress")] + #pragma warning disable CS1591 + In_progress, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Models/NullableCollaborator.cs b/src/Ayllu.Github.Client/Github/Client/Models/NullableCollaborator.cs new file mode 100644 index 0000000..6b0cd9d --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/NullableCollaborator.cs @@ -0,0 +1,274 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + /// + /// Collaborator + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class NullableCollaborator : IAdditionalDataHolder, IParsable + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The avatar_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? AvatarUrl { get; set; } +#nullable restore +#else + public string AvatarUrl { get; set; } +#endif + /// The email property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Email { get; set; } +#nullable restore +#else + public string Email { get; set; } +#endif + /// The events_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? EventsUrl { get; set; } +#nullable restore +#else + public string EventsUrl { get; set; } +#endif + /// The followers_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? FollowersUrl { get; set; } +#nullable restore +#else + public string FollowersUrl { get; set; } +#endif + /// The following_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? FollowingUrl { get; set; } +#nullable restore +#else + public string FollowingUrl { get; set; } +#endif + /// The gists_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? GistsUrl { get; set; } +#nullable restore +#else + public string GistsUrl { get; set; } +#endif + /// The gravatar_id property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? GravatarId { get; set; } +#nullable restore +#else + public string GravatarId { get; set; } +#endif + /// The html_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? HtmlUrl { get; set; } +#nullable restore +#else + public string HtmlUrl { get; set; } +#endif + /// The id property + public long? Id { get; set; } + /// The login property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Login { get; set; } +#nullable restore +#else + public string Login { get; set; } +#endif + /// The name property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Name { get; set; } +#nullable restore +#else + public string Name { get; set; } +#endif + /// The node_id property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? NodeId { get; set; } +#nullable restore +#else + public string NodeId { get; set; } +#endif + /// The organizations_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? OrganizationsUrl { get; set; } +#nullable restore +#else + public string OrganizationsUrl { get; set; } +#endif + /// The permissions property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.NullableCollaborator_permissions? Permissions { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.NullableCollaborator_permissions Permissions { get; set; } +#endif + /// The received_events_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? ReceivedEventsUrl { get; set; } +#nullable restore +#else + public string ReceivedEventsUrl { get; set; } +#endif + /// The repos_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? ReposUrl { get; set; } +#nullable restore +#else + public string ReposUrl { get; set; } +#endif + /// The role_name property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? RoleName { get; set; } +#nullable restore +#else + public string RoleName { get; set; } +#endif + /// The site_admin property + public bool? SiteAdmin { get; set; } + /// The starred_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? StarredUrl { get; set; } +#nullable restore +#else + public string StarredUrl { get; set; } +#endif + /// The subscriptions_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? SubscriptionsUrl { get; set; } +#nullable restore +#else + public string SubscriptionsUrl { get; set; } +#endif + /// The type property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Type { get; set; } +#nullable restore +#else + public string Type { get; set; } +#endif + /// The url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Url { get; set; } +#nullable restore +#else + public string Url { get; set; } +#endif + /// The user_view_type property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? UserViewType { get; set; } +#nullable restore +#else + public string UserViewType { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public NullableCollaborator() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.NullableCollaborator CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.NullableCollaborator(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "avatar_url", n => { AvatarUrl = n.GetStringValue(); } }, + { "email", n => { Email = n.GetStringValue(); } }, + { "events_url", n => { EventsUrl = n.GetStringValue(); } }, + { "followers_url", n => { FollowersUrl = n.GetStringValue(); } }, + { "following_url", n => { FollowingUrl = n.GetStringValue(); } }, + { "gists_url", n => { GistsUrl = n.GetStringValue(); } }, + { "gravatar_id", n => { GravatarId = n.GetStringValue(); } }, + { "html_url", n => { HtmlUrl = n.GetStringValue(); } }, + { "id", n => { Id = n.GetLongValue(); } }, + { "login", n => { Login = n.GetStringValue(); } }, + { "name", n => { Name = n.GetStringValue(); } }, + { "node_id", n => { NodeId = n.GetStringValue(); } }, + { "organizations_url", n => { OrganizationsUrl = n.GetStringValue(); } }, + { "permissions", n => { Permissions = n.GetObjectValue(global::Ayllu.Github.Client.Models.NullableCollaborator_permissions.CreateFromDiscriminatorValue); } }, + { "received_events_url", n => { ReceivedEventsUrl = n.GetStringValue(); } }, + { "repos_url", n => { ReposUrl = n.GetStringValue(); } }, + { "role_name", n => { RoleName = n.GetStringValue(); } }, + { "site_admin", n => { SiteAdmin = n.GetBoolValue(); } }, + { "starred_url", n => { StarredUrl = n.GetStringValue(); } }, + { "subscriptions_url", n => { SubscriptionsUrl = n.GetStringValue(); } }, + { "type", n => { Type = n.GetStringValue(); } }, + { "url", n => { Url = n.GetStringValue(); } }, + { "user_view_type", n => { UserViewType = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("avatar_url", AvatarUrl); + writer.WriteStringValue("email", Email); + writer.WriteStringValue("events_url", EventsUrl); + writer.WriteStringValue("followers_url", FollowersUrl); + writer.WriteStringValue("following_url", FollowingUrl); + writer.WriteStringValue("gists_url", GistsUrl); + writer.WriteStringValue("gravatar_id", GravatarId); + writer.WriteStringValue("html_url", HtmlUrl); + writer.WriteLongValue("id", Id); + writer.WriteStringValue("login", Login); + writer.WriteStringValue("name", Name); + writer.WriteStringValue("node_id", NodeId); + writer.WriteStringValue("organizations_url", OrganizationsUrl); + writer.WriteObjectValue("permissions", Permissions); + writer.WriteStringValue("received_events_url", ReceivedEventsUrl); + writer.WriteStringValue("repos_url", ReposUrl); + writer.WriteStringValue("role_name", RoleName); + writer.WriteBoolValue("site_admin", SiteAdmin); + writer.WriteStringValue("starred_url", StarredUrl); + writer.WriteStringValue("subscriptions_url", SubscriptionsUrl); + writer.WriteStringValue("type", Type); + writer.WriteStringValue("url", Url); + writer.WriteStringValue("user_view_type", UserViewType); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/NullableCollaborator_permissions.cs b/src/Ayllu.Github.Client/Github/Client/Models/NullableCollaborator_permissions.cs new file mode 100644 index 0000000..7ce7793 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/NullableCollaborator_permissions.cs @@ -0,0 +1,75 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class NullableCollaborator_permissions : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The admin property + public bool? Admin { get; set; } + /// The maintain property + public bool? Maintain { get; set; } + /// The pull property + public bool? Pull { get; set; } + /// The push property + public bool? Push { get; set; } + /// The triage property + public bool? Triage { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public NullableCollaborator_permissions() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.NullableCollaborator_permissions CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.NullableCollaborator_permissions(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "admin", n => { Admin = n.GetBoolValue(); } }, + { "maintain", n => { Maintain = n.GetBoolValue(); } }, + { "pull", n => { Pull = n.GetBoolValue(); } }, + { "push", n => { Push = n.GetBoolValue(); } }, + { "triage", n => { Triage = n.GetBoolValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteBoolValue("admin", Admin); + writer.WriteBoolValue("maintain", Maintain); + writer.WriteBoolValue("pull", Pull); + writer.WriteBoolValue("push", Push); + writer.WriteBoolValue("triage", Triage); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/NullableCommunityHealthFile.cs b/src/Ayllu.Github.Client/Github/Client/Models/NullableCommunityHealthFile.cs new file mode 100644 index 0000000..c3c1279 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/NullableCommunityHealthFile.cs @@ -0,0 +1,75 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class NullableCommunityHealthFile : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The html_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? HtmlUrl { get; set; } +#nullable restore +#else + public string HtmlUrl { get; set; } +#endif + /// The url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Url { get; set; } +#nullable restore +#else + public string Url { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public NullableCommunityHealthFile() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.NullableCommunityHealthFile CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.NullableCommunityHealthFile(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "html_url", n => { HtmlUrl = n.GetStringValue(); } }, + { "url", n => { Url = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("html_url", HtmlUrl); + writer.WriteStringValue("url", Url); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/NullableGitUser.cs b/src/Ayllu.Github.Client/Github/Client/Models/NullableGitUser.cs new file mode 100644 index 0000000..fcfdc32 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/NullableGitUser.cs @@ -0,0 +1,86 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + /// + /// Metaproperties for Git author/committer information. + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class NullableGitUser : IAdditionalDataHolder, IParsable + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The date property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Date { get; set; } +#nullable restore +#else + public string Date { get; set; } +#endif + /// The email property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Email { get; set; } +#nullable restore +#else + public string Email { get; set; } +#endif + /// The name property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Name { get; set; } +#nullable restore +#else + public string Name { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public NullableGitUser() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.NullableGitUser CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.NullableGitUser(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "date", n => { Date = n.GetStringValue(); } }, + { "email", n => { Email = n.GetStringValue(); } }, + { "name", n => { Name = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("date", Date); + writer.WriteStringValue("email", Email); + writer.WriteStringValue("name", Name); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/NullableIntegration.cs b/src/Ayllu.Github.Client/Github/Client/Models/NullableIntegration.cs new file mode 100644 index 0000000..2cc9fb2 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/NullableIntegration.cs @@ -0,0 +1,247 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + /// + /// 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. + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class NullableIntegration : IAdditionalDataHolder, IParsable + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The client_id property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? ClientId { get; set; } +#nullable restore +#else + public string ClientId { get; set; } +#endif + /// The created_at property + public DateTimeOffset? CreatedAt { get; set; } + /// The description property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Description { get; set; } +#nullable restore +#else + public string Description { get; set; } +#endif + /// The list of events for the GitHub app. Note that the `installation_target`, `security_advisory`, and `meta` events are not included because they are global events and not specific to an installation. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? Events { get; set; } +#nullable restore +#else + public List Events { get; set; } +#endif + /// The external_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? ExternalUrl { get; set; } +#nullable restore +#else + public string ExternalUrl { get; set; } +#endif + /// The html_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? HtmlUrl { get; set; } +#nullable restore +#else + public string HtmlUrl { get; set; } +#endif + /// Unique identifier of the GitHub app + public int? Id { get; set; } + /// The number of installations associated with the GitHub app. Only returned when the integration is requesting details about itself. + public int? InstallationsCount { get; set; } + /// The name of the GitHub app +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Name { get; set; } +#nullable restore +#else + public string Name { get; set; } +#endif + /// The node_id property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? NodeId { get; set; } +#nullable restore +#else + public string NodeId { get; set; } +#endif + /// The owner property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.NullableIntegration.NullableIntegration_owner? Owner { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.NullableIntegration.NullableIntegration_owner Owner { get; set; } +#endif + /// The set of permissions for the GitHub app +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.NullableIntegration_permissions? Permissions { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.NullableIntegration_permissions Permissions { get; set; } +#endif + /// The slug name of the GitHub app +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Slug { get; set; } +#nullable restore +#else + public string Slug { get; set; } +#endif + /// The updated_at property + public DateTimeOffset? UpdatedAt { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public NullableIntegration() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.NullableIntegration CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.NullableIntegration(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "client_id", n => { ClientId = n.GetStringValue(); } }, + { "created_at", n => { CreatedAt = n.GetDateTimeOffsetValue(); } }, + { "description", n => { Description = n.GetStringValue(); } }, + { "events", n => { Events = n.GetCollectionOfPrimitiveValues()?.AsList(); } }, + { "external_url", n => { ExternalUrl = n.GetStringValue(); } }, + { "html_url", n => { HtmlUrl = n.GetStringValue(); } }, + { "id", n => { Id = n.GetIntValue(); } }, + { "installations_count", n => { InstallationsCount = n.GetIntValue(); } }, + { "name", n => { Name = n.GetStringValue(); } }, + { "node_id", n => { NodeId = n.GetStringValue(); } }, + { "owner", n => { Owner = n.GetObjectValue(global::Ayllu.Github.Client.Models.NullableIntegration.NullableIntegration_owner.CreateFromDiscriminatorValue); } }, + { "permissions", n => { Permissions = n.GetObjectValue(global::Ayllu.Github.Client.Models.NullableIntegration_permissions.CreateFromDiscriminatorValue); } }, + { "slug", n => { Slug = n.GetStringValue(); } }, + { "updated_at", n => { UpdatedAt = n.GetDateTimeOffsetValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("client_id", ClientId); + writer.WriteDateTimeOffsetValue("created_at", CreatedAt); + writer.WriteStringValue("description", Description); + writer.WriteCollectionOfPrimitiveValues("events", Events); + writer.WriteStringValue("external_url", ExternalUrl); + writer.WriteStringValue("html_url", HtmlUrl); + writer.WriteIntValue("id", Id); + writer.WriteIntValue("installations_count", InstallationsCount); + writer.WriteStringValue("name", Name); + writer.WriteStringValue("node_id", NodeId); + writer.WriteObjectValue("owner", Owner); + writer.WriteObjectValue("permissions", Permissions); + writer.WriteStringValue("slug", Slug); + writer.WriteDateTimeOffsetValue("updated_at", UpdatedAt); + writer.WriteAdditionalData(AdditionalData); + } + /// + /// Composed type wrapper for classes , + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class NullableIntegration_owner : IComposedTypeWrapper, IParsable + { + /// Composed type representation for type +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.Enterprise? Enterprise { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.Enterprise Enterprise { get; set; } +#endif + /// Composed type representation for type +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.SimpleUser? SimpleUser { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.SimpleUser SimpleUser { get; set; } +#endif + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.NullableIntegration.NullableIntegration_owner CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + var mappingValue = parseNode.GetChildNode("")?.GetStringValue(); + var result = new global::Ayllu.Github.Client.Models.NullableIntegration.NullableIntegration_owner(); + if("enterprise".Equals(mappingValue, StringComparison.OrdinalIgnoreCase)) + { + result.Enterprise = new global::Ayllu.Github.Client.Models.Enterprise(); + } + else if("simple-user".Equals(mappingValue, StringComparison.OrdinalIgnoreCase)) + { + result.SimpleUser = new global::Ayllu.Github.Client.Models.SimpleUser(); + } + return result; + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + if(Enterprise != null) + { + return Enterprise.GetFieldDeserializers(); + } + else if(SimpleUser != null) + { + return SimpleUser.GetFieldDeserializers(); + } + return new Dictionary>(); + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(Enterprise != null) + { + writer.WriteObjectValue(null, Enterprise); + } + else if(SimpleUser != null) + { + writer.WriteObjectValue(null, SimpleUser); + } + } + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/NullableIntegration_permissions.cs b/src/Ayllu.Github.Client/Github/Client/Models/NullableIntegration_permissions.cs new file mode 100644 index 0000000..12e2339 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/NullableIntegration_permissions.cs @@ -0,0 +1,106 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + /// + /// The set of permissions for the GitHub app + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class NullableIntegration_permissions : IAdditionalDataHolder, IParsable + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The checks property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Checks { get; set; } +#nullable restore +#else + public string Checks { get; set; } +#endif + /// The contents property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Contents { get; set; } +#nullable restore +#else + public string Contents { get; set; } +#endif + /// The deployments property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Deployments { get; set; } +#nullable restore +#else + public string Deployments { get; set; } +#endif + /// The issues property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Issues { get; set; } +#nullable restore +#else + public string Issues { get; set; } +#endif + /// The metadata property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Metadata { get; set; } +#nullable restore +#else + public string Metadata { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public NullableIntegration_permissions() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.NullableIntegration_permissions CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.NullableIntegration_permissions(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "checks", n => { Checks = n.GetStringValue(); } }, + { "contents", n => { Contents = n.GetStringValue(); } }, + { "deployments", n => { Deployments = n.GetStringValue(); } }, + { "issues", n => { Issues = n.GetStringValue(); } }, + { "metadata", n => { Metadata = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("checks", Checks); + writer.WriteStringValue("contents", Contents); + writer.WriteStringValue("deployments", Deployments); + writer.WriteStringValue("issues", Issues); + writer.WriteStringValue("metadata", Metadata); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/NullableIssue.cs b/src/Ayllu.Github.Client/Github/Client/Models/NullableIssue.cs new file mode 100644 index 0000000..f678bd9 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/NullableIssue.cs @@ -0,0 +1,376 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + /// + /// Issues are a great way to keep track of tasks, enhancements, and bugs for your projects. + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class NullableIssue : IAdditionalDataHolder, IParsable + { + /// The active_lock_reason property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? ActiveLockReason { get; set; } +#nullable restore +#else + public string ActiveLockReason { get; set; } +#endif + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// A GitHub user. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.NullableSimpleUser? Assignee { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.NullableSimpleUser Assignee { get; set; } +#endif + /// The assignees property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? Assignees { get; set; } +#nullable restore +#else + public List Assignees { get; set; } +#endif + /// How the author is associated with the repository. + public global::Ayllu.Github.Client.Models.AuthorAssociation? AuthorAssociation { get; set; } + /// Contents of the issue +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Body { get; set; } +#nullable restore +#else + public string Body { get; set; } +#endif + /// The body_html property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? BodyHtml { get; set; } +#nullable restore +#else + public string BodyHtml { get; set; } +#endif + /// The body_text property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? BodyText { get; set; } +#nullable restore +#else + public string BodyText { get; set; } +#endif + /// The closed_at property + public DateTimeOffset? ClosedAt { get; set; } + /// A GitHub user. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.NullableSimpleUser? ClosedBy { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.NullableSimpleUser ClosedBy { get; set; } +#endif + /// The comments property + public int? Comments { get; set; } + /// The comments_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? CommentsUrl { get; set; } +#nullable restore +#else + public string CommentsUrl { get; set; } +#endif + /// The created_at property + public DateTimeOffset? CreatedAt { get; set; } + /// The draft property + public bool? Draft { get; set; } + /// The events_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? EventsUrl { get; set; } +#nullable restore +#else + public string EventsUrl { get; set; } +#endif + /// The html_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? HtmlUrl { get; set; } +#nullable restore +#else + public string HtmlUrl { get; set; } +#endif + /// The id property + public long? Id { get; set; } + /// The issue_dependencies_summary property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.IssueDependenciesSummary? IssueDependenciesSummary { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.IssueDependenciesSummary IssueDependenciesSummary { get; set; } +#endif + /// The issue_field_values property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? IssueFieldValues { get; set; } +#nullable restore +#else + public List IssueFieldValues { get; set; } +#endif + /// 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 +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? Labels { get; set; } +#nullable restore +#else + public List Labels { get; set; } +#endif + /// The labels_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? LabelsUrl { get; set; } +#nullable restore +#else + public string LabelsUrl { get; set; } +#endif + /// The locked property + public bool? Locked { get; set; } + /// A collection of related issues and pull requests. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.NullableMilestone? Milestone { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.NullableMilestone Milestone { get; set; } +#endif + /// The node_id property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? NodeId { get; set; } +#nullable restore +#else + public string NodeId { get; set; } +#endif + /// Number uniquely identifying the issue within its repository + public int? Number { get; set; } + /// 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. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.NullableIntegration? PerformedViaGithubApp { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.NullableIntegration PerformedViaGithubApp { get; set; } +#endif + /// The pull_request property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.NullableIssue_pull_request? PullRequest { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.NullableIssue_pull_request PullRequest { get; set; } +#endif + /// The reactions property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.ReactionRollup? Reactions { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.ReactionRollup Reactions { get; set; } +#endif + /// A repository on GitHub. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.Repository? Repository { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.Repository Repository { get; set; } +#endif + /// The repository_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? RepositoryUrl { get; set; } +#nullable restore +#else + public string RepositoryUrl { get; set; } +#endif + /// State of the issue; either 'open' or 'closed' +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? State { get; set; } +#nullable restore +#else + public string State { get; set; } +#endif + /// The reason for the current state + public global::Ayllu.Github.Client.Models.NullableIssue_state_reason? StateReason { get; set; } + /// The sub_issues_summary property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.SubIssuesSummary? SubIssuesSummary { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.SubIssuesSummary SubIssuesSummary { get; set; } +#endif + /// The timeline_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? TimelineUrl { get; set; } +#nullable restore +#else + public string TimelineUrl { get; set; } +#endif + /// Title of the issue +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Title { get; set; } +#nullable restore +#else + public string Title { get; set; } +#endif + /// The type of issue. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.IssueType? Type { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.IssueType Type { get; set; } +#endif + /// The updated_at property + public DateTimeOffset? UpdatedAt { get; set; } + /// URL for the issue +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Url { get; set; } +#nullable restore +#else + public string Url { get; set; } +#endif + /// A GitHub user. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.NullableSimpleUser? User { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.NullableSimpleUser User { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public NullableIssue() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.NullableIssue CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.NullableIssue(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "active_lock_reason", n => { ActiveLockReason = n.GetStringValue(); } }, + { "assignee", n => { Assignee = n.GetObjectValue(global::Ayllu.Github.Client.Models.NullableSimpleUser.CreateFromDiscriminatorValue); } }, + { "assignees", n => { Assignees = n.GetCollectionOfObjectValues(global::Ayllu.Github.Client.Models.SimpleUser.CreateFromDiscriminatorValue)?.AsList(); } }, + { "author_association", n => { AuthorAssociation = n.GetEnumValue(); } }, + { "body", n => { Body = n.GetStringValue(); } }, + { "body_html", n => { BodyHtml = n.GetStringValue(); } }, + { "body_text", n => { BodyText = n.GetStringValue(); } }, + { "closed_at", n => { ClosedAt = n.GetDateTimeOffsetValue(); } }, + { "closed_by", n => { ClosedBy = n.GetObjectValue(global::Ayllu.Github.Client.Models.NullableSimpleUser.CreateFromDiscriminatorValue); } }, + { "comments", n => { Comments = n.GetIntValue(); } }, + { "comments_url", n => { CommentsUrl = n.GetStringValue(); } }, + { "created_at", n => { CreatedAt = n.GetDateTimeOffsetValue(); } }, + { "draft", n => { Draft = n.GetBoolValue(); } }, + { "events_url", n => { EventsUrl = n.GetStringValue(); } }, + { "html_url", n => { HtmlUrl = n.GetStringValue(); } }, + { "id", n => { Id = n.GetLongValue(); } }, + { "issue_dependencies_summary", n => { IssueDependenciesSummary = n.GetObjectValue(global::Ayllu.Github.Client.Models.IssueDependenciesSummary.CreateFromDiscriminatorValue); } }, + { "issue_field_values", n => { IssueFieldValues = n.GetCollectionOfObjectValues(global::Ayllu.Github.Client.Models.IssueFieldValue.CreateFromDiscriminatorValue)?.AsList(); } }, + { "labels", n => { Labels = n.GetCollectionOfPrimitiveValues()?.AsList(); } }, + { "labels_url", n => { LabelsUrl = n.GetStringValue(); } }, + { "locked", n => { Locked = n.GetBoolValue(); } }, + { "milestone", n => { Milestone = n.GetObjectValue(global::Ayllu.Github.Client.Models.NullableMilestone.CreateFromDiscriminatorValue); } }, + { "node_id", n => { NodeId = n.GetStringValue(); } }, + { "number", n => { Number = n.GetIntValue(); } }, + { "performed_via_github_app", n => { PerformedViaGithubApp = n.GetObjectValue(global::Ayllu.Github.Client.Models.NullableIntegration.CreateFromDiscriminatorValue); } }, + { "pull_request", n => { PullRequest = n.GetObjectValue(global::Ayllu.Github.Client.Models.NullableIssue_pull_request.CreateFromDiscriminatorValue); } }, + { "reactions", n => { Reactions = n.GetObjectValue(global::Ayllu.Github.Client.Models.ReactionRollup.CreateFromDiscriminatorValue); } }, + { "repository", n => { Repository = n.GetObjectValue(global::Ayllu.Github.Client.Models.Repository.CreateFromDiscriminatorValue); } }, + { "repository_url", n => { RepositoryUrl = n.GetStringValue(); } }, + { "state", n => { State = n.GetStringValue(); } }, + { "state_reason", n => { StateReason = n.GetEnumValue(); } }, + { "sub_issues_summary", n => { SubIssuesSummary = n.GetObjectValue(global::Ayllu.Github.Client.Models.SubIssuesSummary.CreateFromDiscriminatorValue); } }, + { "timeline_url", n => { TimelineUrl = n.GetStringValue(); } }, + { "title", n => { Title = n.GetStringValue(); } }, + { "type", n => { Type = n.GetObjectValue(global::Ayllu.Github.Client.Models.IssueType.CreateFromDiscriminatorValue); } }, + { "updated_at", n => { UpdatedAt = n.GetDateTimeOffsetValue(); } }, + { "url", n => { Url = n.GetStringValue(); } }, + { "user", n => { User = n.GetObjectValue(global::Ayllu.Github.Client.Models.NullableSimpleUser.CreateFromDiscriminatorValue); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("active_lock_reason", ActiveLockReason); + writer.WriteObjectValue("assignee", Assignee); + writer.WriteCollectionOfObjectValues("assignees", Assignees); + writer.WriteEnumValue("author_association", AuthorAssociation); + writer.WriteStringValue("body", Body); + writer.WriteStringValue("body_html", BodyHtml); + writer.WriteStringValue("body_text", BodyText); + writer.WriteDateTimeOffsetValue("closed_at", ClosedAt); + writer.WriteObjectValue("closed_by", ClosedBy); + writer.WriteIntValue("comments", Comments); + writer.WriteStringValue("comments_url", CommentsUrl); + writer.WriteDateTimeOffsetValue("created_at", CreatedAt); + writer.WriteBoolValue("draft", Draft); + writer.WriteStringValue("events_url", EventsUrl); + writer.WriteStringValue("html_url", HtmlUrl); + writer.WriteLongValue("id", Id); + writer.WriteObjectValue("issue_dependencies_summary", IssueDependenciesSummary); + writer.WriteCollectionOfObjectValues("issue_field_values", IssueFieldValues); + writer.WriteCollectionOfPrimitiveValues("labels", Labels); + writer.WriteStringValue("labels_url", LabelsUrl); + writer.WriteBoolValue("locked", Locked); + writer.WriteObjectValue("milestone", Milestone); + writer.WriteStringValue("node_id", NodeId); + writer.WriteIntValue("number", Number); + writer.WriteObjectValue("performed_via_github_app", PerformedViaGithubApp); + writer.WriteObjectValue("pull_request", PullRequest); + writer.WriteObjectValue("reactions", Reactions); + writer.WriteObjectValue("repository", Repository); + writer.WriteStringValue("repository_url", RepositoryUrl); + writer.WriteStringValue("state", State); + writer.WriteEnumValue("state_reason", StateReason); + writer.WriteObjectValue("sub_issues_summary", SubIssuesSummary); + writer.WriteStringValue("timeline_url", TimelineUrl); + writer.WriteStringValue("title", Title); + writer.WriteObjectValue("type", Type); + writer.WriteDateTimeOffsetValue("updated_at", UpdatedAt); + writer.WriteStringValue("url", Url); + writer.WriteObjectValue("user", User); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/NullableIssue_pull_request.cs b/src/Ayllu.Github.Client/Github/Client/Models/NullableIssue_pull_request.cs new file mode 100644 index 0000000..0b13e31 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/NullableIssue_pull_request.cs @@ -0,0 +1,99 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class NullableIssue_pull_request : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The diff_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? DiffUrl { get; set; } +#nullable restore +#else + public string DiffUrl { get; set; } +#endif + /// The html_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? HtmlUrl { get; set; } +#nullable restore +#else + public string HtmlUrl { get; set; } +#endif + /// The merged_at property + public DateTimeOffset? MergedAt { get; set; } + /// The patch_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? PatchUrl { get; set; } +#nullable restore +#else + public string PatchUrl { get; set; } +#endif + /// The url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Url { get; set; } +#nullable restore +#else + public string Url { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public NullableIssue_pull_request() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.NullableIssue_pull_request CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.NullableIssue_pull_request(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "diff_url", n => { DiffUrl = n.GetStringValue(); } }, + { "html_url", n => { HtmlUrl = n.GetStringValue(); } }, + { "merged_at", n => { MergedAt = n.GetDateTimeOffsetValue(); } }, + { "patch_url", n => { PatchUrl = n.GetStringValue(); } }, + { "url", n => { Url = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("diff_url", DiffUrl); + writer.WriteStringValue("html_url", HtmlUrl); + writer.WriteDateTimeOffsetValue("merged_at", MergedAt); + writer.WriteStringValue("patch_url", PatchUrl); + writer.WriteStringValue("url", Url); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/NullableIssue_state_reason.cs b/src/Ayllu.Github.Client/Github/Client/Models/NullableIssue_state_reason.cs new file mode 100644 index 0000000..13602d6 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/NullableIssue_state_reason.cs @@ -0,0 +1,27 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Models +{ + /// The reason for the current state + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public enum NullableIssue_state_reason + { + [EnumMember(Value = "completed")] + #pragma warning disable CS1591 + Completed, + #pragma warning restore CS1591 + [EnumMember(Value = "reopened")] + #pragma warning disable CS1591 + Reopened, + #pragma warning restore CS1591 + [EnumMember(Value = "not_planned")] + #pragma warning disable CS1591 + Not_planned, + #pragma warning restore CS1591 + [EnumMember(Value = "duplicate")] + #pragma warning disable CS1591 + Duplicate, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Models/NullableLicenseSimple.cs b/src/Ayllu.Github.Client/Github/Client/Models/NullableLicenseSimple.cs new file mode 100644 index 0000000..f275d75 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/NullableLicenseSimple.cs @@ -0,0 +1,116 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + /// + /// License Simple + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class NullableLicenseSimple : IAdditionalDataHolder, IParsable + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The html_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? HtmlUrl { get; set; } +#nullable restore +#else + public string HtmlUrl { get; set; } +#endif + /// The key property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Key { get; set; } +#nullable restore +#else + public string Key { get; set; } +#endif + /// The name property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Name { get; set; } +#nullable restore +#else + public string Name { get; set; } +#endif + /// The node_id property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? NodeId { get; set; } +#nullable restore +#else + public string NodeId { get; set; } +#endif + /// The spdx_id property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? SpdxId { get; set; } +#nullable restore +#else + public string SpdxId { get; set; } +#endif + /// The url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Url { get; set; } +#nullable restore +#else + public string Url { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public NullableLicenseSimple() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.NullableLicenseSimple CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.NullableLicenseSimple(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "html_url", n => { HtmlUrl = n.GetStringValue(); } }, + { "key", n => { Key = n.GetStringValue(); } }, + { "name", n => { Name = n.GetStringValue(); } }, + { "node_id", n => { NodeId = n.GetStringValue(); } }, + { "spdx_id", n => { SpdxId = n.GetStringValue(); } }, + { "url", n => { Url = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("html_url", HtmlUrl); + writer.WriteStringValue("key", Key); + writer.WriteStringValue("name", Name); + writer.WriteStringValue("node_id", NodeId); + writer.WriteStringValue("spdx_id", SpdxId); + writer.WriteStringValue("url", Url); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/NullableMilestone.cs b/src/Ayllu.Github.Client/Github/Client/Models/NullableMilestone.cs new file mode 100644 index 0000000..00a1ff0 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/NullableMilestone.cs @@ -0,0 +1,163 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + /// + /// A collection of related issues and pull requests. + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class NullableMilestone : IAdditionalDataHolder, IParsable + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The closed_at property + public DateTimeOffset? ClosedAt { get; set; } + /// The closed_issues property + public int? ClosedIssues { get; set; } + /// The created_at property + public DateTimeOffset? CreatedAt { get; set; } + /// A GitHub user. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.NullableSimpleUser? Creator { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.NullableSimpleUser Creator { get; set; } +#endif + /// The description property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Description { get; set; } +#nullable restore +#else + public string Description { get; set; } +#endif + /// The due_on property + public DateTimeOffset? DueOn { get; set; } + /// The html_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? HtmlUrl { get; set; } +#nullable restore +#else + public string HtmlUrl { get; set; } +#endif + /// The id property + public int? Id { get; set; } + /// The labels_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? LabelsUrl { get; set; } +#nullable restore +#else + public string LabelsUrl { get; set; } +#endif + /// The node_id property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? NodeId { get; set; } +#nullable restore +#else + public string NodeId { get; set; } +#endif + /// The number of the milestone. + public int? Number { get; set; } + /// The open_issues property + public int? OpenIssues { get; set; } + /// The state of the milestone. + public global::Ayllu.Github.Client.Models.NullableMilestone_state? State { get; set; } + /// The title of the milestone. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Title { get; set; } +#nullable restore +#else + public string Title { get; set; } +#endif + /// The updated_at property + public DateTimeOffset? UpdatedAt { get; set; } + /// The url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Url { get; set; } +#nullable restore +#else + public string Url { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public NullableMilestone() + { + AdditionalData = new Dictionary(); + State = global::Ayllu.Github.Client.Models.NullableMilestone_state.Open; + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.NullableMilestone CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.NullableMilestone(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "closed_at", n => { ClosedAt = n.GetDateTimeOffsetValue(); } }, + { "closed_issues", n => { ClosedIssues = n.GetIntValue(); } }, + { "created_at", n => { CreatedAt = n.GetDateTimeOffsetValue(); } }, + { "creator", n => { Creator = n.GetObjectValue(global::Ayllu.Github.Client.Models.NullableSimpleUser.CreateFromDiscriminatorValue); } }, + { "description", n => { Description = n.GetStringValue(); } }, + { "due_on", n => { DueOn = n.GetDateTimeOffsetValue(); } }, + { "html_url", n => { HtmlUrl = n.GetStringValue(); } }, + { "id", n => { Id = n.GetIntValue(); } }, + { "labels_url", n => { LabelsUrl = n.GetStringValue(); } }, + { "node_id", n => { NodeId = n.GetStringValue(); } }, + { "number", n => { Number = n.GetIntValue(); } }, + { "open_issues", n => { OpenIssues = n.GetIntValue(); } }, + { "state", n => { State = n.GetEnumValue(); } }, + { "title", n => { Title = n.GetStringValue(); } }, + { "updated_at", n => { UpdatedAt = n.GetDateTimeOffsetValue(); } }, + { "url", n => { Url = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteDateTimeOffsetValue("closed_at", ClosedAt); + writer.WriteIntValue("closed_issues", ClosedIssues); + writer.WriteDateTimeOffsetValue("created_at", CreatedAt); + writer.WriteObjectValue("creator", Creator); + writer.WriteStringValue("description", Description); + writer.WriteDateTimeOffsetValue("due_on", DueOn); + writer.WriteStringValue("html_url", HtmlUrl); + writer.WriteIntValue("id", Id); + writer.WriteStringValue("labels_url", LabelsUrl); + writer.WriteStringValue("node_id", NodeId); + writer.WriteIntValue("number", Number); + writer.WriteIntValue("open_issues", OpenIssues); + writer.WriteEnumValue("state", State); + writer.WriteStringValue("title", Title); + writer.WriteDateTimeOffsetValue("updated_at", UpdatedAt); + writer.WriteStringValue("url", Url); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/NullableMilestone_state.cs b/src/Ayllu.Github.Client/Github/Client/Models/NullableMilestone_state.cs new file mode 100644 index 0000000..0f6d593 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/NullableMilestone_state.cs @@ -0,0 +1,19 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Models +{ + /// The state of the milestone. + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public enum NullableMilestone_state + { + [EnumMember(Value = "open")] + #pragma warning disable CS1591 + Open, + #pragma warning restore CS1591 + [EnumMember(Value = "closed")] + #pragma warning disable CS1591 + Closed, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Models/NullableMinimalRepository.cs b/src/Ayllu.Github.Client/Github/Client/Models/NullableMinimalRepository.cs new file mode 100644 index 0000000..306615f --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/NullableMinimalRepository.cs @@ -0,0 +1,768 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + /// + /// Minimal Repository + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class NullableMinimalRepository : IAdditionalDataHolder, IParsable + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The allow_forking property + public bool? AllowForking { get; set; } + /// The archived property + public bool? Archived { get; set; } + /// The archive_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? ArchiveUrl { get; set; } +#nullable restore +#else + public string ArchiveUrl { get; set; } +#endif + /// The assignees_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? AssigneesUrl { get; set; } +#nullable restore +#else + public string AssigneesUrl { get; set; } +#endif + /// The blobs_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? BlobsUrl { get; set; } +#nullable restore +#else + public string BlobsUrl { get; set; } +#endif + /// The branches_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? BranchesUrl { get; set; } +#nullable restore +#else + public string BranchesUrl { get; set; } +#endif + /// The clone_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? CloneUrl { get; set; } +#nullable restore +#else + public string CloneUrl { get; set; } +#endif + /// Code Of Conduct +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.CodeOfConduct? CodeOfConduct { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.CodeOfConduct CodeOfConduct { get; set; } +#endif + /// The collaborators_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? CollaboratorsUrl { get; set; } +#nullable restore +#else + public string CollaboratorsUrl { get; set; } +#endif + /// The comments_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? CommentsUrl { get; set; } +#nullable restore +#else + public string CommentsUrl { get; set; } +#endif + /// The commits_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? CommitsUrl { get; set; } +#nullable restore +#else + public string CommitsUrl { get; set; } +#endif + /// The compare_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? CompareUrl { get; set; } +#nullable restore +#else + public string CompareUrl { get; set; } +#endif + /// The contents_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? ContentsUrl { get; set; } +#nullable restore +#else + public string ContentsUrl { get; set; } +#endif + /// The contributors_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? ContributorsUrl { get; set; } +#nullable restore +#else + public string ContributorsUrl { get; set; } +#endif + /// The created_at property + public DateTimeOffset? CreatedAt { get; set; } + /// 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. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.NullableMinimalRepository_custom_properties? CustomProperties { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.NullableMinimalRepository_custom_properties CustomProperties { get; set; } +#endif + /// The default_branch property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? DefaultBranch { get; set; } +#nullable restore +#else + public string DefaultBranch { get; set; } +#endif + /// The delete_branch_on_merge property + public bool? DeleteBranchOnMerge { get; set; } + /// The deployments_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? DeploymentsUrl { get; set; } +#nullable restore +#else + public string DeploymentsUrl { get; set; } +#endif + /// The description property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Description { get; set; } +#nullable restore +#else + public string Description { get; set; } +#endif + /// The disabled property + public bool? Disabled { get; set; } + /// The downloads_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? DownloadsUrl { get; set; } +#nullable restore +#else + public string DownloadsUrl { get; set; } +#endif + /// The events_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? EventsUrl { get; set; } +#nullable restore +#else + public string EventsUrl { get; set; } +#endif + /// The fork property + public bool? Fork { get; set; } + /// The forks property + public int? Forks { get; set; } + /// The forks_count property + public int? ForksCount { get; set; } + /// The forks_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? ForksUrl { get; set; } +#nullable restore +#else + public string ForksUrl { get; set; } +#endif + /// The full_name property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? FullName { get; set; } +#nullable restore +#else + public string FullName { get; set; } +#endif + /// The git_commits_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? GitCommitsUrl { get; set; } +#nullable restore +#else + public string GitCommitsUrl { get; set; } +#endif + /// The git_refs_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? GitRefsUrl { get; set; } +#nullable restore +#else + public string GitRefsUrl { get; set; } +#endif + /// The git_tags_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? GitTagsUrl { get; set; } +#nullable restore +#else + public string GitTagsUrl { get; set; } +#endif + /// The git_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? GitUrl { get; set; } +#nullable restore +#else + public string GitUrl { get; set; } +#endif + /// The has_discussions property + public bool? HasDiscussions { get; set; } + /// The has_downloads property + public bool? HasDownloads { get; set; } + /// The has_issues property + public bool? HasIssues { get; set; } + /// The has_pages property + public bool? HasPages { get; set; } + /// The has_projects property + public bool? HasProjects { get; set; } + /// The has_wiki property + public bool? HasWiki { get; set; } + /// The homepage property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Homepage { get; set; } +#nullable restore +#else + public string Homepage { get; set; } +#endif + /// The hooks_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? HooksUrl { get; set; } +#nullable restore +#else + public string HooksUrl { get; set; } +#endif + /// The html_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? HtmlUrl { get; set; } +#nullable restore +#else + public string HtmlUrl { get; set; } +#endif + /// The id property + public long? Id { get; set; } + /// The issue_comment_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? IssueCommentUrl { get; set; } +#nullable restore +#else + public string IssueCommentUrl { get; set; } +#endif + /// The issue_events_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? IssueEventsUrl { get; set; } +#nullable restore +#else + public string IssueEventsUrl { get; set; } +#endif + /// The issues_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? IssuesUrl { get; set; } +#nullable restore +#else + public string IssuesUrl { get; set; } +#endif + /// The is_template property + public bool? IsTemplate { get; set; } + /// The keys_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? KeysUrl { get; set; } +#nullable restore +#else + public string KeysUrl { get; set; } +#endif + /// The labels_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? LabelsUrl { get; set; } +#nullable restore +#else + public string LabelsUrl { get; set; } +#endif + /// The language property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Language { get; set; } +#nullable restore +#else + public string Language { get; set; } +#endif + /// The languages_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? LanguagesUrl { get; set; } +#nullable restore +#else + public string LanguagesUrl { get; set; } +#endif + /// The license property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.NullableMinimalRepository_license? License { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.NullableMinimalRepository_license License { get; set; } +#endif + /// The merges_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? MergesUrl { get; set; } +#nullable restore +#else + public string MergesUrl { get; set; } +#endif + /// The milestones_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? MilestonesUrl { get; set; } +#nullable restore +#else + public string MilestonesUrl { get; set; } +#endif + /// The mirror_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? MirrorUrl { get; set; } +#nullable restore +#else + public string MirrorUrl { get; set; } +#endif + /// The name property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Name { get; set; } +#nullable restore +#else + public string Name { get; set; } +#endif + /// The network_count property + public int? NetworkCount { get; set; } + /// The node_id property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? NodeId { get; set; } +#nullable restore +#else + public string NodeId { get; set; } +#endif + /// The notifications_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? NotificationsUrl { get; set; } +#nullable restore +#else + public string NotificationsUrl { get; set; } +#endif + /// The open_issues property + public int? OpenIssues { get; set; } + /// The open_issues_count property + public int? OpenIssuesCount { get; set; } + /// A GitHub user. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.SimpleUser? Owner { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.SimpleUser Owner { get; set; } +#endif + /// The permissions property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.NullableMinimalRepository_permissions? Permissions { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.NullableMinimalRepository_permissions Permissions { get; set; } +#endif + /// The private property + public bool? Private { get; set; } + /// The pulls_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? PullsUrl { get; set; } +#nullable restore +#else + public string PullsUrl { get; set; } +#endif + /// The pushed_at property + public DateTimeOffset? PushedAt { get; set; } + /// The releases_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? ReleasesUrl { get; set; } +#nullable restore +#else + public string ReleasesUrl { get; set; } +#endif + /// The role_name property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? RoleName { get; set; } +#nullable restore +#else + public string RoleName { get; set; } +#endif + /// The security_and_analysis property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.SecurityAndAnalysis? SecurityAndAnalysis { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.SecurityAndAnalysis SecurityAndAnalysis { get; set; } +#endif + /// The size of the repository, in kilobytes. Size is calculated hourly. When a repository is initially created, the size is 0. + public int? Size { get; set; } + /// The ssh_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? SshUrl { get; set; } +#nullable restore +#else + public string SshUrl { get; set; } +#endif + /// The stargazers_count property + public int? StargazersCount { get; set; } + /// The stargazers_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? StargazersUrl { get; set; } +#nullable restore +#else + public string StargazersUrl { get; set; } +#endif + /// The statuses_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? StatusesUrl { get; set; } +#nullable restore +#else + public string StatusesUrl { get; set; } +#endif + /// The subscribers_count property + public int? SubscribersCount { get; set; } + /// The subscribers_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? SubscribersUrl { get; set; } +#nullable restore +#else + public string SubscribersUrl { get; set; } +#endif + /// The subscription_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? SubscriptionUrl { get; set; } +#nullable restore +#else + public string SubscriptionUrl { get; set; } +#endif + /// The svn_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? SvnUrl { get; set; } +#nullable restore +#else + public string SvnUrl { get; set; } +#endif + /// The tags_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? TagsUrl { get; set; } +#nullable restore +#else + public string TagsUrl { get; set; } +#endif + /// The teams_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? TeamsUrl { get; set; } +#nullable restore +#else + public string TeamsUrl { get; set; } +#endif + /// The temp_clone_token property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? TempCloneToken { get; set; } +#nullable restore +#else + public string TempCloneToken { get; set; } +#endif + /// The topics property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? Topics { get; set; } +#nullable restore +#else + public List Topics { get; set; } +#endif + /// The trees_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? TreesUrl { get; set; } +#nullable restore +#else + public string TreesUrl { get; set; } +#endif + /// The updated_at property + public DateTimeOffset? UpdatedAt { get; set; } + /// The url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Url { get; set; } +#nullable restore +#else + public string Url { get; set; } +#endif + /// The visibility property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Visibility { get; set; } +#nullable restore +#else + public string Visibility { get; set; } +#endif + /// The watchers property + public int? Watchers { get; set; } + /// The watchers_count property + public int? WatchersCount { get; set; } + /// The web_commit_signoff_required property + public bool? WebCommitSignoffRequired { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public NullableMinimalRepository() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.NullableMinimalRepository CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.NullableMinimalRepository(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "allow_forking", n => { AllowForking = n.GetBoolValue(); } }, + { "archive_url", n => { ArchiveUrl = n.GetStringValue(); } }, + { "archived", n => { Archived = n.GetBoolValue(); } }, + { "assignees_url", n => { AssigneesUrl = n.GetStringValue(); } }, + { "blobs_url", n => { BlobsUrl = n.GetStringValue(); } }, + { "branches_url", n => { BranchesUrl = n.GetStringValue(); } }, + { "clone_url", n => { CloneUrl = n.GetStringValue(); } }, + { "code_of_conduct", n => { CodeOfConduct = n.GetObjectValue(global::Ayllu.Github.Client.Models.CodeOfConduct.CreateFromDiscriminatorValue); } }, + { "collaborators_url", n => { CollaboratorsUrl = n.GetStringValue(); } }, + { "comments_url", n => { CommentsUrl = n.GetStringValue(); } }, + { "commits_url", n => { CommitsUrl = n.GetStringValue(); } }, + { "compare_url", n => { CompareUrl = n.GetStringValue(); } }, + { "contents_url", n => { ContentsUrl = n.GetStringValue(); } }, + { "contributors_url", n => { ContributorsUrl = n.GetStringValue(); } }, + { "created_at", n => { CreatedAt = n.GetDateTimeOffsetValue(); } }, + { "custom_properties", n => { CustomProperties = n.GetObjectValue(global::Ayllu.Github.Client.Models.NullableMinimalRepository_custom_properties.CreateFromDiscriminatorValue); } }, + { "default_branch", n => { DefaultBranch = n.GetStringValue(); } }, + { "delete_branch_on_merge", n => { DeleteBranchOnMerge = n.GetBoolValue(); } }, + { "deployments_url", n => { DeploymentsUrl = n.GetStringValue(); } }, + { "description", n => { Description = n.GetStringValue(); } }, + { "disabled", n => { Disabled = n.GetBoolValue(); } }, + { "downloads_url", n => { DownloadsUrl = n.GetStringValue(); } }, + { "events_url", n => { EventsUrl = n.GetStringValue(); } }, + { "fork", n => { Fork = n.GetBoolValue(); } }, + { "forks", n => { Forks = n.GetIntValue(); } }, + { "forks_count", n => { ForksCount = n.GetIntValue(); } }, + { "forks_url", n => { ForksUrl = n.GetStringValue(); } }, + { "full_name", n => { FullName = n.GetStringValue(); } }, + { "git_commits_url", n => { GitCommitsUrl = n.GetStringValue(); } }, + { "git_refs_url", n => { GitRefsUrl = n.GetStringValue(); } }, + { "git_tags_url", n => { GitTagsUrl = n.GetStringValue(); } }, + { "git_url", n => { GitUrl = n.GetStringValue(); } }, + { "has_discussions", n => { HasDiscussions = n.GetBoolValue(); } }, + { "has_downloads", n => { HasDownloads = n.GetBoolValue(); } }, + { "has_issues", n => { HasIssues = n.GetBoolValue(); } }, + { "has_pages", n => { HasPages = n.GetBoolValue(); } }, + { "has_projects", n => { HasProjects = n.GetBoolValue(); } }, + { "has_wiki", n => { HasWiki = n.GetBoolValue(); } }, + { "homepage", n => { Homepage = n.GetStringValue(); } }, + { "hooks_url", n => { HooksUrl = n.GetStringValue(); } }, + { "html_url", n => { HtmlUrl = n.GetStringValue(); } }, + { "id", n => { Id = n.GetLongValue(); } }, + { "is_template", n => { IsTemplate = n.GetBoolValue(); } }, + { "issue_comment_url", n => { IssueCommentUrl = n.GetStringValue(); } }, + { "issue_events_url", n => { IssueEventsUrl = n.GetStringValue(); } }, + { "issues_url", n => { IssuesUrl = n.GetStringValue(); } }, + { "keys_url", n => { KeysUrl = n.GetStringValue(); } }, + { "labels_url", n => { LabelsUrl = n.GetStringValue(); } }, + { "language", n => { Language = n.GetStringValue(); } }, + { "languages_url", n => { LanguagesUrl = n.GetStringValue(); } }, + { "license", n => { License = n.GetObjectValue(global::Ayllu.Github.Client.Models.NullableMinimalRepository_license.CreateFromDiscriminatorValue); } }, + { "merges_url", n => { MergesUrl = n.GetStringValue(); } }, + { "milestones_url", n => { MilestonesUrl = n.GetStringValue(); } }, + { "mirror_url", n => { MirrorUrl = n.GetStringValue(); } }, + { "name", n => { Name = n.GetStringValue(); } }, + { "network_count", n => { NetworkCount = n.GetIntValue(); } }, + { "node_id", n => { NodeId = n.GetStringValue(); } }, + { "notifications_url", n => { NotificationsUrl = n.GetStringValue(); } }, + { "open_issues", n => { OpenIssues = n.GetIntValue(); } }, + { "open_issues_count", n => { OpenIssuesCount = n.GetIntValue(); } }, + { "owner", n => { Owner = n.GetObjectValue(global::Ayllu.Github.Client.Models.SimpleUser.CreateFromDiscriminatorValue); } }, + { "permissions", n => { Permissions = n.GetObjectValue(global::Ayllu.Github.Client.Models.NullableMinimalRepository_permissions.CreateFromDiscriminatorValue); } }, + { "private", n => { Private = n.GetBoolValue(); } }, + { "pulls_url", n => { PullsUrl = n.GetStringValue(); } }, + { "pushed_at", n => { PushedAt = n.GetDateTimeOffsetValue(); } }, + { "releases_url", n => { ReleasesUrl = n.GetStringValue(); } }, + { "role_name", n => { RoleName = n.GetStringValue(); } }, + { "security_and_analysis", n => { SecurityAndAnalysis = n.GetObjectValue(global::Ayllu.Github.Client.Models.SecurityAndAnalysis.CreateFromDiscriminatorValue); } }, + { "size", n => { Size = n.GetIntValue(); } }, + { "ssh_url", n => { SshUrl = n.GetStringValue(); } }, + { "stargazers_count", n => { StargazersCount = n.GetIntValue(); } }, + { "stargazers_url", n => { StargazersUrl = n.GetStringValue(); } }, + { "statuses_url", n => { StatusesUrl = n.GetStringValue(); } }, + { "subscribers_count", n => { SubscribersCount = n.GetIntValue(); } }, + { "subscribers_url", n => { SubscribersUrl = n.GetStringValue(); } }, + { "subscription_url", n => { SubscriptionUrl = n.GetStringValue(); } }, + { "svn_url", n => { SvnUrl = n.GetStringValue(); } }, + { "tags_url", n => { TagsUrl = n.GetStringValue(); } }, + { "teams_url", n => { TeamsUrl = n.GetStringValue(); } }, + { "temp_clone_token", n => { TempCloneToken = n.GetStringValue(); } }, + { "topics", n => { Topics = n.GetCollectionOfPrimitiveValues()?.AsList(); } }, + { "trees_url", n => { TreesUrl = n.GetStringValue(); } }, + { "updated_at", n => { UpdatedAt = n.GetDateTimeOffsetValue(); } }, + { "url", n => { Url = n.GetStringValue(); } }, + { "visibility", n => { Visibility = n.GetStringValue(); } }, + { "watchers", n => { Watchers = n.GetIntValue(); } }, + { "watchers_count", n => { WatchersCount = n.GetIntValue(); } }, + { "web_commit_signoff_required", n => { WebCommitSignoffRequired = n.GetBoolValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteBoolValue("allow_forking", AllowForking); + writer.WriteBoolValue("archived", Archived); + writer.WriteStringValue("archive_url", ArchiveUrl); + writer.WriteStringValue("assignees_url", AssigneesUrl); + writer.WriteStringValue("blobs_url", BlobsUrl); + writer.WriteStringValue("branches_url", BranchesUrl); + writer.WriteStringValue("clone_url", CloneUrl); + writer.WriteObjectValue("code_of_conduct", CodeOfConduct); + writer.WriteStringValue("collaborators_url", CollaboratorsUrl); + writer.WriteStringValue("comments_url", CommentsUrl); + writer.WriteStringValue("commits_url", CommitsUrl); + writer.WriteStringValue("compare_url", CompareUrl); + writer.WriteStringValue("contents_url", ContentsUrl); + writer.WriteStringValue("contributors_url", ContributorsUrl); + writer.WriteDateTimeOffsetValue("created_at", CreatedAt); + writer.WriteObjectValue("custom_properties", CustomProperties); + writer.WriteStringValue("default_branch", DefaultBranch); + writer.WriteBoolValue("delete_branch_on_merge", DeleteBranchOnMerge); + writer.WriteStringValue("deployments_url", DeploymentsUrl); + writer.WriteStringValue("description", Description); + writer.WriteBoolValue("disabled", Disabled); + writer.WriteStringValue("downloads_url", DownloadsUrl); + writer.WriteStringValue("events_url", EventsUrl); + writer.WriteBoolValue("fork", Fork); + writer.WriteIntValue("forks", Forks); + writer.WriteIntValue("forks_count", ForksCount); + writer.WriteStringValue("forks_url", ForksUrl); + writer.WriteStringValue("full_name", FullName); + writer.WriteStringValue("git_commits_url", GitCommitsUrl); + writer.WriteStringValue("git_refs_url", GitRefsUrl); + writer.WriteStringValue("git_tags_url", GitTagsUrl); + writer.WriteStringValue("git_url", GitUrl); + writer.WriteBoolValue("has_discussions", HasDiscussions); + writer.WriteBoolValue("has_downloads", HasDownloads); + writer.WriteBoolValue("has_issues", HasIssues); + writer.WriteBoolValue("has_pages", HasPages); + writer.WriteBoolValue("has_projects", HasProjects); + writer.WriteBoolValue("has_wiki", HasWiki); + writer.WriteStringValue("homepage", Homepage); + writer.WriteStringValue("hooks_url", HooksUrl); + writer.WriteStringValue("html_url", HtmlUrl); + writer.WriteLongValue("id", Id); + writer.WriteStringValue("issue_comment_url", IssueCommentUrl); + writer.WriteStringValue("issue_events_url", IssueEventsUrl); + writer.WriteStringValue("issues_url", IssuesUrl); + writer.WriteBoolValue("is_template", IsTemplate); + writer.WriteStringValue("keys_url", KeysUrl); + writer.WriteStringValue("labels_url", LabelsUrl); + writer.WriteStringValue("language", Language); + writer.WriteStringValue("languages_url", LanguagesUrl); + writer.WriteObjectValue("license", License); + writer.WriteStringValue("merges_url", MergesUrl); + writer.WriteStringValue("milestones_url", MilestonesUrl); + writer.WriteStringValue("mirror_url", MirrorUrl); + writer.WriteStringValue("name", Name); + writer.WriteIntValue("network_count", NetworkCount); + writer.WriteStringValue("node_id", NodeId); + writer.WriteStringValue("notifications_url", NotificationsUrl); + writer.WriteIntValue("open_issues", OpenIssues); + writer.WriteIntValue("open_issues_count", OpenIssuesCount); + writer.WriteObjectValue("owner", Owner); + writer.WriteObjectValue("permissions", Permissions); + writer.WriteBoolValue("private", Private); + writer.WriteStringValue("pulls_url", PullsUrl); + writer.WriteDateTimeOffsetValue("pushed_at", PushedAt); + writer.WriteStringValue("releases_url", ReleasesUrl); + writer.WriteStringValue("role_name", RoleName); + writer.WriteObjectValue("security_and_analysis", SecurityAndAnalysis); + writer.WriteIntValue("size", Size); + writer.WriteStringValue("ssh_url", SshUrl); + writer.WriteIntValue("stargazers_count", StargazersCount); + writer.WriteStringValue("stargazers_url", StargazersUrl); + writer.WriteStringValue("statuses_url", StatusesUrl); + writer.WriteIntValue("subscribers_count", SubscribersCount); + writer.WriteStringValue("subscribers_url", SubscribersUrl); + writer.WriteStringValue("subscription_url", SubscriptionUrl); + writer.WriteStringValue("svn_url", SvnUrl); + writer.WriteStringValue("tags_url", TagsUrl); + writer.WriteStringValue("teams_url", TeamsUrl); + writer.WriteStringValue("temp_clone_token", TempCloneToken); + writer.WriteCollectionOfPrimitiveValues("topics", Topics); + writer.WriteStringValue("trees_url", TreesUrl); + writer.WriteDateTimeOffsetValue("updated_at", UpdatedAt); + writer.WriteStringValue("url", Url); + writer.WriteStringValue("visibility", Visibility); + writer.WriteIntValue("watchers", Watchers); + writer.WriteIntValue("watchers_count", WatchersCount); + writer.WriteBoolValue("web_commit_signoff_required", WebCommitSignoffRequired); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/NullableMinimalRepository_custom_properties.cs b/src/Ayllu.Github.Client/Github/Client/Models/NullableMinimalRepository_custom_properties.cs new file mode 100644 index 0000000..55ba287 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/NullableMinimalRepository_custom_properties.cs @@ -0,0 +1,56 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + /// + /// 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. + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class NullableMinimalRepository_custom_properties : IAdditionalDataHolder, IParsable + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public NullableMinimalRepository_custom_properties() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.NullableMinimalRepository_custom_properties CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.NullableMinimalRepository_custom_properties(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/NullableMinimalRepository_license.cs b/src/Ayllu.Github.Client/Github/Client/Models/NullableMinimalRepository_license.cs new file mode 100644 index 0000000..42c44e6 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/NullableMinimalRepository_license.cs @@ -0,0 +1,105 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class NullableMinimalRepository_license : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The key property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Key { get; set; } +#nullable restore +#else + public string Key { get; set; } +#endif + /// The name property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Name { get; set; } +#nullable restore +#else + public string Name { get; set; } +#endif + /// The node_id property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? NodeId { get; set; } +#nullable restore +#else + public string NodeId { get; set; } +#endif + /// The spdx_id property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? SpdxId { get; set; } +#nullable restore +#else + public string SpdxId { get; set; } +#endif + /// The url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Url { get; set; } +#nullable restore +#else + public string Url { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public NullableMinimalRepository_license() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.NullableMinimalRepository_license CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.NullableMinimalRepository_license(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "key", n => { Key = n.GetStringValue(); } }, + { "name", n => { Name = n.GetStringValue(); } }, + { "node_id", n => { NodeId = n.GetStringValue(); } }, + { "spdx_id", n => { SpdxId = n.GetStringValue(); } }, + { "url", n => { Url = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("key", Key); + writer.WriteStringValue("name", Name); + writer.WriteStringValue("node_id", NodeId); + writer.WriteStringValue("spdx_id", SpdxId); + writer.WriteStringValue("url", Url); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/NullableMinimalRepository_permissions.cs b/src/Ayllu.Github.Client/Github/Client/Models/NullableMinimalRepository_permissions.cs new file mode 100644 index 0000000..6b8cd23 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/NullableMinimalRepository_permissions.cs @@ -0,0 +1,75 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class NullableMinimalRepository_permissions : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The admin property + public bool? Admin { get; set; } + /// The maintain property + public bool? Maintain { get; set; } + /// The pull property + public bool? Pull { get; set; } + /// The push property + public bool? Push { get; set; } + /// The triage property + public bool? Triage { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public NullableMinimalRepository_permissions() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.NullableMinimalRepository_permissions CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.NullableMinimalRepository_permissions(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "admin", n => { Admin = n.GetBoolValue(); } }, + { "maintain", n => { Maintain = n.GetBoolValue(); } }, + { "pull", n => { Pull = n.GetBoolValue(); } }, + { "push", n => { Push = n.GetBoolValue(); } }, + { "triage", n => { Triage = n.GetBoolValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteBoolValue("admin", Admin); + writer.WriteBoolValue("maintain", Maintain); + writer.WriteBoolValue("pull", Pull); + writer.WriteBoolValue("push", Push); + writer.WriteBoolValue("triage", Triage); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/NullableOrganizationSimple.cs b/src/Ayllu.Github.Client/Github/Client/Models/NullableOrganizationSimple.cs new file mode 100644 index 0000000..353c4bd --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/NullableOrganizationSimple.cs @@ -0,0 +1,170 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + /// + /// A GitHub organization. + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class NullableOrganizationSimple : IAdditionalDataHolder, IParsable + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The avatar_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? AvatarUrl { get; set; } +#nullable restore +#else + public string AvatarUrl { get; set; } +#endif + /// The description property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Description { get; set; } +#nullable restore +#else + public string Description { get; set; } +#endif + /// The events_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? EventsUrl { get; set; } +#nullable restore +#else + public string EventsUrl { get; set; } +#endif + /// The hooks_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? HooksUrl { get; set; } +#nullable restore +#else + public string HooksUrl { get; set; } +#endif + /// The id property + public int? Id { get; set; } + /// The issues_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? IssuesUrl { get; set; } +#nullable restore +#else + public string IssuesUrl { get; set; } +#endif + /// The login property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Login { get; set; } +#nullable restore +#else + public string Login { get; set; } +#endif + /// The members_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? MembersUrl { get; set; } +#nullable restore +#else + public string MembersUrl { get; set; } +#endif + /// The node_id property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? NodeId { get; set; } +#nullable restore +#else + public string NodeId { get; set; } +#endif + /// The public_members_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? PublicMembersUrl { get; set; } +#nullable restore +#else + public string PublicMembersUrl { get; set; } +#endif + /// The repos_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? ReposUrl { get; set; } +#nullable restore +#else + public string ReposUrl { get; set; } +#endif + /// The url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Url { get; set; } +#nullable restore +#else + public string Url { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public NullableOrganizationSimple() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.NullableOrganizationSimple CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.NullableOrganizationSimple(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "avatar_url", n => { AvatarUrl = n.GetStringValue(); } }, + { "description", n => { Description = n.GetStringValue(); } }, + { "events_url", n => { EventsUrl = n.GetStringValue(); } }, + { "hooks_url", n => { HooksUrl = n.GetStringValue(); } }, + { "id", n => { Id = n.GetIntValue(); } }, + { "issues_url", n => { IssuesUrl = n.GetStringValue(); } }, + { "login", n => { Login = n.GetStringValue(); } }, + { "members_url", n => { MembersUrl = n.GetStringValue(); } }, + { "node_id", n => { NodeId = n.GetStringValue(); } }, + { "public_members_url", n => { PublicMembersUrl = n.GetStringValue(); } }, + { "repos_url", n => { ReposUrl = n.GetStringValue(); } }, + { "url", n => { Url = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("avatar_url", AvatarUrl); + writer.WriteStringValue("description", Description); + writer.WriteStringValue("events_url", EventsUrl); + writer.WriteStringValue("hooks_url", HooksUrl); + writer.WriteIntValue("id", Id); + writer.WriteStringValue("issues_url", IssuesUrl); + writer.WriteStringValue("login", Login); + writer.WriteStringValue("members_url", MembersUrl); + writer.WriteStringValue("node_id", NodeId); + writer.WriteStringValue("public_members_url", PublicMembersUrl); + writer.WriteStringValue("repos_url", ReposUrl); + writer.WriteStringValue("url", Url); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/NullableRepository.cs b/src/Ayllu.Github.Client/Github/Client/Models/NullableRepository.cs new file mode 100644 index 0000000..37a17f4 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/NullableRepository.cs @@ -0,0 +1,797 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + /// + /// A repository on GitHub. + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class NullableRepository : IAdditionalDataHolder, IParsable + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// Whether to allow Auto-merge to be used on pull requests. + public bool? AllowAutoMerge { get; set; } + /// Whether to allow forking this repo + public bool? AllowForking { get; set; } + /// Whether to allow merge commits for pull requests. + public bool? AllowMergeCommit { get; set; } + /// Whether to allow rebase merges for pull requests. + public bool? AllowRebaseMerge { get; set; } + /// Whether to allow squash merges for pull requests. + public bool? AllowSquashMerge { get; set; } + /// 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. + public bool? AllowUpdateBranch { get; set; } + /// Whether anonymous git access is enabled for this repository + public bool? AnonymousAccessEnabled { get; set; } + /// Whether the repository is archived. + public bool? Archived { get; set; } + /// The archive_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? ArchiveUrl { get; set; } +#nullable restore +#else + public string ArchiveUrl { get; set; } +#endif + /// The assignees_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? AssigneesUrl { get; set; } +#nullable restore +#else + public string AssigneesUrl { get; set; } +#endif + /// The blobs_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? BlobsUrl { get; set; } +#nullable restore +#else + public string BlobsUrl { get; set; } +#endif + /// The branches_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? BranchesUrl { get; set; } +#nullable restore +#else + public string BranchesUrl { get; set; } +#endif + /// The clone_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? CloneUrl { get; set; } +#nullable restore +#else + public string CloneUrl { get; set; } +#endif + /// The status of the code search index for this repository +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.NullableRepository_code_search_index_status? CodeSearchIndexStatus { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.NullableRepository_code_search_index_status CodeSearchIndexStatus { get; set; } +#endif + /// The collaborators_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? CollaboratorsUrl { get; set; } +#nullable restore +#else + public string CollaboratorsUrl { get; set; } +#endif + /// The comments_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? CommentsUrl { get; set; } +#nullable restore +#else + public string CommentsUrl { get; set; } +#endif + /// The commits_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? CommitsUrl { get; set; } +#nullable restore +#else + public string CommitsUrl { get; set; } +#endif + /// The compare_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? CompareUrl { get; set; } +#nullable restore +#else + public string CompareUrl { get; set; } +#endif + /// The contents_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? ContentsUrl { get; set; } +#nullable restore +#else + public string ContentsUrl { get; set; } +#endif + /// The contributors_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? ContributorsUrl { get; set; } +#nullable restore +#else + public string ContributorsUrl { get; set; } +#endif + /// The created_at property + public DateTimeOffset? CreatedAt { get; set; } + /// The default branch of the repository. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? DefaultBranch { get; set; } +#nullable restore +#else + public string DefaultBranch { get; set; } +#endif + /// Whether to delete head branches when pull requests are merged + public bool? DeleteBranchOnMerge { get; set; } + /// The deployments_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? DeploymentsUrl { get; set; } +#nullable restore +#else + public string DeploymentsUrl { get; set; } +#endif + /// The description property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Description { get; set; } +#nullable restore +#else + public string Description { get; set; } +#endif + /// Returns whether or not this repository disabled. + public bool? Disabled { get; set; } + /// The downloads_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? DownloadsUrl { get; set; } +#nullable restore +#else + public string DownloadsUrl { get; set; } +#endif + /// The events_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? EventsUrl { get; set; } +#nullable restore +#else + public string EventsUrl { get; set; } +#endif + /// The fork property + public bool? Fork { get; set; } + /// The forks property + public int? Forks { get; set; } + /// The forks_count property + public int? ForksCount { get; set; } + /// The forks_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? ForksUrl { get; set; } +#nullable restore +#else + public string ForksUrl { get; set; } +#endif + /// The full_name property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? FullName { get; set; } +#nullable restore +#else + public string FullName { get; set; } +#endif + /// The git_commits_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? GitCommitsUrl { get; set; } +#nullable restore +#else + public string GitCommitsUrl { get; set; } +#endif + /// The git_refs_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? GitRefsUrl { get; set; } +#nullable restore +#else + public string GitRefsUrl { get; set; } +#endif + /// The git_tags_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? GitTagsUrl { get; set; } +#nullable restore +#else + public string GitTagsUrl { get; set; } +#endif + /// The git_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? GitUrl { get; set; } +#nullable restore +#else + public string GitUrl { get; set; } +#endif + /// Whether discussions are enabled. + public bool? HasDiscussions { get; set; } + /// Whether downloads are enabled. + [Obsolete("")] + public bool? HasDownloads { get; set; } + /// Whether issues are enabled. + public bool? HasIssues { get; set; } + /// The has_pages property + public bool? HasPages { get; set; } + /// Whether projects are enabled. + public bool? HasProjects { get; set; } + /// Whether the wiki is enabled. + public bool? HasWiki { get; set; } + /// The homepage property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Homepage { get; set; } +#nullable restore +#else + public string Homepage { get; set; } +#endif + /// The hooks_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? HooksUrl { get; set; } +#nullable restore +#else + public string HooksUrl { get; set; } +#endif + /// The html_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? HtmlUrl { get; set; } +#nullable restore +#else + public string HtmlUrl { get; set; } +#endif + /// Unique identifier of the repository + public long? Id { get; set; } + /// The issue_comment_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? IssueCommentUrl { get; set; } +#nullable restore +#else + public string IssueCommentUrl { get; set; } +#endif + /// The issue_events_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? IssueEventsUrl { get; set; } +#nullable restore +#else + public string IssueEventsUrl { get; set; } +#endif + /// The issues_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? IssuesUrl { get; set; } +#nullable restore +#else + public string IssuesUrl { get; set; } +#endif + /// Whether this repository acts as a template that can be used to generate new repositories. + public bool? IsTemplate { get; set; } + /// The keys_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? KeysUrl { get; set; } +#nullable restore +#else + public string KeysUrl { get; set; } +#endif + /// The labels_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? LabelsUrl { get; set; } +#nullable restore +#else + public string LabelsUrl { get; set; } +#endif + /// The language property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Language { get; set; } +#nullable restore +#else + public string Language { get; set; } +#endif + /// The languages_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? LanguagesUrl { get; set; } +#nullable restore +#else + public string LanguagesUrl { get; set; } +#endif + /// License Simple +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.NullableLicenseSimple? License { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.NullableLicenseSimple License { get; set; } +#endif + /// The master_branch property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? MasterBranch { get; set; } +#nullable restore +#else + public string MasterBranch { get; set; } +#endif + /// 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. + public global::Ayllu.Github.Client.Models.NullableRepository_merge_commit_message? MergeCommitMessage { get; set; } + /// 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). + public global::Ayllu.Github.Client.Models.NullableRepository_merge_commit_title? MergeCommitTitle { get; set; } + /// The merges_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? MergesUrl { get; set; } +#nullable restore +#else + public string MergesUrl { get; set; } +#endif + /// The milestones_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? MilestonesUrl { get; set; } +#nullable restore +#else + public string MilestonesUrl { get; set; } +#endif + /// The mirror_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? MirrorUrl { get; set; } +#nullable restore +#else + public string MirrorUrl { get; set; } +#endif + /// The name of the repository. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Name { get; set; } +#nullable restore +#else + public string Name { get; set; } +#endif + /// The node_id property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? NodeId { get; set; } +#nullable restore +#else + public string NodeId { get; set; } +#endif + /// The notifications_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? NotificationsUrl { get; set; } +#nullable restore +#else + public string NotificationsUrl { get; set; } +#endif + /// The open_issues property + public int? OpenIssues { get; set; } + /// The open_issues_count property + public int? OpenIssuesCount { get; set; } + /// A GitHub user. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.SimpleUser? Owner { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.SimpleUser Owner { get; set; } +#endif + /// The permissions property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.NullableRepository_permissions? Permissions { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.NullableRepository_permissions Permissions { get; set; } +#endif + /// Whether the repository is private or public. + public bool? Private { get; set; } + /// The pulls_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? PullsUrl { get; set; } +#nullable restore +#else + public string PullsUrl { get; set; } +#endif + /// The pushed_at property + public DateTimeOffset? PushedAt { get; set; } + /// The releases_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? ReleasesUrl { get; set; } +#nullable restore +#else + public string ReleasesUrl { get; set; } +#endif + /// The size of the repository, in kilobytes. Size is calculated hourly. When a repository is initially created, the size is 0. + public int? Size { get; set; } + /// 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. + public global::Ayllu.Github.Client.Models.NullableRepository_squash_merge_commit_message? SquashMergeCommitMessage { get; set; } + /// 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). + public global::Ayllu.Github.Client.Models.NullableRepository_squash_merge_commit_title? SquashMergeCommitTitle { get; set; } + /// The ssh_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? SshUrl { get; set; } +#nullable restore +#else + public string SshUrl { get; set; } +#endif + /// The stargazers_count property + public int? StargazersCount { get; set; } + /// The stargazers_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? StargazersUrl { get; set; } +#nullable restore +#else + public string StargazersUrl { get; set; } +#endif + /// The starred_at property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? StarredAt { get; set; } +#nullable restore +#else + public string StarredAt { get; set; } +#endif + /// The statuses_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? StatusesUrl { get; set; } +#nullable restore +#else + public string StatusesUrl { get; set; } +#endif + /// The subscribers_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? SubscribersUrl { get; set; } +#nullable restore +#else + public string SubscribersUrl { get; set; } +#endif + /// The subscription_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? SubscriptionUrl { get; set; } +#nullable restore +#else + public string SubscriptionUrl { get; set; } +#endif + /// The svn_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? SvnUrl { get; set; } +#nullable restore +#else + public string SvnUrl { get; set; } +#endif + /// The tags_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? TagsUrl { get; set; } +#nullable restore +#else + public string TagsUrl { get; set; } +#endif + /// The teams_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? TeamsUrl { get; set; } +#nullable restore +#else + public string TeamsUrl { get; set; } +#endif + /// The temp_clone_token property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? TempCloneToken { get; set; } +#nullable restore +#else + public string TempCloneToken { get; set; } +#endif + /// The topics property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? Topics { get; set; } +#nullable restore +#else + public List Topics { get; set; } +#endif + /// The trees_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? TreesUrl { get; set; } +#nullable restore +#else + public string TreesUrl { get; set; } +#endif + /// The updated_at property + public DateTimeOffset? UpdatedAt { get; set; } + /// The url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Url { get; set; } +#nullable restore +#else + public string Url { get; set; } +#endif + /// Whether a squash merge commit can use the pull request title as default. **This property is closing down. Please use `squash_merge_commit_title` instead. + [Obsolete("")] + public bool? UseSquashPrTitleAsDefault { get; set; } + /// The repository visibility: public, private, or internal. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Visibility { get; set; } +#nullable restore +#else + public string Visibility { get; set; } +#endif + /// The watchers property + public int? Watchers { get; set; } + /// The watchers_count property + public int? WatchersCount { get; set; } + /// Whether to require contributors to sign off on web-based commits + public bool? WebCommitSignoffRequired { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public NullableRepository() + { + AdditionalData = new Dictionary(); + Visibility = "public"; + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.NullableRepository CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.NullableRepository(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "allow_auto_merge", n => { AllowAutoMerge = n.GetBoolValue(); } }, + { "allow_forking", n => { AllowForking = n.GetBoolValue(); } }, + { "allow_merge_commit", n => { AllowMergeCommit = n.GetBoolValue(); } }, + { "allow_rebase_merge", n => { AllowRebaseMerge = n.GetBoolValue(); } }, + { "allow_squash_merge", n => { AllowSquashMerge = n.GetBoolValue(); } }, + { "allow_update_branch", n => { AllowUpdateBranch = n.GetBoolValue(); } }, + { "anonymous_access_enabled", n => { AnonymousAccessEnabled = n.GetBoolValue(); } }, + { "archive_url", n => { ArchiveUrl = n.GetStringValue(); } }, + { "archived", n => { Archived = n.GetBoolValue(); } }, + { "assignees_url", n => { AssigneesUrl = n.GetStringValue(); } }, + { "blobs_url", n => { BlobsUrl = n.GetStringValue(); } }, + { "branches_url", n => { BranchesUrl = n.GetStringValue(); } }, + { "clone_url", n => { CloneUrl = n.GetStringValue(); } }, + { "code_search_index_status", n => { CodeSearchIndexStatus = n.GetObjectValue(global::Ayllu.Github.Client.Models.NullableRepository_code_search_index_status.CreateFromDiscriminatorValue); } }, + { "collaborators_url", n => { CollaboratorsUrl = n.GetStringValue(); } }, + { "comments_url", n => { CommentsUrl = n.GetStringValue(); } }, + { "commits_url", n => { CommitsUrl = n.GetStringValue(); } }, + { "compare_url", n => { CompareUrl = n.GetStringValue(); } }, + { "contents_url", n => { ContentsUrl = n.GetStringValue(); } }, + { "contributors_url", n => { ContributorsUrl = n.GetStringValue(); } }, + { "created_at", n => { CreatedAt = n.GetDateTimeOffsetValue(); } }, + { "default_branch", n => { DefaultBranch = n.GetStringValue(); } }, + { "delete_branch_on_merge", n => { DeleteBranchOnMerge = n.GetBoolValue(); } }, + { "deployments_url", n => { DeploymentsUrl = n.GetStringValue(); } }, + { "description", n => { Description = n.GetStringValue(); } }, + { "disabled", n => { Disabled = n.GetBoolValue(); } }, + { "downloads_url", n => { DownloadsUrl = n.GetStringValue(); } }, + { "events_url", n => { EventsUrl = n.GetStringValue(); } }, + { "fork", n => { Fork = n.GetBoolValue(); } }, + { "forks", n => { Forks = n.GetIntValue(); } }, + { "forks_count", n => { ForksCount = n.GetIntValue(); } }, + { "forks_url", n => { ForksUrl = n.GetStringValue(); } }, + { "full_name", n => { FullName = n.GetStringValue(); } }, + { "git_commits_url", n => { GitCommitsUrl = n.GetStringValue(); } }, + { "git_refs_url", n => { GitRefsUrl = n.GetStringValue(); } }, + { "git_tags_url", n => { GitTagsUrl = n.GetStringValue(); } }, + { "git_url", n => { GitUrl = n.GetStringValue(); } }, + { "has_discussions", n => { HasDiscussions = n.GetBoolValue(); } }, + { "has_downloads", n => { HasDownloads = n.GetBoolValue(); } }, + { "has_issues", n => { HasIssues = n.GetBoolValue(); } }, + { "has_pages", n => { HasPages = n.GetBoolValue(); } }, + { "has_projects", n => { HasProjects = n.GetBoolValue(); } }, + { "has_wiki", n => { HasWiki = n.GetBoolValue(); } }, + { "homepage", n => { Homepage = n.GetStringValue(); } }, + { "hooks_url", n => { HooksUrl = n.GetStringValue(); } }, + { "html_url", n => { HtmlUrl = n.GetStringValue(); } }, + { "id", n => { Id = n.GetLongValue(); } }, + { "is_template", n => { IsTemplate = n.GetBoolValue(); } }, + { "issue_comment_url", n => { IssueCommentUrl = n.GetStringValue(); } }, + { "issue_events_url", n => { IssueEventsUrl = n.GetStringValue(); } }, + { "issues_url", n => { IssuesUrl = n.GetStringValue(); } }, + { "keys_url", n => { KeysUrl = n.GetStringValue(); } }, + { "labels_url", n => { LabelsUrl = n.GetStringValue(); } }, + { "language", n => { Language = n.GetStringValue(); } }, + { "languages_url", n => { LanguagesUrl = n.GetStringValue(); } }, + { "license", n => { License = n.GetObjectValue(global::Ayllu.Github.Client.Models.NullableLicenseSimple.CreateFromDiscriminatorValue); } }, + { "master_branch", n => { MasterBranch = n.GetStringValue(); } }, + { "merge_commit_message", n => { MergeCommitMessage = n.GetEnumValue(); } }, + { "merge_commit_title", n => { MergeCommitTitle = n.GetEnumValue(); } }, + { "merges_url", n => { MergesUrl = n.GetStringValue(); } }, + { "milestones_url", n => { MilestonesUrl = n.GetStringValue(); } }, + { "mirror_url", n => { MirrorUrl = n.GetStringValue(); } }, + { "name", n => { Name = n.GetStringValue(); } }, + { "node_id", n => { NodeId = n.GetStringValue(); } }, + { "notifications_url", n => { NotificationsUrl = n.GetStringValue(); } }, + { "open_issues", n => { OpenIssues = n.GetIntValue(); } }, + { "open_issues_count", n => { OpenIssuesCount = n.GetIntValue(); } }, + { "owner", n => { Owner = n.GetObjectValue(global::Ayllu.Github.Client.Models.SimpleUser.CreateFromDiscriminatorValue); } }, + { "permissions", n => { Permissions = n.GetObjectValue(global::Ayllu.Github.Client.Models.NullableRepository_permissions.CreateFromDiscriminatorValue); } }, + { "private", n => { Private = n.GetBoolValue(); } }, + { "pulls_url", n => { PullsUrl = n.GetStringValue(); } }, + { "pushed_at", n => { PushedAt = n.GetDateTimeOffsetValue(); } }, + { "releases_url", n => { ReleasesUrl = n.GetStringValue(); } }, + { "size", n => { Size = n.GetIntValue(); } }, + { "squash_merge_commit_message", n => { SquashMergeCommitMessage = n.GetEnumValue(); } }, + { "squash_merge_commit_title", n => { SquashMergeCommitTitle = n.GetEnumValue(); } }, + { "ssh_url", n => { SshUrl = n.GetStringValue(); } }, + { "stargazers_count", n => { StargazersCount = n.GetIntValue(); } }, + { "stargazers_url", n => { StargazersUrl = n.GetStringValue(); } }, + { "starred_at", n => { StarredAt = n.GetStringValue(); } }, + { "statuses_url", n => { StatusesUrl = n.GetStringValue(); } }, + { "subscribers_url", n => { SubscribersUrl = n.GetStringValue(); } }, + { "subscription_url", n => { SubscriptionUrl = n.GetStringValue(); } }, + { "svn_url", n => { SvnUrl = n.GetStringValue(); } }, + { "tags_url", n => { TagsUrl = n.GetStringValue(); } }, + { "teams_url", n => { TeamsUrl = n.GetStringValue(); } }, + { "temp_clone_token", n => { TempCloneToken = n.GetStringValue(); } }, + { "topics", n => { Topics = n.GetCollectionOfPrimitiveValues()?.AsList(); } }, + { "trees_url", n => { TreesUrl = n.GetStringValue(); } }, + { "updated_at", n => { UpdatedAt = n.GetDateTimeOffsetValue(); } }, + { "url", n => { Url = n.GetStringValue(); } }, + { "use_squash_pr_title_as_default", n => { UseSquashPrTitleAsDefault = n.GetBoolValue(); } }, + { "visibility", n => { Visibility = n.GetStringValue(); } }, + { "watchers", n => { Watchers = n.GetIntValue(); } }, + { "watchers_count", n => { WatchersCount = n.GetIntValue(); } }, + { "web_commit_signoff_required", n => { WebCommitSignoffRequired = n.GetBoolValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteBoolValue("allow_auto_merge", AllowAutoMerge); + writer.WriteBoolValue("allow_forking", AllowForking); + writer.WriteBoolValue("allow_merge_commit", AllowMergeCommit); + writer.WriteBoolValue("allow_rebase_merge", AllowRebaseMerge); + writer.WriteBoolValue("allow_squash_merge", AllowSquashMerge); + writer.WriteBoolValue("allow_update_branch", AllowUpdateBranch); + writer.WriteBoolValue("anonymous_access_enabled", AnonymousAccessEnabled); + writer.WriteBoolValue("archived", Archived); + writer.WriteStringValue("archive_url", ArchiveUrl); + writer.WriteStringValue("assignees_url", AssigneesUrl); + writer.WriteStringValue("blobs_url", BlobsUrl); + writer.WriteStringValue("branches_url", BranchesUrl); + writer.WriteStringValue("clone_url", CloneUrl); + writer.WriteObjectValue("code_search_index_status", CodeSearchIndexStatus); + writer.WriteStringValue("collaborators_url", CollaboratorsUrl); + writer.WriteStringValue("comments_url", CommentsUrl); + writer.WriteStringValue("commits_url", CommitsUrl); + writer.WriteStringValue("compare_url", CompareUrl); + writer.WriteStringValue("contents_url", ContentsUrl); + writer.WriteStringValue("contributors_url", ContributorsUrl); + writer.WriteDateTimeOffsetValue("created_at", CreatedAt); + writer.WriteStringValue("default_branch", DefaultBranch); + writer.WriteBoolValue("delete_branch_on_merge", DeleteBranchOnMerge); + writer.WriteStringValue("deployments_url", DeploymentsUrl); + writer.WriteStringValue("description", Description); + writer.WriteBoolValue("disabled", Disabled); + writer.WriteStringValue("downloads_url", DownloadsUrl); + writer.WriteStringValue("events_url", EventsUrl); + writer.WriteBoolValue("fork", Fork); + writer.WriteIntValue("forks", Forks); + writer.WriteIntValue("forks_count", ForksCount); + writer.WriteStringValue("forks_url", ForksUrl); + writer.WriteStringValue("full_name", FullName); + writer.WriteStringValue("git_commits_url", GitCommitsUrl); + writer.WriteStringValue("git_refs_url", GitRefsUrl); + writer.WriteStringValue("git_tags_url", GitTagsUrl); + writer.WriteStringValue("git_url", GitUrl); + writer.WriteBoolValue("has_discussions", HasDiscussions); + writer.WriteBoolValue("has_downloads", HasDownloads); + writer.WriteBoolValue("has_issues", HasIssues); + writer.WriteBoolValue("has_pages", HasPages); + writer.WriteBoolValue("has_projects", HasProjects); + writer.WriteBoolValue("has_wiki", HasWiki); + writer.WriteStringValue("homepage", Homepage); + writer.WriteStringValue("hooks_url", HooksUrl); + writer.WriteStringValue("html_url", HtmlUrl); + writer.WriteLongValue("id", Id); + writer.WriteStringValue("issue_comment_url", IssueCommentUrl); + writer.WriteStringValue("issue_events_url", IssueEventsUrl); + writer.WriteStringValue("issues_url", IssuesUrl); + writer.WriteBoolValue("is_template", IsTemplate); + writer.WriteStringValue("keys_url", KeysUrl); + writer.WriteStringValue("labels_url", LabelsUrl); + writer.WriteStringValue("language", Language); + writer.WriteStringValue("languages_url", LanguagesUrl); + writer.WriteObjectValue("license", License); + writer.WriteStringValue("master_branch", MasterBranch); + writer.WriteEnumValue("merge_commit_message", MergeCommitMessage); + writer.WriteEnumValue("merge_commit_title", MergeCommitTitle); + writer.WriteStringValue("merges_url", MergesUrl); + writer.WriteStringValue("milestones_url", MilestonesUrl); + writer.WriteStringValue("mirror_url", MirrorUrl); + writer.WriteStringValue("name", Name); + writer.WriteStringValue("node_id", NodeId); + writer.WriteStringValue("notifications_url", NotificationsUrl); + writer.WriteIntValue("open_issues", OpenIssues); + writer.WriteIntValue("open_issues_count", OpenIssuesCount); + writer.WriteObjectValue("owner", Owner); + writer.WriteObjectValue("permissions", Permissions); + writer.WriteBoolValue("private", Private); + writer.WriteStringValue("pulls_url", PullsUrl); + writer.WriteDateTimeOffsetValue("pushed_at", PushedAt); + writer.WriteStringValue("releases_url", ReleasesUrl); + writer.WriteIntValue("size", Size); + writer.WriteEnumValue("squash_merge_commit_message", SquashMergeCommitMessage); + writer.WriteEnumValue("squash_merge_commit_title", SquashMergeCommitTitle); + writer.WriteStringValue("ssh_url", SshUrl); + writer.WriteIntValue("stargazers_count", StargazersCount); + writer.WriteStringValue("stargazers_url", StargazersUrl); + writer.WriteStringValue("starred_at", StarredAt); + writer.WriteStringValue("statuses_url", StatusesUrl); + writer.WriteStringValue("subscribers_url", SubscribersUrl); + writer.WriteStringValue("subscription_url", SubscriptionUrl); + writer.WriteStringValue("svn_url", SvnUrl); + writer.WriteStringValue("tags_url", TagsUrl); + writer.WriteStringValue("teams_url", TeamsUrl); + writer.WriteStringValue("temp_clone_token", TempCloneToken); + writer.WriteCollectionOfPrimitiveValues("topics", Topics); + writer.WriteStringValue("trees_url", TreesUrl); + writer.WriteDateTimeOffsetValue("updated_at", UpdatedAt); + writer.WriteStringValue("url", Url); + writer.WriteBoolValue("use_squash_pr_title_as_default", UseSquashPrTitleAsDefault); + writer.WriteStringValue("visibility", Visibility); + writer.WriteIntValue("watchers", Watchers); + writer.WriteIntValue("watchers_count", WatchersCount); + writer.WriteBoolValue("web_commit_signoff_required", WebCommitSignoffRequired); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/NullableRepository_code_search_index_status.cs b/src/Ayllu.Github.Client/Github/Client/Models/NullableRepository_code_search_index_status.cs new file mode 100644 index 0000000..c1bfa30 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/NullableRepository_code_search_index_status.cs @@ -0,0 +1,70 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + /// + /// The status of the code search index for this repository + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class NullableRepository_code_search_index_status : IAdditionalDataHolder, IParsable + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The lexical_commit_sha property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? LexicalCommitSha { get; set; } +#nullable restore +#else + public string LexicalCommitSha { get; set; } +#endif + /// The lexical_search_ok property + public bool? LexicalSearchOk { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public NullableRepository_code_search_index_status() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.NullableRepository_code_search_index_status CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.NullableRepository_code_search_index_status(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "lexical_commit_sha", n => { LexicalCommitSha = n.GetStringValue(); } }, + { "lexical_search_ok", n => { LexicalSearchOk = n.GetBoolValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("lexical_commit_sha", LexicalCommitSha); + writer.WriteBoolValue("lexical_search_ok", LexicalSearchOk); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/NullableRepository_merge_commit_message.cs b/src/Ayllu.Github.Client/Github/Client/Models/NullableRepository_merge_commit_message.cs new file mode 100644 index 0000000..1135e60 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/NullableRepository_merge_commit_message.cs @@ -0,0 +1,23 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Models +{ + /// 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. + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public enum NullableRepository_merge_commit_message + { + [EnumMember(Value = "PR_BODY")] + #pragma warning disable CS1591 + PR_BODY, + #pragma warning restore CS1591 + [EnumMember(Value = "PR_TITLE")] + #pragma warning disable CS1591 + PR_TITLE, + #pragma warning restore CS1591 + [EnumMember(Value = "BLANK")] + #pragma warning disable CS1591 + BLANK, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Models/NullableRepository_merge_commit_title.cs b/src/Ayllu.Github.Client/Github/Client/Models/NullableRepository_merge_commit_title.cs new file mode 100644 index 0000000..1fa23eb --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/NullableRepository_merge_commit_title.cs @@ -0,0 +1,19 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Models +{ + /// 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). + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public enum NullableRepository_merge_commit_title + { + [EnumMember(Value = "PR_TITLE")] + #pragma warning disable CS1591 + PR_TITLE, + #pragma warning restore CS1591 + [EnumMember(Value = "MERGE_MESSAGE")] + #pragma warning disable CS1591 + MERGE_MESSAGE, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Models/NullableRepository_permissions.cs b/src/Ayllu.Github.Client/Github/Client/Models/NullableRepository_permissions.cs new file mode 100644 index 0000000..e051fe6 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/NullableRepository_permissions.cs @@ -0,0 +1,75 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class NullableRepository_permissions : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The admin property + public bool? Admin { get; set; } + /// The maintain property + public bool? Maintain { get; set; } + /// The pull property + public bool? Pull { get; set; } + /// The push property + public bool? Push { get; set; } + /// The triage property + public bool? Triage { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public NullableRepository_permissions() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.NullableRepository_permissions CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.NullableRepository_permissions(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "admin", n => { Admin = n.GetBoolValue(); } }, + { "maintain", n => { Maintain = n.GetBoolValue(); } }, + { "pull", n => { Pull = n.GetBoolValue(); } }, + { "push", n => { Push = n.GetBoolValue(); } }, + { "triage", n => { Triage = n.GetBoolValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteBoolValue("admin", Admin); + writer.WriteBoolValue("maintain", Maintain); + writer.WriteBoolValue("pull", Pull); + writer.WriteBoolValue("push", Push); + writer.WriteBoolValue("triage", Triage); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/NullableRepository_squash_merge_commit_message.cs b/src/Ayllu.Github.Client/Github/Client/Models/NullableRepository_squash_merge_commit_message.cs new file mode 100644 index 0000000..d898d54 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/NullableRepository_squash_merge_commit_message.cs @@ -0,0 +1,23 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Models +{ + /// 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. + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public enum NullableRepository_squash_merge_commit_message + { + [EnumMember(Value = "PR_BODY")] + #pragma warning disable CS1591 + PR_BODY, + #pragma warning restore CS1591 + [EnumMember(Value = "COMMIT_MESSAGES")] + #pragma warning disable CS1591 + COMMIT_MESSAGES, + #pragma warning restore CS1591 + [EnumMember(Value = "BLANK")] + #pragma warning disable CS1591 + BLANK, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Models/NullableRepository_squash_merge_commit_title.cs b/src/Ayllu.Github.Client/Github/Client/Models/NullableRepository_squash_merge_commit_title.cs new file mode 100644 index 0000000..1fadb2b --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/NullableRepository_squash_merge_commit_title.cs @@ -0,0 +1,19 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Models +{ + /// 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). + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public enum NullableRepository_squash_merge_commit_title + { + [EnumMember(Value = "PR_TITLE")] + #pragma warning disable CS1591 + PR_TITLE, + #pragma warning restore CS1591 + [EnumMember(Value = "COMMIT_OR_PR_TITLE")] + #pragma warning disable CS1591 + COMMIT_OR_PR_TITLE, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Models/NullableScopedInstallation.cs b/src/Ayllu.Github.Client/Github/Client/Models/NullableScopedInstallation.cs new file mode 100644 index 0000000..1204c49 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/NullableScopedInstallation.cs @@ -0,0 +1,113 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class NullableScopedInstallation : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// A GitHub user. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.SimpleUser? Account { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.SimpleUser Account { get; set; } +#endif + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The has_multiple_single_files property + public bool? HasMultipleSingleFiles { get; set; } + /// The permissions granted to the user access token. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.AppPermissions? Permissions { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.AppPermissions Permissions { get; set; } +#endif + /// The repositories_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? RepositoriesUrl { get; set; } +#nullable restore +#else + public string RepositoriesUrl { get; set; } +#endif + /// Describe whether all repositories have been selected or there's a selection involved + public global::Ayllu.Github.Client.Models.NullableScopedInstallation_repository_selection? RepositorySelection { get; set; } + /// The single_file_name property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? SingleFileName { get; set; } +#nullable restore +#else + public string SingleFileName { get; set; } +#endif + /// The single_file_paths property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? SingleFilePaths { get; set; } +#nullable restore +#else + public List SingleFilePaths { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public NullableScopedInstallation() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.NullableScopedInstallation CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.NullableScopedInstallation(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "account", n => { Account = n.GetObjectValue(global::Ayllu.Github.Client.Models.SimpleUser.CreateFromDiscriminatorValue); } }, + { "has_multiple_single_files", n => { HasMultipleSingleFiles = n.GetBoolValue(); } }, + { "permissions", n => { Permissions = n.GetObjectValue(global::Ayllu.Github.Client.Models.AppPermissions.CreateFromDiscriminatorValue); } }, + { "repositories_url", n => { RepositoriesUrl = n.GetStringValue(); } }, + { "repository_selection", n => { RepositorySelection = n.GetEnumValue(); } }, + { "single_file_name", n => { SingleFileName = n.GetStringValue(); } }, + { "single_file_paths", n => { SingleFilePaths = n.GetCollectionOfPrimitiveValues()?.AsList(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteObjectValue("account", Account); + writer.WriteBoolValue("has_multiple_single_files", HasMultipleSingleFiles); + writer.WriteObjectValue("permissions", Permissions); + writer.WriteStringValue("repositories_url", RepositoriesUrl); + writer.WriteEnumValue("repository_selection", RepositorySelection); + writer.WriteStringValue("single_file_name", SingleFileName); + writer.WriteCollectionOfPrimitiveValues("single_file_paths", SingleFilePaths); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/NullableScopedInstallation_repository_selection.cs b/src/Ayllu.Github.Client/Github/Client/Models/NullableScopedInstallation_repository_selection.cs new file mode 100644 index 0000000..51c6b37 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/NullableScopedInstallation_repository_selection.cs @@ -0,0 +1,19 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Models +{ + /// Describe whether all repositories have been selected or there's a selection involved + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public enum NullableScopedInstallation_repository_selection + { + [EnumMember(Value = "all")] + #pragma warning disable CS1591 + All, + #pragma warning restore CS1591 + [EnumMember(Value = "selected")] + #pragma warning disable CS1591 + Selected, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Models/NullableSecretScanningFirstDetectedLocation.cs b/src/Ayllu.Github.Client/Github/Client/Models/NullableSecretScanningFirstDetectedLocation.cs new file mode 100644 index 0000000..2119a10 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/NullableSecretScanningFirstDetectedLocation.cs @@ -0,0 +1,306 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + /// + /// Composed type wrapper for classes , , , , , , , , , , , , + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class NullableSecretScanningFirstDetectedLocation : IComposedTypeWrapper, IParsable + { + /// Composed type representation for type +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.SecretScanningLocationCommit? SecretScanningLocationCommit { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.SecretScanningLocationCommit SecretScanningLocationCommit { get; set; } +#endif + /// Composed type representation for type +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.SecretScanningLocationDiscussionBody? SecretScanningLocationDiscussionBody { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.SecretScanningLocationDiscussionBody SecretScanningLocationDiscussionBody { get; set; } +#endif + /// Composed type representation for type +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.SecretScanningLocationDiscussionComment? SecretScanningLocationDiscussionComment { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.SecretScanningLocationDiscussionComment SecretScanningLocationDiscussionComment { get; set; } +#endif + /// Composed type representation for type +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.SecretScanningLocationDiscussionTitle? SecretScanningLocationDiscussionTitle { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.SecretScanningLocationDiscussionTitle SecretScanningLocationDiscussionTitle { get; set; } +#endif + /// Composed type representation for type +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.SecretScanningLocationIssueBody? SecretScanningLocationIssueBody { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.SecretScanningLocationIssueBody SecretScanningLocationIssueBody { get; set; } +#endif + /// Composed type representation for type +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.SecretScanningLocationIssueComment? SecretScanningLocationIssueComment { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.SecretScanningLocationIssueComment SecretScanningLocationIssueComment { get; set; } +#endif + /// Composed type representation for type +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.SecretScanningLocationIssueTitle? SecretScanningLocationIssueTitle { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.SecretScanningLocationIssueTitle SecretScanningLocationIssueTitle { get; set; } +#endif + /// Composed type representation for type +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.SecretScanningLocationPullRequestBody? SecretScanningLocationPullRequestBody { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.SecretScanningLocationPullRequestBody SecretScanningLocationPullRequestBody { get; set; } +#endif + /// Composed type representation for type +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.SecretScanningLocationPullRequestComment? SecretScanningLocationPullRequestComment { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.SecretScanningLocationPullRequestComment SecretScanningLocationPullRequestComment { get; set; } +#endif + /// Composed type representation for type +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.SecretScanningLocationPullRequestReview? SecretScanningLocationPullRequestReview { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.SecretScanningLocationPullRequestReview SecretScanningLocationPullRequestReview { get; set; } +#endif + /// Composed type representation for type +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.SecretScanningLocationPullRequestReviewComment? SecretScanningLocationPullRequestReviewComment { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.SecretScanningLocationPullRequestReviewComment SecretScanningLocationPullRequestReviewComment { get; set; } +#endif + /// Composed type representation for type +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.SecretScanningLocationPullRequestTitle? SecretScanningLocationPullRequestTitle { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.SecretScanningLocationPullRequestTitle SecretScanningLocationPullRequestTitle { get; set; } +#endif + /// Composed type representation for type +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.SecretScanningLocationWikiCommit? SecretScanningLocationWikiCommit { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.SecretScanningLocationWikiCommit SecretScanningLocationWikiCommit { get; set; } +#endif + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.NullableSecretScanningFirstDetectedLocation CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + var mappingValue = parseNode.GetChildNode("")?.GetStringValue(); + var result = new global::Ayllu.Github.Client.Models.NullableSecretScanningFirstDetectedLocation(); + if("secret-scanning-location-commit".Equals(mappingValue, StringComparison.OrdinalIgnoreCase)) + { + result.SecretScanningLocationCommit = new global::Ayllu.Github.Client.Models.SecretScanningLocationCommit(); + } + else if("secret-scanning-location-discussion-body".Equals(mappingValue, StringComparison.OrdinalIgnoreCase)) + { + result.SecretScanningLocationDiscussionBody = new global::Ayllu.Github.Client.Models.SecretScanningLocationDiscussionBody(); + } + else if("secret-scanning-location-discussion-comment".Equals(mappingValue, StringComparison.OrdinalIgnoreCase)) + { + result.SecretScanningLocationDiscussionComment = new global::Ayllu.Github.Client.Models.SecretScanningLocationDiscussionComment(); + } + else if("secret-scanning-location-discussion-title".Equals(mappingValue, StringComparison.OrdinalIgnoreCase)) + { + result.SecretScanningLocationDiscussionTitle = new global::Ayllu.Github.Client.Models.SecretScanningLocationDiscussionTitle(); + } + else if("secret-scanning-location-issue-body".Equals(mappingValue, StringComparison.OrdinalIgnoreCase)) + { + result.SecretScanningLocationIssueBody = new global::Ayllu.Github.Client.Models.SecretScanningLocationIssueBody(); + } + else if("secret-scanning-location-issue-comment".Equals(mappingValue, StringComparison.OrdinalIgnoreCase)) + { + result.SecretScanningLocationIssueComment = new global::Ayllu.Github.Client.Models.SecretScanningLocationIssueComment(); + } + else if("secret-scanning-location-issue-title".Equals(mappingValue, StringComparison.OrdinalIgnoreCase)) + { + result.SecretScanningLocationIssueTitle = new global::Ayllu.Github.Client.Models.SecretScanningLocationIssueTitle(); + } + else if("secret-scanning-location-pull-request-body".Equals(mappingValue, StringComparison.OrdinalIgnoreCase)) + { + result.SecretScanningLocationPullRequestBody = new global::Ayllu.Github.Client.Models.SecretScanningLocationPullRequestBody(); + } + else if("secret-scanning-location-pull-request-comment".Equals(mappingValue, StringComparison.OrdinalIgnoreCase)) + { + result.SecretScanningLocationPullRequestComment = new global::Ayllu.Github.Client.Models.SecretScanningLocationPullRequestComment(); + } + else if("secret-scanning-location-pull-request-review".Equals(mappingValue, StringComparison.OrdinalIgnoreCase)) + { + result.SecretScanningLocationPullRequestReview = new global::Ayllu.Github.Client.Models.SecretScanningLocationPullRequestReview(); + } + else if("secret-scanning-location-pull-request-review-comment".Equals(mappingValue, StringComparison.OrdinalIgnoreCase)) + { + result.SecretScanningLocationPullRequestReviewComment = new global::Ayllu.Github.Client.Models.SecretScanningLocationPullRequestReviewComment(); + } + else if("secret-scanning-location-pull-request-title".Equals(mappingValue, StringComparison.OrdinalIgnoreCase)) + { + result.SecretScanningLocationPullRequestTitle = new global::Ayllu.Github.Client.Models.SecretScanningLocationPullRequestTitle(); + } + else if("secret-scanning-location-wiki-commit".Equals(mappingValue, StringComparison.OrdinalIgnoreCase)) + { + result.SecretScanningLocationWikiCommit = new global::Ayllu.Github.Client.Models.SecretScanningLocationWikiCommit(); + } + return result; + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + if(SecretScanningLocationCommit != null) + { + return SecretScanningLocationCommit.GetFieldDeserializers(); + } + else if(SecretScanningLocationDiscussionBody != null) + { + return SecretScanningLocationDiscussionBody.GetFieldDeserializers(); + } + else if(SecretScanningLocationDiscussionComment != null) + { + return SecretScanningLocationDiscussionComment.GetFieldDeserializers(); + } + else if(SecretScanningLocationDiscussionTitle != null) + { + return SecretScanningLocationDiscussionTitle.GetFieldDeserializers(); + } + else if(SecretScanningLocationIssueBody != null) + { + return SecretScanningLocationIssueBody.GetFieldDeserializers(); + } + else if(SecretScanningLocationIssueComment != null) + { + return SecretScanningLocationIssueComment.GetFieldDeserializers(); + } + else if(SecretScanningLocationIssueTitle != null) + { + return SecretScanningLocationIssueTitle.GetFieldDeserializers(); + } + else if(SecretScanningLocationPullRequestBody != null) + { + return SecretScanningLocationPullRequestBody.GetFieldDeserializers(); + } + else if(SecretScanningLocationPullRequestComment != null) + { + return SecretScanningLocationPullRequestComment.GetFieldDeserializers(); + } + else if(SecretScanningLocationPullRequestReview != null) + { + return SecretScanningLocationPullRequestReview.GetFieldDeserializers(); + } + else if(SecretScanningLocationPullRequestReviewComment != null) + { + return SecretScanningLocationPullRequestReviewComment.GetFieldDeserializers(); + } + else if(SecretScanningLocationPullRequestTitle != null) + { + return SecretScanningLocationPullRequestTitle.GetFieldDeserializers(); + } + else if(SecretScanningLocationWikiCommit != null) + { + return SecretScanningLocationWikiCommit.GetFieldDeserializers(); + } + return new Dictionary>(); + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(SecretScanningLocationCommit != null) + { + writer.WriteObjectValue(null, SecretScanningLocationCommit); + } + else if(SecretScanningLocationDiscussionBody != null) + { + writer.WriteObjectValue(null, SecretScanningLocationDiscussionBody); + } + else if(SecretScanningLocationDiscussionComment != null) + { + writer.WriteObjectValue(null, SecretScanningLocationDiscussionComment); + } + else if(SecretScanningLocationDiscussionTitle != null) + { + writer.WriteObjectValue(null, SecretScanningLocationDiscussionTitle); + } + else if(SecretScanningLocationIssueBody != null) + { + writer.WriteObjectValue(null, SecretScanningLocationIssueBody); + } + else if(SecretScanningLocationIssueComment != null) + { + writer.WriteObjectValue(null, SecretScanningLocationIssueComment); + } + else if(SecretScanningLocationIssueTitle != null) + { + writer.WriteObjectValue(null, SecretScanningLocationIssueTitle); + } + else if(SecretScanningLocationPullRequestBody != null) + { + writer.WriteObjectValue(null, SecretScanningLocationPullRequestBody); + } + else if(SecretScanningLocationPullRequestComment != null) + { + writer.WriteObjectValue(null, SecretScanningLocationPullRequestComment); + } + else if(SecretScanningLocationPullRequestReview != null) + { + writer.WriteObjectValue(null, SecretScanningLocationPullRequestReview); + } + else if(SecretScanningLocationPullRequestReviewComment != null) + { + writer.WriteObjectValue(null, SecretScanningLocationPullRequestReviewComment); + } + else if(SecretScanningLocationPullRequestTitle != null) + { + writer.WriteObjectValue(null, SecretScanningLocationPullRequestTitle); + } + else if(SecretScanningLocationWikiCommit != null) + { + writer.WriteObjectValue(null, SecretScanningLocationWikiCommit); + } + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/NullableSimpleCommit.cs b/src/Ayllu.Github.Client/Github/Client/Models/NullableSimpleCommit.cs new file mode 100644 index 0000000..9d1bef8 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/NullableSimpleCommit.cs @@ -0,0 +1,110 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + /// + /// A commit. + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class NullableSimpleCommit : IAdditionalDataHolder, IParsable + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// Information about the Git author +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.NullableSimpleCommit_author? Author { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.NullableSimpleCommit_author Author { get; set; } +#endif + /// Information about the Git committer +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.NullableSimpleCommit_committer? Committer { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.NullableSimpleCommit_committer Committer { get; set; } +#endif + /// SHA for the commit +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Id { get; set; } +#nullable restore +#else + public string Id { get; set; } +#endif + /// Message describing the purpose of the commit +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Message { get; set; } +#nullable restore +#else + public string Message { get; set; } +#endif + /// Timestamp of the commit + public DateTimeOffset? Timestamp { get; set; } + /// SHA for the commit's tree +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? TreeId { get; set; } +#nullable restore +#else + public string TreeId { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public NullableSimpleCommit() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.NullableSimpleCommit CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.NullableSimpleCommit(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "author", n => { Author = n.GetObjectValue(global::Ayllu.Github.Client.Models.NullableSimpleCommit_author.CreateFromDiscriminatorValue); } }, + { "committer", n => { Committer = n.GetObjectValue(global::Ayllu.Github.Client.Models.NullableSimpleCommit_committer.CreateFromDiscriminatorValue); } }, + { "id", n => { Id = n.GetStringValue(); } }, + { "message", n => { Message = n.GetStringValue(); } }, + { "timestamp", n => { Timestamp = n.GetDateTimeOffsetValue(); } }, + { "tree_id", n => { TreeId = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteObjectValue("author", Author); + writer.WriteObjectValue("committer", Committer); + writer.WriteStringValue("id", Id); + writer.WriteStringValue("message", Message); + writer.WriteDateTimeOffsetValue("timestamp", Timestamp); + writer.WriteStringValue("tree_id", TreeId); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/NullableSimpleCommit_author.cs b/src/Ayllu.Github.Client/Github/Client/Models/NullableSimpleCommit_author.cs new file mode 100644 index 0000000..17ce25e --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/NullableSimpleCommit_author.cs @@ -0,0 +1,76 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + /// + /// Information about the Git author + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class NullableSimpleCommit_author : IAdditionalDataHolder, IParsable + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// Git email address of the commit's author +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Email { get; set; } +#nullable restore +#else + public string Email { get; set; } +#endif + /// Name of the commit's author +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Name { get; set; } +#nullable restore +#else + public string Name { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public NullableSimpleCommit_author() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.NullableSimpleCommit_author CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.NullableSimpleCommit_author(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "email", n => { Email = n.GetStringValue(); } }, + { "name", n => { Name = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("email", Email); + writer.WriteStringValue("name", Name); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/NullableSimpleCommit_committer.cs b/src/Ayllu.Github.Client/Github/Client/Models/NullableSimpleCommit_committer.cs new file mode 100644 index 0000000..3049f59 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/NullableSimpleCommit_committer.cs @@ -0,0 +1,76 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + /// + /// Information about the Git committer + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class NullableSimpleCommit_committer : IAdditionalDataHolder, IParsable + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// Git email address of the commit's committer +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Email { get; set; } +#nullable restore +#else + public string Email { get; set; } +#endif + /// Name of the commit's committer +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Name { get; set; } +#nullable restore +#else + public string Name { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public NullableSimpleCommit_committer() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.NullableSimpleCommit_committer CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.NullableSimpleCommit_committer(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "email", n => { Email = n.GetStringValue(); } }, + { "name", n => { Name = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("email", Email); + writer.WriteStringValue("name", Name); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/NullableSimpleRepository.cs b/src/Ayllu.Github.Client/Github/Client/Models/NullableSimpleRepository.cs new file mode 100644 index 0000000..3b4bde3 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/NullableSimpleRepository.cs @@ -0,0 +1,498 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + /// + /// A GitHub repository. + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class NullableSimpleRepository : IAdditionalDataHolder, IParsable + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// A template for the API URL to download the repository as an archive. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? ArchiveUrl { get; set; } +#nullable restore +#else + public string ArchiveUrl { get; set; } +#endif + /// A template for the API URL to list the available assignees for issues in the repository. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? AssigneesUrl { get; set; } +#nullable restore +#else + public string AssigneesUrl { get; set; } +#endif + /// A template for the API URL to create or retrieve a raw Git blob in the repository. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? BlobsUrl { get; set; } +#nullable restore +#else + public string BlobsUrl { get; set; } +#endif + /// A template for the API URL to get information about branches in the repository. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? BranchesUrl { get; set; } +#nullable restore +#else + public string BranchesUrl { get; set; } +#endif + /// A template for the API URL to get information about collaborators of the repository. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? CollaboratorsUrl { get; set; } +#nullable restore +#else + public string CollaboratorsUrl { get; set; } +#endif + /// A template for the API URL to get information about comments on the repository. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? CommentsUrl { get; set; } +#nullable restore +#else + public string CommentsUrl { get; set; } +#endif + /// A template for the API URL to get information about commits on the repository. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? CommitsUrl { get; set; } +#nullable restore +#else + public string CommitsUrl { get; set; } +#endif + /// A template for the API URL to compare two commits or refs. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? CompareUrl { get; set; } +#nullable restore +#else + public string CompareUrl { get; set; } +#endif + /// A template for the API URL to get the contents of the repository. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? ContentsUrl { get; set; } +#nullable restore +#else + public string ContentsUrl { get; set; } +#endif + /// A template for the API URL to list the contributors to the repository. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? ContributorsUrl { get; set; } +#nullable restore +#else + public string ContributorsUrl { get; set; } +#endif + /// The API URL to list the deployments of the repository. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? DeploymentsUrl { get; set; } +#nullable restore +#else + public string DeploymentsUrl { get; set; } +#endif + /// The repository description. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Description { get; set; } +#nullable restore +#else + public string Description { get; set; } +#endif + /// The API URL to list the downloads on the repository. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? DownloadsUrl { get; set; } +#nullable restore +#else + public string DownloadsUrl { get; set; } +#endif + /// The API URL to list the events of the repository. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? EventsUrl { get; set; } +#nullable restore +#else + public string EventsUrl { get; set; } +#endif + /// Whether the repository is a fork. + public bool? Fork { get; set; } + /// The API URL to list the forks of the repository. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? ForksUrl { get; set; } +#nullable restore +#else + public string ForksUrl { get; set; } +#endif + /// The full, globally unique, name of the repository. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? FullName { get; set; } +#nullable restore +#else + public string FullName { get; set; } +#endif + /// A template for the API URL to get information about Git commits of the repository. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? GitCommitsUrl { get; set; } +#nullable restore +#else + public string GitCommitsUrl { get; set; } +#endif + /// A template for the API URL to get information about Git refs of the repository. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? GitRefsUrl { get; set; } +#nullable restore +#else + public string GitRefsUrl { get; set; } +#endif + /// A template for the API URL to get information about Git tags of the repository. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? GitTagsUrl { get; set; } +#nullable restore +#else + public string GitTagsUrl { get; set; } +#endif + /// The API URL to list the hooks on the repository. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? HooksUrl { get; set; } +#nullable restore +#else + public string HooksUrl { get; set; } +#endif + /// The URL to view the repository on GitHub.com. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? HtmlUrl { get; set; } +#nullable restore +#else + public string HtmlUrl { get; set; } +#endif + /// A unique identifier of the repository. + public long? Id { get; set; } + /// A template for the API URL to get information about issue comments on the repository. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? IssueCommentUrl { get; set; } +#nullable restore +#else + public string IssueCommentUrl { get; set; } +#endif + /// A template for the API URL to get information about issue events on the repository. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? IssueEventsUrl { get; set; } +#nullable restore +#else + public string IssueEventsUrl { get; set; } +#endif + /// A template for the API URL to get information about issues on the repository. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? IssuesUrl { get; set; } +#nullable restore +#else + public string IssuesUrl { get; set; } +#endif + /// A template for the API URL to get information about deploy keys on the repository. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? KeysUrl { get; set; } +#nullable restore +#else + public string KeysUrl { get; set; } +#endif + /// A template for the API URL to get information about labels of the repository. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? LabelsUrl { get; set; } +#nullable restore +#else + public string LabelsUrl { get; set; } +#endif + /// The API URL to get information about the languages of the repository. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? LanguagesUrl { get; set; } +#nullable restore +#else + public string LanguagesUrl { get; set; } +#endif + /// The API URL to merge branches in the repository. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? MergesUrl { get; set; } +#nullable restore +#else + public string MergesUrl { get; set; } +#endif + /// A template for the API URL to get information about milestones of the repository. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? MilestonesUrl { get; set; } +#nullable restore +#else + public string MilestonesUrl { get; set; } +#endif + /// The name of the repository. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Name { get; set; } +#nullable restore +#else + public string Name { get; set; } +#endif + /// The GraphQL identifier of the repository. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? NodeId { get; set; } +#nullable restore +#else + public string NodeId { get; set; } +#endif + /// A template for the API URL to get information about notifications on the repository. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? NotificationsUrl { get; set; } +#nullable restore +#else + public string NotificationsUrl { get; set; } +#endif + /// A GitHub user. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.SimpleUser? Owner { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.SimpleUser Owner { get; set; } +#endif + /// Whether the repository is private. + public bool? Private { get; set; } + /// A template for the API URL to get information about pull requests on the repository. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? PullsUrl { get; set; } +#nullable restore +#else + public string PullsUrl { get; set; } +#endif + /// A template for the API URL to get information about releases on the repository. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? ReleasesUrl { get; set; } +#nullable restore +#else + public string ReleasesUrl { get; set; } +#endif + /// The API URL to list the stargazers on the repository. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? StargazersUrl { get; set; } +#nullable restore +#else + public string StargazersUrl { get; set; } +#endif + /// A template for the API URL to get information about statuses of a commit. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? StatusesUrl { get; set; } +#nullable restore +#else + public string StatusesUrl { get; set; } +#endif + /// The API URL to list the subscribers on the repository. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? SubscribersUrl { get; set; } +#nullable restore +#else + public string SubscribersUrl { get; set; } +#endif + /// The API URL to subscribe to notifications for this repository. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? SubscriptionUrl { get; set; } +#nullable restore +#else + public string SubscriptionUrl { get; set; } +#endif + /// The API URL to get information about tags on the repository. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? TagsUrl { get; set; } +#nullable restore +#else + public string TagsUrl { get; set; } +#endif + /// The API URL to list the teams on the repository. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? TeamsUrl { get; set; } +#nullable restore +#else + public string TeamsUrl { get; set; } +#endif + /// A template for the API URL to create or retrieve a raw Git tree of the repository. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? TreesUrl { get; set; } +#nullable restore +#else + public string TreesUrl { get; set; } +#endif + /// The URL to get more information about the repository from the GitHub API. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Url { get; set; } +#nullable restore +#else + public string Url { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public NullableSimpleRepository() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.NullableSimpleRepository CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.NullableSimpleRepository(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "archive_url", n => { ArchiveUrl = n.GetStringValue(); } }, + { "assignees_url", n => { AssigneesUrl = n.GetStringValue(); } }, + { "blobs_url", n => { BlobsUrl = n.GetStringValue(); } }, + { "branches_url", n => { BranchesUrl = n.GetStringValue(); } }, + { "collaborators_url", n => { CollaboratorsUrl = n.GetStringValue(); } }, + { "comments_url", n => { CommentsUrl = n.GetStringValue(); } }, + { "commits_url", n => { CommitsUrl = n.GetStringValue(); } }, + { "compare_url", n => { CompareUrl = n.GetStringValue(); } }, + { "contents_url", n => { ContentsUrl = n.GetStringValue(); } }, + { "contributors_url", n => { ContributorsUrl = n.GetStringValue(); } }, + { "deployments_url", n => { DeploymentsUrl = n.GetStringValue(); } }, + { "description", n => { Description = n.GetStringValue(); } }, + { "downloads_url", n => { DownloadsUrl = n.GetStringValue(); } }, + { "events_url", n => { EventsUrl = n.GetStringValue(); } }, + { "fork", n => { Fork = n.GetBoolValue(); } }, + { "forks_url", n => { ForksUrl = n.GetStringValue(); } }, + { "full_name", n => { FullName = n.GetStringValue(); } }, + { "git_commits_url", n => { GitCommitsUrl = n.GetStringValue(); } }, + { "git_refs_url", n => { GitRefsUrl = n.GetStringValue(); } }, + { "git_tags_url", n => { GitTagsUrl = n.GetStringValue(); } }, + { "hooks_url", n => { HooksUrl = n.GetStringValue(); } }, + { "html_url", n => { HtmlUrl = n.GetStringValue(); } }, + { "id", n => { Id = n.GetLongValue(); } }, + { "issue_comment_url", n => { IssueCommentUrl = n.GetStringValue(); } }, + { "issue_events_url", n => { IssueEventsUrl = n.GetStringValue(); } }, + { "issues_url", n => { IssuesUrl = n.GetStringValue(); } }, + { "keys_url", n => { KeysUrl = n.GetStringValue(); } }, + { "labels_url", n => { LabelsUrl = n.GetStringValue(); } }, + { "languages_url", n => { LanguagesUrl = n.GetStringValue(); } }, + { "merges_url", n => { MergesUrl = n.GetStringValue(); } }, + { "milestones_url", n => { MilestonesUrl = n.GetStringValue(); } }, + { "name", n => { Name = n.GetStringValue(); } }, + { "node_id", n => { NodeId = n.GetStringValue(); } }, + { "notifications_url", n => { NotificationsUrl = n.GetStringValue(); } }, + { "owner", n => { Owner = n.GetObjectValue(global::Ayllu.Github.Client.Models.SimpleUser.CreateFromDiscriminatorValue); } }, + { "private", n => { Private = n.GetBoolValue(); } }, + { "pulls_url", n => { PullsUrl = n.GetStringValue(); } }, + { "releases_url", n => { ReleasesUrl = n.GetStringValue(); } }, + { "stargazers_url", n => { StargazersUrl = n.GetStringValue(); } }, + { "statuses_url", n => { StatusesUrl = n.GetStringValue(); } }, + { "subscribers_url", n => { SubscribersUrl = n.GetStringValue(); } }, + { "subscription_url", n => { SubscriptionUrl = n.GetStringValue(); } }, + { "tags_url", n => { TagsUrl = n.GetStringValue(); } }, + { "teams_url", n => { TeamsUrl = n.GetStringValue(); } }, + { "trees_url", n => { TreesUrl = n.GetStringValue(); } }, + { "url", n => { Url = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("archive_url", ArchiveUrl); + writer.WriteStringValue("assignees_url", AssigneesUrl); + writer.WriteStringValue("blobs_url", BlobsUrl); + writer.WriteStringValue("branches_url", BranchesUrl); + writer.WriteStringValue("collaborators_url", CollaboratorsUrl); + writer.WriteStringValue("comments_url", CommentsUrl); + writer.WriteStringValue("commits_url", CommitsUrl); + writer.WriteStringValue("compare_url", CompareUrl); + writer.WriteStringValue("contents_url", ContentsUrl); + writer.WriteStringValue("contributors_url", ContributorsUrl); + writer.WriteStringValue("deployments_url", DeploymentsUrl); + writer.WriteStringValue("description", Description); + writer.WriteStringValue("downloads_url", DownloadsUrl); + writer.WriteStringValue("events_url", EventsUrl); + writer.WriteBoolValue("fork", Fork); + writer.WriteStringValue("forks_url", ForksUrl); + writer.WriteStringValue("full_name", FullName); + writer.WriteStringValue("git_commits_url", GitCommitsUrl); + writer.WriteStringValue("git_refs_url", GitRefsUrl); + writer.WriteStringValue("git_tags_url", GitTagsUrl); + writer.WriteStringValue("hooks_url", HooksUrl); + writer.WriteStringValue("html_url", HtmlUrl); + writer.WriteLongValue("id", Id); + writer.WriteStringValue("issue_comment_url", IssueCommentUrl); + writer.WriteStringValue("issue_events_url", IssueEventsUrl); + writer.WriteStringValue("issues_url", IssuesUrl); + writer.WriteStringValue("keys_url", KeysUrl); + writer.WriteStringValue("labels_url", LabelsUrl); + writer.WriteStringValue("languages_url", LanguagesUrl); + writer.WriteStringValue("merges_url", MergesUrl); + writer.WriteStringValue("milestones_url", MilestonesUrl); + writer.WriteStringValue("name", Name); + writer.WriteStringValue("node_id", NodeId); + writer.WriteStringValue("notifications_url", NotificationsUrl); + writer.WriteObjectValue("owner", Owner); + writer.WriteBoolValue("private", Private); + writer.WriteStringValue("pulls_url", PullsUrl); + writer.WriteStringValue("releases_url", ReleasesUrl); + writer.WriteStringValue("stargazers_url", StargazersUrl); + writer.WriteStringValue("statuses_url", StatusesUrl); + writer.WriteStringValue("subscribers_url", SubscribersUrl); + writer.WriteStringValue("subscription_url", SubscriptionUrl); + writer.WriteStringValue("tags_url", TagsUrl); + writer.WriteStringValue("teams_url", TeamsUrl); + writer.WriteStringValue("trees_url", TreesUrl); + writer.WriteStringValue("url", Url); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/NullableSimpleUser.cs b/src/Ayllu.Github.Client/Github/Client/Models/NullableSimpleUser.cs new file mode 100644 index 0000000..b79beea --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/NullableSimpleUser.cs @@ -0,0 +1,264 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + /// + /// A GitHub user. + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class NullableSimpleUser : IAdditionalDataHolder, IParsable + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The avatar_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? AvatarUrl { get; set; } +#nullable restore +#else + public string AvatarUrl { get; set; } +#endif + /// The email property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Email { get; set; } +#nullable restore +#else + public string Email { get; set; } +#endif + /// The events_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? EventsUrl { get; set; } +#nullable restore +#else + public string EventsUrl { get; set; } +#endif + /// The followers_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? FollowersUrl { get; set; } +#nullable restore +#else + public string FollowersUrl { get; set; } +#endif + /// The following_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? FollowingUrl { get; set; } +#nullable restore +#else + public string FollowingUrl { get; set; } +#endif + /// The gists_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? GistsUrl { get; set; } +#nullable restore +#else + public string GistsUrl { get; set; } +#endif + /// The gravatar_id property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? GravatarId { get; set; } +#nullable restore +#else + public string GravatarId { get; set; } +#endif + /// The html_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? HtmlUrl { get; set; } +#nullable restore +#else + public string HtmlUrl { get; set; } +#endif + /// The id property + public long? Id { get; set; } + /// The login property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Login { get; set; } +#nullable restore +#else + public string Login { get; set; } +#endif + /// The name property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Name { get; set; } +#nullable restore +#else + public string Name { get; set; } +#endif + /// The node_id property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? NodeId { get; set; } +#nullable restore +#else + public string NodeId { get; set; } +#endif + /// The organizations_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? OrganizationsUrl { get; set; } +#nullable restore +#else + public string OrganizationsUrl { get; set; } +#endif + /// The received_events_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? ReceivedEventsUrl { get; set; } +#nullable restore +#else + public string ReceivedEventsUrl { get; set; } +#endif + /// The repos_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? ReposUrl { get; set; } +#nullable restore +#else + public string ReposUrl { get; set; } +#endif + /// The site_admin property + public bool? SiteAdmin { get; set; } + /// The starred_at property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? StarredAt { get; set; } +#nullable restore +#else + public string StarredAt { get; set; } +#endif + /// The starred_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? StarredUrl { get; set; } +#nullable restore +#else + public string StarredUrl { get; set; } +#endif + /// The subscriptions_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? SubscriptionsUrl { get; set; } +#nullable restore +#else + public string SubscriptionsUrl { get; set; } +#endif + /// The type property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Type { get; set; } +#nullable restore +#else + public string Type { get; set; } +#endif + /// The url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Url { get; set; } +#nullable restore +#else + public string Url { get; set; } +#endif + /// The user_view_type property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? UserViewType { get; set; } +#nullable restore +#else + public string UserViewType { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public NullableSimpleUser() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.NullableSimpleUser CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.NullableSimpleUser(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "avatar_url", n => { AvatarUrl = n.GetStringValue(); } }, + { "email", n => { Email = n.GetStringValue(); } }, + { "events_url", n => { EventsUrl = n.GetStringValue(); } }, + { "followers_url", n => { FollowersUrl = n.GetStringValue(); } }, + { "following_url", n => { FollowingUrl = n.GetStringValue(); } }, + { "gists_url", n => { GistsUrl = n.GetStringValue(); } }, + { "gravatar_id", n => { GravatarId = n.GetStringValue(); } }, + { "html_url", n => { HtmlUrl = n.GetStringValue(); } }, + { "id", n => { Id = n.GetLongValue(); } }, + { "login", n => { Login = n.GetStringValue(); } }, + { "name", n => { Name = n.GetStringValue(); } }, + { "node_id", n => { NodeId = n.GetStringValue(); } }, + { "organizations_url", n => { OrganizationsUrl = n.GetStringValue(); } }, + { "received_events_url", n => { ReceivedEventsUrl = n.GetStringValue(); } }, + { "repos_url", n => { ReposUrl = n.GetStringValue(); } }, + { "site_admin", n => { SiteAdmin = n.GetBoolValue(); } }, + { "starred_at", n => { StarredAt = n.GetStringValue(); } }, + { "starred_url", n => { StarredUrl = n.GetStringValue(); } }, + { "subscriptions_url", n => { SubscriptionsUrl = n.GetStringValue(); } }, + { "type", n => { Type = n.GetStringValue(); } }, + { "url", n => { Url = n.GetStringValue(); } }, + { "user_view_type", n => { UserViewType = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("avatar_url", AvatarUrl); + writer.WriteStringValue("email", Email); + writer.WriteStringValue("events_url", EventsUrl); + writer.WriteStringValue("followers_url", FollowersUrl); + writer.WriteStringValue("following_url", FollowingUrl); + writer.WriteStringValue("gists_url", GistsUrl); + writer.WriteStringValue("gravatar_id", GravatarId); + writer.WriteStringValue("html_url", HtmlUrl); + writer.WriteLongValue("id", Id); + writer.WriteStringValue("login", Login); + writer.WriteStringValue("name", Name); + writer.WriteStringValue("node_id", NodeId); + writer.WriteStringValue("organizations_url", OrganizationsUrl); + writer.WriteStringValue("received_events_url", ReceivedEventsUrl); + writer.WriteStringValue("repos_url", ReposUrl); + writer.WriteBoolValue("site_admin", SiteAdmin); + writer.WriteStringValue("starred_at", StarredAt); + writer.WriteStringValue("starred_url", StarredUrl); + writer.WriteStringValue("subscriptions_url", SubscriptionsUrl); + writer.WriteStringValue("type", Type); + writer.WriteStringValue("url", Url); + writer.WriteStringValue("user_view_type", UserViewType); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/NullableTeamSimple.cs b/src/Ayllu.Github.Client/Github/Client/Models/NullableTeamSimple.cs new file mode 100644 index 0000000..d21e2a2 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/NullableTeamSimple.cs @@ -0,0 +1,180 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + /// + /// Groups of organization members that gives permissions on specified repositories. + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class NullableTeamSimple : IAdditionalDataHolder, IParsable + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// Description of the team +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Description { get; set; } +#nullable restore +#else + public string Description { get; set; } +#endif + /// The html_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? HtmlUrl { get; set; } +#nullable restore +#else + public string HtmlUrl { get; set; } +#endif + /// Unique identifier of the team + public int? Id { get; set; } + /// Distinguished Name (DN) that team maps to within LDAP environment +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? LdapDn { get; set; } +#nullable restore +#else + public string LdapDn { get; set; } +#endif + /// The members_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? MembersUrl { get; set; } +#nullable restore +#else + public string MembersUrl { get; set; } +#endif + /// Name of the team +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Name { get; set; } +#nullable restore +#else + public string Name { get; set; } +#endif + /// The node_id property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? NodeId { get; set; } +#nullable restore +#else + public string NodeId { get; set; } +#endif + /// The notification setting the team has set +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? NotificationSetting { get; set; } +#nullable restore +#else + public string NotificationSetting { get; set; } +#endif + /// Permission that the team will have for its repositories +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Permission { get; set; } +#nullable restore +#else + public string Permission { get; set; } +#endif + /// The level of privacy this team should have +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Privacy { get; set; } +#nullable restore +#else + public string Privacy { get; set; } +#endif + /// The repositories_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? RepositoriesUrl { get; set; } +#nullable restore +#else + public string RepositoriesUrl { get; set; } +#endif + /// The slug property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Slug { get; set; } +#nullable restore +#else + public string Slug { get; set; } +#endif + /// URL for the team +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Url { get; set; } +#nullable restore +#else + public string Url { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public NullableTeamSimple() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.NullableTeamSimple CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.NullableTeamSimple(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "description", n => { Description = n.GetStringValue(); } }, + { "html_url", n => { HtmlUrl = n.GetStringValue(); } }, + { "id", n => { Id = n.GetIntValue(); } }, + { "ldap_dn", n => { LdapDn = n.GetStringValue(); } }, + { "members_url", n => { MembersUrl = n.GetStringValue(); } }, + { "name", n => { Name = n.GetStringValue(); } }, + { "node_id", n => { NodeId = n.GetStringValue(); } }, + { "notification_setting", n => { NotificationSetting = n.GetStringValue(); } }, + { "permission", n => { Permission = n.GetStringValue(); } }, + { "privacy", n => { Privacy = n.GetStringValue(); } }, + { "repositories_url", n => { RepositoriesUrl = n.GetStringValue(); } }, + { "slug", n => { Slug = n.GetStringValue(); } }, + { "url", n => { Url = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("description", Description); + writer.WriteStringValue("html_url", HtmlUrl); + writer.WriteIntValue("id", Id); + writer.WriteStringValue("ldap_dn", LdapDn); + writer.WriteStringValue("members_url", MembersUrl); + writer.WriteStringValue("name", Name); + writer.WriteStringValue("node_id", NodeId); + writer.WriteStringValue("notification_setting", NotificationSetting); + writer.WriteStringValue("permission", Permission); + writer.WriteStringValue("privacy", Privacy); + writer.WriteStringValue("repositories_url", RepositoriesUrl); + writer.WriteStringValue("slug", Slug); + writer.WriteStringValue("url", Url); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/OidcCustomSub.cs b/src/Ayllu.Github.Client/Github/Client/Models/OidcCustomSub.cs new file mode 100644 index 0000000..b260144 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/OidcCustomSub.cs @@ -0,0 +1,66 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + /// + /// Actions OIDC Subject customization + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class OidcCustomSub : IAdditionalDataHolder, IParsable + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// Array of unique strings. Each claim key can only contain alphanumeric characters and underscores. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? IncludeClaimKeys { get; set; } +#nullable restore +#else + public List IncludeClaimKeys { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public OidcCustomSub() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.OidcCustomSub CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.OidcCustomSub(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "include_claim_keys", n => { IncludeClaimKeys = n.GetCollectionOfPrimitiveValues()?.AsList(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteCollectionOfPrimitiveValues("include_claim_keys", IncludeClaimKeys); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/OidcCustomSubRepo.cs b/src/Ayllu.Github.Client/Github/Client/Models/OidcCustomSubRepo.cs new file mode 100644 index 0000000..2b7a675 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/OidcCustomSubRepo.cs @@ -0,0 +1,70 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + /// + /// Actions OIDC subject customization for a repository + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class OidcCustomSubRepo : IAdditionalDataHolder, IParsable + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// Array of unique strings. Each claim key can only contain alphanumeric characters and underscores. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? IncludeClaimKeys { get; set; } +#nullable restore +#else + public List IncludeClaimKeys { get; set; } +#endif + /// Whether to use the default template or not. If `true`, the `include_claim_keys` field is ignored. + public bool? UseDefault { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public OidcCustomSubRepo() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.OidcCustomSubRepo CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.OidcCustomSubRepo(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "include_claim_keys", n => { IncludeClaimKeys = n.GetCollectionOfPrimitiveValues()?.AsList(); } }, + { "use_default", n => { UseDefault = n.GetBoolValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteCollectionOfPrimitiveValues("include_claim_keys", IncludeClaimKeys); + writer.WriteBoolValue("use_default", UseDefault); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/OrgHook.cs b/src/Ayllu.Github.Client/Github/Client/Models/OrgHook.cs new file mode 100644 index 0000000..49fcd4f --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/OrgHook.cs @@ -0,0 +1,142 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + /// + /// Org Hook + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class OrgHook : IAdditionalDataHolder, IParsable + { + /// The active property + public bool? Active { get; set; } + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The config property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.OrgHook_config? Config { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.OrgHook_config Config { get; set; } +#endif + /// The created_at property + public DateTimeOffset? CreatedAt { get; set; } + /// The deliveries_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? DeliveriesUrl { get; set; } +#nullable restore +#else + public string DeliveriesUrl { get; set; } +#endif + /// The events property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? Events { get; set; } +#nullable restore +#else + public List Events { get; set; } +#endif + /// The id property + public int? Id { get; set; } + /// The name property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Name { get; set; } +#nullable restore +#else + public string Name { get; set; } +#endif + /// The ping_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? PingUrl { get; set; } +#nullable restore +#else + public string PingUrl { get; set; } +#endif + /// The type property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Type { get; set; } +#nullable restore +#else + public string Type { get; set; } +#endif + /// The updated_at property + public DateTimeOffset? UpdatedAt { get; set; } + /// The url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Url { get; set; } +#nullable restore +#else + public string Url { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public OrgHook() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.OrgHook CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.OrgHook(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "active", n => { Active = n.GetBoolValue(); } }, + { "config", n => { Config = n.GetObjectValue(global::Ayllu.Github.Client.Models.OrgHook_config.CreateFromDiscriminatorValue); } }, + { "created_at", n => { CreatedAt = n.GetDateTimeOffsetValue(); } }, + { "deliveries_url", n => { DeliveriesUrl = n.GetStringValue(); } }, + { "events", n => { Events = n.GetCollectionOfPrimitiveValues()?.AsList(); } }, + { "id", n => { Id = n.GetIntValue(); } }, + { "name", n => { Name = n.GetStringValue(); } }, + { "ping_url", n => { PingUrl = n.GetStringValue(); } }, + { "type", n => { Type = n.GetStringValue(); } }, + { "updated_at", n => { UpdatedAt = n.GetDateTimeOffsetValue(); } }, + { "url", n => { Url = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteBoolValue("active", Active); + writer.WriteObjectValue("config", Config); + writer.WriteDateTimeOffsetValue("created_at", CreatedAt); + writer.WriteStringValue("deliveries_url", DeliveriesUrl); + writer.WriteCollectionOfPrimitiveValues("events", Events); + writer.WriteIntValue("id", Id); + writer.WriteStringValue("name", Name); + writer.WriteStringValue("ping_url", PingUrl); + writer.WriteStringValue("type", Type); + writer.WriteDateTimeOffsetValue("updated_at", UpdatedAt); + writer.WriteStringValue("url", Url); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/OrgHook_config.cs b/src/Ayllu.Github.Client/Github/Client/Models/OrgHook_config.cs new file mode 100644 index 0000000..5a5db48 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/OrgHook_config.cs @@ -0,0 +1,95 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class OrgHook_config : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The content_type property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? ContentType { get; set; } +#nullable restore +#else + public string ContentType { get; set; } +#endif + /// The insecure_ssl property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? InsecureSsl { get; set; } +#nullable restore +#else + public string InsecureSsl { get; set; } +#endif + /// The secret property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Secret { get; set; } +#nullable restore +#else + public string Secret { get; set; } +#endif + /// The url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Url { get; set; } +#nullable restore +#else + public string Url { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public OrgHook_config() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.OrgHook_config CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.OrgHook_config(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "content_type", n => { ContentType = n.GetStringValue(); } }, + { "insecure_ssl", n => { InsecureSsl = n.GetStringValue(); } }, + { "secret", n => { Secret = n.GetStringValue(); } }, + { "url", n => { Url = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("content_type", ContentType); + writer.WriteStringValue("insecure_ssl", InsecureSsl); + writer.WriteStringValue("secret", Secret); + writer.WriteStringValue("url", Url); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/OrgMembership.cs b/src/Ayllu.Github.Client/Github/Client/Models/OrgMembership.cs new file mode 100644 index 0000000..bf51b8d --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/OrgMembership.cs @@ -0,0 +1,128 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + /// + /// Org Membership + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class OrgMembership : IAdditionalDataHolder, IParsable + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// Whether the user has direct membership in the organization. + public bool? DirectMembership { get; set; } + /// The slugs of the enterprise teams providing the user with indirect membership in the organization.A limit of 100 enterprise team slugs is returned. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? EnterpriseTeamsProvidingIndirectMembership { get; set; } +#nullable restore +#else + public List EnterpriseTeamsProvidingIndirectMembership { get; set; } +#endif + /// A GitHub organization. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.OrganizationSimple? Organization { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.OrganizationSimple Organization { get; set; } +#endif + /// The organization_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? OrganizationUrl { get; set; } +#nullable restore +#else + public string OrganizationUrl { get; set; } +#endif + /// The permissions property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.OrgMembership_permissions? Permissions { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.OrgMembership_permissions Permissions { get; set; } +#endif + /// The user's membership type in the organization. + public global::Ayllu.Github.Client.Models.OrgMembership_role? Role { get; set; } + /// The state of the member in the organization. The `pending` state indicates the user has not yet accepted an invitation. + public global::Ayllu.Github.Client.Models.OrgMembership_state? State { get; set; } + /// The url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Url { get; set; } +#nullable restore +#else + public string Url { get; set; } +#endif + /// A GitHub user. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.NullableSimpleUser? User { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.NullableSimpleUser User { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public OrgMembership() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.OrgMembership CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.OrgMembership(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "direct_membership", n => { DirectMembership = n.GetBoolValue(); } }, + { "enterprise_teams_providing_indirect_membership", n => { EnterpriseTeamsProvidingIndirectMembership = n.GetCollectionOfPrimitiveValues()?.AsList(); } }, + { "organization", n => { Organization = n.GetObjectValue(global::Ayllu.Github.Client.Models.OrganizationSimple.CreateFromDiscriminatorValue); } }, + { "organization_url", n => { OrganizationUrl = n.GetStringValue(); } }, + { "permissions", n => { Permissions = n.GetObjectValue(global::Ayllu.Github.Client.Models.OrgMembership_permissions.CreateFromDiscriminatorValue); } }, + { "role", n => { Role = n.GetEnumValue(); } }, + { "state", n => { State = n.GetEnumValue(); } }, + { "url", n => { Url = n.GetStringValue(); } }, + { "user", n => { User = n.GetObjectValue(global::Ayllu.Github.Client.Models.NullableSimpleUser.CreateFromDiscriminatorValue); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteBoolValue("direct_membership", DirectMembership); + writer.WriteCollectionOfPrimitiveValues("enterprise_teams_providing_indirect_membership", EnterpriseTeamsProvidingIndirectMembership); + writer.WriteObjectValue("organization", Organization); + writer.WriteStringValue("organization_url", OrganizationUrl); + writer.WriteObjectValue("permissions", Permissions); + writer.WriteEnumValue("role", Role); + writer.WriteEnumValue("state", State); + writer.WriteStringValue("url", Url); + writer.WriteObjectValue("user", User); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/OrgMembership_permissions.cs b/src/Ayllu.Github.Client/Github/Client/Models/OrgMembership_permissions.cs new file mode 100644 index 0000000..3192fe0 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/OrgMembership_permissions.cs @@ -0,0 +1,59 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class OrgMembership_permissions : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The can_create_repository property + public bool? CanCreateRepository { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public OrgMembership_permissions() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.OrgMembership_permissions CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.OrgMembership_permissions(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "can_create_repository", n => { CanCreateRepository = n.GetBoolValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteBoolValue("can_create_repository", CanCreateRepository); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/OrgMembership_role.cs b/src/Ayllu.Github.Client/Github/Client/Models/OrgMembership_role.cs new file mode 100644 index 0000000..434f67a --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/OrgMembership_role.cs @@ -0,0 +1,23 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Models +{ + /// The user's membership type in the organization. + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public enum OrgMembership_role + { + [EnumMember(Value = "admin")] + #pragma warning disable CS1591 + Admin, + #pragma warning restore CS1591 + [EnumMember(Value = "member")] + #pragma warning disable CS1591 + Member, + #pragma warning restore CS1591 + [EnumMember(Value = "billing_manager")] + #pragma warning disable CS1591 + Billing_manager, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Models/OrgMembership_state.cs b/src/Ayllu.Github.Client/Github/Client/Models/OrgMembership_state.cs new file mode 100644 index 0000000..e2a4b53 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/OrgMembership_state.cs @@ -0,0 +1,19 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Models +{ + /// The state of the member in the organization. The `pending` state indicates the user has not yet accepted an invitation. + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public enum OrgMembership_state + { + [EnumMember(Value = "active")] + #pragma warning disable CS1591 + Active, + #pragma warning restore CS1591 + [EnumMember(Value = "pending")] + #pragma warning disable CS1591 + Pending, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Models/OrgPrivateRegistryConfiguration.cs b/src/Ayllu.Github.Client/Github/Client/Models/OrgPrivateRegistryConfiguration.cs new file mode 100644 index 0000000..596606a --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/OrgPrivateRegistryConfiguration.cs @@ -0,0 +1,92 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + /// + /// Private registry configuration for an organization + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class OrgPrivateRegistryConfiguration : IAdditionalDataHolder, IParsable + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The created_at property + public DateTimeOffset? CreatedAt { get; set; } + /// The name of the private registry configuration. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Name { get; set; } +#nullable restore +#else + public string Name { get; set; } +#endif + /// The registry type. + public global::Ayllu.Github.Client.Models.OrgPrivateRegistryConfiguration_registry_type? RegistryType { get; set; } + /// The updated_at property + public DateTimeOffset? UpdatedAt { get; set; } + /// The username to use when authenticating with the private registry. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Username { get; set; } +#nullable restore +#else + public string Username { get; set; } +#endif + /// Which type of organization repositories have access to the private registry. + public global::Ayllu.Github.Client.Models.OrgPrivateRegistryConfiguration_visibility? Visibility { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public OrgPrivateRegistryConfiguration() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.OrgPrivateRegistryConfiguration CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.OrgPrivateRegistryConfiguration(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "created_at", n => { CreatedAt = n.GetDateTimeOffsetValue(); } }, + { "name", n => { Name = n.GetStringValue(); } }, + { "registry_type", n => { RegistryType = n.GetEnumValue(); } }, + { "updated_at", n => { UpdatedAt = n.GetDateTimeOffsetValue(); } }, + { "username", n => { Username = n.GetStringValue(); } }, + { "visibility", n => { Visibility = n.GetEnumValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteDateTimeOffsetValue("created_at", CreatedAt); + writer.WriteStringValue("name", Name); + writer.WriteEnumValue("registry_type", RegistryType); + writer.WriteDateTimeOffsetValue("updated_at", UpdatedAt); + writer.WriteStringValue("username", Username); + writer.WriteEnumValue("visibility", Visibility); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/OrgPrivateRegistryConfigurationWithSelectedRepositories.cs b/src/Ayllu.Github.Client/Github/Client/Models/OrgPrivateRegistryConfigurationWithSelectedRepositories.cs new file mode 100644 index 0000000..13ebec8 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/OrgPrivateRegistryConfigurationWithSelectedRepositories.cs @@ -0,0 +1,102 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + /// + /// Private registry configuration for an organization + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class OrgPrivateRegistryConfigurationWithSelectedRepositories : IAdditionalDataHolder, IParsable + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The created_at property + public DateTimeOffset? CreatedAt { get; set; } + /// The name of the private registry configuration. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Name { get; set; } +#nullable restore +#else + public string Name { get; set; } +#endif + /// The registry type. + public global::Ayllu.Github.Client.Models.OrgPrivateRegistryConfigurationWithSelectedRepositories_registry_type? RegistryType { get; set; } + /// An array of repository IDs that can access the organization private registry when `visibility` is set to `selected`. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? SelectedRepositoryIds { get; set; } +#nullable restore +#else + public List SelectedRepositoryIds { get; set; } +#endif + /// The updated_at property + public DateTimeOffset? UpdatedAt { get; set; } + /// The username to use when authenticating with the private registry. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Username { get; set; } +#nullable restore +#else + public string Username { get; set; } +#endif + /// Which type of organization repositories have access to the private registry. `selected` means only the repositories specified by `selected_repository_ids` can access the private registry. + public global::Ayllu.Github.Client.Models.OrgPrivateRegistryConfigurationWithSelectedRepositories_visibility? Visibility { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public OrgPrivateRegistryConfigurationWithSelectedRepositories() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.OrgPrivateRegistryConfigurationWithSelectedRepositories CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.OrgPrivateRegistryConfigurationWithSelectedRepositories(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "created_at", n => { CreatedAt = n.GetDateTimeOffsetValue(); } }, + { "name", n => { Name = n.GetStringValue(); } }, + { "registry_type", n => { RegistryType = n.GetEnumValue(); } }, + { "selected_repository_ids", n => { SelectedRepositoryIds = n.GetCollectionOfPrimitiveValues()?.AsList(); } }, + { "updated_at", n => { UpdatedAt = n.GetDateTimeOffsetValue(); } }, + { "username", n => { Username = n.GetStringValue(); } }, + { "visibility", n => { Visibility = n.GetEnumValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteDateTimeOffsetValue("created_at", CreatedAt); + writer.WriteStringValue("name", Name); + writer.WriteEnumValue("registry_type", RegistryType); + writer.WriteCollectionOfPrimitiveValues("selected_repository_ids", SelectedRepositoryIds); + writer.WriteDateTimeOffsetValue("updated_at", UpdatedAt); + writer.WriteStringValue("username", Username); + writer.WriteEnumValue("visibility", Visibility); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/OrgPrivateRegistryConfigurationWithSelectedRepositories_registry_type.cs b/src/Ayllu.Github.Client/Github/Client/Models/OrgPrivateRegistryConfigurationWithSelectedRepositories_registry_type.cs new file mode 100644 index 0000000..493e26b --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/OrgPrivateRegistryConfigurationWithSelectedRepositories_registry_type.cs @@ -0,0 +1,71 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Models +{ + /// The registry type. + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public enum OrgPrivateRegistryConfigurationWithSelectedRepositories_registry_type + { + [EnumMember(Value = "maven_repository")] + #pragma warning disable CS1591 + Maven_repository, + #pragma warning restore CS1591 + [EnumMember(Value = "nuget_feed")] + #pragma warning disable CS1591 + Nuget_feed, + #pragma warning restore CS1591 + [EnumMember(Value = "goproxy_server")] + #pragma warning disable CS1591 + Goproxy_server, + #pragma warning restore CS1591 + [EnumMember(Value = "npm_registry")] + #pragma warning disable CS1591 + Npm_registry, + #pragma warning restore CS1591 + [EnumMember(Value = "rubygems_server")] + #pragma warning disable CS1591 + Rubygems_server, + #pragma warning restore CS1591 + [EnumMember(Value = "cargo_registry")] + #pragma warning disable CS1591 + Cargo_registry, + #pragma warning restore CS1591 + [EnumMember(Value = "composer_repository")] + #pragma warning disable CS1591 + Composer_repository, + #pragma warning restore CS1591 + [EnumMember(Value = "docker_registry")] + #pragma warning disable CS1591 + Docker_registry, + #pragma warning restore CS1591 + [EnumMember(Value = "git_source")] + #pragma warning disable CS1591 + Git_source, + #pragma warning restore CS1591 + [EnumMember(Value = "helm_registry")] + #pragma warning disable CS1591 + Helm_registry, + #pragma warning restore CS1591 + [EnumMember(Value = "hex_organization")] + #pragma warning disable CS1591 + Hex_organization, + #pragma warning restore CS1591 + [EnumMember(Value = "hex_repository")] + #pragma warning disable CS1591 + Hex_repository, + #pragma warning restore CS1591 + [EnumMember(Value = "pub_repository")] + #pragma warning disable CS1591 + Pub_repository, + #pragma warning restore CS1591 + [EnumMember(Value = "python_index")] + #pragma warning disable CS1591 + Python_index, + #pragma warning restore CS1591 + [EnumMember(Value = "terraform_registry")] + #pragma warning disable CS1591 + Terraform_registry, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Models/OrgPrivateRegistryConfigurationWithSelectedRepositories_visibility.cs b/src/Ayllu.Github.Client/Github/Client/Models/OrgPrivateRegistryConfigurationWithSelectedRepositories_visibility.cs new file mode 100644 index 0000000..1358e13 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/OrgPrivateRegistryConfigurationWithSelectedRepositories_visibility.cs @@ -0,0 +1,23 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Models +{ + /// Which type of organization repositories have access to the private registry. `selected` means only the repositories specified by `selected_repository_ids` can access the private registry. + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public enum OrgPrivateRegistryConfigurationWithSelectedRepositories_visibility + { + [EnumMember(Value = "all")] + #pragma warning disable CS1591 + All, + #pragma warning restore CS1591 + [EnumMember(Value = "private")] + #pragma warning disable CS1591 + Private, + #pragma warning restore CS1591 + [EnumMember(Value = "selected")] + #pragma warning disable CS1591 + Selected, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Models/OrgPrivateRegistryConfiguration_registry_type.cs b/src/Ayllu.Github.Client/Github/Client/Models/OrgPrivateRegistryConfiguration_registry_type.cs new file mode 100644 index 0000000..d72ddca --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/OrgPrivateRegistryConfiguration_registry_type.cs @@ -0,0 +1,71 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Models +{ + /// The registry type. + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public enum OrgPrivateRegistryConfiguration_registry_type + { + [EnumMember(Value = "maven_repository")] + #pragma warning disable CS1591 + Maven_repository, + #pragma warning restore CS1591 + [EnumMember(Value = "nuget_feed")] + #pragma warning disable CS1591 + Nuget_feed, + #pragma warning restore CS1591 + [EnumMember(Value = "goproxy_server")] + #pragma warning disable CS1591 + Goproxy_server, + #pragma warning restore CS1591 + [EnumMember(Value = "npm_registry")] + #pragma warning disable CS1591 + Npm_registry, + #pragma warning restore CS1591 + [EnumMember(Value = "rubygems_server")] + #pragma warning disable CS1591 + Rubygems_server, + #pragma warning restore CS1591 + [EnumMember(Value = "cargo_registry")] + #pragma warning disable CS1591 + Cargo_registry, + #pragma warning restore CS1591 + [EnumMember(Value = "composer_repository")] + #pragma warning disable CS1591 + Composer_repository, + #pragma warning restore CS1591 + [EnumMember(Value = "docker_registry")] + #pragma warning disable CS1591 + Docker_registry, + #pragma warning restore CS1591 + [EnumMember(Value = "git_source")] + #pragma warning disable CS1591 + Git_source, + #pragma warning restore CS1591 + [EnumMember(Value = "helm_registry")] + #pragma warning disable CS1591 + Helm_registry, + #pragma warning restore CS1591 + [EnumMember(Value = "hex_organization")] + #pragma warning disable CS1591 + Hex_organization, + #pragma warning restore CS1591 + [EnumMember(Value = "hex_repository")] + #pragma warning disable CS1591 + Hex_repository, + #pragma warning restore CS1591 + [EnumMember(Value = "pub_repository")] + #pragma warning disable CS1591 + Pub_repository, + #pragma warning restore CS1591 + [EnumMember(Value = "python_index")] + #pragma warning disable CS1591 + Python_index, + #pragma warning restore CS1591 + [EnumMember(Value = "terraform_registry")] + #pragma warning disable CS1591 + Terraform_registry, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Models/OrgPrivateRegistryConfiguration_visibility.cs b/src/Ayllu.Github.Client/Github/Client/Models/OrgPrivateRegistryConfiguration_visibility.cs new file mode 100644 index 0000000..20f9ea2 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/OrgPrivateRegistryConfiguration_visibility.cs @@ -0,0 +1,23 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Models +{ + /// Which type of organization repositories have access to the private registry. + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public enum OrgPrivateRegistryConfiguration_visibility + { + [EnumMember(Value = "all")] + #pragma warning disable CS1591 + All, + #pragma warning restore CS1591 + [EnumMember(Value = "private")] + #pragma warning disable CS1591 + Private, + #pragma warning restore CS1591 + [EnumMember(Value = "selected")] + #pragma warning disable CS1591 + Selected, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Models/OrgRepoCustomPropertyValues.cs b/src/Ayllu.Github.Client/Github/Client/Models/OrgRepoCustomPropertyValues.cs new file mode 100644 index 0000000..2ac07ab --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/OrgRepoCustomPropertyValues.cs @@ -0,0 +1,90 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + /// + /// List of custom property values for a repository + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class OrgRepoCustomPropertyValues : IAdditionalDataHolder, IParsable + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// List of custom property names and associated values +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? Properties { get; set; } +#nullable restore +#else + public List Properties { get; set; } +#endif + /// The repository_full_name property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? RepositoryFullName { get; set; } +#nullable restore +#else + public string RepositoryFullName { get; set; } +#endif + /// The repository_id property + public int? RepositoryId { get; set; } + /// The repository_name property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? RepositoryName { get; set; } +#nullable restore +#else + public string RepositoryName { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public OrgRepoCustomPropertyValues() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.OrgRepoCustomPropertyValues CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.OrgRepoCustomPropertyValues(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "properties", n => { Properties = n.GetCollectionOfObjectValues(global::Ayllu.Github.Client.Models.CustomPropertyValue.CreateFromDiscriminatorValue)?.AsList(); } }, + { "repository_full_name", n => { RepositoryFullName = n.GetStringValue(); } }, + { "repository_id", n => { RepositoryId = n.GetIntValue(); } }, + { "repository_name", n => { RepositoryName = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteCollectionOfObjectValues("properties", Properties); + writer.WriteStringValue("repository_full_name", RepositoryFullName); + writer.WriteIntValue("repository_id", RepositoryId); + writer.WriteStringValue("repository_name", RepositoryName); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/OrgRules.cs b/src/Ayllu.Github.Client/Github/Client/Models/OrgRules.cs new file mode 100644 index 0000000..daaa3b9 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/OrgRules.cs @@ -0,0 +1,446 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + /// + /// Composed type wrapper for classes , , , , , , , , , , , , , , , , , , , + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class OrgRules : IComposedTypeWrapper, IParsable + { + /// Composed type representation for type +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.RepositoryRuleBranchNamePattern? RepositoryRuleBranchNamePattern { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.RepositoryRuleBranchNamePattern RepositoryRuleBranchNamePattern { get; set; } +#endif + /// Composed type representation for type +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.RepositoryRuleCodeScanning? RepositoryRuleCodeScanning { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.RepositoryRuleCodeScanning RepositoryRuleCodeScanning { get; set; } +#endif + /// Composed type representation for type +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.RepositoryRuleCommitAuthorEmailPattern? RepositoryRuleCommitAuthorEmailPattern { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.RepositoryRuleCommitAuthorEmailPattern RepositoryRuleCommitAuthorEmailPattern { get; set; } +#endif + /// Composed type representation for type +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.RepositoryRuleCommitMessagePattern? RepositoryRuleCommitMessagePattern { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.RepositoryRuleCommitMessagePattern RepositoryRuleCommitMessagePattern { get; set; } +#endif + /// Composed type representation for type +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.RepositoryRuleCommitterEmailPattern? RepositoryRuleCommitterEmailPattern { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.RepositoryRuleCommitterEmailPattern RepositoryRuleCommitterEmailPattern { get; set; } +#endif + /// Composed type representation for type +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.RepositoryRuleCreation? RepositoryRuleCreation { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.RepositoryRuleCreation RepositoryRuleCreation { get; set; } +#endif + /// Composed type representation for type +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.RepositoryRuleDeletion? RepositoryRuleDeletion { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.RepositoryRuleDeletion RepositoryRuleDeletion { get; set; } +#endif + /// Composed type representation for type +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.RepositoryRuleFileExtensionRestriction? RepositoryRuleFileExtensionRestriction { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.RepositoryRuleFileExtensionRestriction RepositoryRuleFileExtensionRestriction { get; set; } +#endif + /// Composed type representation for type +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.RepositoryRuleFilePathRestriction? RepositoryRuleFilePathRestriction { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.RepositoryRuleFilePathRestriction RepositoryRuleFilePathRestriction { get; set; } +#endif + /// Composed type representation for type +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.RepositoryRuleMaxFilePathLength? RepositoryRuleMaxFilePathLength { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.RepositoryRuleMaxFilePathLength RepositoryRuleMaxFilePathLength { get; set; } +#endif + /// Composed type representation for type +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.RepositoryRuleMaxFileSize? RepositoryRuleMaxFileSize { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.RepositoryRuleMaxFileSize RepositoryRuleMaxFileSize { get; set; } +#endif + /// Composed type representation for type +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.RepositoryRuleNonFastForward? RepositoryRuleNonFastForward { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.RepositoryRuleNonFastForward RepositoryRuleNonFastForward { get; set; } +#endif + /// Composed type representation for type +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.RepositoryRulePullRequest? RepositoryRulePullRequest { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.RepositoryRulePullRequest RepositoryRulePullRequest { get; set; } +#endif + /// Composed type representation for type +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.RepositoryRuleRequiredDeployments? RepositoryRuleRequiredDeployments { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.RepositoryRuleRequiredDeployments RepositoryRuleRequiredDeployments { get; set; } +#endif + /// Composed type representation for type +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.RepositoryRuleRequiredLinearHistory? RepositoryRuleRequiredLinearHistory { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.RepositoryRuleRequiredLinearHistory RepositoryRuleRequiredLinearHistory { get; set; } +#endif + /// Composed type representation for type +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.RepositoryRuleRequiredSignatures? RepositoryRuleRequiredSignatures { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.RepositoryRuleRequiredSignatures RepositoryRuleRequiredSignatures { get; set; } +#endif + /// Composed type representation for type +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.RepositoryRuleRequiredStatusChecks? RepositoryRuleRequiredStatusChecks { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.RepositoryRuleRequiredStatusChecks RepositoryRuleRequiredStatusChecks { get; set; } +#endif + /// Composed type representation for type +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.RepositoryRuleTagNamePattern? RepositoryRuleTagNamePattern { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.RepositoryRuleTagNamePattern RepositoryRuleTagNamePattern { get; set; } +#endif + /// Composed type representation for type +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.RepositoryRuleUpdate? RepositoryRuleUpdate { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.RepositoryRuleUpdate RepositoryRuleUpdate { get; set; } +#endif + /// Composed type representation for type +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.RepositoryRuleWorkflows? RepositoryRuleWorkflows { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.RepositoryRuleWorkflows RepositoryRuleWorkflows { get; set; } +#endif + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.OrgRules CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + var mappingValue = parseNode.GetChildNode("")?.GetStringValue(); + var result = new global::Ayllu.Github.Client.Models.OrgRules(); + if("repository-rule-branch-name-pattern".Equals(mappingValue, StringComparison.OrdinalIgnoreCase)) + { + result.RepositoryRuleBranchNamePattern = new global::Ayllu.Github.Client.Models.RepositoryRuleBranchNamePattern(); + } + else if("repository-rule-code-scanning".Equals(mappingValue, StringComparison.OrdinalIgnoreCase)) + { + result.RepositoryRuleCodeScanning = new global::Ayllu.Github.Client.Models.RepositoryRuleCodeScanning(); + } + else if("repository-rule-commit-author-email-pattern".Equals(mappingValue, StringComparison.OrdinalIgnoreCase)) + { + result.RepositoryRuleCommitAuthorEmailPattern = new global::Ayllu.Github.Client.Models.RepositoryRuleCommitAuthorEmailPattern(); + } + else if("repository-rule-commit-message-pattern".Equals(mappingValue, StringComparison.OrdinalIgnoreCase)) + { + result.RepositoryRuleCommitMessagePattern = new global::Ayllu.Github.Client.Models.RepositoryRuleCommitMessagePattern(); + } + else if("repository-rule-committer-email-pattern".Equals(mappingValue, StringComparison.OrdinalIgnoreCase)) + { + result.RepositoryRuleCommitterEmailPattern = new global::Ayllu.Github.Client.Models.RepositoryRuleCommitterEmailPattern(); + } + else if("repository-rule-creation".Equals(mappingValue, StringComparison.OrdinalIgnoreCase)) + { + result.RepositoryRuleCreation = new global::Ayllu.Github.Client.Models.RepositoryRuleCreation(); + } + else if("repository-rule-deletion".Equals(mappingValue, StringComparison.OrdinalIgnoreCase)) + { + result.RepositoryRuleDeletion = new global::Ayllu.Github.Client.Models.RepositoryRuleDeletion(); + } + else if("repository-rule-file-extension-restriction".Equals(mappingValue, StringComparison.OrdinalIgnoreCase)) + { + result.RepositoryRuleFileExtensionRestriction = new global::Ayllu.Github.Client.Models.RepositoryRuleFileExtensionRestriction(); + } + else if("repository-rule-file-path-restriction".Equals(mappingValue, StringComparison.OrdinalIgnoreCase)) + { + result.RepositoryRuleFilePathRestriction = new global::Ayllu.Github.Client.Models.RepositoryRuleFilePathRestriction(); + } + else if("repository-rule-max-file-path-length".Equals(mappingValue, StringComparison.OrdinalIgnoreCase)) + { + result.RepositoryRuleMaxFilePathLength = new global::Ayllu.Github.Client.Models.RepositoryRuleMaxFilePathLength(); + } + else if("repository-rule-max-file-size".Equals(mappingValue, StringComparison.OrdinalIgnoreCase)) + { + result.RepositoryRuleMaxFileSize = new global::Ayllu.Github.Client.Models.RepositoryRuleMaxFileSize(); + } + else if("repository-rule-non-fast-forward".Equals(mappingValue, StringComparison.OrdinalIgnoreCase)) + { + result.RepositoryRuleNonFastForward = new global::Ayllu.Github.Client.Models.RepositoryRuleNonFastForward(); + } + else if("repository-rule-pull-request".Equals(mappingValue, StringComparison.OrdinalIgnoreCase)) + { + result.RepositoryRulePullRequest = new global::Ayllu.Github.Client.Models.RepositoryRulePullRequest(); + } + else if("repository-rule-required-deployments".Equals(mappingValue, StringComparison.OrdinalIgnoreCase)) + { + result.RepositoryRuleRequiredDeployments = new global::Ayllu.Github.Client.Models.RepositoryRuleRequiredDeployments(); + } + else if("repository-rule-required-linear-history".Equals(mappingValue, StringComparison.OrdinalIgnoreCase)) + { + result.RepositoryRuleRequiredLinearHistory = new global::Ayllu.Github.Client.Models.RepositoryRuleRequiredLinearHistory(); + } + else if("repository-rule-required-signatures".Equals(mappingValue, StringComparison.OrdinalIgnoreCase)) + { + result.RepositoryRuleRequiredSignatures = new global::Ayllu.Github.Client.Models.RepositoryRuleRequiredSignatures(); + } + else if("repository-rule-required-status-checks".Equals(mappingValue, StringComparison.OrdinalIgnoreCase)) + { + result.RepositoryRuleRequiredStatusChecks = new global::Ayllu.Github.Client.Models.RepositoryRuleRequiredStatusChecks(); + } + else if("repository-rule-tag-name-pattern".Equals(mappingValue, StringComparison.OrdinalIgnoreCase)) + { + result.RepositoryRuleTagNamePattern = new global::Ayllu.Github.Client.Models.RepositoryRuleTagNamePattern(); + } + else if("repository-rule-update".Equals(mappingValue, StringComparison.OrdinalIgnoreCase)) + { + result.RepositoryRuleUpdate = new global::Ayllu.Github.Client.Models.RepositoryRuleUpdate(); + } + else if("repository-rule-workflows".Equals(mappingValue, StringComparison.OrdinalIgnoreCase)) + { + result.RepositoryRuleWorkflows = new global::Ayllu.Github.Client.Models.RepositoryRuleWorkflows(); + } + return result; + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + if(RepositoryRuleBranchNamePattern != null) + { + return RepositoryRuleBranchNamePattern.GetFieldDeserializers(); + } + else if(RepositoryRuleCodeScanning != null) + { + return RepositoryRuleCodeScanning.GetFieldDeserializers(); + } + else if(RepositoryRuleCommitAuthorEmailPattern != null) + { + return RepositoryRuleCommitAuthorEmailPattern.GetFieldDeserializers(); + } + else if(RepositoryRuleCommitMessagePattern != null) + { + return RepositoryRuleCommitMessagePattern.GetFieldDeserializers(); + } + else if(RepositoryRuleCommitterEmailPattern != null) + { + return RepositoryRuleCommitterEmailPattern.GetFieldDeserializers(); + } + else if(RepositoryRuleCreation != null) + { + return RepositoryRuleCreation.GetFieldDeserializers(); + } + else if(RepositoryRuleDeletion != null) + { + return RepositoryRuleDeletion.GetFieldDeserializers(); + } + else if(RepositoryRuleFileExtensionRestriction != null) + { + return RepositoryRuleFileExtensionRestriction.GetFieldDeserializers(); + } + else if(RepositoryRuleFilePathRestriction != null) + { + return RepositoryRuleFilePathRestriction.GetFieldDeserializers(); + } + else if(RepositoryRuleMaxFilePathLength != null) + { + return RepositoryRuleMaxFilePathLength.GetFieldDeserializers(); + } + else if(RepositoryRuleMaxFileSize != null) + { + return RepositoryRuleMaxFileSize.GetFieldDeserializers(); + } + else if(RepositoryRuleNonFastForward != null) + { + return RepositoryRuleNonFastForward.GetFieldDeserializers(); + } + else if(RepositoryRulePullRequest != null) + { + return RepositoryRulePullRequest.GetFieldDeserializers(); + } + else if(RepositoryRuleRequiredDeployments != null) + { + return RepositoryRuleRequiredDeployments.GetFieldDeserializers(); + } + else if(RepositoryRuleRequiredLinearHistory != null) + { + return RepositoryRuleRequiredLinearHistory.GetFieldDeserializers(); + } + else if(RepositoryRuleRequiredSignatures != null) + { + return RepositoryRuleRequiredSignatures.GetFieldDeserializers(); + } + else if(RepositoryRuleRequiredStatusChecks != null) + { + return RepositoryRuleRequiredStatusChecks.GetFieldDeserializers(); + } + else if(RepositoryRuleTagNamePattern != null) + { + return RepositoryRuleTagNamePattern.GetFieldDeserializers(); + } + else if(RepositoryRuleUpdate != null) + { + return RepositoryRuleUpdate.GetFieldDeserializers(); + } + else if(RepositoryRuleWorkflows != null) + { + return RepositoryRuleWorkflows.GetFieldDeserializers(); + } + return new Dictionary>(); + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(RepositoryRuleBranchNamePattern != null) + { + writer.WriteObjectValue(null, RepositoryRuleBranchNamePattern); + } + else if(RepositoryRuleCodeScanning != null) + { + writer.WriteObjectValue(null, RepositoryRuleCodeScanning); + } + else if(RepositoryRuleCommitAuthorEmailPattern != null) + { + writer.WriteObjectValue(null, RepositoryRuleCommitAuthorEmailPattern); + } + else if(RepositoryRuleCommitMessagePattern != null) + { + writer.WriteObjectValue(null, RepositoryRuleCommitMessagePattern); + } + else if(RepositoryRuleCommitterEmailPattern != null) + { + writer.WriteObjectValue(null, RepositoryRuleCommitterEmailPattern); + } + else if(RepositoryRuleCreation != null) + { + writer.WriteObjectValue(null, RepositoryRuleCreation); + } + else if(RepositoryRuleDeletion != null) + { + writer.WriteObjectValue(null, RepositoryRuleDeletion); + } + else if(RepositoryRuleFileExtensionRestriction != null) + { + writer.WriteObjectValue(null, RepositoryRuleFileExtensionRestriction); + } + else if(RepositoryRuleFilePathRestriction != null) + { + writer.WriteObjectValue(null, RepositoryRuleFilePathRestriction); + } + else if(RepositoryRuleMaxFilePathLength != null) + { + writer.WriteObjectValue(null, RepositoryRuleMaxFilePathLength); + } + else if(RepositoryRuleMaxFileSize != null) + { + writer.WriteObjectValue(null, RepositoryRuleMaxFileSize); + } + else if(RepositoryRuleNonFastForward != null) + { + writer.WriteObjectValue(null, RepositoryRuleNonFastForward); + } + else if(RepositoryRulePullRequest != null) + { + writer.WriteObjectValue(null, RepositoryRulePullRequest); + } + else if(RepositoryRuleRequiredDeployments != null) + { + writer.WriteObjectValue(null, RepositoryRuleRequiredDeployments); + } + else if(RepositoryRuleRequiredLinearHistory != null) + { + writer.WriteObjectValue(null, RepositoryRuleRequiredLinearHistory); + } + else if(RepositoryRuleRequiredSignatures != null) + { + writer.WriteObjectValue(null, RepositoryRuleRequiredSignatures); + } + else if(RepositoryRuleRequiredStatusChecks != null) + { + writer.WriteObjectValue(null, RepositoryRuleRequiredStatusChecks); + } + else if(RepositoryRuleTagNamePattern != null) + { + writer.WriteObjectValue(null, RepositoryRuleTagNamePattern); + } + else if(RepositoryRuleUpdate != null) + { + writer.WriteObjectValue(null, RepositoryRuleUpdate); + } + else if(RepositoryRuleWorkflows != null) + { + writer.WriteObjectValue(null, RepositoryRuleWorkflows); + } + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/OrgRulesetConditions.cs b/src/Ayllu.Github.Client/Github/Client/Models/OrgRulesetConditions.cs new file mode 100644 index 0000000..deaea6e --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/OrgRulesetConditions.cs @@ -0,0 +1,56 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + /// + /// Conditions for an organization ruleset.The branch and tag rulesets conditions object should contain both `repository_name` and `ref_name` properties, or both `repository_id` and `ref_name` properties, or both `repository_property` and `ref_name` properties.The push rulesets conditions object does not require the `ref_name` property.For repository policy rulesets, the conditions object should only contain the `repository_name`, the `repository_id`, or the `repository_property`. + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class OrgRulesetConditions : IAdditionalDataHolder, IParsable + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public OrgRulesetConditions() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.OrgRulesetConditions CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.OrgRulesetConditions(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/OrganizationActionsSecret.cs b/src/Ayllu.Github.Client/Github/Client/Models/OrganizationActionsSecret.cs new file mode 100644 index 0000000..b0a9da6 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/OrganizationActionsSecret.cs @@ -0,0 +1,88 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + /// + /// Secrets for GitHub Actions for an organization. + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class OrganizationActionsSecret : IAdditionalDataHolder, IParsable + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The created_at property + public DateTimeOffset? CreatedAt { get; set; } + /// The name of the secret. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Name { get; set; } +#nullable restore +#else + public string Name { get; set; } +#endif + /// The selected_repositories_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? SelectedRepositoriesUrl { get; set; } +#nullable restore +#else + public string SelectedRepositoriesUrl { get; set; } +#endif + /// The updated_at property + public DateTimeOffset? UpdatedAt { get; set; } + /// Visibility of a secret + public global::Ayllu.Github.Client.Models.OrganizationActionsSecret_visibility? Visibility { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public OrganizationActionsSecret() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.OrganizationActionsSecret CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.OrganizationActionsSecret(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "created_at", n => { CreatedAt = n.GetDateTimeOffsetValue(); } }, + { "name", n => { Name = n.GetStringValue(); } }, + { "selected_repositories_url", n => { SelectedRepositoriesUrl = n.GetStringValue(); } }, + { "updated_at", n => { UpdatedAt = n.GetDateTimeOffsetValue(); } }, + { "visibility", n => { Visibility = n.GetEnumValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteDateTimeOffsetValue("created_at", CreatedAt); + writer.WriteStringValue("name", Name); + writer.WriteStringValue("selected_repositories_url", SelectedRepositoriesUrl); + writer.WriteDateTimeOffsetValue("updated_at", UpdatedAt); + writer.WriteEnumValue("visibility", Visibility); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/OrganizationActionsSecret_visibility.cs b/src/Ayllu.Github.Client/Github/Client/Models/OrganizationActionsSecret_visibility.cs new file mode 100644 index 0000000..1034d0a --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/OrganizationActionsSecret_visibility.cs @@ -0,0 +1,23 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Models +{ + /// Visibility of a secret + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public enum OrganizationActionsSecret_visibility + { + [EnumMember(Value = "all")] + #pragma warning disable CS1591 + All, + #pragma warning restore CS1591 + [EnumMember(Value = "private")] + #pragma warning disable CS1591 + Private, + #pragma warning restore CS1591 + [EnumMember(Value = "selected")] + #pragma warning disable CS1591 + Selected, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Models/OrganizationActionsVariable.cs b/src/Ayllu.Github.Client/Github/Client/Models/OrganizationActionsVariable.cs new file mode 100644 index 0000000..21a1b02 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/OrganizationActionsVariable.cs @@ -0,0 +1,98 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + /// + /// Organization variable for GitHub Actions. + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class OrganizationActionsVariable : IAdditionalDataHolder, IParsable + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The date and time at which the variable was created, in ISO 8601 format':' YYYY-MM-DDTHH:MM:SSZ. + public DateTimeOffset? CreatedAt { get; set; } + /// The name of the variable. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Name { get; set; } +#nullable restore +#else + public string Name { get; set; } +#endif + /// The selected_repositories_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? SelectedRepositoriesUrl { get; set; } +#nullable restore +#else + public string SelectedRepositoriesUrl { get; set; } +#endif + /// The date and time at which the variable was last updated, in ISO 8601 format':' YYYY-MM-DDTHH:MM:SSZ. + public DateTimeOffset? UpdatedAt { get; set; } + /// The value of the variable. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Value { get; set; } +#nullable restore +#else + public string Value { get; set; } +#endif + /// Visibility of a variable + public global::Ayllu.Github.Client.Models.OrganizationActionsVariable_visibility? Visibility { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public OrganizationActionsVariable() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.OrganizationActionsVariable CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.OrganizationActionsVariable(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "created_at", n => { CreatedAt = n.GetDateTimeOffsetValue(); } }, + { "name", n => { Name = n.GetStringValue(); } }, + { "selected_repositories_url", n => { SelectedRepositoriesUrl = n.GetStringValue(); } }, + { "updated_at", n => { UpdatedAt = n.GetDateTimeOffsetValue(); } }, + { "value", n => { Value = n.GetStringValue(); } }, + { "visibility", n => { Visibility = n.GetEnumValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteDateTimeOffsetValue("created_at", CreatedAt); + writer.WriteStringValue("name", Name); + writer.WriteStringValue("selected_repositories_url", SelectedRepositoriesUrl); + writer.WriteDateTimeOffsetValue("updated_at", UpdatedAt); + writer.WriteStringValue("value", Value); + writer.WriteEnumValue("visibility", Visibility); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/OrganizationActionsVariable_visibility.cs b/src/Ayllu.Github.Client/Github/Client/Models/OrganizationActionsVariable_visibility.cs new file mode 100644 index 0000000..5494f17 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/OrganizationActionsVariable_visibility.cs @@ -0,0 +1,23 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Models +{ + /// Visibility of a variable + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public enum OrganizationActionsVariable_visibility + { + [EnumMember(Value = "all")] + #pragma warning disable CS1591 + All, + #pragma warning restore CS1591 + [EnumMember(Value = "private")] + #pragma warning disable CS1591 + Private, + #pragma warning restore CS1591 + [EnumMember(Value = "selected")] + #pragma warning disable CS1591 + Selected, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Models/OrganizationCreateIssueType.cs b/src/Ayllu.Github.Client/Github/Client/Models/OrganizationCreateIssueType.cs new file mode 100644 index 0000000..d4979de --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/OrganizationCreateIssueType.cs @@ -0,0 +1,83 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class OrganizationCreateIssueType : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// Color for the issue type. + public global::Ayllu.Github.Client.Models.OrganizationCreateIssueType_color? Color { get; set; } + /// Description of the issue type. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Description { get; set; } +#nullable restore +#else + public string Description { get; set; } +#endif + /// Whether or not the issue type is enabled at the organization level. + public bool? IsEnabled { get; set; } + /// Name of the issue type. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Name { get; set; } +#nullable restore +#else + public string Name { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public OrganizationCreateIssueType() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.OrganizationCreateIssueType CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.OrganizationCreateIssueType(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "color", n => { Color = n.GetEnumValue(); } }, + { "description", n => { Description = n.GetStringValue(); } }, + { "is_enabled", n => { IsEnabled = n.GetBoolValue(); } }, + { "name", n => { Name = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteEnumValue("color", Color); + writer.WriteStringValue("description", Description); + writer.WriteBoolValue("is_enabled", IsEnabled); + writer.WriteStringValue("name", Name); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/OrganizationCreateIssueType_color.cs b/src/Ayllu.Github.Client/Github/Client/Models/OrganizationCreateIssueType_color.cs new file mode 100644 index 0000000..ae51a84 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/OrganizationCreateIssueType_color.cs @@ -0,0 +1,43 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Models +{ + /// Color for the issue type. + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public enum OrganizationCreateIssueType_color + { + [EnumMember(Value = "gray")] + #pragma warning disable CS1591 + Gray, + #pragma warning restore CS1591 + [EnumMember(Value = "blue")] + #pragma warning disable CS1591 + Blue, + #pragma warning restore CS1591 + [EnumMember(Value = "green")] + #pragma warning disable CS1591 + Green, + #pragma warning restore CS1591 + [EnumMember(Value = "yellow")] + #pragma warning disable CS1591 + Yellow, + #pragma warning restore CS1591 + [EnumMember(Value = "orange")] + #pragma warning disable CS1591 + Orange, + #pragma warning restore CS1591 + [EnumMember(Value = "red")] + #pragma warning disable CS1591 + Red, + #pragma warning restore CS1591 + [EnumMember(Value = "pink")] + #pragma warning disable CS1591 + Pink, + #pragma warning restore CS1591 + [EnumMember(Value = "purple")] + #pragma warning disable CS1591 + Purple, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Models/OrganizationDependabotSecret.cs b/src/Ayllu.Github.Client/Github/Client/Models/OrganizationDependabotSecret.cs new file mode 100644 index 0000000..c671136 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/OrganizationDependabotSecret.cs @@ -0,0 +1,88 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + /// + /// Secrets for GitHub Dependabot for an organization. + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class OrganizationDependabotSecret : IAdditionalDataHolder, IParsable + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The created_at property + public DateTimeOffset? CreatedAt { get; set; } + /// The name of the secret. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Name { get; set; } +#nullable restore +#else + public string Name { get; set; } +#endif + /// The selected_repositories_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? SelectedRepositoriesUrl { get; set; } +#nullable restore +#else + public string SelectedRepositoriesUrl { get; set; } +#endif + /// The updated_at property + public DateTimeOffset? UpdatedAt { get; set; } + /// Visibility of a secret + public global::Ayllu.Github.Client.Models.OrganizationDependabotSecret_visibility? Visibility { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public OrganizationDependabotSecret() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.OrganizationDependabotSecret CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.OrganizationDependabotSecret(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "created_at", n => { CreatedAt = n.GetDateTimeOffsetValue(); } }, + { "name", n => { Name = n.GetStringValue(); } }, + { "selected_repositories_url", n => { SelectedRepositoriesUrl = n.GetStringValue(); } }, + { "updated_at", n => { UpdatedAt = n.GetDateTimeOffsetValue(); } }, + { "visibility", n => { Visibility = n.GetEnumValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteDateTimeOffsetValue("created_at", CreatedAt); + writer.WriteStringValue("name", Name); + writer.WriteStringValue("selected_repositories_url", SelectedRepositoriesUrl); + writer.WriteDateTimeOffsetValue("updated_at", UpdatedAt); + writer.WriteEnumValue("visibility", Visibility); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/OrganizationDependabotSecret_visibility.cs b/src/Ayllu.Github.Client/Github/Client/Models/OrganizationDependabotSecret_visibility.cs new file mode 100644 index 0000000..b107254 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/OrganizationDependabotSecret_visibility.cs @@ -0,0 +1,23 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Models +{ + /// Visibility of a secret + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public enum OrganizationDependabotSecret_visibility + { + [EnumMember(Value = "all")] + #pragma warning disable CS1591 + All, + #pragma warning restore CS1591 + [EnumMember(Value = "private")] + #pragma warning disable CS1591 + Private, + #pragma warning restore CS1591 + [EnumMember(Value = "selected")] + #pragma warning disable CS1591 + Selected, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Models/OrganizationFull.cs b/src/Ayllu.Github.Client/Github/Client/Models/OrganizationFull.cs new file mode 100644 index 0000000..816aa77 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/OrganizationFull.cs @@ -0,0 +1,480 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + /// + /// Organization Full + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class OrganizationFull : IAdditionalDataHolder, IParsable + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// **Endpoint closing down notice.** Please use [code security configurations](https://docs.github.com/rest/code-security/configurations) instead.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. + [Obsolete("")] + public bool? AdvancedSecurityEnabledForNewRepositories { get; set; } + /// The archived_at property + public DateTimeOffset? ArchivedAt { get; set; } + /// The avatar_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? AvatarUrl { get; set; } +#nullable restore +#else + public string AvatarUrl { get; set; } +#endif + /// The billing_email property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? BillingEmail { get; set; } +#nullable restore +#else + public string BillingEmail { get; set; } +#endif + /// The blog property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Blog { get; set; } +#nullable restore +#else + public string Blog { get; set; } +#endif + /// The number of collaborators on private repositories.This field may be null if the number of private repositories is over 50,000. + public int? Collaborators { get; set; } + /// The company property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Company { get; set; } +#nullable restore +#else + public string Company { get; set; } +#endif + /// The created_at property + public DateTimeOffset? CreatedAt { get; set; } + /// The default branch for repositories created in this organization. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? DefaultRepositoryBranch { get; set; } +#nullable restore +#else + public string DefaultRepositoryBranch { get; set; } +#endif + /// The default_repository_permission property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? DefaultRepositoryPermission { get; set; } +#nullable restore +#else + public string DefaultRepositoryPermission { get; set; } +#endif + /// **Endpoint closing down notice.** Please use [code security configurations](https://docs.github.com/rest/code-security/configurations) instead.Whether Dependabot alerts are automatically 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. + [Obsolete("")] + public bool? DependabotAlertsEnabledForNewRepositories { get; set; } + /// **Endpoint closing down notice.** Please use [code security configurations](https://docs.github.com/rest/code-security/configurations) instead.Whether Dependabot security updates are automatically 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. + [Obsolete("")] + public bool? DependabotSecurityUpdatesEnabledForNewRepositories { get; set; } + /// **Endpoint closing down notice.** Please use [code security configurations](https://docs.github.com/rest/code-security/configurations) instead.Whether dependency graph is automatically 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. + [Obsolete("")] + public bool? DependencyGraphEnabledForNewRepositories { get; set; } + /// Controls whether or not deploy keys may be added and used for repositories in the organization. + public bool? DeployKeysEnabledForRepositories { get; set; } + /// The description property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Description { get; set; } +#nullable restore +#else + public string Description { get; set; } +#endif + /// The disk_usage property + public int? DiskUsage { get; set; } + /// The display_commenter_full_name_setting_enabled property + public bool? DisplayCommenterFullNameSettingEnabled { get; set; } + /// The email property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Email { get; set; } +#nullable restore +#else + public string Email { get; set; } +#endif + /// The events_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? EventsUrl { get; set; } +#nullable restore +#else + public string EventsUrl { get; set; } +#endif + /// The followers property + public int? Followers { get; set; } + /// The following property + public int? Following { get; set; } + /// The has_organization_projects property + public bool? HasOrganizationProjects { get; set; } + /// The has_repository_projects property + public bool? HasRepositoryProjects { get; set; } + /// The hooks_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? HooksUrl { get; set; } +#nullable restore +#else + public string HooksUrl { get; set; } +#endif + /// The html_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? HtmlUrl { get; set; } +#nullable restore +#else + public string HtmlUrl { get; set; } +#endif + /// The id property + public int? Id { get; set; } + /// The issues_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? IssuesUrl { get; set; } +#nullable restore +#else + public string IssuesUrl { get; set; } +#endif + /// The is_verified property + public bool? IsVerified { get; set; } + /// The location property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Location { get; set; } +#nullable restore +#else + public string Location { get; set; } +#endif + /// The login property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Login { get; set; } +#nullable restore +#else + public string Login { get; set; } +#endif + /// The members_allowed_repository_creation_type property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? MembersAllowedRepositoryCreationType { get; set; } +#nullable restore +#else + public string MembersAllowedRepositoryCreationType { get; set; } +#endif + /// The members_can_change_repo_visibility property + public bool? MembersCanChangeRepoVisibility { get; set; } + /// The members_can_create_internal_repositories property + public bool? MembersCanCreateInternalRepositories { get; set; } + /// The members_can_create_pages property + public bool? MembersCanCreatePages { get; set; } + /// The members_can_create_private_pages property + public bool? MembersCanCreatePrivatePages { get; set; } + /// The members_can_create_private_repositories property + public bool? MembersCanCreatePrivateRepositories { get; set; } + /// The members_can_create_public_pages property + public bool? MembersCanCreatePublicPages { get; set; } + /// The members_can_create_public_repositories property + public bool? MembersCanCreatePublicRepositories { get; set; } + /// The members_can_create_repositories property + public bool? MembersCanCreateRepositories { get; set; } + /// The members_can_create_teams property + public bool? MembersCanCreateTeams { get; set; } + /// The members_can_delete_issues property + public bool? MembersCanDeleteIssues { get; set; } + /// The members_can_delete_repositories property + public bool? MembersCanDeleteRepositories { get; set; } + /// The members_can_fork_private_repositories property + public bool? MembersCanForkPrivateRepositories { get; set; } + /// The members_can_invite_outside_collaborators property + public bool? MembersCanInviteOutsideCollaborators { get; set; } + /// The members_can_view_dependency_insights property + public bool? MembersCanViewDependencyInsights { get; set; } + /// The members_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? MembersUrl { get; set; } +#nullable restore +#else + public string MembersUrl { get; set; } +#endif + /// The name property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Name { get; set; } +#nullable restore +#else + public string Name { get; set; } +#endif + /// The node_id property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? NodeId { get; set; } +#nullable restore +#else + public string NodeId { get; set; } +#endif + /// The owned_private_repos property + public int? OwnedPrivateRepos { get; set; } + /// The plan property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.OrganizationFull_plan? Plan { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.OrganizationFull_plan Plan { get; set; } +#endif + /// The private_gists property + public int? PrivateGists { get; set; } + /// The public_gists property + public int? PublicGists { get; set; } + /// The public_members_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? PublicMembersUrl { get; set; } +#nullable restore +#else + public string PublicMembersUrl { get; set; } +#endif + /// The public_repos property + public int? PublicRepos { get; set; } + /// The readers_can_create_discussions property + public bool? ReadersCanCreateDiscussions { get; set; } + /// The repos_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? ReposUrl { get; set; } +#nullable restore +#else + public string ReposUrl { get; set; } +#endif + /// **Endpoint closing down notice.** Please use [code security configurations](https://docs.github.com/rest/code-security/configurations) instead.Whether secret scanning is automatically 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. + [Obsolete("")] + public bool? SecretScanningEnabledForNewRepositories { get; set; } + /// An optional URL string to display to contributors who are blocked from pushing a secret. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? SecretScanningPushProtectionCustomLink { get; set; } +#nullable restore +#else + public string SecretScanningPushProtectionCustomLink { get; set; } +#endif + /// Whether a custom link is shown to contributors who are blocked from pushing a secret by push protection. + public bool? SecretScanningPushProtectionCustomLinkEnabled { get; set; } + /// **Endpoint closing down notice.** Please use [code security configurations](https://docs.github.com/rest/code-security/configurations) instead.Whether secret scanning push protection is automatically 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. + [Obsolete("")] + public bool? SecretScanningPushProtectionEnabledForNewRepositories { get; set; } + /// The total_private_repos property + public int? TotalPrivateRepos { get; set; } + /// The twitter_username property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? TwitterUsername { get; set; } +#nullable restore +#else + public string TwitterUsername { get; set; } +#endif + /// The two_factor_requirement_enabled property + public bool? TwoFactorRequirementEnabled { get; set; } + /// The type property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Type { get; set; } +#nullable restore +#else + public string Type { get; set; } +#endif + /// The updated_at property + public DateTimeOffset? UpdatedAt { get; set; } + /// The url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Url { get; set; } +#nullable restore +#else + public string Url { get; set; } +#endif + /// The web_commit_signoff_required property + public bool? WebCommitSignoffRequired { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public OrganizationFull() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.OrganizationFull CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.OrganizationFull(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "advanced_security_enabled_for_new_repositories", n => { AdvancedSecurityEnabledForNewRepositories = n.GetBoolValue(); } }, + { "archived_at", n => { ArchivedAt = n.GetDateTimeOffsetValue(); } }, + { "avatar_url", n => { AvatarUrl = n.GetStringValue(); } }, + { "billing_email", n => { BillingEmail = n.GetStringValue(); } }, + { "blog", n => { Blog = n.GetStringValue(); } }, + { "collaborators", n => { Collaborators = n.GetIntValue(); } }, + { "company", n => { Company = n.GetStringValue(); } }, + { "created_at", n => { CreatedAt = n.GetDateTimeOffsetValue(); } }, + { "default_repository_branch", n => { DefaultRepositoryBranch = n.GetStringValue(); } }, + { "default_repository_permission", n => { DefaultRepositoryPermission = n.GetStringValue(); } }, + { "dependabot_alerts_enabled_for_new_repositories", n => { DependabotAlertsEnabledForNewRepositories = n.GetBoolValue(); } }, + { "dependabot_security_updates_enabled_for_new_repositories", n => { DependabotSecurityUpdatesEnabledForNewRepositories = n.GetBoolValue(); } }, + { "dependency_graph_enabled_for_new_repositories", n => { DependencyGraphEnabledForNewRepositories = n.GetBoolValue(); } }, + { "deploy_keys_enabled_for_repositories", n => { DeployKeysEnabledForRepositories = n.GetBoolValue(); } }, + { "description", n => { Description = n.GetStringValue(); } }, + { "disk_usage", n => { DiskUsage = n.GetIntValue(); } }, + { "display_commenter_full_name_setting_enabled", n => { DisplayCommenterFullNameSettingEnabled = n.GetBoolValue(); } }, + { "email", n => { Email = n.GetStringValue(); } }, + { "events_url", n => { EventsUrl = n.GetStringValue(); } }, + { "followers", n => { Followers = n.GetIntValue(); } }, + { "following", n => { Following = n.GetIntValue(); } }, + { "has_organization_projects", n => { HasOrganizationProjects = n.GetBoolValue(); } }, + { "has_repository_projects", n => { HasRepositoryProjects = n.GetBoolValue(); } }, + { "hooks_url", n => { HooksUrl = n.GetStringValue(); } }, + { "html_url", n => { HtmlUrl = n.GetStringValue(); } }, + { "id", n => { Id = n.GetIntValue(); } }, + { "is_verified", n => { IsVerified = n.GetBoolValue(); } }, + { "issues_url", n => { IssuesUrl = n.GetStringValue(); } }, + { "location", n => { Location = n.GetStringValue(); } }, + { "login", n => { Login = n.GetStringValue(); } }, + { "members_allowed_repository_creation_type", n => { MembersAllowedRepositoryCreationType = n.GetStringValue(); } }, + { "members_can_change_repo_visibility", n => { MembersCanChangeRepoVisibility = n.GetBoolValue(); } }, + { "members_can_create_internal_repositories", n => { MembersCanCreateInternalRepositories = n.GetBoolValue(); } }, + { "members_can_create_pages", n => { MembersCanCreatePages = n.GetBoolValue(); } }, + { "members_can_create_private_pages", n => { MembersCanCreatePrivatePages = n.GetBoolValue(); } }, + { "members_can_create_private_repositories", n => { MembersCanCreatePrivateRepositories = n.GetBoolValue(); } }, + { "members_can_create_public_pages", n => { MembersCanCreatePublicPages = n.GetBoolValue(); } }, + { "members_can_create_public_repositories", n => { MembersCanCreatePublicRepositories = n.GetBoolValue(); } }, + { "members_can_create_repositories", n => { MembersCanCreateRepositories = n.GetBoolValue(); } }, + { "members_can_create_teams", n => { MembersCanCreateTeams = n.GetBoolValue(); } }, + { "members_can_delete_issues", n => { MembersCanDeleteIssues = n.GetBoolValue(); } }, + { "members_can_delete_repositories", n => { MembersCanDeleteRepositories = n.GetBoolValue(); } }, + { "members_can_fork_private_repositories", n => { MembersCanForkPrivateRepositories = n.GetBoolValue(); } }, + { "members_can_invite_outside_collaborators", n => { MembersCanInviteOutsideCollaborators = n.GetBoolValue(); } }, + { "members_can_view_dependency_insights", n => { MembersCanViewDependencyInsights = n.GetBoolValue(); } }, + { "members_url", n => { MembersUrl = n.GetStringValue(); } }, + { "name", n => { Name = n.GetStringValue(); } }, + { "node_id", n => { NodeId = n.GetStringValue(); } }, + { "owned_private_repos", n => { OwnedPrivateRepos = n.GetIntValue(); } }, + { "plan", n => { Plan = n.GetObjectValue(global::Ayllu.Github.Client.Models.OrganizationFull_plan.CreateFromDiscriminatorValue); } }, + { "private_gists", n => { PrivateGists = n.GetIntValue(); } }, + { "public_gists", n => { PublicGists = n.GetIntValue(); } }, + { "public_members_url", n => { PublicMembersUrl = n.GetStringValue(); } }, + { "public_repos", n => { PublicRepos = n.GetIntValue(); } }, + { "readers_can_create_discussions", n => { ReadersCanCreateDiscussions = n.GetBoolValue(); } }, + { "repos_url", n => { ReposUrl = n.GetStringValue(); } }, + { "secret_scanning_enabled_for_new_repositories", n => { SecretScanningEnabledForNewRepositories = n.GetBoolValue(); } }, + { "secret_scanning_push_protection_custom_link", n => { SecretScanningPushProtectionCustomLink = n.GetStringValue(); } }, + { "secret_scanning_push_protection_custom_link_enabled", n => { SecretScanningPushProtectionCustomLinkEnabled = n.GetBoolValue(); } }, + { "secret_scanning_push_protection_enabled_for_new_repositories", n => { SecretScanningPushProtectionEnabledForNewRepositories = n.GetBoolValue(); } }, + { "total_private_repos", n => { TotalPrivateRepos = n.GetIntValue(); } }, + { "twitter_username", n => { TwitterUsername = n.GetStringValue(); } }, + { "two_factor_requirement_enabled", n => { TwoFactorRequirementEnabled = n.GetBoolValue(); } }, + { "type", n => { Type = n.GetStringValue(); } }, + { "updated_at", n => { UpdatedAt = n.GetDateTimeOffsetValue(); } }, + { "url", n => { Url = n.GetStringValue(); } }, + { "web_commit_signoff_required", n => { WebCommitSignoffRequired = n.GetBoolValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteBoolValue("advanced_security_enabled_for_new_repositories", AdvancedSecurityEnabledForNewRepositories); + writer.WriteDateTimeOffsetValue("archived_at", ArchivedAt); + writer.WriteStringValue("avatar_url", AvatarUrl); + writer.WriteStringValue("billing_email", BillingEmail); + writer.WriteStringValue("blog", Blog); + writer.WriteIntValue("collaborators", Collaborators); + writer.WriteStringValue("company", Company); + writer.WriteDateTimeOffsetValue("created_at", CreatedAt); + writer.WriteStringValue("default_repository_branch", DefaultRepositoryBranch); + writer.WriteStringValue("default_repository_permission", DefaultRepositoryPermission); + writer.WriteBoolValue("dependabot_alerts_enabled_for_new_repositories", DependabotAlertsEnabledForNewRepositories); + writer.WriteBoolValue("dependabot_security_updates_enabled_for_new_repositories", DependabotSecurityUpdatesEnabledForNewRepositories); + writer.WriteBoolValue("dependency_graph_enabled_for_new_repositories", DependencyGraphEnabledForNewRepositories); + writer.WriteBoolValue("deploy_keys_enabled_for_repositories", DeployKeysEnabledForRepositories); + writer.WriteStringValue("description", Description); + writer.WriteIntValue("disk_usage", DiskUsage); + writer.WriteBoolValue("display_commenter_full_name_setting_enabled", DisplayCommenterFullNameSettingEnabled); + writer.WriteStringValue("email", Email); + writer.WriteStringValue("events_url", EventsUrl); + writer.WriteIntValue("followers", Followers); + writer.WriteIntValue("following", Following); + writer.WriteBoolValue("has_organization_projects", HasOrganizationProjects); + writer.WriteBoolValue("has_repository_projects", HasRepositoryProjects); + writer.WriteStringValue("hooks_url", HooksUrl); + writer.WriteStringValue("html_url", HtmlUrl); + writer.WriteIntValue("id", Id); + writer.WriteStringValue("issues_url", IssuesUrl); + writer.WriteBoolValue("is_verified", IsVerified); + writer.WriteStringValue("location", Location); + writer.WriteStringValue("login", Login); + writer.WriteStringValue("members_allowed_repository_creation_type", MembersAllowedRepositoryCreationType); + writer.WriteBoolValue("members_can_change_repo_visibility", MembersCanChangeRepoVisibility); + writer.WriteBoolValue("members_can_create_internal_repositories", MembersCanCreateInternalRepositories); + writer.WriteBoolValue("members_can_create_pages", MembersCanCreatePages); + writer.WriteBoolValue("members_can_create_private_pages", MembersCanCreatePrivatePages); + writer.WriteBoolValue("members_can_create_private_repositories", MembersCanCreatePrivateRepositories); + writer.WriteBoolValue("members_can_create_public_pages", MembersCanCreatePublicPages); + writer.WriteBoolValue("members_can_create_public_repositories", MembersCanCreatePublicRepositories); + writer.WriteBoolValue("members_can_create_repositories", MembersCanCreateRepositories); + writer.WriteBoolValue("members_can_create_teams", MembersCanCreateTeams); + writer.WriteBoolValue("members_can_delete_issues", MembersCanDeleteIssues); + writer.WriteBoolValue("members_can_delete_repositories", MembersCanDeleteRepositories); + writer.WriteBoolValue("members_can_fork_private_repositories", MembersCanForkPrivateRepositories); + writer.WriteBoolValue("members_can_invite_outside_collaborators", MembersCanInviteOutsideCollaborators); + writer.WriteBoolValue("members_can_view_dependency_insights", MembersCanViewDependencyInsights); + writer.WriteStringValue("members_url", MembersUrl); + writer.WriteStringValue("name", Name); + writer.WriteStringValue("node_id", NodeId); + writer.WriteIntValue("owned_private_repos", OwnedPrivateRepos); + writer.WriteObjectValue("plan", Plan); + writer.WriteIntValue("private_gists", PrivateGists); + writer.WriteIntValue("public_gists", PublicGists); + writer.WriteStringValue("public_members_url", PublicMembersUrl); + writer.WriteIntValue("public_repos", PublicRepos); + writer.WriteBoolValue("readers_can_create_discussions", ReadersCanCreateDiscussions); + writer.WriteStringValue("repos_url", ReposUrl); + writer.WriteBoolValue("secret_scanning_enabled_for_new_repositories", SecretScanningEnabledForNewRepositories); + writer.WriteStringValue("secret_scanning_push_protection_custom_link", SecretScanningPushProtectionCustomLink); + writer.WriteBoolValue("secret_scanning_push_protection_custom_link_enabled", SecretScanningPushProtectionCustomLinkEnabled); + writer.WriteBoolValue("secret_scanning_push_protection_enabled_for_new_repositories", SecretScanningPushProtectionEnabledForNewRepositories); + writer.WriteIntValue("total_private_repos", TotalPrivateRepos); + writer.WriteStringValue("twitter_username", TwitterUsername); + writer.WriteBoolValue("two_factor_requirement_enabled", TwoFactorRequirementEnabled); + writer.WriteStringValue("type", Type); + writer.WriteDateTimeOffsetValue("updated_at", UpdatedAt); + writer.WriteStringValue("url", Url); + writer.WriteBoolValue("web_commit_signoff_required", WebCommitSignoffRequired); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/OrganizationFull_plan.cs b/src/Ayllu.Github.Client/Github/Client/Models/OrganizationFull_plan.cs new file mode 100644 index 0000000..cf63cd8 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/OrganizationFull_plan.cs @@ -0,0 +1,81 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class OrganizationFull_plan : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The filled_seats property + public int? FilledSeats { get; set; } + /// The name property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Name { get; set; } +#nullable restore +#else + public string Name { get; set; } +#endif + /// The private_repos property + public int? PrivateRepos { get; set; } + /// The seats property + public int? Seats { get; set; } + /// The space property + public int? Space { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public OrganizationFull_plan() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.OrganizationFull_plan CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.OrganizationFull_plan(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "filled_seats", n => { FilledSeats = n.GetIntValue(); } }, + { "name", n => { Name = n.GetStringValue(); } }, + { "private_repos", n => { PrivateRepos = n.GetIntValue(); } }, + { "seats", n => { Seats = n.GetIntValue(); } }, + { "space", n => { Space = n.GetIntValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteIntValue("filled_seats", FilledSeats); + writer.WriteStringValue("name", Name); + writer.WriteIntValue("private_repos", PrivateRepos); + writer.WriteIntValue("seats", Seats); + writer.WriteIntValue("space", Space); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/OrganizationInvitation.cs b/src/Ayllu.Github.Client/Github/Client/Models/OrganizationInvitation.cs new file mode 100644 index 0000000..348eda4 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/OrganizationInvitation.cs @@ -0,0 +1,164 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + /// + /// Organization Invitation + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class OrganizationInvitation : IAdditionalDataHolder, IParsable + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The created_at property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? CreatedAt { get; set; } +#nullable restore +#else + public string CreatedAt { get; set; } +#endif + /// The email property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Email { get; set; } +#nullable restore +#else + public string Email { get; set; } +#endif + /// The failed_at property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? FailedAt { get; set; } +#nullable restore +#else + public string FailedAt { get; set; } +#endif + /// The failed_reason property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? FailedReason { get; set; } +#nullable restore +#else + public string FailedReason { get; set; } +#endif + /// The id property + public long? Id { get; set; } + /// The invitation_source property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? InvitationSource { get; set; } +#nullable restore +#else + public string InvitationSource { get; set; } +#endif + /// The invitation_teams_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? InvitationTeamsUrl { get; set; } +#nullable restore +#else + public string InvitationTeamsUrl { get; set; } +#endif + /// A GitHub user. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.SimpleUser? Inviter { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.SimpleUser Inviter { get; set; } +#endif + /// The login property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Login { get; set; } +#nullable restore +#else + public string Login { get; set; } +#endif + /// The node_id property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? NodeId { get; set; } +#nullable restore +#else + public string NodeId { get; set; } +#endif + /// The role property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Role { get; set; } +#nullable restore +#else + public string Role { get; set; } +#endif + /// The team_count property + public int? TeamCount { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public OrganizationInvitation() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.OrganizationInvitation CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.OrganizationInvitation(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "created_at", n => { CreatedAt = n.GetStringValue(); } }, + { "email", n => { Email = n.GetStringValue(); } }, + { "failed_at", n => { FailedAt = n.GetStringValue(); } }, + { "failed_reason", n => { FailedReason = n.GetStringValue(); } }, + { "id", n => { Id = n.GetLongValue(); } }, + { "invitation_source", n => { InvitationSource = n.GetStringValue(); } }, + { "invitation_teams_url", n => { InvitationTeamsUrl = n.GetStringValue(); } }, + { "inviter", n => { Inviter = n.GetObjectValue(global::Ayllu.Github.Client.Models.SimpleUser.CreateFromDiscriminatorValue); } }, + { "login", n => { Login = n.GetStringValue(); } }, + { "node_id", n => { NodeId = n.GetStringValue(); } }, + { "role", n => { Role = n.GetStringValue(); } }, + { "team_count", n => { TeamCount = n.GetIntValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("created_at", CreatedAt); + writer.WriteStringValue("email", Email); + writer.WriteStringValue("failed_at", FailedAt); + writer.WriteStringValue("failed_reason", FailedReason); + writer.WriteLongValue("id", Id); + writer.WriteStringValue("invitation_source", InvitationSource); + writer.WriteStringValue("invitation_teams_url", InvitationTeamsUrl); + writer.WriteObjectValue("inviter", Inviter); + writer.WriteStringValue("login", Login); + writer.WriteStringValue("node_id", NodeId); + writer.WriteStringValue("role", Role); + writer.WriteIntValue("team_count", TeamCount); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/OrganizationProgrammaticAccessGrant.cs b/src/Ayllu.Github.Client/Github/Client/Models/OrganizationProgrammaticAccessGrant.cs new file mode 100644 index 0000000..22361eb --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/OrganizationProgrammaticAccessGrant.cs @@ -0,0 +1,142 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + /// + /// Minimal representation of an organization programmatic access grant for enumerations + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class OrganizationProgrammaticAccessGrant : IAdditionalDataHolder, IParsable + { + /// Date and time when the fine-grained personal access token was approved to access the organization. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? AccessGrantedAt { get; set; } +#nullable restore +#else + public string AccessGrantedAt { get; set; } +#endif + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// Unique identifier of the fine-grained personal access token grant. The `pat_id` used to get details about an approved fine-grained personal access token. + public int? Id { get; set; } + /// A GitHub user. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.SimpleUser? Owner { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.SimpleUser Owner { get; set; } +#endif + /// Permissions requested, categorized by type of permission. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.OrganizationProgrammaticAccessGrant_permissions? Permissions { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.OrganizationProgrammaticAccessGrant_permissions Permissions { get; set; } +#endif + /// URL to the list of repositories the fine-grained personal access token can access. Only follow when `repository_selection` is `subset`. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? RepositoriesUrl { get; set; } +#nullable restore +#else + public string RepositoriesUrl { get; set; } +#endif + /// Type of repository selection requested. + public global::Ayllu.Github.Client.Models.OrganizationProgrammaticAccessGrant_repository_selection? RepositorySelection { get; set; } + /// Whether the associated fine-grained personal access token has expired. + public bool? TokenExpired { get; set; } + /// Date and time when the associated fine-grained personal access token expires. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? TokenExpiresAt { get; set; } +#nullable restore +#else + public string TokenExpiresAt { get; set; } +#endif + /// Unique identifier of the user's token. This field can also be found in audit log events and the organization's settings for their PAT grants. + public int? TokenId { get; set; } + /// Date and time when the associated fine-grained personal access token was last used for authentication. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? TokenLastUsedAt { get; set; } +#nullable restore +#else + public string TokenLastUsedAt { get; set; } +#endif + /// The name given to the user's token. This field can also be found in an organization's settings page for Active Tokens. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? TokenName { get; set; } +#nullable restore +#else + public string TokenName { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public OrganizationProgrammaticAccessGrant() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.OrganizationProgrammaticAccessGrant CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.OrganizationProgrammaticAccessGrant(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "access_granted_at", n => { AccessGrantedAt = n.GetStringValue(); } }, + { "id", n => { Id = n.GetIntValue(); } }, + { "owner", n => { Owner = n.GetObjectValue(global::Ayllu.Github.Client.Models.SimpleUser.CreateFromDiscriminatorValue); } }, + { "permissions", n => { Permissions = n.GetObjectValue(global::Ayllu.Github.Client.Models.OrganizationProgrammaticAccessGrant_permissions.CreateFromDiscriminatorValue); } }, + { "repositories_url", n => { RepositoriesUrl = n.GetStringValue(); } }, + { "repository_selection", n => { RepositorySelection = n.GetEnumValue(); } }, + { "token_expired", n => { TokenExpired = n.GetBoolValue(); } }, + { "token_expires_at", n => { TokenExpiresAt = n.GetStringValue(); } }, + { "token_id", n => { TokenId = n.GetIntValue(); } }, + { "token_last_used_at", n => { TokenLastUsedAt = n.GetStringValue(); } }, + { "token_name", n => { TokenName = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("access_granted_at", AccessGrantedAt); + writer.WriteIntValue("id", Id); + writer.WriteObjectValue("owner", Owner); + writer.WriteObjectValue("permissions", Permissions); + writer.WriteStringValue("repositories_url", RepositoriesUrl); + writer.WriteEnumValue("repository_selection", RepositorySelection); + writer.WriteBoolValue("token_expired", TokenExpired); + writer.WriteStringValue("token_expires_at", TokenExpiresAt); + writer.WriteIntValue("token_id", TokenId); + writer.WriteStringValue("token_last_used_at", TokenLastUsedAt); + writer.WriteStringValue("token_name", TokenName); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/OrganizationProgrammaticAccessGrantRequest.cs b/src/Ayllu.Github.Client/Github/Client/Models/OrganizationProgrammaticAccessGrantRequest.cs new file mode 100644 index 0000000..45357be --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/OrganizationProgrammaticAccessGrantRequest.cs @@ -0,0 +1,152 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + /// + /// Minimal representation of an organization programmatic access grant request for enumerations + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class OrganizationProgrammaticAccessGrantRequest : IAdditionalDataHolder, IParsable + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// Date and time when the request for access was created. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? CreatedAt { get; set; } +#nullable restore +#else + public string CreatedAt { get; set; } +#endif + /// Unique identifier of the request for access via fine-grained personal access token. The `pat_request_id` used to review PAT requests. + public int? Id { get; set; } + /// A GitHub user. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.SimpleUser? Owner { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.SimpleUser Owner { get; set; } +#endif + /// Permissions requested, categorized by type of permission. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.OrganizationProgrammaticAccessGrantRequest_permissions? Permissions { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.OrganizationProgrammaticAccessGrantRequest_permissions Permissions { get; set; } +#endif + /// Reason for requesting access. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Reason { get; set; } +#nullable restore +#else + public string Reason { get; set; } +#endif + /// 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`. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? RepositoriesUrl { get; set; } +#nullable restore +#else + public string RepositoriesUrl { get; set; } +#endif + /// Type of repository selection requested. + public global::Ayllu.Github.Client.Models.OrganizationProgrammaticAccessGrantRequest_repository_selection? RepositorySelection { get; set; } + /// Whether the associated fine-grained personal access token has expired. + public bool? TokenExpired { get; set; } + /// Date and time when the associated fine-grained personal access token expires. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? TokenExpiresAt { get; set; } +#nullable restore +#else + public string TokenExpiresAt { get; set; } +#endif + /// Unique identifier of the user's token. This field can also be found in audit log events and the organization's settings for their PAT grants. + public int? TokenId { get; set; } + /// Date and time when the associated fine-grained personal access token was last used for authentication. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? TokenLastUsedAt { get; set; } +#nullable restore +#else + public string TokenLastUsedAt { get; set; } +#endif + /// The name given to the user's token. This field can also be found in an organization's settings page for Active Tokens. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? TokenName { get; set; } +#nullable restore +#else + public string TokenName { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public OrganizationProgrammaticAccessGrantRequest() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.OrganizationProgrammaticAccessGrantRequest CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.OrganizationProgrammaticAccessGrantRequest(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "created_at", n => { CreatedAt = n.GetStringValue(); } }, + { "id", n => { Id = n.GetIntValue(); } }, + { "owner", n => { Owner = n.GetObjectValue(global::Ayllu.Github.Client.Models.SimpleUser.CreateFromDiscriminatorValue); } }, + { "permissions", n => { Permissions = n.GetObjectValue(global::Ayllu.Github.Client.Models.OrganizationProgrammaticAccessGrantRequest_permissions.CreateFromDiscriminatorValue); } }, + { "reason", n => { Reason = n.GetStringValue(); } }, + { "repositories_url", n => { RepositoriesUrl = n.GetStringValue(); } }, + { "repository_selection", n => { RepositorySelection = n.GetEnumValue(); } }, + { "token_expired", n => { TokenExpired = n.GetBoolValue(); } }, + { "token_expires_at", n => { TokenExpiresAt = n.GetStringValue(); } }, + { "token_id", n => { TokenId = n.GetIntValue(); } }, + { "token_last_used_at", n => { TokenLastUsedAt = n.GetStringValue(); } }, + { "token_name", n => { TokenName = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("created_at", CreatedAt); + writer.WriteIntValue("id", Id); + writer.WriteObjectValue("owner", Owner); + writer.WriteObjectValue("permissions", Permissions); + writer.WriteStringValue("reason", Reason); + writer.WriteStringValue("repositories_url", RepositoriesUrl); + writer.WriteEnumValue("repository_selection", RepositorySelection); + writer.WriteBoolValue("token_expired", TokenExpired); + writer.WriteStringValue("token_expires_at", TokenExpiresAt); + writer.WriteIntValue("token_id", TokenId); + writer.WriteStringValue("token_last_used_at", TokenLastUsedAt); + writer.WriteStringValue("token_name", TokenName); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/OrganizationProgrammaticAccessGrantRequest_permissions.cs b/src/Ayllu.Github.Client/Github/Client/Models/OrganizationProgrammaticAccessGrantRequest_permissions.cs new file mode 100644 index 0000000..2aa77c9 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/OrganizationProgrammaticAccessGrantRequest_permissions.cs @@ -0,0 +1,86 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + /// + /// Permissions requested, categorized by type of permission. + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class OrganizationProgrammaticAccessGrantRequest_permissions : IAdditionalDataHolder, IParsable + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The organization property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.OrganizationProgrammaticAccessGrantRequest_permissions_organization? Organization { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.OrganizationProgrammaticAccessGrantRequest_permissions_organization Organization { get; set; } +#endif + /// The other property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.OrganizationProgrammaticAccessGrantRequest_permissions_other? Other { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.OrganizationProgrammaticAccessGrantRequest_permissions_other Other { get; set; } +#endif + /// The repository property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.OrganizationProgrammaticAccessGrantRequest_permissions_repository? Repository { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.OrganizationProgrammaticAccessGrantRequest_permissions_repository Repository { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public OrganizationProgrammaticAccessGrantRequest_permissions() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.OrganizationProgrammaticAccessGrantRequest_permissions CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.OrganizationProgrammaticAccessGrantRequest_permissions(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "organization", n => { Organization = n.GetObjectValue(global::Ayllu.Github.Client.Models.OrganizationProgrammaticAccessGrantRequest_permissions_organization.CreateFromDiscriminatorValue); } }, + { "other", n => { Other = n.GetObjectValue(global::Ayllu.Github.Client.Models.OrganizationProgrammaticAccessGrantRequest_permissions_other.CreateFromDiscriminatorValue); } }, + { "repository", n => { Repository = n.GetObjectValue(global::Ayllu.Github.Client.Models.OrganizationProgrammaticAccessGrantRequest_permissions_repository.CreateFromDiscriminatorValue); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteObjectValue("organization", Organization); + writer.WriteObjectValue("other", Other); + writer.WriteObjectValue("repository", Repository); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/OrganizationProgrammaticAccessGrantRequest_permissions_organization.cs b/src/Ayllu.Github.Client/Github/Client/Models/OrganizationProgrammaticAccessGrantRequest_permissions_organization.cs new file mode 100644 index 0000000..94fdc15 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/OrganizationProgrammaticAccessGrantRequest_permissions_organization.cs @@ -0,0 +1,55 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class OrganizationProgrammaticAccessGrantRequest_permissions_organization : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public OrganizationProgrammaticAccessGrantRequest_permissions_organization() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.OrganizationProgrammaticAccessGrantRequest_permissions_organization CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.OrganizationProgrammaticAccessGrantRequest_permissions_organization(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/OrganizationProgrammaticAccessGrantRequest_permissions_other.cs b/src/Ayllu.Github.Client/Github/Client/Models/OrganizationProgrammaticAccessGrantRequest_permissions_other.cs new file mode 100644 index 0000000..13e38cd --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/OrganizationProgrammaticAccessGrantRequest_permissions_other.cs @@ -0,0 +1,55 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class OrganizationProgrammaticAccessGrantRequest_permissions_other : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public OrganizationProgrammaticAccessGrantRequest_permissions_other() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.OrganizationProgrammaticAccessGrantRequest_permissions_other CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.OrganizationProgrammaticAccessGrantRequest_permissions_other(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/OrganizationProgrammaticAccessGrantRequest_permissions_repository.cs b/src/Ayllu.Github.Client/Github/Client/Models/OrganizationProgrammaticAccessGrantRequest_permissions_repository.cs new file mode 100644 index 0000000..04f987e --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/OrganizationProgrammaticAccessGrantRequest_permissions_repository.cs @@ -0,0 +1,55 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class OrganizationProgrammaticAccessGrantRequest_permissions_repository : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public OrganizationProgrammaticAccessGrantRequest_permissions_repository() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.OrganizationProgrammaticAccessGrantRequest_permissions_repository CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.OrganizationProgrammaticAccessGrantRequest_permissions_repository(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/OrganizationProgrammaticAccessGrantRequest_repository_selection.cs b/src/Ayllu.Github.Client/Github/Client/Models/OrganizationProgrammaticAccessGrantRequest_repository_selection.cs new file mode 100644 index 0000000..5c7b235 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/OrganizationProgrammaticAccessGrantRequest_repository_selection.cs @@ -0,0 +1,23 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Models +{ + /// Type of repository selection requested. + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public enum OrganizationProgrammaticAccessGrantRequest_repository_selection + { + [EnumMember(Value = "none")] + #pragma warning disable CS1591 + None, + #pragma warning restore CS1591 + [EnumMember(Value = "all")] + #pragma warning disable CS1591 + All, + #pragma warning restore CS1591 + [EnumMember(Value = "subset")] + #pragma warning disable CS1591 + Subset, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Models/OrganizationProgrammaticAccessGrant_permissions.cs b/src/Ayllu.Github.Client/Github/Client/Models/OrganizationProgrammaticAccessGrant_permissions.cs new file mode 100644 index 0000000..bd78ebc --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/OrganizationProgrammaticAccessGrant_permissions.cs @@ -0,0 +1,86 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + /// + /// Permissions requested, categorized by type of permission. + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class OrganizationProgrammaticAccessGrant_permissions : IAdditionalDataHolder, IParsable + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The organization property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.OrganizationProgrammaticAccessGrant_permissions_organization? Organization { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.OrganizationProgrammaticAccessGrant_permissions_organization Organization { get; set; } +#endif + /// The other property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.OrganizationProgrammaticAccessGrant_permissions_other? Other { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.OrganizationProgrammaticAccessGrant_permissions_other Other { get; set; } +#endif + /// The repository property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.OrganizationProgrammaticAccessGrant_permissions_repository? Repository { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.OrganizationProgrammaticAccessGrant_permissions_repository Repository { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public OrganizationProgrammaticAccessGrant_permissions() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.OrganizationProgrammaticAccessGrant_permissions CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.OrganizationProgrammaticAccessGrant_permissions(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "organization", n => { Organization = n.GetObjectValue(global::Ayllu.Github.Client.Models.OrganizationProgrammaticAccessGrant_permissions_organization.CreateFromDiscriminatorValue); } }, + { "other", n => { Other = n.GetObjectValue(global::Ayllu.Github.Client.Models.OrganizationProgrammaticAccessGrant_permissions_other.CreateFromDiscriminatorValue); } }, + { "repository", n => { Repository = n.GetObjectValue(global::Ayllu.Github.Client.Models.OrganizationProgrammaticAccessGrant_permissions_repository.CreateFromDiscriminatorValue); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteObjectValue("organization", Organization); + writer.WriteObjectValue("other", Other); + writer.WriteObjectValue("repository", Repository); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/OrganizationProgrammaticAccessGrant_permissions_organization.cs b/src/Ayllu.Github.Client/Github/Client/Models/OrganizationProgrammaticAccessGrant_permissions_organization.cs new file mode 100644 index 0000000..db01bff --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/OrganizationProgrammaticAccessGrant_permissions_organization.cs @@ -0,0 +1,55 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class OrganizationProgrammaticAccessGrant_permissions_organization : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public OrganizationProgrammaticAccessGrant_permissions_organization() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.OrganizationProgrammaticAccessGrant_permissions_organization CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.OrganizationProgrammaticAccessGrant_permissions_organization(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/OrganizationProgrammaticAccessGrant_permissions_other.cs b/src/Ayllu.Github.Client/Github/Client/Models/OrganizationProgrammaticAccessGrant_permissions_other.cs new file mode 100644 index 0000000..6544bd3 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/OrganizationProgrammaticAccessGrant_permissions_other.cs @@ -0,0 +1,55 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class OrganizationProgrammaticAccessGrant_permissions_other : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public OrganizationProgrammaticAccessGrant_permissions_other() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.OrganizationProgrammaticAccessGrant_permissions_other CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.OrganizationProgrammaticAccessGrant_permissions_other(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/OrganizationProgrammaticAccessGrant_permissions_repository.cs b/src/Ayllu.Github.Client/Github/Client/Models/OrganizationProgrammaticAccessGrant_permissions_repository.cs new file mode 100644 index 0000000..3c14738 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/OrganizationProgrammaticAccessGrant_permissions_repository.cs @@ -0,0 +1,55 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class OrganizationProgrammaticAccessGrant_permissions_repository : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public OrganizationProgrammaticAccessGrant_permissions_repository() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.OrganizationProgrammaticAccessGrant_permissions_repository CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.OrganizationProgrammaticAccessGrant_permissions_repository(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/OrganizationProgrammaticAccessGrant_repository_selection.cs b/src/Ayllu.Github.Client/Github/Client/Models/OrganizationProgrammaticAccessGrant_repository_selection.cs new file mode 100644 index 0000000..8e6b572 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/OrganizationProgrammaticAccessGrant_repository_selection.cs @@ -0,0 +1,23 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Models +{ + /// Type of repository selection requested. + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public enum OrganizationProgrammaticAccessGrant_repository_selection + { + [EnumMember(Value = "none")] + #pragma warning disable CS1591 + None, + #pragma warning restore CS1591 + [EnumMember(Value = "all")] + #pragma warning disable CS1591 + All, + #pragma warning restore CS1591 + [EnumMember(Value = "subset")] + #pragma warning disable CS1591 + Subset, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Models/OrganizationRole.cs b/src/Ayllu.Github.Client/Github/Client/Models/OrganizationRole.cs new file mode 100644 index 0000000..6add968 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/OrganizationRole.cs @@ -0,0 +1,116 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + /// + /// Organization roles + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class OrganizationRole : IAdditionalDataHolder, IParsable + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The system role from which this role inherits permissions. + public global::Ayllu.Github.Client.Models.OrganizationRole_base_role? BaseRole { get; set; } + /// The date and time the role was created. + public DateTimeOffset? CreatedAt { get; set; } + /// A short description about who this role is for or what permissions it grants. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Description { get; set; } +#nullable restore +#else + public string Description { get; set; } +#endif + /// The unique identifier of the role. + public long? Id { get; set; } + /// The name of the role. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Name { get; set; } +#nullable restore +#else + public string Name { get; set; } +#endif + /// A GitHub user. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.NullableSimpleUser? Organization { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.NullableSimpleUser Organization { get; set; } +#endif + /// A list of permissions included in this role. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? Permissions { get; set; } +#nullable restore +#else + public List Permissions { get; set; } +#endif + /// Source answers the question, "where did this role come from?" + public global::Ayllu.Github.Client.Models.OrganizationRole_source? Source { get; set; } + /// The date and time the role was last updated. + public DateTimeOffset? UpdatedAt { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public OrganizationRole() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.OrganizationRole CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.OrganizationRole(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "base_role", n => { BaseRole = n.GetEnumValue(); } }, + { "created_at", n => { CreatedAt = n.GetDateTimeOffsetValue(); } }, + { "description", n => { Description = n.GetStringValue(); } }, + { "id", n => { Id = n.GetLongValue(); } }, + { "name", n => { Name = n.GetStringValue(); } }, + { "organization", n => { Organization = n.GetObjectValue(global::Ayllu.Github.Client.Models.NullableSimpleUser.CreateFromDiscriminatorValue); } }, + { "permissions", n => { Permissions = n.GetCollectionOfPrimitiveValues()?.AsList(); } }, + { "source", n => { Source = n.GetEnumValue(); } }, + { "updated_at", n => { UpdatedAt = n.GetDateTimeOffsetValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteEnumValue("base_role", BaseRole); + writer.WriteDateTimeOffsetValue("created_at", CreatedAt); + writer.WriteStringValue("description", Description); + writer.WriteLongValue("id", Id); + writer.WriteStringValue("name", Name); + writer.WriteObjectValue("organization", Organization); + writer.WriteCollectionOfPrimitiveValues("permissions", Permissions); + writer.WriteEnumValue("source", Source); + writer.WriteDateTimeOffsetValue("updated_at", UpdatedAt); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/OrganizationRole_base_role.cs b/src/Ayllu.Github.Client/Github/Client/Models/OrganizationRole_base_role.cs new file mode 100644 index 0000000..06a227c --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/OrganizationRole_base_role.cs @@ -0,0 +1,31 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Models +{ + /// The system role from which this role inherits permissions. + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public enum OrganizationRole_base_role + { + [EnumMember(Value = "read")] + #pragma warning disable CS1591 + Read, + #pragma warning restore CS1591 + [EnumMember(Value = "triage")] + #pragma warning disable CS1591 + Triage, + #pragma warning restore CS1591 + [EnumMember(Value = "write")] + #pragma warning disable CS1591 + Write, + #pragma warning restore CS1591 + [EnumMember(Value = "maintain")] + #pragma warning disable CS1591 + Maintain, + #pragma warning restore CS1591 + [EnumMember(Value = "admin")] + #pragma warning disable CS1591 + Admin, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Models/OrganizationRole_source.cs b/src/Ayllu.Github.Client/Github/Client/Models/OrganizationRole_source.cs new file mode 100644 index 0000000..2d8655b --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/OrganizationRole_source.cs @@ -0,0 +1,23 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Models +{ + /// Source answers the question, "where did this role come from?" + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public enum OrganizationRole_source + { + [EnumMember(Value = "Organization")] + #pragma warning disable CS1591 + Organization, + #pragma warning restore CS1591 + [EnumMember(Value = "Enterprise")] + #pragma warning disable CS1591 + Enterprise, + #pragma warning restore CS1591 + [EnumMember(Value = "Predefined")] + #pragma warning disable CS1591 + Predefined, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Models/OrganizationSecretScanningAlert.cs b/src/Ayllu.Github.Client/Github/Client/Models/OrganizationSecretScanningAlert.cs new file mode 100644 index 0000000..194c1fa --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/OrganizationSecretScanningAlert.cs @@ -0,0 +1,252 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class OrganizationSecretScanningAlert : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The time that the alert was created in ISO 8601 format: `YYYY-MM-DDTHH:MM:SSZ`. + public DateTimeOffset? CreatedAt { get; private set; } + /// Details on the location where the token was initially detected. This can be a commit, wiki commit, issue, discussion, pull request. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.NullableSecretScanningFirstDetectedLocation? FirstLocationDetected { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.NullableSecretScanningFirstDetectedLocation FirstLocationDetected { get; set; } +#endif + /// A boolean value representing whether or not the token in the alert was detected in more than one location. + public bool? HasMoreLocations { get; set; } + /// The GitHub URL of the alert resource. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? HtmlUrl { get; private set; } +#nullable restore +#else + public string HtmlUrl { get; private set; } +#endif + /// A boolean value representing whether or not alert is base64 encoded + public bool? IsBase64Encoded { get; set; } + /// The REST API URL of the code locations for this alert. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? LocationsUrl { get; set; } +#nullable restore +#else + public string LocationsUrl { get; set; } +#endif + /// Whether the detected secret was found in multiple repositories in the same organization or enterprise. + public bool? MultiRepo { get; set; } + /// The security alert number. + public int? Number { get; private set; } + /// Whether the secret was publicly leaked. + public bool? PubliclyLeaked { get; set; } + /// Whether push protection was bypassed for the detected secret. + public bool? PushProtectionBypassed { get; set; } + /// The time that push protection was bypassed in ISO 8601 format: `YYYY-MM-DDTHH:MM:SSZ`. + public DateTimeOffset? PushProtectionBypassedAt { get; set; } + /// A GitHub user. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.NullableSimpleUser? PushProtectionBypassedBy { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.NullableSimpleUser PushProtectionBypassedBy { get; set; } +#endif + /// An optional comment when requesting a push protection bypass. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? PushProtectionBypassRequestComment { get; set; } +#nullable restore +#else + public string PushProtectionBypassRequestComment { get; set; } +#endif + /// The URL to a push protection bypass request. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? PushProtectionBypassRequestHtmlUrl { get; set; } +#nullable restore +#else + public string PushProtectionBypassRequestHtmlUrl { get; set; } +#endif + /// A GitHub user. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.NullableSimpleUser? PushProtectionBypassRequestReviewer { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.NullableSimpleUser PushProtectionBypassRequestReviewer { get; set; } +#endif + /// An optional comment when reviewing a push protection bypass. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? PushProtectionBypassRequestReviewerComment { get; set; } +#nullable restore +#else + public string PushProtectionBypassRequestReviewerComment { get; set; } +#endif + /// A GitHub repository. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.SimpleRepository? Repository { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.SimpleRepository Repository { get; set; } +#endif + /// **Required when the `state` is `resolved`.** The reason for resolving the alert. + public global::Ayllu.Github.Client.Models.SecretScanningAlertResolution? Resolution { get; set; } + /// The comment that was optionally added when this alert was closed +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? ResolutionComment { get; set; } +#nullable restore +#else + public string ResolutionComment { get; set; } +#endif + /// The time that the alert was resolved in ISO 8601 format: `YYYY-MM-DDTHH:MM:SSZ`. + public DateTimeOffset? ResolvedAt { get; set; } + /// A GitHub user. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.NullableSimpleUser? ResolvedBy { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.NullableSimpleUser ResolvedBy { get; set; } +#endif + /// The secret that was detected. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Secret { get; set; } +#nullable restore +#else + public string Secret { get; set; } +#endif + /// The type of secret that secret scanning detected. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? SecretType { get; set; } +#nullable restore +#else + public string SecretType { get; set; } +#endif + /// User-friendly name for the detected secret, matching the `secret_type`.For a list of built-in patterns, see "[Supported secret scanning patterns](https://docs.github.com/code-security/secret-scanning/introduction/supported-secret-scanning-patterns#supported-secrets)." +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? SecretTypeDisplayName { get; set; } +#nullable restore +#else + public string SecretTypeDisplayName { get; set; } +#endif + /// Sets the state of the secret scanning alert. You must provide `resolution` when you set the state to `resolved`. + public global::Ayllu.Github.Client.Models.SecretScanningAlertState? State { get; set; } + /// The time that the alert was last updated in ISO 8601 format: `YYYY-MM-DDTHH:MM:SSZ`. + public DateTimeOffset? UpdatedAt { get; private set; } + /// The REST API URL of the alert resource. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Url { get; private set; } +#nullable restore +#else + public string Url { get; private set; } +#endif + /// The token status as of the latest validity check. + public global::Ayllu.Github.Client.Models.OrganizationSecretScanningAlert_validity? Validity { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public OrganizationSecretScanningAlert() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.OrganizationSecretScanningAlert CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.OrganizationSecretScanningAlert(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "created_at", n => { CreatedAt = n.GetDateTimeOffsetValue(); } }, + { "first_location_detected", n => { FirstLocationDetected = n.GetObjectValue(global::Ayllu.Github.Client.Models.NullableSecretScanningFirstDetectedLocation.CreateFromDiscriminatorValue); } }, + { "has_more_locations", n => { HasMoreLocations = n.GetBoolValue(); } }, + { "html_url", n => { HtmlUrl = n.GetStringValue(); } }, + { "is_base64_encoded", n => { IsBase64Encoded = n.GetBoolValue(); } }, + { "locations_url", n => { LocationsUrl = n.GetStringValue(); } }, + { "multi_repo", n => { MultiRepo = n.GetBoolValue(); } }, + { "number", n => { Number = n.GetIntValue(); } }, + { "publicly_leaked", n => { PubliclyLeaked = n.GetBoolValue(); } }, + { "push_protection_bypass_request_comment", n => { PushProtectionBypassRequestComment = n.GetStringValue(); } }, + { "push_protection_bypass_request_html_url", n => { PushProtectionBypassRequestHtmlUrl = n.GetStringValue(); } }, + { "push_protection_bypass_request_reviewer", n => { PushProtectionBypassRequestReviewer = n.GetObjectValue(global::Ayllu.Github.Client.Models.NullableSimpleUser.CreateFromDiscriminatorValue); } }, + { "push_protection_bypass_request_reviewer_comment", n => { PushProtectionBypassRequestReviewerComment = n.GetStringValue(); } }, + { "push_protection_bypassed", n => { PushProtectionBypassed = n.GetBoolValue(); } }, + { "push_protection_bypassed_at", n => { PushProtectionBypassedAt = n.GetDateTimeOffsetValue(); } }, + { "push_protection_bypassed_by", n => { PushProtectionBypassedBy = n.GetObjectValue(global::Ayllu.Github.Client.Models.NullableSimpleUser.CreateFromDiscriminatorValue); } }, + { "repository", n => { Repository = n.GetObjectValue(global::Ayllu.Github.Client.Models.SimpleRepository.CreateFromDiscriminatorValue); } }, + { "resolution", n => { Resolution = n.GetEnumValue(); } }, + { "resolution_comment", n => { ResolutionComment = n.GetStringValue(); } }, + { "resolved_at", n => { ResolvedAt = n.GetDateTimeOffsetValue(); } }, + { "resolved_by", n => { ResolvedBy = n.GetObjectValue(global::Ayllu.Github.Client.Models.NullableSimpleUser.CreateFromDiscriminatorValue); } }, + { "secret", n => { Secret = n.GetStringValue(); } }, + { "secret_type", n => { SecretType = n.GetStringValue(); } }, + { "secret_type_display_name", n => { SecretTypeDisplayName = n.GetStringValue(); } }, + { "state", n => { State = n.GetEnumValue(); } }, + { "updated_at", n => { UpdatedAt = n.GetDateTimeOffsetValue(); } }, + { "url", n => { Url = n.GetStringValue(); } }, + { "validity", n => { Validity = n.GetEnumValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteObjectValue("first_location_detected", FirstLocationDetected); + writer.WriteBoolValue("has_more_locations", HasMoreLocations); + writer.WriteBoolValue("is_base64_encoded", IsBase64Encoded); + writer.WriteStringValue("locations_url", LocationsUrl); + writer.WriteBoolValue("multi_repo", MultiRepo); + writer.WriteBoolValue("publicly_leaked", PubliclyLeaked); + writer.WriteBoolValue("push_protection_bypassed", PushProtectionBypassed); + writer.WriteDateTimeOffsetValue("push_protection_bypassed_at", PushProtectionBypassedAt); + writer.WriteObjectValue("push_protection_bypassed_by", PushProtectionBypassedBy); + writer.WriteStringValue("push_protection_bypass_request_comment", PushProtectionBypassRequestComment); + writer.WriteStringValue("push_protection_bypass_request_html_url", PushProtectionBypassRequestHtmlUrl); + writer.WriteObjectValue("push_protection_bypass_request_reviewer", PushProtectionBypassRequestReviewer); + writer.WriteStringValue("push_protection_bypass_request_reviewer_comment", PushProtectionBypassRequestReviewerComment); + writer.WriteObjectValue("repository", Repository); + writer.WriteEnumValue("resolution", Resolution); + writer.WriteStringValue("resolution_comment", ResolutionComment); + writer.WriteDateTimeOffsetValue("resolved_at", ResolvedAt); + writer.WriteObjectValue("resolved_by", ResolvedBy); + writer.WriteStringValue("secret", Secret); + writer.WriteStringValue("secret_type", SecretType); + writer.WriteStringValue("secret_type_display_name", SecretTypeDisplayName); + writer.WriteEnumValue("state", State); + writer.WriteEnumValue("validity", Validity); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/OrganizationSecretScanningAlert_validity.cs b/src/Ayllu.Github.Client/Github/Client/Models/OrganizationSecretScanningAlert_validity.cs new file mode 100644 index 0000000..e3e7fe7 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/OrganizationSecretScanningAlert_validity.cs @@ -0,0 +1,23 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Models +{ + /// The token status as of the latest validity check. + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public enum OrganizationSecretScanningAlert_validity + { + [EnumMember(Value = "active")] + #pragma warning disable CS1591 + Active, + #pragma warning restore CS1591 + [EnumMember(Value = "inactive")] + #pragma warning disable CS1591 + Inactive, + #pragma warning restore CS1591 + [EnumMember(Value = "unknown")] + #pragma warning disable CS1591 + Unknown, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Models/OrganizationSimple.cs b/src/Ayllu.Github.Client/Github/Client/Models/OrganizationSimple.cs new file mode 100644 index 0000000..400c25d --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/OrganizationSimple.cs @@ -0,0 +1,170 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + /// + /// A GitHub organization. + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class OrganizationSimple : IAdditionalDataHolder, IParsable + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The avatar_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? AvatarUrl { get; set; } +#nullable restore +#else + public string AvatarUrl { get; set; } +#endif + /// The description property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Description { get; set; } +#nullable restore +#else + public string Description { get; set; } +#endif + /// The events_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? EventsUrl { get; set; } +#nullable restore +#else + public string EventsUrl { get; set; } +#endif + /// The hooks_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? HooksUrl { get; set; } +#nullable restore +#else + public string HooksUrl { get; set; } +#endif + /// The id property + public int? Id { get; set; } + /// The issues_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? IssuesUrl { get; set; } +#nullable restore +#else + public string IssuesUrl { get; set; } +#endif + /// The login property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Login { get; set; } +#nullable restore +#else + public string Login { get; set; } +#endif + /// The members_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? MembersUrl { get; set; } +#nullable restore +#else + public string MembersUrl { get; set; } +#endif + /// The node_id property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? NodeId { get; set; } +#nullable restore +#else + public string NodeId { get; set; } +#endif + /// The public_members_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? PublicMembersUrl { get; set; } +#nullable restore +#else + public string PublicMembersUrl { get; set; } +#endif + /// The repos_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? ReposUrl { get; set; } +#nullable restore +#else + public string ReposUrl { get; set; } +#endif + /// The url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Url { get; set; } +#nullable restore +#else + public string Url { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public OrganizationSimple() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.OrganizationSimple CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.OrganizationSimple(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "avatar_url", n => { AvatarUrl = n.GetStringValue(); } }, + { "description", n => { Description = n.GetStringValue(); } }, + { "events_url", n => { EventsUrl = n.GetStringValue(); } }, + { "hooks_url", n => { HooksUrl = n.GetStringValue(); } }, + { "id", n => { Id = n.GetIntValue(); } }, + { "issues_url", n => { IssuesUrl = n.GetStringValue(); } }, + { "login", n => { Login = n.GetStringValue(); } }, + { "members_url", n => { MembersUrl = n.GetStringValue(); } }, + { "node_id", n => { NodeId = n.GetStringValue(); } }, + { "public_members_url", n => { PublicMembersUrl = n.GetStringValue(); } }, + { "repos_url", n => { ReposUrl = n.GetStringValue(); } }, + { "url", n => { Url = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("avatar_url", AvatarUrl); + writer.WriteStringValue("description", Description); + writer.WriteStringValue("events_url", EventsUrl); + writer.WriteStringValue("hooks_url", HooksUrl); + writer.WriteIntValue("id", Id); + writer.WriteStringValue("issues_url", IssuesUrl); + writer.WriteStringValue("login", Login); + writer.WriteStringValue("members_url", MembersUrl); + writer.WriteStringValue("node_id", NodeId); + writer.WriteStringValue("public_members_url", PublicMembersUrl); + writer.WriteStringValue("repos_url", ReposUrl); + writer.WriteStringValue("url", Url); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/OrganizationUpdateIssueType.cs b/src/Ayllu.Github.Client/Github/Client/Models/OrganizationUpdateIssueType.cs new file mode 100644 index 0000000..471e148 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/OrganizationUpdateIssueType.cs @@ -0,0 +1,83 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class OrganizationUpdateIssueType : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// Color for the issue type. + public global::Ayllu.Github.Client.Models.OrganizationUpdateIssueType_color? Color { get; set; } + /// Description of the issue type. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Description { get; set; } +#nullable restore +#else + public string Description { get; set; } +#endif + /// Whether or not the issue type is enabled at the organization level. + public bool? IsEnabled { get; set; } + /// Name of the issue type. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Name { get; set; } +#nullable restore +#else + public string Name { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public OrganizationUpdateIssueType() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.OrganizationUpdateIssueType CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.OrganizationUpdateIssueType(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "color", n => { Color = n.GetEnumValue(); } }, + { "description", n => { Description = n.GetStringValue(); } }, + { "is_enabled", n => { IsEnabled = n.GetBoolValue(); } }, + { "name", n => { Name = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteEnumValue("color", Color); + writer.WriteStringValue("description", Description); + writer.WriteBoolValue("is_enabled", IsEnabled); + writer.WriteStringValue("name", Name); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/OrganizationUpdateIssueType_color.cs b/src/Ayllu.Github.Client/Github/Client/Models/OrganizationUpdateIssueType_color.cs new file mode 100644 index 0000000..389fa78 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/OrganizationUpdateIssueType_color.cs @@ -0,0 +1,43 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Models +{ + /// Color for the issue type. + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public enum OrganizationUpdateIssueType_color + { + [EnumMember(Value = "gray")] + #pragma warning disable CS1591 + Gray, + #pragma warning restore CS1591 + [EnumMember(Value = "blue")] + #pragma warning disable CS1591 + Blue, + #pragma warning restore CS1591 + [EnumMember(Value = "green")] + #pragma warning disable CS1591 + Green, + #pragma warning restore CS1591 + [EnumMember(Value = "yellow")] + #pragma warning disable CS1591 + Yellow, + #pragma warning restore CS1591 + [EnumMember(Value = "orange")] + #pragma warning disable CS1591 + Orange, + #pragma warning restore CS1591 + [EnumMember(Value = "red")] + #pragma warning disable CS1591 + Red, + #pragma warning restore CS1591 + [EnumMember(Value = "pink")] + #pragma warning disable CS1591 + Pink, + #pragma warning restore CS1591 + [EnumMember(Value = "purple")] + #pragma warning disable CS1591 + Purple, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Models/Package.cs b/src/Ayllu.Github.Client/Github/Client/Models/Package.cs new file mode 100644 index 0000000..e0317e3 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/Package.cs @@ -0,0 +1,130 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + /// + /// A software package + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class Package : IAdditionalDataHolder, IParsable + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The created_at property + public DateTimeOffset? CreatedAt { get; set; } + /// The html_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? HtmlUrl { get; set; } +#nullable restore +#else + public string HtmlUrl { get; set; } +#endif + /// Unique identifier of the package. + public int? Id { get; set; } + /// The name of the package. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Name { get; set; } +#nullable restore +#else + public string Name { get; set; } +#endif + /// A GitHub user. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.NullableSimpleUser? Owner { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.NullableSimpleUser Owner { get; set; } +#endif + /// The package_type property + public global::Ayllu.Github.Client.Models.Package_package_type? PackageType { get; set; } + /// Minimal Repository +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.NullableMinimalRepository? Repository { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.NullableMinimalRepository Repository { get; set; } +#endif + /// The updated_at property + public DateTimeOffset? UpdatedAt { get; set; } + /// The url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Url { get; set; } +#nullable restore +#else + public string Url { get; set; } +#endif + /// The number of versions of the package. + public int? VersionCount { get; set; } + /// The visibility property + public global::Ayllu.Github.Client.Models.Package_visibility? Visibility { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public Package() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.Package CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.Package(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "created_at", n => { CreatedAt = n.GetDateTimeOffsetValue(); } }, + { "html_url", n => { HtmlUrl = n.GetStringValue(); } }, + { "id", n => { Id = n.GetIntValue(); } }, + { "name", n => { Name = n.GetStringValue(); } }, + { "owner", n => { Owner = n.GetObjectValue(global::Ayllu.Github.Client.Models.NullableSimpleUser.CreateFromDiscriminatorValue); } }, + { "package_type", n => { PackageType = n.GetEnumValue(); } }, + { "repository", n => { Repository = n.GetObjectValue(global::Ayllu.Github.Client.Models.NullableMinimalRepository.CreateFromDiscriminatorValue); } }, + { "updated_at", n => { UpdatedAt = n.GetDateTimeOffsetValue(); } }, + { "url", n => { Url = n.GetStringValue(); } }, + { "version_count", n => { VersionCount = n.GetIntValue(); } }, + { "visibility", n => { Visibility = n.GetEnumValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteDateTimeOffsetValue("created_at", CreatedAt); + writer.WriteStringValue("html_url", HtmlUrl); + writer.WriteIntValue("id", Id); + writer.WriteStringValue("name", Name); + writer.WriteObjectValue("owner", Owner); + writer.WriteEnumValue("package_type", PackageType); + writer.WriteObjectValue("repository", Repository); + writer.WriteDateTimeOffsetValue("updated_at", UpdatedAt); + writer.WriteStringValue("url", Url); + writer.WriteIntValue("version_count", VersionCount); + writer.WriteEnumValue("visibility", Visibility); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/PackageVersion.cs b/src/Ayllu.Github.Client/Github/Client/Models/PackageVersion.cs new file mode 100644 index 0000000..dad69cf --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/PackageVersion.cs @@ -0,0 +1,142 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + /// + /// A version of a software package + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class PackageVersion : IAdditionalDataHolder, IParsable + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The created_at property + public DateTimeOffset? CreatedAt { get; set; } + /// The deleted_at property + public DateTimeOffset? DeletedAt { get; set; } + /// The description property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Description { get; set; } +#nullable restore +#else + public string Description { get; set; } +#endif + /// The html_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? HtmlUrl { get; set; } +#nullable restore +#else + public string HtmlUrl { get; set; } +#endif + /// Unique identifier of the package version. + public int? Id { get; set; } + /// The license property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? License { get; set; } +#nullable restore +#else + public string License { get; set; } +#endif + /// The metadata property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.PackageVersion_metadata? Metadata { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.PackageVersion_metadata Metadata { get; set; } +#endif + /// The name of the package version. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Name { get; set; } +#nullable restore +#else + public string Name { get; set; } +#endif + /// The package_html_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? PackageHtmlUrl { get; set; } +#nullable restore +#else + public string PackageHtmlUrl { get; set; } +#endif + /// The updated_at property + public DateTimeOffset? UpdatedAt { get; set; } + /// The url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Url { get; set; } +#nullable restore +#else + public string Url { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public PackageVersion() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.PackageVersion CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.PackageVersion(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "created_at", n => { CreatedAt = n.GetDateTimeOffsetValue(); } }, + { "deleted_at", n => { DeletedAt = n.GetDateTimeOffsetValue(); } }, + { "description", n => { Description = n.GetStringValue(); } }, + { "html_url", n => { HtmlUrl = n.GetStringValue(); } }, + { "id", n => { Id = n.GetIntValue(); } }, + { "license", n => { License = n.GetStringValue(); } }, + { "metadata", n => { Metadata = n.GetObjectValue(global::Ayllu.Github.Client.Models.PackageVersion_metadata.CreateFromDiscriminatorValue); } }, + { "name", n => { Name = n.GetStringValue(); } }, + { "package_html_url", n => { PackageHtmlUrl = n.GetStringValue(); } }, + { "updated_at", n => { UpdatedAt = n.GetDateTimeOffsetValue(); } }, + { "url", n => { Url = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteDateTimeOffsetValue("created_at", CreatedAt); + writer.WriteDateTimeOffsetValue("deleted_at", DeletedAt); + writer.WriteStringValue("description", Description); + writer.WriteStringValue("html_url", HtmlUrl); + writer.WriteIntValue("id", Id); + writer.WriteStringValue("license", License); + writer.WriteObjectValue("metadata", Metadata); + writer.WriteStringValue("name", Name); + writer.WriteStringValue("package_html_url", PackageHtmlUrl); + writer.WriteDateTimeOffsetValue("updated_at", UpdatedAt); + writer.WriteStringValue("url", Url); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/PackageVersion_metadata.cs b/src/Ayllu.Github.Client/Github/Client/Models/PackageVersion_metadata.cs new file mode 100644 index 0000000..d8ea01d --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/PackageVersion_metadata.cs @@ -0,0 +1,79 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class PackageVersion_metadata : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The container property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.PackageVersion_metadata_container? Container { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.PackageVersion_metadata_container Container { get; set; } +#endif + /// The docker property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.PackageVersion_metadata_docker? Docker { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.PackageVersion_metadata_docker Docker { get; set; } +#endif + /// The package_type property + public global::Ayllu.Github.Client.Models.PackageVersion_metadata_package_type? PackageType { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public PackageVersion_metadata() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.PackageVersion_metadata CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.PackageVersion_metadata(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "container", n => { Container = n.GetObjectValue(global::Ayllu.Github.Client.Models.PackageVersion_metadata_container.CreateFromDiscriminatorValue); } }, + { "docker", n => { Docker = n.GetObjectValue(global::Ayllu.Github.Client.Models.PackageVersion_metadata_docker.CreateFromDiscriminatorValue); } }, + { "package_type", n => { PackageType = n.GetEnumValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteObjectValue("container", Container); + writer.WriteObjectValue("docker", Docker); + writer.WriteEnumValue("package_type", PackageType); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/PackageVersion_metadata_container.cs b/src/Ayllu.Github.Client/Github/Client/Models/PackageVersion_metadata_container.cs new file mode 100644 index 0000000..9b160e9 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/PackageVersion_metadata_container.cs @@ -0,0 +1,65 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class PackageVersion_metadata_container : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The tags property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? Tags { get; set; } +#nullable restore +#else + public List Tags { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public PackageVersion_metadata_container() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.PackageVersion_metadata_container CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.PackageVersion_metadata_container(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "tags", n => { Tags = n.GetCollectionOfPrimitiveValues()?.AsList(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteCollectionOfPrimitiveValues("tags", Tags); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/PackageVersion_metadata_docker.cs b/src/Ayllu.Github.Client/Github/Client/Models/PackageVersion_metadata_docker.cs new file mode 100644 index 0000000..04b8049 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/PackageVersion_metadata_docker.cs @@ -0,0 +1,65 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class PackageVersion_metadata_docker : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The tag property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? Tag { get; set; } +#nullable restore +#else + public List Tag { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public PackageVersion_metadata_docker() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.PackageVersion_metadata_docker CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.PackageVersion_metadata_docker(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "tag", n => { Tag = n.GetCollectionOfPrimitiveValues()?.AsList(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteCollectionOfPrimitiveValues("tag", Tag); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/PackageVersion_metadata_package_type.cs b/src/Ayllu.Github.Client/Github/Client/Models/PackageVersion_metadata_package_type.cs new file mode 100644 index 0000000..3c17f7b --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/PackageVersion_metadata_package_type.cs @@ -0,0 +1,36 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public enum PackageVersion_metadata_package_type + #pragma warning restore CS1591 + { + [EnumMember(Value = "npm")] + #pragma warning disable CS1591 + Npm, + #pragma warning restore CS1591 + [EnumMember(Value = "maven")] + #pragma warning disable CS1591 + Maven, + #pragma warning restore CS1591 + [EnumMember(Value = "rubygems")] + #pragma warning disable CS1591 + Rubygems, + #pragma warning restore CS1591 + [EnumMember(Value = "docker")] + #pragma warning disable CS1591 + Docker, + #pragma warning restore CS1591 + [EnumMember(Value = "nuget")] + #pragma warning disable CS1591 + Nuget, + #pragma warning restore CS1591 + [EnumMember(Value = "container")] + #pragma warning disable CS1591 + Container, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Models/Package_package_type.cs b/src/Ayllu.Github.Client/Github/Client/Models/Package_package_type.cs new file mode 100644 index 0000000..42e3542 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/Package_package_type.cs @@ -0,0 +1,36 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public enum Package_package_type + #pragma warning restore CS1591 + { + [EnumMember(Value = "npm")] + #pragma warning disable CS1591 + Npm, + #pragma warning restore CS1591 + [EnumMember(Value = "maven")] + #pragma warning disable CS1591 + Maven, + #pragma warning restore CS1591 + [EnumMember(Value = "rubygems")] + #pragma warning disable CS1591 + Rubygems, + #pragma warning restore CS1591 + [EnumMember(Value = "docker")] + #pragma warning disable CS1591 + Docker, + #pragma warning restore CS1591 + [EnumMember(Value = "nuget")] + #pragma warning disable CS1591 + Nuget, + #pragma warning restore CS1591 + [EnumMember(Value = "container")] + #pragma warning disable CS1591 + Container, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Models/Package_visibility.cs b/src/Ayllu.Github.Client/Github/Client/Models/Package_visibility.cs new file mode 100644 index 0000000..f804cc5 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/Package_visibility.cs @@ -0,0 +1,20 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public enum Package_visibility + #pragma warning restore CS1591 + { + [EnumMember(Value = "private")] + #pragma warning disable CS1591 + Private, + #pragma warning restore CS1591 + [EnumMember(Value = "public")] + #pragma warning disable CS1591 + Public, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Models/PackagesBillingUsage.cs b/src/Ayllu.Github.Client/Github/Client/Models/PackagesBillingUsage.cs new file mode 100644 index 0000000..99b2870 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/PackagesBillingUsage.cs @@ -0,0 +1,67 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class PackagesBillingUsage : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// Free storage space (GB) for GitHub Packages. + public int? IncludedGigabytesBandwidth { get; set; } + /// Sum of the free and paid storage space (GB) for GitHuub Packages. + public int? TotalGigabytesBandwidthUsed { get; set; } + /// Total paid storage space (GB) for GitHuub Packages. + public int? TotalPaidGigabytesBandwidthUsed { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public PackagesBillingUsage() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.PackagesBillingUsage CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.PackagesBillingUsage(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "included_gigabytes_bandwidth", n => { IncludedGigabytesBandwidth = n.GetIntValue(); } }, + { "total_gigabytes_bandwidth_used", n => { TotalGigabytesBandwidthUsed = n.GetIntValue(); } }, + { "total_paid_gigabytes_bandwidth_used", n => { TotalPaidGigabytesBandwidthUsed = n.GetIntValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteIntValue("included_gigabytes_bandwidth", IncludedGigabytesBandwidth); + writer.WriteIntValue("total_gigabytes_bandwidth_used", TotalGigabytesBandwidthUsed); + writer.WriteIntValue("total_paid_gigabytes_bandwidth_used", TotalPaidGigabytesBandwidthUsed); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/Page.cs b/src/Ayllu.Github.Client/Github/Client/Models/Page.cs new file mode 100644 index 0000000..e770b8e --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/Page.cs @@ -0,0 +1,134 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + /// + /// The configuration for GitHub Pages for a repository. + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class Page : IAdditionalDataHolder, IParsable + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The process in which the Page will be built. + public global::Ayllu.Github.Client.Models.Page_build_type? BuildType { get; set; } + /// The Pages site's custom domain +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Cname { get; set; } +#nullable restore +#else + public string Cname { get; set; } +#endif + /// Whether the Page has a custom 404 page. + public bool? Custom404 { get; set; } + /// The web address the Page can be accessed from. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? HtmlUrl { get; set; } +#nullable restore +#else + public string HtmlUrl { get; set; } +#endif + /// The https_certificate property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.PagesHttpsCertificate? HttpsCertificate { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.PagesHttpsCertificate HttpsCertificate { get; set; } +#endif + /// Whether https is enabled on the domain + public bool? HttpsEnforced { get; set; } + /// The timestamp when a pending domain becomes unverified. + public DateTimeOffset? PendingDomainUnverifiedAt { get; set; } + /// The state if the domain is verified + public global::Ayllu.Github.Client.Models.Page_protected_domain_state? ProtectedDomainState { get; set; } + /// 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? Public { get; set; } + /// The source property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.PagesSourceHash? Source { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.PagesSourceHash Source { get; set; } +#endif + /// The status of the most recent build of the Page. + public global::Ayllu.Github.Client.Models.Page_status? Status { get; set; } + /// The API address for accessing this Page resource. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Url { get; set; } +#nullable restore +#else + public string Url { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public Page() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.Page CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.Page(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "build_type", n => { BuildType = n.GetEnumValue(); } }, + { "cname", n => { Cname = n.GetStringValue(); } }, + { "custom_404", n => { Custom404 = n.GetBoolValue(); } }, + { "html_url", n => { HtmlUrl = n.GetStringValue(); } }, + { "https_certificate", n => { HttpsCertificate = n.GetObjectValue(global::Ayllu.Github.Client.Models.PagesHttpsCertificate.CreateFromDiscriminatorValue); } }, + { "https_enforced", n => { HttpsEnforced = n.GetBoolValue(); } }, + { "pending_domain_unverified_at", n => { PendingDomainUnverifiedAt = n.GetDateTimeOffsetValue(); } }, + { "protected_domain_state", n => { ProtectedDomainState = n.GetEnumValue(); } }, + { "public", n => { Public = n.GetBoolValue(); } }, + { "source", n => { Source = n.GetObjectValue(global::Ayllu.Github.Client.Models.PagesSourceHash.CreateFromDiscriminatorValue); } }, + { "status", n => { Status = n.GetEnumValue(); } }, + { "url", n => { Url = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteEnumValue("build_type", BuildType); + writer.WriteStringValue("cname", Cname); + writer.WriteBoolValue("custom_404", Custom404); + writer.WriteStringValue("html_url", HtmlUrl); + writer.WriteObjectValue("https_certificate", HttpsCertificate); + writer.WriteBoolValue("https_enforced", HttpsEnforced); + writer.WriteDateTimeOffsetValue("pending_domain_unverified_at", PendingDomainUnverifiedAt); + writer.WriteEnumValue("protected_domain_state", ProtectedDomainState); + writer.WriteBoolValue("public", Public); + writer.WriteObjectValue("source", Source); + writer.WriteEnumValue("status", Status); + writer.WriteStringValue("url", Url); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/PageBuild.cs b/src/Ayllu.Github.Client/Github/Client/Models/PageBuild.cs new file mode 100644 index 0000000..4ddc172 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/PageBuild.cs @@ -0,0 +1,118 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + /// + /// Page Build + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class PageBuild : IAdditionalDataHolder, IParsable + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The commit property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Commit { get; set; } +#nullable restore +#else + public string Commit { get; set; } +#endif + /// The created_at property + public DateTimeOffset? CreatedAt { get; set; } + /// The duration property + public int? Duration { get; set; } + /// The error property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.PageBuild_error? Error { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.PageBuild_error Error { get; set; } +#endif + /// A GitHub user. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.NullableSimpleUser? Pusher { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.NullableSimpleUser Pusher { get; set; } +#endif + /// The status property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Status { get; set; } +#nullable restore +#else + public string Status { get; set; } +#endif + /// The updated_at property + public DateTimeOffset? UpdatedAt { get; set; } + /// The url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Url { get; set; } +#nullable restore +#else + public string Url { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public PageBuild() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.PageBuild CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.PageBuild(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "commit", n => { Commit = n.GetStringValue(); } }, + { "created_at", n => { CreatedAt = n.GetDateTimeOffsetValue(); } }, + { "duration", n => { Duration = n.GetIntValue(); } }, + { "error", n => { Error = n.GetObjectValue(global::Ayllu.Github.Client.Models.PageBuild_error.CreateFromDiscriminatorValue); } }, + { "pusher", n => { Pusher = n.GetObjectValue(global::Ayllu.Github.Client.Models.NullableSimpleUser.CreateFromDiscriminatorValue); } }, + { "status", n => { Status = n.GetStringValue(); } }, + { "updated_at", n => { UpdatedAt = n.GetDateTimeOffsetValue(); } }, + { "url", n => { Url = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("commit", Commit); + writer.WriteDateTimeOffsetValue("created_at", CreatedAt); + writer.WriteIntValue("duration", Duration); + writer.WriteObjectValue("error", Error); + writer.WriteObjectValue("pusher", Pusher); + writer.WriteStringValue("status", Status); + writer.WriteDateTimeOffsetValue("updated_at", UpdatedAt); + writer.WriteStringValue("url", Url); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/PageBuildStatus.cs b/src/Ayllu.Github.Client/Github/Client/Models/PageBuildStatus.cs new file mode 100644 index 0000000..c4216e7 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/PageBuildStatus.cs @@ -0,0 +1,76 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + /// + /// Page Build Status + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class PageBuildStatus : IAdditionalDataHolder, IParsable + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The status property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Status { get; set; } +#nullable restore +#else + public string Status { get; set; } +#endif + /// The url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Url { get; set; } +#nullable restore +#else + public string Url { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public PageBuildStatus() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.PageBuildStatus CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.PageBuildStatus(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "status", n => { Status = n.GetStringValue(); } }, + { "url", n => { Url = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("status", Status); + writer.WriteStringValue("url", Url); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/PageBuild_error.cs b/src/Ayllu.Github.Client/Github/Client/Models/PageBuild_error.cs new file mode 100644 index 0000000..863c5ed --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/PageBuild_error.cs @@ -0,0 +1,65 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class PageBuild_error : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The message property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Message { get; set; } +#nullable restore +#else + public string Message { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public PageBuild_error() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.PageBuild_error CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.PageBuild_error(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "message", n => { Message = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("message", Message); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/PageDeployment.cs b/src/Ayllu.Github.Client/Github/Client/Models/PageDeployment.cs new file mode 100644 index 0000000..147b156 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/PageDeployment.cs @@ -0,0 +1,157 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + /// + /// The GitHub Pages deployment status. + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class PageDeployment : IAdditionalDataHolder, IParsable + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The ID of the GitHub Pages deployment. This is the Git SHA of the deployed commit. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.PageDeployment.PageDeployment_id? Id { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.PageDeployment.PageDeployment_id Id { get; set; } +#endif + /// The URI to the deployed GitHub Pages. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? PageUrl { get; set; } +#nullable restore +#else + public string PageUrl { get; set; } +#endif + /// The URI to the deployed GitHub Pages preview. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? PreviewUrl { get; set; } +#nullable restore +#else + public string PreviewUrl { get; set; } +#endif + /// The URI to monitor GitHub Pages deployment status. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? StatusUrl { get; set; } +#nullable restore +#else + public string StatusUrl { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public PageDeployment() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.PageDeployment CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.PageDeployment(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "id", n => { Id = n.GetObjectValue(global::Ayllu.Github.Client.Models.PageDeployment.PageDeployment_id.CreateFromDiscriminatorValue); } }, + { "page_url", n => { PageUrl = n.GetStringValue(); } }, + { "preview_url", n => { PreviewUrl = n.GetStringValue(); } }, + { "status_url", n => { StatusUrl = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteObjectValue("id", Id); + writer.WriteStringValue("page_url", PageUrl); + writer.WriteStringValue("preview_url", PreviewUrl); + writer.WriteStringValue("status_url", StatusUrl); + writer.WriteAdditionalData(AdditionalData); + } + /// + /// Composed type wrapper for classes , + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class PageDeployment_id : IComposedTypeWrapper, IParsable + { + /// Composed type representation for type + public int? Integer { get; set; } + /// Composed type representation for type +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? String { get; set; } +#nullable restore +#else + public string String { get; set; } +#endif + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.PageDeployment.PageDeployment_id CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + var mappingValue = parseNode.GetChildNode("")?.GetStringValue(); + var result = new global::Ayllu.Github.Client.Models.PageDeployment.PageDeployment_id(); + if(parseNode.GetIntValue() is int integerValue) + { + result.Integer = integerValue; + } + else if(parseNode.GetStringValue() is string stringValue) + { + result.String = stringValue; + } + return result; + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary>(); + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(Integer != null) + { + writer.WriteIntValue(null, Integer); + } + else if(String != null) + { + writer.WriteStringValue(null, String); + } + } + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/Page_build_type.cs b/src/Ayllu.Github.Client/Github/Client/Models/Page_build_type.cs new file mode 100644 index 0000000..afb6b2f --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/Page_build_type.cs @@ -0,0 +1,19 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Models +{ + /// The process in which the Page will be built. + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public enum Page_build_type + { + [EnumMember(Value = "legacy")] + #pragma warning disable CS1591 + Legacy, + #pragma warning restore CS1591 + [EnumMember(Value = "workflow")] + #pragma warning disable CS1591 + Workflow, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Models/Page_protected_domain_state.cs b/src/Ayllu.Github.Client/Github/Client/Models/Page_protected_domain_state.cs new file mode 100644 index 0000000..143a393 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/Page_protected_domain_state.cs @@ -0,0 +1,23 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Models +{ + /// The state if the domain is verified + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public enum Page_protected_domain_state + { + [EnumMember(Value = "pending")] + #pragma warning disable CS1591 + Pending, + #pragma warning restore CS1591 + [EnumMember(Value = "verified")] + #pragma warning disable CS1591 + Verified, + #pragma warning restore CS1591 + [EnumMember(Value = "unverified")] + #pragma warning disable CS1591 + Unverified, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Models/Page_status.cs b/src/Ayllu.Github.Client/Github/Client/Models/Page_status.cs new file mode 100644 index 0000000..9013d6e --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/Page_status.cs @@ -0,0 +1,23 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Models +{ + /// The status of the most recent build of the Page. + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public enum Page_status + { + [EnumMember(Value = "built")] + #pragma warning disable CS1591 + Built, + #pragma warning restore CS1591 + [EnumMember(Value = "building")] + #pragma warning disable CS1591 + Building, + #pragma warning restore CS1591 + [EnumMember(Value = "errored")] + #pragma warning disable CS1591 + Errored, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Models/PagesDeploymentStatus.cs b/src/Ayllu.Github.Client/Github/Client/Models/PagesDeploymentStatus.cs new file mode 100644 index 0000000..1e5266b --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/PagesDeploymentStatus.cs @@ -0,0 +1,59 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class PagesDeploymentStatus : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The current status of the deployment. + public global::Ayllu.Github.Client.Models.PagesDeploymentStatus_status? Status { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public PagesDeploymentStatus() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.PagesDeploymentStatus CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.PagesDeploymentStatus(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "status", n => { Status = n.GetEnumValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteEnumValue("status", Status); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/PagesDeploymentStatus_status.cs b/src/Ayllu.Github.Client/Github/Client/Models/PagesDeploymentStatus_status.cs new file mode 100644 index 0000000..63ee50d --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/PagesDeploymentStatus_status.cs @@ -0,0 +1,55 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Models +{ + /// The current status of the deployment. + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public enum PagesDeploymentStatus_status + { + [EnumMember(Value = "deployment_in_progress")] + #pragma warning disable CS1591 + Deployment_in_progress, + #pragma warning restore CS1591 + [EnumMember(Value = "syncing_files")] + #pragma warning disable CS1591 + Syncing_files, + #pragma warning restore CS1591 + [EnumMember(Value = "finished_file_sync")] + #pragma warning disable CS1591 + Finished_file_sync, + #pragma warning restore CS1591 + [EnumMember(Value = "updating_pages")] + #pragma warning disable CS1591 + Updating_pages, + #pragma warning restore CS1591 + [EnumMember(Value = "purging_cdn")] + #pragma warning disable CS1591 + Purging_cdn, + #pragma warning restore CS1591 + [EnumMember(Value = "deployment_cancelled")] + #pragma warning disable CS1591 + Deployment_cancelled, + #pragma warning restore CS1591 + [EnumMember(Value = "deployment_failed")] + #pragma warning disable CS1591 + Deployment_failed, + #pragma warning restore CS1591 + [EnumMember(Value = "deployment_content_failed")] + #pragma warning disable CS1591 + Deployment_content_failed, + #pragma warning restore CS1591 + [EnumMember(Value = "deployment_attempt_error")] + #pragma warning disable CS1591 + Deployment_attempt_error, + #pragma warning restore CS1591 + [EnumMember(Value = "deployment_lost")] + #pragma warning disable CS1591 + Deployment_lost, + #pragma warning restore CS1591 + [EnumMember(Value = "succeed")] + #pragma warning disable CS1591 + Succeed, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Models/PagesHealthCheck.cs b/src/Ayllu.Github.Client/Github/Client/Models/PagesHealthCheck.cs new file mode 100644 index 0000000..41bcbdf --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/PagesHealthCheck.cs @@ -0,0 +1,76 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + /// + /// Pages Health Check Status + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class PagesHealthCheck : IAdditionalDataHolder, IParsable + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The alt_domain property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.PagesHealthCheck_alt_domain? AltDomain { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.PagesHealthCheck_alt_domain AltDomain { get; set; } +#endif + /// The domain property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.PagesHealthCheck_domain? Domain { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.PagesHealthCheck_domain Domain { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public PagesHealthCheck() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.PagesHealthCheck CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.PagesHealthCheck(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "alt_domain", n => { AltDomain = n.GetObjectValue(global::Ayllu.Github.Client.Models.PagesHealthCheck_alt_domain.CreateFromDiscriminatorValue); } }, + { "domain", n => { Domain = n.GetObjectValue(global::Ayllu.Github.Client.Models.PagesHealthCheck_domain.CreateFromDiscriminatorValue); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteObjectValue("alt_domain", AltDomain); + writer.WriteObjectValue("domain", Domain); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/PagesHealthCheck_alt_domain.cs b/src/Ayllu.Github.Client/Github/Client/Models/PagesHealthCheck_alt_domain.cs new file mode 100644 index 0000000..839415c --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/PagesHealthCheck_alt_domain.cs @@ -0,0 +1,203 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class PagesHealthCheck_alt_domain : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The caa_error property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? CaaError { get; set; } +#nullable restore +#else + public string CaaError { get; set; } +#endif + /// The dns_resolves property + public bool? DnsResolves { get; set; } + /// The enforces_https property + public bool? EnforcesHttps { get; set; } + /// The has_cname_record property + public bool? HasCnameRecord { get; set; } + /// The has_mx_records_present property + public bool? HasMxRecordsPresent { get; set; } + /// The host property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Host { get; set; } +#nullable restore +#else + public string Host { get; set; } +#endif + /// The https_error property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? HttpsError { get; set; } +#nullable restore +#else + public string HttpsError { get; set; } +#endif + /// The is_apex_domain property + public bool? IsApexDomain { get; set; } + /// The is_a_record property + public bool? IsARecord { get; set; } + /// The is_cloudflare_ip property + public bool? IsCloudflareIp { get; set; } + /// The is_cname_to_fastly property + public bool? IsCnameToFastly { get; set; } + /// The is_cname_to_github_user_domain property + public bool? IsCnameToGithubUserDomain { get; set; } + /// The is_cname_to_pages_dot_github_dot_com property + public bool? IsCnameToPagesDotGithubDotCom { get; set; } + /// The is_fastly_ip property + public bool? IsFastlyIp { get; set; } + /// The is_https_eligible property + public bool? IsHttpsEligible { get; set; } + /// The is_non_github_pages_ip_present property + public bool? IsNonGithubPagesIpPresent { get; set; } + /// The is_old_ip_address property + public bool? IsOldIpAddress { get; set; } + /// The is_pages_domain property + public bool? IsPagesDomain { get; set; } + /// The is_pointed_to_github_pages_ip property + public bool? IsPointedToGithubPagesIp { get; set; } + /// The is_proxied property + public bool? IsProxied { get; set; } + /// The is_served_by_pages property + public bool? IsServedByPages { get; set; } + /// The is_valid property + public bool? IsValid { get; set; } + /// The is_valid_domain property + public bool? IsValidDomain { get; set; } + /// The nameservers property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Nameservers { get; set; } +#nullable restore +#else + public string Nameservers { get; set; } +#endif + /// The reason property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Reason { get; set; } +#nullable restore +#else + public string Reason { get; set; } +#endif + /// The responds_to_https property + public bool? RespondsToHttps { get; set; } + /// The should_be_a_record property + public bool? ShouldBeARecord { get; set; } + /// The uri property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Uri { get; set; } +#nullable restore +#else + public string Uri { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public PagesHealthCheck_alt_domain() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.PagesHealthCheck_alt_domain CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.PagesHealthCheck_alt_domain(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "caa_error", n => { CaaError = n.GetStringValue(); } }, + { "dns_resolves", n => { DnsResolves = n.GetBoolValue(); } }, + { "enforces_https", n => { EnforcesHttps = n.GetBoolValue(); } }, + { "has_cname_record", n => { HasCnameRecord = n.GetBoolValue(); } }, + { "has_mx_records_present", n => { HasMxRecordsPresent = n.GetBoolValue(); } }, + { "host", n => { Host = n.GetStringValue(); } }, + { "https_error", n => { HttpsError = n.GetStringValue(); } }, + { "is_a_record", n => { IsARecord = n.GetBoolValue(); } }, + { "is_apex_domain", n => { IsApexDomain = n.GetBoolValue(); } }, + { "is_cloudflare_ip", n => { IsCloudflareIp = n.GetBoolValue(); } }, + { "is_cname_to_fastly", n => { IsCnameToFastly = n.GetBoolValue(); } }, + { "is_cname_to_github_user_domain", n => { IsCnameToGithubUserDomain = n.GetBoolValue(); } }, + { "is_cname_to_pages_dot_github_dot_com", n => { IsCnameToPagesDotGithubDotCom = n.GetBoolValue(); } }, + { "is_fastly_ip", n => { IsFastlyIp = n.GetBoolValue(); } }, + { "is_https_eligible", n => { IsHttpsEligible = n.GetBoolValue(); } }, + { "is_non_github_pages_ip_present", n => { IsNonGithubPagesIpPresent = n.GetBoolValue(); } }, + { "is_old_ip_address", n => { IsOldIpAddress = n.GetBoolValue(); } }, + { "is_pages_domain", n => { IsPagesDomain = n.GetBoolValue(); } }, + { "is_pointed_to_github_pages_ip", n => { IsPointedToGithubPagesIp = n.GetBoolValue(); } }, + { "is_proxied", n => { IsProxied = n.GetBoolValue(); } }, + { "is_served_by_pages", n => { IsServedByPages = n.GetBoolValue(); } }, + { "is_valid", n => { IsValid = n.GetBoolValue(); } }, + { "is_valid_domain", n => { IsValidDomain = n.GetBoolValue(); } }, + { "nameservers", n => { Nameservers = n.GetStringValue(); } }, + { "reason", n => { Reason = n.GetStringValue(); } }, + { "responds_to_https", n => { RespondsToHttps = n.GetBoolValue(); } }, + { "should_be_a_record", n => { ShouldBeARecord = n.GetBoolValue(); } }, + { "uri", n => { Uri = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("caa_error", CaaError); + writer.WriteBoolValue("dns_resolves", DnsResolves); + writer.WriteBoolValue("enforces_https", EnforcesHttps); + writer.WriteBoolValue("has_cname_record", HasCnameRecord); + writer.WriteBoolValue("has_mx_records_present", HasMxRecordsPresent); + writer.WriteStringValue("host", Host); + writer.WriteStringValue("https_error", HttpsError); + writer.WriteBoolValue("is_apex_domain", IsApexDomain); + writer.WriteBoolValue("is_a_record", IsARecord); + writer.WriteBoolValue("is_cloudflare_ip", IsCloudflareIp); + writer.WriteBoolValue("is_cname_to_fastly", IsCnameToFastly); + writer.WriteBoolValue("is_cname_to_github_user_domain", IsCnameToGithubUserDomain); + writer.WriteBoolValue("is_cname_to_pages_dot_github_dot_com", IsCnameToPagesDotGithubDotCom); + writer.WriteBoolValue("is_fastly_ip", IsFastlyIp); + writer.WriteBoolValue("is_https_eligible", IsHttpsEligible); + writer.WriteBoolValue("is_non_github_pages_ip_present", IsNonGithubPagesIpPresent); + writer.WriteBoolValue("is_old_ip_address", IsOldIpAddress); + writer.WriteBoolValue("is_pages_domain", IsPagesDomain); + writer.WriteBoolValue("is_pointed_to_github_pages_ip", IsPointedToGithubPagesIp); + writer.WriteBoolValue("is_proxied", IsProxied); + writer.WriteBoolValue("is_served_by_pages", IsServedByPages); + writer.WriteBoolValue("is_valid", IsValid); + writer.WriteBoolValue("is_valid_domain", IsValidDomain); + writer.WriteStringValue("nameservers", Nameservers); + writer.WriteStringValue("reason", Reason); + writer.WriteBoolValue("responds_to_https", RespondsToHttps); + writer.WriteBoolValue("should_be_a_record", ShouldBeARecord); + writer.WriteStringValue("uri", Uri); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/PagesHealthCheck_domain.cs b/src/Ayllu.Github.Client/Github/Client/Models/PagesHealthCheck_domain.cs new file mode 100644 index 0000000..8a921c2 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/PagesHealthCheck_domain.cs @@ -0,0 +1,203 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class PagesHealthCheck_domain : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The caa_error property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? CaaError { get; set; } +#nullable restore +#else + public string CaaError { get; set; } +#endif + /// The dns_resolves property + public bool? DnsResolves { get; set; } + /// The enforces_https property + public bool? EnforcesHttps { get; set; } + /// The has_cname_record property + public bool? HasCnameRecord { get; set; } + /// The has_mx_records_present property + public bool? HasMxRecordsPresent { get; set; } + /// The host property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Host { get; set; } +#nullable restore +#else + public string Host { get; set; } +#endif + /// The https_error property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? HttpsError { get; set; } +#nullable restore +#else + public string HttpsError { get; set; } +#endif + /// The is_apex_domain property + public bool? IsApexDomain { get; set; } + /// The is_a_record property + public bool? IsARecord { get; set; } + /// The is_cloudflare_ip property + public bool? IsCloudflareIp { get; set; } + /// The is_cname_to_fastly property + public bool? IsCnameToFastly { get; set; } + /// The is_cname_to_github_user_domain property + public bool? IsCnameToGithubUserDomain { get; set; } + /// The is_cname_to_pages_dot_github_dot_com property + public bool? IsCnameToPagesDotGithubDotCom { get; set; } + /// The is_fastly_ip property + public bool? IsFastlyIp { get; set; } + /// The is_https_eligible property + public bool? IsHttpsEligible { get; set; } + /// The is_non_github_pages_ip_present property + public bool? IsNonGithubPagesIpPresent { get; set; } + /// The is_old_ip_address property + public bool? IsOldIpAddress { get; set; } + /// The is_pages_domain property + public bool? IsPagesDomain { get; set; } + /// The is_pointed_to_github_pages_ip property + public bool? IsPointedToGithubPagesIp { get; set; } + /// The is_proxied property + public bool? IsProxied { get; set; } + /// The is_served_by_pages property + public bool? IsServedByPages { get; set; } + /// The is_valid property + public bool? IsValid { get; set; } + /// The is_valid_domain property + public bool? IsValidDomain { get; set; } + /// The nameservers property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Nameservers { get; set; } +#nullable restore +#else + public string Nameservers { get; set; } +#endif + /// The reason property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Reason { get; set; } +#nullable restore +#else + public string Reason { get; set; } +#endif + /// The responds_to_https property + public bool? RespondsToHttps { get; set; } + /// The should_be_a_record property + public bool? ShouldBeARecord { get; set; } + /// The uri property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Uri { get; set; } +#nullable restore +#else + public string Uri { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public PagesHealthCheck_domain() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.PagesHealthCheck_domain CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.PagesHealthCheck_domain(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "caa_error", n => { CaaError = n.GetStringValue(); } }, + { "dns_resolves", n => { DnsResolves = n.GetBoolValue(); } }, + { "enforces_https", n => { EnforcesHttps = n.GetBoolValue(); } }, + { "has_cname_record", n => { HasCnameRecord = n.GetBoolValue(); } }, + { "has_mx_records_present", n => { HasMxRecordsPresent = n.GetBoolValue(); } }, + { "host", n => { Host = n.GetStringValue(); } }, + { "https_error", n => { HttpsError = n.GetStringValue(); } }, + { "is_a_record", n => { IsARecord = n.GetBoolValue(); } }, + { "is_apex_domain", n => { IsApexDomain = n.GetBoolValue(); } }, + { "is_cloudflare_ip", n => { IsCloudflareIp = n.GetBoolValue(); } }, + { "is_cname_to_fastly", n => { IsCnameToFastly = n.GetBoolValue(); } }, + { "is_cname_to_github_user_domain", n => { IsCnameToGithubUserDomain = n.GetBoolValue(); } }, + { "is_cname_to_pages_dot_github_dot_com", n => { IsCnameToPagesDotGithubDotCom = n.GetBoolValue(); } }, + { "is_fastly_ip", n => { IsFastlyIp = n.GetBoolValue(); } }, + { "is_https_eligible", n => { IsHttpsEligible = n.GetBoolValue(); } }, + { "is_non_github_pages_ip_present", n => { IsNonGithubPagesIpPresent = n.GetBoolValue(); } }, + { "is_old_ip_address", n => { IsOldIpAddress = n.GetBoolValue(); } }, + { "is_pages_domain", n => { IsPagesDomain = n.GetBoolValue(); } }, + { "is_pointed_to_github_pages_ip", n => { IsPointedToGithubPagesIp = n.GetBoolValue(); } }, + { "is_proxied", n => { IsProxied = n.GetBoolValue(); } }, + { "is_served_by_pages", n => { IsServedByPages = n.GetBoolValue(); } }, + { "is_valid", n => { IsValid = n.GetBoolValue(); } }, + { "is_valid_domain", n => { IsValidDomain = n.GetBoolValue(); } }, + { "nameservers", n => { Nameservers = n.GetStringValue(); } }, + { "reason", n => { Reason = n.GetStringValue(); } }, + { "responds_to_https", n => { RespondsToHttps = n.GetBoolValue(); } }, + { "should_be_a_record", n => { ShouldBeARecord = n.GetBoolValue(); } }, + { "uri", n => { Uri = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("caa_error", CaaError); + writer.WriteBoolValue("dns_resolves", DnsResolves); + writer.WriteBoolValue("enforces_https", EnforcesHttps); + writer.WriteBoolValue("has_cname_record", HasCnameRecord); + writer.WriteBoolValue("has_mx_records_present", HasMxRecordsPresent); + writer.WriteStringValue("host", Host); + writer.WriteStringValue("https_error", HttpsError); + writer.WriteBoolValue("is_apex_domain", IsApexDomain); + writer.WriteBoolValue("is_a_record", IsARecord); + writer.WriteBoolValue("is_cloudflare_ip", IsCloudflareIp); + writer.WriteBoolValue("is_cname_to_fastly", IsCnameToFastly); + writer.WriteBoolValue("is_cname_to_github_user_domain", IsCnameToGithubUserDomain); + writer.WriteBoolValue("is_cname_to_pages_dot_github_dot_com", IsCnameToPagesDotGithubDotCom); + writer.WriteBoolValue("is_fastly_ip", IsFastlyIp); + writer.WriteBoolValue("is_https_eligible", IsHttpsEligible); + writer.WriteBoolValue("is_non_github_pages_ip_present", IsNonGithubPagesIpPresent); + writer.WriteBoolValue("is_old_ip_address", IsOldIpAddress); + writer.WriteBoolValue("is_pages_domain", IsPagesDomain); + writer.WriteBoolValue("is_pointed_to_github_pages_ip", IsPointedToGithubPagesIp); + writer.WriteBoolValue("is_proxied", IsProxied); + writer.WriteBoolValue("is_served_by_pages", IsServedByPages); + writer.WriteBoolValue("is_valid", IsValid); + writer.WriteBoolValue("is_valid_domain", IsValidDomain); + writer.WriteStringValue("nameservers", Nameservers); + writer.WriteStringValue("reason", Reason); + writer.WriteBoolValue("responds_to_https", RespondsToHttps); + writer.WriteBoolValue("should_be_a_record", ShouldBeARecord); + writer.WriteStringValue("uri", Uri); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/PagesHttpsCertificate.cs b/src/Ayllu.Github.Client/Github/Client/Models/PagesHttpsCertificate.cs new file mode 100644 index 0000000..03571a3 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/PagesHttpsCertificate.cs @@ -0,0 +1,84 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class PagesHttpsCertificate : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The description property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Description { get; set; } +#nullable restore +#else + public string Description { get; set; } +#endif + /// Array of the domain set and its alternate name (if it is configured) +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? Domains { get; set; } +#nullable restore +#else + public List Domains { get; set; } +#endif + /// The expires_at property + public Date? ExpiresAt { get; set; } + /// The state property + public global::Ayllu.Github.Client.Models.PagesHttpsCertificate_state? State { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public PagesHttpsCertificate() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.PagesHttpsCertificate CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.PagesHttpsCertificate(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "description", n => { Description = n.GetStringValue(); } }, + { "domains", n => { Domains = n.GetCollectionOfPrimitiveValues()?.AsList(); } }, + { "expires_at", n => { ExpiresAt = n.GetDateValue(); } }, + { "state", n => { State = n.GetEnumValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("description", Description); + writer.WriteCollectionOfPrimitiveValues("domains", Domains); + writer.WriteDateValue("expires_at", ExpiresAt); + writer.WriteEnumValue("state", State); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/PagesHttpsCertificate_state.cs b/src/Ayllu.Github.Client/Github/Client/Models/PagesHttpsCertificate_state.cs new file mode 100644 index 0000000..0b6c1ef --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/PagesHttpsCertificate_state.cs @@ -0,0 +1,60 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public enum PagesHttpsCertificate_state + #pragma warning restore CS1591 + { + [EnumMember(Value = "new")] + #pragma warning disable CS1591 + New, + #pragma warning restore CS1591 + [EnumMember(Value = "authorization_created")] + #pragma warning disable CS1591 + Authorization_created, + #pragma warning restore CS1591 + [EnumMember(Value = "authorization_pending")] + #pragma warning disable CS1591 + Authorization_pending, + #pragma warning restore CS1591 + [EnumMember(Value = "authorized")] + #pragma warning disable CS1591 + Authorized, + #pragma warning restore CS1591 + [EnumMember(Value = "authorization_revoked")] + #pragma warning disable CS1591 + Authorization_revoked, + #pragma warning restore CS1591 + [EnumMember(Value = "issued")] + #pragma warning disable CS1591 + Issued, + #pragma warning restore CS1591 + [EnumMember(Value = "uploaded")] + #pragma warning disable CS1591 + Uploaded, + #pragma warning restore CS1591 + [EnumMember(Value = "approved")] + #pragma warning disable CS1591 + Approved, + #pragma warning restore CS1591 + [EnumMember(Value = "errored")] + #pragma warning disable CS1591 + Errored, + #pragma warning restore CS1591 + [EnumMember(Value = "bad_authz")] + #pragma warning disable CS1591 + Bad_authz, + #pragma warning restore CS1591 + [EnumMember(Value = "destroy_pending")] + #pragma warning disable CS1591 + Destroy_pending, + #pragma warning restore CS1591 + [EnumMember(Value = "dns_changed")] + #pragma warning disable CS1591 + Dns_changed, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Models/PagesSourceHash.cs b/src/Ayllu.Github.Client/Github/Client/Models/PagesSourceHash.cs new file mode 100644 index 0000000..4ebaf7f --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/PagesSourceHash.cs @@ -0,0 +1,75 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class PagesSourceHash : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The branch property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Branch { get; set; } +#nullable restore +#else + public string Branch { get; set; } +#endif + /// The path property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Path { get; set; } +#nullable restore +#else + public string Path { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public PagesSourceHash() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.PagesSourceHash CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.PagesSourceHash(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "branch", n => { Branch = n.GetStringValue(); } }, + { "path", n => { Path = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("branch", Branch); + writer.WriteStringValue("path", Path); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/ParticipationStats.cs b/src/Ayllu.Github.Client/Github/Client/Models/ParticipationStats.cs new file mode 100644 index 0000000..ceef95a --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/ParticipationStats.cs @@ -0,0 +1,75 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class ParticipationStats : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The all property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? All { get; set; } +#nullable restore +#else + public List All { get; set; } +#endif + /// The owner property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? Owner { get; set; } +#nullable restore +#else + public List Owner { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public ParticipationStats() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.ParticipationStats CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.ParticipationStats(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "all", n => { All = n.GetCollectionOfPrimitiveValues()?.AsList(); } }, + { "owner", n => { Owner = n.GetCollectionOfPrimitiveValues()?.AsList(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteCollectionOfPrimitiveValues("all", All); + writer.WriteCollectionOfPrimitiveValues("owner", Owner); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/PendingDeployment.cs b/src/Ayllu.Github.Client/Github/Client/Models/PendingDeployment.cs new file mode 100644 index 0000000..9f41536 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/PendingDeployment.cs @@ -0,0 +1,88 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + /// + /// Details of a deployment that is waiting for protection rules to pass + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class PendingDeployment : IAdditionalDataHolder, IParsable + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// Whether the currently authenticated user can approve the deployment + public bool? CurrentUserCanApprove { get; set; } + /// The environment property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.PendingDeployment_environment? Environment { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.PendingDeployment_environment Environment { get; set; } +#endif + /// 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. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? Reviewers { get; set; } +#nullable restore +#else + public List Reviewers { get; set; } +#endif + /// The set duration of the wait timer + public int? WaitTimer { get; set; } + /// The time that the wait timer began. + public DateTimeOffset? WaitTimerStartedAt { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public PendingDeployment() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.PendingDeployment CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.PendingDeployment(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "current_user_can_approve", n => { CurrentUserCanApprove = n.GetBoolValue(); } }, + { "environment", n => { Environment = n.GetObjectValue(global::Ayllu.Github.Client.Models.PendingDeployment_environment.CreateFromDiscriminatorValue); } }, + { "reviewers", n => { Reviewers = n.GetCollectionOfObjectValues(global::Ayllu.Github.Client.Models.PendingDeployment_reviewers.CreateFromDiscriminatorValue)?.AsList(); } }, + { "wait_timer", n => { WaitTimer = n.GetIntValue(); } }, + { "wait_timer_started_at", n => { WaitTimerStartedAt = n.GetDateTimeOffsetValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteBoolValue("current_user_can_approve", CurrentUserCanApprove); + writer.WriteObjectValue("environment", Environment); + writer.WriteCollectionOfObjectValues("reviewers", Reviewers); + writer.WriteIntValue("wait_timer", WaitTimer); + writer.WriteDateTimeOffsetValue("wait_timer_started_at", WaitTimerStartedAt); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/PendingDeployment_environment.cs b/src/Ayllu.Github.Client/Github/Client/Models/PendingDeployment_environment.cs new file mode 100644 index 0000000..31d9bba --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/PendingDeployment_environment.cs @@ -0,0 +1,99 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class PendingDeployment_environment : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The html_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? HtmlUrl { get; set; } +#nullable restore +#else + public string HtmlUrl { get; set; } +#endif + /// The id of the environment. + public long? Id { get; set; } + /// The name of the environment. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Name { get; set; } +#nullable restore +#else + public string Name { get; set; } +#endif + /// The node_id property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? NodeId { get; set; } +#nullable restore +#else + public string NodeId { get; set; } +#endif + /// The url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Url { get; set; } +#nullable restore +#else + public string Url { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public PendingDeployment_environment() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.PendingDeployment_environment CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.PendingDeployment_environment(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "html_url", n => { HtmlUrl = n.GetStringValue(); } }, + { "id", n => { Id = n.GetLongValue(); } }, + { "name", n => { Name = n.GetStringValue(); } }, + { "node_id", n => { NodeId = n.GetStringValue(); } }, + { "url", n => { Url = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("html_url", HtmlUrl); + writer.WriteLongValue("id", Id); + writer.WriteStringValue("name", Name); + writer.WriteStringValue("node_id", NodeId); + writer.WriteStringValue("url", Url); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/PendingDeployment_reviewers.cs b/src/Ayllu.Github.Client/Github/Client/Models/PendingDeployment_reviewers.cs new file mode 100644 index 0000000..3704723 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/PendingDeployment_reviewers.cs @@ -0,0 +1,126 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class PendingDeployment_reviewers : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The reviewer property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.PendingDeployment_reviewers.PendingDeployment_reviewers_reviewer? Reviewer { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.PendingDeployment_reviewers.PendingDeployment_reviewers_reviewer Reviewer { get; set; } +#endif + /// The type of reviewer. + public global::Ayllu.Github.Client.Models.DeploymentReviewerType? Type { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public PendingDeployment_reviewers() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.PendingDeployment_reviewers CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.PendingDeployment_reviewers(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "reviewer", n => { Reviewer = n.GetObjectValue(global::Ayllu.Github.Client.Models.PendingDeployment_reviewers.PendingDeployment_reviewers_reviewer.CreateFromDiscriminatorValue); } }, + { "type", n => { Type = n.GetEnumValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteObjectValue("reviewer", Reviewer); + writer.WriteEnumValue("type", Type); + writer.WriteAdditionalData(AdditionalData); + } + /// + /// Composed type wrapper for classes , + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class PendingDeployment_reviewers_reviewer : IComposedTypeWrapper, IParsable + { + /// Composed type representation for type +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.SimpleUser? SimpleUser { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.SimpleUser SimpleUser { get; set; } +#endif + /// Composed type representation for type +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.Team? Team { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.Team Team { get; set; } +#endif + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.PendingDeployment_reviewers.PendingDeployment_reviewers_reviewer CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + var result = new global::Ayllu.Github.Client.Models.PendingDeployment_reviewers.PendingDeployment_reviewers_reviewer(); + result.SimpleUser = new global::Ayllu.Github.Client.Models.SimpleUser(); + result.Team = new global::Ayllu.Github.Client.Models.Team(); + return result; + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + if(SimpleUser != null || Team != null) + { + return ParseNodeHelper.MergeDeserializersForIntersectionWrapper(SimpleUser, Team); + } + return new Dictionary>(); + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteObjectValue(null, SimpleUser, Team); + } + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/PorterAuthor.cs b/src/Ayllu.Github.Client/Github/Client/Models/PorterAuthor.cs new file mode 100644 index 0000000..f3265b3 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/PorterAuthor.cs @@ -0,0 +1,120 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + /// + /// Porter Author + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class PorterAuthor : IAdditionalDataHolder, IParsable + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The email property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Email { get; set; } +#nullable restore +#else + public string Email { get; set; } +#endif + /// The id property + public int? Id { get; set; } + /// The import_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? ImportUrl { get; set; } +#nullable restore +#else + public string ImportUrl { get; set; } +#endif + /// The name property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Name { get; set; } +#nullable restore +#else + public string Name { get; set; } +#endif + /// The remote_id property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? RemoteId { get; set; } +#nullable restore +#else + public string RemoteId { get; set; } +#endif + /// The remote_name property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? RemoteName { get; set; } +#nullable restore +#else + public string RemoteName { get; set; } +#endif + /// The url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Url { get; set; } +#nullable restore +#else + public string Url { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public PorterAuthor() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.PorterAuthor CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.PorterAuthor(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "email", n => { Email = n.GetStringValue(); } }, + { "id", n => { Id = n.GetIntValue(); } }, + { "import_url", n => { ImportUrl = n.GetStringValue(); } }, + { "name", n => { Name = n.GetStringValue(); } }, + { "remote_id", n => { RemoteId = n.GetStringValue(); } }, + { "remote_name", n => { RemoteName = n.GetStringValue(); } }, + { "url", n => { Url = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("email", Email); + writer.WriteIntValue("id", Id); + writer.WriteStringValue("import_url", ImportUrl); + writer.WriteStringValue("name", Name); + writer.WriteStringValue("remote_id", RemoteId); + writer.WriteStringValue("remote_name", RemoteName); + writer.WriteStringValue("url", Url); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/PorterLargeFile.cs b/src/Ayllu.Github.Client/Github/Client/Models/PorterLargeFile.cs new file mode 100644 index 0000000..1b4a77a --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/PorterLargeFile.cs @@ -0,0 +1,90 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + /// + /// Porter Large File + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class PorterLargeFile : IAdditionalDataHolder, IParsable + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The oid property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Oid { get; set; } +#nullable restore +#else + public string Oid { get; set; } +#endif + /// The path property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Path { get; set; } +#nullable restore +#else + public string Path { get; set; } +#endif + /// The ref_name property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? RefName { get; set; } +#nullable restore +#else + public string RefName { get; set; } +#endif + /// The size property + public int? Size { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public PorterLargeFile() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.PorterLargeFile CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.PorterLargeFile(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "oid", n => { Oid = n.GetStringValue(); } }, + { "path", n => { Path = n.GetStringValue(); } }, + { "ref_name", n => { RefName = n.GetStringValue(); } }, + { "size", n => { Size = n.GetIntValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("oid", Oid); + writer.WriteStringValue("path", Path); + writer.WriteStringValue("ref_name", RefName); + writer.WriteIntValue("size", Size); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/PrivateUser.cs b/src/Ayllu.Github.Client/Github/Client/Models/PrivateUser.cs new file mode 100644 index 0000000..d18b267 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/PrivateUser.cs @@ -0,0 +1,390 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + /// + /// Private User + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class PrivateUser : IAdditionalDataHolder, IParsable + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The avatar_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? AvatarUrl { get; set; } +#nullable restore +#else + public string AvatarUrl { get; set; } +#endif + /// The bio property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Bio { get; set; } +#nullable restore +#else + public string Bio { get; set; } +#endif + /// The blog property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Blog { get; set; } +#nullable restore +#else + public string Blog { get; set; } +#endif + /// The business_plus property + public bool? BusinessPlus { get; set; } + /// The collaborators property + public int? Collaborators { get; set; } + /// The company property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Company { get; set; } +#nullable restore +#else + public string Company { get; set; } +#endif + /// The created_at property + public DateTimeOffset? CreatedAt { get; set; } + /// The disk_usage property + public int? DiskUsage { get; set; } + /// The email property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Email { get; set; } +#nullable restore +#else + public string Email { get; set; } +#endif + /// The events_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? EventsUrl { get; set; } +#nullable restore +#else + public string EventsUrl { get; set; } +#endif + /// The followers property + public int? Followers { get; set; } + /// The followers_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? FollowersUrl { get; set; } +#nullable restore +#else + public string FollowersUrl { get; set; } +#endif + /// The following property + public int? Following { get; set; } + /// The following_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? FollowingUrl { get; set; } +#nullable restore +#else + public string FollowingUrl { get; set; } +#endif + /// The gists_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? GistsUrl { get; set; } +#nullable restore +#else + public string GistsUrl { get; set; } +#endif + /// The gravatar_id property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? GravatarId { get; set; } +#nullable restore +#else + public string GravatarId { get; set; } +#endif + /// The hireable property + public bool? Hireable { get; set; } + /// The html_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? HtmlUrl { get; set; } +#nullable restore +#else + public string HtmlUrl { get; set; } +#endif + /// The id property + public long? Id { get; set; } + /// The ldap_dn property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? LdapDn { get; set; } +#nullable restore +#else + public string LdapDn { get; set; } +#endif + /// The location property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Location { get; set; } +#nullable restore +#else + public string Location { get; set; } +#endif + /// The login property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Login { get; set; } +#nullable restore +#else + public string Login { get; set; } +#endif + /// The name property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Name { get; set; } +#nullable restore +#else + public string Name { get; set; } +#endif + /// The node_id property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? NodeId { get; set; } +#nullable restore +#else + public string NodeId { get; set; } +#endif + /// The notification_email property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? NotificationEmail { get; set; } +#nullable restore +#else + public string NotificationEmail { get; set; } +#endif + /// The organizations_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? OrganizationsUrl { get; set; } +#nullable restore +#else + public string OrganizationsUrl { get; set; } +#endif + /// The owned_private_repos property + public int? OwnedPrivateRepos { get; set; } + /// The plan property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.PrivateUser_plan? Plan { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.PrivateUser_plan Plan { get; set; } +#endif + /// The private_gists property + public int? PrivateGists { get; set; } + /// The public_gists property + public int? PublicGists { get; set; } + /// The public_repos property + public int? PublicRepos { get; set; } + /// The received_events_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? ReceivedEventsUrl { get; set; } +#nullable restore +#else + public string ReceivedEventsUrl { get; set; } +#endif + /// The repos_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? ReposUrl { get; set; } +#nullable restore +#else + public string ReposUrl { get; set; } +#endif + /// The site_admin property + public bool? SiteAdmin { get; set; } + /// The starred_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? StarredUrl { get; set; } +#nullable restore +#else + public string StarredUrl { get; set; } +#endif + /// The subscriptions_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? SubscriptionsUrl { get; set; } +#nullable restore +#else + public string SubscriptionsUrl { get; set; } +#endif + /// The total_private_repos property + public int? TotalPrivateRepos { get; set; } + /// The twitter_username property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? TwitterUsername { get; set; } +#nullable restore +#else + public string TwitterUsername { get; set; } +#endif + /// The two_factor_authentication property + public bool? TwoFactorAuthentication { get; set; } + /// The type property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Type { get; set; } +#nullable restore +#else + public string Type { get; set; } +#endif + /// The updated_at property + public DateTimeOffset? UpdatedAt { get; set; } + /// The url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Url { get; set; } +#nullable restore +#else + public string Url { get; set; } +#endif + /// The user_view_type property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? UserViewType { get; set; } +#nullable restore +#else + public string UserViewType { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public PrivateUser() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.PrivateUser CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.PrivateUser(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "avatar_url", n => { AvatarUrl = n.GetStringValue(); } }, + { "bio", n => { Bio = n.GetStringValue(); } }, + { "blog", n => { Blog = n.GetStringValue(); } }, + { "business_plus", n => { BusinessPlus = n.GetBoolValue(); } }, + { "collaborators", n => { Collaborators = n.GetIntValue(); } }, + { "company", n => { Company = n.GetStringValue(); } }, + { "created_at", n => { CreatedAt = n.GetDateTimeOffsetValue(); } }, + { "disk_usage", n => { DiskUsage = n.GetIntValue(); } }, + { "email", n => { Email = n.GetStringValue(); } }, + { "events_url", n => { EventsUrl = n.GetStringValue(); } }, + { "followers", n => { Followers = n.GetIntValue(); } }, + { "followers_url", n => { FollowersUrl = n.GetStringValue(); } }, + { "following", n => { Following = n.GetIntValue(); } }, + { "following_url", n => { FollowingUrl = n.GetStringValue(); } }, + { "gists_url", n => { GistsUrl = n.GetStringValue(); } }, + { "gravatar_id", n => { GravatarId = n.GetStringValue(); } }, + { "hireable", n => { Hireable = n.GetBoolValue(); } }, + { "html_url", n => { HtmlUrl = n.GetStringValue(); } }, + { "id", n => { Id = n.GetLongValue(); } }, + { "ldap_dn", n => { LdapDn = n.GetStringValue(); } }, + { "location", n => { Location = n.GetStringValue(); } }, + { "login", n => { Login = n.GetStringValue(); } }, + { "name", n => { Name = n.GetStringValue(); } }, + { "node_id", n => { NodeId = n.GetStringValue(); } }, + { "notification_email", n => { NotificationEmail = n.GetStringValue(); } }, + { "organizations_url", n => { OrganizationsUrl = n.GetStringValue(); } }, + { "owned_private_repos", n => { OwnedPrivateRepos = n.GetIntValue(); } }, + { "plan", n => { Plan = n.GetObjectValue(global::Ayllu.Github.Client.Models.PrivateUser_plan.CreateFromDiscriminatorValue); } }, + { "private_gists", n => { PrivateGists = n.GetIntValue(); } }, + { "public_gists", n => { PublicGists = n.GetIntValue(); } }, + { "public_repos", n => { PublicRepos = n.GetIntValue(); } }, + { "received_events_url", n => { ReceivedEventsUrl = n.GetStringValue(); } }, + { "repos_url", n => { ReposUrl = n.GetStringValue(); } }, + { "site_admin", n => { SiteAdmin = n.GetBoolValue(); } }, + { "starred_url", n => { StarredUrl = n.GetStringValue(); } }, + { "subscriptions_url", n => { SubscriptionsUrl = n.GetStringValue(); } }, + { "total_private_repos", n => { TotalPrivateRepos = n.GetIntValue(); } }, + { "twitter_username", n => { TwitterUsername = n.GetStringValue(); } }, + { "two_factor_authentication", n => { TwoFactorAuthentication = n.GetBoolValue(); } }, + { "type", n => { Type = n.GetStringValue(); } }, + { "updated_at", n => { UpdatedAt = n.GetDateTimeOffsetValue(); } }, + { "url", n => { Url = n.GetStringValue(); } }, + { "user_view_type", n => { UserViewType = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("avatar_url", AvatarUrl); + writer.WriteStringValue("bio", Bio); + writer.WriteStringValue("blog", Blog); + writer.WriteBoolValue("business_plus", BusinessPlus); + writer.WriteIntValue("collaborators", Collaborators); + writer.WriteStringValue("company", Company); + writer.WriteDateTimeOffsetValue("created_at", CreatedAt); + writer.WriteIntValue("disk_usage", DiskUsage); + writer.WriteStringValue("email", Email); + writer.WriteStringValue("events_url", EventsUrl); + writer.WriteIntValue("followers", Followers); + writer.WriteStringValue("followers_url", FollowersUrl); + writer.WriteIntValue("following", Following); + writer.WriteStringValue("following_url", FollowingUrl); + writer.WriteStringValue("gists_url", GistsUrl); + writer.WriteStringValue("gravatar_id", GravatarId); + writer.WriteBoolValue("hireable", Hireable); + writer.WriteStringValue("html_url", HtmlUrl); + writer.WriteLongValue("id", Id); + writer.WriteStringValue("ldap_dn", LdapDn); + writer.WriteStringValue("location", Location); + writer.WriteStringValue("login", Login); + writer.WriteStringValue("name", Name); + writer.WriteStringValue("node_id", NodeId); + writer.WriteStringValue("notification_email", NotificationEmail); + writer.WriteStringValue("organizations_url", OrganizationsUrl); + writer.WriteIntValue("owned_private_repos", OwnedPrivateRepos); + writer.WriteObjectValue("plan", Plan); + writer.WriteIntValue("private_gists", PrivateGists); + writer.WriteIntValue("public_gists", PublicGists); + writer.WriteIntValue("public_repos", PublicRepos); + writer.WriteStringValue("received_events_url", ReceivedEventsUrl); + writer.WriteStringValue("repos_url", ReposUrl); + writer.WriteBoolValue("site_admin", SiteAdmin); + writer.WriteStringValue("starred_url", StarredUrl); + writer.WriteStringValue("subscriptions_url", SubscriptionsUrl); + writer.WriteIntValue("total_private_repos", TotalPrivateRepos); + writer.WriteStringValue("twitter_username", TwitterUsername); + writer.WriteBoolValue("two_factor_authentication", TwoFactorAuthentication); + writer.WriteStringValue("type", Type); + writer.WriteDateTimeOffsetValue("updated_at", UpdatedAt); + writer.WriteStringValue("url", Url); + writer.WriteStringValue("user_view_type", UserViewType); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/PrivateUser_plan.cs b/src/Ayllu.Github.Client/Github/Client/Models/PrivateUser_plan.cs new file mode 100644 index 0000000..e458ccf --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/PrivateUser_plan.cs @@ -0,0 +1,77 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class PrivateUser_plan : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The collaborators property + public int? Collaborators { get; set; } + /// The name property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Name { get; set; } +#nullable restore +#else + public string Name { get; set; } +#endif + /// The private_repos property + public int? PrivateRepos { get; set; } + /// The space property + public int? Space { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public PrivateUser_plan() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.PrivateUser_plan CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.PrivateUser_plan(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "collaborators", n => { Collaborators = n.GetIntValue(); } }, + { "name", n => { Name = n.GetStringValue(); } }, + { "private_repos", n => { PrivateRepos = n.GetIntValue(); } }, + { "space", n => { Space = n.GetIntValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteIntValue("collaborators", Collaborators); + writer.WriteStringValue("name", Name); + writer.WriteIntValue("private_repos", PrivateRepos); + writer.WriteIntValue("space", Space); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/PrivateVulnerabilityReportCreate.cs b/src/Ayllu.Github.Client/Github/Client/Models/PrivateVulnerabilityReportCreate.cs new file mode 100644 index 0000000..1f11cff --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/PrivateVulnerabilityReportCreate.cs @@ -0,0 +1,103 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class PrivateVulnerabilityReportCreate : IParsable + #pragma warning restore CS1591 + { + /// The CVSS vector that calculates the severity of the advisory. You must choose between setting this field or `severity`. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? CvssVectorString { get; set; } +#nullable restore +#else + public string CvssVectorString { get; set; } +#endif + /// A list of Common Weakness Enumeration (CWE) IDs. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? CweIds { get; set; } +#nullable restore +#else + public List CweIds { get; set; } +#endif + /// A detailed description of what the advisory impacts. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Description { get; set; } +#nullable restore +#else + public string Description { get; set; } +#endif + /// The severity of the advisory. You must choose between setting this field or `cvss_vector_string`. + public global::Ayllu.Github.Client.Models.PrivateVulnerabilityReportCreate_severity? Severity { get; set; } + /// Whether to create a temporary private fork of the repository to collaborate on a fix. + public bool? StartPrivateFork { get; set; } + /// A short summary of the advisory. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Summary { get; set; } +#nullable restore +#else + public string Summary { get; set; } +#endif + /// An array of products affected by the vulnerability detailed in a repository security advisory. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? Vulnerabilities { get; set; } +#nullable restore +#else + public List Vulnerabilities { get; set; } +#endif + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.PrivateVulnerabilityReportCreate CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.PrivateVulnerabilityReportCreate(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "cvss_vector_string", n => { CvssVectorString = n.GetStringValue(); } }, + { "cwe_ids", n => { CweIds = n.GetCollectionOfPrimitiveValues()?.AsList(); } }, + { "description", n => { Description = n.GetStringValue(); } }, + { "severity", n => { Severity = n.GetEnumValue(); } }, + { "start_private_fork", n => { StartPrivateFork = n.GetBoolValue(); } }, + { "summary", n => { Summary = n.GetStringValue(); } }, + { "vulnerabilities", n => { Vulnerabilities = n.GetCollectionOfObjectValues(global::Ayllu.Github.Client.Models.PrivateVulnerabilityReportCreate_vulnerabilities.CreateFromDiscriminatorValue)?.AsList(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("cvss_vector_string", CvssVectorString); + writer.WriteCollectionOfPrimitiveValues("cwe_ids", CweIds); + writer.WriteStringValue("description", Description); + writer.WriteEnumValue("severity", Severity); + writer.WriteBoolValue("start_private_fork", StartPrivateFork); + writer.WriteStringValue("summary", Summary); + writer.WriteCollectionOfObjectValues("vulnerabilities", Vulnerabilities); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/PrivateVulnerabilityReportCreate_severity.cs b/src/Ayllu.Github.Client/Github/Client/Models/PrivateVulnerabilityReportCreate_severity.cs new file mode 100644 index 0000000..defa5e5 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/PrivateVulnerabilityReportCreate_severity.cs @@ -0,0 +1,27 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Models +{ + /// The severity of the advisory. You must choose between setting this field or `cvss_vector_string`. + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public enum PrivateVulnerabilityReportCreate_severity + { + [EnumMember(Value = "critical")] + #pragma warning disable CS1591 + Critical, + #pragma warning restore CS1591 + [EnumMember(Value = "high")] + #pragma warning disable CS1591 + High, + #pragma warning restore CS1591 + [EnumMember(Value = "medium")] + #pragma warning disable CS1591 + Medium, + #pragma warning restore CS1591 + [EnumMember(Value = "low")] + #pragma warning disable CS1591 + Low, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Models/PrivateVulnerabilityReportCreate_vulnerabilities.cs b/src/Ayllu.Github.Client/Github/Client/Models/PrivateVulnerabilityReportCreate_vulnerabilities.cs new file mode 100644 index 0000000..f812774 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/PrivateVulnerabilityReportCreate_vulnerabilities.cs @@ -0,0 +1,85 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class PrivateVulnerabilityReportCreate_vulnerabilities : IParsable + #pragma warning restore CS1591 + { + /// The name of the package affected by the vulnerability. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.PrivateVulnerabilityReportCreate_vulnerabilities_package? Package { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.PrivateVulnerabilityReportCreate_vulnerabilities_package Package { get; set; } +#endif + /// The package version(s) that resolve the vulnerability. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? PatchedVersions { get; set; } +#nullable restore +#else + public string PatchedVersions { get; set; } +#endif + /// The functions in the package that are affected. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? VulnerableFunctions { get; set; } +#nullable restore +#else + public List VulnerableFunctions { get; set; } +#endif + /// The range of the package versions affected by the vulnerability. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? VulnerableVersionRange { get; set; } +#nullable restore +#else + public string VulnerableVersionRange { get; set; } +#endif + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.PrivateVulnerabilityReportCreate_vulnerabilities CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.PrivateVulnerabilityReportCreate_vulnerabilities(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "package", n => { Package = n.GetObjectValue(global::Ayllu.Github.Client.Models.PrivateVulnerabilityReportCreate_vulnerabilities_package.CreateFromDiscriminatorValue); } }, + { "patched_versions", n => { PatchedVersions = n.GetStringValue(); } }, + { "vulnerable_functions", n => { VulnerableFunctions = n.GetCollectionOfPrimitiveValues()?.AsList(); } }, + { "vulnerable_version_range", n => { VulnerableVersionRange = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteObjectValue("package", Package); + writer.WriteStringValue("patched_versions", PatchedVersions); + writer.WriteCollectionOfPrimitiveValues("vulnerable_functions", VulnerableFunctions); + writer.WriteStringValue("vulnerable_version_range", VulnerableVersionRange); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/PrivateVulnerabilityReportCreate_vulnerabilities_package.cs b/src/Ayllu.Github.Client/Github/Client/Models/PrivateVulnerabilityReportCreate_vulnerabilities_package.cs new file mode 100644 index 0000000..11fe7db --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/PrivateVulnerabilityReportCreate_vulnerabilities_package.cs @@ -0,0 +1,70 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + /// + /// The name of the package affected by the vulnerability. + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class PrivateVulnerabilityReportCreate_vulnerabilities_package : IAdditionalDataHolder, IParsable + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The package's language or package management ecosystem. + public global::Ayllu.Github.Client.Models.SecurityAdvisoryEcosystems? Ecosystem { get; set; } + /// The unique package name within its ecosystem. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Name { get; set; } +#nullable restore +#else + public string Name { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public PrivateVulnerabilityReportCreate_vulnerabilities_package() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.PrivateVulnerabilityReportCreate_vulnerabilities_package CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.PrivateVulnerabilityReportCreate_vulnerabilities_package(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "ecosystem", n => { Ecosystem = n.GetEnumValue(); } }, + { "name", n => { Name = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteEnumValue("ecosystem", Ecosystem); + writer.WriteStringValue("name", Name); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/Project.cs b/src/Ayllu.Github.Client/Github/Client/Models/Project.cs new file mode 100644 index 0000000..beff1b6 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/Project.cs @@ -0,0 +1,170 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + /// + /// Projects are a way to organize columns and cards of work. + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class Project : IAdditionalDataHolder, IParsable + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// Body of the project +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Body { get; set; } +#nullable restore +#else + public string Body { get; set; } +#endif + /// The columns_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? ColumnsUrl { get; set; } +#nullable restore +#else + public string ColumnsUrl { get; set; } +#endif + /// The created_at property + public DateTimeOffset? CreatedAt { get; set; } + /// A GitHub user. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.NullableSimpleUser? Creator { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.NullableSimpleUser Creator { get; set; } +#endif + /// The html_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? HtmlUrl { get; set; } +#nullable restore +#else + public string HtmlUrl { get; set; } +#endif + /// The id property + public int? Id { get; set; } + /// Name of the project +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Name { get; set; } +#nullable restore +#else + public string Name { get; set; } +#endif + /// The node_id property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? NodeId { get; set; } +#nullable restore +#else + public string NodeId { get; set; } +#endif + /// The number property + public int? Number { get; set; } + /// The baseline permission that all organization members have on this project. Only present if owner is an organization. + public global::Ayllu.Github.Client.Models.Project_organization_permission? OrganizationPermission { get; set; } + /// The owner_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? OwnerUrl { get; set; } +#nullable restore +#else + public string OwnerUrl { get; set; } +#endif + /// Whether or not this project can be seen by everyone. Only present if owner is an organization. + public bool? Private { get; set; } + /// State of the project; either 'open' or 'closed' +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? State { get; set; } +#nullable restore +#else + public string State { get; set; } +#endif + /// The updated_at property + public DateTimeOffset? UpdatedAt { get; set; } + /// The url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Url { get; set; } +#nullable restore +#else + public string Url { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public Project() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.Project CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.Project(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "body", n => { Body = n.GetStringValue(); } }, + { "columns_url", n => { ColumnsUrl = n.GetStringValue(); } }, + { "created_at", n => { CreatedAt = n.GetDateTimeOffsetValue(); } }, + { "creator", n => { Creator = n.GetObjectValue(global::Ayllu.Github.Client.Models.NullableSimpleUser.CreateFromDiscriminatorValue); } }, + { "html_url", n => { HtmlUrl = n.GetStringValue(); } }, + { "id", n => { Id = n.GetIntValue(); } }, + { "name", n => { Name = n.GetStringValue(); } }, + { "node_id", n => { NodeId = n.GetStringValue(); } }, + { "number", n => { Number = n.GetIntValue(); } }, + { "organization_permission", n => { OrganizationPermission = n.GetEnumValue(); } }, + { "owner_url", n => { OwnerUrl = n.GetStringValue(); } }, + { "private", n => { Private = n.GetBoolValue(); } }, + { "state", n => { State = n.GetStringValue(); } }, + { "updated_at", n => { UpdatedAt = n.GetDateTimeOffsetValue(); } }, + { "url", n => { Url = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("body", Body); + writer.WriteStringValue("columns_url", ColumnsUrl); + writer.WriteDateTimeOffsetValue("created_at", CreatedAt); + writer.WriteObjectValue("creator", Creator); + writer.WriteStringValue("html_url", HtmlUrl); + writer.WriteIntValue("id", Id); + writer.WriteStringValue("name", Name); + writer.WriteStringValue("node_id", NodeId); + writer.WriteIntValue("number", Number); + writer.WriteEnumValue("organization_permission", OrganizationPermission); + writer.WriteStringValue("owner_url", OwnerUrl); + writer.WriteBoolValue("private", Private); + writer.WriteStringValue("state", State); + writer.WriteDateTimeOffsetValue("updated_at", UpdatedAt); + writer.WriteStringValue("url", Url); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/ProjectCard.cs b/src/Ayllu.Github.Client/Github/Client/Models/ProjectCard.cs new file mode 100644 index 0000000..15b1542 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/ProjectCard.cs @@ -0,0 +1,162 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + /// + /// Project cards represent a scope of work. + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class ProjectCard : IAdditionalDataHolder, IParsable + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// Whether or not the card is archived + public bool? Archived { get; set; } + /// The column_name property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? ColumnName { get; set; } +#nullable restore +#else + public string ColumnName { get; set; } +#endif + /// The column_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? ColumnUrl { get; set; } +#nullable restore +#else + public string ColumnUrl { get; set; } +#endif + /// The content_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? ContentUrl { get; set; } +#nullable restore +#else + public string ContentUrl { get; set; } +#endif + /// The created_at property + public DateTimeOffset? CreatedAt { get; set; } + /// A GitHub user. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.NullableSimpleUser? Creator { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.NullableSimpleUser Creator { get; set; } +#endif + /// The project card's ID + public long? Id { get; set; } + /// The node_id property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? NodeId { get; set; } +#nullable restore +#else + public string NodeId { get; set; } +#endif + /// The note property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Note { get; set; } +#nullable restore +#else + public string Note { get; set; } +#endif + /// The project_id property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? ProjectId { get; set; } +#nullable restore +#else + public string ProjectId { get; set; } +#endif + /// The project_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? ProjectUrl { get; set; } +#nullable restore +#else + public string ProjectUrl { get; set; } +#endif + /// The updated_at property + public DateTimeOffset? UpdatedAt { get; set; } + /// The url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Url { get; set; } +#nullable restore +#else + public string Url { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public ProjectCard() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.ProjectCard CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.ProjectCard(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "archived", n => { Archived = n.GetBoolValue(); } }, + { "column_name", n => { ColumnName = n.GetStringValue(); } }, + { "column_url", n => { ColumnUrl = n.GetStringValue(); } }, + { "content_url", n => { ContentUrl = n.GetStringValue(); } }, + { "created_at", n => { CreatedAt = n.GetDateTimeOffsetValue(); } }, + { "creator", n => { Creator = n.GetObjectValue(global::Ayllu.Github.Client.Models.NullableSimpleUser.CreateFromDiscriminatorValue); } }, + { "id", n => { Id = n.GetLongValue(); } }, + { "node_id", n => { NodeId = n.GetStringValue(); } }, + { "note", n => { Note = n.GetStringValue(); } }, + { "project_id", n => { ProjectId = n.GetStringValue(); } }, + { "project_url", n => { ProjectUrl = n.GetStringValue(); } }, + { "updated_at", n => { UpdatedAt = n.GetDateTimeOffsetValue(); } }, + { "url", n => { Url = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteBoolValue("archived", Archived); + writer.WriteStringValue("column_name", ColumnName); + writer.WriteStringValue("column_url", ColumnUrl); + writer.WriteStringValue("content_url", ContentUrl); + writer.WriteDateTimeOffsetValue("created_at", CreatedAt); + writer.WriteObjectValue("creator", Creator); + writer.WriteLongValue("id", Id); + writer.WriteStringValue("node_id", NodeId); + writer.WriteStringValue("note", Note); + writer.WriteStringValue("project_id", ProjectId); + writer.WriteStringValue("project_url", ProjectUrl); + writer.WriteDateTimeOffsetValue("updated_at", UpdatedAt); + writer.WriteStringValue("url", Url); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/ProjectCollaboratorPermission.cs b/src/Ayllu.Github.Client/Github/Client/Models/ProjectCollaboratorPermission.cs new file mode 100644 index 0000000..b0a4140 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/ProjectCollaboratorPermission.cs @@ -0,0 +1,76 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + /// + /// Project Collaborator Permission + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class ProjectCollaboratorPermission : IAdditionalDataHolder, IParsable + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The permission property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Permission { get; set; } +#nullable restore +#else + public string Permission { get; set; } +#endif + /// A GitHub user. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.NullableSimpleUser? User { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.NullableSimpleUser User { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public ProjectCollaboratorPermission() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.ProjectCollaboratorPermission CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.ProjectCollaboratorPermission(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "permission", n => { Permission = n.GetStringValue(); } }, + { "user", n => { User = n.GetObjectValue(global::Ayllu.Github.Client.Models.NullableSimpleUser.CreateFromDiscriminatorValue); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("permission", Permission); + writer.WriteObjectValue("user", User); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/ProjectColumn.cs b/src/Ayllu.Github.Client/Github/Client/Models/ProjectColumn.cs new file mode 100644 index 0000000..05f2019 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/ProjectColumn.cs @@ -0,0 +1,118 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + /// + /// Project columns contain cards of work. + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class ProjectColumn : IAdditionalDataHolder, IParsable + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The cards_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? CardsUrl { get; set; } +#nullable restore +#else + public string CardsUrl { get; set; } +#endif + /// The created_at property + public DateTimeOffset? CreatedAt { get; set; } + /// The unique identifier of the project column + public int? Id { get; set; } + /// Name of the project column +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Name { get; set; } +#nullable restore +#else + public string Name { get; set; } +#endif + /// The node_id property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? NodeId { get; set; } +#nullable restore +#else + public string NodeId { get; set; } +#endif + /// The project_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? ProjectUrl { get; set; } +#nullable restore +#else + public string ProjectUrl { get; set; } +#endif + /// The updated_at property + public DateTimeOffset? UpdatedAt { get; set; } + /// The url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Url { get; set; } +#nullable restore +#else + public string Url { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public ProjectColumn() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.ProjectColumn CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.ProjectColumn(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "cards_url", n => { CardsUrl = n.GetStringValue(); } }, + { "created_at", n => { CreatedAt = n.GetDateTimeOffsetValue(); } }, + { "id", n => { Id = n.GetIntValue(); } }, + { "name", n => { Name = n.GetStringValue(); } }, + { "node_id", n => { NodeId = n.GetStringValue(); } }, + { "project_url", n => { ProjectUrl = n.GetStringValue(); } }, + { "updated_at", n => { UpdatedAt = n.GetDateTimeOffsetValue(); } }, + { "url", n => { Url = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("cards_url", CardsUrl); + writer.WriteDateTimeOffsetValue("created_at", CreatedAt); + writer.WriteIntValue("id", Id); + writer.WriteStringValue("name", Name); + writer.WriteStringValue("node_id", NodeId); + writer.WriteStringValue("project_url", ProjectUrl); + writer.WriteDateTimeOffsetValue("updated_at", UpdatedAt); + writer.WriteStringValue("url", Url); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/Project_organization_permission.cs b/src/Ayllu.Github.Client/Github/Client/Models/Project_organization_permission.cs new file mode 100644 index 0000000..16b8caf --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/Project_organization_permission.cs @@ -0,0 +1,27 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Models +{ + /// The baseline permission that all organization members have on this project. Only present if owner is an organization. + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public enum Project_organization_permission + { + [EnumMember(Value = "read")] + #pragma warning disable CS1591 + Read, + #pragma warning restore CS1591 + [EnumMember(Value = "write")] + #pragma warning disable CS1591 + Write, + #pragma warning restore CS1591 + [EnumMember(Value = "admin")] + #pragma warning disable CS1591 + Admin, + #pragma warning restore CS1591 + [EnumMember(Value = "none")] + #pragma warning disable CS1591 + None, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Models/ProtectedBranch.cs b/src/Ayllu.Github.Client/Github/Client/Models/ProtectedBranch.cs new file mode 100644 index 0000000..48e9bb0 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/ProtectedBranch.cs @@ -0,0 +1,186 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + /// + /// Branch protections protect branches + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class ProtectedBranch : IAdditionalDataHolder, IParsable + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The allow_deletions property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.ProtectedBranch_allow_deletions? AllowDeletions { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.ProtectedBranch_allow_deletions AllowDeletions { get; set; } +#endif + /// The allow_force_pushes property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.ProtectedBranch_allow_force_pushes? AllowForcePushes { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.ProtectedBranch_allow_force_pushes AllowForcePushes { get; set; } +#endif + /// 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. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.ProtectedBranch_allow_fork_syncing? AllowForkSyncing { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.ProtectedBranch_allow_fork_syncing AllowForkSyncing { get; set; } +#endif + /// The block_creations property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.ProtectedBranch_block_creations? BlockCreations { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.ProtectedBranch_block_creations BlockCreations { get; set; } +#endif + /// The enforce_admins property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.ProtectedBranch_enforce_admins? EnforceAdmins { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.ProtectedBranch_enforce_admins EnforceAdmins { get; set; } +#endif + /// Whether to set the branch as read-only. If this is true, users will not be able to push to the branch. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.ProtectedBranch_lock_branch? LockBranch { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.ProtectedBranch_lock_branch LockBranch { get; set; } +#endif + /// The required_conversation_resolution property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.ProtectedBranch_required_conversation_resolution? RequiredConversationResolution { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.ProtectedBranch_required_conversation_resolution RequiredConversationResolution { get; set; } +#endif + /// The required_linear_history property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.ProtectedBranch_required_linear_history? RequiredLinearHistory { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.ProtectedBranch_required_linear_history RequiredLinearHistory { get; set; } +#endif + /// The required_pull_request_reviews property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.ProtectedBranch_required_pull_request_reviews? RequiredPullRequestReviews { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.ProtectedBranch_required_pull_request_reviews RequiredPullRequestReviews { get; set; } +#endif + /// The required_signatures property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.ProtectedBranch_required_signatures? RequiredSignatures { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.ProtectedBranch_required_signatures RequiredSignatures { get; set; } +#endif + /// Status Check Policy +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.StatusCheckPolicy? RequiredStatusChecks { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.StatusCheckPolicy RequiredStatusChecks { get; set; } +#endif + /// Branch Restriction Policy +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.BranchRestrictionPolicy? Restrictions { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.BranchRestrictionPolicy Restrictions { get; set; } +#endif + /// The url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Url { get; set; } +#nullable restore +#else + public string Url { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public ProtectedBranch() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.ProtectedBranch CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.ProtectedBranch(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "allow_deletions", n => { AllowDeletions = n.GetObjectValue(global::Ayllu.Github.Client.Models.ProtectedBranch_allow_deletions.CreateFromDiscriminatorValue); } }, + { "allow_force_pushes", n => { AllowForcePushes = n.GetObjectValue(global::Ayllu.Github.Client.Models.ProtectedBranch_allow_force_pushes.CreateFromDiscriminatorValue); } }, + { "allow_fork_syncing", n => { AllowForkSyncing = n.GetObjectValue(global::Ayllu.Github.Client.Models.ProtectedBranch_allow_fork_syncing.CreateFromDiscriminatorValue); } }, + { "block_creations", n => { BlockCreations = n.GetObjectValue(global::Ayllu.Github.Client.Models.ProtectedBranch_block_creations.CreateFromDiscriminatorValue); } }, + { "enforce_admins", n => { EnforceAdmins = n.GetObjectValue(global::Ayllu.Github.Client.Models.ProtectedBranch_enforce_admins.CreateFromDiscriminatorValue); } }, + { "lock_branch", n => { LockBranch = n.GetObjectValue(global::Ayllu.Github.Client.Models.ProtectedBranch_lock_branch.CreateFromDiscriminatorValue); } }, + { "required_conversation_resolution", n => { RequiredConversationResolution = n.GetObjectValue(global::Ayllu.Github.Client.Models.ProtectedBranch_required_conversation_resolution.CreateFromDiscriminatorValue); } }, + { "required_linear_history", n => { RequiredLinearHistory = n.GetObjectValue(global::Ayllu.Github.Client.Models.ProtectedBranch_required_linear_history.CreateFromDiscriminatorValue); } }, + { "required_pull_request_reviews", n => { RequiredPullRequestReviews = n.GetObjectValue(global::Ayllu.Github.Client.Models.ProtectedBranch_required_pull_request_reviews.CreateFromDiscriminatorValue); } }, + { "required_signatures", n => { RequiredSignatures = n.GetObjectValue(global::Ayllu.Github.Client.Models.ProtectedBranch_required_signatures.CreateFromDiscriminatorValue); } }, + { "required_status_checks", n => { RequiredStatusChecks = n.GetObjectValue(global::Ayllu.Github.Client.Models.StatusCheckPolicy.CreateFromDiscriminatorValue); } }, + { "restrictions", n => { Restrictions = n.GetObjectValue(global::Ayllu.Github.Client.Models.BranchRestrictionPolicy.CreateFromDiscriminatorValue); } }, + { "url", n => { Url = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteObjectValue("allow_deletions", AllowDeletions); + writer.WriteObjectValue("allow_force_pushes", AllowForcePushes); + writer.WriteObjectValue("allow_fork_syncing", AllowForkSyncing); + writer.WriteObjectValue("block_creations", BlockCreations); + writer.WriteObjectValue("enforce_admins", EnforceAdmins); + writer.WriteObjectValue("lock_branch", LockBranch); + writer.WriteObjectValue("required_conversation_resolution", RequiredConversationResolution); + writer.WriteObjectValue("required_linear_history", RequiredLinearHistory); + writer.WriteObjectValue("required_pull_request_reviews", RequiredPullRequestReviews); + writer.WriteObjectValue("required_signatures", RequiredSignatures); + writer.WriteObjectValue("required_status_checks", RequiredStatusChecks); + writer.WriteObjectValue("restrictions", Restrictions); + writer.WriteStringValue("url", Url); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/ProtectedBranchAdminEnforced.cs b/src/Ayllu.Github.Client/Github/Client/Models/ProtectedBranchAdminEnforced.cs new file mode 100644 index 0000000..987f84b --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/ProtectedBranchAdminEnforced.cs @@ -0,0 +1,70 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + /// + /// Protected Branch Admin Enforced + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class ProtectedBranchAdminEnforced : IAdditionalDataHolder, IParsable + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The enabled property + public bool? Enabled { get; set; } + /// The url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Url { get; set; } +#nullable restore +#else + public string Url { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public ProtectedBranchAdminEnforced() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.ProtectedBranchAdminEnforced CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.ProtectedBranchAdminEnforced(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "enabled", n => { Enabled = n.GetBoolValue(); } }, + { "url", n => { Url = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteBoolValue("enabled", Enabled); + writer.WriteStringValue("url", Url); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/ProtectedBranchPullRequestReview.cs b/src/Ayllu.Github.Client/Github/Client/Models/ProtectedBranchPullRequestReview.cs new file mode 100644 index 0000000..37be44c --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/ProtectedBranchPullRequestReview.cs @@ -0,0 +1,102 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + /// + /// Protected Branch Pull Request Review + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class ProtectedBranchPullRequestReview : IAdditionalDataHolder, IParsable + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// Allow specific users, teams, or apps to bypass pull request requirements. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.ProtectedBranchPullRequestReview_bypass_pull_request_allowances? BypassPullRequestAllowances { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.ProtectedBranchPullRequestReview_bypass_pull_request_allowances BypassPullRequestAllowances { get; set; } +#endif + /// The dismissal_restrictions property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.ProtectedBranchPullRequestReview_dismissal_restrictions? DismissalRestrictions { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.ProtectedBranchPullRequestReview_dismissal_restrictions DismissalRestrictions { get; set; } +#endif + /// The dismiss_stale_reviews property + public bool? DismissStaleReviews { get; set; } + /// The require_code_owner_reviews property + public bool? RequireCodeOwnerReviews { get; set; } + /// The required_approving_review_count property + public int? RequiredApprovingReviewCount { get; set; } + /// Whether the most recent push must be approved by someone other than the person who pushed it. + public bool? RequireLastPushApproval { get; set; } + /// The url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Url { get; set; } +#nullable restore +#else + public string Url { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public ProtectedBranchPullRequestReview() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.ProtectedBranchPullRequestReview CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.ProtectedBranchPullRequestReview(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "bypass_pull_request_allowances", n => { BypassPullRequestAllowances = n.GetObjectValue(global::Ayllu.Github.Client.Models.ProtectedBranchPullRequestReview_bypass_pull_request_allowances.CreateFromDiscriminatorValue); } }, + { "dismiss_stale_reviews", n => { DismissStaleReviews = n.GetBoolValue(); } }, + { "dismissal_restrictions", n => { DismissalRestrictions = n.GetObjectValue(global::Ayllu.Github.Client.Models.ProtectedBranchPullRequestReview_dismissal_restrictions.CreateFromDiscriminatorValue); } }, + { "require_code_owner_reviews", n => { RequireCodeOwnerReviews = n.GetBoolValue(); } }, + { "require_last_push_approval", n => { RequireLastPushApproval = n.GetBoolValue(); } }, + { "required_approving_review_count", n => { RequiredApprovingReviewCount = n.GetIntValue(); } }, + { "url", n => { Url = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteObjectValue("bypass_pull_request_allowances", BypassPullRequestAllowances); + writer.WriteObjectValue("dismissal_restrictions", DismissalRestrictions); + writer.WriteBoolValue("dismiss_stale_reviews", DismissStaleReviews); + writer.WriteBoolValue("require_code_owner_reviews", RequireCodeOwnerReviews); + writer.WriteIntValue("required_approving_review_count", RequiredApprovingReviewCount); + writer.WriteBoolValue("require_last_push_approval", RequireLastPushApproval); + writer.WriteStringValue("url", Url); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/ProtectedBranchPullRequestReview_bypass_pull_request_allowances.cs b/src/Ayllu.Github.Client/Github/Client/Models/ProtectedBranchPullRequestReview_bypass_pull_request_allowances.cs new file mode 100644 index 0000000..89ed54c --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/ProtectedBranchPullRequestReview_bypass_pull_request_allowances.cs @@ -0,0 +1,86 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + /// + /// Allow specific users, teams, or apps to bypass pull request requirements. + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class ProtectedBranchPullRequestReview_bypass_pull_request_allowances : IAdditionalDataHolder, IParsable + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The list of apps allowed to bypass pull request requirements. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? Apps { get; set; } +#nullable restore +#else + public List Apps { get; set; } +#endif + /// The list of teams allowed to bypass pull request requirements. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? Teams { get; set; } +#nullable restore +#else + public List Teams { get; set; } +#endif + /// The list of users allowed to bypass pull request requirements. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? Users { get; set; } +#nullable restore +#else + public List Users { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public ProtectedBranchPullRequestReview_bypass_pull_request_allowances() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.ProtectedBranchPullRequestReview_bypass_pull_request_allowances CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.ProtectedBranchPullRequestReview_bypass_pull_request_allowances(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "apps", n => { Apps = n.GetCollectionOfObjectValues(global::Ayllu.Github.Client.Models.Integration.CreateFromDiscriminatorValue)?.AsList(); } }, + { "teams", n => { Teams = n.GetCollectionOfObjectValues(global::Ayllu.Github.Client.Models.Team.CreateFromDiscriminatorValue)?.AsList(); } }, + { "users", n => { Users = n.GetCollectionOfObjectValues(global::Ayllu.Github.Client.Models.SimpleUser.CreateFromDiscriminatorValue)?.AsList(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteCollectionOfObjectValues("apps", Apps); + writer.WriteCollectionOfObjectValues("teams", Teams); + writer.WriteCollectionOfObjectValues("users", Users); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/ProtectedBranchPullRequestReview_dismissal_restrictions.cs b/src/Ayllu.Github.Client/Github/Client/Models/ProtectedBranchPullRequestReview_dismissal_restrictions.cs new file mode 100644 index 0000000..b5cb6c4 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/ProtectedBranchPullRequestReview_dismissal_restrictions.cs @@ -0,0 +1,115 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class ProtectedBranchPullRequestReview_dismissal_restrictions : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The list of apps with review dismissal access. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? Apps { get; set; } +#nullable restore +#else + public List Apps { get; set; } +#endif + /// The list of teams with review dismissal access. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? Teams { get; set; } +#nullable restore +#else + public List Teams { get; set; } +#endif + /// The teams_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? TeamsUrl { get; set; } +#nullable restore +#else + public string TeamsUrl { get; set; } +#endif + /// The url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Url { get; set; } +#nullable restore +#else + public string Url { get; set; } +#endif + /// The list of users with review dismissal access. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? Users { get; set; } +#nullable restore +#else + public List Users { get; set; } +#endif + /// The users_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? UsersUrl { get; set; } +#nullable restore +#else + public string UsersUrl { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public ProtectedBranchPullRequestReview_dismissal_restrictions() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.ProtectedBranchPullRequestReview_dismissal_restrictions CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.ProtectedBranchPullRequestReview_dismissal_restrictions(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "apps", n => { Apps = n.GetCollectionOfObjectValues(global::Ayllu.Github.Client.Models.Integration.CreateFromDiscriminatorValue)?.AsList(); } }, + { "teams", n => { Teams = n.GetCollectionOfObjectValues(global::Ayllu.Github.Client.Models.Team.CreateFromDiscriminatorValue)?.AsList(); } }, + { "teams_url", n => { TeamsUrl = n.GetStringValue(); } }, + { "url", n => { Url = n.GetStringValue(); } }, + { "users", n => { Users = n.GetCollectionOfObjectValues(global::Ayllu.Github.Client.Models.SimpleUser.CreateFromDiscriminatorValue)?.AsList(); } }, + { "users_url", n => { UsersUrl = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteCollectionOfObjectValues("apps", Apps); + writer.WriteCollectionOfObjectValues("teams", Teams); + writer.WriteStringValue("teams_url", TeamsUrl); + writer.WriteStringValue("url", Url); + writer.WriteCollectionOfObjectValues("users", Users); + writer.WriteStringValue("users_url", UsersUrl); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/ProtectedBranchRequiredStatusCheck.cs b/src/Ayllu.Github.Client/Github/Client/Models/ProtectedBranchRequiredStatusCheck.cs new file mode 100644 index 0000000..0bbb1de --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/ProtectedBranchRequiredStatusCheck.cs @@ -0,0 +1,110 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + /// + /// Protected Branch Required Status Check + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class ProtectedBranchRequiredStatusCheck : IAdditionalDataHolder, IParsable + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The checks property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? Checks { get; set; } +#nullable restore +#else + public List Checks { get; set; } +#endif + /// The contexts property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? Contexts { get; set; } +#nullable restore +#else + public List Contexts { get; set; } +#endif + /// The contexts_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? ContextsUrl { get; set; } +#nullable restore +#else + public string ContextsUrl { get; set; } +#endif + /// The enforcement_level property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? EnforcementLevel { get; set; } +#nullable restore +#else + public string EnforcementLevel { get; set; } +#endif + /// The strict property + public bool? Strict { get; set; } + /// The url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Url { get; set; } +#nullable restore +#else + public string Url { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public ProtectedBranchRequiredStatusCheck() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.ProtectedBranchRequiredStatusCheck CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.ProtectedBranchRequiredStatusCheck(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "checks", n => { Checks = n.GetCollectionOfObjectValues(global::Ayllu.Github.Client.Models.ProtectedBranchRequiredStatusCheck_checks.CreateFromDiscriminatorValue)?.AsList(); } }, + { "contexts", n => { Contexts = n.GetCollectionOfPrimitiveValues()?.AsList(); } }, + { "contexts_url", n => { ContextsUrl = n.GetStringValue(); } }, + { "enforcement_level", n => { EnforcementLevel = n.GetStringValue(); } }, + { "strict", n => { Strict = n.GetBoolValue(); } }, + { "url", n => { Url = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteCollectionOfObjectValues("checks", Checks); + writer.WriteCollectionOfPrimitiveValues("contexts", Contexts); + writer.WriteStringValue("contexts_url", ContextsUrl); + writer.WriteStringValue("enforcement_level", EnforcementLevel); + writer.WriteBoolValue("strict", Strict); + writer.WriteStringValue("url", Url); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/ProtectedBranchRequiredStatusCheck_checks.cs b/src/Ayllu.Github.Client/Github/Client/Models/ProtectedBranchRequiredStatusCheck_checks.cs new file mode 100644 index 0000000..fbcbbd8 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/ProtectedBranchRequiredStatusCheck_checks.cs @@ -0,0 +1,69 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class ProtectedBranchRequiredStatusCheck_checks : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The app_id property + public int? AppId { get; set; } + /// The context property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Context { get; set; } +#nullable restore +#else + public string Context { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public ProtectedBranchRequiredStatusCheck_checks() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.ProtectedBranchRequiredStatusCheck_checks CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.ProtectedBranchRequiredStatusCheck_checks(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "app_id", n => { AppId = n.GetIntValue(); } }, + { "context", n => { Context = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteIntValue("app_id", AppId); + writer.WriteStringValue("context", Context); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/ProtectedBranch_allow_deletions.cs b/src/Ayllu.Github.Client/Github/Client/Models/ProtectedBranch_allow_deletions.cs new file mode 100644 index 0000000..3684c9b --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/ProtectedBranch_allow_deletions.cs @@ -0,0 +1,49 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class ProtectedBranch_allow_deletions : IParsable + #pragma warning restore CS1591 + { + /// The enabled property + public bool? Enabled { get; set; } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.ProtectedBranch_allow_deletions CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.ProtectedBranch_allow_deletions(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "enabled", n => { Enabled = n.GetBoolValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteBoolValue("enabled", Enabled); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/ProtectedBranch_allow_force_pushes.cs b/src/Ayllu.Github.Client/Github/Client/Models/ProtectedBranch_allow_force_pushes.cs new file mode 100644 index 0000000..1b2514c --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/ProtectedBranch_allow_force_pushes.cs @@ -0,0 +1,49 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class ProtectedBranch_allow_force_pushes : IParsable + #pragma warning restore CS1591 + { + /// The enabled property + public bool? Enabled { get; set; } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.ProtectedBranch_allow_force_pushes CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.ProtectedBranch_allow_force_pushes(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "enabled", n => { Enabled = n.GetBoolValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteBoolValue("enabled", Enabled); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/ProtectedBranch_allow_fork_syncing.cs b/src/Ayllu.Github.Client/Github/Client/Models/ProtectedBranch_allow_fork_syncing.cs new file mode 100644 index 0000000..843b7a7 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/ProtectedBranch_allow_fork_syncing.cs @@ -0,0 +1,50 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + /// + /// 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. + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class ProtectedBranch_allow_fork_syncing : IParsable + { + /// The enabled property + public bool? Enabled { get; set; } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.ProtectedBranch_allow_fork_syncing CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.ProtectedBranch_allow_fork_syncing(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "enabled", n => { Enabled = n.GetBoolValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteBoolValue("enabled", Enabled); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/ProtectedBranch_block_creations.cs b/src/Ayllu.Github.Client/Github/Client/Models/ProtectedBranch_block_creations.cs new file mode 100644 index 0000000..7326891 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/ProtectedBranch_block_creations.cs @@ -0,0 +1,49 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class ProtectedBranch_block_creations : IParsable + #pragma warning restore CS1591 + { + /// The enabled property + public bool? Enabled { get; set; } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.ProtectedBranch_block_creations CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.ProtectedBranch_block_creations(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "enabled", n => { Enabled = n.GetBoolValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteBoolValue("enabled", Enabled); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/ProtectedBranch_enforce_admins.cs b/src/Ayllu.Github.Client/Github/Client/Models/ProtectedBranch_enforce_admins.cs new file mode 100644 index 0000000..10f0bbc --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/ProtectedBranch_enforce_admins.cs @@ -0,0 +1,59 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class ProtectedBranch_enforce_admins : IParsable + #pragma warning restore CS1591 + { + /// The enabled property + public bool? Enabled { get; set; } + /// The url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Url { get; set; } +#nullable restore +#else + public string Url { get; set; } +#endif + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.ProtectedBranch_enforce_admins CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.ProtectedBranch_enforce_admins(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "enabled", n => { Enabled = n.GetBoolValue(); } }, + { "url", n => { Url = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteBoolValue("enabled", Enabled); + writer.WriteStringValue("url", Url); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/ProtectedBranch_lock_branch.cs b/src/Ayllu.Github.Client/Github/Client/Models/ProtectedBranch_lock_branch.cs new file mode 100644 index 0000000..35c6c73 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/ProtectedBranch_lock_branch.cs @@ -0,0 +1,50 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + /// + /// Whether to set the branch as read-only. If this is true, users will not be able to push to the branch. + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class ProtectedBranch_lock_branch : IParsable + { + /// The enabled property + public bool? Enabled { get; set; } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.ProtectedBranch_lock_branch CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.ProtectedBranch_lock_branch(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "enabled", n => { Enabled = n.GetBoolValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteBoolValue("enabled", Enabled); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/ProtectedBranch_required_conversation_resolution.cs b/src/Ayllu.Github.Client/Github/Client/Models/ProtectedBranch_required_conversation_resolution.cs new file mode 100644 index 0000000..8075bc9 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/ProtectedBranch_required_conversation_resolution.cs @@ -0,0 +1,49 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class ProtectedBranch_required_conversation_resolution : IParsable + #pragma warning restore CS1591 + { + /// The enabled property + public bool? Enabled { get; set; } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.ProtectedBranch_required_conversation_resolution CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.ProtectedBranch_required_conversation_resolution(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "enabled", n => { Enabled = n.GetBoolValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteBoolValue("enabled", Enabled); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/ProtectedBranch_required_linear_history.cs b/src/Ayllu.Github.Client/Github/Client/Models/ProtectedBranch_required_linear_history.cs new file mode 100644 index 0000000..ad98392 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/ProtectedBranch_required_linear_history.cs @@ -0,0 +1,49 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class ProtectedBranch_required_linear_history : IParsable + #pragma warning restore CS1591 + { + /// The enabled property + public bool? Enabled { get; set; } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.ProtectedBranch_required_linear_history CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.ProtectedBranch_required_linear_history(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "enabled", n => { Enabled = n.GetBoolValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteBoolValue("enabled", Enabled); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/ProtectedBranch_required_pull_request_reviews.cs b/src/Ayllu.Github.Client/Github/Client/Models/ProtectedBranch_required_pull_request_reviews.cs new file mode 100644 index 0000000..0ffde2a --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/ProtectedBranch_required_pull_request_reviews.cs @@ -0,0 +1,101 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class ProtectedBranch_required_pull_request_reviews : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The bypass_pull_request_allowances property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.ProtectedBranch_required_pull_request_reviews_bypass_pull_request_allowances? BypassPullRequestAllowances { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.ProtectedBranch_required_pull_request_reviews_bypass_pull_request_allowances BypassPullRequestAllowances { get; set; } +#endif + /// The dismissal_restrictions property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.ProtectedBranch_required_pull_request_reviews_dismissal_restrictions? DismissalRestrictions { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.ProtectedBranch_required_pull_request_reviews_dismissal_restrictions DismissalRestrictions { get; set; } +#endif + /// The dismiss_stale_reviews property + public bool? DismissStaleReviews { get; set; } + /// The require_code_owner_reviews property + public bool? RequireCodeOwnerReviews { get; set; } + /// The required_approving_review_count property + public int? RequiredApprovingReviewCount { get; set; } + /// Whether the most recent push must be approved by someone other than the person who pushed it. + public bool? RequireLastPushApproval { get; set; } + /// The url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Url { get; set; } +#nullable restore +#else + public string Url { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public ProtectedBranch_required_pull_request_reviews() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.ProtectedBranch_required_pull_request_reviews CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.ProtectedBranch_required_pull_request_reviews(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "bypass_pull_request_allowances", n => { BypassPullRequestAllowances = n.GetObjectValue(global::Ayllu.Github.Client.Models.ProtectedBranch_required_pull_request_reviews_bypass_pull_request_allowances.CreateFromDiscriminatorValue); } }, + { "dismiss_stale_reviews", n => { DismissStaleReviews = n.GetBoolValue(); } }, + { "dismissal_restrictions", n => { DismissalRestrictions = n.GetObjectValue(global::Ayllu.Github.Client.Models.ProtectedBranch_required_pull_request_reviews_dismissal_restrictions.CreateFromDiscriminatorValue); } }, + { "require_code_owner_reviews", n => { RequireCodeOwnerReviews = n.GetBoolValue(); } }, + { "require_last_push_approval", n => { RequireLastPushApproval = n.GetBoolValue(); } }, + { "required_approving_review_count", n => { RequiredApprovingReviewCount = n.GetIntValue(); } }, + { "url", n => { Url = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteObjectValue("bypass_pull_request_allowances", BypassPullRequestAllowances); + writer.WriteObjectValue("dismissal_restrictions", DismissalRestrictions); + writer.WriteBoolValue("dismiss_stale_reviews", DismissStaleReviews); + writer.WriteBoolValue("require_code_owner_reviews", RequireCodeOwnerReviews); + writer.WriteIntValue("required_approving_review_count", RequiredApprovingReviewCount); + writer.WriteBoolValue("require_last_push_approval", RequireLastPushApproval); + writer.WriteStringValue("url", Url); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/ProtectedBranch_required_pull_request_reviews_bypass_pull_request_allowances.cs b/src/Ayllu.Github.Client/Github/Client/Models/ProtectedBranch_required_pull_request_reviews_bypass_pull_request_allowances.cs new file mode 100644 index 0000000..76587ce --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/ProtectedBranch_required_pull_request_reviews_bypass_pull_request_allowances.cs @@ -0,0 +1,85 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class ProtectedBranch_required_pull_request_reviews_bypass_pull_request_allowances : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The apps property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? Apps { get; set; } +#nullable restore +#else + public List Apps { get; set; } +#endif + /// The teams property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? Teams { get; set; } +#nullable restore +#else + public List Teams { get; set; } +#endif + /// The users property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? Users { get; set; } +#nullable restore +#else + public List Users { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public ProtectedBranch_required_pull_request_reviews_bypass_pull_request_allowances() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.ProtectedBranch_required_pull_request_reviews_bypass_pull_request_allowances CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.ProtectedBranch_required_pull_request_reviews_bypass_pull_request_allowances(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "apps", n => { Apps = n.GetCollectionOfObjectValues(global::Ayllu.Github.Client.Models.Integration.CreateFromDiscriminatorValue)?.AsList(); } }, + { "teams", n => { Teams = n.GetCollectionOfObjectValues(global::Ayllu.Github.Client.Models.Team.CreateFromDiscriminatorValue)?.AsList(); } }, + { "users", n => { Users = n.GetCollectionOfObjectValues(global::Ayllu.Github.Client.Models.SimpleUser.CreateFromDiscriminatorValue)?.AsList(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteCollectionOfObjectValues("apps", Apps); + writer.WriteCollectionOfObjectValues("teams", Teams); + writer.WriteCollectionOfObjectValues("users", Users); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/ProtectedBranch_required_pull_request_reviews_dismissal_restrictions.cs b/src/Ayllu.Github.Client/Github/Client/Models/ProtectedBranch_required_pull_request_reviews_dismissal_restrictions.cs new file mode 100644 index 0000000..f5cd076 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/ProtectedBranch_required_pull_request_reviews_dismissal_restrictions.cs @@ -0,0 +1,115 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class ProtectedBranch_required_pull_request_reviews_dismissal_restrictions : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The apps property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? Apps { get; set; } +#nullable restore +#else + public List Apps { get; set; } +#endif + /// The teams property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? Teams { get; set; } +#nullable restore +#else + public List Teams { get; set; } +#endif + /// The teams_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? TeamsUrl { get; set; } +#nullable restore +#else + public string TeamsUrl { get; set; } +#endif + /// The url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Url { get; set; } +#nullable restore +#else + public string Url { get; set; } +#endif + /// The users property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? Users { get; set; } +#nullable restore +#else + public List Users { get; set; } +#endif + /// The users_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? UsersUrl { get; set; } +#nullable restore +#else + public string UsersUrl { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public ProtectedBranch_required_pull_request_reviews_dismissal_restrictions() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.ProtectedBranch_required_pull_request_reviews_dismissal_restrictions CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.ProtectedBranch_required_pull_request_reviews_dismissal_restrictions(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "apps", n => { Apps = n.GetCollectionOfObjectValues(global::Ayllu.Github.Client.Models.Integration.CreateFromDiscriminatorValue)?.AsList(); } }, + { "teams", n => { Teams = n.GetCollectionOfObjectValues(global::Ayllu.Github.Client.Models.Team.CreateFromDiscriminatorValue)?.AsList(); } }, + { "teams_url", n => { TeamsUrl = n.GetStringValue(); } }, + { "url", n => { Url = n.GetStringValue(); } }, + { "users", n => { Users = n.GetCollectionOfObjectValues(global::Ayllu.Github.Client.Models.SimpleUser.CreateFromDiscriminatorValue)?.AsList(); } }, + { "users_url", n => { UsersUrl = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteCollectionOfObjectValues("apps", Apps); + writer.WriteCollectionOfObjectValues("teams", Teams); + writer.WriteStringValue("teams_url", TeamsUrl); + writer.WriteStringValue("url", Url); + writer.WriteCollectionOfObjectValues("users", Users); + writer.WriteStringValue("users_url", UsersUrl); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/ProtectedBranch_required_signatures.cs b/src/Ayllu.Github.Client/Github/Client/Models/ProtectedBranch_required_signatures.cs new file mode 100644 index 0000000..42a2fd2 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/ProtectedBranch_required_signatures.cs @@ -0,0 +1,69 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class ProtectedBranch_required_signatures : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The enabled property + public bool? Enabled { get; set; } + /// The url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Url { get; set; } +#nullable restore +#else + public string Url { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public ProtectedBranch_required_signatures() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.ProtectedBranch_required_signatures CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.ProtectedBranch_required_signatures(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "enabled", n => { Enabled = n.GetBoolValue(); } }, + { "url", n => { Url = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteBoolValue("enabled", Enabled); + writer.WriteStringValue("url", Url); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/PublicIp.cs b/src/Ayllu.Github.Client/Github/Client/Models/PublicIp.cs new file mode 100644 index 0000000..353ab62 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/PublicIp.cs @@ -0,0 +1,74 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + /// + /// Provides details of Public IP for a GitHub-hosted larger runners + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class PublicIp : IAdditionalDataHolder, IParsable + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// Whether public IP is enabled. + public bool? Enabled { get; set; } + /// The length of the IP prefix. + public int? Length { get; set; } + /// The prefix for the public IP. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Prefix { get; set; } +#nullable restore +#else + public string Prefix { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public PublicIp() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.PublicIp CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.PublicIp(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "enabled", n => { Enabled = n.GetBoolValue(); } }, + { "length", n => { Length = n.GetIntValue(); } }, + { "prefix", n => { Prefix = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteBoolValue("enabled", Enabled); + writer.WriteIntValue("length", Length); + writer.WriteStringValue("prefix", Prefix); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/PublicUser.cs b/src/Ayllu.Github.Client/Github/Client/Models/PublicUser.cs new file mode 100644 index 0000000..69ce92c --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/PublicUser.cs @@ -0,0 +1,362 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + /// + /// Public User + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class PublicUser : IParsable + { + /// The avatar_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? AvatarUrl { get; set; } +#nullable restore +#else + public string AvatarUrl { get; set; } +#endif + /// The bio property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Bio { get; set; } +#nullable restore +#else + public string Bio { get; set; } +#endif + /// The blog property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Blog { get; set; } +#nullable restore +#else + public string Blog { get; set; } +#endif + /// The collaborators property + public int? Collaborators { get; set; } + /// The company property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Company { get; set; } +#nullable restore +#else + public string Company { get; set; } +#endif + /// The created_at property + public DateTimeOffset? CreatedAt { get; set; } + /// The disk_usage property + public int? DiskUsage { get; set; } + /// The email property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Email { get; set; } +#nullable restore +#else + public string Email { get; set; } +#endif + /// The events_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? EventsUrl { get; set; } +#nullable restore +#else + public string EventsUrl { get; set; } +#endif + /// The followers property + public int? Followers { get; set; } + /// The followers_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? FollowersUrl { get; set; } +#nullable restore +#else + public string FollowersUrl { get; set; } +#endif + /// The following property + public int? Following { get; set; } + /// The following_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? FollowingUrl { get; set; } +#nullable restore +#else + public string FollowingUrl { get; set; } +#endif + /// The gists_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? GistsUrl { get; set; } +#nullable restore +#else + public string GistsUrl { get; set; } +#endif + /// The gravatar_id property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? GravatarId { get; set; } +#nullable restore +#else + public string GravatarId { get; set; } +#endif + /// The hireable property + public bool? Hireable { get; set; } + /// The html_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? HtmlUrl { get; set; } +#nullable restore +#else + public string HtmlUrl { get; set; } +#endif + /// The id property + public long? Id { get; set; } + /// The location property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Location { get; set; } +#nullable restore +#else + public string Location { get; set; } +#endif + /// The login property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Login { get; set; } +#nullable restore +#else + public string Login { get; set; } +#endif + /// The name property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Name { get; set; } +#nullable restore +#else + public string Name { get; set; } +#endif + /// The node_id property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? NodeId { get; set; } +#nullable restore +#else + public string NodeId { get; set; } +#endif + /// The notification_email property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? NotificationEmail { get; set; } +#nullable restore +#else + public string NotificationEmail { get; set; } +#endif + /// The organizations_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? OrganizationsUrl { get; set; } +#nullable restore +#else + public string OrganizationsUrl { get; set; } +#endif + /// The owned_private_repos property + public int? OwnedPrivateRepos { get; set; } + /// The plan property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.PublicUser_plan? Plan { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.PublicUser_plan Plan { get; set; } +#endif + /// The private_gists property + public int? PrivateGists { get; set; } + /// The public_gists property + public int? PublicGists { get; set; } + /// The public_repos property + public int? PublicRepos { get; set; } + /// The received_events_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? ReceivedEventsUrl { get; set; } +#nullable restore +#else + public string ReceivedEventsUrl { get; set; } +#endif + /// The repos_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? ReposUrl { get; set; } +#nullable restore +#else + public string ReposUrl { get; set; } +#endif + /// The site_admin property + public bool? SiteAdmin { get; set; } + /// The starred_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? StarredUrl { get; set; } +#nullable restore +#else + public string StarredUrl { get; set; } +#endif + /// The subscriptions_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? SubscriptionsUrl { get; set; } +#nullable restore +#else + public string SubscriptionsUrl { get; set; } +#endif + /// The total_private_repos property + public int? TotalPrivateRepos { get; set; } + /// The twitter_username property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? TwitterUsername { get; set; } +#nullable restore +#else + public string TwitterUsername { get; set; } +#endif + /// The type property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Type { get; set; } +#nullable restore +#else + public string Type { get; set; } +#endif + /// The updated_at property + public DateTimeOffset? UpdatedAt { get; set; } + /// The url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Url { get; set; } +#nullable restore +#else + public string Url { get; set; } +#endif + /// The user_view_type property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? UserViewType { get; set; } +#nullable restore +#else + public string UserViewType { get; set; } +#endif + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.PublicUser CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.PublicUser(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "avatar_url", n => { AvatarUrl = n.GetStringValue(); } }, + { "bio", n => { Bio = n.GetStringValue(); } }, + { "blog", n => { Blog = n.GetStringValue(); } }, + { "collaborators", n => { Collaborators = n.GetIntValue(); } }, + { "company", n => { Company = n.GetStringValue(); } }, + { "created_at", n => { CreatedAt = n.GetDateTimeOffsetValue(); } }, + { "disk_usage", n => { DiskUsage = n.GetIntValue(); } }, + { "email", n => { Email = n.GetStringValue(); } }, + { "events_url", n => { EventsUrl = n.GetStringValue(); } }, + { "followers", n => { Followers = n.GetIntValue(); } }, + { "followers_url", n => { FollowersUrl = n.GetStringValue(); } }, + { "following", n => { Following = n.GetIntValue(); } }, + { "following_url", n => { FollowingUrl = n.GetStringValue(); } }, + { "gists_url", n => { GistsUrl = n.GetStringValue(); } }, + { "gravatar_id", n => { GravatarId = n.GetStringValue(); } }, + { "hireable", n => { Hireable = n.GetBoolValue(); } }, + { "html_url", n => { HtmlUrl = n.GetStringValue(); } }, + { "id", n => { Id = n.GetLongValue(); } }, + { "location", n => { Location = n.GetStringValue(); } }, + { "login", n => { Login = n.GetStringValue(); } }, + { "name", n => { Name = n.GetStringValue(); } }, + { "node_id", n => { NodeId = n.GetStringValue(); } }, + { "notification_email", n => { NotificationEmail = n.GetStringValue(); } }, + { "organizations_url", n => { OrganizationsUrl = n.GetStringValue(); } }, + { "owned_private_repos", n => { OwnedPrivateRepos = n.GetIntValue(); } }, + { "plan", n => { Plan = n.GetObjectValue(global::Ayllu.Github.Client.Models.PublicUser_plan.CreateFromDiscriminatorValue); } }, + { "private_gists", n => { PrivateGists = n.GetIntValue(); } }, + { "public_gists", n => { PublicGists = n.GetIntValue(); } }, + { "public_repos", n => { PublicRepos = n.GetIntValue(); } }, + { "received_events_url", n => { ReceivedEventsUrl = n.GetStringValue(); } }, + { "repos_url", n => { ReposUrl = n.GetStringValue(); } }, + { "site_admin", n => { SiteAdmin = n.GetBoolValue(); } }, + { "starred_url", n => { StarredUrl = n.GetStringValue(); } }, + { "subscriptions_url", n => { SubscriptionsUrl = n.GetStringValue(); } }, + { "total_private_repos", n => { TotalPrivateRepos = n.GetIntValue(); } }, + { "twitter_username", n => { TwitterUsername = n.GetStringValue(); } }, + { "type", n => { Type = n.GetStringValue(); } }, + { "updated_at", n => { UpdatedAt = n.GetDateTimeOffsetValue(); } }, + { "url", n => { Url = n.GetStringValue(); } }, + { "user_view_type", n => { UserViewType = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("avatar_url", AvatarUrl); + writer.WriteStringValue("bio", Bio); + writer.WriteStringValue("blog", Blog); + writer.WriteIntValue("collaborators", Collaborators); + writer.WriteStringValue("company", Company); + writer.WriteDateTimeOffsetValue("created_at", CreatedAt); + writer.WriteIntValue("disk_usage", DiskUsage); + writer.WriteStringValue("email", Email); + writer.WriteStringValue("events_url", EventsUrl); + writer.WriteIntValue("followers", Followers); + writer.WriteStringValue("followers_url", FollowersUrl); + writer.WriteIntValue("following", Following); + writer.WriteStringValue("following_url", FollowingUrl); + writer.WriteStringValue("gists_url", GistsUrl); + writer.WriteStringValue("gravatar_id", GravatarId); + writer.WriteBoolValue("hireable", Hireable); + writer.WriteStringValue("html_url", HtmlUrl); + writer.WriteLongValue("id", Id); + writer.WriteStringValue("location", Location); + writer.WriteStringValue("login", Login); + writer.WriteStringValue("name", Name); + writer.WriteStringValue("node_id", NodeId); + writer.WriteStringValue("notification_email", NotificationEmail); + writer.WriteStringValue("organizations_url", OrganizationsUrl); + writer.WriteIntValue("owned_private_repos", OwnedPrivateRepos); + writer.WriteObjectValue("plan", Plan); + writer.WriteIntValue("private_gists", PrivateGists); + writer.WriteIntValue("public_gists", PublicGists); + writer.WriteIntValue("public_repos", PublicRepos); + writer.WriteStringValue("received_events_url", ReceivedEventsUrl); + writer.WriteStringValue("repos_url", ReposUrl); + writer.WriteBoolValue("site_admin", SiteAdmin); + writer.WriteStringValue("starred_url", StarredUrl); + writer.WriteStringValue("subscriptions_url", SubscriptionsUrl); + writer.WriteIntValue("total_private_repos", TotalPrivateRepos); + writer.WriteStringValue("twitter_username", TwitterUsername); + writer.WriteStringValue("type", Type); + writer.WriteDateTimeOffsetValue("updated_at", UpdatedAt); + writer.WriteStringValue("url", Url); + writer.WriteStringValue("user_view_type", UserViewType); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/PublicUser_plan.cs b/src/Ayllu.Github.Client/Github/Client/Models/PublicUser_plan.cs new file mode 100644 index 0000000..48b3411 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/PublicUser_plan.cs @@ -0,0 +1,77 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class PublicUser_plan : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The collaborators property + public int? Collaborators { get; set; } + /// The name property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Name { get; set; } +#nullable restore +#else + public string Name { get; set; } +#endif + /// The private_repos property + public int? PrivateRepos { get; set; } + /// The space property + public int? Space { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public PublicUser_plan() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.PublicUser_plan CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.PublicUser_plan(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "collaborators", n => { Collaborators = n.GetIntValue(); } }, + { "name", n => { Name = n.GetStringValue(); } }, + { "private_repos", n => { PrivateRepos = n.GetIntValue(); } }, + { "space", n => { Space = n.GetIntValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteIntValue("collaborators", Collaborators); + writer.WriteStringValue("name", Name); + writer.WriteIntValue("private_repos", PrivateRepos); + writer.WriteIntValue("space", Space); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/PullRequest.cs b/src/Ayllu.Github.Client/Github/Client/Models/PullRequest.cs new file mode 100644 index 0000000..8c45127 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/PullRequest.cs @@ -0,0 +1,416 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + /// + /// 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. + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class PullRequest : IAdditionalDataHolder, IParsable + { + /// The active_lock_reason property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? ActiveLockReason { get; set; } +#nullable restore +#else + public string ActiveLockReason { get; set; } +#endif + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The additions property + public int? Additions { get; set; } + /// A GitHub user. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.NullableSimpleUser? Assignee { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.NullableSimpleUser Assignee { get; set; } +#endif + /// The assignees property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? Assignees { get; set; } +#nullable restore +#else + public List Assignees { get; set; } +#endif + /// How the author is associated with the repository. + public global::Ayllu.Github.Client.Models.AuthorAssociation? AuthorAssociation { get; set; } + /// The status of auto merging a pull request. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.AutoMerge? AutoMerge { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.AutoMerge AutoMerge { get; set; } +#endif + /// The base property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.PullRequest_base? Base { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.PullRequest_base Base { get; set; } +#endif + /// The body property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Body { get; set; } +#nullable restore +#else + public string Body { get; set; } +#endif + /// The changed_files property + public int? ChangedFiles { get; set; } + /// The closed_at property + public DateTimeOffset? ClosedAt { get; set; } + /// The comments property + public int? Comments { get; set; } + /// The comments_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? CommentsUrl { get; set; } +#nullable restore +#else + public string CommentsUrl { get; set; } +#endif + /// The commits property + public int? Commits { get; set; } + /// The commits_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? CommitsUrl { get; set; } +#nullable restore +#else + public string CommitsUrl { get; set; } +#endif + /// The created_at property + public DateTimeOffset? CreatedAt { get; set; } + /// The deletions property + public int? Deletions { get; set; } + /// The diff_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? DiffUrl { get; set; } +#nullable restore +#else + public string DiffUrl { get; set; } +#endif + /// Indicates whether or not the pull request is a draft. + public bool? Draft { get; set; } + /// The head property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.PullRequest_head? Head { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.PullRequest_head Head { get; set; } +#endif + /// The html_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? HtmlUrl { get; set; } +#nullable restore +#else + public string HtmlUrl { get; set; } +#endif + /// The id property + public long? Id { get; set; } + /// The issue_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? IssueUrl { get; set; } +#nullable restore +#else + public string IssueUrl { get; set; } +#endif + /// The labels property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? Labels { get; set; } +#nullable restore +#else + public List Labels { get; set; } +#endif + /// The _links property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.PullRequest__links? Links { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.PullRequest__links Links { get; set; } +#endif + /// The locked property + public bool? Locked { get; set; } + /// Indicates whether maintainers can modify the pull request. + public bool? MaintainerCanModify { get; set; } + /// The mergeable property + public bool? Mergeable { get; set; } + /// The mergeable_state property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? MergeableState { get; set; } +#nullable restore +#else + public string MergeableState { get; set; } +#endif + /// The merge_commit_sha property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? MergeCommitSha { get; set; } +#nullable restore +#else + public string MergeCommitSha { get; set; } +#endif + /// The merged property + public bool? Merged { get; set; } + /// The merged_at property + public DateTimeOffset? MergedAt { get; set; } + /// A GitHub user. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.NullableSimpleUser? MergedBy { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.NullableSimpleUser MergedBy { get; set; } +#endif + /// A collection of related issues and pull requests. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.NullableMilestone? Milestone { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.NullableMilestone Milestone { get; set; } +#endif + /// The node_id property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? NodeId { get; set; } +#nullable restore +#else + public string NodeId { get; set; } +#endif + /// Number uniquely identifying the pull request within its repository. + public int? Number { get; set; } + /// The patch_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? PatchUrl { get; set; } +#nullable restore +#else + public string PatchUrl { get; set; } +#endif + /// The rebaseable property + public bool? Rebaseable { get; set; } + /// The requested_reviewers property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? RequestedReviewers { get; set; } +#nullable restore +#else + public List RequestedReviewers { get; set; } +#endif + /// The requested_teams property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? RequestedTeams { get; set; } +#nullable restore +#else + public List RequestedTeams { get; set; } +#endif + /// The review_comments property + public int? ReviewComments { get; set; } + /// The review_comments_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? ReviewCommentsUrl { get; set; } +#nullable restore +#else + public string ReviewCommentsUrl { get; set; } +#endif + /// The review_comment_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? ReviewCommentUrl { get; set; } +#nullable restore +#else + public string ReviewCommentUrl { get; set; } +#endif + /// State of this Pull Request. Either `open` or `closed`. + public global::Ayllu.Github.Client.Models.PullRequest_state? State { get; set; } + /// The statuses_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? StatusesUrl { get; set; } +#nullable restore +#else + public string StatusesUrl { get; set; } +#endif + /// The title of the pull request. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Title { get; set; } +#nullable restore +#else + public string Title { get; set; } +#endif + /// The updated_at property + public DateTimeOffset? UpdatedAt { get; set; } + /// The url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Url { get; set; } +#nullable restore +#else + public string Url { get; set; } +#endif + /// A GitHub user. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.SimpleUser? User { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.SimpleUser User { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public PullRequest() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.PullRequest CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.PullRequest(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "active_lock_reason", n => { ActiveLockReason = n.GetStringValue(); } }, + { "additions", n => { Additions = n.GetIntValue(); } }, + { "assignee", n => { Assignee = n.GetObjectValue(global::Ayllu.Github.Client.Models.NullableSimpleUser.CreateFromDiscriminatorValue); } }, + { "assignees", n => { Assignees = n.GetCollectionOfObjectValues(global::Ayllu.Github.Client.Models.SimpleUser.CreateFromDiscriminatorValue)?.AsList(); } }, + { "author_association", n => { AuthorAssociation = n.GetEnumValue(); } }, + { "auto_merge", n => { AutoMerge = n.GetObjectValue(global::Ayllu.Github.Client.Models.AutoMerge.CreateFromDiscriminatorValue); } }, + { "base", n => { Base = n.GetObjectValue(global::Ayllu.Github.Client.Models.PullRequest_base.CreateFromDiscriminatorValue); } }, + { "body", n => { Body = n.GetStringValue(); } }, + { "changed_files", n => { ChangedFiles = n.GetIntValue(); } }, + { "closed_at", n => { ClosedAt = n.GetDateTimeOffsetValue(); } }, + { "comments", n => { Comments = n.GetIntValue(); } }, + { "comments_url", n => { CommentsUrl = n.GetStringValue(); } }, + { "commits", n => { Commits = n.GetIntValue(); } }, + { "commits_url", n => { CommitsUrl = n.GetStringValue(); } }, + { "created_at", n => { CreatedAt = n.GetDateTimeOffsetValue(); } }, + { "deletions", n => { Deletions = n.GetIntValue(); } }, + { "diff_url", n => { DiffUrl = n.GetStringValue(); } }, + { "draft", n => { Draft = n.GetBoolValue(); } }, + { "head", n => { Head = n.GetObjectValue(global::Ayllu.Github.Client.Models.PullRequest_head.CreateFromDiscriminatorValue); } }, + { "html_url", n => { HtmlUrl = n.GetStringValue(); } }, + { "id", n => { Id = n.GetLongValue(); } }, + { "issue_url", n => { IssueUrl = n.GetStringValue(); } }, + { "labels", n => { Labels = n.GetCollectionOfObjectValues(global::Ayllu.Github.Client.Models.PullRequest_labels.CreateFromDiscriminatorValue)?.AsList(); } }, + { "_links", n => { Links = n.GetObjectValue(global::Ayllu.Github.Client.Models.PullRequest__links.CreateFromDiscriminatorValue); } }, + { "locked", n => { Locked = n.GetBoolValue(); } }, + { "maintainer_can_modify", n => { MaintainerCanModify = n.GetBoolValue(); } }, + { "merge_commit_sha", n => { MergeCommitSha = n.GetStringValue(); } }, + { "mergeable", n => { Mergeable = n.GetBoolValue(); } }, + { "mergeable_state", n => { MergeableState = n.GetStringValue(); } }, + { "merged", n => { Merged = n.GetBoolValue(); } }, + { "merged_at", n => { MergedAt = n.GetDateTimeOffsetValue(); } }, + { "merged_by", n => { MergedBy = n.GetObjectValue(global::Ayllu.Github.Client.Models.NullableSimpleUser.CreateFromDiscriminatorValue); } }, + { "milestone", n => { Milestone = n.GetObjectValue(global::Ayllu.Github.Client.Models.NullableMilestone.CreateFromDiscriminatorValue); } }, + { "node_id", n => { NodeId = n.GetStringValue(); } }, + { "number", n => { Number = n.GetIntValue(); } }, + { "patch_url", n => { PatchUrl = n.GetStringValue(); } }, + { "rebaseable", n => { Rebaseable = n.GetBoolValue(); } }, + { "requested_reviewers", n => { RequestedReviewers = n.GetCollectionOfObjectValues(global::Ayllu.Github.Client.Models.SimpleUser.CreateFromDiscriminatorValue)?.AsList(); } }, + { "requested_teams", n => { RequestedTeams = n.GetCollectionOfObjectValues(global::Ayllu.Github.Client.Models.TeamSimple.CreateFromDiscriminatorValue)?.AsList(); } }, + { "review_comment_url", n => { ReviewCommentUrl = n.GetStringValue(); } }, + { "review_comments", n => { ReviewComments = n.GetIntValue(); } }, + { "review_comments_url", n => { ReviewCommentsUrl = n.GetStringValue(); } }, + { "state", n => { State = n.GetEnumValue(); } }, + { "statuses_url", n => { StatusesUrl = n.GetStringValue(); } }, + { "title", n => { Title = n.GetStringValue(); } }, + { "updated_at", n => { UpdatedAt = n.GetDateTimeOffsetValue(); } }, + { "url", n => { Url = n.GetStringValue(); } }, + { "user", n => { User = n.GetObjectValue(global::Ayllu.Github.Client.Models.SimpleUser.CreateFromDiscriminatorValue); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("active_lock_reason", ActiveLockReason); + writer.WriteIntValue("additions", Additions); + writer.WriteObjectValue("assignee", Assignee); + writer.WriteCollectionOfObjectValues("assignees", Assignees); + writer.WriteEnumValue("author_association", AuthorAssociation); + writer.WriteObjectValue("auto_merge", AutoMerge); + writer.WriteObjectValue("base", Base); + writer.WriteStringValue("body", Body); + writer.WriteIntValue("changed_files", ChangedFiles); + writer.WriteDateTimeOffsetValue("closed_at", ClosedAt); + writer.WriteIntValue("comments", Comments); + writer.WriteStringValue("comments_url", CommentsUrl); + writer.WriteIntValue("commits", Commits); + writer.WriteStringValue("commits_url", CommitsUrl); + writer.WriteDateTimeOffsetValue("created_at", CreatedAt); + writer.WriteIntValue("deletions", Deletions); + writer.WriteStringValue("diff_url", DiffUrl); + writer.WriteBoolValue("draft", Draft); + writer.WriteObjectValue("head", Head); + writer.WriteStringValue("html_url", HtmlUrl); + writer.WriteLongValue("id", Id); + writer.WriteStringValue("issue_url", IssueUrl); + writer.WriteCollectionOfObjectValues("labels", Labels); + writer.WriteObjectValue("_links", Links); + writer.WriteBoolValue("locked", Locked); + writer.WriteBoolValue("maintainer_can_modify", MaintainerCanModify); + writer.WriteBoolValue("mergeable", Mergeable); + writer.WriteStringValue("mergeable_state", MergeableState); + writer.WriteStringValue("merge_commit_sha", MergeCommitSha); + writer.WriteBoolValue("merged", Merged); + writer.WriteDateTimeOffsetValue("merged_at", MergedAt); + writer.WriteObjectValue("merged_by", MergedBy); + writer.WriteObjectValue("milestone", Milestone); + writer.WriteStringValue("node_id", NodeId); + writer.WriteIntValue("number", Number); + writer.WriteStringValue("patch_url", PatchUrl); + writer.WriteBoolValue("rebaseable", Rebaseable); + writer.WriteCollectionOfObjectValues("requested_reviewers", RequestedReviewers); + writer.WriteCollectionOfObjectValues("requested_teams", RequestedTeams); + writer.WriteIntValue("review_comments", ReviewComments); + writer.WriteStringValue("review_comments_url", ReviewCommentsUrl); + writer.WriteStringValue("review_comment_url", ReviewCommentUrl); + writer.WriteEnumValue("state", State); + writer.WriteStringValue("statuses_url", StatusesUrl); + writer.WriteStringValue("title", Title); + writer.WriteDateTimeOffsetValue("updated_at", UpdatedAt); + writer.WriteStringValue("url", Url); + writer.WriteObjectValue("user", User); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/PullRequest503Error.cs b/src/Ayllu.Github.Client/Github/Client/Models/PullRequest503Error.cs new file mode 100644 index 0000000..2c52a8e --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/PullRequest503Error.cs @@ -0,0 +1,88 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class PullRequest503Error : ApiException, IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The code property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Code { get; set; } +#nullable restore +#else + public string Code { get; set; } +#endif + /// The documentation_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? DocumentationUrl { get; set; } +#nullable restore +#else + public string DocumentationUrl { get; set; } +#endif + /// The primary error message. + public override string Message { get => MessageEscaped ?? string.Empty; } + /// The message property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? MessageEscaped { get; set; } +#nullable restore +#else + public string MessageEscaped { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public PullRequest503Error() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.PullRequest503Error CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.PullRequest503Error(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "code", n => { Code = n.GetStringValue(); } }, + { "documentation_url", n => { DocumentationUrl = n.GetStringValue(); } }, + { "message", n => { MessageEscaped = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("code", Code); + writer.WriteStringValue("documentation_url", DocumentationUrl); + writer.WriteStringValue("message", MessageEscaped); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/PullRequestMergeResult.cs b/src/Ayllu.Github.Client/Github/Client/Models/PullRequestMergeResult.cs new file mode 100644 index 0000000..8da1ff1 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/PullRequestMergeResult.cs @@ -0,0 +1,80 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + /// + /// Pull Request Merge Result + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class PullRequestMergeResult : IAdditionalDataHolder, IParsable + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The merged property + public bool? Merged { get; set; } + /// The message property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Message { get; set; } +#nullable restore +#else + public string Message { get; set; } +#endif + /// The sha property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Sha { get; set; } +#nullable restore +#else + public string Sha { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public PullRequestMergeResult() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.PullRequestMergeResult CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.PullRequestMergeResult(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "merged", n => { Merged = n.GetBoolValue(); } }, + { "message", n => { Message = n.GetStringValue(); } }, + { "sha", n => { Sha = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteBoolValue("merged", Merged); + writer.WriteStringValue("message", Message); + writer.WriteStringValue("sha", Sha); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/PullRequestMinimal.cs b/src/Ayllu.Github.Client/Github/Client/Models/PullRequestMinimal.cs new file mode 100644 index 0000000..c2131b3 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/PullRequestMinimal.cs @@ -0,0 +1,93 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class PullRequestMinimal : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The base property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.PullRequestMinimal_base? Base { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.PullRequestMinimal_base Base { get; set; } +#endif + /// The head property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.PullRequestMinimal_head? Head { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.PullRequestMinimal_head Head { get; set; } +#endif + /// The id property + public long? Id { get; set; } + /// The number property + public int? Number { get; set; } + /// The url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Url { get; set; } +#nullable restore +#else + public string Url { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public PullRequestMinimal() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.PullRequestMinimal CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.PullRequestMinimal(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "base", n => { Base = n.GetObjectValue(global::Ayllu.Github.Client.Models.PullRequestMinimal_base.CreateFromDiscriminatorValue); } }, + { "head", n => { Head = n.GetObjectValue(global::Ayllu.Github.Client.Models.PullRequestMinimal_head.CreateFromDiscriminatorValue); } }, + { "id", n => { Id = n.GetLongValue(); } }, + { "number", n => { Number = n.GetIntValue(); } }, + { "url", n => { Url = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteObjectValue("base", Base); + writer.WriteObjectValue("head", Head); + writer.WriteLongValue("id", Id); + writer.WriteIntValue("number", Number); + writer.WriteStringValue("url", Url); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/PullRequestMinimal_base.cs b/src/Ayllu.Github.Client/Github/Client/Models/PullRequestMinimal_base.cs new file mode 100644 index 0000000..e00c0cc --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/PullRequestMinimal_base.cs @@ -0,0 +1,85 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class PullRequestMinimal_base : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The ref property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Ref { get; set; } +#nullable restore +#else + public string Ref { get; set; } +#endif + /// The repo property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.PullRequestMinimal_base_repo? Repo { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.PullRequestMinimal_base_repo Repo { get; set; } +#endif + /// The sha property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Sha { get; set; } +#nullable restore +#else + public string Sha { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public PullRequestMinimal_base() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.PullRequestMinimal_base CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.PullRequestMinimal_base(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "ref", n => { Ref = n.GetStringValue(); } }, + { "repo", n => { Repo = n.GetObjectValue(global::Ayllu.Github.Client.Models.PullRequestMinimal_base_repo.CreateFromDiscriminatorValue); } }, + { "sha", n => { Sha = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("ref", Ref); + writer.WriteObjectValue("repo", Repo); + writer.WriteStringValue("sha", Sha); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/PullRequestMinimal_base_repo.cs b/src/Ayllu.Github.Client/Github/Client/Models/PullRequestMinimal_base_repo.cs new file mode 100644 index 0000000..5d78fe3 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/PullRequestMinimal_base_repo.cs @@ -0,0 +1,79 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class PullRequestMinimal_base_repo : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The id property + public long? Id { get; set; } + /// The name property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Name { get; set; } +#nullable restore +#else + public string Name { get; set; } +#endif + /// The url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Url { get; set; } +#nullable restore +#else + public string Url { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public PullRequestMinimal_base_repo() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.PullRequestMinimal_base_repo CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.PullRequestMinimal_base_repo(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "id", n => { Id = n.GetLongValue(); } }, + { "name", n => { Name = n.GetStringValue(); } }, + { "url", n => { Url = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteLongValue("id", Id); + writer.WriteStringValue("name", Name); + writer.WriteStringValue("url", Url); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/PullRequestMinimal_head.cs b/src/Ayllu.Github.Client/Github/Client/Models/PullRequestMinimal_head.cs new file mode 100644 index 0000000..811e422 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/PullRequestMinimal_head.cs @@ -0,0 +1,85 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class PullRequestMinimal_head : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The ref property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Ref { get; set; } +#nullable restore +#else + public string Ref { get; set; } +#endif + /// The repo property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.PullRequestMinimal_head_repo? Repo { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.PullRequestMinimal_head_repo Repo { get; set; } +#endif + /// The sha property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Sha { get; set; } +#nullable restore +#else + public string Sha { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public PullRequestMinimal_head() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.PullRequestMinimal_head CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.PullRequestMinimal_head(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "ref", n => { Ref = n.GetStringValue(); } }, + { "repo", n => { Repo = n.GetObjectValue(global::Ayllu.Github.Client.Models.PullRequestMinimal_head_repo.CreateFromDiscriminatorValue); } }, + { "sha", n => { Sha = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("ref", Ref); + writer.WriteObjectValue("repo", Repo); + writer.WriteStringValue("sha", Sha); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/PullRequestMinimal_head_repo.cs b/src/Ayllu.Github.Client/Github/Client/Models/PullRequestMinimal_head_repo.cs new file mode 100644 index 0000000..d9ecbfd --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/PullRequestMinimal_head_repo.cs @@ -0,0 +1,79 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class PullRequestMinimal_head_repo : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The id property + public long? Id { get; set; } + /// The name property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Name { get; set; } +#nullable restore +#else + public string Name { get; set; } +#endif + /// The url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Url { get; set; } +#nullable restore +#else + public string Url { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public PullRequestMinimal_head_repo() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.PullRequestMinimal_head_repo CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.PullRequestMinimal_head_repo(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "id", n => { Id = n.GetLongValue(); } }, + { "name", n => { Name = n.GetStringValue(); } }, + { "url", n => { Url = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteLongValue("id", Id); + writer.WriteStringValue("name", Name); + writer.WriteStringValue("url", Url); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/PullRequestReview.cs b/src/Ayllu.Github.Client/Github/Client/Models/PullRequestReview.cs new file mode 100644 index 0000000..c6bd65f --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/PullRequestReview.cs @@ -0,0 +1,168 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + /// + /// Pull Request Reviews are reviews on pull requests. + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class PullRequestReview : IAdditionalDataHolder, IParsable + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// How the author is associated with the repository. + public global::Ayllu.Github.Client.Models.AuthorAssociation? AuthorAssociation { get; set; } + /// The text of the review. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Body { get; set; } +#nullable restore +#else + public string Body { get; set; } +#endif + /// The body_html property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? BodyHtml { get; set; } +#nullable restore +#else + public string BodyHtml { get; set; } +#endif + /// The body_text property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? BodyText { get; set; } +#nullable restore +#else + public string BodyText { get; set; } +#endif + /// 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`. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? CommitId { get; set; } +#nullable restore +#else + public string CommitId { get; set; } +#endif + /// The html_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? HtmlUrl { get; set; } +#nullable restore +#else + public string HtmlUrl { get; set; } +#endif + /// Unique identifier of the review + public long? Id { get; set; } + /// The _links property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.PullRequestReview__links? Links { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.PullRequestReview__links Links { get; set; } +#endif + /// The node_id property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? NodeId { get; set; } +#nullable restore +#else + public string NodeId { get; set; } +#endif + /// The pull_request_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? PullRequestUrl { get; set; } +#nullable restore +#else + public string PullRequestUrl { get; set; } +#endif + /// The state property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? State { get; set; } +#nullable restore +#else + public string State { get; set; } +#endif + /// The submitted_at property + public DateTimeOffset? SubmittedAt { get; set; } + /// A GitHub user. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.NullableSimpleUser? User { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.NullableSimpleUser User { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public PullRequestReview() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.PullRequestReview CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.PullRequestReview(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "author_association", n => { AuthorAssociation = n.GetEnumValue(); } }, + { "body", n => { Body = n.GetStringValue(); } }, + { "body_html", n => { BodyHtml = n.GetStringValue(); } }, + { "body_text", n => { BodyText = n.GetStringValue(); } }, + { "commit_id", n => { CommitId = n.GetStringValue(); } }, + { "html_url", n => { HtmlUrl = n.GetStringValue(); } }, + { "id", n => { Id = n.GetLongValue(); } }, + { "_links", n => { Links = n.GetObjectValue(global::Ayllu.Github.Client.Models.PullRequestReview__links.CreateFromDiscriminatorValue); } }, + { "node_id", n => { NodeId = n.GetStringValue(); } }, + { "pull_request_url", n => { PullRequestUrl = n.GetStringValue(); } }, + { "state", n => { State = n.GetStringValue(); } }, + { "submitted_at", n => { SubmittedAt = n.GetDateTimeOffsetValue(); } }, + { "user", n => { User = n.GetObjectValue(global::Ayllu.Github.Client.Models.NullableSimpleUser.CreateFromDiscriminatorValue); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteEnumValue("author_association", AuthorAssociation); + writer.WriteStringValue("body", Body); + writer.WriteStringValue("body_html", BodyHtml); + writer.WriteStringValue("body_text", BodyText); + writer.WriteStringValue("commit_id", CommitId); + writer.WriteStringValue("html_url", HtmlUrl); + writer.WriteLongValue("id", Id); + writer.WriteObjectValue("_links", Links); + writer.WriteStringValue("node_id", NodeId); + writer.WriteStringValue("pull_request_url", PullRequestUrl); + writer.WriteStringValue("state", State); + writer.WriteDateTimeOffsetValue("submitted_at", SubmittedAt); + writer.WriteObjectValue("user", User); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/PullRequestReviewComment.cs b/src/Ayllu.Github.Client/Github/Client/Models/PullRequestReviewComment.cs new file mode 100644 index 0000000..99c0291 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/PullRequestReviewComment.cs @@ -0,0 +1,258 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + /// + /// Pull Request Review Comments are comments on a portion of the Pull Request's diff. + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class PullRequestReviewComment : IAdditionalDataHolder, IParsable + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// How the author is associated with the repository. + public global::Ayllu.Github.Client.Models.AuthorAssociation? AuthorAssociation { get; set; } + /// The text of the comment. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Body { get; set; } +#nullable restore +#else + public string Body { get; set; } +#endif + /// The body_html property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? BodyHtml { get; set; } +#nullable restore +#else + public string BodyHtml { get; set; } +#endif + /// The body_text property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? BodyText { get; set; } +#nullable restore +#else + public string BodyText { get; set; } +#endif + /// The SHA of the commit to which the comment applies. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? CommitId { get; set; } +#nullable restore +#else + public string CommitId { get; set; } +#endif + /// The created_at property + public DateTimeOffset? CreatedAt { get; set; } + /// The diff of the line that the comment refers to. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? DiffHunk { get; set; } +#nullable restore +#else + public string DiffHunk { get; set; } +#endif + /// HTML URL for the pull request review comment. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? HtmlUrl { get; set; } +#nullable restore +#else + public string HtmlUrl { get; set; } +#endif + /// The ID of the pull request review comment. + public long? Id { get; set; } + /// The comment ID to reply to. + public int? InReplyToId { get; set; } + /// The line of the blob to which the comment applies. The last line of the range for a multi-line comment + public int? Line { get; set; } + /// The _links property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.PullRequestReviewComment__links? Links { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.PullRequestReviewComment__links Links { get; set; } +#endif + /// The node ID of the pull request review comment. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? NodeId { get; set; } +#nullable restore +#else + public string NodeId { get; set; } +#endif + /// The SHA of the original commit to which the comment applies. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? OriginalCommitId { get; set; } +#nullable restore +#else + public string OriginalCommitId { get; set; } +#endif + /// The line of the blob to which the comment applies. The last line of the range for a multi-line comment + public int? OriginalLine { get; set; } + /// The index of the original line in the diff to which the comment applies. This field is closing down; use `original_line` instead. + public int? OriginalPosition { get; set; } + /// The first line of the range for a multi-line comment. + public int? OriginalStartLine { get; set; } + /// The relative path of the file to which the comment applies. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Path { get; set; } +#nullable restore +#else + public string Path { get; set; } +#endif + /// The line index in the diff to which the comment applies. This field is closing down; use `line` instead. + public int? Position { get; set; } + /// The ID of the pull request review to which the comment belongs. + public long? PullRequestReviewId { get; set; } + /// URL for the pull request that the review comment belongs to. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? PullRequestUrl { get; set; } +#nullable restore +#else + public string PullRequestUrl { get; set; } +#endif + /// The reactions property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.ReactionRollup? Reactions { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.ReactionRollup Reactions { get; set; } +#endif + /// The side of the diff to which the comment applies. The side of the last line of the range for a multi-line comment + public global::Ayllu.Github.Client.Models.PullRequestReviewComment_side? Side { get; set; } + /// The first line of the range for a multi-line comment. + public int? StartLine { get; set; } + /// The side of the first line of the range for a multi-line comment. + public global::Ayllu.Github.Client.Models.PullRequestReviewComment_start_side? StartSide { get; set; } + /// The level at which the comment is targeted, can be a diff line or a file. + public global::Ayllu.Github.Client.Models.PullRequestReviewComment_subject_type? SubjectType { get; set; } + /// The updated_at property + public DateTimeOffset? UpdatedAt { get; set; } + /// URL for the pull request review comment +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Url { get; set; } +#nullable restore +#else + public string Url { get; set; } +#endif + /// A GitHub user. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.SimpleUser? User { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.SimpleUser User { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public PullRequestReviewComment() + { + AdditionalData = new Dictionary(); + Side = global::Ayllu.Github.Client.Models.PullRequestReviewComment_side.RIGHT; + StartSide = global::Ayllu.Github.Client.Models.PullRequestReviewComment_start_side.RIGHT; + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.PullRequestReviewComment CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.PullRequestReviewComment(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "author_association", n => { AuthorAssociation = n.GetEnumValue(); } }, + { "body", n => { Body = n.GetStringValue(); } }, + { "body_html", n => { BodyHtml = n.GetStringValue(); } }, + { "body_text", n => { BodyText = n.GetStringValue(); } }, + { "commit_id", n => { CommitId = n.GetStringValue(); } }, + { "created_at", n => { CreatedAt = n.GetDateTimeOffsetValue(); } }, + { "diff_hunk", n => { DiffHunk = n.GetStringValue(); } }, + { "html_url", n => { HtmlUrl = n.GetStringValue(); } }, + { "id", n => { Id = n.GetLongValue(); } }, + { "in_reply_to_id", n => { InReplyToId = n.GetIntValue(); } }, + { "line", n => { Line = n.GetIntValue(); } }, + { "_links", n => { Links = n.GetObjectValue(global::Ayllu.Github.Client.Models.PullRequestReviewComment__links.CreateFromDiscriminatorValue); } }, + { "node_id", n => { NodeId = n.GetStringValue(); } }, + { "original_commit_id", n => { OriginalCommitId = n.GetStringValue(); } }, + { "original_line", n => { OriginalLine = n.GetIntValue(); } }, + { "original_position", n => { OriginalPosition = n.GetIntValue(); } }, + { "original_start_line", n => { OriginalStartLine = n.GetIntValue(); } }, + { "path", n => { Path = n.GetStringValue(); } }, + { "position", n => { Position = n.GetIntValue(); } }, + { "pull_request_review_id", n => { PullRequestReviewId = n.GetLongValue(); } }, + { "pull_request_url", n => { PullRequestUrl = n.GetStringValue(); } }, + { "reactions", n => { Reactions = n.GetObjectValue(global::Ayllu.Github.Client.Models.ReactionRollup.CreateFromDiscriminatorValue); } }, + { "side", n => { Side = n.GetEnumValue(); } }, + { "start_line", n => { StartLine = n.GetIntValue(); } }, + { "start_side", n => { StartSide = n.GetEnumValue(); } }, + { "subject_type", n => { SubjectType = n.GetEnumValue(); } }, + { "updated_at", n => { UpdatedAt = n.GetDateTimeOffsetValue(); } }, + { "url", n => { Url = n.GetStringValue(); } }, + { "user", n => { User = n.GetObjectValue(global::Ayllu.Github.Client.Models.SimpleUser.CreateFromDiscriminatorValue); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteEnumValue("author_association", AuthorAssociation); + writer.WriteStringValue("body", Body); + writer.WriteStringValue("body_html", BodyHtml); + writer.WriteStringValue("body_text", BodyText); + writer.WriteStringValue("commit_id", CommitId); + writer.WriteDateTimeOffsetValue("created_at", CreatedAt); + writer.WriteStringValue("diff_hunk", DiffHunk); + writer.WriteStringValue("html_url", HtmlUrl); + writer.WriteLongValue("id", Id); + writer.WriteIntValue("in_reply_to_id", InReplyToId); + writer.WriteIntValue("line", Line); + writer.WriteObjectValue("_links", Links); + writer.WriteStringValue("node_id", NodeId); + writer.WriteStringValue("original_commit_id", OriginalCommitId); + writer.WriteIntValue("original_line", OriginalLine); + writer.WriteIntValue("original_position", OriginalPosition); + writer.WriteIntValue("original_start_line", OriginalStartLine); + writer.WriteStringValue("path", Path); + writer.WriteIntValue("position", Position); + writer.WriteLongValue("pull_request_review_id", PullRequestReviewId); + writer.WriteStringValue("pull_request_url", PullRequestUrl); + writer.WriteObjectValue("reactions", Reactions); + writer.WriteEnumValue("side", Side); + writer.WriteIntValue("start_line", StartLine); + writer.WriteEnumValue("start_side", StartSide); + writer.WriteEnumValue("subject_type", SubjectType); + writer.WriteDateTimeOffsetValue("updated_at", UpdatedAt); + writer.WriteStringValue("url", Url); + writer.WriteObjectValue("user", User); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/PullRequestReviewComment__links.cs b/src/Ayllu.Github.Client/Github/Client/Models/PullRequestReviewComment__links.cs new file mode 100644 index 0000000..403e5ab --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/PullRequestReviewComment__links.cs @@ -0,0 +1,85 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class PullRequestReviewComment__links : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The html property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.PullRequestReviewComment__links_html? Html { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.PullRequestReviewComment__links_html Html { get; set; } +#endif + /// The pull_request property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.PullRequestReviewComment__links_pull_request? PullRequest { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.PullRequestReviewComment__links_pull_request PullRequest { get; set; } +#endif + /// The self property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.PullRequestReviewComment__links_self? Self { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.PullRequestReviewComment__links_self Self { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public PullRequestReviewComment__links() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.PullRequestReviewComment__links CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.PullRequestReviewComment__links(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "html", n => { Html = n.GetObjectValue(global::Ayllu.Github.Client.Models.PullRequestReviewComment__links_html.CreateFromDiscriminatorValue); } }, + { "pull_request", n => { PullRequest = n.GetObjectValue(global::Ayllu.Github.Client.Models.PullRequestReviewComment__links_pull_request.CreateFromDiscriminatorValue); } }, + { "self", n => { Self = n.GetObjectValue(global::Ayllu.Github.Client.Models.PullRequestReviewComment__links_self.CreateFromDiscriminatorValue); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteObjectValue("html", Html); + writer.WriteObjectValue("pull_request", PullRequest); + writer.WriteObjectValue("self", Self); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/PullRequestReviewComment__links_html.cs b/src/Ayllu.Github.Client/Github/Client/Models/PullRequestReviewComment__links_html.cs new file mode 100644 index 0000000..17ce998 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/PullRequestReviewComment__links_html.cs @@ -0,0 +1,65 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class PullRequestReviewComment__links_html : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The href property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Href { get; set; } +#nullable restore +#else + public string Href { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public PullRequestReviewComment__links_html() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.PullRequestReviewComment__links_html CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.PullRequestReviewComment__links_html(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "href", n => { Href = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("href", Href); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/PullRequestReviewComment__links_pull_request.cs b/src/Ayllu.Github.Client/Github/Client/Models/PullRequestReviewComment__links_pull_request.cs new file mode 100644 index 0000000..758b219 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/PullRequestReviewComment__links_pull_request.cs @@ -0,0 +1,65 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class PullRequestReviewComment__links_pull_request : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The href property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Href { get; set; } +#nullable restore +#else + public string Href { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public PullRequestReviewComment__links_pull_request() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.PullRequestReviewComment__links_pull_request CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.PullRequestReviewComment__links_pull_request(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "href", n => { Href = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("href", Href); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/PullRequestReviewComment__links_self.cs b/src/Ayllu.Github.Client/Github/Client/Models/PullRequestReviewComment__links_self.cs new file mode 100644 index 0000000..0dd45ae --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/PullRequestReviewComment__links_self.cs @@ -0,0 +1,65 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class PullRequestReviewComment__links_self : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The href property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Href { get; set; } +#nullable restore +#else + public string Href { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public PullRequestReviewComment__links_self() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.PullRequestReviewComment__links_self CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.PullRequestReviewComment__links_self(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "href", n => { Href = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("href", Href); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/PullRequestReviewComment_side.cs b/src/Ayllu.Github.Client/Github/Client/Models/PullRequestReviewComment_side.cs new file mode 100644 index 0000000..051ea54 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/PullRequestReviewComment_side.cs @@ -0,0 +1,19 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Models +{ + /// The side of the diff to which the comment applies. The side of the last line of the range for a multi-line comment + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public enum PullRequestReviewComment_side + { + [EnumMember(Value = "LEFT")] + #pragma warning disable CS1591 + LEFT, + #pragma warning restore CS1591 + [EnumMember(Value = "RIGHT")] + #pragma warning disable CS1591 + RIGHT, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Models/PullRequestReviewComment_start_side.cs b/src/Ayllu.Github.Client/Github/Client/Models/PullRequestReviewComment_start_side.cs new file mode 100644 index 0000000..260c161 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/PullRequestReviewComment_start_side.cs @@ -0,0 +1,19 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Models +{ + /// The side of the first line of the range for a multi-line comment. + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public enum PullRequestReviewComment_start_side + { + [EnumMember(Value = "LEFT")] + #pragma warning disable CS1591 + LEFT, + #pragma warning restore CS1591 + [EnumMember(Value = "RIGHT")] + #pragma warning disable CS1591 + RIGHT, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Models/PullRequestReviewComment_subject_type.cs b/src/Ayllu.Github.Client/Github/Client/Models/PullRequestReviewComment_subject_type.cs new file mode 100644 index 0000000..9d3af40 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/PullRequestReviewComment_subject_type.cs @@ -0,0 +1,19 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Models +{ + /// The level at which the comment is targeted, can be a diff line or a file. + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public enum PullRequestReviewComment_subject_type + { + [EnumMember(Value = "line")] + #pragma warning disable CS1591 + Line, + #pragma warning restore CS1591 + [EnumMember(Value = "file")] + #pragma warning disable CS1591 + File, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Models/PullRequestReviewRequest.cs b/src/Ayllu.Github.Client/Github/Client/Models/PullRequestReviewRequest.cs new file mode 100644 index 0000000..b3a9a03 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/PullRequestReviewRequest.cs @@ -0,0 +1,76 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + /// + /// Pull Request Review Request + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class PullRequestReviewRequest : IAdditionalDataHolder, IParsable + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The teams property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? Teams { get; set; } +#nullable restore +#else + public List Teams { get; set; } +#endif + /// The users property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? Users { get; set; } +#nullable restore +#else + public List Users { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public PullRequestReviewRequest() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.PullRequestReviewRequest CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.PullRequestReviewRequest(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "teams", n => { Teams = n.GetCollectionOfObjectValues(global::Ayllu.Github.Client.Models.Team.CreateFromDiscriminatorValue)?.AsList(); } }, + { "users", n => { Users = n.GetCollectionOfObjectValues(global::Ayllu.Github.Client.Models.SimpleUser.CreateFromDiscriminatorValue)?.AsList(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteCollectionOfObjectValues("teams", Teams); + writer.WriteCollectionOfObjectValues("users", Users); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/PullRequestReview__links.cs b/src/Ayllu.Github.Client/Github/Client/Models/PullRequestReview__links.cs new file mode 100644 index 0000000..273d960 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/PullRequestReview__links.cs @@ -0,0 +1,75 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class PullRequestReview__links : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The html property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.PullRequestReview__links_html? Html { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.PullRequestReview__links_html Html { get; set; } +#endif + /// The pull_request property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.PullRequestReview__links_pull_request? PullRequest { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.PullRequestReview__links_pull_request PullRequest { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public PullRequestReview__links() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.PullRequestReview__links CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.PullRequestReview__links(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "html", n => { Html = n.GetObjectValue(global::Ayllu.Github.Client.Models.PullRequestReview__links_html.CreateFromDiscriminatorValue); } }, + { "pull_request", n => { PullRequest = n.GetObjectValue(global::Ayllu.Github.Client.Models.PullRequestReview__links_pull_request.CreateFromDiscriminatorValue); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteObjectValue("html", Html); + writer.WriteObjectValue("pull_request", PullRequest); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/PullRequestReview__links_html.cs b/src/Ayllu.Github.Client/Github/Client/Models/PullRequestReview__links_html.cs new file mode 100644 index 0000000..9400635 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/PullRequestReview__links_html.cs @@ -0,0 +1,65 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class PullRequestReview__links_html : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The href property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Href { get; set; } +#nullable restore +#else + public string Href { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public PullRequestReview__links_html() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.PullRequestReview__links_html CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.PullRequestReview__links_html(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "href", n => { Href = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("href", Href); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/PullRequestReview__links_pull_request.cs b/src/Ayllu.Github.Client/Github/Client/Models/PullRequestReview__links_pull_request.cs new file mode 100644 index 0000000..bc97864 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/PullRequestReview__links_pull_request.cs @@ -0,0 +1,65 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class PullRequestReview__links_pull_request : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The href property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Href { get; set; } +#nullable restore +#else + public string Href { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public PullRequestReview__links_pull_request() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.PullRequestReview__links_pull_request CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.PullRequestReview__links_pull_request(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "href", n => { Href = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("href", Href); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/PullRequestSimple.cs b/src/Ayllu.Github.Client/Github/Client/Models/PullRequestSimple.cs new file mode 100644 index 0000000..05b928e --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/PullRequestSimple.cs @@ -0,0 +1,362 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + /// + /// Pull Request Simple + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class PullRequestSimple : IAdditionalDataHolder, IParsable + { + /// The active_lock_reason property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? ActiveLockReason { get; set; } +#nullable restore +#else + public string ActiveLockReason { get; set; } +#endif + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// A GitHub user. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.NullableSimpleUser? Assignee { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.NullableSimpleUser Assignee { get; set; } +#endif + /// The assignees property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? Assignees { get; set; } +#nullable restore +#else + public List Assignees { get; set; } +#endif + /// How the author is associated with the repository. + public global::Ayllu.Github.Client.Models.AuthorAssociation? AuthorAssociation { get; set; } + /// The status of auto merging a pull request. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.AutoMerge? AutoMerge { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.AutoMerge AutoMerge { get; set; } +#endif + /// The base property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.PullRequestSimple_base? Base { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.PullRequestSimple_base Base { get; set; } +#endif + /// The body property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Body { get; set; } +#nullable restore +#else + public string Body { get; set; } +#endif + /// The closed_at property + public DateTimeOffset? ClosedAt { get; set; } + /// The comments_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? CommentsUrl { get; set; } +#nullable restore +#else + public string CommentsUrl { get; set; } +#endif + /// The commits_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? CommitsUrl { get; set; } +#nullable restore +#else + public string CommitsUrl { get; set; } +#endif + /// The created_at property + public DateTimeOffset? CreatedAt { get; set; } + /// The diff_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? DiffUrl { get; set; } +#nullable restore +#else + public string DiffUrl { get; set; } +#endif + /// Indicates whether or not the pull request is a draft. + public bool? Draft { get; set; } + /// The head property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.PullRequestSimple_head? Head { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.PullRequestSimple_head Head { get; set; } +#endif + /// The html_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? HtmlUrl { get; set; } +#nullable restore +#else + public string HtmlUrl { get; set; } +#endif + /// The id property + public long? Id { get; set; } + /// The issue_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? IssueUrl { get; set; } +#nullable restore +#else + public string IssueUrl { get; set; } +#endif + /// The labels property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? Labels { get; set; } +#nullable restore +#else + public List Labels { get; set; } +#endif + /// The _links property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.PullRequestSimple__links? Links { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.PullRequestSimple__links Links { get; set; } +#endif + /// The locked property + public bool? Locked { get; set; } + /// The merge_commit_sha property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? MergeCommitSha { get; set; } +#nullable restore +#else + public string MergeCommitSha { get; set; } +#endif + /// The merged_at property + public DateTimeOffset? MergedAt { get; set; } + /// A collection of related issues and pull requests. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.NullableMilestone? Milestone { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.NullableMilestone Milestone { get; set; } +#endif + /// The node_id property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? NodeId { get; set; } +#nullable restore +#else + public string NodeId { get; set; } +#endif + /// The number property + public int? Number { get; set; } + /// The patch_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? PatchUrl { get; set; } +#nullable restore +#else + public string PatchUrl { get; set; } +#endif + /// The requested_reviewers property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? RequestedReviewers { get; set; } +#nullable restore +#else + public List RequestedReviewers { get; set; } +#endif + /// The requested_teams property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? RequestedTeams { get; set; } +#nullable restore +#else + public List RequestedTeams { get; set; } +#endif + /// The review_comments_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? ReviewCommentsUrl { get; set; } +#nullable restore +#else + public string ReviewCommentsUrl { get; set; } +#endif + /// The review_comment_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? ReviewCommentUrl { get; set; } +#nullable restore +#else + public string ReviewCommentUrl { get; set; } +#endif + /// The state property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? State { get; set; } +#nullable restore +#else + public string State { get; set; } +#endif + /// The statuses_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? StatusesUrl { get; set; } +#nullable restore +#else + public string StatusesUrl { get; set; } +#endif + /// The title property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Title { get; set; } +#nullable restore +#else + public string Title { get; set; } +#endif + /// The updated_at property + public DateTimeOffset? UpdatedAt { get; set; } + /// The url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Url { get; set; } +#nullable restore +#else + public string Url { get; set; } +#endif + /// A GitHub user. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.NullableSimpleUser? User { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.NullableSimpleUser User { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public PullRequestSimple() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.PullRequestSimple CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.PullRequestSimple(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "active_lock_reason", n => { ActiveLockReason = n.GetStringValue(); } }, + { "assignee", n => { Assignee = n.GetObjectValue(global::Ayllu.Github.Client.Models.NullableSimpleUser.CreateFromDiscriminatorValue); } }, + { "assignees", n => { Assignees = n.GetCollectionOfObjectValues(global::Ayllu.Github.Client.Models.SimpleUser.CreateFromDiscriminatorValue)?.AsList(); } }, + { "author_association", n => { AuthorAssociation = n.GetEnumValue(); } }, + { "auto_merge", n => { AutoMerge = n.GetObjectValue(global::Ayllu.Github.Client.Models.AutoMerge.CreateFromDiscriminatorValue); } }, + { "base", n => { Base = n.GetObjectValue(global::Ayllu.Github.Client.Models.PullRequestSimple_base.CreateFromDiscriminatorValue); } }, + { "body", n => { Body = n.GetStringValue(); } }, + { "closed_at", n => { ClosedAt = n.GetDateTimeOffsetValue(); } }, + { "comments_url", n => { CommentsUrl = n.GetStringValue(); } }, + { "commits_url", n => { CommitsUrl = n.GetStringValue(); } }, + { "created_at", n => { CreatedAt = n.GetDateTimeOffsetValue(); } }, + { "diff_url", n => { DiffUrl = n.GetStringValue(); } }, + { "draft", n => { Draft = n.GetBoolValue(); } }, + { "head", n => { Head = n.GetObjectValue(global::Ayllu.Github.Client.Models.PullRequestSimple_head.CreateFromDiscriminatorValue); } }, + { "html_url", n => { HtmlUrl = n.GetStringValue(); } }, + { "id", n => { Id = n.GetLongValue(); } }, + { "issue_url", n => { IssueUrl = n.GetStringValue(); } }, + { "labels", n => { Labels = n.GetCollectionOfObjectValues(global::Ayllu.Github.Client.Models.PullRequestSimple_labels.CreateFromDiscriminatorValue)?.AsList(); } }, + { "_links", n => { Links = n.GetObjectValue(global::Ayllu.Github.Client.Models.PullRequestSimple__links.CreateFromDiscriminatorValue); } }, + { "locked", n => { Locked = n.GetBoolValue(); } }, + { "merge_commit_sha", n => { MergeCommitSha = n.GetStringValue(); } }, + { "merged_at", n => { MergedAt = n.GetDateTimeOffsetValue(); } }, + { "milestone", n => { Milestone = n.GetObjectValue(global::Ayllu.Github.Client.Models.NullableMilestone.CreateFromDiscriminatorValue); } }, + { "node_id", n => { NodeId = n.GetStringValue(); } }, + { "number", n => { Number = n.GetIntValue(); } }, + { "patch_url", n => { PatchUrl = n.GetStringValue(); } }, + { "requested_reviewers", n => { RequestedReviewers = n.GetCollectionOfObjectValues(global::Ayllu.Github.Client.Models.SimpleUser.CreateFromDiscriminatorValue)?.AsList(); } }, + { "requested_teams", n => { RequestedTeams = n.GetCollectionOfObjectValues(global::Ayllu.Github.Client.Models.Team.CreateFromDiscriminatorValue)?.AsList(); } }, + { "review_comment_url", n => { ReviewCommentUrl = n.GetStringValue(); } }, + { "review_comments_url", n => { ReviewCommentsUrl = n.GetStringValue(); } }, + { "state", n => { State = n.GetStringValue(); } }, + { "statuses_url", n => { StatusesUrl = n.GetStringValue(); } }, + { "title", n => { Title = n.GetStringValue(); } }, + { "updated_at", n => { UpdatedAt = n.GetDateTimeOffsetValue(); } }, + { "url", n => { Url = n.GetStringValue(); } }, + { "user", n => { User = n.GetObjectValue(global::Ayllu.Github.Client.Models.NullableSimpleUser.CreateFromDiscriminatorValue); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("active_lock_reason", ActiveLockReason); + writer.WriteObjectValue("assignee", Assignee); + writer.WriteCollectionOfObjectValues("assignees", Assignees); + writer.WriteEnumValue("author_association", AuthorAssociation); + writer.WriteObjectValue("auto_merge", AutoMerge); + writer.WriteObjectValue("base", Base); + writer.WriteStringValue("body", Body); + writer.WriteDateTimeOffsetValue("closed_at", ClosedAt); + writer.WriteStringValue("comments_url", CommentsUrl); + writer.WriteStringValue("commits_url", CommitsUrl); + writer.WriteDateTimeOffsetValue("created_at", CreatedAt); + writer.WriteStringValue("diff_url", DiffUrl); + writer.WriteBoolValue("draft", Draft); + writer.WriteObjectValue("head", Head); + writer.WriteStringValue("html_url", HtmlUrl); + writer.WriteLongValue("id", Id); + writer.WriteStringValue("issue_url", IssueUrl); + writer.WriteCollectionOfObjectValues("labels", Labels); + writer.WriteObjectValue("_links", Links); + writer.WriteBoolValue("locked", Locked); + writer.WriteStringValue("merge_commit_sha", MergeCommitSha); + writer.WriteDateTimeOffsetValue("merged_at", MergedAt); + writer.WriteObjectValue("milestone", Milestone); + writer.WriteStringValue("node_id", NodeId); + writer.WriteIntValue("number", Number); + writer.WriteStringValue("patch_url", PatchUrl); + writer.WriteCollectionOfObjectValues("requested_reviewers", RequestedReviewers); + writer.WriteCollectionOfObjectValues("requested_teams", RequestedTeams); + writer.WriteStringValue("review_comments_url", ReviewCommentsUrl); + writer.WriteStringValue("review_comment_url", ReviewCommentUrl); + writer.WriteStringValue("state", State); + writer.WriteStringValue("statuses_url", StatusesUrl); + writer.WriteStringValue("title", Title); + writer.WriteDateTimeOffsetValue("updated_at", UpdatedAt); + writer.WriteStringValue("url", Url); + writer.WriteObjectValue("user", User); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/PullRequestSimple__links.cs b/src/Ayllu.Github.Client/Github/Client/Models/PullRequestSimple__links.cs new file mode 100644 index 0000000..42b9e7b --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/PullRequestSimple__links.cs @@ -0,0 +1,135 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class PullRequestSimple__links : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// Hypermedia Link +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.Link? Comments { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.Link Comments { get; set; } +#endif + /// Hypermedia Link +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.Link? Commits { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.Link Commits { get; set; } +#endif + /// Hypermedia Link +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.Link? Html { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.Link Html { get; set; } +#endif + /// Hypermedia Link +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.Link? Issue { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.Link Issue { get; set; } +#endif + /// Hypermedia Link +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.Link? ReviewComment { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.Link ReviewComment { get; set; } +#endif + /// Hypermedia Link +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.Link? ReviewComments { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.Link ReviewComments { get; set; } +#endif + /// Hypermedia Link +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.Link? Self { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.Link Self { get; set; } +#endif + /// Hypermedia Link +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.Link? Statuses { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.Link Statuses { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public PullRequestSimple__links() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.PullRequestSimple__links CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.PullRequestSimple__links(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "comments", n => { Comments = n.GetObjectValue(global::Ayllu.Github.Client.Models.Link.CreateFromDiscriminatorValue); } }, + { "commits", n => { Commits = n.GetObjectValue(global::Ayllu.Github.Client.Models.Link.CreateFromDiscriminatorValue); } }, + { "html", n => { Html = n.GetObjectValue(global::Ayllu.Github.Client.Models.Link.CreateFromDiscriminatorValue); } }, + { "issue", n => { Issue = n.GetObjectValue(global::Ayllu.Github.Client.Models.Link.CreateFromDiscriminatorValue); } }, + { "review_comment", n => { ReviewComment = n.GetObjectValue(global::Ayllu.Github.Client.Models.Link.CreateFromDiscriminatorValue); } }, + { "review_comments", n => { ReviewComments = n.GetObjectValue(global::Ayllu.Github.Client.Models.Link.CreateFromDiscriminatorValue); } }, + { "self", n => { Self = n.GetObjectValue(global::Ayllu.Github.Client.Models.Link.CreateFromDiscriminatorValue); } }, + { "statuses", n => { Statuses = n.GetObjectValue(global::Ayllu.Github.Client.Models.Link.CreateFromDiscriminatorValue); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteObjectValue("comments", Comments); + writer.WriteObjectValue("commits", Commits); + writer.WriteObjectValue("html", Html); + writer.WriteObjectValue("issue", Issue); + writer.WriteObjectValue("review_comment", ReviewComment); + writer.WriteObjectValue("review_comments", ReviewComments); + writer.WriteObjectValue("self", Self); + writer.WriteObjectValue("statuses", Statuses); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/PullRequestSimple_base.cs b/src/Ayllu.Github.Client/Github/Client/Models/PullRequestSimple_base.cs new file mode 100644 index 0000000..ec521ac --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/PullRequestSimple_base.cs @@ -0,0 +1,105 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class PullRequestSimple_base : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The label property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Label { get; set; } +#nullable restore +#else + public string Label { get; set; } +#endif + /// The ref property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Ref { get; set; } +#nullable restore +#else + public string Ref { get; set; } +#endif + /// A repository on GitHub. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.Repository? Repo { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.Repository Repo { get; set; } +#endif + /// The sha property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Sha { get; set; } +#nullable restore +#else + public string Sha { get; set; } +#endif + /// A GitHub user. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.NullableSimpleUser? User { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.NullableSimpleUser User { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public PullRequestSimple_base() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.PullRequestSimple_base CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.PullRequestSimple_base(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "label", n => { Label = n.GetStringValue(); } }, + { "ref", n => { Ref = n.GetStringValue(); } }, + { "repo", n => { Repo = n.GetObjectValue(global::Ayllu.Github.Client.Models.Repository.CreateFromDiscriminatorValue); } }, + { "sha", n => { Sha = n.GetStringValue(); } }, + { "user", n => { User = n.GetObjectValue(global::Ayllu.Github.Client.Models.NullableSimpleUser.CreateFromDiscriminatorValue); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("label", Label); + writer.WriteStringValue("ref", Ref); + writer.WriteObjectValue("repo", Repo); + writer.WriteStringValue("sha", Sha); + writer.WriteObjectValue("user", User); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/PullRequestSimple_head.cs b/src/Ayllu.Github.Client/Github/Client/Models/PullRequestSimple_head.cs new file mode 100644 index 0000000..e451e95 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/PullRequestSimple_head.cs @@ -0,0 +1,105 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class PullRequestSimple_head : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The label property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Label { get; set; } +#nullable restore +#else + public string Label { get; set; } +#endif + /// The ref property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Ref { get; set; } +#nullable restore +#else + public string Ref { get; set; } +#endif + /// A repository on GitHub. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.Repository? Repo { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.Repository Repo { get; set; } +#endif + /// The sha property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Sha { get; set; } +#nullable restore +#else + public string Sha { get; set; } +#endif + /// A GitHub user. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.NullableSimpleUser? User { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.NullableSimpleUser User { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public PullRequestSimple_head() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.PullRequestSimple_head CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.PullRequestSimple_head(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "label", n => { Label = n.GetStringValue(); } }, + { "ref", n => { Ref = n.GetStringValue(); } }, + { "repo", n => { Repo = n.GetObjectValue(global::Ayllu.Github.Client.Models.Repository.CreateFromDiscriminatorValue); } }, + { "sha", n => { Sha = n.GetStringValue(); } }, + { "user", n => { User = n.GetObjectValue(global::Ayllu.Github.Client.Models.NullableSimpleUser.CreateFromDiscriminatorValue); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("label", Label); + writer.WriteStringValue("ref", Ref); + writer.WriteObjectValue("repo", Repo); + writer.WriteStringValue("sha", Sha); + writer.WriteObjectValue("user", User); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/PullRequestSimple_labels.cs b/src/Ayllu.Github.Client/Github/Client/Models/PullRequestSimple_labels.cs new file mode 100644 index 0000000..879cbfa --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/PullRequestSimple_labels.cs @@ -0,0 +1,113 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class PullRequestSimple_labels : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The color property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Color { get; set; } +#nullable restore +#else + public string Color { get; set; } +#endif + /// The default property + public bool? Default { get; set; } + /// The description property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Description { get; set; } +#nullable restore +#else + public string Description { get; set; } +#endif + /// The id property + public long? Id { get; set; } + /// The name property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Name { get; set; } +#nullable restore +#else + public string Name { get; set; } +#endif + /// The node_id property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? NodeId { get; set; } +#nullable restore +#else + public string NodeId { get; set; } +#endif + /// The url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Url { get; set; } +#nullable restore +#else + public string Url { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public PullRequestSimple_labels() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.PullRequestSimple_labels CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.PullRequestSimple_labels(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "color", n => { Color = n.GetStringValue(); } }, + { "default", n => { Default = n.GetBoolValue(); } }, + { "description", n => { Description = n.GetStringValue(); } }, + { "id", n => { Id = n.GetLongValue(); } }, + { "name", n => { Name = n.GetStringValue(); } }, + { "node_id", n => { NodeId = n.GetStringValue(); } }, + { "url", n => { Url = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("color", Color); + writer.WriteBoolValue("default", Default); + writer.WriteStringValue("description", Description); + writer.WriteLongValue("id", Id); + writer.WriteStringValue("name", Name); + writer.WriteStringValue("node_id", NodeId); + writer.WriteStringValue("url", Url); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/PullRequestWebhook.cs b/src/Ayllu.Github.Client/Github/Client/Models/PullRequestWebhook.cs new file mode 100644 index 0000000..5422903 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/PullRequestWebhook.cs @@ -0,0 +1,78 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class PullRequestWebhook : global::Ayllu.Github.Client.Models.PullRequest, IParsable + #pragma warning restore CS1591 + { + /// Whether to allow auto-merge for pull requests. + public bool? AllowAutoMerge { get; set; } + /// Whether to allow updating the pull request's branch. + public bool? AllowUpdateBranch { get; set; } + /// Whether to delete head branches when pull requests are merged. + public bool? DeleteBranchOnMerge { get; set; } + /// 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. + public global::Ayllu.Github.Client.Models.PullRequestWebhook_merge_commit_message? MergeCommitMessage { get; set; } + /// 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"). + public global::Ayllu.Github.Client.Models.PullRequestWebhook_merge_commit_title? MergeCommitTitle { get; set; } + /// 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. + public global::Ayllu.Github.Client.Models.PullRequestWebhook_squash_merge_commit_message? SquashMergeCommitMessage { get; set; } + /// 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). + public global::Ayllu.Github.Client.Models.PullRequestWebhook_squash_merge_commit_title? SquashMergeCommitTitle { get; set; } + /// Whether a squash merge commit can use the pull request title as default. **This property is closing down. Please use `squash_merge_commit_title` instead.** + public bool? UseSquashPrTitleAsDefault { get; set; } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static new global::Ayllu.Github.Client.Models.PullRequestWebhook CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.PullRequestWebhook(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public override IDictionary> GetFieldDeserializers() + { + return new Dictionary>(base.GetFieldDeserializers()) + { + { "allow_auto_merge", n => { AllowAutoMerge = n.GetBoolValue(); } }, + { "allow_update_branch", n => { AllowUpdateBranch = n.GetBoolValue(); } }, + { "delete_branch_on_merge", n => { DeleteBranchOnMerge = n.GetBoolValue(); } }, + { "merge_commit_message", n => { MergeCommitMessage = n.GetEnumValue(); } }, + { "merge_commit_title", n => { MergeCommitTitle = n.GetEnumValue(); } }, + { "squash_merge_commit_message", n => { SquashMergeCommitMessage = n.GetEnumValue(); } }, + { "squash_merge_commit_title", n => { SquashMergeCommitTitle = n.GetEnumValue(); } }, + { "use_squash_pr_title_as_default", n => { UseSquashPrTitleAsDefault = n.GetBoolValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public override void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + base.Serialize(writer); + writer.WriteBoolValue("allow_auto_merge", AllowAutoMerge); + writer.WriteBoolValue("allow_update_branch", AllowUpdateBranch); + writer.WriteBoolValue("delete_branch_on_merge", DeleteBranchOnMerge); + writer.WriteEnumValue("merge_commit_message", MergeCommitMessage); + writer.WriteEnumValue("merge_commit_title", MergeCommitTitle); + writer.WriteEnumValue("squash_merge_commit_message", SquashMergeCommitMessage); + writer.WriteEnumValue("squash_merge_commit_title", SquashMergeCommitTitle); + writer.WriteBoolValue("use_squash_pr_title_as_default", UseSquashPrTitleAsDefault); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/PullRequestWebhook_merge_commit_message.cs b/src/Ayllu.Github.Client/Github/Client/Models/PullRequestWebhook_merge_commit_message.cs new file mode 100644 index 0000000..ea98955 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/PullRequestWebhook_merge_commit_message.cs @@ -0,0 +1,23 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Models +{ + /// 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. + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public enum PullRequestWebhook_merge_commit_message + { + [EnumMember(Value = "PR_BODY")] + #pragma warning disable CS1591 + PR_BODY, + #pragma warning restore CS1591 + [EnumMember(Value = "PR_TITLE")] + #pragma warning disable CS1591 + PR_TITLE, + #pragma warning restore CS1591 + [EnumMember(Value = "BLANK")] + #pragma warning disable CS1591 + BLANK, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Models/PullRequestWebhook_merge_commit_title.cs b/src/Ayllu.Github.Client/Github/Client/Models/PullRequestWebhook_merge_commit_title.cs new file mode 100644 index 0000000..a6ab949 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/PullRequestWebhook_merge_commit_title.cs @@ -0,0 +1,19 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Models +{ + /// 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"). + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public enum PullRequestWebhook_merge_commit_title + { + [EnumMember(Value = "PR_TITLE")] + #pragma warning disable CS1591 + PR_TITLE, + #pragma warning restore CS1591 + [EnumMember(Value = "MERGE_MESSAGE")] + #pragma warning disable CS1591 + MERGE_MESSAGE, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Models/PullRequestWebhook_squash_merge_commit_message.cs b/src/Ayllu.Github.Client/Github/Client/Models/PullRequestWebhook_squash_merge_commit_message.cs new file mode 100644 index 0000000..cdc626a --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/PullRequestWebhook_squash_merge_commit_message.cs @@ -0,0 +1,23 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Models +{ + /// 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. + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public enum PullRequestWebhook_squash_merge_commit_message + { + [EnumMember(Value = "PR_BODY")] + #pragma warning disable CS1591 + PR_BODY, + #pragma warning restore CS1591 + [EnumMember(Value = "COMMIT_MESSAGES")] + #pragma warning disable CS1591 + COMMIT_MESSAGES, + #pragma warning restore CS1591 + [EnumMember(Value = "BLANK")] + #pragma warning disable CS1591 + BLANK, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Models/PullRequestWebhook_squash_merge_commit_title.cs b/src/Ayllu.Github.Client/Github/Client/Models/PullRequestWebhook_squash_merge_commit_title.cs new file mode 100644 index 0000000..f1d9106 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/PullRequestWebhook_squash_merge_commit_title.cs @@ -0,0 +1,19 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Models +{ + /// 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). + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public enum PullRequestWebhook_squash_merge_commit_title + { + [EnumMember(Value = "PR_TITLE")] + #pragma warning disable CS1591 + PR_TITLE, + #pragma warning restore CS1591 + [EnumMember(Value = "COMMIT_OR_PR_TITLE")] + #pragma warning disable CS1591 + COMMIT_OR_PR_TITLE, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Models/PullRequest__links.cs b/src/Ayllu.Github.Client/Github/Client/Models/PullRequest__links.cs new file mode 100644 index 0000000..31f9845 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/PullRequest__links.cs @@ -0,0 +1,135 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class PullRequest__links : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// Hypermedia Link +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.Link? Comments { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.Link Comments { get; set; } +#endif + /// Hypermedia Link +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.Link? Commits { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.Link Commits { get; set; } +#endif + /// Hypermedia Link +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.Link? Html { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.Link Html { get; set; } +#endif + /// Hypermedia Link +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.Link? Issue { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.Link Issue { get; set; } +#endif + /// Hypermedia Link +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.Link? ReviewComment { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.Link ReviewComment { get; set; } +#endif + /// Hypermedia Link +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.Link? ReviewComments { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.Link ReviewComments { get; set; } +#endif + /// Hypermedia Link +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.Link? Self { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.Link Self { get; set; } +#endif + /// Hypermedia Link +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.Link? Statuses { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.Link Statuses { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public PullRequest__links() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.PullRequest__links CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.PullRequest__links(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "comments", n => { Comments = n.GetObjectValue(global::Ayllu.Github.Client.Models.Link.CreateFromDiscriminatorValue); } }, + { "commits", n => { Commits = n.GetObjectValue(global::Ayllu.Github.Client.Models.Link.CreateFromDiscriminatorValue); } }, + { "html", n => { Html = n.GetObjectValue(global::Ayllu.Github.Client.Models.Link.CreateFromDiscriminatorValue); } }, + { "issue", n => { Issue = n.GetObjectValue(global::Ayllu.Github.Client.Models.Link.CreateFromDiscriminatorValue); } }, + { "review_comment", n => { ReviewComment = n.GetObjectValue(global::Ayllu.Github.Client.Models.Link.CreateFromDiscriminatorValue); } }, + { "review_comments", n => { ReviewComments = n.GetObjectValue(global::Ayllu.Github.Client.Models.Link.CreateFromDiscriminatorValue); } }, + { "self", n => { Self = n.GetObjectValue(global::Ayllu.Github.Client.Models.Link.CreateFromDiscriminatorValue); } }, + { "statuses", n => { Statuses = n.GetObjectValue(global::Ayllu.Github.Client.Models.Link.CreateFromDiscriminatorValue); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteObjectValue("comments", Comments); + writer.WriteObjectValue("commits", Commits); + writer.WriteObjectValue("html", Html); + writer.WriteObjectValue("issue", Issue); + writer.WriteObjectValue("review_comment", ReviewComment); + writer.WriteObjectValue("review_comments", ReviewComments); + writer.WriteObjectValue("self", Self); + writer.WriteObjectValue("statuses", Statuses); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/PullRequest_base.cs b/src/Ayllu.Github.Client/Github/Client/Models/PullRequest_base.cs new file mode 100644 index 0000000..a84b855 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/PullRequest_base.cs @@ -0,0 +1,105 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class PullRequest_base : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The label property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Label { get; set; } +#nullable restore +#else + public string Label { get; set; } +#endif + /// The ref property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Ref { get; set; } +#nullable restore +#else + public string Ref { get; set; } +#endif + /// A repository on GitHub. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.Repository? Repo { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.Repository Repo { get; set; } +#endif + /// The sha property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Sha { get; set; } +#nullable restore +#else + public string Sha { get; set; } +#endif + /// A GitHub user. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.SimpleUser? User { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.SimpleUser User { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public PullRequest_base() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.PullRequest_base CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.PullRequest_base(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "label", n => { Label = n.GetStringValue(); } }, + { "ref", n => { Ref = n.GetStringValue(); } }, + { "repo", n => { Repo = n.GetObjectValue(global::Ayllu.Github.Client.Models.Repository.CreateFromDiscriminatorValue); } }, + { "sha", n => { Sha = n.GetStringValue(); } }, + { "user", n => { User = n.GetObjectValue(global::Ayllu.Github.Client.Models.SimpleUser.CreateFromDiscriminatorValue); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("label", Label); + writer.WriteStringValue("ref", Ref); + writer.WriteObjectValue("repo", Repo); + writer.WriteStringValue("sha", Sha); + writer.WriteObjectValue("user", User); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/PullRequest_head.cs b/src/Ayllu.Github.Client/Github/Client/Models/PullRequest_head.cs new file mode 100644 index 0000000..bc774b5 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/PullRequest_head.cs @@ -0,0 +1,105 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class PullRequest_head : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The label property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Label { get; set; } +#nullable restore +#else + public string Label { get; set; } +#endif + /// The ref property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Ref { get; set; } +#nullable restore +#else + public string Ref { get; set; } +#endif + /// A repository on GitHub. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.Repository? Repo { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.Repository Repo { get; set; } +#endif + /// The sha property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Sha { get; set; } +#nullable restore +#else + public string Sha { get; set; } +#endif + /// A GitHub user. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.SimpleUser? User { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.SimpleUser User { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public PullRequest_head() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.PullRequest_head CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.PullRequest_head(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "label", n => { Label = n.GetStringValue(); } }, + { "ref", n => { Ref = n.GetStringValue(); } }, + { "repo", n => { Repo = n.GetObjectValue(global::Ayllu.Github.Client.Models.Repository.CreateFromDiscriminatorValue); } }, + { "sha", n => { Sha = n.GetStringValue(); } }, + { "user", n => { User = n.GetObjectValue(global::Ayllu.Github.Client.Models.SimpleUser.CreateFromDiscriminatorValue); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("label", Label); + writer.WriteStringValue("ref", Ref); + writer.WriteObjectValue("repo", Repo); + writer.WriteStringValue("sha", Sha); + writer.WriteObjectValue("user", User); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/PullRequest_labels.cs b/src/Ayllu.Github.Client/Github/Client/Models/PullRequest_labels.cs new file mode 100644 index 0000000..58b8635 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/PullRequest_labels.cs @@ -0,0 +1,113 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class PullRequest_labels : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The color property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Color { get; set; } +#nullable restore +#else + public string Color { get; set; } +#endif + /// The default property + public bool? Default { get; set; } + /// The description property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Description { get; set; } +#nullable restore +#else + public string Description { get; set; } +#endif + /// The id property + public long? Id { get; set; } + /// The name property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Name { get; set; } +#nullable restore +#else + public string Name { get; set; } +#endif + /// The node_id property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? NodeId { get; set; } +#nullable restore +#else + public string NodeId { get; set; } +#endif + /// The url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Url { get; set; } +#nullable restore +#else + public string Url { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public PullRequest_labels() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.PullRequest_labels CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.PullRequest_labels(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "color", n => { Color = n.GetStringValue(); } }, + { "default", n => { Default = n.GetBoolValue(); } }, + { "description", n => { Description = n.GetStringValue(); } }, + { "id", n => { Id = n.GetLongValue(); } }, + { "name", n => { Name = n.GetStringValue(); } }, + { "node_id", n => { NodeId = n.GetStringValue(); } }, + { "url", n => { Url = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("color", Color); + writer.WriteBoolValue("default", Default); + writer.WriteStringValue("description", Description); + writer.WriteLongValue("id", Id); + writer.WriteStringValue("name", Name); + writer.WriteStringValue("node_id", NodeId); + writer.WriteStringValue("url", Url); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/PullRequest_state.cs b/src/Ayllu.Github.Client/Github/Client/Models/PullRequest_state.cs new file mode 100644 index 0000000..6a98a3f --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/PullRequest_state.cs @@ -0,0 +1,19 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Models +{ + /// State of this Pull Request. Either `open` or `closed`. + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public enum PullRequest_state + { + [EnumMember(Value = "open")] + #pragma warning disable CS1591 + Open, + #pragma warning restore CS1591 + [EnumMember(Value = "closed")] + #pragma warning disable CS1591 + Closed, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Models/RateLimit.cs b/src/Ayllu.Github.Client/Github/Client/Models/RateLimit.cs new file mode 100644 index 0000000..f6f1dd2 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/RateLimit.cs @@ -0,0 +1,71 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class RateLimit : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The limit property + public int? Limit { get; set; } + /// The remaining property + public int? Remaining { get; set; } + /// The reset property + public int? Reset { get; set; } + /// The used property + public int? Used { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public RateLimit() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.RateLimit CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.RateLimit(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "limit", n => { Limit = n.GetIntValue(); } }, + { "remaining", n => { Remaining = n.GetIntValue(); } }, + { "reset", n => { Reset = n.GetIntValue(); } }, + { "used", n => { Used = n.GetIntValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteIntValue("limit", Limit); + writer.WriteIntValue("remaining", Remaining); + writer.WriteIntValue("reset", Reset); + writer.WriteIntValue("used", Used); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/RateLimitOverview.cs b/src/Ayllu.Github.Client/Github/Client/Models/RateLimitOverview.cs new file mode 100644 index 0000000..16890a1 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/RateLimitOverview.cs @@ -0,0 +1,76 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + /// + /// Rate Limit Overview + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class RateLimitOverview : IAdditionalDataHolder, IParsable + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The rate property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.RateLimit? Rate { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.RateLimit Rate { get; set; } +#endif + /// The resources property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.RateLimitOverview_resources? Resources { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.RateLimitOverview_resources Resources { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public RateLimitOverview() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.RateLimitOverview CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.RateLimitOverview(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "rate", n => { Rate = n.GetObjectValue(global::Ayllu.Github.Client.Models.RateLimit.CreateFromDiscriminatorValue); } }, + { "resources", n => { Resources = n.GetObjectValue(global::Ayllu.Github.Client.Models.RateLimitOverview_resources.CreateFromDiscriminatorValue); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteObjectValue("rate", Rate); + writer.WriteObjectValue("resources", Resources); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/RateLimitOverview_resources.cs b/src/Ayllu.Github.Client/Github/Client/Models/RateLimitOverview_resources.cs new file mode 100644 index 0000000..c60e4a2 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/RateLimitOverview_resources.cs @@ -0,0 +1,175 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class RateLimitOverview_resources : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// The actions_runner_registration property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.RateLimit? ActionsRunnerRegistration { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.RateLimit ActionsRunnerRegistration { get; set; } +#endif + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The code_scanning_autofix property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.RateLimit? CodeScanningAutofix { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.RateLimit CodeScanningAutofix { get; set; } +#endif + /// The code_scanning_upload property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.RateLimit? CodeScanningUpload { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.RateLimit CodeScanningUpload { get; set; } +#endif + /// The code_search property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.RateLimit? CodeSearch { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.RateLimit CodeSearch { get; set; } +#endif + /// The core property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.RateLimit? Core { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.RateLimit Core { get; set; } +#endif + /// The dependency_sbom property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.RateLimit? DependencySbom { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.RateLimit DependencySbom { get; set; } +#endif + /// The dependency_snapshots property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.RateLimit? DependencySnapshots { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.RateLimit DependencySnapshots { get; set; } +#endif + /// The graphql property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.RateLimit? Graphql { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.RateLimit Graphql { get; set; } +#endif + /// The integration_manifest property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.RateLimit? IntegrationManifest { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.RateLimit IntegrationManifest { get; set; } +#endif + /// The scim property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.RateLimit? Scim { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.RateLimit Scim { get; set; } +#endif + /// The search property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.RateLimit? Search { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.RateLimit Search { get; set; } +#endif + /// The source_import property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.RateLimit? SourceImport { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.RateLimit SourceImport { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public RateLimitOverview_resources() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.RateLimitOverview_resources CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.RateLimitOverview_resources(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "actions_runner_registration", n => { ActionsRunnerRegistration = n.GetObjectValue(global::Ayllu.Github.Client.Models.RateLimit.CreateFromDiscriminatorValue); } }, + { "code_scanning_autofix", n => { CodeScanningAutofix = n.GetObjectValue(global::Ayllu.Github.Client.Models.RateLimit.CreateFromDiscriminatorValue); } }, + { "code_scanning_upload", n => { CodeScanningUpload = n.GetObjectValue(global::Ayllu.Github.Client.Models.RateLimit.CreateFromDiscriminatorValue); } }, + { "code_search", n => { CodeSearch = n.GetObjectValue(global::Ayllu.Github.Client.Models.RateLimit.CreateFromDiscriminatorValue); } }, + { "core", n => { Core = n.GetObjectValue(global::Ayllu.Github.Client.Models.RateLimit.CreateFromDiscriminatorValue); } }, + { "dependency_sbom", n => { DependencySbom = n.GetObjectValue(global::Ayllu.Github.Client.Models.RateLimit.CreateFromDiscriminatorValue); } }, + { "dependency_snapshots", n => { DependencySnapshots = n.GetObjectValue(global::Ayllu.Github.Client.Models.RateLimit.CreateFromDiscriminatorValue); } }, + { "graphql", n => { Graphql = n.GetObjectValue(global::Ayllu.Github.Client.Models.RateLimit.CreateFromDiscriminatorValue); } }, + { "integration_manifest", n => { IntegrationManifest = n.GetObjectValue(global::Ayllu.Github.Client.Models.RateLimit.CreateFromDiscriminatorValue); } }, + { "scim", n => { Scim = n.GetObjectValue(global::Ayllu.Github.Client.Models.RateLimit.CreateFromDiscriminatorValue); } }, + { "search", n => { Search = n.GetObjectValue(global::Ayllu.Github.Client.Models.RateLimit.CreateFromDiscriminatorValue); } }, + { "source_import", n => { SourceImport = n.GetObjectValue(global::Ayllu.Github.Client.Models.RateLimit.CreateFromDiscriminatorValue); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteObjectValue("actions_runner_registration", ActionsRunnerRegistration); + writer.WriteObjectValue("code_scanning_autofix", CodeScanningAutofix); + writer.WriteObjectValue("code_scanning_upload", CodeScanningUpload); + writer.WriteObjectValue("code_search", CodeSearch); + writer.WriteObjectValue("core", Core); + writer.WriteObjectValue("dependency_sbom", DependencySbom); + writer.WriteObjectValue("dependency_snapshots", DependencySnapshots); + writer.WriteObjectValue("graphql", Graphql); + writer.WriteObjectValue("integration_manifest", IntegrationManifest); + writer.WriteObjectValue("scim", Scim); + writer.WriteObjectValue("search", Search); + writer.WriteObjectValue("source_import", SourceImport); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/Reaction.cs b/src/Ayllu.Github.Client/Github/Client/Models/Reaction.cs new file mode 100644 index 0000000..2eda680 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/Reaction.cs @@ -0,0 +1,88 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + /// + /// Reactions to conversations provide a way to help people express their feelings more simply and effectively. + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class Reaction : IAdditionalDataHolder, IParsable + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The reaction to use + public global::Ayllu.Github.Client.Models.Reaction_content? Content { get; set; } + /// The created_at property + public DateTimeOffset? CreatedAt { get; set; } + /// The id property + public int? Id { get; set; } + /// The node_id property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? NodeId { get; set; } +#nullable restore +#else + public string NodeId { get; set; } +#endif + /// A GitHub user. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.NullableSimpleUser? User { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.NullableSimpleUser User { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public Reaction() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.Reaction CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.Reaction(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "content", n => { Content = n.GetEnumValue(); } }, + { "created_at", n => { CreatedAt = n.GetDateTimeOffsetValue(); } }, + { "id", n => { Id = n.GetIntValue(); } }, + { "node_id", n => { NodeId = n.GetStringValue(); } }, + { "user", n => { User = n.GetObjectValue(global::Ayllu.Github.Client.Models.NullableSimpleUser.CreateFromDiscriminatorValue); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteEnumValue("content", Content); + writer.WriteDateTimeOffsetValue("created_at", CreatedAt); + writer.WriteIntValue("id", Id); + writer.WriteStringValue("node_id", NodeId); + writer.WriteObjectValue("user", User); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/ReactionRollup.cs b/src/Ayllu.Github.Client/Github/Client/Models/ReactionRollup.cs new file mode 100644 index 0000000..6c88c07 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/ReactionRollup.cs @@ -0,0 +1,101 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class ReactionRollup : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The confused property + public int? Confused { get; set; } + /// The eyes property + public int? Eyes { get; set; } + /// The heart property + public int? Heart { get; set; } + /// The hooray property + public int? Hooray { get; set; } + /// The laugh property + public int? Laugh { get; set; } + /// The minus_1 property + public int? Minus1 { get; set; } + /// The plus_1 property + public int? Plus1 { get; set; } + /// The rocket property + public int? Rocket { get; set; } + /// The total_count property + public int? TotalCount { get; set; } + /// The url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Url { get; set; } +#nullable restore +#else + public string Url { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public ReactionRollup() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.ReactionRollup CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.ReactionRollup(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "confused", n => { Confused = n.GetIntValue(); } }, + { "eyes", n => { Eyes = n.GetIntValue(); } }, + { "heart", n => { Heart = n.GetIntValue(); } }, + { "hooray", n => { Hooray = n.GetIntValue(); } }, + { "laugh", n => { Laugh = n.GetIntValue(); } }, + { "-1", n => { Minus1 = n.GetIntValue(); } }, + { "+1", n => { Plus1 = n.GetIntValue(); } }, + { "rocket", n => { Rocket = n.GetIntValue(); } }, + { "total_count", n => { TotalCount = n.GetIntValue(); } }, + { "url", n => { Url = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteIntValue("confused", Confused); + writer.WriteIntValue("eyes", Eyes); + writer.WriteIntValue("heart", Heart); + writer.WriteIntValue("hooray", Hooray); + writer.WriteIntValue("laugh", Laugh); + writer.WriteIntValue("-1", Minus1); + writer.WriteIntValue("+1", Plus1); + writer.WriteIntValue("rocket", Rocket); + writer.WriteIntValue("total_count", TotalCount); + writer.WriteStringValue("url", Url); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/Reaction_content.cs b/src/Ayllu.Github.Client/Github/Client/Models/Reaction_content.cs new file mode 100644 index 0000000..c13dbf1 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/Reaction_content.cs @@ -0,0 +1,43 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Models +{ + /// The reaction to use + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public enum Reaction_content + { + [EnumMember(Value = "+1")] + #pragma warning disable CS1591 + Plus_1, + #pragma warning restore CS1591 + [EnumMember(Value = "-1")] + #pragma warning disable CS1591 + Minus_1, + #pragma warning restore CS1591 + [EnumMember(Value = "laugh")] + #pragma warning disable CS1591 + Laugh, + #pragma warning restore CS1591 + [EnumMember(Value = "confused")] + #pragma warning disable CS1591 + Confused, + #pragma warning restore CS1591 + [EnumMember(Value = "heart")] + #pragma warning disable CS1591 + Heart, + #pragma warning restore CS1591 + [EnumMember(Value = "hooray")] + #pragma warning disable CS1591 + Hooray, + #pragma warning restore CS1591 + [EnumMember(Value = "rocket")] + #pragma warning disable CS1591 + Rocket, + #pragma warning restore CS1591 + [EnumMember(Value = "eyes")] + #pragma warning disable CS1591 + Eyes, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Models/ReferencedWorkflow.cs b/src/Ayllu.Github.Client/Github/Client/Models/ReferencedWorkflow.cs new file mode 100644 index 0000000..08f1033 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/ReferencedWorkflow.cs @@ -0,0 +1,86 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + /// + /// A workflow referenced/reused by the initial caller workflow + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class ReferencedWorkflow : IAdditionalDataHolder, IParsable + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The path property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Path { get; set; } +#nullable restore +#else + public string Path { get; set; } +#endif + /// The ref property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Ref { get; set; } +#nullable restore +#else + public string Ref { get; set; } +#endif + /// The sha property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Sha { get; set; } +#nullable restore +#else + public string Sha { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public ReferencedWorkflow() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.ReferencedWorkflow CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.ReferencedWorkflow(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "path", n => { Path = n.GetStringValue(); } }, + { "ref", n => { Ref = n.GetStringValue(); } }, + { "sha", n => { Sha = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("path", Path); + writer.WriteStringValue("ref", Ref); + writer.WriteStringValue("sha", Sha); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/ReferrerTraffic.cs b/src/Ayllu.Github.Client/Github/Client/Models/ReferrerTraffic.cs new file mode 100644 index 0000000..a88c63c --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/ReferrerTraffic.cs @@ -0,0 +1,74 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + /// + /// Referrer Traffic + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class ReferrerTraffic : IAdditionalDataHolder, IParsable + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The count property + public int? Count { get; set; } + /// The referrer property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Referrer { get; set; } +#nullable restore +#else + public string Referrer { get; set; } +#endif + /// The uniques property + public int? Uniques { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public ReferrerTraffic() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.ReferrerTraffic CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.ReferrerTraffic(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "count", n => { Count = n.GetIntValue(); } }, + { "referrer", n => { Referrer = n.GetStringValue(); } }, + { "uniques", n => { Uniques = n.GetIntValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteIntValue("count", Count); + writer.WriteStringValue("referrer", Referrer); + writer.WriteIntValue("uniques", Uniques); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/Release.cs b/src/Ayllu.Github.Client/Github/Client/Models/Release.cs new file mode 100644 index 0000000..7fa4ffe --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/Release.cs @@ -0,0 +1,258 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + /// + /// A release. + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class Release : IAdditionalDataHolder, IParsable + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The assets property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? Assets { get; set; } +#nullable restore +#else + public List Assets { get; set; } +#endif + /// The assets_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? AssetsUrl { get; set; } +#nullable restore +#else + public string AssetsUrl { get; set; } +#endif + /// A GitHub user. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.SimpleUser? Author { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.SimpleUser Author { get; set; } +#endif + /// The body property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Body { get; set; } +#nullable restore +#else + public string Body { get; set; } +#endif + /// The body_html property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? BodyHtml { get; set; } +#nullable restore +#else + public string BodyHtml { get; set; } +#endif + /// The body_text property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? BodyText { get; set; } +#nullable restore +#else + public string BodyText { get; set; } +#endif + /// The created_at property + public DateTimeOffset? CreatedAt { get; set; } + /// The URL of the release discussion. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? DiscussionUrl { get; set; } +#nullable restore +#else + public string DiscussionUrl { get; set; } +#endif + /// true to create a draft (unpublished) release, false to create a published one. + public bool? Draft { get; set; } + /// The html_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? HtmlUrl { get; set; } +#nullable restore +#else + public string HtmlUrl { get; set; } +#endif + /// The id property + public int? Id { get; set; } + /// Whether or not the release is immutable. + public bool? Immutable { get; set; } + /// The mentions_count property + public int? MentionsCount { get; set; } + /// The name property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Name { get; set; } +#nullable restore +#else + public string Name { get; set; } +#endif + /// The node_id property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? NodeId { get; set; } +#nullable restore +#else + public string NodeId { get; set; } +#endif + /// Whether to identify the release as a prerelease or a full release. + public bool? Prerelease { get; set; } + /// The published_at property + public DateTimeOffset? PublishedAt { get; set; } + /// The reactions property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.ReactionRollup? Reactions { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.ReactionRollup Reactions { get; set; } +#endif + /// The name of the tag. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? TagName { get; set; } +#nullable restore +#else + public string TagName { get; set; } +#endif + /// The tarball_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? TarballUrl { get; set; } +#nullable restore +#else + public string TarballUrl { get; set; } +#endif + /// Specifies the commitish value that determines where the Git tag is created from. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? TargetCommitish { get; set; } +#nullable restore +#else + public string TargetCommitish { get; set; } +#endif + /// The updated_at property + public DateTimeOffset? UpdatedAt { get; set; } + /// The upload_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? UploadUrl { get; set; } +#nullable restore +#else + public string UploadUrl { get; set; } +#endif + /// The url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Url { get; set; } +#nullable restore +#else + public string Url { get; set; } +#endif + /// The zipball_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? ZipballUrl { get; set; } +#nullable restore +#else + public string ZipballUrl { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public Release() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.Release CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.Release(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "assets", n => { Assets = n.GetCollectionOfObjectValues(global::Ayllu.Github.Client.Models.ReleaseAsset.CreateFromDiscriminatorValue)?.AsList(); } }, + { "assets_url", n => { AssetsUrl = n.GetStringValue(); } }, + { "author", n => { Author = n.GetObjectValue(global::Ayllu.Github.Client.Models.SimpleUser.CreateFromDiscriminatorValue); } }, + { "body", n => { Body = n.GetStringValue(); } }, + { "body_html", n => { BodyHtml = n.GetStringValue(); } }, + { "body_text", n => { BodyText = n.GetStringValue(); } }, + { "created_at", n => { CreatedAt = n.GetDateTimeOffsetValue(); } }, + { "discussion_url", n => { DiscussionUrl = n.GetStringValue(); } }, + { "draft", n => { Draft = n.GetBoolValue(); } }, + { "html_url", n => { HtmlUrl = n.GetStringValue(); } }, + { "id", n => { Id = n.GetIntValue(); } }, + { "immutable", n => { Immutable = n.GetBoolValue(); } }, + { "mentions_count", n => { MentionsCount = n.GetIntValue(); } }, + { "name", n => { Name = n.GetStringValue(); } }, + { "node_id", n => { NodeId = n.GetStringValue(); } }, + { "prerelease", n => { Prerelease = n.GetBoolValue(); } }, + { "published_at", n => { PublishedAt = n.GetDateTimeOffsetValue(); } }, + { "reactions", n => { Reactions = n.GetObjectValue(global::Ayllu.Github.Client.Models.ReactionRollup.CreateFromDiscriminatorValue); } }, + { "tag_name", n => { TagName = n.GetStringValue(); } }, + { "tarball_url", n => { TarballUrl = n.GetStringValue(); } }, + { "target_commitish", n => { TargetCommitish = n.GetStringValue(); } }, + { "updated_at", n => { UpdatedAt = n.GetDateTimeOffsetValue(); } }, + { "upload_url", n => { UploadUrl = n.GetStringValue(); } }, + { "url", n => { Url = n.GetStringValue(); } }, + { "zipball_url", n => { ZipballUrl = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteCollectionOfObjectValues("assets", Assets); + writer.WriteStringValue("assets_url", AssetsUrl); + writer.WriteObjectValue("author", Author); + writer.WriteStringValue("body", Body); + writer.WriteStringValue("body_html", BodyHtml); + writer.WriteStringValue("body_text", BodyText); + writer.WriteDateTimeOffsetValue("created_at", CreatedAt); + writer.WriteStringValue("discussion_url", DiscussionUrl); + writer.WriteBoolValue("draft", Draft); + writer.WriteStringValue("html_url", HtmlUrl); + writer.WriteIntValue("id", Id); + writer.WriteBoolValue("immutable", Immutable); + writer.WriteIntValue("mentions_count", MentionsCount); + writer.WriteStringValue("name", Name); + writer.WriteStringValue("node_id", NodeId); + writer.WriteBoolValue("prerelease", Prerelease); + writer.WriteDateTimeOffsetValue("published_at", PublishedAt); + writer.WriteObjectValue("reactions", Reactions); + writer.WriteStringValue("tag_name", TagName); + writer.WriteStringValue("tarball_url", TarballUrl); + writer.WriteStringValue("target_commitish", TargetCommitish); + writer.WriteDateTimeOffsetValue("updated_at", UpdatedAt); + writer.WriteStringValue("upload_url", UploadUrl); + writer.WriteStringValue("url", Url); + writer.WriteStringValue("zipball_url", ZipballUrl); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/ReleaseAsset.cs b/src/Ayllu.Github.Client/Github/Client/Models/ReleaseAsset.cs new file mode 100644 index 0000000..b4c384b --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/ReleaseAsset.cs @@ -0,0 +1,160 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + /// + /// Data related to a release. + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class ReleaseAsset : IAdditionalDataHolder, IParsable + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The browser_download_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? BrowserDownloadUrl { get; set; } +#nullable restore +#else + public string BrowserDownloadUrl { get; set; } +#endif + /// The content_type property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? ContentType { get; set; } +#nullable restore +#else + public string ContentType { get; set; } +#endif + /// The created_at property + public DateTimeOffset? CreatedAt { get; set; } + /// The digest property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Digest { get; set; } +#nullable restore +#else + public string Digest { get; set; } +#endif + /// The download_count property + public int? DownloadCount { get; set; } + /// The id property + public int? Id { get; set; } + /// The label property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Label { get; set; } +#nullable restore +#else + public string Label { get; set; } +#endif + /// The file name of the asset. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Name { get; set; } +#nullable restore +#else + public string Name { get; set; } +#endif + /// The node_id property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? NodeId { get; set; } +#nullable restore +#else + public string NodeId { get; set; } +#endif + /// The size property + public int? Size { get; set; } + /// State of the release asset. + public global::Ayllu.Github.Client.Models.ReleaseAsset_state? State { get; set; } + /// The updated_at property + public DateTimeOffset? UpdatedAt { get; set; } + /// A GitHub user. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.NullableSimpleUser? Uploader { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.NullableSimpleUser Uploader { get; set; } +#endif + /// The url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Url { get; set; } +#nullable restore +#else + public string Url { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public ReleaseAsset() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.ReleaseAsset CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.ReleaseAsset(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "browser_download_url", n => { BrowserDownloadUrl = n.GetStringValue(); } }, + { "content_type", n => { ContentType = n.GetStringValue(); } }, + { "created_at", n => { CreatedAt = n.GetDateTimeOffsetValue(); } }, + { "digest", n => { Digest = n.GetStringValue(); } }, + { "download_count", n => { DownloadCount = n.GetIntValue(); } }, + { "id", n => { Id = n.GetIntValue(); } }, + { "label", n => { Label = n.GetStringValue(); } }, + { "name", n => { Name = n.GetStringValue(); } }, + { "node_id", n => { NodeId = n.GetStringValue(); } }, + { "size", n => { Size = n.GetIntValue(); } }, + { "state", n => { State = n.GetEnumValue(); } }, + { "updated_at", n => { UpdatedAt = n.GetDateTimeOffsetValue(); } }, + { "uploader", n => { Uploader = n.GetObjectValue(global::Ayllu.Github.Client.Models.NullableSimpleUser.CreateFromDiscriminatorValue); } }, + { "url", n => { Url = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("browser_download_url", BrowserDownloadUrl); + writer.WriteStringValue("content_type", ContentType); + writer.WriteDateTimeOffsetValue("created_at", CreatedAt); + writer.WriteStringValue("digest", Digest); + writer.WriteIntValue("download_count", DownloadCount); + writer.WriteIntValue("id", Id); + writer.WriteStringValue("label", Label); + writer.WriteStringValue("name", Name); + writer.WriteStringValue("node_id", NodeId); + writer.WriteIntValue("size", Size); + writer.WriteEnumValue("state", State); + writer.WriteDateTimeOffsetValue("updated_at", UpdatedAt); + writer.WriteObjectValue("uploader", Uploader); + writer.WriteStringValue("url", Url); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/ReleaseAsset_state.cs b/src/Ayllu.Github.Client/Github/Client/Models/ReleaseAsset_state.cs new file mode 100644 index 0000000..eaffa90 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/ReleaseAsset_state.cs @@ -0,0 +1,19 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Models +{ + /// State of the release asset. + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public enum ReleaseAsset_state + { + [EnumMember(Value = "uploaded")] + #pragma warning disable CS1591 + Uploaded, + #pragma warning restore CS1591 + [EnumMember(Value = "open")] + #pragma warning disable CS1591 + Open, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Models/ReleaseNotesContent.cs b/src/Ayllu.Github.Client/Github/Client/Models/ReleaseNotesContent.cs new file mode 100644 index 0000000..2403a19 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/ReleaseNotesContent.cs @@ -0,0 +1,76 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + /// + /// Generated name and body describing a release + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class ReleaseNotesContent : IAdditionalDataHolder, IParsable + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The generated body describing the contents of the release supporting markdown formatting +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Body { get; set; } +#nullable restore +#else + public string Body { get; set; } +#endif + /// The generated name of the release +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Name { get; set; } +#nullable restore +#else + public string Name { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public ReleaseNotesContent() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.ReleaseNotesContent CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.ReleaseNotesContent(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "body", n => { Body = n.GetStringValue(); } }, + { "name", n => { Name = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("body", Body); + writer.WriteStringValue("name", Name); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/RemovedFromProjectIssueEvent.cs b/src/Ayllu.Github.Client/Github/Client/Models/RemovedFromProjectIssueEvent.cs new file mode 100644 index 0000000..560c4b8 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/RemovedFromProjectIssueEvent.cs @@ -0,0 +1,150 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + /// + /// Removed from Project Issue Event + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class RemovedFromProjectIssueEvent : IAdditionalDataHolder, IParsable + { + /// A GitHub user. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.SimpleUser? Actor { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.SimpleUser Actor { get; set; } +#endif + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The commit_id property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? CommitId { get; set; } +#nullable restore +#else + public string CommitId { get; set; } +#endif + /// The commit_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? CommitUrl { get; set; } +#nullable restore +#else + public string CommitUrl { get; set; } +#endif + /// The created_at property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? CreatedAt { get; set; } +#nullable restore +#else + public string CreatedAt { get; set; } +#endif + /// The event property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Event { get; set; } +#nullable restore +#else + public string Event { get; set; } +#endif + /// The id property + public int? Id { get; set; } + /// The node_id property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? NodeId { get; set; } +#nullable restore +#else + public string NodeId { get; set; } +#endif + /// 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. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.NullableIntegration? PerformedViaGithubApp { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.NullableIntegration PerformedViaGithubApp { get; set; } +#endif + /// The project_card property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.RemovedFromProjectIssueEvent_project_card? ProjectCard { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.RemovedFromProjectIssueEvent_project_card ProjectCard { get; set; } +#endif + /// The url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Url { get; set; } +#nullable restore +#else + public string Url { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public RemovedFromProjectIssueEvent() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.RemovedFromProjectIssueEvent CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.RemovedFromProjectIssueEvent(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "actor", n => { Actor = n.GetObjectValue(global::Ayllu.Github.Client.Models.SimpleUser.CreateFromDiscriminatorValue); } }, + { "commit_id", n => { CommitId = n.GetStringValue(); } }, + { "commit_url", n => { CommitUrl = n.GetStringValue(); } }, + { "created_at", n => { CreatedAt = n.GetStringValue(); } }, + { "event", n => { Event = n.GetStringValue(); } }, + { "id", n => { Id = n.GetIntValue(); } }, + { "node_id", n => { NodeId = n.GetStringValue(); } }, + { "performed_via_github_app", n => { PerformedViaGithubApp = n.GetObjectValue(global::Ayllu.Github.Client.Models.NullableIntegration.CreateFromDiscriminatorValue); } }, + { "project_card", n => { ProjectCard = n.GetObjectValue(global::Ayllu.Github.Client.Models.RemovedFromProjectIssueEvent_project_card.CreateFromDiscriminatorValue); } }, + { "url", n => { Url = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteObjectValue("actor", Actor); + writer.WriteStringValue("commit_id", CommitId); + writer.WriteStringValue("commit_url", CommitUrl); + writer.WriteStringValue("created_at", CreatedAt); + writer.WriteStringValue("event", Event); + writer.WriteIntValue("id", Id); + writer.WriteStringValue("node_id", NodeId); + writer.WriteObjectValue("performed_via_github_app", PerformedViaGithubApp); + writer.WriteObjectValue("project_card", ProjectCard); + writer.WriteStringValue("url", Url); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/RemovedFromProjectIssueEvent_project_card.cs b/src/Ayllu.Github.Client/Github/Client/Models/RemovedFromProjectIssueEvent_project_card.cs new file mode 100644 index 0000000..6f2071e --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/RemovedFromProjectIssueEvent_project_card.cs @@ -0,0 +1,103 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class RemovedFromProjectIssueEvent_project_card : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The column_name property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? ColumnName { get; set; } +#nullable restore +#else + public string ColumnName { get; set; } +#endif + /// The id property + public int? Id { get; set; } + /// The previous_column_name property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? PreviousColumnName { get; set; } +#nullable restore +#else + public string PreviousColumnName { get; set; } +#endif + /// The project_id property + public int? ProjectId { get; set; } + /// The project_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? ProjectUrl { get; set; } +#nullable restore +#else + public string ProjectUrl { get; set; } +#endif + /// The url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Url { get; set; } +#nullable restore +#else + public string Url { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public RemovedFromProjectIssueEvent_project_card() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.RemovedFromProjectIssueEvent_project_card CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.RemovedFromProjectIssueEvent_project_card(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "column_name", n => { ColumnName = n.GetStringValue(); } }, + { "id", n => { Id = n.GetIntValue(); } }, + { "previous_column_name", n => { PreviousColumnName = n.GetStringValue(); } }, + { "project_id", n => { ProjectId = n.GetIntValue(); } }, + { "project_url", n => { ProjectUrl = n.GetStringValue(); } }, + { "url", n => { Url = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("column_name", ColumnName); + writer.WriteIntValue("id", Id); + writer.WriteStringValue("previous_column_name", PreviousColumnName); + writer.WriteIntValue("project_id", ProjectId); + writer.WriteStringValue("project_url", ProjectUrl); + writer.WriteStringValue("url", Url); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/RenamedIssueEvent.cs b/src/Ayllu.Github.Client/Github/Client/Models/RenamedIssueEvent.cs new file mode 100644 index 0000000..1397d17 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/RenamedIssueEvent.cs @@ -0,0 +1,150 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + /// + /// Renamed Issue Event + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class RenamedIssueEvent : IAdditionalDataHolder, IParsable + { + /// A GitHub user. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.SimpleUser? Actor { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.SimpleUser Actor { get; set; } +#endif + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The commit_id property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? CommitId { get; set; } +#nullable restore +#else + public string CommitId { get; set; } +#endif + /// The commit_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? CommitUrl { get; set; } +#nullable restore +#else + public string CommitUrl { get; set; } +#endif + /// The created_at property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? CreatedAt { get; set; } +#nullable restore +#else + public string CreatedAt { get; set; } +#endif + /// The event property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Event { get; set; } +#nullable restore +#else + public string Event { get; set; } +#endif + /// The id property + public int? Id { get; set; } + /// The node_id property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? NodeId { get; set; } +#nullable restore +#else + public string NodeId { get; set; } +#endif + /// 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. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.NullableIntegration? PerformedViaGithubApp { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.NullableIntegration PerformedViaGithubApp { get; set; } +#endif + /// The rename property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.RenamedIssueEvent_rename? Rename { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.RenamedIssueEvent_rename Rename { get; set; } +#endif + /// The url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Url { get; set; } +#nullable restore +#else + public string Url { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public RenamedIssueEvent() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.RenamedIssueEvent CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.RenamedIssueEvent(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "actor", n => { Actor = n.GetObjectValue(global::Ayllu.Github.Client.Models.SimpleUser.CreateFromDiscriminatorValue); } }, + { "commit_id", n => { CommitId = n.GetStringValue(); } }, + { "commit_url", n => { CommitUrl = n.GetStringValue(); } }, + { "created_at", n => { CreatedAt = n.GetStringValue(); } }, + { "event", n => { Event = n.GetStringValue(); } }, + { "id", n => { Id = n.GetIntValue(); } }, + { "node_id", n => { NodeId = n.GetStringValue(); } }, + { "performed_via_github_app", n => { PerformedViaGithubApp = n.GetObjectValue(global::Ayllu.Github.Client.Models.NullableIntegration.CreateFromDiscriminatorValue); } }, + { "rename", n => { Rename = n.GetObjectValue(global::Ayllu.Github.Client.Models.RenamedIssueEvent_rename.CreateFromDiscriminatorValue); } }, + { "url", n => { Url = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteObjectValue("actor", Actor); + writer.WriteStringValue("commit_id", CommitId); + writer.WriteStringValue("commit_url", CommitUrl); + writer.WriteStringValue("created_at", CreatedAt); + writer.WriteStringValue("event", Event); + writer.WriteIntValue("id", Id); + writer.WriteStringValue("node_id", NodeId); + writer.WriteObjectValue("performed_via_github_app", PerformedViaGithubApp); + writer.WriteObjectValue("rename", Rename); + writer.WriteStringValue("url", Url); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/RenamedIssueEvent_rename.cs b/src/Ayllu.Github.Client/Github/Client/Models/RenamedIssueEvent_rename.cs new file mode 100644 index 0000000..639c885 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/RenamedIssueEvent_rename.cs @@ -0,0 +1,75 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class RenamedIssueEvent_rename : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The from property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? From { get; set; } +#nullable restore +#else + public string From { get; set; } +#endif + /// The to property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? To { get; set; } +#nullable restore +#else + public string To { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public RenamedIssueEvent_rename() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.RenamedIssueEvent_rename CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.RenamedIssueEvent_rename(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "from", n => { From = n.GetStringValue(); } }, + { "to", n => { To = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("from", From); + writer.WriteStringValue("to", To); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/RepoCodespacesSecret.cs b/src/Ayllu.Github.Client/Github/Client/Models/RepoCodespacesSecret.cs new file mode 100644 index 0000000..197a293 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/RepoCodespacesSecret.cs @@ -0,0 +1,74 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + /// + /// Set repository secrets for GitHub Codespaces. + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class RepoCodespacesSecret : IAdditionalDataHolder, IParsable + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The created_at property + public DateTimeOffset? CreatedAt { get; set; } + /// The name of the secret. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Name { get; set; } +#nullable restore +#else + public string Name { get; set; } +#endif + /// The updated_at property + public DateTimeOffset? UpdatedAt { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public RepoCodespacesSecret() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.RepoCodespacesSecret CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.RepoCodespacesSecret(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "created_at", n => { CreatedAt = n.GetDateTimeOffsetValue(); } }, + { "name", n => { Name = n.GetStringValue(); } }, + { "updated_at", n => { UpdatedAt = n.GetDateTimeOffsetValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteDateTimeOffsetValue("created_at", CreatedAt); + writer.WriteStringValue("name", Name); + writer.WriteDateTimeOffsetValue("updated_at", UpdatedAt); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/RepoSearchResultItem.cs b/src/Ayllu.Github.Client/Github/Client/Models/RepoSearchResultItem.cs new file mode 100644 index 0000000..3c0538a --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/RepoSearchResultItem.cs @@ -0,0 +1,760 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + /// + /// Repo Search Result Item + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class RepoSearchResultItem : IAdditionalDataHolder, IParsable + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The allow_auto_merge property + public bool? AllowAutoMerge { get; set; } + /// The allow_forking property + public bool? AllowForking { get; set; } + /// The allow_merge_commit property + public bool? AllowMergeCommit { get; set; } + /// The allow_rebase_merge property + public bool? AllowRebaseMerge { get; set; } + /// The allow_squash_merge property + public bool? AllowSquashMerge { get; set; } + /// The archived property + public bool? Archived { get; set; } + /// The archive_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? ArchiveUrl { get; set; } +#nullable restore +#else + public string ArchiveUrl { get; set; } +#endif + /// The assignees_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? AssigneesUrl { get; set; } +#nullable restore +#else + public string AssigneesUrl { get; set; } +#endif + /// The blobs_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? BlobsUrl { get; set; } +#nullable restore +#else + public string BlobsUrl { get; set; } +#endif + /// The branches_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? BranchesUrl { get; set; } +#nullable restore +#else + public string BranchesUrl { get; set; } +#endif + /// The clone_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? CloneUrl { get; set; } +#nullable restore +#else + public string CloneUrl { get; set; } +#endif + /// The collaborators_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? CollaboratorsUrl { get; set; } +#nullable restore +#else + public string CollaboratorsUrl { get; set; } +#endif + /// The comments_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? CommentsUrl { get; set; } +#nullable restore +#else + public string CommentsUrl { get; set; } +#endif + /// The commits_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? CommitsUrl { get; set; } +#nullable restore +#else + public string CommitsUrl { get; set; } +#endif + /// The compare_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? CompareUrl { get; set; } +#nullable restore +#else + public string CompareUrl { get; set; } +#endif + /// The contents_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? ContentsUrl { get; set; } +#nullable restore +#else + public string ContentsUrl { get; set; } +#endif + /// The contributors_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? ContributorsUrl { get; set; } +#nullable restore +#else + public string ContributorsUrl { get; set; } +#endif + /// The created_at property + public DateTimeOffset? CreatedAt { get; set; } + /// The default_branch property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? DefaultBranch { get; set; } +#nullable restore +#else + public string DefaultBranch { get; set; } +#endif + /// The delete_branch_on_merge property + public bool? DeleteBranchOnMerge { get; set; } + /// The deployments_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? DeploymentsUrl { get; set; } +#nullable restore +#else + public string DeploymentsUrl { get; set; } +#endif + /// The description property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Description { get; set; } +#nullable restore +#else + public string Description { get; set; } +#endif + /// Returns whether or not this repository disabled. + public bool? Disabled { get; set; } + /// The downloads_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? DownloadsUrl { get; set; } +#nullable restore +#else + public string DownloadsUrl { get; set; } +#endif + /// The events_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? EventsUrl { get; set; } +#nullable restore +#else + public string EventsUrl { get; set; } +#endif + /// The fork property + public bool? Fork { get; set; } + /// The forks property + public int? Forks { get; set; } + /// The forks_count property + public int? ForksCount { get; set; } + /// The forks_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? ForksUrl { get; set; } +#nullable restore +#else + public string ForksUrl { get; set; } +#endif + /// The full_name property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? FullName { get; set; } +#nullable restore +#else + public string FullName { get; set; } +#endif + /// The git_commits_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? GitCommitsUrl { get; set; } +#nullable restore +#else + public string GitCommitsUrl { get; set; } +#endif + /// The git_refs_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? GitRefsUrl { get; set; } +#nullable restore +#else + public string GitRefsUrl { get; set; } +#endif + /// The git_tags_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? GitTagsUrl { get; set; } +#nullable restore +#else + public string GitTagsUrl { get; set; } +#endif + /// The git_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? GitUrl { get; set; } +#nullable restore +#else + public string GitUrl { get; set; } +#endif + /// The has_discussions property + public bool? HasDiscussions { get; set; } + /// The has_downloads property + public bool? HasDownloads { get; set; } + /// The has_issues property + public bool? HasIssues { get; set; } + /// The has_pages property + public bool? HasPages { get; set; } + /// The has_projects property + public bool? HasProjects { get; set; } + /// The has_wiki property + public bool? HasWiki { get; set; } + /// The homepage property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Homepage { get; set; } +#nullable restore +#else + public string Homepage { get; set; } +#endif + /// The hooks_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? HooksUrl { get; set; } +#nullable restore +#else + public string HooksUrl { get; set; } +#endif + /// The html_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? HtmlUrl { get; set; } +#nullable restore +#else + public string HtmlUrl { get; set; } +#endif + /// The id property + public int? Id { get; set; } + /// The issue_comment_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? IssueCommentUrl { get; set; } +#nullable restore +#else + public string IssueCommentUrl { get; set; } +#endif + /// The issue_events_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? IssueEventsUrl { get; set; } +#nullable restore +#else + public string IssueEventsUrl { get; set; } +#endif + /// The issues_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? IssuesUrl { get; set; } +#nullable restore +#else + public string IssuesUrl { get; set; } +#endif + /// The is_template property + public bool? IsTemplate { get; set; } + /// The keys_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? KeysUrl { get; set; } +#nullable restore +#else + public string KeysUrl { get; set; } +#endif + /// The labels_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? LabelsUrl { get; set; } +#nullable restore +#else + public string LabelsUrl { get; set; } +#endif + /// The language property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Language { get; set; } +#nullable restore +#else + public string Language { get; set; } +#endif + /// The languages_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? LanguagesUrl { get; set; } +#nullable restore +#else + public string LanguagesUrl { get; set; } +#endif + /// License Simple +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.NullableLicenseSimple? License { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.NullableLicenseSimple License { get; set; } +#endif + /// The master_branch property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? MasterBranch { get; set; } +#nullable restore +#else + public string MasterBranch { get; set; } +#endif + /// The merges_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? MergesUrl { get; set; } +#nullable restore +#else + public string MergesUrl { get; set; } +#endif + /// The milestones_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? MilestonesUrl { get; set; } +#nullable restore +#else + public string MilestonesUrl { get; set; } +#endif + /// The mirror_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? MirrorUrl { get; set; } +#nullable restore +#else + public string MirrorUrl { get; set; } +#endif + /// The name property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Name { get; set; } +#nullable restore +#else + public string Name { get; set; } +#endif + /// The node_id property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? NodeId { get; set; } +#nullable restore +#else + public string NodeId { get; set; } +#endif + /// The notifications_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? NotificationsUrl { get; set; } +#nullable restore +#else + public string NotificationsUrl { get; set; } +#endif + /// The open_issues property + public int? OpenIssues { get; set; } + /// The open_issues_count property + public int? OpenIssuesCount { get; set; } + /// A GitHub user. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.NullableSimpleUser? Owner { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.NullableSimpleUser Owner { get; set; } +#endif + /// The permissions property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.RepoSearchResultItem_permissions? Permissions { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.RepoSearchResultItem_permissions Permissions { get; set; } +#endif + /// The private property + public bool? Private { get; set; } + /// The pulls_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? PullsUrl { get; set; } +#nullable restore +#else + public string PullsUrl { get; set; } +#endif + /// The pushed_at property + public DateTimeOffset? PushedAt { get; set; } + /// The releases_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? ReleasesUrl { get; set; } +#nullable restore +#else + public string ReleasesUrl { get; set; } +#endif + /// The score property + public double? Score { get; set; } + /// The size property + public int? Size { get; set; } + /// The ssh_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? SshUrl { get; set; } +#nullable restore +#else + public string SshUrl { get; set; } +#endif + /// The stargazers_count property + public int? StargazersCount { get; set; } + /// The stargazers_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? StargazersUrl { get; set; } +#nullable restore +#else + public string StargazersUrl { get; set; } +#endif + /// The statuses_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? StatusesUrl { get; set; } +#nullable restore +#else + public string StatusesUrl { get; set; } +#endif + /// The subscribers_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? SubscribersUrl { get; set; } +#nullable restore +#else + public string SubscribersUrl { get; set; } +#endif + /// The subscription_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? SubscriptionUrl { get; set; } +#nullable restore +#else + public string SubscriptionUrl { get; set; } +#endif + /// The svn_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? SvnUrl { get; set; } +#nullable restore +#else + public string SvnUrl { get; set; } +#endif + /// The tags_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? TagsUrl { get; set; } +#nullable restore +#else + public string TagsUrl { get; set; } +#endif + /// The teams_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? TeamsUrl { get; set; } +#nullable restore +#else + public string TeamsUrl { get; set; } +#endif + /// The temp_clone_token property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? TempCloneToken { get; set; } +#nullable restore +#else + public string TempCloneToken { get; set; } +#endif + /// The text_matches property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? TextMatches { get; set; } +#nullable restore +#else + public List TextMatches { get; set; } +#endif + /// The topics property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? Topics { get; set; } +#nullable restore +#else + public List Topics { get; set; } +#endif + /// The trees_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? TreesUrl { get; set; } +#nullable restore +#else + public string TreesUrl { get; set; } +#endif + /// The updated_at property + public DateTimeOffset? UpdatedAt { get; set; } + /// The url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Url { get; set; } +#nullable restore +#else + public string Url { get; set; } +#endif + /// The repository visibility: public, private, or internal. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Visibility { get; set; } +#nullable restore +#else + public string Visibility { get; set; } +#endif + /// The watchers property + public int? Watchers { get; set; } + /// The watchers_count property + public int? WatchersCount { get; set; } + /// The web_commit_signoff_required property + public bool? WebCommitSignoffRequired { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public RepoSearchResultItem() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.RepoSearchResultItem CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.RepoSearchResultItem(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "allow_auto_merge", n => { AllowAutoMerge = n.GetBoolValue(); } }, + { "allow_forking", n => { AllowForking = n.GetBoolValue(); } }, + { "allow_merge_commit", n => { AllowMergeCommit = n.GetBoolValue(); } }, + { "allow_rebase_merge", n => { AllowRebaseMerge = n.GetBoolValue(); } }, + { "allow_squash_merge", n => { AllowSquashMerge = n.GetBoolValue(); } }, + { "archive_url", n => { ArchiveUrl = n.GetStringValue(); } }, + { "archived", n => { Archived = n.GetBoolValue(); } }, + { "assignees_url", n => { AssigneesUrl = n.GetStringValue(); } }, + { "blobs_url", n => { BlobsUrl = n.GetStringValue(); } }, + { "branches_url", n => { BranchesUrl = n.GetStringValue(); } }, + { "clone_url", n => { CloneUrl = n.GetStringValue(); } }, + { "collaborators_url", n => { CollaboratorsUrl = n.GetStringValue(); } }, + { "comments_url", n => { CommentsUrl = n.GetStringValue(); } }, + { "commits_url", n => { CommitsUrl = n.GetStringValue(); } }, + { "compare_url", n => { CompareUrl = n.GetStringValue(); } }, + { "contents_url", n => { ContentsUrl = n.GetStringValue(); } }, + { "contributors_url", n => { ContributorsUrl = n.GetStringValue(); } }, + { "created_at", n => { CreatedAt = n.GetDateTimeOffsetValue(); } }, + { "default_branch", n => { DefaultBranch = n.GetStringValue(); } }, + { "delete_branch_on_merge", n => { DeleteBranchOnMerge = n.GetBoolValue(); } }, + { "deployments_url", n => { DeploymentsUrl = n.GetStringValue(); } }, + { "description", n => { Description = n.GetStringValue(); } }, + { "disabled", n => { Disabled = n.GetBoolValue(); } }, + { "downloads_url", n => { DownloadsUrl = n.GetStringValue(); } }, + { "events_url", n => { EventsUrl = n.GetStringValue(); } }, + { "fork", n => { Fork = n.GetBoolValue(); } }, + { "forks", n => { Forks = n.GetIntValue(); } }, + { "forks_count", n => { ForksCount = n.GetIntValue(); } }, + { "forks_url", n => { ForksUrl = n.GetStringValue(); } }, + { "full_name", n => { FullName = n.GetStringValue(); } }, + { "git_commits_url", n => { GitCommitsUrl = n.GetStringValue(); } }, + { "git_refs_url", n => { GitRefsUrl = n.GetStringValue(); } }, + { "git_tags_url", n => { GitTagsUrl = n.GetStringValue(); } }, + { "git_url", n => { GitUrl = n.GetStringValue(); } }, + { "has_discussions", n => { HasDiscussions = n.GetBoolValue(); } }, + { "has_downloads", n => { HasDownloads = n.GetBoolValue(); } }, + { "has_issues", n => { HasIssues = n.GetBoolValue(); } }, + { "has_pages", n => { HasPages = n.GetBoolValue(); } }, + { "has_projects", n => { HasProjects = n.GetBoolValue(); } }, + { "has_wiki", n => { HasWiki = n.GetBoolValue(); } }, + { "homepage", n => { Homepage = n.GetStringValue(); } }, + { "hooks_url", n => { HooksUrl = n.GetStringValue(); } }, + { "html_url", n => { HtmlUrl = n.GetStringValue(); } }, + { "id", n => { Id = n.GetIntValue(); } }, + { "is_template", n => { IsTemplate = n.GetBoolValue(); } }, + { "issue_comment_url", n => { IssueCommentUrl = n.GetStringValue(); } }, + { "issue_events_url", n => { IssueEventsUrl = n.GetStringValue(); } }, + { "issues_url", n => { IssuesUrl = n.GetStringValue(); } }, + { "keys_url", n => { KeysUrl = n.GetStringValue(); } }, + { "labels_url", n => { LabelsUrl = n.GetStringValue(); } }, + { "language", n => { Language = n.GetStringValue(); } }, + { "languages_url", n => { LanguagesUrl = n.GetStringValue(); } }, + { "license", n => { License = n.GetObjectValue(global::Ayllu.Github.Client.Models.NullableLicenseSimple.CreateFromDiscriminatorValue); } }, + { "master_branch", n => { MasterBranch = n.GetStringValue(); } }, + { "merges_url", n => { MergesUrl = n.GetStringValue(); } }, + { "milestones_url", n => { MilestonesUrl = n.GetStringValue(); } }, + { "mirror_url", n => { MirrorUrl = n.GetStringValue(); } }, + { "name", n => { Name = n.GetStringValue(); } }, + { "node_id", n => { NodeId = n.GetStringValue(); } }, + { "notifications_url", n => { NotificationsUrl = n.GetStringValue(); } }, + { "open_issues", n => { OpenIssues = n.GetIntValue(); } }, + { "open_issues_count", n => { OpenIssuesCount = n.GetIntValue(); } }, + { "owner", n => { Owner = n.GetObjectValue(global::Ayllu.Github.Client.Models.NullableSimpleUser.CreateFromDiscriminatorValue); } }, + { "permissions", n => { Permissions = n.GetObjectValue(global::Ayllu.Github.Client.Models.RepoSearchResultItem_permissions.CreateFromDiscriminatorValue); } }, + { "private", n => { Private = n.GetBoolValue(); } }, + { "pulls_url", n => { PullsUrl = n.GetStringValue(); } }, + { "pushed_at", n => { PushedAt = n.GetDateTimeOffsetValue(); } }, + { "releases_url", n => { ReleasesUrl = n.GetStringValue(); } }, + { "score", n => { Score = n.GetDoubleValue(); } }, + { "size", n => { Size = n.GetIntValue(); } }, + { "ssh_url", n => { SshUrl = n.GetStringValue(); } }, + { "stargazers_count", n => { StargazersCount = n.GetIntValue(); } }, + { "stargazers_url", n => { StargazersUrl = n.GetStringValue(); } }, + { "statuses_url", n => { StatusesUrl = n.GetStringValue(); } }, + { "subscribers_url", n => { SubscribersUrl = n.GetStringValue(); } }, + { "subscription_url", n => { SubscriptionUrl = n.GetStringValue(); } }, + { "svn_url", n => { SvnUrl = n.GetStringValue(); } }, + { "tags_url", n => { TagsUrl = n.GetStringValue(); } }, + { "teams_url", n => { TeamsUrl = n.GetStringValue(); } }, + { "temp_clone_token", n => { TempCloneToken = n.GetStringValue(); } }, + { "text_matches", n => { TextMatches = n.GetCollectionOfObjectValues(global::Ayllu.Github.Client.Models.Repositories.CreateFromDiscriminatorValue)?.AsList(); } }, + { "topics", n => { Topics = n.GetCollectionOfPrimitiveValues()?.AsList(); } }, + { "trees_url", n => { TreesUrl = n.GetStringValue(); } }, + { "updated_at", n => { UpdatedAt = n.GetDateTimeOffsetValue(); } }, + { "url", n => { Url = n.GetStringValue(); } }, + { "visibility", n => { Visibility = n.GetStringValue(); } }, + { "watchers", n => { Watchers = n.GetIntValue(); } }, + { "watchers_count", n => { WatchersCount = n.GetIntValue(); } }, + { "web_commit_signoff_required", n => { WebCommitSignoffRequired = n.GetBoolValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteBoolValue("allow_auto_merge", AllowAutoMerge); + writer.WriteBoolValue("allow_forking", AllowForking); + writer.WriteBoolValue("allow_merge_commit", AllowMergeCommit); + writer.WriteBoolValue("allow_rebase_merge", AllowRebaseMerge); + writer.WriteBoolValue("allow_squash_merge", AllowSquashMerge); + writer.WriteBoolValue("archived", Archived); + writer.WriteStringValue("archive_url", ArchiveUrl); + writer.WriteStringValue("assignees_url", AssigneesUrl); + writer.WriteStringValue("blobs_url", BlobsUrl); + writer.WriteStringValue("branches_url", BranchesUrl); + writer.WriteStringValue("clone_url", CloneUrl); + writer.WriteStringValue("collaborators_url", CollaboratorsUrl); + writer.WriteStringValue("comments_url", CommentsUrl); + writer.WriteStringValue("commits_url", CommitsUrl); + writer.WriteStringValue("compare_url", CompareUrl); + writer.WriteStringValue("contents_url", ContentsUrl); + writer.WriteStringValue("contributors_url", ContributorsUrl); + writer.WriteDateTimeOffsetValue("created_at", CreatedAt); + writer.WriteStringValue("default_branch", DefaultBranch); + writer.WriteBoolValue("delete_branch_on_merge", DeleteBranchOnMerge); + writer.WriteStringValue("deployments_url", DeploymentsUrl); + writer.WriteStringValue("description", Description); + writer.WriteBoolValue("disabled", Disabled); + writer.WriteStringValue("downloads_url", DownloadsUrl); + writer.WriteStringValue("events_url", EventsUrl); + writer.WriteBoolValue("fork", Fork); + writer.WriteIntValue("forks", Forks); + writer.WriteIntValue("forks_count", ForksCount); + writer.WriteStringValue("forks_url", ForksUrl); + writer.WriteStringValue("full_name", FullName); + writer.WriteStringValue("git_commits_url", GitCommitsUrl); + writer.WriteStringValue("git_refs_url", GitRefsUrl); + writer.WriteStringValue("git_tags_url", GitTagsUrl); + writer.WriteStringValue("git_url", GitUrl); + writer.WriteBoolValue("has_discussions", HasDiscussions); + writer.WriteBoolValue("has_downloads", HasDownloads); + writer.WriteBoolValue("has_issues", HasIssues); + writer.WriteBoolValue("has_pages", HasPages); + writer.WriteBoolValue("has_projects", HasProjects); + writer.WriteBoolValue("has_wiki", HasWiki); + writer.WriteStringValue("homepage", Homepage); + writer.WriteStringValue("hooks_url", HooksUrl); + writer.WriteStringValue("html_url", HtmlUrl); + writer.WriteIntValue("id", Id); + writer.WriteStringValue("issue_comment_url", IssueCommentUrl); + writer.WriteStringValue("issue_events_url", IssueEventsUrl); + writer.WriteStringValue("issues_url", IssuesUrl); + writer.WriteBoolValue("is_template", IsTemplate); + writer.WriteStringValue("keys_url", KeysUrl); + writer.WriteStringValue("labels_url", LabelsUrl); + writer.WriteStringValue("language", Language); + writer.WriteStringValue("languages_url", LanguagesUrl); + writer.WriteObjectValue("license", License); + writer.WriteStringValue("master_branch", MasterBranch); + writer.WriteStringValue("merges_url", MergesUrl); + writer.WriteStringValue("milestones_url", MilestonesUrl); + writer.WriteStringValue("mirror_url", MirrorUrl); + writer.WriteStringValue("name", Name); + writer.WriteStringValue("node_id", NodeId); + writer.WriteStringValue("notifications_url", NotificationsUrl); + writer.WriteIntValue("open_issues", OpenIssues); + writer.WriteIntValue("open_issues_count", OpenIssuesCount); + writer.WriteObjectValue("owner", Owner); + writer.WriteObjectValue("permissions", Permissions); + writer.WriteBoolValue("private", Private); + writer.WriteStringValue("pulls_url", PullsUrl); + writer.WriteDateTimeOffsetValue("pushed_at", PushedAt); + writer.WriteStringValue("releases_url", ReleasesUrl); + writer.WriteDoubleValue("score", Score); + writer.WriteIntValue("size", Size); + writer.WriteStringValue("ssh_url", SshUrl); + writer.WriteIntValue("stargazers_count", StargazersCount); + writer.WriteStringValue("stargazers_url", StargazersUrl); + writer.WriteStringValue("statuses_url", StatusesUrl); + writer.WriteStringValue("subscribers_url", SubscribersUrl); + writer.WriteStringValue("subscription_url", SubscriptionUrl); + writer.WriteStringValue("svn_url", SvnUrl); + writer.WriteStringValue("tags_url", TagsUrl); + writer.WriteStringValue("teams_url", TeamsUrl); + writer.WriteStringValue("temp_clone_token", TempCloneToken); + writer.WriteCollectionOfObjectValues("text_matches", TextMatches); + writer.WriteCollectionOfPrimitiveValues("topics", Topics); + writer.WriteStringValue("trees_url", TreesUrl); + writer.WriteDateTimeOffsetValue("updated_at", UpdatedAt); + writer.WriteStringValue("url", Url); + writer.WriteStringValue("visibility", Visibility); + writer.WriteIntValue("watchers", Watchers); + writer.WriteIntValue("watchers_count", WatchersCount); + writer.WriteBoolValue("web_commit_signoff_required", WebCommitSignoffRequired); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/RepoSearchResultItem_permissions.cs b/src/Ayllu.Github.Client/Github/Client/Models/RepoSearchResultItem_permissions.cs new file mode 100644 index 0000000..c87edac --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/RepoSearchResultItem_permissions.cs @@ -0,0 +1,75 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class RepoSearchResultItem_permissions : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The admin property + public bool? Admin { get; set; } + /// The maintain property + public bool? Maintain { get; set; } + /// The pull property + public bool? Pull { get; set; } + /// The push property + public bool? Push { get; set; } + /// The triage property + public bool? Triage { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public RepoSearchResultItem_permissions() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.RepoSearchResultItem_permissions CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.RepoSearchResultItem_permissions(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "admin", n => { Admin = n.GetBoolValue(); } }, + { "maintain", n => { Maintain = n.GetBoolValue(); } }, + { "pull", n => { Pull = n.GetBoolValue(); } }, + { "push", n => { Push = n.GetBoolValue(); } }, + { "triage", n => { Triage = n.GetBoolValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteBoolValue("admin", Admin); + writer.WriteBoolValue("maintain", Maintain); + writer.WriteBoolValue("pull", Pull); + writer.WriteBoolValue("push", Push); + writer.WriteBoolValue("triage", Triage); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/Repositories.cs b/src/Ayllu.Github.Client/Github/Client/Models/Repositories.cs new file mode 100644 index 0000000..e315edc --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/Repositories.cs @@ -0,0 +1,105 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class Repositories : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The fragment property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Fragment { get; set; } +#nullable restore +#else + public string Fragment { get; set; } +#endif + /// The matches property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? Matches { get; set; } +#nullable restore +#else + public List Matches { get; set; } +#endif + /// The object_type property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? ObjectType { get; set; } +#nullable restore +#else + public string ObjectType { get; set; } +#endif + /// The object_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? ObjectUrl { get; set; } +#nullable restore +#else + public string ObjectUrl { get; set; } +#endif + /// The property property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Property { get; set; } +#nullable restore +#else + public string Property { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public Repositories() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.Repositories CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.Repositories(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "fragment", n => { Fragment = n.GetStringValue(); } }, + { "matches", n => { Matches = n.GetCollectionOfObjectValues(global::Ayllu.Github.Client.Models.Repositories_matches.CreateFromDiscriminatorValue)?.AsList(); } }, + { "object_type", n => { ObjectType = n.GetStringValue(); } }, + { "object_url", n => { ObjectUrl = n.GetStringValue(); } }, + { "property", n => { Property = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("fragment", Fragment); + writer.WriteCollectionOfObjectValues("matches", Matches); + writer.WriteStringValue("object_type", ObjectType); + writer.WriteStringValue("object_url", ObjectUrl); + writer.WriteStringValue("property", Property); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/Repositories503Error.cs b/src/Ayllu.Github.Client/Github/Client/Models/Repositories503Error.cs new file mode 100644 index 0000000..14d935f --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/Repositories503Error.cs @@ -0,0 +1,88 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class Repositories503Error : ApiException, IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The code property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Code { get; set; } +#nullable restore +#else + public string Code { get; set; } +#endif + /// The documentation_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? DocumentationUrl { get; set; } +#nullable restore +#else + public string DocumentationUrl { get; set; } +#endif + /// The primary error message. + public override string Message { get => MessageEscaped ?? string.Empty; } + /// The message property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? MessageEscaped { get; set; } +#nullable restore +#else + public string MessageEscaped { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public Repositories503Error() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.Repositories503Error CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.Repositories503Error(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "code", n => { Code = n.GetStringValue(); } }, + { "documentation_url", n => { DocumentationUrl = n.GetStringValue(); } }, + { "message", n => { MessageEscaped = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("code", Code); + writer.WriteStringValue("documentation_url", DocumentationUrl); + writer.WriteStringValue("message", MessageEscaped); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/Repositories_matches.cs b/src/Ayllu.Github.Client/Github/Client/Models/Repositories_matches.cs new file mode 100644 index 0000000..d043888 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/Repositories_matches.cs @@ -0,0 +1,75 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class Repositories_matches : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The indices property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? Indices { get; set; } +#nullable restore +#else + public List Indices { get; set; } +#endif + /// The text property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Text { get; set; } +#nullable restore +#else + public string Text { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public Repositories_matches() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.Repositories_matches CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.Repositories_matches(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "indices", n => { Indices = n.GetCollectionOfPrimitiveValues()?.AsList(); } }, + { "text", n => { Text = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteCollectionOfPrimitiveValues("indices", Indices); + writer.WriteStringValue("text", Text); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/Repository.cs b/src/Ayllu.Github.Client/Github/Client/Models/Repository.cs new file mode 100644 index 0000000..a4ed23b --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/Repository.cs @@ -0,0 +1,797 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + /// + /// A repository on GitHub. + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class Repository : IAdditionalDataHolder, IParsable + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// Whether to allow Auto-merge to be used on pull requests. + public bool? AllowAutoMerge { get; set; } + /// Whether to allow forking this repo + public bool? AllowForking { get; set; } + /// Whether to allow merge commits for pull requests. + public bool? AllowMergeCommit { get; set; } + /// Whether to allow rebase merges for pull requests. + public bool? AllowRebaseMerge { get; set; } + /// Whether to allow squash merges for pull requests. + public bool? AllowSquashMerge { get; set; } + /// 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. + public bool? AllowUpdateBranch { get; set; } + /// Whether anonymous git access is enabled for this repository + public bool? AnonymousAccessEnabled { get; set; } + /// Whether the repository is archived. + public bool? Archived { get; set; } + /// The archive_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? ArchiveUrl { get; set; } +#nullable restore +#else + public string ArchiveUrl { get; set; } +#endif + /// The assignees_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? AssigneesUrl { get; set; } +#nullable restore +#else + public string AssigneesUrl { get; set; } +#endif + /// The blobs_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? BlobsUrl { get; set; } +#nullable restore +#else + public string BlobsUrl { get; set; } +#endif + /// The branches_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? BranchesUrl { get; set; } +#nullable restore +#else + public string BranchesUrl { get; set; } +#endif + /// The clone_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? CloneUrl { get; set; } +#nullable restore +#else + public string CloneUrl { get; set; } +#endif + /// The status of the code search index for this repository +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.Repository_code_search_index_status? CodeSearchIndexStatus { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.Repository_code_search_index_status CodeSearchIndexStatus { get; set; } +#endif + /// The collaborators_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? CollaboratorsUrl { get; set; } +#nullable restore +#else + public string CollaboratorsUrl { get; set; } +#endif + /// The comments_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? CommentsUrl { get; set; } +#nullable restore +#else + public string CommentsUrl { get; set; } +#endif + /// The commits_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? CommitsUrl { get; set; } +#nullable restore +#else + public string CommitsUrl { get; set; } +#endif + /// The compare_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? CompareUrl { get; set; } +#nullable restore +#else + public string CompareUrl { get; set; } +#endif + /// The contents_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? ContentsUrl { get; set; } +#nullable restore +#else + public string ContentsUrl { get; set; } +#endif + /// The contributors_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? ContributorsUrl { get; set; } +#nullable restore +#else + public string ContributorsUrl { get; set; } +#endif + /// The created_at property + public DateTimeOffset? CreatedAt { get; set; } + /// The default branch of the repository. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? DefaultBranch { get; set; } +#nullable restore +#else + public string DefaultBranch { get; set; } +#endif + /// Whether to delete head branches when pull requests are merged + public bool? DeleteBranchOnMerge { get; set; } + /// The deployments_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? DeploymentsUrl { get; set; } +#nullable restore +#else + public string DeploymentsUrl { get; set; } +#endif + /// The description property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Description { get; set; } +#nullable restore +#else + public string Description { get; set; } +#endif + /// Returns whether or not this repository disabled. + public bool? Disabled { get; set; } + /// The downloads_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? DownloadsUrl { get; set; } +#nullable restore +#else + public string DownloadsUrl { get; set; } +#endif + /// The events_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? EventsUrl { get; set; } +#nullable restore +#else + public string EventsUrl { get; set; } +#endif + /// The fork property + public bool? Fork { get; set; } + /// The forks property + public int? Forks { get; set; } + /// The forks_count property + public int? ForksCount { get; set; } + /// The forks_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? ForksUrl { get; set; } +#nullable restore +#else + public string ForksUrl { get; set; } +#endif + /// The full_name property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? FullName { get; set; } +#nullable restore +#else + public string FullName { get; set; } +#endif + /// The git_commits_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? GitCommitsUrl { get; set; } +#nullable restore +#else + public string GitCommitsUrl { get; set; } +#endif + /// The git_refs_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? GitRefsUrl { get; set; } +#nullable restore +#else + public string GitRefsUrl { get; set; } +#endif + /// The git_tags_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? GitTagsUrl { get; set; } +#nullable restore +#else + public string GitTagsUrl { get; set; } +#endif + /// The git_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? GitUrl { get; set; } +#nullable restore +#else + public string GitUrl { get; set; } +#endif + /// Whether discussions are enabled. + public bool? HasDiscussions { get; set; } + /// Whether downloads are enabled. + [Obsolete("")] + public bool? HasDownloads { get; set; } + /// Whether issues are enabled. + public bool? HasIssues { get; set; } + /// The has_pages property + public bool? HasPages { get; set; } + /// Whether projects are enabled. + public bool? HasProjects { get; set; } + /// Whether the wiki is enabled. + public bool? HasWiki { get; set; } + /// The homepage property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Homepage { get; set; } +#nullable restore +#else + public string Homepage { get; set; } +#endif + /// The hooks_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? HooksUrl { get; set; } +#nullable restore +#else + public string HooksUrl { get; set; } +#endif + /// The html_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? HtmlUrl { get; set; } +#nullable restore +#else + public string HtmlUrl { get; set; } +#endif + /// Unique identifier of the repository + public long? Id { get; set; } + /// The issue_comment_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? IssueCommentUrl { get; set; } +#nullable restore +#else + public string IssueCommentUrl { get; set; } +#endif + /// The issue_events_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? IssueEventsUrl { get; set; } +#nullable restore +#else + public string IssueEventsUrl { get; set; } +#endif + /// The issues_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? IssuesUrl { get; set; } +#nullable restore +#else + public string IssuesUrl { get; set; } +#endif + /// Whether this repository acts as a template that can be used to generate new repositories. + public bool? IsTemplate { get; set; } + /// The keys_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? KeysUrl { get; set; } +#nullable restore +#else + public string KeysUrl { get; set; } +#endif + /// The labels_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? LabelsUrl { get; set; } +#nullable restore +#else + public string LabelsUrl { get; set; } +#endif + /// The language property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Language { get; set; } +#nullable restore +#else + public string Language { get; set; } +#endif + /// The languages_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? LanguagesUrl { get; set; } +#nullable restore +#else + public string LanguagesUrl { get; set; } +#endif + /// License Simple +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.NullableLicenseSimple? License { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.NullableLicenseSimple License { get; set; } +#endif + /// The master_branch property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? MasterBranch { get; set; } +#nullable restore +#else + public string MasterBranch { get; set; } +#endif + /// 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. + public global::Ayllu.Github.Client.Models.Repository_merge_commit_message? MergeCommitMessage { get; set; } + /// 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). + public global::Ayllu.Github.Client.Models.Repository_merge_commit_title? MergeCommitTitle { get; set; } + /// The merges_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? MergesUrl { get; set; } +#nullable restore +#else + public string MergesUrl { get; set; } +#endif + /// The milestones_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? MilestonesUrl { get; set; } +#nullable restore +#else + public string MilestonesUrl { get; set; } +#endif + /// The mirror_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? MirrorUrl { get; set; } +#nullable restore +#else + public string MirrorUrl { get; set; } +#endif + /// The name of the repository. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Name { get; set; } +#nullable restore +#else + public string Name { get; set; } +#endif + /// The node_id property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? NodeId { get; set; } +#nullable restore +#else + public string NodeId { get; set; } +#endif + /// The notifications_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? NotificationsUrl { get; set; } +#nullable restore +#else + public string NotificationsUrl { get; set; } +#endif + /// The open_issues property + public int? OpenIssues { get; set; } + /// The open_issues_count property + public int? OpenIssuesCount { get; set; } + /// A GitHub user. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.SimpleUser? Owner { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.SimpleUser Owner { get; set; } +#endif + /// The permissions property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.Repository_permissions? Permissions { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.Repository_permissions Permissions { get; set; } +#endif + /// Whether the repository is private or public. + public bool? Private { get; set; } + /// The pulls_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? PullsUrl { get; set; } +#nullable restore +#else + public string PullsUrl { get; set; } +#endif + /// The pushed_at property + public DateTimeOffset? PushedAt { get; set; } + /// The releases_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? ReleasesUrl { get; set; } +#nullable restore +#else + public string ReleasesUrl { get; set; } +#endif + /// The size of the repository, in kilobytes. Size is calculated hourly. When a repository is initially created, the size is 0. + public int? Size { get; set; } + /// 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. + public global::Ayllu.Github.Client.Models.Repository_squash_merge_commit_message? SquashMergeCommitMessage { get; set; } + /// 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). + public global::Ayllu.Github.Client.Models.Repository_squash_merge_commit_title? SquashMergeCommitTitle { get; set; } + /// The ssh_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? SshUrl { get; set; } +#nullable restore +#else + public string SshUrl { get; set; } +#endif + /// The stargazers_count property + public int? StargazersCount { get; set; } + /// The stargazers_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? StargazersUrl { get; set; } +#nullable restore +#else + public string StargazersUrl { get; set; } +#endif + /// The starred_at property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? StarredAt { get; set; } +#nullable restore +#else + public string StarredAt { get; set; } +#endif + /// The statuses_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? StatusesUrl { get; set; } +#nullable restore +#else + public string StatusesUrl { get; set; } +#endif + /// The subscribers_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? SubscribersUrl { get; set; } +#nullable restore +#else + public string SubscribersUrl { get; set; } +#endif + /// The subscription_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? SubscriptionUrl { get; set; } +#nullable restore +#else + public string SubscriptionUrl { get; set; } +#endif + /// The svn_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? SvnUrl { get; set; } +#nullable restore +#else + public string SvnUrl { get; set; } +#endif + /// The tags_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? TagsUrl { get; set; } +#nullable restore +#else + public string TagsUrl { get; set; } +#endif + /// The teams_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? TeamsUrl { get; set; } +#nullable restore +#else + public string TeamsUrl { get; set; } +#endif + /// The temp_clone_token property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? TempCloneToken { get; set; } +#nullable restore +#else + public string TempCloneToken { get; set; } +#endif + /// The topics property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? Topics { get; set; } +#nullable restore +#else + public List Topics { get; set; } +#endif + /// The trees_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? TreesUrl { get; set; } +#nullable restore +#else + public string TreesUrl { get; set; } +#endif + /// The updated_at property + public DateTimeOffset? UpdatedAt { get; set; } + /// The url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Url { get; set; } +#nullable restore +#else + public string Url { get; set; } +#endif + /// Whether a squash merge commit can use the pull request title as default. **This property is closing down. Please use `squash_merge_commit_title` instead. + [Obsolete("")] + public bool? UseSquashPrTitleAsDefault { get; set; } + /// The repository visibility: public, private, or internal. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Visibility { get; set; } +#nullable restore +#else + public string Visibility { get; set; } +#endif + /// The watchers property + public int? Watchers { get; set; } + /// The watchers_count property + public int? WatchersCount { get; set; } + /// Whether to require contributors to sign off on web-based commits + public bool? WebCommitSignoffRequired { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public Repository() + { + AdditionalData = new Dictionary(); + Visibility = "public"; + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.Repository CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.Repository(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "allow_auto_merge", n => { AllowAutoMerge = n.GetBoolValue(); } }, + { "allow_forking", n => { AllowForking = n.GetBoolValue(); } }, + { "allow_merge_commit", n => { AllowMergeCommit = n.GetBoolValue(); } }, + { "allow_rebase_merge", n => { AllowRebaseMerge = n.GetBoolValue(); } }, + { "allow_squash_merge", n => { AllowSquashMerge = n.GetBoolValue(); } }, + { "allow_update_branch", n => { AllowUpdateBranch = n.GetBoolValue(); } }, + { "anonymous_access_enabled", n => { AnonymousAccessEnabled = n.GetBoolValue(); } }, + { "archive_url", n => { ArchiveUrl = n.GetStringValue(); } }, + { "archived", n => { Archived = n.GetBoolValue(); } }, + { "assignees_url", n => { AssigneesUrl = n.GetStringValue(); } }, + { "blobs_url", n => { BlobsUrl = n.GetStringValue(); } }, + { "branches_url", n => { BranchesUrl = n.GetStringValue(); } }, + { "clone_url", n => { CloneUrl = n.GetStringValue(); } }, + { "code_search_index_status", n => { CodeSearchIndexStatus = n.GetObjectValue(global::Ayllu.Github.Client.Models.Repository_code_search_index_status.CreateFromDiscriminatorValue); } }, + { "collaborators_url", n => { CollaboratorsUrl = n.GetStringValue(); } }, + { "comments_url", n => { CommentsUrl = n.GetStringValue(); } }, + { "commits_url", n => { CommitsUrl = n.GetStringValue(); } }, + { "compare_url", n => { CompareUrl = n.GetStringValue(); } }, + { "contents_url", n => { ContentsUrl = n.GetStringValue(); } }, + { "contributors_url", n => { ContributorsUrl = n.GetStringValue(); } }, + { "created_at", n => { CreatedAt = n.GetDateTimeOffsetValue(); } }, + { "default_branch", n => { DefaultBranch = n.GetStringValue(); } }, + { "delete_branch_on_merge", n => { DeleteBranchOnMerge = n.GetBoolValue(); } }, + { "deployments_url", n => { DeploymentsUrl = n.GetStringValue(); } }, + { "description", n => { Description = n.GetStringValue(); } }, + { "disabled", n => { Disabled = n.GetBoolValue(); } }, + { "downloads_url", n => { DownloadsUrl = n.GetStringValue(); } }, + { "events_url", n => { EventsUrl = n.GetStringValue(); } }, + { "fork", n => { Fork = n.GetBoolValue(); } }, + { "forks", n => { Forks = n.GetIntValue(); } }, + { "forks_count", n => { ForksCount = n.GetIntValue(); } }, + { "forks_url", n => { ForksUrl = n.GetStringValue(); } }, + { "full_name", n => { FullName = n.GetStringValue(); } }, + { "git_commits_url", n => { GitCommitsUrl = n.GetStringValue(); } }, + { "git_refs_url", n => { GitRefsUrl = n.GetStringValue(); } }, + { "git_tags_url", n => { GitTagsUrl = n.GetStringValue(); } }, + { "git_url", n => { GitUrl = n.GetStringValue(); } }, + { "has_discussions", n => { HasDiscussions = n.GetBoolValue(); } }, + { "has_downloads", n => { HasDownloads = n.GetBoolValue(); } }, + { "has_issues", n => { HasIssues = n.GetBoolValue(); } }, + { "has_pages", n => { HasPages = n.GetBoolValue(); } }, + { "has_projects", n => { HasProjects = n.GetBoolValue(); } }, + { "has_wiki", n => { HasWiki = n.GetBoolValue(); } }, + { "homepage", n => { Homepage = n.GetStringValue(); } }, + { "hooks_url", n => { HooksUrl = n.GetStringValue(); } }, + { "html_url", n => { HtmlUrl = n.GetStringValue(); } }, + { "id", n => { Id = n.GetLongValue(); } }, + { "is_template", n => { IsTemplate = n.GetBoolValue(); } }, + { "issue_comment_url", n => { IssueCommentUrl = n.GetStringValue(); } }, + { "issue_events_url", n => { IssueEventsUrl = n.GetStringValue(); } }, + { "issues_url", n => { IssuesUrl = n.GetStringValue(); } }, + { "keys_url", n => { KeysUrl = n.GetStringValue(); } }, + { "labels_url", n => { LabelsUrl = n.GetStringValue(); } }, + { "language", n => { Language = n.GetStringValue(); } }, + { "languages_url", n => { LanguagesUrl = n.GetStringValue(); } }, + { "license", n => { License = n.GetObjectValue(global::Ayllu.Github.Client.Models.NullableLicenseSimple.CreateFromDiscriminatorValue); } }, + { "master_branch", n => { MasterBranch = n.GetStringValue(); } }, + { "merge_commit_message", n => { MergeCommitMessage = n.GetEnumValue(); } }, + { "merge_commit_title", n => { MergeCommitTitle = n.GetEnumValue(); } }, + { "merges_url", n => { MergesUrl = n.GetStringValue(); } }, + { "milestones_url", n => { MilestonesUrl = n.GetStringValue(); } }, + { "mirror_url", n => { MirrorUrl = n.GetStringValue(); } }, + { "name", n => { Name = n.GetStringValue(); } }, + { "node_id", n => { NodeId = n.GetStringValue(); } }, + { "notifications_url", n => { NotificationsUrl = n.GetStringValue(); } }, + { "open_issues", n => { OpenIssues = n.GetIntValue(); } }, + { "open_issues_count", n => { OpenIssuesCount = n.GetIntValue(); } }, + { "owner", n => { Owner = n.GetObjectValue(global::Ayllu.Github.Client.Models.SimpleUser.CreateFromDiscriminatorValue); } }, + { "permissions", n => { Permissions = n.GetObjectValue(global::Ayllu.Github.Client.Models.Repository_permissions.CreateFromDiscriminatorValue); } }, + { "private", n => { Private = n.GetBoolValue(); } }, + { "pulls_url", n => { PullsUrl = n.GetStringValue(); } }, + { "pushed_at", n => { PushedAt = n.GetDateTimeOffsetValue(); } }, + { "releases_url", n => { ReleasesUrl = n.GetStringValue(); } }, + { "size", n => { Size = n.GetIntValue(); } }, + { "squash_merge_commit_message", n => { SquashMergeCommitMessage = n.GetEnumValue(); } }, + { "squash_merge_commit_title", n => { SquashMergeCommitTitle = n.GetEnumValue(); } }, + { "ssh_url", n => { SshUrl = n.GetStringValue(); } }, + { "stargazers_count", n => { StargazersCount = n.GetIntValue(); } }, + { "stargazers_url", n => { StargazersUrl = n.GetStringValue(); } }, + { "starred_at", n => { StarredAt = n.GetStringValue(); } }, + { "statuses_url", n => { StatusesUrl = n.GetStringValue(); } }, + { "subscribers_url", n => { SubscribersUrl = n.GetStringValue(); } }, + { "subscription_url", n => { SubscriptionUrl = n.GetStringValue(); } }, + { "svn_url", n => { SvnUrl = n.GetStringValue(); } }, + { "tags_url", n => { TagsUrl = n.GetStringValue(); } }, + { "teams_url", n => { TeamsUrl = n.GetStringValue(); } }, + { "temp_clone_token", n => { TempCloneToken = n.GetStringValue(); } }, + { "topics", n => { Topics = n.GetCollectionOfPrimitiveValues()?.AsList(); } }, + { "trees_url", n => { TreesUrl = n.GetStringValue(); } }, + { "updated_at", n => { UpdatedAt = n.GetDateTimeOffsetValue(); } }, + { "url", n => { Url = n.GetStringValue(); } }, + { "use_squash_pr_title_as_default", n => { UseSquashPrTitleAsDefault = n.GetBoolValue(); } }, + { "visibility", n => { Visibility = n.GetStringValue(); } }, + { "watchers", n => { Watchers = n.GetIntValue(); } }, + { "watchers_count", n => { WatchersCount = n.GetIntValue(); } }, + { "web_commit_signoff_required", n => { WebCommitSignoffRequired = n.GetBoolValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteBoolValue("allow_auto_merge", AllowAutoMerge); + writer.WriteBoolValue("allow_forking", AllowForking); + writer.WriteBoolValue("allow_merge_commit", AllowMergeCommit); + writer.WriteBoolValue("allow_rebase_merge", AllowRebaseMerge); + writer.WriteBoolValue("allow_squash_merge", AllowSquashMerge); + writer.WriteBoolValue("allow_update_branch", AllowUpdateBranch); + writer.WriteBoolValue("anonymous_access_enabled", AnonymousAccessEnabled); + writer.WriteBoolValue("archived", Archived); + writer.WriteStringValue("archive_url", ArchiveUrl); + writer.WriteStringValue("assignees_url", AssigneesUrl); + writer.WriteStringValue("blobs_url", BlobsUrl); + writer.WriteStringValue("branches_url", BranchesUrl); + writer.WriteStringValue("clone_url", CloneUrl); + writer.WriteObjectValue("code_search_index_status", CodeSearchIndexStatus); + writer.WriteStringValue("collaborators_url", CollaboratorsUrl); + writer.WriteStringValue("comments_url", CommentsUrl); + writer.WriteStringValue("commits_url", CommitsUrl); + writer.WriteStringValue("compare_url", CompareUrl); + writer.WriteStringValue("contents_url", ContentsUrl); + writer.WriteStringValue("contributors_url", ContributorsUrl); + writer.WriteDateTimeOffsetValue("created_at", CreatedAt); + writer.WriteStringValue("default_branch", DefaultBranch); + writer.WriteBoolValue("delete_branch_on_merge", DeleteBranchOnMerge); + writer.WriteStringValue("deployments_url", DeploymentsUrl); + writer.WriteStringValue("description", Description); + writer.WriteBoolValue("disabled", Disabled); + writer.WriteStringValue("downloads_url", DownloadsUrl); + writer.WriteStringValue("events_url", EventsUrl); + writer.WriteBoolValue("fork", Fork); + writer.WriteIntValue("forks", Forks); + writer.WriteIntValue("forks_count", ForksCount); + writer.WriteStringValue("forks_url", ForksUrl); + writer.WriteStringValue("full_name", FullName); + writer.WriteStringValue("git_commits_url", GitCommitsUrl); + writer.WriteStringValue("git_refs_url", GitRefsUrl); + writer.WriteStringValue("git_tags_url", GitTagsUrl); + writer.WriteStringValue("git_url", GitUrl); + writer.WriteBoolValue("has_discussions", HasDiscussions); + writer.WriteBoolValue("has_downloads", HasDownloads); + writer.WriteBoolValue("has_issues", HasIssues); + writer.WriteBoolValue("has_pages", HasPages); + writer.WriteBoolValue("has_projects", HasProjects); + writer.WriteBoolValue("has_wiki", HasWiki); + writer.WriteStringValue("homepage", Homepage); + writer.WriteStringValue("hooks_url", HooksUrl); + writer.WriteStringValue("html_url", HtmlUrl); + writer.WriteLongValue("id", Id); + writer.WriteStringValue("issue_comment_url", IssueCommentUrl); + writer.WriteStringValue("issue_events_url", IssueEventsUrl); + writer.WriteStringValue("issues_url", IssuesUrl); + writer.WriteBoolValue("is_template", IsTemplate); + writer.WriteStringValue("keys_url", KeysUrl); + writer.WriteStringValue("labels_url", LabelsUrl); + writer.WriteStringValue("language", Language); + writer.WriteStringValue("languages_url", LanguagesUrl); + writer.WriteObjectValue("license", License); + writer.WriteStringValue("master_branch", MasterBranch); + writer.WriteEnumValue("merge_commit_message", MergeCommitMessage); + writer.WriteEnumValue("merge_commit_title", MergeCommitTitle); + writer.WriteStringValue("merges_url", MergesUrl); + writer.WriteStringValue("milestones_url", MilestonesUrl); + writer.WriteStringValue("mirror_url", MirrorUrl); + writer.WriteStringValue("name", Name); + writer.WriteStringValue("node_id", NodeId); + writer.WriteStringValue("notifications_url", NotificationsUrl); + writer.WriteIntValue("open_issues", OpenIssues); + writer.WriteIntValue("open_issues_count", OpenIssuesCount); + writer.WriteObjectValue("owner", Owner); + writer.WriteObjectValue("permissions", Permissions); + writer.WriteBoolValue("private", Private); + writer.WriteStringValue("pulls_url", PullsUrl); + writer.WriteDateTimeOffsetValue("pushed_at", PushedAt); + writer.WriteStringValue("releases_url", ReleasesUrl); + writer.WriteIntValue("size", Size); + writer.WriteEnumValue("squash_merge_commit_message", SquashMergeCommitMessage); + writer.WriteEnumValue("squash_merge_commit_title", SquashMergeCommitTitle); + writer.WriteStringValue("ssh_url", SshUrl); + writer.WriteIntValue("stargazers_count", StargazersCount); + writer.WriteStringValue("stargazers_url", StargazersUrl); + writer.WriteStringValue("starred_at", StarredAt); + writer.WriteStringValue("statuses_url", StatusesUrl); + writer.WriteStringValue("subscribers_url", SubscribersUrl); + writer.WriteStringValue("subscription_url", SubscriptionUrl); + writer.WriteStringValue("svn_url", SvnUrl); + writer.WriteStringValue("tags_url", TagsUrl); + writer.WriteStringValue("teams_url", TeamsUrl); + writer.WriteStringValue("temp_clone_token", TempCloneToken); + writer.WriteCollectionOfPrimitiveValues("topics", Topics); + writer.WriteStringValue("trees_url", TreesUrl); + writer.WriteDateTimeOffsetValue("updated_at", UpdatedAt); + writer.WriteStringValue("url", Url); + writer.WriteBoolValue("use_squash_pr_title_as_default", UseSquashPrTitleAsDefault); + writer.WriteStringValue("visibility", Visibility); + writer.WriteIntValue("watchers", Watchers); + writer.WriteIntValue("watchers_count", WatchersCount); + writer.WriteBoolValue("web_commit_signoff_required", WebCommitSignoffRequired); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/RepositoryAdvisory.cs b/src/Ayllu.Github.Client/Github/Client/Models/RepositoryAdvisory.cs new file mode 100644 index 0000000..02b3bf5 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/RepositoryAdvisory.cs @@ -0,0 +1,259 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + /// + /// A repository security advisory. + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class RepositoryAdvisory : IParsable + { + /// The author of the advisory. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.SimpleUser? Author { get; private set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.SimpleUser Author { get; private set; } +#endif + /// The date and time of when the advisory was closed, in ISO 8601 format. + public DateTimeOffset? ClosedAt { get; private set; } + /// A list of teams that collaborate on the advisory. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? CollaboratingTeams { get; set; } +#nullable restore +#else + public List CollaboratingTeams { get; set; } +#endif + /// A list of users that collaborate on the advisory. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? CollaboratingUsers { get; set; } +#nullable restore +#else + public List CollaboratingUsers { get; set; } +#endif + /// The date and time of when the advisory was created, in ISO 8601 format. + public DateTimeOffset? CreatedAt { get; private set; } + /// The credits property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? Credits { get; set; } +#nullable restore +#else + public List Credits { get; set; } +#endif + /// The credits_detailed property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? CreditsDetailed { get; private set; } +#nullable restore +#else + public List CreditsDetailed { get; private set; } +#endif + /// The Common Vulnerabilities and Exposures (CVE) ID. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? CveId { get; set; } +#nullable restore +#else + public string CveId { get; set; } +#endif + /// The cvss property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.RepositoryAdvisory_cvss? Cvss { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.RepositoryAdvisory_cvss Cvss { get; set; } +#endif + /// The cvss_severities property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.CvssSeverities? CvssSeverities { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.CvssSeverities CvssSeverities { get; set; } +#endif + /// A list of only the CWE IDs. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? CweIds { get; set; } +#nullable restore +#else + public List CweIds { get; set; } +#endif + /// The cwes property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? Cwes { get; private set; } +#nullable restore +#else + public List Cwes { get; private set; } +#endif + /// A detailed description of what the advisory entails. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Description { get; set; } +#nullable restore +#else + public string Description { get; set; } +#endif + /// The GitHub Security Advisory ID. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? GhsaId { get; private set; } +#nullable restore +#else + public string GhsaId { get; private set; } +#endif + /// The URL for the advisory. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? HtmlUrl { get; private set; } +#nullable restore +#else + public string HtmlUrl { get; private set; } +#endif + /// The identifiers property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? Identifiers { get; private set; } +#nullable restore +#else + public List Identifiers { get; private set; } +#endif + /// A temporary private fork of the advisory's repository for collaborating on a fix. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.SimpleRepository? PrivateFork { get; private set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.SimpleRepository PrivateFork { get; private set; } +#endif + /// The date and time of when the advisory was published, in ISO 8601 format. + public DateTimeOffset? PublishedAt { get; private set; } + /// The publisher of the advisory. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.SimpleUser? Publisher { get; private set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.SimpleUser Publisher { get; private set; } +#endif + /// The severity of the advisory. + public global::Ayllu.Github.Client.Models.RepositoryAdvisory_severity? Severity { get; set; } + /// The state of the advisory. + public global::Ayllu.Github.Client.Models.RepositoryAdvisory_state? State { get; set; } + /// The submission property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.RepositoryAdvisory_submission? Submission { get; private set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.RepositoryAdvisory_submission Submission { get; private set; } +#endif + /// A short summary of the advisory. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Summary { get; set; } +#nullable restore +#else + public string Summary { get; set; } +#endif + /// The date and time of when the advisory was last updated, in ISO 8601 format. + public DateTimeOffset? UpdatedAt { get; private set; } + /// The API URL for the advisory. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Url { get; private set; } +#nullable restore +#else + public string Url { get; private set; } +#endif + /// The vulnerabilities property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? Vulnerabilities { get; set; } +#nullable restore +#else + public List Vulnerabilities { get; set; } +#endif + /// The date and time of when the advisory was withdrawn, in ISO 8601 format. + public DateTimeOffset? WithdrawnAt { get; private set; } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.RepositoryAdvisory CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.RepositoryAdvisory(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "author", n => { Author = n.GetObjectValue(global::Ayllu.Github.Client.Models.SimpleUser.CreateFromDiscriminatorValue); } }, + { "closed_at", n => { ClosedAt = n.GetDateTimeOffsetValue(); } }, + { "collaborating_teams", n => { CollaboratingTeams = n.GetCollectionOfObjectValues(global::Ayllu.Github.Client.Models.Team.CreateFromDiscriminatorValue)?.AsList(); } }, + { "collaborating_users", n => { CollaboratingUsers = n.GetCollectionOfObjectValues(global::Ayllu.Github.Client.Models.SimpleUser.CreateFromDiscriminatorValue)?.AsList(); } }, + { "created_at", n => { CreatedAt = n.GetDateTimeOffsetValue(); } }, + { "credits", n => { Credits = n.GetCollectionOfObjectValues(global::Ayllu.Github.Client.Models.RepositoryAdvisory_credits.CreateFromDiscriminatorValue)?.AsList(); } }, + { "credits_detailed", n => { CreditsDetailed = n.GetCollectionOfObjectValues(global::Ayllu.Github.Client.Models.RepositoryAdvisoryCredit.CreateFromDiscriminatorValue)?.AsList(); } }, + { "cve_id", n => { CveId = n.GetStringValue(); } }, + { "cvss", n => { Cvss = n.GetObjectValue(global::Ayllu.Github.Client.Models.RepositoryAdvisory_cvss.CreateFromDiscriminatorValue); } }, + { "cvss_severities", n => { CvssSeverities = n.GetObjectValue(global::Ayllu.Github.Client.Models.CvssSeverities.CreateFromDiscriminatorValue); } }, + { "cwe_ids", n => { CweIds = n.GetCollectionOfPrimitiveValues()?.AsList(); } }, + { "cwes", n => { Cwes = n.GetCollectionOfObjectValues(global::Ayllu.Github.Client.Models.RepositoryAdvisory_cwes.CreateFromDiscriminatorValue)?.AsList(); } }, + { "description", n => { Description = n.GetStringValue(); } }, + { "ghsa_id", n => { GhsaId = n.GetStringValue(); } }, + { "html_url", n => { HtmlUrl = n.GetStringValue(); } }, + { "identifiers", n => { Identifiers = n.GetCollectionOfObjectValues(global::Ayllu.Github.Client.Models.RepositoryAdvisory_identifiers.CreateFromDiscriminatorValue)?.AsList(); } }, + { "private_fork", n => { PrivateFork = n.GetObjectValue(global::Ayllu.Github.Client.Models.SimpleRepository.CreateFromDiscriminatorValue); } }, + { "published_at", n => { PublishedAt = n.GetDateTimeOffsetValue(); } }, + { "publisher", n => { Publisher = n.GetObjectValue(global::Ayllu.Github.Client.Models.SimpleUser.CreateFromDiscriminatorValue); } }, + { "severity", n => { Severity = n.GetEnumValue(); } }, + { "state", n => { State = n.GetEnumValue(); } }, + { "submission", n => { Submission = n.GetObjectValue(global::Ayllu.Github.Client.Models.RepositoryAdvisory_submission.CreateFromDiscriminatorValue); } }, + { "summary", n => { Summary = n.GetStringValue(); } }, + { "updated_at", n => { UpdatedAt = n.GetDateTimeOffsetValue(); } }, + { "url", n => { Url = n.GetStringValue(); } }, + { "vulnerabilities", n => { Vulnerabilities = n.GetCollectionOfObjectValues(global::Ayllu.Github.Client.Models.RepositoryAdvisoryVulnerability.CreateFromDiscriminatorValue)?.AsList(); } }, + { "withdrawn_at", n => { WithdrawnAt = n.GetDateTimeOffsetValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteCollectionOfObjectValues("collaborating_teams", CollaboratingTeams); + writer.WriteCollectionOfObjectValues("collaborating_users", CollaboratingUsers); + writer.WriteCollectionOfObjectValues("credits", Credits); + writer.WriteStringValue("cve_id", CveId); + writer.WriteObjectValue("cvss", Cvss); + writer.WriteObjectValue("cvss_severities", CvssSeverities); + writer.WriteCollectionOfPrimitiveValues("cwe_ids", CweIds); + writer.WriteStringValue("description", Description); + writer.WriteEnumValue("severity", Severity); + writer.WriteEnumValue("state", State); + writer.WriteStringValue("summary", Summary); + writer.WriteCollectionOfObjectValues("vulnerabilities", Vulnerabilities); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/RepositoryAdvisoryCreate.cs b/src/Ayllu.Github.Client/Github/Client/Models/RepositoryAdvisoryCreate.cs new file mode 100644 index 0000000..01e647e --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/RepositoryAdvisoryCreate.cs @@ -0,0 +1,123 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class RepositoryAdvisoryCreate : IParsable + #pragma warning restore CS1591 + { + /// A list of users receiving credit for their participation in the security advisory. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? Credits { get; set; } +#nullable restore +#else + public List Credits { get; set; } +#endif + /// The Common Vulnerabilities and Exposures (CVE) ID. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? CveId { get; set; } +#nullable restore +#else + public string CveId { get; set; } +#endif + /// The CVSS vector that calculates the severity of the advisory. You must choose between setting this field or `severity`. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? CvssVectorString { get; set; } +#nullable restore +#else + public string CvssVectorString { get; set; } +#endif + /// A list of Common Weakness Enumeration (CWE) IDs. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? CweIds { get; set; } +#nullable restore +#else + public List CweIds { get; set; } +#endif + /// A detailed description of what the advisory impacts. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Description { get; set; } +#nullable restore +#else + public string Description { get; set; } +#endif + /// The severity of the advisory. You must choose between setting this field or `cvss_vector_string`. + public global::Ayllu.Github.Client.Models.RepositoryAdvisoryCreate_severity? Severity { get; set; } + /// Whether to create a temporary private fork of the repository to collaborate on a fix. + public bool? StartPrivateFork { get; set; } + /// A short summary of the advisory. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Summary { get; set; } +#nullable restore +#else + public string Summary { get; set; } +#endif + /// A product affected by the vulnerability detailed in a repository security advisory. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? Vulnerabilities { get; set; } +#nullable restore +#else + public List Vulnerabilities { get; set; } +#endif + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.RepositoryAdvisoryCreate CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.RepositoryAdvisoryCreate(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "credits", n => { Credits = n.GetCollectionOfObjectValues(global::Ayllu.Github.Client.Models.RepositoryAdvisoryCreate_credits.CreateFromDiscriminatorValue)?.AsList(); } }, + { "cve_id", n => { CveId = n.GetStringValue(); } }, + { "cvss_vector_string", n => { CvssVectorString = n.GetStringValue(); } }, + { "cwe_ids", n => { CweIds = n.GetCollectionOfPrimitiveValues()?.AsList(); } }, + { "description", n => { Description = n.GetStringValue(); } }, + { "severity", n => { Severity = n.GetEnumValue(); } }, + { "start_private_fork", n => { StartPrivateFork = n.GetBoolValue(); } }, + { "summary", n => { Summary = n.GetStringValue(); } }, + { "vulnerabilities", n => { Vulnerabilities = n.GetCollectionOfObjectValues(global::Ayllu.Github.Client.Models.RepositoryAdvisoryCreate_vulnerabilities.CreateFromDiscriminatorValue)?.AsList(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteCollectionOfObjectValues("credits", Credits); + writer.WriteStringValue("cve_id", CveId); + writer.WriteStringValue("cvss_vector_string", CvssVectorString); + writer.WriteCollectionOfPrimitiveValues("cwe_ids", CweIds); + writer.WriteStringValue("description", Description); + writer.WriteEnumValue("severity", Severity); + writer.WriteBoolValue("start_private_fork", StartPrivateFork); + writer.WriteStringValue("summary", Summary); + writer.WriteCollectionOfObjectValues("vulnerabilities", Vulnerabilities); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/RepositoryAdvisoryCreate_credits.cs b/src/Ayllu.Github.Client/Github/Client/Models/RepositoryAdvisoryCreate_credits.cs new file mode 100644 index 0000000..bb6ae99 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/RepositoryAdvisoryCreate_credits.cs @@ -0,0 +1,59 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class RepositoryAdvisoryCreate_credits : IParsable + #pragma warning restore CS1591 + { + /// The username of the user credited. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Login { get; set; } +#nullable restore +#else + public string Login { get; set; } +#endif + /// The type of credit the user is receiving. + public global::Ayllu.Github.Client.Models.SecurityAdvisoryCreditTypes? Type { get; set; } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.RepositoryAdvisoryCreate_credits CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.RepositoryAdvisoryCreate_credits(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "login", n => { Login = n.GetStringValue(); } }, + { "type", n => { Type = n.GetEnumValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("login", Login); + writer.WriteEnumValue("type", Type); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/RepositoryAdvisoryCreate_severity.cs b/src/Ayllu.Github.Client/Github/Client/Models/RepositoryAdvisoryCreate_severity.cs new file mode 100644 index 0000000..c829a7c --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/RepositoryAdvisoryCreate_severity.cs @@ -0,0 +1,27 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Models +{ + /// The severity of the advisory. You must choose between setting this field or `cvss_vector_string`. + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public enum RepositoryAdvisoryCreate_severity + { + [EnumMember(Value = "critical")] + #pragma warning disable CS1591 + Critical, + #pragma warning restore CS1591 + [EnumMember(Value = "high")] + #pragma warning disable CS1591 + High, + #pragma warning restore CS1591 + [EnumMember(Value = "medium")] + #pragma warning disable CS1591 + Medium, + #pragma warning restore CS1591 + [EnumMember(Value = "low")] + #pragma warning disable CS1591 + Low, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Models/RepositoryAdvisoryCreate_vulnerabilities.cs b/src/Ayllu.Github.Client/Github/Client/Models/RepositoryAdvisoryCreate_vulnerabilities.cs new file mode 100644 index 0000000..255f7e8 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/RepositoryAdvisoryCreate_vulnerabilities.cs @@ -0,0 +1,85 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class RepositoryAdvisoryCreate_vulnerabilities : IParsable + #pragma warning restore CS1591 + { + /// The name of the package affected by the vulnerability. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.RepositoryAdvisoryCreate_vulnerabilities_package? Package { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.RepositoryAdvisoryCreate_vulnerabilities_package Package { get; set; } +#endif + /// The package version(s) that resolve the vulnerability. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? PatchedVersions { get; set; } +#nullable restore +#else + public string PatchedVersions { get; set; } +#endif + /// The functions in the package that are affected. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? VulnerableFunctions { get; set; } +#nullable restore +#else + public List VulnerableFunctions { get; set; } +#endif + /// The range of the package versions affected by the vulnerability. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? VulnerableVersionRange { get; set; } +#nullable restore +#else + public string VulnerableVersionRange { get; set; } +#endif + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.RepositoryAdvisoryCreate_vulnerabilities CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.RepositoryAdvisoryCreate_vulnerabilities(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "package", n => { Package = n.GetObjectValue(global::Ayllu.Github.Client.Models.RepositoryAdvisoryCreate_vulnerabilities_package.CreateFromDiscriminatorValue); } }, + { "patched_versions", n => { PatchedVersions = n.GetStringValue(); } }, + { "vulnerable_functions", n => { VulnerableFunctions = n.GetCollectionOfPrimitiveValues()?.AsList(); } }, + { "vulnerable_version_range", n => { VulnerableVersionRange = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteObjectValue("package", Package); + writer.WriteStringValue("patched_versions", PatchedVersions); + writer.WriteCollectionOfPrimitiveValues("vulnerable_functions", VulnerableFunctions); + writer.WriteStringValue("vulnerable_version_range", VulnerableVersionRange); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/RepositoryAdvisoryCreate_vulnerabilities_package.cs b/src/Ayllu.Github.Client/Github/Client/Models/RepositoryAdvisoryCreate_vulnerabilities_package.cs new file mode 100644 index 0000000..1d6dad9 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/RepositoryAdvisoryCreate_vulnerabilities_package.cs @@ -0,0 +1,70 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + /// + /// The name of the package affected by the vulnerability. + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class RepositoryAdvisoryCreate_vulnerabilities_package : IAdditionalDataHolder, IParsable + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The package's language or package management ecosystem. + public global::Ayllu.Github.Client.Models.SecurityAdvisoryEcosystems? Ecosystem { get; set; } + /// The unique package name within its ecosystem. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Name { get; set; } +#nullable restore +#else + public string Name { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public RepositoryAdvisoryCreate_vulnerabilities_package() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.RepositoryAdvisoryCreate_vulnerabilities_package CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.RepositoryAdvisoryCreate_vulnerabilities_package(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "ecosystem", n => { Ecosystem = n.GetEnumValue(); } }, + { "name", n => { Name = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteEnumValue("ecosystem", Ecosystem); + writer.WriteStringValue("name", Name); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/RepositoryAdvisoryCredit.cs b/src/Ayllu.Github.Client/Github/Client/Models/RepositoryAdvisoryCredit.cs new file mode 100644 index 0000000..b1a2492 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/RepositoryAdvisoryCredit.cs @@ -0,0 +1,64 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + /// + /// A credit given to a user for a repository security advisory. + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class RepositoryAdvisoryCredit : IParsable + { + /// The state of the user's acceptance of the credit. + public global::Ayllu.Github.Client.Models.RepositoryAdvisoryCredit_state? State { get; set; } + /// The type of credit the user is receiving. + public global::Ayllu.Github.Client.Models.SecurityAdvisoryCreditTypes? Type { get; set; } + /// A GitHub user. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.SimpleUser? User { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.SimpleUser User { get; set; } +#endif + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.RepositoryAdvisoryCredit CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.RepositoryAdvisoryCredit(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "state", n => { State = n.GetEnumValue(); } }, + { "type", n => { Type = n.GetEnumValue(); } }, + { "user", n => { User = n.GetObjectValue(global::Ayllu.Github.Client.Models.SimpleUser.CreateFromDiscriminatorValue); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteEnumValue("state", State); + writer.WriteEnumValue("type", Type); + writer.WriteObjectValue("user", User); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/RepositoryAdvisoryCredit_state.cs b/src/Ayllu.Github.Client/Github/Client/Models/RepositoryAdvisoryCredit_state.cs new file mode 100644 index 0000000..1bc8828 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/RepositoryAdvisoryCredit_state.cs @@ -0,0 +1,23 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Models +{ + /// The state of the user's acceptance of the credit. + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public enum RepositoryAdvisoryCredit_state + { + [EnumMember(Value = "accepted")] + #pragma warning disable CS1591 + Accepted, + #pragma warning restore CS1591 + [EnumMember(Value = "declined")] + #pragma warning disable CS1591 + Declined, + #pragma warning restore CS1591 + [EnumMember(Value = "pending")] + #pragma warning disable CS1591 + Pending, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Models/RepositoryAdvisoryUpdate.cs b/src/Ayllu.Github.Client/Github/Client/Models/RepositoryAdvisoryUpdate.cs new file mode 100644 index 0000000..d20064f --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/RepositoryAdvisoryUpdate.cs @@ -0,0 +1,143 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class RepositoryAdvisoryUpdate : IParsable + #pragma warning restore CS1591 + { + /// A list of team slugs which have been granted write access to the advisory. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? CollaboratingTeams { get; set; } +#nullable restore +#else + public List CollaboratingTeams { get; set; } +#endif + /// A list of usernames who have been granted write access to the advisory. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? CollaboratingUsers { get; set; } +#nullable restore +#else + public List CollaboratingUsers { get; set; } +#endif + /// A list of users receiving credit for their participation in the security advisory. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? Credits { get; set; } +#nullable restore +#else + public List Credits { get; set; } +#endif + /// The Common Vulnerabilities and Exposures (CVE) ID. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? CveId { get; set; } +#nullable restore +#else + public string CveId { get; set; } +#endif + /// The CVSS vector that calculates the severity of the advisory. You must choose between setting this field or `severity`. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? CvssVectorString { get; set; } +#nullable restore +#else + public string CvssVectorString { get; set; } +#endif + /// A list of Common Weakness Enumeration (CWE) IDs. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? CweIds { get; set; } +#nullable restore +#else + public List CweIds { get; set; } +#endif + /// A detailed description of what the advisory impacts. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Description { get; set; } +#nullable restore +#else + public string Description { get; set; } +#endif + /// The severity of the advisory. You must choose between setting this field or `cvss_vector_string`. + public global::Ayllu.Github.Client.Models.RepositoryAdvisoryUpdate_severity? Severity { get; set; } + /// The state of the advisory. + public global::Ayllu.Github.Client.Models.RepositoryAdvisoryUpdate_state? State { get; set; } + /// A short summary of the advisory. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Summary { get; set; } +#nullable restore +#else + public string Summary { get; set; } +#endif + /// A product affected by the vulnerability detailed in a repository security advisory. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? Vulnerabilities { get; set; } +#nullable restore +#else + public List Vulnerabilities { get; set; } +#endif + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.RepositoryAdvisoryUpdate CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.RepositoryAdvisoryUpdate(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "collaborating_teams", n => { CollaboratingTeams = n.GetCollectionOfPrimitiveValues()?.AsList(); } }, + { "collaborating_users", n => { CollaboratingUsers = n.GetCollectionOfPrimitiveValues()?.AsList(); } }, + { "credits", n => { Credits = n.GetCollectionOfObjectValues(global::Ayllu.Github.Client.Models.RepositoryAdvisoryUpdate_credits.CreateFromDiscriminatorValue)?.AsList(); } }, + { "cve_id", n => { CveId = n.GetStringValue(); } }, + { "cvss_vector_string", n => { CvssVectorString = n.GetStringValue(); } }, + { "cwe_ids", n => { CweIds = n.GetCollectionOfPrimitiveValues()?.AsList(); } }, + { "description", n => { Description = n.GetStringValue(); } }, + { "severity", n => { Severity = n.GetEnumValue(); } }, + { "state", n => { State = n.GetEnumValue(); } }, + { "summary", n => { Summary = n.GetStringValue(); } }, + { "vulnerabilities", n => { Vulnerabilities = n.GetCollectionOfObjectValues(global::Ayllu.Github.Client.Models.RepositoryAdvisoryUpdate_vulnerabilities.CreateFromDiscriminatorValue)?.AsList(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteCollectionOfPrimitiveValues("collaborating_teams", CollaboratingTeams); + writer.WriteCollectionOfPrimitiveValues("collaborating_users", CollaboratingUsers); + writer.WriteCollectionOfObjectValues("credits", Credits); + writer.WriteStringValue("cve_id", CveId); + writer.WriteStringValue("cvss_vector_string", CvssVectorString); + writer.WriteCollectionOfPrimitiveValues("cwe_ids", CweIds); + writer.WriteStringValue("description", Description); + writer.WriteEnumValue("severity", Severity); + writer.WriteEnumValue("state", State); + writer.WriteStringValue("summary", Summary); + writer.WriteCollectionOfObjectValues("vulnerabilities", Vulnerabilities); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/RepositoryAdvisoryUpdate_credits.cs b/src/Ayllu.Github.Client/Github/Client/Models/RepositoryAdvisoryUpdate_credits.cs new file mode 100644 index 0000000..a2a41c3 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/RepositoryAdvisoryUpdate_credits.cs @@ -0,0 +1,59 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class RepositoryAdvisoryUpdate_credits : IParsable + #pragma warning restore CS1591 + { + /// The username of the user credited. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Login { get; set; } +#nullable restore +#else + public string Login { get; set; } +#endif + /// The type of credit the user is receiving. + public global::Ayllu.Github.Client.Models.SecurityAdvisoryCreditTypes? Type { get; set; } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.RepositoryAdvisoryUpdate_credits CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.RepositoryAdvisoryUpdate_credits(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "login", n => { Login = n.GetStringValue(); } }, + { "type", n => { Type = n.GetEnumValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("login", Login); + writer.WriteEnumValue("type", Type); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/RepositoryAdvisoryUpdate_severity.cs b/src/Ayllu.Github.Client/Github/Client/Models/RepositoryAdvisoryUpdate_severity.cs new file mode 100644 index 0000000..faccf0a --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/RepositoryAdvisoryUpdate_severity.cs @@ -0,0 +1,27 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Models +{ + /// The severity of the advisory. You must choose between setting this field or `cvss_vector_string`. + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public enum RepositoryAdvisoryUpdate_severity + { + [EnumMember(Value = "critical")] + #pragma warning disable CS1591 + Critical, + #pragma warning restore CS1591 + [EnumMember(Value = "high")] + #pragma warning disable CS1591 + High, + #pragma warning restore CS1591 + [EnumMember(Value = "medium")] + #pragma warning disable CS1591 + Medium, + #pragma warning restore CS1591 + [EnumMember(Value = "low")] + #pragma warning disable CS1591 + Low, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Models/RepositoryAdvisoryUpdate_state.cs b/src/Ayllu.Github.Client/Github/Client/Models/RepositoryAdvisoryUpdate_state.cs new file mode 100644 index 0000000..52917be --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/RepositoryAdvisoryUpdate_state.cs @@ -0,0 +1,23 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Models +{ + /// The state of the advisory. + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public enum RepositoryAdvisoryUpdate_state + { + [EnumMember(Value = "published")] + #pragma warning disable CS1591 + Published, + #pragma warning restore CS1591 + [EnumMember(Value = "closed")] + #pragma warning disable CS1591 + Closed, + #pragma warning restore CS1591 + [EnumMember(Value = "draft")] + #pragma warning disable CS1591 + Draft, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Models/RepositoryAdvisoryUpdate_vulnerabilities.cs b/src/Ayllu.Github.Client/Github/Client/Models/RepositoryAdvisoryUpdate_vulnerabilities.cs new file mode 100644 index 0000000..e6d71e8 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/RepositoryAdvisoryUpdate_vulnerabilities.cs @@ -0,0 +1,85 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class RepositoryAdvisoryUpdate_vulnerabilities : IParsable + #pragma warning restore CS1591 + { + /// The name of the package affected by the vulnerability. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.RepositoryAdvisoryUpdate_vulnerabilities_package? Package { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.RepositoryAdvisoryUpdate_vulnerabilities_package Package { get; set; } +#endif + /// The package version(s) that resolve the vulnerability. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? PatchedVersions { get; set; } +#nullable restore +#else + public string PatchedVersions { get; set; } +#endif + /// The functions in the package that are affected. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? VulnerableFunctions { get; set; } +#nullable restore +#else + public List VulnerableFunctions { get; set; } +#endif + /// The range of the package versions affected by the vulnerability. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? VulnerableVersionRange { get; set; } +#nullable restore +#else + public string VulnerableVersionRange { get; set; } +#endif + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.RepositoryAdvisoryUpdate_vulnerabilities CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.RepositoryAdvisoryUpdate_vulnerabilities(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "package", n => { Package = n.GetObjectValue(global::Ayllu.Github.Client.Models.RepositoryAdvisoryUpdate_vulnerabilities_package.CreateFromDiscriminatorValue); } }, + { "patched_versions", n => { PatchedVersions = n.GetStringValue(); } }, + { "vulnerable_functions", n => { VulnerableFunctions = n.GetCollectionOfPrimitiveValues()?.AsList(); } }, + { "vulnerable_version_range", n => { VulnerableVersionRange = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteObjectValue("package", Package); + writer.WriteStringValue("patched_versions", PatchedVersions); + writer.WriteCollectionOfPrimitiveValues("vulnerable_functions", VulnerableFunctions); + writer.WriteStringValue("vulnerable_version_range", VulnerableVersionRange); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/RepositoryAdvisoryUpdate_vulnerabilities_package.cs b/src/Ayllu.Github.Client/Github/Client/Models/RepositoryAdvisoryUpdate_vulnerabilities_package.cs new file mode 100644 index 0000000..9f7dcad --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/RepositoryAdvisoryUpdate_vulnerabilities_package.cs @@ -0,0 +1,70 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + /// + /// The name of the package affected by the vulnerability. + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class RepositoryAdvisoryUpdate_vulnerabilities_package : IAdditionalDataHolder, IParsable + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The package's language or package management ecosystem. + public global::Ayllu.Github.Client.Models.SecurityAdvisoryEcosystems? Ecosystem { get; set; } + /// The unique package name within its ecosystem. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Name { get; set; } +#nullable restore +#else + public string Name { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public RepositoryAdvisoryUpdate_vulnerabilities_package() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.RepositoryAdvisoryUpdate_vulnerabilities_package CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.RepositoryAdvisoryUpdate_vulnerabilities_package(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "ecosystem", n => { Ecosystem = n.GetEnumValue(); } }, + { "name", n => { Name = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteEnumValue("ecosystem", Ecosystem); + writer.WriteStringValue("name", Name); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/RepositoryAdvisoryVulnerability.cs b/src/Ayllu.Github.Client/Github/Client/Models/RepositoryAdvisoryVulnerability.cs new file mode 100644 index 0000000..141b6f2 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/RepositoryAdvisoryVulnerability.cs @@ -0,0 +1,86 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + /// + /// A product affected by the vulnerability detailed in a repository security advisory. + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class RepositoryAdvisoryVulnerability : IParsable + { + /// The name of the package affected by the vulnerability. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.RepositoryAdvisoryVulnerability_package? Package { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.RepositoryAdvisoryVulnerability_package Package { get; set; } +#endif + /// The package version(s) that resolve the vulnerability. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? PatchedVersions { get; set; } +#nullable restore +#else + public string PatchedVersions { get; set; } +#endif + /// The functions in the package that are affected. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? VulnerableFunctions { get; set; } +#nullable restore +#else + public List VulnerableFunctions { get; set; } +#endif + /// The range of the package versions affected by the vulnerability. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? VulnerableVersionRange { get; set; } +#nullable restore +#else + public string VulnerableVersionRange { get; set; } +#endif + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.RepositoryAdvisoryVulnerability CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.RepositoryAdvisoryVulnerability(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "package", n => { Package = n.GetObjectValue(global::Ayllu.Github.Client.Models.RepositoryAdvisoryVulnerability_package.CreateFromDiscriminatorValue); } }, + { "patched_versions", n => { PatchedVersions = n.GetStringValue(); } }, + { "vulnerable_functions", n => { VulnerableFunctions = n.GetCollectionOfPrimitiveValues()?.AsList(); } }, + { "vulnerable_version_range", n => { VulnerableVersionRange = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteObjectValue("package", Package); + writer.WriteStringValue("patched_versions", PatchedVersions); + writer.WriteCollectionOfPrimitiveValues("vulnerable_functions", VulnerableFunctions); + writer.WriteStringValue("vulnerable_version_range", VulnerableVersionRange); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/RepositoryAdvisoryVulnerability_package.cs b/src/Ayllu.Github.Client/Github/Client/Models/RepositoryAdvisoryVulnerability_package.cs new file mode 100644 index 0000000..011406b --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/RepositoryAdvisoryVulnerability_package.cs @@ -0,0 +1,70 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + /// + /// The name of the package affected by the vulnerability. + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class RepositoryAdvisoryVulnerability_package : IAdditionalDataHolder, IParsable + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The package's language or package management ecosystem. + public global::Ayllu.Github.Client.Models.SecurityAdvisoryEcosystems? Ecosystem { get; set; } + /// The unique package name within its ecosystem. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Name { get; set; } +#nullable restore +#else + public string Name { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public RepositoryAdvisoryVulnerability_package() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.RepositoryAdvisoryVulnerability_package CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.RepositoryAdvisoryVulnerability_package(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "ecosystem", n => { Ecosystem = n.GetEnumValue(); } }, + { "name", n => { Name = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteEnumValue("ecosystem", Ecosystem); + writer.WriteStringValue("name", Name); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/RepositoryAdvisory_credits.cs b/src/Ayllu.Github.Client/Github/Client/Models/RepositoryAdvisory_credits.cs new file mode 100644 index 0000000..41a0a59 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/RepositoryAdvisory_credits.cs @@ -0,0 +1,69 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class RepositoryAdvisory_credits : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The username of the user credited. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Login { get; set; } +#nullable restore +#else + public string Login { get; set; } +#endif + /// The type of credit the user is receiving. + public global::Ayllu.Github.Client.Models.SecurityAdvisoryCreditTypes? Type { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public RepositoryAdvisory_credits() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.RepositoryAdvisory_credits CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.RepositoryAdvisory_credits(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "login", n => { Login = n.GetStringValue(); } }, + { "type", n => { Type = n.GetEnumValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("login", Login); + writer.WriteEnumValue("type", Type); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/RepositoryAdvisory_cvss.cs b/src/Ayllu.Github.Client/Github/Client/Models/RepositoryAdvisory_cvss.cs new file mode 100644 index 0000000..4dd5d07 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/RepositoryAdvisory_cvss.cs @@ -0,0 +1,68 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class RepositoryAdvisory_cvss : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The CVSS score. + public double? Score { get; private set; } + /// The CVSS vector. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? VectorString { get; set; } +#nullable restore +#else + public string VectorString { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public RepositoryAdvisory_cvss() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.RepositoryAdvisory_cvss CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.RepositoryAdvisory_cvss(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "score", n => { Score = n.GetDoubleValue(); } }, + { "vector_string", n => { VectorString = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("vector_string", VectorString); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/RepositoryAdvisory_cwes.cs b/src/Ayllu.Github.Client/Github/Client/Models/RepositoryAdvisory_cwes.cs new file mode 100644 index 0000000..fa871fe --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/RepositoryAdvisory_cwes.cs @@ -0,0 +1,74 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class RepositoryAdvisory_cwes : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The Common Weakness Enumeration (CWE) identifier. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? CweId { get; set; } +#nullable restore +#else + public string CweId { get; set; } +#endif + /// The name of the CWE. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Name { get; private set; } +#nullable restore +#else + public string Name { get; private set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public RepositoryAdvisory_cwes() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.RepositoryAdvisory_cwes CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.RepositoryAdvisory_cwes(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "cwe_id", n => { CweId = n.GetStringValue(); } }, + { "name", n => { Name = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("cwe_id", CweId); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/RepositoryAdvisory_identifiers.cs b/src/Ayllu.Github.Client/Github/Client/Models/RepositoryAdvisory_identifiers.cs new file mode 100644 index 0000000..12a2745 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/RepositoryAdvisory_identifiers.cs @@ -0,0 +1,69 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class RepositoryAdvisory_identifiers : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The type of identifier. + public global::Ayllu.Github.Client.Models.RepositoryAdvisory_identifiers_type? Type { get; set; } + /// The identifier value. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Value { get; set; } +#nullable restore +#else + public string Value { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public RepositoryAdvisory_identifiers() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.RepositoryAdvisory_identifiers CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.RepositoryAdvisory_identifiers(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "type", n => { Type = n.GetEnumValue(); } }, + { "value", n => { Value = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteEnumValue("type", Type); + writer.WriteStringValue("value", Value); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/RepositoryAdvisory_identifiers_type.cs b/src/Ayllu.Github.Client/Github/Client/Models/RepositoryAdvisory_identifiers_type.cs new file mode 100644 index 0000000..4779a65 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/RepositoryAdvisory_identifiers_type.cs @@ -0,0 +1,19 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Models +{ + /// The type of identifier. + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public enum RepositoryAdvisory_identifiers_type + { + [EnumMember(Value = "CVE")] + #pragma warning disable CS1591 + CVE, + #pragma warning restore CS1591 + [EnumMember(Value = "GHSA")] + #pragma warning disable CS1591 + GHSA, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Models/RepositoryAdvisory_severity.cs b/src/Ayllu.Github.Client/Github/Client/Models/RepositoryAdvisory_severity.cs new file mode 100644 index 0000000..950d064 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/RepositoryAdvisory_severity.cs @@ -0,0 +1,27 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Models +{ + /// The severity of the advisory. + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public enum RepositoryAdvisory_severity + { + [EnumMember(Value = "critical")] + #pragma warning disable CS1591 + Critical, + #pragma warning restore CS1591 + [EnumMember(Value = "high")] + #pragma warning disable CS1591 + High, + #pragma warning restore CS1591 + [EnumMember(Value = "medium")] + #pragma warning disable CS1591 + Medium, + #pragma warning restore CS1591 + [EnumMember(Value = "low")] + #pragma warning disable CS1591 + Low, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Models/RepositoryAdvisory_state.cs b/src/Ayllu.Github.Client/Github/Client/Models/RepositoryAdvisory_state.cs new file mode 100644 index 0000000..54c6b26 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/RepositoryAdvisory_state.cs @@ -0,0 +1,31 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Models +{ + /// The state of the advisory. + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public enum RepositoryAdvisory_state + { + [EnumMember(Value = "published")] + #pragma warning disable CS1591 + Published, + #pragma warning restore CS1591 + [EnumMember(Value = "closed")] + #pragma warning disable CS1591 + Closed, + #pragma warning restore CS1591 + [EnumMember(Value = "withdrawn")] + #pragma warning disable CS1591 + Withdrawn, + #pragma warning restore CS1591 + [EnumMember(Value = "draft")] + #pragma warning disable CS1591 + Draft, + #pragma warning restore CS1591 + [EnumMember(Value = "triage")] + #pragma warning disable CS1591 + Triage, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Models/RepositoryAdvisory_submission.cs b/src/Ayllu.Github.Client/Github/Client/Models/RepositoryAdvisory_submission.cs new file mode 100644 index 0000000..b6bea34 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/RepositoryAdvisory_submission.cs @@ -0,0 +1,58 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class RepositoryAdvisory_submission : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Whether a private vulnerability report was accepted by the repository's administrators. + public bool? Accepted { get; private set; } + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public RepositoryAdvisory_submission() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.RepositoryAdvisory_submission CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.RepositoryAdvisory_submission(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "accepted", n => { Accepted = n.GetBoolValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/RepositoryCollaboratorPermission.cs b/src/Ayllu.Github.Client/Github/Client/Models/RepositoryCollaboratorPermission.cs new file mode 100644 index 0000000..dfed13f --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/RepositoryCollaboratorPermission.cs @@ -0,0 +1,86 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + /// + /// Repository Collaborator Permission + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class RepositoryCollaboratorPermission : IAdditionalDataHolder, IParsable + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The permission property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Permission { get; set; } +#nullable restore +#else + public string Permission { get; set; } +#endif + /// The role_name property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? RoleName { get; set; } +#nullable restore +#else + public string RoleName { get; set; } +#endif + /// Collaborator +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.NullableCollaborator? User { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.NullableCollaborator User { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public RepositoryCollaboratorPermission() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.RepositoryCollaboratorPermission CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.RepositoryCollaboratorPermission(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "permission", n => { Permission = n.GetStringValue(); } }, + { "role_name", n => { RoleName = n.GetStringValue(); } }, + { "user", n => { User = n.GetObjectValue(global::Ayllu.Github.Client.Models.NullableCollaborator.CreateFromDiscriminatorValue); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("permission", Permission); + writer.WriteStringValue("role_name", RoleName); + writer.WriteObjectValue("user", User); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/RepositoryInvitation.cs b/src/Ayllu.Github.Client/Github/Client/Models/RepositoryInvitation.cs new file mode 100644 index 0000000..7ae5265 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/RepositoryInvitation.cs @@ -0,0 +1,132 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + /// + /// Repository invitations let you manage who you collaborate with. + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class RepositoryInvitation : IAdditionalDataHolder, IParsable + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The created_at property + public DateTimeOffset? CreatedAt { get; set; } + /// Whether or not the invitation has expired + public bool? Expired { get; set; } + /// The html_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? HtmlUrl { get; set; } +#nullable restore +#else + public string HtmlUrl { get; set; } +#endif + /// Unique identifier of the repository invitation. + public long? Id { get; set; } + /// A GitHub user. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.NullableSimpleUser? Invitee { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.NullableSimpleUser Invitee { get; set; } +#endif + /// A GitHub user. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.NullableSimpleUser? Inviter { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.NullableSimpleUser Inviter { get; set; } +#endif + /// The node_id property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? NodeId { get; set; } +#nullable restore +#else + public string NodeId { get; set; } +#endif + /// The permission associated with the invitation. + public global::Ayllu.Github.Client.Models.RepositoryInvitation_permissions? Permissions { get; set; } + /// Minimal Repository +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.MinimalRepository? Repository { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.MinimalRepository Repository { get; set; } +#endif + /// URL for the repository invitation +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Url { get; set; } +#nullable restore +#else + public string Url { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public RepositoryInvitation() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.RepositoryInvitation CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.RepositoryInvitation(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "created_at", n => { CreatedAt = n.GetDateTimeOffsetValue(); } }, + { "expired", n => { Expired = n.GetBoolValue(); } }, + { "html_url", n => { HtmlUrl = n.GetStringValue(); } }, + { "id", n => { Id = n.GetLongValue(); } }, + { "invitee", n => { Invitee = n.GetObjectValue(global::Ayllu.Github.Client.Models.NullableSimpleUser.CreateFromDiscriminatorValue); } }, + { "inviter", n => { Inviter = n.GetObjectValue(global::Ayllu.Github.Client.Models.NullableSimpleUser.CreateFromDiscriminatorValue); } }, + { "node_id", n => { NodeId = n.GetStringValue(); } }, + { "permissions", n => { Permissions = n.GetEnumValue(); } }, + { "repository", n => { Repository = n.GetObjectValue(global::Ayllu.Github.Client.Models.MinimalRepository.CreateFromDiscriminatorValue); } }, + { "url", n => { Url = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteDateTimeOffsetValue("created_at", CreatedAt); + writer.WriteBoolValue("expired", Expired); + writer.WriteStringValue("html_url", HtmlUrl); + writer.WriteLongValue("id", Id); + writer.WriteObjectValue("invitee", Invitee); + writer.WriteObjectValue("inviter", Inviter); + writer.WriteStringValue("node_id", NodeId); + writer.WriteEnumValue("permissions", Permissions); + writer.WriteObjectValue("repository", Repository); + writer.WriteStringValue("url", Url); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/RepositoryInvitation_permissions.cs b/src/Ayllu.Github.Client/Github/Client/Models/RepositoryInvitation_permissions.cs new file mode 100644 index 0000000..7aa439e --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/RepositoryInvitation_permissions.cs @@ -0,0 +1,31 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Models +{ + /// The permission associated with the invitation. + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public enum RepositoryInvitation_permissions + { + [EnumMember(Value = "read")] + #pragma warning disable CS1591 + Read, + #pragma warning restore CS1591 + [EnumMember(Value = "write")] + #pragma warning disable CS1591 + Write, + #pragma warning restore CS1591 + [EnumMember(Value = "admin")] + #pragma warning disable CS1591 + Admin, + #pragma warning restore CS1591 + [EnumMember(Value = "triage")] + #pragma warning disable CS1591 + Triage, + #pragma warning restore CS1591 + [EnumMember(Value = "maintain")] + #pragma warning disable CS1591 + Maintain, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Models/RepositoryRule.cs b/src/Ayllu.Github.Client/Github/Client/Models/RepositoryRule.cs new file mode 100644 index 0000000..78c8b32 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/RepositoryRule.cs @@ -0,0 +1,466 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + /// + /// Composed type wrapper for classes , , , , , , , , , , , , , , , , , , , , + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class RepositoryRule : IComposedTypeWrapper, IParsable + { + /// Composed type representation for type +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.RepositoryRuleBranchNamePattern? RepositoryRuleBranchNamePattern { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.RepositoryRuleBranchNamePattern RepositoryRuleBranchNamePattern { get; set; } +#endif + /// Composed type representation for type +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.RepositoryRuleCodeScanning? RepositoryRuleCodeScanning { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.RepositoryRuleCodeScanning RepositoryRuleCodeScanning { get; set; } +#endif + /// Composed type representation for type +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.RepositoryRuleCommitAuthorEmailPattern? RepositoryRuleCommitAuthorEmailPattern { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.RepositoryRuleCommitAuthorEmailPattern RepositoryRuleCommitAuthorEmailPattern { get; set; } +#endif + /// Composed type representation for type +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.RepositoryRuleCommitMessagePattern? RepositoryRuleCommitMessagePattern { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.RepositoryRuleCommitMessagePattern RepositoryRuleCommitMessagePattern { get; set; } +#endif + /// Composed type representation for type +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.RepositoryRuleCommitterEmailPattern? RepositoryRuleCommitterEmailPattern { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.RepositoryRuleCommitterEmailPattern RepositoryRuleCommitterEmailPattern { get; set; } +#endif + /// Composed type representation for type +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.RepositoryRuleCreation? RepositoryRuleCreation { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.RepositoryRuleCreation RepositoryRuleCreation { get; set; } +#endif + /// Composed type representation for type +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.RepositoryRuleDeletion? RepositoryRuleDeletion { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.RepositoryRuleDeletion RepositoryRuleDeletion { get; set; } +#endif + /// Composed type representation for type +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.RepositoryRuleFileExtensionRestriction? RepositoryRuleFileExtensionRestriction { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.RepositoryRuleFileExtensionRestriction RepositoryRuleFileExtensionRestriction { get; set; } +#endif + /// Composed type representation for type +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.RepositoryRuleFilePathRestriction? RepositoryRuleFilePathRestriction { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.RepositoryRuleFilePathRestriction RepositoryRuleFilePathRestriction { get; set; } +#endif + /// Composed type representation for type +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.RepositoryRuleMaxFilePathLength? RepositoryRuleMaxFilePathLength { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.RepositoryRuleMaxFilePathLength RepositoryRuleMaxFilePathLength { get; set; } +#endif + /// Composed type representation for type +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.RepositoryRuleMaxFileSize? RepositoryRuleMaxFileSize { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.RepositoryRuleMaxFileSize RepositoryRuleMaxFileSize { get; set; } +#endif + /// Composed type representation for type +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.RepositoryRuleMergeQueue? RepositoryRuleMergeQueue { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.RepositoryRuleMergeQueue RepositoryRuleMergeQueue { get; set; } +#endif + /// Composed type representation for type +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.RepositoryRuleNonFastForward? RepositoryRuleNonFastForward { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.RepositoryRuleNonFastForward RepositoryRuleNonFastForward { get; set; } +#endif + /// Composed type representation for type +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.RepositoryRulePullRequest? RepositoryRulePullRequest { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.RepositoryRulePullRequest RepositoryRulePullRequest { get; set; } +#endif + /// Composed type representation for type +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.RepositoryRuleRequiredDeployments? RepositoryRuleRequiredDeployments { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.RepositoryRuleRequiredDeployments RepositoryRuleRequiredDeployments { get; set; } +#endif + /// Composed type representation for type +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.RepositoryRuleRequiredLinearHistory? RepositoryRuleRequiredLinearHistory { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.RepositoryRuleRequiredLinearHistory RepositoryRuleRequiredLinearHistory { get; set; } +#endif + /// Composed type representation for type +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.RepositoryRuleRequiredSignatures? RepositoryRuleRequiredSignatures { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.RepositoryRuleRequiredSignatures RepositoryRuleRequiredSignatures { get; set; } +#endif + /// Composed type representation for type +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.RepositoryRuleRequiredStatusChecks? RepositoryRuleRequiredStatusChecks { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.RepositoryRuleRequiredStatusChecks RepositoryRuleRequiredStatusChecks { get; set; } +#endif + /// Composed type representation for type +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.RepositoryRuleTagNamePattern? RepositoryRuleTagNamePattern { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.RepositoryRuleTagNamePattern RepositoryRuleTagNamePattern { get; set; } +#endif + /// Composed type representation for type +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.RepositoryRuleUpdate? RepositoryRuleUpdate { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.RepositoryRuleUpdate RepositoryRuleUpdate { get; set; } +#endif + /// Composed type representation for type +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.RepositoryRuleWorkflows? RepositoryRuleWorkflows { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.RepositoryRuleWorkflows RepositoryRuleWorkflows { get; set; } +#endif + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.RepositoryRule CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + var mappingValue = parseNode.GetChildNode("")?.GetStringValue(); + var result = new global::Ayllu.Github.Client.Models.RepositoryRule(); + if("repository-rule-branch-name-pattern".Equals(mappingValue, StringComparison.OrdinalIgnoreCase)) + { + result.RepositoryRuleBranchNamePattern = new global::Ayllu.Github.Client.Models.RepositoryRuleBranchNamePattern(); + } + else if("repository-rule-code-scanning".Equals(mappingValue, StringComparison.OrdinalIgnoreCase)) + { + result.RepositoryRuleCodeScanning = new global::Ayllu.Github.Client.Models.RepositoryRuleCodeScanning(); + } + else if("repository-rule-commit-author-email-pattern".Equals(mappingValue, StringComparison.OrdinalIgnoreCase)) + { + result.RepositoryRuleCommitAuthorEmailPattern = new global::Ayllu.Github.Client.Models.RepositoryRuleCommitAuthorEmailPattern(); + } + else if("repository-rule-commit-message-pattern".Equals(mappingValue, StringComparison.OrdinalIgnoreCase)) + { + result.RepositoryRuleCommitMessagePattern = new global::Ayllu.Github.Client.Models.RepositoryRuleCommitMessagePattern(); + } + else if("repository-rule-committer-email-pattern".Equals(mappingValue, StringComparison.OrdinalIgnoreCase)) + { + result.RepositoryRuleCommitterEmailPattern = new global::Ayllu.Github.Client.Models.RepositoryRuleCommitterEmailPattern(); + } + else if("repository-rule-creation".Equals(mappingValue, StringComparison.OrdinalIgnoreCase)) + { + result.RepositoryRuleCreation = new global::Ayllu.Github.Client.Models.RepositoryRuleCreation(); + } + else if("repository-rule-deletion".Equals(mappingValue, StringComparison.OrdinalIgnoreCase)) + { + result.RepositoryRuleDeletion = new global::Ayllu.Github.Client.Models.RepositoryRuleDeletion(); + } + else if("repository-rule-file-extension-restriction".Equals(mappingValue, StringComparison.OrdinalIgnoreCase)) + { + result.RepositoryRuleFileExtensionRestriction = new global::Ayllu.Github.Client.Models.RepositoryRuleFileExtensionRestriction(); + } + else if("repository-rule-file-path-restriction".Equals(mappingValue, StringComparison.OrdinalIgnoreCase)) + { + result.RepositoryRuleFilePathRestriction = new global::Ayllu.Github.Client.Models.RepositoryRuleFilePathRestriction(); + } + else if("repository-rule-max-file-path-length".Equals(mappingValue, StringComparison.OrdinalIgnoreCase)) + { + result.RepositoryRuleMaxFilePathLength = new global::Ayllu.Github.Client.Models.RepositoryRuleMaxFilePathLength(); + } + else if("repository-rule-max-file-size".Equals(mappingValue, StringComparison.OrdinalIgnoreCase)) + { + result.RepositoryRuleMaxFileSize = new global::Ayllu.Github.Client.Models.RepositoryRuleMaxFileSize(); + } + else if("repository-rule-merge-queue".Equals(mappingValue, StringComparison.OrdinalIgnoreCase)) + { + result.RepositoryRuleMergeQueue = new global::Ayllu.Github.Client.Models.RepositoryRuleMergeQueue(); + } + else if("repository-rule-non-fast-forward".Equals(mappingValue, StringComparison.OrdinalIgnoreCase)) + { + result.RepositoryRuleNonFastForward = new global::Ayllu.Github.Client.Models.RepositoryRuleNonFastForward(); + } + else if("repository-rule-pull-request".Equals(mappingValue, StringComparison.OrdinalIgnoreCase)) + { + result.RepositoryRulePullRequest = new global::Ayllu.Github.Client.Models.RepositoryRulePullRequest(); + } + else if("repository-rule-required-deployments".Equals(mappingValue, StringComparison.OrdinalIgnoreCase)) + { + result.RepositoryRuleRequiredDeployments = new global::Ayllu.Github.Client.Models.RepositoryRuleRequiredDeployments(); + } + else if("repository-rule-required-linear-history".Equals(mappingValue, StringComparison.OrdinalIgnoreCase)) + { + result.RepositoryRuleRequiredLinearHistory = new global::Ayllu.Github.Client.Models.RepositoryRuleRequiredLinearHistory(); + } + else if("repository-rule-required-signatures".Equals(mappingValue, StringComparison.OrdinalIgnoreCase)) + { + result.RepositoryRuleRequiredSignatures = new global::Ayllu.Github.Client.Models.RepositoryRuleRequiredSignatures(); + } + else if("repository-rule-required-status-checks".Equals(mappingValue, StringComparison.OrdinalIgnoreCase)) + { + result.RepositoryRuleRequiredStatusChecks = new global::Ayllu.Github.Client.Models.RepositoryRuleRequiredStatusChecks(); + } + else if("repository-rule-tag-name-pattern".Equals(mappingValue, StringComparison.OrdinalIgnoreCase)) + { + result.RepositoryRuleTagNamePattern = new global::Ayllu.Github.Client.Models.RepositoryRuleTagNamePattern(); + } + else if("repository-rule-update".Equals(mappingValue, StringComparison.OrdinalIgnoreCase)) + { + result.RepositoryRuleUpdate = new global::Ayllu.Github.Client.Models.RepositoryRuleUpdate(); + } + else if("repository-rule-workflows".Equals(mappingValue, StringComparison.OrdinalIgnoreCase)) + { + result.RepositoryRuleWorkflows = new global::Ayllu.Github.Client.Models.RepositoryRuleWorkflows(); + } + return result; + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + if(RepositoryRuleBranchNamePattern != null) + { + return RepositoryRuleBranchNamePattern.GetFieldDeserializers(); + } + else if(RepositoryRuleCodeScanning != null) + { + return RepositoryRuleCodeScanning.GetFieldDeserializers(); + } + else if(RepositoryRuleCommitAuthorEmailPattern != null) + { + return RepositoryRuleCommitAuthorEmailPattern.GetFieldDeserializers(); + } + else if(RepositoryRuleCommitMessagePattern != null) + { + return RepositoryRuleCommitMessagePattern.GetFieldDeserializers(); + } + else if(RepositoryRuleCommitterEmailPattern != null) + { + return RepositoryRuleCommitterEmailPattern.GetFieldDeserializers(); + } + else if(RepositoryRuleCreation != null) + { + return RepositoryRuleCreation.GetFieldDeserializers(); + } + else if(RepositoryRuleDeletion != null) + { + return RepositoryRuleDeletion.GetFieldDeserializers(); + } + else if(RepositoryRuleFileExtensionRestriction != null) + { + return RepositoryRuleFileExtensionRestriction.GetFieldDeserializers(); + } + else if(RepositoryRuleFilePathRestriction != null) + { + return RepositoryRuleFilePathRestriction.GetFieldDeserializers(); + } + else if(RepositoryRuleMaxFilePathLength != null) + { + return RepositoryRuleMaxFilePathLength.GetFieldDeserializers(); + } + else if(RepositoryRuleMaxFileSize != null) + { + return RepositoryRuleMaxFileSize.GetFieldDeserializers(); + } + else if(RepositoryRuleMergeQueue != null) + { + return RepositoryRuleMergeQueue.GetFieldDeserializers(); + } + else if(RepositoryRuleNonFastForward != null) + { + return RepositoryRuleNonFastForward.GetFieldDeserializers(); + } + else if(RepositoryRulePullRequest != null) + { + return RepositoryRulePullRequest.GetFieldDeserializers(); + } + else if(RepositoryRuleRequiredDeployments != null) + { + return RepositoryRuleRequiredDeployments.GetFieldDeserializers(); + } + else if(RepositoryRuleRequiredLinearHistory != null) + { + return RepositoryRuleRequiredLinearHistory.GetFieldDeserializers(); + } + else if(RepositoryRuleRequiredSignatures != null) + { + return RepositoryRuleRequiredSignatures.GetFieldDeserializers(); + } + else if(RepositoryRuleRequiredStatusChecks != null) + { + return RepositoryRuleRequiredStatusChecks.GetFieldDeserializers(); + } + else if(RepositoryRuleTagNamePattern != null) + { + return RepositoryRuleTagNamePattern.GetFieldDeserializers(); + } + else if(RepositoryRuleUpdate != null) + { + return RepositoryRuleUpdate.GetFieldDeserializers(); + } + else if(RepositoryRuleWorkflows != null) + { + return RepositoryRuleWorkflows.GetFieldDeserializers(); + } + return new Dictionary>(); + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(RepositoryRuleBranchNamePattern != null) + { + writer.WriteObjectValue(null, RepositoryRuleBranchNamePattern); + } + else if(RepositoryRuleCodeScanning != null) + { + writer.WriteObjectValue(null, RepositoryRuleCodeScanning); + } + else if(RepositoryRuleCommitAuthorEmailPattern != null) + { + writer.WriteObjectValue(null, RepositoryRuleCommitAuthorEmailPattern); + } + else if(RepositoryRuleCommitMessagePattern != null) + { + writer.WriteObjectValue(null, RepositoryRuleCommitMessagePattern); + } + else if(RepositoryRuleCommitterEmailPattern != null) + { + writer.WriteObjectValue(null, RepositoryRuleCommitterEmailPattern); + } + else if(RepositoryRuleCreation != null) + { + writer.WriteObjectValue(null, RepositoryRuleCreation); + } + else if(RepositoryRuleDeletion != null) + { + writer.WriteObjectValue(null, RepositoryRuleDeletion); + } + else if(RepositoryRuleFileExtensionRestriction != null) + { + writer.WriteObjectValue(null, RepositoryRuleFileExtensionRestriction); + } + else if(RepositoryRuleFilePathRestriction != null) + { + writer.WriteObjectValue(null, RepositoryRuleFilePathRestriction); + } + else if(RepositoryRuleMaxFilePathLength != null) + { + writer.WriteObjectValue(null, RepositoryRuleMaxFilePathLength); + } + else if(RepositoryRuleMaxFileSize != null) + { + writer.WriteObjectValue(null, RepositoryRuleMaxFileSize); + } + else if(RepositoryRuleMergeQueue != null) + { + writer.WriteObjectValue(null, RepositoryRuleMergeQueue); + } + else if(RepositoryRuleNonFastForward != null) + { + writer.WriteObjectValue(null, RepositoryRuleNonFastForward); + } + else if(RepositoryRulePullRequest != null) + { + writer.WriteObjectValue(null, RepositoryRulePullRequest); + } + else if(RepositoryRuleRequiredDeployments != null) + { + writer.WriteObjectValue(null, RepositoryRuleRequiredDeployments); + } + else if(RepositoryRuleRequiredLinearHistory != null) + { + writer.WriteObjectValue(null, RepositoryRuleRequiredLinearHistory); + } + else if(RepositoryRuleRequiredSignatures != null) + { + writer.WriteObjectValue(null, RepositoryRuleRequiredSignatures); + } + else if(RepositoryRuleRequiredStatusChecks != null) + { + writer.WriteObjectValue(null, RepositoryRuleRequiredStatusChecks); + } + else if(RepositoryRuleTagNamePattern != null) + { + writer.WriteObjectValue(null, RepositoryRuleTagNamePattern); + } + else if(RepositoryRuleUpdate != null) + { + writer.WriteObjectValue(null, RepositoryRuleUpdate); + } + else if(RepositoryRuleWorkflows != null) + { + writer.WriteObjectValue(null, RepositoryRuleWorkflows); + } + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/RepositoryRuleBranchNamePattern.cs b/src/Ayllu.Github.Client/Github/Client/Models/RepositoryRuleBranchNamePattern.cs new file mode 100644 index 0000000..fe324d0 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/RepositoryRuleBranchNamePattern.cs @@ -0,0 +1,70 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + /// + /// Parameters to be used for the branch_name_pattern rule + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class RepositoryRuleBranchNamePattern : IAdditionalDataHolder, IParsable + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The parameters property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.RepositoryRuleBranchNamePattern_parameters? Parameters { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.RepositoryRuleBranchNamePattern_parameters Parameters { get; set; } +#endif + /// The type property + public global::Ayllu.Github.Client.Models.RepositoryRuleBranchNamePattern_type? Type { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public RepositoryRuleBranchNamePattern() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.RepositoryRuleBranchNamePattern CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.RepositoryRuleBranchNamePattern(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "parameters", n => { Parameters = n.GetObjectValue(global::Ayllu.Github.Client.Models.RepositoryRuleBranchNamePattern_parameters.CreateFromDiscriminatorValue); } }, + { "type", n => { Type = n.GetEnumValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteObjectValue("parameters", Parameters); + writer.WriteEnumValue("type", Type); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/RepositoryRuleBranchNamePattern_parameters.cs b/src/Ayllu.Github.Client/Github/Client/Models/RepositoryRuleBranchNamePattern_parameters.cs new file mode 100644 index 0000000..cc5fc6e --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/RepositoryRuleBranchNamePattern_parameters.cs @@ -0,0 +1,83 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class RepositoryRuleBranchNamePattern_parameters : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// How this rule will appear to users. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Name { get; set; } +#nullable restore +#else + public string Name { get; set; } +#endif + /// If true, the rule will fail if the pattern matches. + public bool? Negate { get; set; } + /// The operator to use for matching. + public global::Ayllu.Github.Client.Models.RepositoryRuleBranchNamePattern_parameters_operator? Operator { get; set; } + /// The pattern to match with. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Pattern { get; set; } +#nullable restore +#else + public string Pattern { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public RepositoryRuleBranchNamePattern_parameters() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.RepositoryRuleBranchNamePattern_parameters CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.RepositoryRuleBranchNamePattern_parameters(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "name", n => { Name = n.GetStringValue(); } }, + { "negate", n => { Negate = n.GetBoolValue(); } }, + { "operator", n => { Operator = n.GetEnumValue(); } }, + { "pattern", n => { Pattern = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("name", Name); + writer.WriteBoolValue("negate", Negate); + writer.WriteEnumValue("operator", Operator); + writer.WriteStringValue("pattern", Pattern); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/RepositoryRuleBranchNamePattern_parameters_operator.cs b/src/Ayllu.Github.Client/Github/Client/Models/RepositoryRuleBranchNamePattern_parameters_operator.cs new file mode 100644 index 0000000..33cf676 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/RepositoryRuleBranchNamePattern_parameters_operator.cs @@ -0,0 +1,27 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Models +{ + /// The operator to use for matching. + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public enum RepositoryRuleBranchNamePattern_parameters_operator + { + [EnumMember(Value = "starts_with")] + #pragma warning disable CS1591 + Starts_with, + #pragma warning restore CS1591 + [EnumMember(Value = "ends_with")] + #pragma warning disable CS1591 + Ends_with, + #pragma warning restore CS1591 + [EnumMember(Value = "contains")] + #pragma warning disable CS1591 + Contains, + #pragma warning restore CS1591 + [EnumMember(Value = "regex")] + #pragma warning disable CS1591 + Regex, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Models/RepositoryRuleBranchNamePattern_type.cs b/src/Ayllu.Github.Client/Github/Client/Models/RepositoryRuleBranchNamePattern_type.cs new file mode 100644 index 0000000..f9163b1 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/RepositoryRuleBranchNamePattern_type.cs @@ -0,0 +1,16 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public enum RepositoryRuleBranchNamePattern_type + #pragma warning restore CS1591 + { + [EnumMember(Value = "branch_name_pattern")] + #pragma warning disable CS1591 + Branch_name_pattern, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Models/RepositoryRuleCodeScanning.cs b/src/Ayllu.Github.Client/Github/Client/Models/RepositoryRuleCodeScanning.cs new file mode 100644 index 0000000..5ec511b --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/RepositoryRuleCodeScanning.cs @@ -0,0 +1,70 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + /// + /// 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. + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class RepositoryRuleCodeScanning : IAdditionalDataHolder, IParsable + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The parameters property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.RepositoryRuleCodeScanning_parameters? Parameters { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.RepositoryRuleCodeScanning_parameters Parameters { get; set; } +#endif + /// The type property + public global::Ayllu.Github.Client.Models.RepositoryRuleCodeScanning_type? Type { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public RepositoryRuleCodeScanning() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.RepositoryRuleCodeScanning CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.RepositoryRuleCodeScanning(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "parameters", n => { Parameters = n.GetObjectValue(global::Ayllu.Github.Client.Models.RepositoryRuleCodeScanning_parameters.CreateFromDiscriminatorValue); } }, + { "type", n => { Type = n.GetEnumValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteObjectValue("parameters", Parameters); + writer.WriteEnumValue("type", Type); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/RepositoryRuleCodeScanning_parameters.cs b/src/Ayllu.Github.Client/Github/Client/Models/RepositoryRuleCodeScanning_parameters.cs new file mode 100644 index 0000000..aef836c --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/RepositoryRuleCodeScanning_parameters.cs @@ -0,0 +1,65 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class RepositoryRuleCodeScanning_parameters : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// Tools that must provide code scanning results for this rule to pass. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? CodeScanningTools { get; set; } +#nullable restore +#else + public List CodeScanningTools { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public RepositoryRuleCodeScanning_parameters() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.RepositoryRuleCodeScanning_parameters CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.RepositoryRuleCodeScanning_parameters(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "code_scanning_tools", n => { CodeScanningTools = n.GetCollectionOfObjectValues(global::Ayllu.Github.Client.Models.RepositoryRuleParamsCodeScanningTool.CreateFromDiscriminatorValue)?.AsList(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteCollectionOfObjectValues("code_scanning_tools", CodeScanningTools); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/RepositoryRuleCodeScanning_type.cs b/src/Ayllu.Github.Client/Github/Client/Models/RepositoryRuleCodeScanning_type.cs new file mode 100644 index 0000000..b2bc6cc --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/RepositoryRuleCodeScanning_type.cs @@ -0,0 +1,16 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public enum RepositoryRuleCodeScanning_type + #pragma warning restore CS1591 + { + [EnumMember(Value = "code_scanning")] + #pragma warning disable CS1591 + Code_scanning, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Models/RepositoryRuleCommitAuthorEmailPattern.cs b/src/Ayllu.Github.Client/Github/Client/Models/RepositoryRuleCommitAuthorEmailPattern.cs new file mode 100644 index 0000000..aefe3cf --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/RepositoryRuleCommitAuthorEmailPattern.cs @@ -0,0 +1,70 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + /// + /// Parameters to be used for the commit_author_email_pattern rule + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class RepositoryRuleCommitAuthorEmailPattern : IAdditionalDataHolder, IParsable + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The parameters property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.RepositoryRuleCommitAuthorEmailPattern_parameters? Parameters { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.RepositoryRuleCommitAuthorEmailPattern_parameters Parameters { get; set; } +#endif + /// The type property + public global::Ayllu.Github.Client.Models.RepositoryRuleCommitAuthorEmailPattern_type? Type { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public RepositoryRuleCommitAuthorEmailPattern() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.RepositoryRuleCommitAuthorEmailPattern CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.RepositoryRuleCommitAuthorEmailPattern(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "parameters", n => { Parameters = n.GetObjectValue(global::Ayllu.Github.Client.Models.RepositoryRuleCommitAuthorEmailPattern_parameters.CreateFromDiscriminatorValue); } }, + { "type", n => { Type = n.GetEnumValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteObjectValue("parameters", Parameters); + writer.WriteEnumValue("type", Type); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/RepositoryRuleCommitAuthorEmailPattern_parameters.cs b/src/Ayllu.Github.Client/Github/Client/Models/RepositoryRuleCommitAuthorEmailPattern_parameters.cs new file mode 100644 index 0000000..92783cf --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/RepositoryRuleCommitAuthorEmailPattern_parameters.cs @@ -0,0 +1,83 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class RepositoryRuleCommitAuthorEmailPattern_parameters : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// How this rule will appear to users. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Name { get; set; } +#nullable restore +#else + public string Name { get; set; } +#endif + /// If true, the rule will fail if the pattern matches. + public bool? Negate { get; set; } + /// The operator to use for matching. + public global::Ayllu.Github.Client.Models.RepositoryRuleCommitAuthorEmailPattern_parameters_operator? Operator { get; set; } + /// The pattern to match with. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Pattern { get; set; } +#nullable restore +#else + public string Pattern { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public RepositoryRuleCommitAuthorEmailPattern_parameters() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.RepositoryRuleCommitAuthorEmailPattern_parameters CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.RepositoryRuleCommitAuthorEmailPattern_parameters(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "name", n => { Name = n.GetStringValue(); } }, + { "negate", n => { Negate = n.GetBoolValue(); } }, + { "operator", n => { Operator = n.GetEnumValue(); } }, + { "pattern", n => { Pattern = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("name", Name); + writer.WriteBoolValue("negate", Negate); + writer.WriteEnumValue("operator", Operator); + writer.WriteStringValue("pattern", Pattern); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/RepositoryRuleCommitAuthorEmailPattern_parameters_operator.cs b/src/Ayllu.Github.Client/Github/Client/Models/RepositoryRuleCommitAuthorEmailPattern_parameters_operator.cs new file mode 100644 index 0000000..dc197fb --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/RepositoryRuleCommitAuthorEmailPattern_parameters_operator.cs @@ -0,0 +1,27 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Models +{ + /// The operator to use for matching. + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public enum RepositoryRuleCommitAuthorEmailPattern_parameters_operator + { + [EnumMember(Value = "starts_with")] + #pragma warning disable CS1591 + Starts_with, + #pragma warning restore CS1591 + [EnumMember(Value = "ends_with")] + #pragma warning disable CS1591 + Ends_with, + #pragma warning restore CS1591 + [EnumMember(Value = "contains")] + #pragma warning disable CS1591 + Contains, + #pragma warning restore CS1591 + [EnumMember(Value = "regex")] + #pragma warning disable CS1591 + Regex, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Models/RepositoryRuleCommitAuthorEmailPattern_type.cs b/src/Ayllu.Github.Client/Github/Client/Models/RepositoryRuleCommitAuthorEmailPattern_type.cs new file mode 100644 index 0000000..82f9d9f --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/RepositoryRuleCommitAuthorEmailPattern_type.cs @@ -0,0 +1,16 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public enum RepositoryRuleCommitAuthorEmailPattern_type + #pragma warning restore CS1591 + { + [EnumMember(Value = "commit_author_email_pattern")] + #pragma warning disable CS1591 + Commit_author_email_pattern, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Models/RepositoryRuleCommitMessagePattern.cs b/src/Ayllu.Github.Client/Github/Client/Models/RepositoryRuleCommitMessagePattern.cs new file mode 100644 index 0000000..9959b86 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/RepositoryRuleCommitMessagePattern.cs @@ -0,0 +1,70 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + /// + /// Parameters to be used for the commit_message_pattern rule + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class RepositoryRuleCommitMessagePattern : IAdditionalDataHolder, IParsable + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The parameters property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.RepositoryRuleCommitMessagePattern_parameters? Parameters { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.RepositoryRuleCommitMessagePattern_parameters Parameters { get; set; } +#endif + /// The type property + public global::Ayllu.Github.Client.Models.RepositoryRuleCommitMessagePattern_type? Type { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public RepositoryRuleCommitMessagePattern() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.RepositoryRuleCommitMessagePattern CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.RepositoryRuleCommitMessagePattern(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "parameters", n => { Parameters = n.GetObjectValue(global::Ayllu.Github.Client.Models.RepositoryRuleCommitMessagePattern_parameters.CreateFromDiscriminatorValue); } }, + { "type", n => { Type = n.GetEnumValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteObjectValue("parameters", Parameters); + writer.WriteEnumValue("type", Type); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/RepositoryRuleCommitMessagePattern_parameters.cs b/src/Ayllu.Github.Client/Github/Client/Models/RepositoryRuleCommitMessagePattern_parameters.cs new file mode 100644 index 0000000..aa79bfc --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/RepositoryRuleCommitMessagePattern_parameters.cs @@ -0,0 +1,83 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class RepositoryRuleCommitMessagePattern_parameters : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// How this rule will appear to users. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Name { get; set; } +#nullable restore +#else + public string Name { get; set; } +#endif + /// If true, the rule will fail if the pattern matches. + public bool? Negate { get; set; } + /// The operator to use for matching. + public global::Ayllu.Github.Client.Models.RepositoryRuleCommitMessagePattern_parameters_operator? Operator { get; set; } + /// The pattern to match with. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Pattern { get; set; } +#nullable restore +#else + public string Pattern { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public RepositoryRuleCommitMessagePattern_parameters() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.RepositoryRuleCommitMessagePattern_parameters CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.RepositoryRuleCommitMessagePattern_parameters(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "name", n => { Name = n.GetStringValue(); } }, + { "negate", n => { Negate = n.GetBoolValue(); } }, + { "operator", n => { Operator = n.GetEnumValue(); } }, + { "pattern", n => { Pattern = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("name", Name); + writer.WriteBoolValue("negate", Negate); + writer.WriteEnumValue("operator", Operator); + writer.WriteStringValue("pattern", Pattern); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/RepositoryRuleCommitMessagePattern_parameters_operator.cs b/src/Ayllu.Github.Client/Github/Client/Models/RepositoryRuleCommitMessagePattern_parameters_operator.cs new file mode 100644 index 0000000..ad6b07d --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/RepositoryRuleCommitMessagePattern_parameters_operator.cs @@ -0,0 +1,27 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Models +{ + /// The operator to use for matching. + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public enum RepositoryRuleCommitMessagePattern_parameters_operator + { + [EnumMember(Value = "starts_with")] + #pragma warning disable CS1591 + Starts_with, + #pragma warning restore CS1591 + [EnumMember(Value = "ends_with")] + #pragma warning disable CS1591 + Ends_with, + #pragma warning restore CS1591 + [EnumMember(Value = "contains")] + #pragma warning disable CS1591 + Contains, + #pragma warning restore CS1591 + [EnumMember(Value = "regex")] + #pragma warning disable CS1591 + Regex, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Models/RepositoryRuleCommitMessagePattern_type.cs b/src/Ayllu.Github.Client/Github/Client/Models/RepositoryRuleCommitMessagePattern_type.cs new file mode 100644 index 0000000..37c2943 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/RepositoryRuleCommitMessagePattern_type.cs @@ -0,0 +1,16 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public enum RepositoryRuleCommitMessagePattern_type + #pragma warning restore CS1591 + { + [EnumMember(Value = "commit_message_pattern")] + #pragma warning disable CS1591 + Commit_message_pattern, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Models/RepositoryRuleCommitterEmailPattern.cs b/src/Ayllu.Github.Client/Github/Client/Models/RepositoryRuleCommitterEmailPattern.cs new file mode 100644 index 0000000..71b8c1b --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/RepositoryRuleCommitterEmailPattern.cs @@ -0,0 +1,70 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + /// + /// Parameters to be used for the committer_email_pattern rule + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class RepositoryRuleCommitterEmailPattern : IAdditionalDataHolder, IParsable + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The parameters property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.RepositoryRuleCommitterEmailPattern_parameters? Parameters { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.RepositoryRuleCommitterEmailPattern_parameters Parameters { get; set; } +#endif + /// The type property + public global::Ayllu.Github.Client.Models.RepositoryRuleCommitterEmailPattern_type? Type { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public RepositoryRuleCommitterEmailPattern() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.RepositoryRuleCommitterEmailPattern CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.RepositoryRuleCommitterEmailPattern(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "parameters", n => { Parameters = n.GetObjectValue(global::Ayllu.Github.Client.Models.RepositoryRuleCommitterEmailPattern_parameters.CreateFromDiscriminatorValue); } }, + { "type", n => { Type = n.GetEnumValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteObjectValue("parameters", Parameters); + writer.WriteEnumValue("type", Type); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/RepositoryRuleCommitterEmailPattern_parameters.cs b/src/Ayllu.Github.Client/Github/Client/Models/RepositoryRuleCommitterEmailPattern_parameters.cs new file mode 100644 index 0000000..b6a8f04 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/RepositoryRuleCommitterEmailPattern_parameters.cs @@ -0,0 +1,83 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class RepositoryRuleCommitterEmailPattern_parameters : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// How this rule will appear to users. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Name { get; set; } +#nullable restore +#else + public string Name { get; set; } +#endif + /// If true, the rule will fail if the pattern matches. + public bool? Negate { get; set; } + /// The operator to use for matching. + public global::Ayllu.Github.Client.Models.RepositoryRuleCommitterEmailPattern_parameters_operator? Operator { get; set; } + /// The pattern to match with. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Pattern { get; set; } +#nullable restore +#else + public string Pattern { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public RepositoryRuleCommitterEmailPattern_parameters() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.RepositoryRuleCommitterEmailPattern_parameters CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.RepositoryRuleCommitterEmailPattern_parameters(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "name", n => { Name = n.GetStringValue(); } }, + { "negate", n => { Negate = n.GetBoolValue(); } }, + { "operator", n => { Operator = n.GetEnumValue(); } }, + { "pattern", n => { Pattern = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("name", Name); + writer.WriteBoolValue("negate", Negate); + writer.WriteEnumValue("operator", Operator); + writer.WriteStringValue("pattern", Pattern); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/RepositoryRuleCommitterEmailPattern_parameters_operator.cs b/src/Ayllu.Github.Client/Github/Client/Models/RepositoryRuleCommitterEmailPattern_parameters_operator.cs new file mode 100644 index 0000000..3eab3ef --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/RepositoryRuleCommitterEmailPattern_parameters_operator.cs @@ -0,0 +1,27 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Models +{ + /// The operator to use for matching. + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public enum RepositoryRuleCommitterEmailPattern_parameters_operator + { + [EnumMember(Value = "starts_with")] + #pragma warning disable CS1591 + Starts_with, + #pragma warning restore CS1591 + [EnumMember(Value = "ends_with")] + #pragma warning disable CS1591 + Ends_with, + #pragma warning restore CS1591 + [EnumMember(Value = "contains")] + #pragma warning disable CS1591 + Contains, + #pragma warning restore CS1591 + [EnumMember(Value = "regex")] + #pragma warning disable CS1591 + Regex, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Models/RepositoryRuleCommitterEmailPattern_type.cs b/src/Ayllu.Github.Client/Github/Client/Models/RepositoryRuleCommitterEmailPattern_type.cs new file mode 100644 index 0000000..4952ea5 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/RepositoryRuleCommitterEmailPattern_type.cs @@ -0,0 +1,16 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public enum RepositoryRuleCommitterEmailPattern_type + #pragma warning restore CS1591 + { + [EnumMember(Value = "committer_email_pattern")] + #pragma warning disable CS1591 + Committer_email_pattern, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Models/RepositoryRuleCreation.cs b/src/Ayllu.Github.Client/Github/Client/Models/RepositoryRuleCreation.cs new file mode 100644 index 0000000..9370ace --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/RepositoryRuleCreation.cs @@ -0,0 +1,60 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + /// + /// Only allow users with bypass permission to create matching refs. + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class RepositoryRuleCreation : IAdditionalDataHolder, IParsable + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The type property + public global::Ayllu.Github.Client.Models.RepositoryRuleCreation_type? Type { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public RepositoryRuleCreation() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.RepositoryRuleCreation CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.RepositoryRuleCreation(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "type", n => { Type = n.GetEnumValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteEnumValue("type", Type); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/RepositoryRuleCreation_type.cs b/src/Ayllu.Github.Client/Github/Client/Models/RepositoryRuleCreation_type.cs new file mode 100644 index 0000000..3cee14d --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/RepositoryRuleCreation_type.cs @@ -0,0 +1,16 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public enum RepositoryRuleCreation_type + #pragma warning restore CS1591 + { + [EnumMember(Value = "creation")] + #pragma warning disable CS1591 + Creation, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Models/RepositoryRuleDeletion.cs b/src/Ayllu.Github.Client/Github/Client/Models/RepositoryRuleDeletion.cs new file mode 100644 index 0000000..9116114 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/RepositoryRuleDeletion.cs @@ -0,0 +1,60 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + /// + /// Only allow users with bypass permissions to delete matching refs. + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class RepositoryRuleDeletion : IAdditionalDataHolder, IParsable + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The type property + public global::Ayllu.Github.Client.Models.RepositoryRuleDeletion_type? Type { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public RepositoryRuleDeletion() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.RepositoryRuleDeletion CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.RepositoryRuleDeletion(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "type", n => { Type = n.GetEnumValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteEnumValue("type", Type); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/RepositoryRuleDeletion_type.cs b/src/Ayllu.Github.Client/Github/Client/Models/RepositoryRuleDeletion_type.cs new file mode 100644 index 0000000..ed0b360 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/RepositoryRuleDeletion_type.cs @@ -0,0 +1,16 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public enum RepositoryRuleDeletion_type + #pragma warning restore CS1591 + { + [EnumMember(Value = "deletion")] + #pragma warning disable CS1591 + Deletion, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Models/RepositoryRuleDetailed.cs b/src/Ayllu.Github.Client/Github/Client/Models/RepositoryRuleDetailed.cs new file mode 100644 index 0000000..0f7d6e8 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/RepositoryRuleDetailed.cs @@ -0,0 +1,56 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + /// + /// A repository rule with ruleset details. + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class RepositoryRuleDetailed : IAdditionalDataHolder, IParsable + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public RepositoryRuleDetailed() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.RepositoryRuleDetailed CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.RepositoryRuleDetailed(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/RepositoryRuleEnforcement.cs b/src/Ayllu.Github.Client/Github/Client/Models/RepositoryRuleEnforcement.cs new file mode 100644 index 0000000..e1ca507 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/RepositoryRuleEnforcement.cs @@ -0,0 +1,23 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Models +{ + /// The enforcement level of the ruleset. `evaluate` allows admins to test rules before enforcing them. Admins can view insights on the Rule Insights page (`evaluate` is only available with GitHub Enterprise). + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public enum RepositoryRuleEnforcement + { + [EnumMember(Value = "disabled")] + #pragma warning disable CS1591 + Disabled, + #pragma warning restore CS1591 + [EnumMember(Value = "active")] + #pragma warning disable CS1591 + Active, + #pragma warning restore CS1591 + [EnumMember(Value = "evaluate")] + #pragma warning disable CS1591 + Evaluate, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Models/RepositoryRuleFileExtensionRestriction.cs b/src/Ayllu.Github.Client/Github/Client/Models/RepositoryRuleFileExtensionRestriction.cs new file mode 100644 index 0000000..b6c8a86 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/RepositoryRuleFileExtensionRestriction.cs @@ -0,0 +1,70 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + /// + /// Prevent commits that include files with specified file extensions from being pushed to the commit graph. + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class RepositoryRuleFileExtensionRestriction : IAdditionalDataHolder, IParsable + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The parameters property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.RepositoryRuleFileExtensionRestriction_parameters? Parameters { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.RepositoryRuleFileExtensionRestriction_parameters Parameters { get; set; } +#endif + /// The type property + public global::Ayllu.Github.Client.Models.RepositoryRuleFileExtensionRestriction_type? Type { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public RepositoryRuleFileExtensionRestriction() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.RepositoryRuleFileExtensionRestriction CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.RepositoryRuleFileExtensionRestriction(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "parameters", n => { Parameters = n.GetObjectValue(global::Ayllu.Github.Client.Models.RepositoryRuleFileExtensionRestriction_parameters.CreateFromDiscriminatorValue); } }, + { "type", n => { Type = n.GetEnumValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteObjectValue("parameters", Parameters); + writer.WriteEnumValue("type", Type); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/RepositoryRuleFileExtensionRestriction_parameters.cs b/src/Ayllu.Github.Client/Github/Client/Models/RepositoryRuleFileExtensionRestriction_parameters.cs new file mode 100644 index 0000000..2a82a5b --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/RepositoryRuleFileExtensionRestriction_parameters.cs @@ -0,0 +1,65 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class RepositoryRuleFileExtensionRestriction_parameters : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The file extensions that are restricted from being pushed to the commit graph. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? RestrictedFileExtensions { get; set; } +#nullable restore +#else + public List RestrictedFileExtensions { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public RepositoryRuleFileExtensionRestriction_parameters() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.RepositoryRuleFileExtensionRestriction_parameters CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.RepositoryRuleFileExtensionRestriction_parameters(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "restricted_file_extensions", n => { RestrictedFileExtensions = n.GetCollectionOfPrimitiveValues()?.AsList(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteCollectionOfPrimitiveValues("restricted_file_extensions", RestrictedFileExtensions); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/RepositoryRuleFileExtensionRestriction_type.cs b/src/Ayllu.Github.Client/Github/Client/Models/RepositoryRuleFileExtensionRestriction_type.cs new file mode 100644 index 0000000..03df8aa --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/RepositoryRuleFileExtensionRestriction_type.cs @@ -0,0 +1,16 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public enum RepositoryRuleFileExtensionRestriction_type + #pragma warning restore CS1591 + { + [EnumMember(Value = "file_extension_restriction")] + #pragma warning disable CS1591 + File_extension_restriction, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Models/RepositoryRuleFilePathRestriction.cs b/src/Ayllu.Github.Client/Github/Client/Models/RepositoryRuleFilePathRestriction.cs new file mode 100644 index 0000000..e414170 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/RepositoryRuleFilePathRestriction.cs @@ -0,0 +1,70 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + /// + /// Prevent commits that include changes in specified file and folder paths from being pushed to the commit graph. This includes absolute paths that contain file names. + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class RepositoryRuleFilePathRestriction : IAdditionalDataHolder, IParsable + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The parameters property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.RepositoryRuleFilePathRestriction_parameters? Parameters { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.RepositoryRuleFilePathRestriction_parameters Parameters { get; set; } +#endif + /// The type property + public global::Ayllu.Github.Client.Models.RepositoryRuleFilePathRestriction_type? Type { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public RepositoryRuleFilePathRestriction() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.RepositoryRuleFilePathRestriction CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.RepositoryRuleFilePathRestriction(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "parameters", n => { Parameters = n.GetObjectValue(global::Ayllu.Github.Client.Models.RepositoryRuleFilePathRestriction_parameters.CreateFromDiscriminatorValue); } }, + { "type", n => { Type = n.GetEnumValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteObjectValue("parameters", Parameters); + writer.WriteEnumValue("type", Type); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/RepositoryRuleFilePathRestriction_parameters.cs b/src/Ayllu.Github.Client/Github/Client/Models/RepositoryRuleFilePathRestriction_parameters.cs new file mode 100644 index 0000000..4e37504 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/RepositoryRuleFilePathRestriction_parameters.cs @@ -0,0 +1,65 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class RepositoryRuleFilePathRestriction_parameters : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The file paths that are restricted from being pushed to the commit graph. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? RestrictedFilePaths { get; set; } +#nullable restore +#else + public List RestrictedFilePaths { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public RepositoryRuleFilePathRestriction_parameters() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.RepositoryRuleFilePathRestriction_parameters CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.RepositoryRuleFilePathRestriction_parameters(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "restricted_file_paths", n => { RestrictedFilePaths = n.GetCollectionOfPrimitiveValues()?.AsList(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteCollectionOfPrimitiveValues("restricted_file_paths", RestrictedFilePaths); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/RepositoryRuleFilePathRestriction_type.cs b/src/Ayllu.Github.Client/Github/Client/Models/RepositoryRuleFilePathRestriction_type.cs new file mode 100644 index 0000000..39ec524 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/RepositoryRuleFilePathRestriction_type.cs @@ -0,0 +1,16 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public enum RepositoryRuleFilePathRestriction_type + #pragma warning restore CS1591 + { + [EnumMember(Value = "file_path_restriction")] + #pragma warning disable CS1591 + File_path_restriction, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Models/RepositoryRuleMaxFilePathLength.cs b/src/Ayllu.Github.Client/Github/Client/Models/RepositoryRuleMaxFilePathLength.cs new file mode 100644 index 0000000..fc2fdbe --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/RepositoryRuleMaxFilePathLength.cs @@ -0,0 +1,70 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + /// + /// Prevent commits that include file paths that exceed the specified character limit from being pushed to the commit graph. + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class RepositoryRuleMaxFilePathLength : IAdditionalDataHolder, IParsable + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The parameters property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.RepositoryRuleMaxFilePathLength_parameters? Parameters { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.RepositoryRuleMaxFilePathLength_parameters Parameters { get; set; } +#endif + /// The type property + public global::Ayllu.Github.Client.Models.RepositoryRuleMaxFilePathLength_type? Type { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public RepositoryRuleMaxFilePathLength() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.RepositoryRuleMaxFilePathLength CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.RepositoryRuleMaxFilePathLength(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "parameters", n => { Parameters = n.GetObjectValue(global::Ayllu.Github.Client.Models.RepositoryRuleMaxFilePathLength_parameters.CreateFromDiscriminatorValue); } }, + { "type", n => { Type = n.GetEnumValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteObjectValue("parameters", Parameters); + writer.WriteEnumValue("type", Type); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/RepositoryRuleMaxFilePathLength_parameters.cs b/src/Ayllu.Github.Client/Github/Client/Models/RepositoryRuleMaxFilePathLength_parameters.cs new file mode 100644 index 0000000..a627205 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/RepositoryRuleMaxFilePathLength_parameters.cs @@ -0,0 +1,59 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class RepositoryRuleMaxFilePathLength_parameters : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The maximum amount of characters allowed in file paths. + public int? MaxFilePathLength { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public RepositoryRuleMaxFilePathLength_parameters() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.RepositoryRuleMaxFilePathLength_parameters CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.RepositoryRuleMaxFilePathLength_parameters(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "max_file_path_length", n => { MaxFilePathLength = n.GetIntValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteIntValue("max_file_path_length", MaxFilePathLength); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/RepositoryRuleMaxFilePathLength_type.cs b/src/Ayllu.Github.Client/Github/Client/Models/RepositoryRuleMaxFilePathLength_type.cs new file mode 100644 index 0000000..f2ba8da --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/RepositoryRuleMaxFilePathLength_type.cs @@ -0,0 +1,16 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public enum RepositoryRuleMaxFilePathLength_type + #pragma warning restore CS1591 + { + [EnumMember(Value = "max_file_path_length")] + #pragma warning disable CS1591 + Max_file_path_length, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Models/RepositoryRuleMaxFileSize.cs b/src/Ayllu.Github.Client/Github/Client/Models/RepositoryRuleMaxFileSize.cs new file mode 100644 index 0000000..71afd03 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/RepositoryRuleMaxFileSize.cs @@ -0,0 +1,70 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + /// + /// Prevent commits with individual files that exceed the specified limit from being pushed to the commit graph. + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class RepositoryRuleMaxFileSize : IAdditionalDataHolder, IParsable + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The parameters property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.RepositoryRuleMaxFileSize_parameters? Parameters { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.RepositoryRuleMaxFileSize_parameters Parameters { get; set; } +#endif + /// The type property + public global::Ayllu.Github.Client.Models.RepositoryRuleMaxFileSize_type? Type { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public RepositoryRuleMaxFileSize() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.RepositoryRuleMaxFileSize CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.RepositoryRuleMaxFileSize(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "parameters", n => { Parameters = n.GetObjectValue(global::Ayllu.Github.Client.Models.RepositoryRuleMaxFileSize_parameters.CreateFromDiscriminatorValue); } }, + { "type", n => { Type = n.GetEnumValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteObjectValue("parameters", Parameters); + writer.WriteEnumValue("type", Type); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/RepositoryRuleMaxFileSize_parameters.cs b/src/Ayllu.Github.Client/Github/Client/Models/RepositoryRuleMaxFileSize_parameters.cs new file mode 100644 index 0000000..4e78fa6 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/RepositoryRuleMaxFileSize_parameters.cs @@ -0,0 +1,59 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class RepositoryRuleMaxFileSize_parameters : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The maximum file size allowed in megabytes. This limit does not apply to Git Large File Storage (Git LFS). + public int? MaxFileSize { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public RepositoryRuleMaxFileSize_parameters() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.RepositoryRuleMaxFileSize_parameters CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.RepositoryRuleMaxFileSize_parameters(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "max_file_size", n => { MaxFileSize = n.GetIntValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteIntValue("max_file_size", MaxFileSize); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/RepositoryRuleMaxFileSize_type.cs b/src/Ayllu.Github.Client/Github/Client/Models/RepositoryRuleMaxFileSize_type.cs new file mode 100644 index 0000000..4be15b1 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/RepositoryRuleMaxFileSize_type.cs @@ -0,0 +1,16 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public enum RepositoryRuleMaxFileSize_type + #pragma warning restore CS1591 + { + [EnumMember(Value = "max_file_size")] + #pragma warning disable CS1591 + Max_file_size, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Models/RepositoryRuleMergeQueue.cs b/src/Ayllu.Github.Client/Github/Client/Models/RepositoryRuleMergeQueue.cs new file mode 100644 index 0000000..0d3cbc2 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/RepositoryRuleMergeQueue.cs @@ -0,0 +1,70 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + /// + /// Merges must be performed via a merge queue. + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class RepositoryRuleMergeQueue : IAdditionalDataHolder, IParsable + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The parameters property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.RepositoryRuleMergeQueue_parameters? Parameters { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.RepositoryRuleMergeQueue_parameters Parameters { get; set; } +#endif + /// The type property + public global::Ayllu.Github.Client.Models.RepositoryRuleMergeQueue_type? Type { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public RepositoryRuleMergeQueue() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.RepositoryRuleMergeQueue CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.RepositoryRuleMergeQueue(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "parameters", n => { Parameters = n.GetObjectValue(global::Ayllu.Github.Client.Models.RepositoryRuleMergeQueue_parameters.CreateFromDiscriminatorValue); } }, + { "type", n => { Type = n.GetEnumValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteObjectValue("parameters", Parameters); + writer.WriteEnumValue("type", Type); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/RepositoryRuleMergeQueue_parameters.cs b/src/Ayllu.Github.Client/Github/Client/Models/RepositoryRuleMergeQueue_parameters.cs new file mode 100644 index 0000000..da01487 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/RepositoryRuleMergeQueue_parameters.cs @@ -0,0 +1,83 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class RepositoryRuleMergeQueue_parameters : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// Maximum time for a required status check to report a conclusion. After this much time has elapsed, checks that have not reported a conclusion will be assumed to have failed + public int? CheckResponseTimeoutMinutes { get; set; } + /// When set to ALLGREEN, the merge commit created by merge queue for each PR in the group must pass all required checks to merge. When set to HEADGREEN, only the commit at the head of the merge group, i.e. the commit containing changes from all of the PRs in the group, must pass its required checks to merge. + public global::Ayllu.Github.Client.Models.RepositoryRuleMergeQueue_parameters_grouping_strategy? GroupingStrategy { get; set; } + /// Limit the number of queued pull requests requesting checks and workflow runs at the same time. + public int? MaxEntriesToBuild { get; set; } + /// The maximum number of PRs that will be merged together in a group. + public int? MaxEntriesToMerge { get; set; } + /// Method to use when merging changes from queued pull requests. + public global::Ayllu.Github.Client.Models.RepositoryRuleMergeQueue_parameters_merge_method? MergeMethod { get; set; } + /// The minimum number of PRs that will be merged together in a group. + public int? MinEntriesToMerge { get; set; } + /// The time merge queue should wait after the first PR is added to the queue for the minimum group size to be met. After this time has elapsed, the minimum group size will be ignored and a smaller group will be merged. + public int? MinEntriesToMergeWaitMinutes { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public RepositoryRuleMergeQueue_parameters() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.RepositoryRuleMergeQueue_parameters CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.RepositoryRuleMergeQueue_parameters(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "check_response_timeout_minutes", n => { CheckResponseTimeoutMinutes = n.GetIntValue(); } }, + { "grouping_strategy", n => { GroupingStrategy = n.GetEnumValue(); } }, + { "max_entries_to_build", n => { MaxEntriesToBuild = n.GetIntValue(); } }, + { "max_entries_to_merge", n => { MaxEntriesToMerge = n.GetIntValue(); } }, + { "merge_method", n => { MergeMethod = n.GetEnumValue(); } }, + { "min_entries_to_merge", n => { MinEntriesToMerge = n.GetIntValue(); } }, + { "min_entries_to_merge_wait_minutes", n => { MinEntriesToMergeWaitMinutes = n.GetIntValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteIntValue("check_response_timeout_minutes", CheckResponseTimeoutMinutes); + writer.WriteEnumValue("grouping_strategy", GroupingStrategy); + writer.WriteIntValue("max_entries_to_build", MaxEntriesToBuild); + writer.WriteIntValue("max_entries_to_merge", MaxEntriesToMerge); + writer.WriteEnumValue("merge_method", MergeMethod); + writer.WriteIntValue("min_entries_to_merge", MinEntriesToMerge); + writer.WriteIntValue("min_entries_to_merge_wait_minutes", MinEntriesToMergeWaitMinutes); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/RepositoryRuleMergeQueue_parameters_grouping_strategy.cs b/src/Ayllu.Github.Client/Github/Client/Models/RepositoryRuleMergeQueue_parameters_grouping_strategy.cs new file mode 100644 index 0000000..a1d0303 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/RepositoryRuleMergeQueue_parameters_grouping_strategy.cs @@ -0,0 +1,19 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Models +{ + /// When set to ALLGREEN, the merge commit created by merge queue for each PR in the group must pass all required checks to merge. When set to HEADGREEN, only the commit at the head of the merge group, i.e. the commit containing changes from all of the PRs in the group, must pass its required checks to merge. + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public enum RepositoryRuleMergeQueue_parameters_grouping_strategy + { + [EnumMember(Value = "ALLGREEN")] + #pragma warning disable CS1591 + ALLGREEN, + #pragma warning restore CS1591 + [EnumMember(Value = "HEADGREEN")] + #pragma warning disable CS1591 + HEADGREEN, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Models/RepositoryRuleMergeQueue_parameters_merge_method.cs b/src/Ayllu.Github.Client/Github/Client/Models/RepositoryRuleMergeQueue_parameters_merge_method.cs new file mode 100644 index 0000000..ccd3bcc --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/RepositoryRuleMergeQueue_parameters_merge_method.cs @@ -0,0 +1,23 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Models +{ + /// Method to use when merging changes from queued pull requests. + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public enum RepositoryRuleMergeQueue_parameters_merge_method + { + [EnumMember(Value = "MERGE")] + #pragma warning disable CS1591 + MERGE, + #pragma warning restore CS1591 + [EnumMember(Value = "SQUASH")] + #pragma warning disable CS1591 + SQUASH, + #pragma warning restore CS1591 + [EnumMember(Value = "REBASE")] + #pragma warning disable CS1591 + REBASE, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Models/RepositoryRuleMergeQueue_type.cs b/src/Ayllu.Github.Client/Github/Client/Models/RepositoryRuleMergeQueue_type.cs new file mode 100644 index 0000000..06d86af --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/RepositoryRuleMergeQueue_type.cs @@ -0,0 +1,16 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public enum RepositoryRuleMergeQueue_type + #pragma warning restore CS1591 + { + [EnumMember(Value = "merge_queue")] + #pragma warning disable CS1591 + Merge_queue, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Models/RepositoryRuleNonFastForward.cs b/src/Ayllu.Github.Client/Github/Client/Models/RepositoryRuleNonFastForward.cs new file mode 100644 index 0000000..bbd4b3c --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/RepositoryRuleNonFastForward.cs @@ -0,0 +1,60 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + /// + /// Prevent users with push access from force pushing to refs. + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class RepositoryRuleNonFastForward : IAdditionalDataHolder, IParsable + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The type property + public global::Ayllu.Github.Client.Models.RepositoryRuleNonFastForward_type? Type { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public RepositoryRuleNonFastForward() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.RepositoryRuleNonFastForward CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.RepositoryRuleNonFastForward(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "type", n => { Type = n.GetEnumValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteEnumValue("type", Type); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/RepositoryRuleNonFastForward_type.cs b/src/Ayllu.Github.Client/Github/Client/Models/RepositoryRuleNonFastForward_type.cs new file mode 100644 index 0000000..70e1f7d --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/RepositoryRuleNonFastForward_type.cs @@ -0,0 +1,16 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public enum RepositoryRuleNonFastForward_type + #pragma warning restore CS1591 + { + [EnumMember(Value = "non_fast_forward")] + #pragma warning disable CS1591 + Non_fast_forward, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Models/RepositoryRuleParamsCodeScanningTool.cs b/src/Ayllu.Github.Client/Github/Client/Models/RepositoryRuleParamsCodeScanningTool.cs new file mode 100644 index 0000000..59941b1 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/RepositoryRuleParamsCodeScanningTool.cs @@ -0,0 +1,74 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + /// + /// A tool that must provide code scanning results for this rule to pass. + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class RepositoryRuleParamsCodeScanningTool : IAdditionalDataHolder, IParsable + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The severity level at which code scanning results that raise alerts block a reference update. For more information on alert severity levels, see "[About code scanning alerts](https://docs.github.com/code-security/code-scanning/managing-code-scanning-alerts/about-code-scanning-alerts#about-alert-severity-and-security-severity-levels)." + public global::Ayllu.Github.Client.Models.RepositoryRuleParamsCodeScanningTool_alerts_threshold? AlertsThreshold { get; set; } + /// The severity level at which code scanning results that raise security alerts block a reference update. For more information on security severity levels, see "[About code scanning alerts](https://docs.github.com/code-security/code-scanning/managing-code-scanning-alerts/about-code-scanning-alerts#about-alert-severity-and-security-severity-levels)." + public global::Ayllu.Github.Client.Models.RepositoryRuleParamsCodeScanningTool_security_alerts_threshold? SecurityAlertsThreshold { get; set; } + /// The name of a code scanning tool +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Tool { get; set; } +#nullable restore +#else + public string Tool { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public RepositoryRuleParamsCodeScanningTool() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.RepositoryRuleParamsCodeScanningTool CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.RepositoryRuleParamsCodeScanningTool(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "alerts_threshold", n => { AlertsThreshold = n.GetEnumValue(); } }, + { "security_alerts_threshold", n => { SecurityAlertsThreshold = n.GetEnumValue(); } }, + { "tool", n => { Tool = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteEnumValue("alerts_threshold", AlertsThreshold); + writer.WriteEnumValue("security_alerts_threshold", SecurityAlertsThreshold); + writer.WriteStringValue("tool", Tool); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/RepositoryRuleParamsCodeScanningTool_alerts_threshold.cs b/src/Ayllu.Github.Client/Github/Client/Models/RepositoryRuleParamsCodeScanningTool_alerts_threshold.cs new file mode 100644 index 0000000..4b04111 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/RepositoryRuleParamsCodeScanningTool_alerts_threshold.cs @@ -0,0 +1,27 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Models +{ + /// The severity level at which code scanning results that raise alerts block a reference update. For more information on alert severity levels, see "[About code scanning alerts](https://docs.github.com/code-security/code-scanning/managing-code-scanning-alerts/about-code-scanning-alerts#about-alert-severity-and-security-severity-levels)." + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public enum RepositoryRuleParamsCodeScanningTool_alerts_threshold + { + [EnumMember(Value = "none")] + #pragma warning disable CS1591 + None, + #pragma warning restore CS1591 + [EnumMember(Value = "errors")] + #pragma warning disable CS1591 + Errors, + #pragma warning restore CS1591 + [EnumMember(Value = "errors_and_warnings")] + #pragma warning disable CS1591 + Errors_and_warnings, + #pragma warning restore CS1591 + [EnumMember(Value = "all")] + #pragma warning disable CS1591 + All, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Models/RepositoryRuleParamsCodeScanningTool_security_alerts_threshold.cs b/src/Ayllu.Github.Client/Github/Client/Models/RepositoryRuleParamsCodeScanningTool_security_alerts_threshold.cs new file mode 100644 index 0000000..49a5a08 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/RepositoryRuleParamsCodeScanningTool_security_alerts_threshold.cs @@ -0,0 +1,31 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Models +{ + /// The severity level at which code scanning results that raise security alerts block a reference update. For more information on security severity levels, see "[About code scanning alerts](https://docs.github.com/code-security/code-scanning/managing-code-scanning-alerts/about-code-scanning-alerts#about-alert-severity-and-security-severity-levels)." + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public enum RepositoryRuleParamsCodeScanningTool_security_alerts_threshold + { + [EnumMember(Value = "none")] + #pragma warning disable CS1591 + None, + #pragma warning restore CS1591 + [EnumMember(Value = "critical")] + #pragma warning disable CS1591 + Critical, + #pragma warning restore CS1591 + [EnumMember(Value = "high_or_higher")] + #pragma warning disable CS1591 + High_or_higher, + #pragma warning restore CS1591 + [EnumMember(Value = "medium_or_higher")] + #pragma warning disable CS1591 + Medium_or_higher, + #pragma warning restore CS1591 + [EnumMember(Value = "all")] + #pragma warning disable CS1591 + All, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Models/RepositoryRuleParamsStatusCheckConfiguration.cs b/src/Ayllu.Github.Client/Github/Client/Models/RepositoryRuleParamsStatusCheckConfiguration.cs new file mode 100644 index 0000000..a6386d2 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/RepositoryRuleParamsStatusCheckConfiguration.cs @@ -0,0 +1,70 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + /// + /// Required status check + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class RepositoryRuleParamsStatusCheckConfiguration : IAdditionalDataHolder, IParsable + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The status check context name that must be present on the commit. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Context { get; set; } +#nullable restore +#else + public string Context { get; set; } +#endif + /// The optional integration ID that this status check must originate from. + public int? IntegrationId { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public RepositoryRuleParamsStatusCheckConfiguration() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.RepositoryRuleParamsStatusCheckConfiguration CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.RepositoryRuleParamsStatusCheckConfiguration(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "context", n => { Context = n.GetStringValue(); } }, + { "integration_id", n => { IntegrationId = n.GetIntValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("context", Context); + writer.WriteIntValue("integration_id", IntegrationId); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/RepositoryRuleParamsWorkflowFileReference.cs b/src/Ayllu.Github.Client/Github/Client/Models/RepositoryRuleParamsWorkflowFileReference.cs new file mode 100644 index 0000000..2186014 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/RepositoryRuleParamsWorkflowFileReference.cs @@ -0,0 +1,90 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + /// + /// A workflow that must run for this rule to pass + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class RepositoryRuleParamsWorkflowFileReference : IAdditionalDataHolder, IParsable + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The path to the workflow file +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Path { get; set; } +#nullable restore +#else + public string Path { get; set; } +#endif + /// The ref (branch or tag) of the workflow file to use +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Ref { get; set; } +#nullable restore +#else + public string Ref { get; set; } +#endif + /// The ID of the repository where the workflow is defined + public int? RepositoryId { get; set; } + /// The commit SHA of the workflow file to use +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Sha { get; set; } +#nullable restore +#else + public string Sha { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public RepositoryRuleParamsWorkflowFileReference() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.RepositoryRuleParamsWorkflowFileReference CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.RepositoryRuleParamsWorkflowFileReference(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "path", n => { Path = n.GetStringValue(); } }, + { "ref", n => { Ref = n.GetStringValue(); } }, + { "repository_id", n => { RepositoryId = n.GetIntValue(); } }, + { "sha", n => { Sha = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("path", Path); + writer.WriteStringValue("ref", Ref); + writer.WriteIntValue("repository_id", RepositoryId); + writer.WriteStringValue("sha", Sha); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/RepositoryRulePullRequest.cs b/src/Ayllu.Github.Client/Github/Client/Models/RepositoryRulePullRequest.cs new file mode 100644 index 0000000..cd9394a --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/RepositoryRulePullRequest.cs @@ -0,0 +1,70 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + /// + /// Require all commits be made to a non-target branch and submitted via a pull request before they can be merged. + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class RepositoryRulePullRequest : IAdditionalDataHolder, IParsable + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The parameters property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.RepositoryRulePullRequest_parameters? Parameters { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.RepositoryRulePullRequest_parameters Parameters { get; set; } +#endif + /// The type property + public global::Ayllu.Github.Client.Models.RepositoryRulePullRequest_type? Type { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public RepositoryRulePullRequest() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.RepositoryRulePullRequest CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.RepositoryRulePullRequest(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "parameters", n => { Parameters = n.GetObjectValue(global::Ayllu.Github.Client.Models.RepositoryRulePullRequest_parameters.CreateFromDiscriminatorValue); } }, + { "type", n => { Type = n.GetEnumValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteObjectValue("parameters", Parameters); + writer.WriteEnumValue("type", Type); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/RepositoryRulePullRequest_parameters.cs b/src/Ayllu.Github.Client/Github/Client/Models/RepositoryRulePullRequest_parameters.cs new file mode 100644 index 0000000..ff0d1db --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/RepositoryRulePullRequest_parameters.cs @@ -0,0 +1,89 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class RepositoryRulePullRequest_parameters : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// Array of allowed merge methods. Allowed values include `merge`, `squash`, and `rebase`. At least one option must be enabled. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? AllowedMergeMethods { get; set; } +#nullable restore +#else + public List AllowedMergeMethods { get; set; } +#endif + /// Request Copilot code review for new pull requests automatically if the author has access to Copilot code review. + public bool? AutomaticCopilotCodeReviewEnabled { get; set; } + /// New, reviewable commits pushed will dismiss previous pull request review approvals. + public bool? DismissStaleReviewsOnPush { get; set; } + /// Require an approving review in pull requests that modify files that have a designated code owner. + public bool? RequireCodeOwnerReview { get; set; } + /// The number of approving reviews that are required before a pull request can be merged. + public int? RequiredApprovingReviewCount { get; set; } + /// All conversations on code must be resolved before a pull request can be merged. + public bool? RequiredReviewThreadResolution { get; set; } + /// Whether the most recent reviewable push must be approved by someone other than the person who pushed it. + public bool? RequireLastPushApproval { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public RepositoryRulePullRequest_parameters() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.RepositoryRulePullRequest_parameters CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.RepositoryRulePullRequest_parameters(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "allowed_merge_methods", n => { AllowedMergeMethods = n.GetCollectionOfEnumValues()?.AsList(); } }, + { "automatic_copilot_code_review_enabled", n => { AutomaticCopilotCodeReviewEnabled = n.GetBoolValue(); } }, + { "dismiss_stale_reviews_on_push", n => { DismissStaleReviewsOnPush = n.GetBoolValue(); } }, + { "require_code_owner_review", n => { RequireCodeOwnerReview = n.GetBoolValue(); } }, + { "require_last_push_approval", n => { RequireLastPushApproval = n.GetBoolValue(); } }, + { "required_approving_review_count", n => { RequiredApprovingReviewCount = n.GetIntValue(); } }, + { "required_review_thread_resolution", n => { RequiredReviewThreadResolution = n.GetBoolValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteCollectionOfEnumValues("allowed_merge_methods", AllowedMergeMethods); + writer.WriteBoolValue("automatic_copilot_code_review_enabled", AutomaticCopilotCodeReviewEnabled); + writer.WriteBoolValue("dismiss_stale_reviews_on_push", DismissStaleReviewsOnPush); + writer.WriteBoolValue("require_code_owner_review", RequireCodeOwnerReview); + writer.WriteIntValue("required_approving_review_count", RequiredApprovingReviewCount); + writer.WriteBoolValue("required_review_thread_resolution", RequiredReviewThreadResolution); + writer.WriteBoolValue("require_last_push_approval", RequireLastPushApproval); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/RepositoryRulePullRequest_parameters_allowed_merge_methods.cs b/src/Ayllu.Github.Client/Github/Client/Models/RepositoryRulePullRequest_parameters_allowed_merge_methods.cs new file mode 100644 index 0000000..36d9270 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/RepositoryRulePullRequest_parameters_allowed_merge_methods.cs @@ -0,0 +1,24 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public enum RepositoryRulePullRequest_parameters_allowed_merge_methods + #pragma warning restore CS1591 + { + [EnumMember(Value = "merge")] + #pragma warning disable CS1591 + Merge, + #pragma warning restore CS1591 + [EnumMember(Value = "squash")] + #pragma warning disable CS1591 + Squash, + #pragma warning restore CS1591 + [EnumMember(Value = "rebase")] + #pragma warning disable CS1591 + Rebase, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Models/RepositoryRulePullRequest_type.cs b/src/Ayllu.Github.Client/Github/Client/Models/RepositoryRulePullRequest_type.cs new file mode 100644 index 0000000..062f9e6 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/RepositoryRulePullRequest_type.cs @@ -0,0 +1,16 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public enum RepositoryRulePullRequest_type + #pragma warning restore CS1591 + { + [EnumMember(Value = "pull_request")] + #pragma warning disable CS1591 + Pull_request, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Models/RepositoryRuleRequiredDeployments.cs b/src/Ayllu.Github.Client/Github/Client/Models/RepositoryRuleRequiredDeployments.cs new file mode 100644 index 0000000..f07ba83 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/RepositoryRuleRequiredDeployments.cs @@ -0,0 +1,70 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + /// + /// Choose which environments must be successfully deployed to before refs can be pushed into a ref that matches this rule. + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class RepositoryRuleRequiredDeployments : IAdditionalDataHolder, IParsable + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The parameters property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.RepositoryRuleRequiredDeployments_parameters? Parameters { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.RepositoryRuleRequiredDeployments_parameters Parameters { get; set; } +#endif + /// The type property + public global::Ayllu.Github.Client.Models.RepositoryRuleRequiredDeployments_type? Type { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public RepositoryRuleRequiredDeployments() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.RepositoryRuleRequiredDeployments CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.RepositoryRuleRequiredDeployments(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "parameters", n => { Parameters = n.GetObjectValue(global::Ayllu.Github.Client.Models.RepositoryRuleRequiredDeployments_parameters.CreateFromDiscriminatorValue); } }, + { "type", n => { Type = n.GetEnumValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteObjectValue("parameters", Parameters); + writer.WriteEnumValue("type", Type); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/RepositoryRuleRequiredDeployments_parameters.cs b/src/Ayllu.Github.Client/Github/Client/Models/RepositoryRuleRequiredDeployments_parameters.cs new file mode 100644 index 0000000..ecaa896 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/RepositoryRuleRequiredDeployments_parameters.cs @@ -0,0 +1,65 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class RepositoryRuleRequiredDeployments_parameters : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The environments that must be successfully deployed to before branches can be merged. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? RequiredDeploymentEnvironments { get; set; } +#nullable restore +#else + public List RequiredDeploymentEnvironments { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public RepositoryRuleRequiredDeployments_parameters() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.RepositoryRuleRequiredDeployments_parameters CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.RepositoryRuleRequiredDeployments_parameters(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "required_deployment_environments", n => { RequiredDeploymentEnvironments = n.GetCollectionOfPrimitiveValues()?.AsList(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteCollectionOfPrimitiveValues("required_deployment_environments", RequiredDeploymentEnvironments); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/RepositoryRuleRequiredDeployments_type.cs b/src/Ayllu.Github.Client/Github/Client/Models/RepositoryRuleRequiredDeployments_type.cs new file mode 100644 index 0000000..65942cf --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/RepositoryRuleRequiredDeployments_type.cs @@ -0,0 +1,16 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public enum RepositoryRuleRequiredDeployments_type + #pragma warning restore CS1591 + { + [EnumMember(Value = "required_deployments")] + #pragma warning disable CS1591 + Required_deployments, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Models/RepositoryRuleRequiredLinearHistory.cs b/src/Ayllu.Github.Client/Github/Client/Models/RepositoryRuleRequiredLinearHistory.cs new file mode 100644 index 0000000..97da88a --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/RepositoryRuleRequiredLinearHistory.cs @@ -0,0 +1,60 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + /// + /// Prevent merge commits from being pushed to matching refs. + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class RepositoryRuleRequiredLinearHistory : IAdditionalDataHolder, IParsable + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The type property + public global::Ayllu.Github.Client.Models.RepositoryRuleRequiredLinearHistory_type? Type { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public RepositoryRuleRequiredLinearHistory() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.RepositoryRuleRequiredLinearHistory CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.RepositoryRuleRequiredLinearHistory(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "type", n => { Type = n.GetEnumValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteEnumValue("type", Type); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/RepositoryRuleRequiredLinearHistory_type.cs b/src/Ayllu.Github.Client/Github/Client/Models/RepositoryRuleRequiredLinearHistory_type.cs new file mode 100644 index 0000000..3d639f2 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/RepositoryRuleRequiredLinearHistory_type.cs @@ -0,0 +1,16 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public enum RepositoryRuleRequiredLinearHistory_type + #pragma warning restore CS1591 + { + [EnumMember(Value = "required_linear_history")] + #pragma warning disable CS1591 + Required_linear_history, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Models/RepositoryRuleRequiredSignatures.cs b/src/Ayllu.Github.Client/Github/Client/Models/RepositoryRuleRequiredSignatures.cs new file mode 100644 index 0000000..035468f --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/RepositoryRuleRequiredSignatures.cs @@ -0,0 +1,60 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + /// + /// Commits pushed to matching refs must have verified signatures. + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class RepositoryRuleRequiredSignatures : IAdditionalDataHolder, IParsable + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The type property + public global::Ayllu.Github.Client.Models.RepositoryRuleRequiredSignatures_type? Type { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public RepositoryRuleRequiredSignatures() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.RepositoryRuleRequiredSignatures CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.RepositoryRuleRequiredSignatures(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "type", n => { Type = n.GetEnumValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteEnumValue("type", Type); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/RepositoryRuleRequiredSignatures_type.cs b/src/Ayllu.Github.Client/Github/Client/Models/RepositoryRuleRequiredSignatures_type.cs new file mode 100644 index 0000000..644d5f5 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/RepositoryRuleRequiredSignatures_type.cs @@ -0,0 +1,16 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public enum RepositoryRuleRequiredSignatures_type + #pragma warning restore CS1591 + { + [EnumMember(Value = "required_signatures")] + #pragma warning disable CS1591 + Required_signatures, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Models/RepositoryRuleRequiredStatusChecks.cs b/src/Ayllu.Github.Client/Github/Client/Models/RepositoryRuleRequiredStatusChecks.cs new file mode 100644 index 0000000..82187ff --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/RepositoryRuleRequiredStatusChecks.cs @@ -0,0 +1,70 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + /// + /// 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. + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class RepositoryRuleRequiredStatusChecks : IAdditionalDataHolder, IParsable + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The parameters property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.RepositoryRuleRequiredStatusChecks_parameters? Parameters { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.RepositoryRuleRequiredStatusChecks_parameters Parameters { get; set; } +#endif + /// The type property + public global::Ayllu.Github.Client.Models.RepositoryRuleRequiredStatusChecks_type? Type { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public RepositoryRuleRequiredStatusChecks() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.RepositoryRuleRequiredStatusChecks CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.RepositoryRuleRequiredStatusChecks(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "parameters", n => { Parameters = n.GetObjectValue(global::Ayllu.Github.Client.Models.RepositoryRuleRequiredStatusChecks_parameters.CreateFromDiscriminatorValue); } }, + { "type", n => { Type = n.GetEnumValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteObjectValue("parameters", Parameters); + writer.WriteEnumValue("type", Type); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/RepositoryRuleRequiredStatusChecks_parameters.cs b/src/Ayllu.Github.Client/Github/Client/Models/RepositoryRuleRequiredStatusChecks_parameters.cs new file mode 100644 index 0000000..43f7dc7 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/RepositoryRuleRequiredStatusChecks_parameters.cs @@ -0,0 +1,73 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class RepositoryRuleRequiredStatusChecks_parameters : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// Allow repositories and branches to be created if a check would otherwise prohibit it. + public bool? DoNotEnforceOnCreate { get; set; } + /// Status checks that are required. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? RequiredStatusChecks { get; set; } +#nullable restore +#else + public List RequiredStatusChecks { get; set; } +#endif + /// 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. + public bool? StrictRequiredStatusChecksPolicy { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public RepositoryRuleRequiredStatusChecks_parameters() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.RepositoryRuleRequiredStatusChecks_parameters CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.RepositoryRuleRequiredStatusChecks_parameters(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "do_not_enforce_on_create", n => { DoNotEnforceOnCreate = n.GetBoolValue(); } }, + { "required_status_checks", n => { RequiredStatusChecks = n.GetCollectionOfObjectValues(global::Ayllu.Github.Client.Models.RepositoryRuleParamsStatusCheckConfiguration.CreateFromDiscriminatorValue)?.AsList(); } }, + { "strict_required_status_checks_policy", n => { StrictRequiredStatusChecksPolicy = n.GetBoolValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteBoolValue("do_not_enforce_on_create", DoNotEnforceOnCreate); + writer.WriteCollectionOfObjectValues("required_status_checks", RequiredStatusChecks); + writer.WriteBoolValue("strict_required_status_checks_policy", StrictRequiredStatusChecksPolicy); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/RepositoryRuleRequiredStatusChecks_type.cs b/src/Ayllu.Github.Client/Github/Client/Models/RepositoryRuleRequiredStatusChecks_type.cs new file mode 100644 index 0000000..4374b4b --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/RepositoryRuleRequiredStatusChecks_type.cs @@ -0,0 +1,16 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public enum RepositoryRuleRequiredStatusChecks_type + #pragma warning restore CS1591 + { + [EnumMember(Value = "required_status_checks")] + #pragma warning disable CS1591 + Required_status_checks, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Models/RepositoryRuleTagNamePattern.cs b/src/Ayllu.Github.Client/Github/Client/Models/RepositoryRuleTagNamePattern.cs new file mode 100644 index 0000000..5ab4426 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/RepositoryRuleTagNamePattern.cs @@ -0,0 +1,70 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + /// + /// Parameters to be used for the tag_name_pattern rule + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class RepositoryRuleTagNamePattern : IAdditionalDataHolder, IParsable + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The parameters property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.RepositoryRuleTagNamePattern_parameters? Parameters { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.RepositoryRuleTagNamePattern_parameters Parameters { get; set; } +#endif + /// The type property + public global::Ayllu.Github.Client.Models.RepositoryRuleTagNamePattern_type? Type { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public RepositoryRuleTagNamePattern() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.RepositoryRuleTagNamePattern CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.RepositoryRuleTagNamePattern(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "parameters", n => { Parameters = n.GetObjectValue(global::Ayllu.Github.Client.Models.RepositoryRuleTagNamePattern_parameters.CreateFromDiscriminatorValue); } }, + { "type", n => { Type = n.GetEnumValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteObjectValue("parameters", Parameters); + writer.WriteEnumValue("type", Type); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/RepositoryRuleTagNamePattern_parameters.cs b/src/Ayllu.Github.Client/Github/Client/Models/RepositoryRuleTagNamePattern_parameters.cs new file mode 100644 index 0000000..476a0af --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/RepositoryRuleTagNamePattern_parameters.cs @@ -0,0 +1,83 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class RepositoryRuleTagNamePattern_parameters : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// How this rule will appear to users. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Name { get; set; } +#nullable restore +#else + public string Name { get; set; } +#endif + /// If true, the rule will fail if the pattern matches. + public bool? Negate { get; set; } + /// The operator to use for matching. + public global::Ayllu.Github.Client.Models.RepositoryRuleTagNamePattern_parameters_operator? Operator { get; set; } + /// The pattern to match with. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Pattern { get; set; } +#nullable restore +#else + public string Pattern { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public RepositoryRuleTagNamePattern_parameters() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.RepositoryRuleTagNamePattern_parameters CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.RepositoryRuleTagNamePattern_parameters(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "name", n => { Name = n.GetStringValue(); } }, + { "negate", n => { Negate = n.GetBoolValue(); } }, + { "operator", n => { Operator = n.GetEnumValue(); } }, + { "pattern", n => { Pattern = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("name", Name); + writer.WriteBoolValue("negate", Negate); + writer.WriteEnumValue("operator", Operator); + writer.WriteStringValue("pattern", Pattern); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/RepositoryRuleTagNamePattern_parameters_operator.cs b/src/Ayllu.Github.Client/Github/Client/Models/RepositoryRuleTagNamePattern_parameters_operator.cs new file mode 100644 index 0000000..450077c --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/RepositoryRuleTagNamePattern_parameters_operator.cs @@ -0,0 +1,27 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Models +{ + /// The operator to use for matching. + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public enum RepositoryRuleTagNamePattern_parameters_operator + { + [EnumMember(Value = "starts_with")] + #pragma warning disable CS1591 + Starts_with, + #pragma warning restore CS1591 + [EnumMember(Value = "ends_with")] + #pragma warning disable CS1591 + Ends_with, + #pragma warning restore CS1591 + [EnumMember(Value = "contains")] + #pragma warning disable CS1591 + Contains, + #pragma warning restore CS1591 + [EnumMember(Value = "regex")] + #pragma warning disable CS1591 + Regex, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Models/RepositoryRuleTagNamePattern_type.cs b/src/Ayllu.Github.Client/Github/Client/Models/RepositoryRuleTagNamePattern_type.cs new file mode 100644 index 0000000..9a02725 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/RepositoryRuleTagNamePattern_type.cs @@ -0,0 +1,16 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public enum RepositoryRuleTagNamePattern_type + #pragma warning restore CS1591 + { + [EnumMember(Value = "tag_name_pattern")] + #pragma warning disable CS1591 + Tag_name_pattern, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Models/RepositoryRuleUpdate.cs b/src/Ayllu.Github.Client/Github/Client/Models/RepositoryRuleUpdate.cs new file mode 100644 index 0000000..1b7224b --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/RepositoryRuleUpdate.cs @@ -0,0 +1,70 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + /// + /// Only allow users with bypass permission to update matching refs. + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class RepositoryRuleUpdate : IAdditionalDataHolder, IParsable + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The parameters property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.RepositoryRuleUpdate_parameters? Parameters { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.RepositoryRuleUpdate_parameters Parameters { get; set; } +#endif + /// The type property + public global::Ayllu.Github.Client.Models.RepositoryRuleUpdate_type? Type { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public RepositoryRuleUpdate() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.RepositoryRuleUpdate CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.RepositoryRuleUpdate(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "parameters", n => { Parameters = n.GetObjectValue(global::Ayllu.Github.Client.Models.RepositoryRuleUpdate_parameters.CreateFromDiscriminatorValue); } }, + { "type", n => { Type = n.GetEnumValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteObjectValue("parameters", Parameters); + writer.WriteEnumValue("type", Type); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/RepositoryRuleUpdate_parameters.cs b/src/Ayllu.Github.Client/Github/Client/Models/RepositoryRuleUpdate_parameters.cs new file mode 100644 index 0000000..47d6928 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/RepositoryRuleUpdate_parameters.cs @@ -0,0 +1,59 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class RepositoryRuleUpdate_parameters : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// Branch can pull changes from its upstream repository + public bool? UpdateAllowsFetchAndMerge { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public RepositoryRuleUpdate_parameters() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.RepositoryRuleUpdate_parameters CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.RepositoryRuleUpdate_parameters(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "update_allows_fetch_and_merge", n => { UpdateAllowsFetchAndMerge = n.GetBoolValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteBoolValue("update_allows_fetch_and_merge", UpdateAllowsFetchAndMerge); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/RepositoryRuleUpdate_type.cs b/src/Ayllu.Github.Client/Github/Client/Models/RepositoryRuleUpdate_type.cs new file mode 100644 index 0000000..00f4975 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/RepositoryRuleUpdate_type.cs @@ -0,0 +1,16 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public enum RepositoryRuleUpdate_type + #pragma warning restore CS1591 + { + [EnumMember(Value = "update")] + #pragma warning disable CS1591 + Update, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Models/RepositoryRuleWorkflows.cs b/src/Ayllu.Github.Client/Github/Client/Models/RepositoryRuleWorkflows.cs new file mode 100644 index 0000000..de2eaf7 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/RepositoryRuleWorkflows.cs @@ -0,0 +1,70 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + /// + /// Require all changes made to a targeted branch to pass the specified workflows before they can be merged. + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class RepositoryRuleWorkflows : IAdditionalDataHolder, IParsable + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The parameters property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.RepositoryRuleWorkflows_parameters? Parameters { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.RepositoryRuleWorkflows_parameters Parameters { get; set; } +#endif + /// The type property + public global::Ayllu.Github.Client.Models.RepositoryRuleWorkflows_type? Type { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public RepositoryRuleWorkflows() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.RepositoryRuleWorkflows CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.RepositoryRuleWorkflows(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "parameters", n => { Parameters = n.GetObjectValue(global::Ayllu.Github.Client.Models.RepositoryRuleWorkflows_parameters.CreateFromDiscriminatorValue); } }, + { "type", n => { Type = n.GetEnumValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteObjectValue("parameters", Parameters); + writer.WriteEnumValue("type", Type); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/RepositoryRuleWorkflows_parameters.cs b/src/Ayllu.Github.Client/Github/Client/Models/RepositoryRuleWorkflows_parameters.cs new file mode 100644 index 0000000..e94f6a5 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/RepositoryRuleWorkflows_parameters.cs @@ -0,0 +1,69 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class RepositoryRuleWorkflows_parameters : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// Allow repositories and branches to be created if a check would otherwise prohibit it. + public bool? DoNotEnforceOnCreate { get; set; } + /// Workflows that must pass for this rule to pass. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? Workflows { get; set; } +#nullable restore +#else + public List Workflows { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public RepositoryRuleWorkflows_parameters() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.RepositoryRuleWorkflows_parameters CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.RepositoryRuleWorkflows_parameters(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "do_not_enforce_on_create", n => { DoNotEnforceOnCreate = n.GetBoolValue(); } }, + { "workflows", n => { Workflows = n.GetCollectionOfObjectValues(global::Ayllu.Github.Client.Models.RepositoryRuleParamsWorkflowFileReference.CreateFromDiscriminatorValue)?.AsList(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteBoolValue("do_not_enforce_on_create", DoNotEnforceOnCreate); + writer.WriteCollectionOfObjectValues("workflows", Workflows); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/RepositoryRuleWorkflows_type.cs b/src/Ayllu.Github.Client/Github/Client/Models/RepositoryRuleWorkflows_type.cs new file mode 100644 index 0000000..1208285 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/RepositoryRuleWorkflows_type.cs @@ -0,0 +1,16 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public enum RepositoryRuleWorkflows_type + #pragma warning restore CS1591 + { + [EnumMember(Value = "workflows")] + #pragma warning disable CS1591 + Workflows, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Models/RepositoryRuleset.cs b/src/Ayllu.Github.Client/Github/Client/Models/RepositoryRuleset.cs new file mode 100644 index 0000000..3db17aa --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/RepositoryRuleset.cs @@ -0,0 +1,211 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + /// + /// A set of rules to apply when specified conditions are met. + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class RepositoryRuleset : IAdditionalDataHolder, IParsable + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The actors that can bypass the rules in this ruleset +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? BypassActors { get; set; } +#nullable restore +#else + public List BypassActors { get; set; } +#endif + /// The conditions property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.RepositoryRuleset.RepositoryRuleset_conditions? Conditions { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.RepositoryRuleset.RepositoryRuleset_conditions Conditions { get; set; } +#endif + /// The created_at property + public DateTimeOffset? CreatedAt { get; set; } + /// The bypass type of the user making the API request for this ruleset. This field is only returned whenquerying the repository-level endpoint. + public global::Ayllu.Github.Client.Models.RepositoryRuleset_current_user_can_bypass? CurrentUserCanBypass { get; set; } + /// The enforcement level of the ruleset. `evaluate` allows admins to test rules before enforcing them. Admins can view insights on the Rule Insights page (`evaluate` is only available with GitHub Enterprise). + public global::Ayllu.Github.Client.Models.RepositoryRuleEnforcement? Enforcement { get; set; } + /// The ID of the ruleset + public int? Id { get; set; } + /// The _links property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.RepositoryRuleset__links? Links { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.RepositoryRuleset__links Links { get; set; } +#endif + /// The name of the ruleset +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Name { get; set; } +#nullable restore +#else + public string Name { get; set; } +#endif + /// The node_id property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? NodeId { get; set; } +#nullable restore +#else + public string NodeId { get; set; } +#endif + /// The rules property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? Rules { get; set; } +#nullable restore +#else + public List Rules { get; set; } +#endif + /// The name of the source +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Source { get; set; } +#nullable restore +#else + public string Source { get; set; } +#endif + /// The type of the source of the ruleset + public global::Ayllu.Github.Client.Models.RepositoryRuleset_source_type? SourceType { get; set; } + /// The target of the ruleset + public global::Ayllu.Github.Client.Models.RepositoryRuleset_target? Target { get; set; } + /// The updated_at property + public DateTimeOffset? UpdatedAt { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public RepositoryRuleset() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.RepositoryRuleset CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.RepositoryRuleset(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "bypass_actors", n => { BypassActors = n.GetCollectionOfObjectValues(global::Ayllu.Github.Client.Models.RepositoryRulesetBypassActor.CreateFromDiscriminatorValue)?.AsList(); } }, + { "conditions", n => { Conditions = n.GetObjectValue(global::Ayllu.Github.Client.Models.RepositoryRuleset.RepositoryRuleset_conditions.CreateFromDiscriminatorValue); } }, + { "created_at", n => { CreatedAt = n.GetDateTimeOffsetValue(); } }, + { "current_user_can_bypass", n => { CurrentUserCanBypass = n.GetEnumValue(); } }, + { "enforcement", n => { Enforcement = n.GetEnumValue(); } }, + { "id", n => { Id = n.GetIntValue(); } }, + { "_links", n => { Links = n.GetObjectValue(global::Ayllu.Github.Client.Models.RepositoryRuleset__links.CreateFromDiscriminatorValue); } }, + { "name", n => { Name = n.GetStringValue(); } }, + { "node_id", n => { NodeId = n.GetStringValue(); } }, + { "rules", n => { Rules = n.GetCollectionOfObjectValues(global::Ayllu.Github.Client.Models.RepositoryRule.CreateFromDiscriminatorValue)?.AsList(); } }, + { "source", n => { Source = n.GetStringValue(); } }, + { "source_type", n => { SourceType = n.GetEnumValue(); } }, + { "target", n => { Target = n.GetEnumValue(); } }, + { "updated_at", n => { UpdatedAt = n.GetDateTimeOffsetValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteCollectionOfObjectValues("bypass_actors", BypassActors); + writer.WriteObjectValue("conditions", Conditions); + writer.WriteDateTimeOffsetValue("created_at", CreatedAt); + writer.WriteEnumValue("current_user_can_bypass", CurrentUserCanBypass); + writer.WriteEnumValue("enforcement", Enforcement); + writer.WriteIntValue("id", Id); + writer.WriteObjectValue("_links", Links); + writer.WriteStringValue("name", Name); + writer.WriteStringValue("node_id", NodeId); + writer.WriteCollectionOfObjectValues("rules", Rules); + writer.WriteStringValue("source", Source); + writer.WriteEnumValue("source_type", SourceType); + writer.WriteEnumValue("target", Target); + writer.WriteDateTimeOffsetValue("updated_at", UpdatedAt); + writer.WriteAdditionalData(AdditionalData); + } + /// + /// Composed type wrapper for classes , + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class RepositoryRuleset_conditions : IComposedTypeWrapper, IParsable + { + /// Composed type representation for type +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.OrgRulesetConditions? OrgRulesetConditions { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.OrgRulesetConditions OrgRulesetConditions { get; set; } +#endif + /// Composed type representation for type +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.RepositoryRulesetConditions? RepositoryRulesetConditions { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.RepositoryRulesetConditions RepositoryRulesetConditions { get; set; } +#endif + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.RepositoryRuleset.RepositoryRuleset_conditions CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + var result = new global::Ayllu.Github.Client.Models.RepositoryRuleset.RepositoryRuleset_conditions(); + result.OrgRulesetConditions = new global::Ayllu.Github.Client.Models.OrgRulesetConditions(); + result.RepositoryRulesetConditions = new global::Ayllu.Github.Client.Models.RepositoryRulesetConditions(); + return result; + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + if(OrgRulesetConditions != null || RepositoryRulesetConditions != null) + { + return ParseNodeHelper.MergeDeserializersForIntersectionWrapper(OrgRulesetConditions, RepositoryRulesetConditions); + } + return new Dictionary>(); + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteObjectValue(null, OrgRulesetConditions, RepositoryRulesetConditions); + } + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/RepositoryRulesetBypassActor.cs b/src/Ayllu.Github.Client/Github/Client/Models/RepositoryRulesetBypassActor.cs new file mode 100644 index 0000000..2868492 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/RepositoryRulesetBypassActor.cs @@ -0,0 +1,69 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + /// + /// An actor that can bypass rules in a ruleset + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class RepositoryRulesetBypassActor : IAdditionalDataHolder, IParsable + { + /// The ID of the actor that can bypass a ruleset. Required for `Integration`, `RepositoryRole`, and `Team` actor types. 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. + public int? ActorId { get; set; } + /// The type of actor that can bypass a ruleset. + public global::Ayllu.Github.Client.Models.RepositoryRulesetBypassActor_actor_type? ActorType { get; set; } + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// 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. Also, `pull_request` is only applicable to branch rulesets. + public global::Ayllu.Github.Client.Models.RepositoryRulesetBypassActor_bypass_mode? BypassMode { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public RepositoryRulesetBypassActor() + { + AdditionalData = new Dictionary(); + BypassMode = global::Ayllu.Github.Client.Models.RepositoryRulesetBypassActor_bypass_mode.Always; + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.RepositoryRulesetBypassActor CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.RepositoryRulesetBypassActor(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "actor_id", n => { ActorId = n.GetIntValue(); } }, + { "actor_type", n => { ActorType = n.GetEnumValue(); } }, + { "bypass_mode", n => { BypassMode = n.GetEnumValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteIntValue("actor_id", ActorId); + writer.WriteEnumValue("actor_type", ActorType); + writer.WriteEnumValue("bypass_mode", BypassMode); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/RepositoryRulesetBypassActor_actor_type.cs b/src/Ayllu.Github.Client/Github/Client/Models/RepositoryRulesetBypassActor_actor_type.cs new file mode 100644 index 0000000..88cd58e --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/RepositoryRulesetBypassActor_actor_type.cs @@ -0,0 +1,31 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Models +{ + /// The type of actor that can bypass a ruleset. + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public enum RepositoryRulesetBypassActor_actor_type + { + [EnumMember(Value = "Integration")] + #pragma warning disable CS1591 + Integration, + #pragma warning restore CS1591 + [EnumMember(Value = "OrganizationAdmin")] + #pragma warning disable CS1591 + OrganizationAdmin, + #pragma warning restore CS1591 + [EnumMember(Value = "RepositoryRole")] + #pragma warning disable CS1591 + RepositoryRole, + #pragma warning restore CS1591 + [EnumMember(Value = "Team")] + #pragma warning disable CS1591 + Team, + #pragma warning restore CS1591 + [EnumMember(Value = "DeployKey")] + #pragma warning disable CS1591 + DeployKey, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Models/RepositoryRulesetBypassActor_bypass_mode.cs b/src/Ayllu.Github.Client/Github/Client/Models/RepositoryRulesetBypassActor_bypass_mode.cs new file mode 100644 index 0000000..432e921 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/RepositoryRulesetBypassActor_bypass_mode.cs @@ -0,0 +1,19 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Models +{ + /// 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. Also, `pull_request` is only applicable to branch rulesets. + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public enum RepositoryRulesetBypassActor_bypass_mode + { + [EnumMember(Value = "always")] + #pragma warning disable CS1591 + Always, + #pragma warning restore CS1591 + [EnumMember(Value = "pull_request")] + #pragma warning disable CS1591 + Pull_request, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Models/RepositoryRulesetConditions.cs b/src/Ayllu.Github.Client/Github/Client/Models/RepositoryRulesetConditions.cs new file mode 100644 index 0000000..9fbb46c --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/RepositoryRulesetConditions.cs @@ -0,0 +1,66 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + /// + /// Parameters for a repository ruleset ref name condition + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class RepositoryRulesetConditions : IAdditionalDataHolder, IParsable + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The ref_name property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.RepositoryRulesetConditions_ref_name? RefName { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.RepositoryRulesetConditions_ref_name RefName { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public RepositoryRulesetConditions() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.RepositoryRulesetConditions CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.RepositoryRulesetConditions(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "ref_name", n => { RefName = n.GetObjectValue(global::Ayllu.Github.Client.Models.RepositoryRulesetConditions_ref_name.CreateFromDiscriminatorValue); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteObjectValue("ref_name", RefName); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/RepositoryRulesetConditions_ref_name.cs b/src/Ayllu.Github.Client/Github/Client/Models/RepositoryRulesetConditions_ref_name.cs new file mode 100644 index 0000000..a4ea594 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/RepositoryRulesetConditions_ref_name.cs @@ -0,0 +1,75 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class RepositoryRulesetConditions_ref_name : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// Array of ref names or patterns to exclude. The condition will not pass if any of these patterns match. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? Exclude { get; set; } +#nullable restore +#else + public List Exclude { get; set; } +#endif + /// 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. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? Include { get; set; } +#nullable restore +#else + public List Include { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public RepositoryRulesetConditions_ref_name() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.RepositoryRulesetConditions_ref_name CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.RepositoryRulesetConditions_ref_name(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "exclude", n => { Exclude = n.GetCollectionOfPrimitiveValues()?.AsList(); } }, + { "include", n => { Include = n.GetCollectionOfPrimitiveValues()?.AsList(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteCollectionOfPrimitiveValues("exclude", Exclude); + writer.WriteCollectionOfPrimitiveValues("include", Include); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/RepositoryRuleset__links.cs b/src/Ayllu.Github.Client/Github/Client/Models/RepositoryRuleset__links.cs new file mode 100644 index 0000000..dd75e52 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/RepositoryRuleset__links.cs @@ -0,0 +1,75 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class RepositoryRuleset__links : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The html property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.RepositoryRuleset__links_html? Html { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.RepositoryRuleset__links_html Html { get; set; } +#endif + /// The self property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.RepositoryRuleset__links_self? Self { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.RepositoryRuleset__links_self Self { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public RepositoryRuleset__links() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.RepositoryRuleset__links CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.RepositoryRuleset__links(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "html", n => { Html = n.GetObjectValue(global::Ayllu.Github.Client.Models.RepositoryRuleset__links_html.CreateFromDiscriminatorValue); } }, + { "self", n => { Self = n.GetObjectValue(global::Ayllu.Github.Client.Models.RepositoryRuleset__links_self.CreateFromDiscriminatorValue); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteObjectValue("html", Html); + writer.WriteObjectValue("self", Self); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/RepositoryRuleset__links_html.cs b/src/Ayllu.Github.Client/Github/Client/Models/RepositoryRuleset__links_html.cs new file mode 100644 index 0000000..6fa1c2b --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/RepositoryRuleset__links_html.cs @@ -0,0 +1,65 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class RepositoryRuleset__links_html : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The html URL of the ruleset +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Href { get; set; } +#nullable restore +#else + public string Href { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public RepositoryRuleset__links_html() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.RepositoryRuleset__links_html CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.RepositoryRuleset__links_html(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "href", n => { Href = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("href", Href); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/RepositoryRuleset__links_self.cs b/src/Ayllu.Github.Client/Github/Client/Models/RepositoryRuleset__links_self.cs new file mode 100644 index 0000000..eb085e2 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/RepositoryRuleset__links_self.cs @@ -0,0 +1,65 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class RepositoryRuleset__links_self : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The URL of the ruleset +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Href { get; set; } +#nullable restore +#else + public string Href { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public RepositoryRuleset__links_self() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.RepositoryRuleset__links_self CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.RepositoryRuleset__links_self(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "href", n => { Href = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("href", Href); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/RepositoryRuleset_current_user_can_bypass.cs b/src/Ayllu.Github.Client/Github/Client/Models/RepositoryRuleset_current_user_can_bypass.cs new file mode 100644 index 0000000..34bb7f6 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/RepositoryRuleset_current_user_can_bypass.cs @@ -0,0 +1,23 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Models +{ + /// The bypass type of the user making the API request for this ruleset. This field is only returned whenquerying the repository-level endpoint. + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public enum RepositoryRuleset_current_user_can_bypass + { + [EnumMember(Value = "always")] + #pragma warning disable CS1591 + Always, + #pragma warning restore CS1591 + [EnumMember(Value = "pull_requests_only")] + #pragma warning disable CS1591 + Pull_requests_only, + #pragma warning restore CS1591 + [EnumMember(Value = "never")] + #pragma warning disable CS1591 + Never, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Models/RepositoryRuleset_source_type.cs b/src/Ayllu.Github.Client/Github/Client/Models/RepositoryRuleset_source_type.cs new file mode 100644 index 0000000..be82bea --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/RepositoryRuleset_source_type.cs @@ -0,0 +1,23 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Models +{ + /// The type of the source of the ruleset + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public enum RepositoryRuleset_source_type + { + [EnumMember(Value = "Repository")] + #pragma warning disable CS1591 + Repository, + #pragma warning restore CS1591 + [EnumMember(Value = "Organization")] + #pragma warning disable CS1591 + Organization, + #pragma warning restore CS1591 + [EnumMember(Value = "Enterprise")] + #pragma warning disable CS1591 + Enterprise, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Models/RepositoryRuleset_target.cs b/src/Ayllu.Github.Client/Github/Client/Models/RepositoryRuleset_target.cs new file mode 100644 index 0000000..f6cf0af --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/RepositoryRuleset_target.cs @@ -0,0 +1,27 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Models +{ + /// The target of the ruleset + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public enum RepositoryRuleset_target + { + [EnumMember(Value = "branch")] + #pragma warning disable CS1591 + Branch, + #pragma warning restore CS1591 + [EnumMember(Value = "tag")] + #pragma warning disable CS1591 + Tag, + #pragma warning restore CS1591 + [EnumMember(Value = "push")] + #pragma warning disable CS1591 + Push, + #pragma warning restore CS1591 + [EnumMember(Value = "repository")] + #pragma warning disable CS1591 + Repository, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Models/RepositorySubscription.cs b/src/Ayllu.Github.Client/Github/Client/Models/RepositorySubscription.cs new file mode 100644 index 0000000..467b2e7 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/RepositorySubscription.cs @@ -0,0 +1,98 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + /// + /// Repository invitations let you manage who you collaborate with. + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class RepositorySubscription : IAdditionalDataHolder, IParsable + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The created_at property + public DateTimeOffset? CreatedAt { get; set; } + /// Determines if all notifications should be blocked from this repository. + public bool? Ignored { get; set; } + /// The reason property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Reason { get; set; } +#nullable restore +#else + public string Reason { get; set; } +#endif + /// The repository_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? RepositoryUrl { get; set; } +#nullable restore +#else + public string RepositoryUrl { get; set; } +#endif + /// Determines if notifications should be received from this repository. + public bool? Subscribed { get; set; } + /// The url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Url { get; set; } +#nullable restore +#else + public string Url { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public RepositorySubscription() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.RepositorySubscription CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.RepositorySubscription(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "created_at", n => { CreatedAt = n.GetDateTimeOffsetValue(); } }, + { "ignored", n => { Ignored = n.GetBoolValue(); } }, + { "reason", n => { Reason = n.GetStringValue(); } }, + { "repository_url", n => { RepositoryUrl = n.GetStringValue(); } }, + { "subscribed", n => { Subscribed = n.GetBoolValue(); } }, + { "url", n => { Url = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteDateTimeOffsetValue("created_at", CreatedAt); + writer.WriteBoolValue("ignored", Ignored); + writer.WriteStringValue("reason", Reason); + writer.WriteStringValue("repository_url", RepositoryUrl); + writer.WriteBoolValue("subscribed", Subscribed); + writer.WriteStringValue("url", Url); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/Repository_code_search_index_status.cs b/src/Ayllu.Github.Client/Github/Client/Models/Repository_code_search_index_status.cs new file mode 100644 index 0000000..218eef5 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/Repository_code_search_index_status.cs @@ -0,0 +1,70 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + /// + /// The status of the code search index for this repository + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class Repository_code_search_index_status : IAdditionalDataHolder, IParsable + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The lexical_commit_sha property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? LexicalCommitSha { get; set; } +#nullable restore +#else + public string LexicalCommitSha { get; set; } +#endif + /// The lexical_search_ok property + public bool? LexicalSearchOk { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public Repository_code_search_index_status() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.Repository_code_search_index_status CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.Repository_code_search_index_status(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "lexical_commit_sha", n => { LexicalCommitSha = n.GetStringValue(); } }, + { "lexical_search_ok", n => { LexicalSearchOk = n.GetBoolValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("lexical_commit_sha", LexicalCommitSha); + writer.WriteBoolValue("lexical_search_ok", LexicalSearchOk); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/Repository_merge_commit_message.cs b/src/Ayllu.Github.Client/Github/Client/Models/Repository_merge_commit_message.cs new file mode 100644 index 0000000..b056455 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/Repository_merge_commit_message.cs @@ -0,0 +1,23 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Models +{ + /// 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. + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public enum Repository_merge_commit_message + { + [EnumMember(Value = "PR_BODY")] + #pragma warning disable CS1591 + PR_BODY, + #pragma warning restore CS1591 + [EnumMember(Value = "PR_TITLE")] + #pragma warning disable CS1591 + PR_TITLE, + #pragma warning restore CS1591 + [EnumMember(Value = "BLANK")] + #pragma warning disable CS1591 + BLANK, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Models/Repository_merge_commit_title.cs b/src/Ayllu.Github.Client/Github/Client/Models/Repository_merge_commit_title.cs new file mode 100644 index 0000000..6dc977c --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/Repository_merge_commit_title.cs @@ -0,0 +1,19 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Models +{ + /// 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). + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public enum Repository_merge_commit_title + { + [EnumMember(Value = "PR_TITLE")] + #pragma warning disable CS1591 + PR_TITLE, + #pragma warning restore CS1591 + [EnumMember(Value = "MERGE_MESSAGE")] + #pragma warning disable CS1591 + MERGE_MESSAGE, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Models/Repository_permissions.cs b/src/Ayllu.Github.Client/Github/Client/Models/Repository_permissions.cs new file mode 100644 index 0000000..4dd944b --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/Repository_permissions.cs @@ -0,0 +1,75 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class Repository_permissions : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The admin property + public bool? Admin { get; set; } + /// The maintain property + public bool? Maintain { get; set; } + /// The pull property + public bool? Pull { get; set; } + /// The push property + public bool? Push { get; set; } + /// The triage property + public bool? Triage { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public Repository_permissions() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.Repository_permissions CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.Repository_permissions(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "admin", n => { Admin = n.GetBoolValue(); } }, + { "maintain", n => { Maintain = n.GetBoolValue(); } }, + { "pull", n => { Pull = n.GetBoolValue(); } }, + { "push", n => { Push = n.GetBoolValue(); } }, + { "triage", n => { Triage = n.GetBoolValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteBoolValue("admin", Admin); + writer.WriteBoolValue("maintain", Maintain); + writer.WriteBoolValue("pull", Pull); + writer.WriteBoolValue("push", Push); + writer.WriteBoolValue("triage", Triage); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/Repository_squash_merge_commit_message.cs b/src/Ayllu.Github.Client/Github/Client/Models/Repository_squash_merge_commit_message.cs new file mode 100644 index 0000000..d1d050d --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/Repository_squash_merge_commit_message.cs @@ -0,0 +1,23 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Models +{ + /// 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. + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public enum Repository_squash_merge_commit_message + { + [EnumMember(Value = "PR_BODY")] + #pragma warning disable CS1591 + PR_BODY, + #pragma warning restore CS1591 + [EnumMember(Value = "COMMIT_MESSAGES")] + #pragma warning disable CS1591 + COMMIT_MESSAGES, + #pragma warning restore CS1591 + [EnumMember(Value = "BLANK")] + #pragma warning disable CS1591 + BLANK, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Models/Repository_squash_merge_commit_title.cs b/src/Ayllu.Github.Client/Github/Client/Models/Repository_squash_merge_commit_title.cs new file mode 100644 index 0000000..58ff2c6 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/Repository_squash_merge_commit_title.cs @@ -0,0 +1,19 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Models +{ + /// 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). + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public enum Repository_squash_merge_commit_title + { + [EnumMember(Value = "PR_TITLE")] + #pragma warning disable CS1591 + PR_TITLE, + #pragma warning restore CS1591 + [EnumMember(Value = "COMMIT_OR_PR_TITLE")] + #pragma warning disable CS1591 + COMMIT_OR_PR_TITLE, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Models/ReviewComment.cs b/src/Ayllu.Github.Client/Github/Client/Models/ReviewComment.cs new file mode 100644 index 0000000..38bde60 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/ReviewComment.cs @@ -0,0 +1,258 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + /// + /// Legacy Review Comment + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class ReviewComment : IAdditionalDataHolder, IParsable + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// How the author is associated with the repository. + public global::Ayllu.Github.Client.Models.AuthorAssociation? AuthorAssociation { get; set; } + /// The body property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Body { get; set; } +#nullable restore +#else + public string Body { get; set; } +#endif + /// The body_html property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? BodyHtml { get; set; } +#nullable restore +#else + public string BodyHtml { get; set; } +#endif + /// The body_text property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? BodyText { get; set; } +#nullable restore +#else + public string BodyText { get; set; } +#endif + /// The commit_id property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? CommitId { get; set; } +#nullable restore +#else + public string CommitId { get; set; } +#endif + /// The created_at property + public DateTimeOffset? CreatedAt { get; set; } + /// The diff_hunk property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? DiffHunk { get; set; } +#nullable restore +#else + public string DiffHunk { get; set; } +#endif + /// The html_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? HtmlUrl { get; set; } +#nullable restore +#else + public string HtmlUrl { get; set; } +#endif + /// The id property + public long? Id { get; set; } + /// The in_reply_to_id property + public int? InReplyToId { get; set; } + /// The line of the blob to which the comment applies. The last line of the range for a multi-line comment + public int? Line { get; set; } + /// The _links property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.ReviewComment__links? Links { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.ReviewComment__links Links { get; set; } +#endif + /// The node_id property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? NodeId { get; set; } +#nullable restore +#else + public string NodeId { get; set; } +#endif + /// The original_commit_id property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? OriginalCommitId { get; set; } +#nullable restore +#else + public string OriginalCommitId { get; set; } +#endif + /// The original line of the blob to which the comment applies. The last line of the range for a multi-line comment + public int? OriginalLine { get; set; } + /// The original_position property + public int? OriginalPosition { get; set; } + /// The original first line of the range for a multi-line comment. + public int? OriginalStartLine { get; set; } + /// The path property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Path { get; set; } +#nullable restore +#else + public string Path { get; set; } +#endif + /// The position property + public int? Position { get; set; } + /// The pull_request_review_id property + public long? PullRequestReviewId { get; set; } + /// The pull_request_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? PullRequestUrl { get; set; } +#nullable restore +#else + public string PullRequestUrl { get; set; } +#endif + /// The reactions property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.ReactionRollup? Reactions { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.ReactionRollup Reactions { get; set; } +#endif + /// The side of the first line of the range for a multi-line comment. + public global::Ayllu.Github.Client.Models.ReviewComment_side? Side { get; set; } + /// The first line of the range for a multi-line comment. + public int? StartLine { get; set; } + /// The side of the first line of the range for a multi-line comment. + public global::Ayllu.Github.Client.Models.ReviewComment_start_side? StartSide { get; set; } + /// The level at which the comment is targeted, can be a diff line or a file. + public global::Ayllu.Github.Client.Models.ReviewComment_subject_type? SubjectType { get; set; } + /// The updated_at property + public DateTimeOffset? UpdatedAt { get; set; } + /// The url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Url { get; set; } +#nullable restore +#else + public string Url { get; set; } +#endif + /// A GitHub user. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.NullableSimpleUser? User { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.NullableSimpleUser User { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public ReviewComment() + { + AdditionalData = new Dictionary(); + Side = global::Ayllu.Github.Client.Models.ReviewComment_side.RIGHT; + StartSide = global::Ayllu.Github.Client.Models.ReviewComment_start_side.RIGHT; + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.ReviewComment CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.ReviewComment(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "author_association", n => { AuthorAssociation = n.GetEnumValue(); } }, + { "body", n => { Body = n.GetStringValue(); } }, + { "body_html", n => { BodyHtml = n.GetStringValue(); } }, + { "body_text", n => { BodyText = n.GetStringValue(); } }, + { "commit_id", n => { CommitId = n.GetStringValue(); } }, + { "created_at", n => { CreatedAt = n.GetDateTimeOffsetValue(); } }, + { "diff_hunk", n => { DiffHunk = n.GetStringValue(); } }, + { "html_url", n => { HtmlUrl = n.GetStringValue(); } }, + { "id", n => { Id = n.GetLongValue(); } }, + { "in_reply_to_id", n => { InReplyToId = n.GetIntValue(); } }, + { "line", n => { Line = n.GetIntValue(); } }, + { "_links", n => { Links = n.GetObjectValue(global::Ayllu.Github.Client.Models.ReviewComment__links.CreateFromDiscriminatorValue); } }, + { "node_id", n => { NodeId = n.GetStringValue(); } }, + { "original_commit_id", n => { OriginalCommitId = n.GetStringValue(); } }, + { "original_line", n => { OriginalLine = n.GetIntValue(); } }, + { "original_position", n => { OriginalPosition = n.GetIntValue(); } }, + { "original_start_line", n => { OriginalStartLine = n.GetIntValue(); } }, + { "path", n => { Path = n.GetStringValue(); } }, + { "position", n => { Position = n.GetIntValue(); } }, + { "pull_request_review_id", n => { PullRequestReviewId = n.GetLongValue(); } }, + { "pull_request_url", n => { PullRequestUrl = n.GetStringValue(); } }, + { "reactions", n => { Reactions = n.GetObjectValue(global::Ayllu.Github.Client.Models.ReactionRollup.CreateFromDiscriminatorValue); } }, + { "side", n => { Side = n.GetEnumValue(); } }, + { "start_line", n => { StartLine = n.GetIntValue(); } }, + { "start_side", n => { StartSide = n.GetEnumValue(); } }, + { "subject_type", n => { SubjectType = n.GetEnumValue(); } }, + { "updated_at", n => { UpdatedAt = n.GetDateTimeOffsetValue(); } }, + { "url", n => { Url = n.GetStringValue(); } }, + { "user", n => { User = n.GetObjectValue(global::Ayllu.Github.Client.Models.NullableSimpleUser.CreateFromDiscriminatorValue); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteEnumValue("author_association", AuthorAssociation); + writer.WriteStringValue("body", Body); + writer.WriteStringValue("body_html", BodyHtml); + writer.WriteStringValue("body_text", BodyText); + writer.WriteStringValue("commit_id", CommitId); + writer.WriteDateTimeOffsetValue("created_at", CreatedAt); + writer.WriteStringValue("diff_hunk", DiffHunk); + writer.WriteStringValue("html_url", HtmlUrl); + writer.WriteLongValue("id", Id); + writer.WriteIntValue("in_reply_to_id", InReplyToId); + writer.WriteIntValue("line", Line); + writer.WriteObjectValue("_links", Links); + writer.WriteStringValue("node_id", NodeId); + writer.WriteStringValue("original_commit_id", OriginalCommitId); + writer.WriteIntValue("original_line", OriginalLine); + writer.WriteIntValue("original_position", OriginalPosition); + writer.WriteIntValue("original_start_line", OriginalStartLine); + writer.WriteStringValue("path", Path); + writer.WriteIntValue("position", Position); + writer.WriteLongValue("pull_request_review_id", PullRequestReviewId); + writer.WriteStringValue("pull_request_url", PullRequestUrl); + writer.WriteObjectValue("reactions", Reactions); + writer.WriteEnumValue("side", Side); + writer.WriteIntValue("start_line", StartLine); + writer.WriteEnumValue("start_side", StartSide); + writer.WriteEnumValue("subject_type", SubjectType); + writer.WriteDateTimeOffsetValue("updated_at", UpdatedAt); + writer.WriteStringValue("url", Url); + writer.WriteObjectValue("user", User); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/ReviewComment__links.cs b/src/Ayllu.Github.Client/Github/Client/Models/ReviewComment__links.cs new file mode 100644 index 0000000..42b65b4 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/ReviewComment__links.cs @@ -0,0 +1,85 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class ReviewComment__links : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// Hypermedia Link +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.Link? Html { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.Link Html { get; set; } +#endif + /// Hypermedia Link +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.Link? PullRequest { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.Link PullRequest { get; set; } +#endif + /// Hypermedia Link +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.Link? Self { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.Link Self { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public ReviewComment__links() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.ReviewComment__links CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.ReviewComment__links(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "html", n => { Html = n.GetObjectValue(global::Ayllu.Github.Client.Models.Link.CreateFromDiscriminatorValue); } }, + { "pull_request", n => { PullRequest = n.GetObjectValue(global::Ayllu.Github.Client.Models.Link.CreateFromDiscriminatorValue); } }, + { "self", n => { Self = n.GetObjectValue(global::Ayllu.Github.Client.Models.Link.CreateFromDiscriminatorValue); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteObjectValue("html", Html); + writer.WriteObjectValue("pull_request", PullRequest); + writer.WriteObjectValue("self", Self); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/ReviewComment_side.cs b/src/Ayllu.Github.Client/Github/Client/Models/ReviewComment_side.cs new file mode 100644 index 0000000..a84a506 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/ReviewComment_side.cs @@ -0,0 +1,19 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Models +{ + /// The side of the first line of the range for a multi-line comment. + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public enum ReviewComment_side + { + [EnumMember(Value = "LEFT")] + #pragma warning disable CS1591 + LEFT, + #pragma warning restore CS1591 + [EnumMember(Value = "RIGHT")] + #pragma warning disable CS1591 + RIGHT, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Models/ReviewComment_start_side.cs b/src/Ayllu.Github.Client/Github/Client/Models/ReviewComment_start_side.cs new file mode 100644 index 0000000..9bb0cb8 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/ReviewComment_start_side.cs @@ -0,0 +1,19 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Models +{ + /// The side of the first line of the range for a multi-line comment. + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public enum ReviewComment_start_side + { + [EnumMember(Value = "LEFT")] + #pragma warning disable CS1591 + LEFT, + #pragma warning restore CS1591 + [EnumMember(Value = "RIGHT")] + #pragma warning disable CS1591 + RIGHT, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Models/ReviewComment_subject_type.cs b/src/Ayllu.Github.Client/Github/Client/Models/ReviewComment_subject_type.cs new file mode 100644 index 0000000..f15c797 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/ReviewComment_subject_type.cs @@ -0,0 +1,19 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Models +{ + /// The level at which the comment is targeted, can be a diff line or a file. + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public enum ReviewComment_subject_type + { + [EnumMember(Value = "line")] + #pragma warning disable CS1591 + Line, + #pragma warning restore CS1591 + [EnumMember(Value = "file")] + #pragma warning disable CS1591 + File, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Models/ReviewCustomGatesCommentRequired.cs b/src/Ayllu.Github.Client/Github/Client/Models/ReviewCustomGatesCommentRequired.cs new file mode 100644 index 0000000..03f7da1 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/ReviewCustomGatesCommentRequired.cs @@ -0,0 +1,75 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class ReviewCustomGatesCommentRequired : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// Comment associated with the pending deployment protection rule. **Required when state is not provided.** +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Comment { get; set; } +#nullable restore +#else + public string Comment { get; set; } +#endif + /// The name of the environment to approve or reject. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? EnvironmentName { get; set; } +#nullable restore +#else + public string EnvironmentName { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public ReviewCustomGatesCommentRequired() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.ReviewCustomGatesCommentRequired CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.ReviewCustomGatesCommentRequired(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "comment", n => { Comment = n.GetStringValue(); } }, + { "environment_name", n => { EnvironmentName = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("comment", Comment); + writer.WriteStringValue("environment_name", EnvironmentName); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/ReviewCustomGatesStateRequired.cs b/src/Ayllu.Github.Client/Github/Client/Models/ReviewCustomGatesStateRequired.cs new file mode 100644 index 0000000..8503f3a --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/ReviewCustomGatesStateRequired.cs @@ -0,0 +1,79 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class ReviewCustomGatesStateRequired : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// Optional comment to include with the review. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Comment { get; set; } +#nullable restore +#else + public string Comment { get; set; } +#endif + /// The name of the environment to approve or reject. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? EnvironmentName { get; set; } +#nullable restore +#else + public string EnvironmentName { get; set; } +#endif + /// Whether to approve or reject deployment to the specified environments. + public global::Ayllu.Github.Client.Models.ReviewCustomGatesStateRequired_state? State { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public ReviewCustomGatesStateRequired() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.ReviewCustomGatesStateRequired CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.ReviewCustomGatesStateRequired(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "comment", n => { Comment = n.GetStringValue(); } }, + { "environment_name", n => { EnvironmentName = n.GetStringValue(); } }, + { "state", n => { State = n.GetEnumValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("comment", Comment); + writer.WriteStringValue("environment_name", EnvironmentName); + writer.WriteEnumValue("state", State); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/ReviewCustomGatesStateRequired_state.cs b/src/Ayllu.Github.Client/Github/Client/Models/ReviewCustomGatesStateRequired_state.cs new file mode 100644 index 0000000..783a349 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/ReviewCustomGatesStateRequired_state.cs @@ -0,0 +1,19 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Models +{ + /// Whether to approve or reject deployment to the specified environments. + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public enum ReviewCustomGatesStateRequired_state + { + [EnumMember(Value = "approved")] + #pragma warning disable CS1591 + Approved, + #pragma warning restore CS1591 + [EnumMember(Value = "rejected")] + #pragma warning disable CS1591 + Rejected, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Models/ReviewDismissedIssueEvent.cs b/src/Ayllu.Github.Client/Github/Client/Models/ReviewDismissedIssueEvent.cs new file mode 100644 index 0000000..2071cad --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/ReviewDismissedIssueEvent.cs @@ -0,0 +1,150 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + /// + /// Review Dismissed Issue Event + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class ReviewDismissedIssueEvent : IAdditionalDataHolder, IParsable + { + /// A GitHub user. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.SimpleUser? Actor { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.SimpleUser Actor { get; set; } +#endif + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The commit_id property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? CommitId { get; set; } +#nullable restore +#else + public string CommitId { get; set; } +#endif + /// The commit_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? CommitUrl { get; set; } +#nullable restore +#else + public string CommitUrl { get; set; } +#endif + /// The created_at property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? CreatedAt { get; set; } +#nullable restore +#else + public string CreatedAt { get; set; } +#endif + /// The dismissed_review property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.ReviewDismissedIssueEvent_dismissed_review? DismissedReview { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.ReviewDismissedIssueEvent_dismissed_review DismissedReview { get; set; } +#endif + /// The event property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Event { get; set; } +#nullable restore +#else + public string Event { get; set; } +#endif + /// The id property + public int? Id { get; set; } + /// The node_id property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? NodeId { get; set; } +#nullable restore +#else + public string NodeId { get; set; } +#endif + /// 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. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.NullableIntegration? PerformedViaGithubApp { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.NullableIntegration PerformedViaGithubApp { get; set; } +#endif + /// The url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Url { get; set; } +#nullable restore +#else + public string Url { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public ReviewDismissedIssueEvent() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.ReviewDismissedIssueEvent CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.ReviewDismissedIssueEvent(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "actor", n => { Actor = n.GetObjectValue(global::Ayllu.Github.Client.Models.SimpleUser.CreateFromDiscriminatorValue); } }, + { "commit_id", n => { CommitId = n.GetStringValue(); } }, + { "commit_url", n => { CommitUrl = n.GetStringValue(); } }, + { "created_at", n => { CreatedAt = n.GetStringValue(); } }, + { "dismissed_review", n => { DismissedReview = n.GetObjectValue(global::Ayllu.Github.Client.Models.ReviewDismissedIssueEvent_dismissed_review.CreateFromDiscriminatorValue); } }, + { "event", n => { Event = n.GetStringValue(); } }, + { "id", n => { Id = n.GetIntValue(); } }, + { "node_id", n => { NodeId = n.GetStringValue(); } }, + { "performed_via_github_app", n => { PerformedViaGithubApp = n.GetObjectValue(global::Ayllu.Github.Client.Models.NullableIntegration.CreateFromDiscriminatorValue); } }, + { "url", n => { Url = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteObjectValue("actor", Actor); + writer.WriteStringValue("commit_id", CommitId); + writer.WriteStringValue("commit_url", CommitUrl); + writer.WriteStringValue("created_at", CreatedAt); + writer.WriteObjectValue("dismissed_review", DismissedReview); + writer.WriteStringValue("event", Event); + writer.WriteIntValue("id", Id); + writer.WriteStringValue("node_id", NodeId); + writer.WriteObjectValue("performed_via_github_app", PerformedViaGithubApp); + writer.WriteStringValue("url", Url); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/ReviewDismissedIssueEvent_dismissed_review.cs b/src/Ayllu.Github.Client/Github/Client/Models/ReviewDismissedIssueEvent_dismissed_review.cs new file mode 100644 index 0000000..08f932e --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/ReviewDismissedIssueEvent_dismissed_review.cs @@ -0,0 +1,89 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class ReviewDismissedIssueEvent_dismissed_review : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The dismissal_commit_id property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? DismissalCommitId { get; set; } +#nullable restore +#else + public string DismissalCommitId { get; set; } +#endif + /// The dismissal_message property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? DismissalMessage { get; set; } +#nullable restore +#else + public string DismissalMessage { get; set; } +#endif + /// The review_id property + public int? ReviewId { get; set; } + /// The state property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? State { get; set; } +#nullable restore +#else + public string State { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public ReviewDismissedIssueEvent_dismissed_review() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.ReviewDismissedIssueEvent_dismissed_review CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.ReviewDismissedIssueEvent_dismissed_review(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "dismissal_commit_id", n => { DismissalCommitId = n.GetStringValue(); } }, + { "dismissal_message", n => { DismissalMessage = n.GetStringValue(); } }, + { "review_id", n => { ReviewId = n.GetIntValue(); } }, + { "state", n => { State = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("dismissal_commit_id", DismissalCommitId); + writer.WriteStringValue("dismissal_message", DismissalMessage); + writer.WriteIntValue("review_id", ReviewId); + writer.WriteStringValue("state", State); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/ReviewRequestRemovedIssueEvent.cs b/src/Ayllu.Github.Client/Github/Client/Models/ReviewRequestRemovedIssueEvent.cs new file mode 100644 index 0000000..d154660 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/ReviewRequestRemovedIssueEvent.cs @@ -0,0 +1,170 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + /// + /// Review Request Removed Issue Event + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class ReviewRequestRemovedIssueEvent : IAdditionalDataHolder, IParsable + { + /// A GitHub user. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.SimpleUser? Actor { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.SimpleUser Actor { get; set; } +#endif + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The commit_id property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? CommitId { get; set; } +#nullable restore +#else + public string CommitId { get; set; } +#endif + /// The commit_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? CommitUrl { get; set; } +#nullable restore +#else + public string CommitUrl { get; set; } +#endif + /// The created_at property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? CreatedAt { get; set; } +#nullable restore +#else + public string CreatedAt { get; set; } +#endif + /// The event property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Event { get; set; } +#nullable restore +#else + public string Event { get; set; } +#endif + /// The id property + public int? Id { get; set; } + /// The node_id property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? NodeId { get; set; } +#nullable restore +#else + public string NodeId { get; set; } +#endif + /// 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. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.NullableIntegration? PerformedViaGithubApp { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.NullableIntegration PerformedViaGithubApp { get; set; } +#endif + /// A GitHub user. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.SimpleUser? RequestedReviewer { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.SimpleUser RequestedReviewer { get; set; } +#endif + /// Groups of organization members that gives permissions on specified repositories. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.Team? RequestedTeam { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.Team RequestedTeam { get; set; } +#endif + /// A GitHub user. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.SimpleUser? ReviewRequester { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.SimpleUser ReviewRequester { get; set; } +#endif + /// The url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Url { get; set; } +#nullable restore +#else + public string Url { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public ReviewRequestRemovedIssueEvent() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.ReviewRequestRemovedIssueEvent CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.ReviewRequestRemovedIssueEvent(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "actor", n => { Actor = n.GetObjectValue(global::Ayllu.Github.Client.Models.SimpleUser.CreateFromDiscriminatorValue); } }, + { "commit_id", n => { CommitId = n.GetStringValue(); } }, + { "commit_url", n => { CommitUrl = n.GetStringValue(); } }, + { "created_at", n => { CreatedAt = n.GetStringValue(); } }, + { "event", n => { Event = n.GetStringValue(); } }, + { "id", n => { Id = n.GetIntValue(); } }, + { "node_id", n => { NodeId = n.GetStringValue(); } }, + { "performed_via_github_app", n => { PerformedViaGithubApp = n.GetObjectValue(global::Ayllu.Github.Client.Models.NullableIntegration.CreateFromDiscriminatorValue); } }, + { "requested_reviewer", n => { RequestedReviewer = n.GetObjectValue(global::Ayllu.Github.Client.Models.SimpleUser.CreateFromDiscriminatorValue); } }, + { "requested_team", n => { RequestedTeam = n.GetObjectValue(global::Ayllu.Github.Client.Models.Team.CreateFromDiscriminatorValue); } }, + { "review_requester", n => { ReviewRequester = n.GetObjectValue(global::Ayllu.Github.Client.Models.SimpleUser.CreateFromDiscriminatorValue); } }, + { "url", n => { Url = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteObjectValue("actor", Actor); + writer.WriteStringValue("commit_id", CommitId); + writer.WriteStringValue("commit_url", CommitUrl); + writer.WriteStringValue("created_at", CreatedAt); + writer.WriteStringValue("event", Event); + writer.WriteIntValue("id", Id); + writer.WriteStringValue("node_id", NodeId); + writer.WriteObjectValue("performed_via_github_app", PerformedViaGithubApp); + writer.WriteObjectValue("requested_reviewer", RequestedReviewer); + writer.WriteObjectValue("requested_team", RequestedTeam); + writer.WriteObjectValue("review_requester", ReviewRequester); + writer.WriteStringValue("url", Url); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/ReviewRequestedIssueEvent.cs b/src/Ayllu.Github.Client/Github/Client/Models/ReviewRequestedIssueEvent.cs new file mode 100644 index 0000000..d340b43 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/ReviewRequestedIssueEvent.cs @@ -0,0 +1,170 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + /// + /// Review Requested Issue Event + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class ReviewRequestedIssueEvent : IAdditionalDataHolder, IParsable + { + /// A GitHub user. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.SimpleUser? Actor { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.SimpleUser Actor { get; set; } +#endif + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The commit_id property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? CommitId { get; set; } +#nullable restore +#else + public string CommitId { get; set; } +#endif + /// The commit_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? CommitUrl { get; set; } +#nullable restore +#else + public string CommitUrl { get; set; } +#endif + /// The created_at property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? CreatedAt { get; set; } +#nullable restore +#else + public string CreatedAt { get; set; } +#endif + /// The event property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Event { get; set; } +#nullable restore +#else + public string Event { get; set; } +#endif + /// The id property + public int? Id { get; set; } + /// The node_id property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? NodeId { get; set; } +#nullable restore +#else + public string NodeId { get; set; } +#endif + /// 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. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.NullableIntegration? PerformedViaGithubApp { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.NullableIntegration PerformedViaGithubApp { get; set; } +#endif + /// A GitHub user. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.SimpleUser? RequestedReviewer { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.SimpleUser RequestedReviewer { get; set; } +#endif + /// Groups of organization members that gives permissions on specified repositories. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.Team? RequestedTeam { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.Team RequestedTeam { get; set; } +#endif + /// A GitHub user. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.SimpleUser? ReviewRequester { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.SimpleUser ReviewRequester { get; set; } +#endif + /// The url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Url { get; set; } +#nullable restore +#else + public string Url { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public ReviewRequestedIssueEvent() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.ReviewRequestedIssueEvent CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.ReviewRequestedIssueEvent(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "actor", n => { Actor = n.GetObjectValue(global::Ayllu.Github.Client.Models.SimpleUser.CreateFromDiscriminatorValue); } }, + { "commit_id", n => { CommitId = n.GetStringValue(); } }, + { "commit_url", n => { CommitUrl = n.GetStringValue(); } }, + { "created_at", n => { CreatedAt = n.GetStringValue(); } }, + { "event", n => { Event = n.GetStringValue(); } }, + { "id", n => { Id = n.GetIntValue(); } }, + { "node_id", n => { NodeId = n.GetStringValue(); } }, + { "performed_via_github_app", n => { PerformedViaGithubApp = n.GetObjectValue(global::Ayllu.Github.Client.Models.NullableIntegration.CreateFromDiscriminatorValue); } }, + { "requested_reviewer", n => { RequestedReviewer = n.GetObjectValue(global::Ayllu.Github.Client.Models.SimpleUser.CreateFromDiscriminatorValue); } }, + { "requested_team", n => { RequestedTeam = n.GetObjectValue(global::Ayllu.Github.Client.Models.Team.CreateFromDiscriminatorValue); } }, + { "review_requester", n => { ReviewRequester = n.GetObjectValue(global::Ayllu.Github.Client.Models.SimpleUser.CreateFromDiscriminatorValue); } }, + { "url", n => { Url = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteObjectValue("actor", Actor); + writer.WriteStringValue("commit_id", CommitId); + writer.WriteStringValue("commit_url", CommitUrl); + writer.WriteStringValue("created_at", CreatedAt); + writer.WriteStringValue("event", Event); + writer.WriteIntValue("id", Id); + writer.WriteStringValue("node_id", NodeId); + writer.WriteObjectValue("performed_via_github_app", PerformedViaGithubApp); + writer.WriteObjectValue("requested_reviewer", RequestedReviewer); + writer.WriteObjectValue("requested_team", RequestedTeam); + writer.WriteObjectValue("review_requester", ReviewRequester); + writer.WriteStringValue("url", Url); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/Root.cs b/src/Ayllu.Github.Client/Github/Client/Models/Root.cs new file mode 100644 index 0000000..1699026 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/Root.cs @@ -0,0 +1,386 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class Root : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The authorizations_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? AuthorizationsUrl { get; set; } +#nullable restore +#else + public string AuthorizationsUrl { get; set; } +#endif + /// The code_search_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? CodeSearchUrl { get; set; } +#nullable restore +#else + public string CodeSearchUrl { get; set; } +#endif + /// The commit_search_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? CommitSearchUrl { get; set; } +#nullable restore +#else + public string CommitSearchUrl { get; set; } +#endif + /// The current_user_authorizations_html_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? CurrentUserAuthorizationsHtmlUrl { get; set; } +#nullable restore +#else + public string CurrentUserAuthorizationsHtmlUrl { get; set; } +#endif + /// The current_user_repositories_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? CurrentUserRepositoriesUrl { get; set; } +#nullable restore +#else + public string CurrentUserRepositoriesUrl { get; set; } +#endif + /// The current_user_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? CurrentUserUrl { get; set; } +#nullable restore +#else + public string CurrentUserUrl { get; set; } +#endif + /// The emails_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? EmailsUrl { get; set; } +#nullable restore +#else + public string EmailsUrl { get; set; } +#endif + /// The emojis_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? EmojisUrl { get; set; } +#nullable restore +#else + public string EmojisUrl { get; set; } +#endif + /// The events_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? EventsUrl { get; set; } +#nullable restore +#else + public string EventsUrl { get; set; } +#endif + /// The feeds_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? FeedsUrl { get; set; } +#nullable restore +#else + public string FeedsUrl { get; set; } +#endif + /// The followers_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? FollowersUrl { get; set; } +#nullable restore +#else + public string FollowersUrl { get; set; } +#endif + /// The following_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? FollowingUrl { get; set; } +#nullable restore +#else + public string FollowingUrl { get; set; } +#endif + /// The gists_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? GistsUrl { get; set; } +#nullable restore +#else + public string GistsUrl { get; set; } +#endif + /// The hub_url property + [Obsolete("")] +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? HubUrl { get; set; } +#nullable restore +#else + public string HubUrl { get; set; } +#endif + /// The issue_search_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? IssueSearchUrl { get; set; } +#nullable restore +#else + public string IssueSearchUrl { get; set; } +#endif + /// The issues_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? IssuesUrl { get; set; } +#nullable restore +#else + public string IssuesUrl { get; set; } +#endif + /// The keys_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? KeysUrl { get; set; } +#nullable restore +#else + public string KeysUrl { get; set; } +#endif + /// The label_search_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? LabelSearchUrl { get; set; } +#nullable restore +#else + public string LabelSearchUrl { get; set; } +#endif + /// The notifications_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? NotificationsUrl { get; set; } +#nullable restore +#else + public string NotificationsUrl { get; set; } +#endif + /// The organization_repositories_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? OrganizationRepositoriesUrl { get; set; } +#nullable restore +#else + public string OrganizationRepositoriesUrl { get; set; } +#endif + /// The organization_teams_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? OrganizationTeamsUrl { get; set; } +#nullable restore +#else + public string OrganizationTeamsUrl { get; set; } +#endif + /// The organization_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? OrganizationUrl { get; set; } +#nullable restore +#else + public string OrganizationUrl { get; set; } +#endif + /// The public_gists_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? PublicGistsUrl { get; set; } +#nullable restore +#else + public string PublicGistsUrl { get; set; } +#endif + /// The rate_limit_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? RateLimitUrl { get; set; } +#nullable restore +#else + public string RateLimitUrl { get; set; } +#endif + /// The repository_search_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? RepositorySearchUrl { get; set; } +#nullable restore +#else + public string RepositorySearchUrl { get; set; } +#endif + /// The repository_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? RepositoryUrl { get; set; } +#nullable restore +#else + public string RepositoryUrl { get; set; } +#endif + /// The starred_gists_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? StarredGistsUrl { get; set; } +#nullable restore +#else + public string StarredGistsUrl { get; set; } +#endif + /// The starred_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? StarredUrl { get; set; } +#nullable restore +#else + public string StarredUrl { get; set; } +#endif + /// The topic_search_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? TopicSearchUrl { get; set; } +#nullable restore +#else + public string TopicSearchUrl { get; set; } +#endif + /// The user_organizations_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? UserOrganizationsUrl { get; set; } +#nullable restore +#else + public string UserOrganizationsUrl { get; set; } +#endif + /// The user_repositories_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? UserRepositoriesUrl { get; set; } +#nullable restore +#else + public string UserRepositoriesUrl { get; set; } +#endif + /// The user_search_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? UserSearchUrl { get; set; } +#nullable restore +#else + public string UserSearchUrl { get; set; } +#endif + /// The user_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? UserUrl { get; set; } +#nullable restore +#else + public string UserUrl { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public Root() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.Root CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.Root(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "authorizations_url", n => { AuthorizationsUrl = n.GetStringValue(); } }, + { "code_search_url", n => { CodeSearchUrl = n.GetStringValue(); } }, + { "commit_search_url", n => { CommitSearchUrl = n.GetStringValue(); } }, + { "current_user_authorizations_html_url", n => { CurrentUserAuthorizationsHtmlUrl = n.GetStringValue(); } }, + { "current_user_repositories_url", n => { CurrentUserRepositoriesUrl = n.GetStringValue(); } }, + { "current_user_url", n => { CurrentUserUrl = n.GetStringValue(); } }, + { "emails_url", n => { EmailsUrl = n.GetStringValue(); } }, + { "emojis_url", n => { EmojisUrl = n.GetStringValue(); } }, + { "events_url", n => { EventsUrl = n.GetStringValue(); } }, + { "feeds_url", n => { FeedsUrl = n.GetStringValue(); } }, + { "followers_url", n => { FollowersUrl = n.GetStringValue(); } }, + { "following_url", n => { FollowingUrl = n.GetStringValue(); } }, + { "gists_url", n => { GistsUrl = n.GetStringValue(); } }, + { "hub_url", n => { HubUrl = n.GetStringValue(); } }, + { "issue_search_url", n => { IssueSearchUrl = n.GetStringValue(); } }, + { "issues_url", n => { IssuesUrl = n.GetStringValue(); } }, + { "keys_url", n => { KeysUrl = n.GetStringValue(); } }, + { "label_search_url", n => { LabelSearchUrl = n.GetStringValue(); } }, + { "notifications_url", n => { NotificationsUrl = n.GetStringValue(); } }, + { "organization_repositories_url", n => { OrganizationRepositoriesUrl = n.GetStringValue(); } }, + { "organization_teams_url", n => { OrganizationTeamsUrl = n.GetStringValue(); } }, + { "organization_url", n => { OrganizationUrl = n.GetStringValue(); } }, + { "public_gists_url", n => { PublicGistsUrl = n.GetStringValue(); } }, + { "rate_limit_url", n => { RateLimitUrl = n.GetStringValue(); } }, + { "repository_search_url", n => { RepositorySearchUrl = n.GetStringValue(); } }, + { "repository_url", n => { RepositoryUrl = n.GetStringValue(); } }, + { "starred_gists_url", n => { StarredGistsUrl = n.GetStringValue(); } }, + { "starred_url", n => { StarredUrl = n.GetStringValue(); } }, + { "topic_search_url", n => { TopicSearchUrl = n.GetStringValue(); } }, + { "user_organizations_url", n => { UserOrganizationsUrl = n.GetStringValue(); } }, + { "user_repositories_url", n => { UserRepositoriesUrl = n.GetStringValue(); } }, + { "user_search_url", n => { UserSearchUrl = n.GetStringValue(); } }, + { "user_url", n => { UserUrl = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("authorizations_url", AuthorizationsUrl); + writer.WriteStringValue("code_search_url", CodeSearchUrl); + writer.WriteStringValue("commit_search_url", CommitSearchUrl); + writer.WriteStringValue("current_user_authorizations_html_url", CurrentUserAuthorizationsHtmlUrl); + writer.WriteStringValue("current_user_repositories_url", CurrentUserRepositoriesUrl); + writer.WriteStringValue("current_user_url", CurrentUserUrl); + writer.WriteStringValue("emails_url", EmailsUrl); + writer.WriteStringValue("emojis_url", EmojisUrl); + writer.WriteStringValue("events_url", EventsUrl); + writer.WriteStringValue("feeds_url", FeedsUrl); + writer.WriteStringValue("followers_url", FollowersUrl); + writer.WriteStringValue("following_url", FollowingUrl); + writer.WriteStringValue("gists_url", GistsUrl); + writer.WriteStringValue("hub_url", HubUrl); + writer.WriteStringValue("issue_search_url", IssueSearchUrl); + writer.WriteStringValue("issues_url", IssuesUrl); + writer.WriteStringValue("keys_url", KeysUrl); + writer.WriteStringValue("label_search_url", LabelSearchUrl); + writer.WriteStringValue("notifications_url", NotificationsUrl); + writer.WriteStringValue("organization_repositories_url", OrganizationRepositoriesUrl); + writer.WriteStringValue("organization_teams_url", OrganizationTeamsUrl); + writer.WriteStringValue("organization_url", OrganizationUrl); + writer.WriteStringValue("public_gists_url", PublicGistsUrl); + writer.WriteStringValue("rate_limit_url", RateLimitUrl); + writer.WriteStringValue("repository_search_url", RepositorySearchUrl); + writer.WriteStringValue("repository_url", RepositoryUrl); + writer.WriteStringValue("starred_gists_url", StarredGistsUrl); + writer.WriteStringValue("starred_url", StarredUrl); + writer.WriteStringValue("topic_search_url", TopicSearchUrl); + writer.WriteStringValue("user_organizations_url", UserOrganizationsUrl); + writer.WriteStringValue("user_repositories_url", UserRepositoriesUrl); + writer.WriteStringValue("user_search_url", UserSearchUrl); + writer.WriteStringValue("user_url", UserUrl); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/RuleSuite.cs b/src/Ayllu.Github.Client/Github/Client/Models/RuleSuite.cs new file mode 100644 index 0000000..cdc51ea --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/RuleSuite.cs @@ -0,0 +1,140 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + /// + /// Response + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class RuleSuite : IAdditionalDataHolder, IParsable + { + /// The number that identifies the user. + public int? ActorId { get; set; } + /// The handle for the GitHub user account. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? ActorName { get; set; } +#nullable restore +#else + public string ActorName { get; set; } +#endif + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The last commit sha in the push evaluation. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? AfterSha { get; set; } +#nullable restore +#else + public string AfterSha { get; set; } +#endif + /// The first commit sha before the push evaluation. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? BeforeSha { get; set; } +#nullable restore +#else + public string BeforeSha { get; set; } +#endif + /// 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`. Null if no rules with `evaluate` enforcement status were run. + public global::Ayllu.Github.Client.Models.RuleSuite_evaluation_result? EvaluationResult { get; set; } + /// The unique identifier of the rule insight. + public int? Id { get; set; } + /// The pushed_at property + public DateTimeOffset? PushedAt { get; set; } + /// The ref name that the evaluation ran on. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Ref { get; set; } +#nullable restore +#else + public string Ref { get; set; } +#endif + /// The ID of the repository associated with the rule evaluation. + public int? RepositoryId { get; set; } + /// The name of the repository without the `.git` extension. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? RepositoryName { get; set; } +#nullable restore +#else + public string RepositoryName { get; set; } +#endif + /// The result of the rule evaluations for rules with the `active` enforcement status. + public global::Ayllu.Github.Client.Models.RuleSuite_result? Result { get; set; } + /// Details on the evaluated rules. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? RuleEvaluations { get; set; } +#nullable restore +#else + public List RuleEvaluations { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public RuleSuite() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.RuleSuite CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.RuleSuite(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "actor_id", n => { ActorId = n.GetIntValue(); } }, + { "actor_name", n => { ActorName = n.GetStringValue(); } }, + { "after_sha", n => { AfterSha = n.GetStringValue(); } }, + { "before_sha", n => { BeforeSha = n.GetStringValue(); } }, + { "evaluation_result", n => { EvaluationResult = n.GetEnumValue(); } }, + { "id", n => { Id = n.GetIntValue(); } }, + { "pushed_at", n => { PushedAt = n.GetDateTimeOffsetValue(); } }, + { "ref", n => { Ref = n.GetStringValue(); } }, + { "repository_id", n => { RepositoryId = n.GetIntValue(); } }, + { "repository_name", n => { RepositoryName = n.GetStringValue(); } }, + { "result", n => { Result = n.GetEnumValue(); } }, + { "rule_evaluations", n => { RuleEvaluations = n.GetCollectionOfObjectValues(global::Ayllu.Github.Client.Models.RuleSuite_rule_evaluations.CreateFromDiscriminatorValue)?.AsList(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteIntValue("actor_id", ActorId); + writer.WriteStringValue("actor_name", ActorName); + writer.WriteStringValue("after_sha", AfterSha); + writer.WriteStringValue("before_sha", BeforeSha); + writer.WriteEnumValue("evaluation_result", EvaluationResult); + writer.WriteIntValue("id", Id); + writer.WriteDateTimeOffsetValue("pushed_at", PushedAt); + writer.WriteStringValue("ref", Ref); + writer.WriteIntValue("repository_id", RepositoryId); + writer.WriteStringValue("repository_name", RepositoryName); + writer.WriteEnumValue("result", Result); + writer.WriteCollectionOfObjectValues("rule_evaluations", RuleEvaluations); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/RuleSuite_evaluation_result.cs b/src/Ayllu.Github.Client/Github/Client/Models/RuleSuite_evaluation_result.cs new file mode 100644 index 0000000..0966b54 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/RuleSuite_evaluation_result.cs @@ -0,0 +1,23 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Models +{ + /// 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`. Null if no rules with `evaluate` enforcement status were run. + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public enum RuleSuite_evaluation_result + { + [EnumMember(Value = "pass")] + #pragma warning disable CS1591 + Pass, + #pragma warning restore CS1591 + [EnumMember(Value = "fail")] + #pragma warning disable CS1591 + Fail, + #pragma warning restore CS1591 + [EnumMember(Value = "bypass")] + #pragma warning disable CS1591 + Bypass, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Models/RuleSuite_result.cs b/src/Ayllu.Github.Client/Github/Client/Models/RuleSuite_result.cs new file mode 100644 index 0000000..472580b --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/RuleSuite_result.cs @@ -0,0 +1,23 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Models +{ + /// The result of the rule evaluations for rules with the `active` enforcement status. + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public enum RuleSuite_result + { + [EnumMember(Value = "pass")] + #pragma warning disable CS1591 + Pass, + #pragma warning restore CS1591 + [EnumMember(Value = "fail")] + #pragma warning disable CS1591 + Fail, + #pragma warning restore CS1591 + [EnumMember(Value = "bypass")] + #pragma warning disable CS1591 + Bypass, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Models/RuleSuite_rule_evaluations.cs b/src/Ayllu.Github.Client/Github/Client/Models/RuleSuite_rule_evaluations.cs new file mode 100644 index 0000000..bb9310f --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/RuleSuite_rule_evaluations.cs @@ -0,0 +1,93 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class RuleSuite_rule_evaluations : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The detailed failure message for the rule. Null if the rule passed. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Details { get; set; } +#nullable restore +#else + public string Details { get; set; } +#endif + /// The enforcement level of this rule source. + public global::Ayllu.Github.Client.Models.RuleSuite_rule_evaluations_enforcement? Enforcement { get; set; } + /// The result of the evaluation of the individual rule. + public global::Ayllu.Github.Client.Models.RuleSuite_rule_evaluations_result? Result { get; set; } + /// The rule_source property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.RuleSuite_rule_evaluations_rule_source? RuleSource { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.RuleSuite_rule_evaluations_rule_source RuleSource { get; set; } +#endif + /// The type of rule. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? RuleType { get; set; } +#nullable restore +#else + public string RuleType { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public RuleSuite_rule_evaluations() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.RuleSuite_rule_evaluations CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.RuleSuite_rule_evaluations(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "details", n => { Details = n.GetStringValue(); } }, + { "enforcement", n => { Enforcement = n.GetEnumValue(); } }, + { "result", n => { Result = n.GetEnumValue(); } }, + { "rule_source", n => { RuleSource = n.GetObjectValue(global::Ayllu.Github.Client.Models.RuleSuite_rule_evaluations_rule_source.CreateFromDiscriminatorValue); } }, + { "rule_type", n => { RuleType = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("details", Details); + writer.WriteEnumValue("enforcement", Enforcement); + writer.WriteEnumValue("result", Result); + writer.WriteObjectValue("rule_source", RuleSource); + writer.WriteStringValue("rule_type", RuleType); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/RuleSuite_rule_evaluations_enforcement.cs b/src/Ayllu.Github.Client/Github/Client/Models/RuleSuite_rule_evaluations_enforcement.cs new file mode 100644 index 0000000..f1e3df0 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/RuleSuite_rule_evaluations_enforcement.cs @@ -0,0 +1,23 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Models +{ + /// The enforcement level of this rule source. + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public enum RuleSuite_rule_evaluations_enforcement + { + [EnumMember(Value = "active")] + #pragma warning disable CS1591 + Active, + #pragma warning restore CS1591 + [EnumMember(Value = "evaluate")] + #pragma warning disable CS1591 + Evaluate, + #pragma warning restore CS1591 + [EnumMember(Value = "deleted ruleset")] + #pragma warning disable CS1591 + DeletedRuleset, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Models/RuleSuite_rule_evaluations_result.cs b/src/Ayllu.Github.Client/Github/Client/Models/RuleSuite_rule_evaluations_result.cs new file mode 100644 index 0000000..a15d3c5 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/RuleSuite_rule_evaluations_result.cs @@ -0,0 +1,19 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Models +{ + /// The result of the evaluation of the individual rule. + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public enum RuleSuite_rule_evaluations_result + { + [EnumMember(Value = "pass")] + #pragma warning disable CS1591 + Pass, + #pragma warning restore CS1591 + [EnumMember(Value = "fail")] + #pragma warning disable CS1591 + Fail, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Models/RuleSuite_rule_evaluations_rule_source.cs b/src/Ayllu.Github.Client/Github/Client/Models/RuleSuite_rule_evaluations_rule_source.cs new file mode 100644 index 0000000..770fada --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/RuleSuite_rule_evaluations_rule_source.cs @@ -0,0 +1,79 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class RuleSuite_rule_evaluations_rule_source : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The ID of the rule source. + public int? Id { get; set; } + /// The name of the rule source. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Name { get; set; } +#nullable restore +#else + public string Name { get; set; } +#endif + /// The type of rule source. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Type { get; set; } +#nullable restore +#else + public string Type { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public RuleSuite_rule_evaluations_rule_source() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.RuleSuite_rule_evaluations_rule_source CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.RuleSuite_rule_evaluations_rule_source(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "id", n => { Id = n.GetIntValue(); } }, + { "name", n => { Name = n.GetStringValue(); } }, + { "type", n => { Type = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteIntValue("id", Id); + writer.WriteStringValue("name", Name); + writer.WriteStringValue("type", Type); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/RuleSuites.cs b/src/Ayllu.Github.Client/Github/Client/Models/RuleSuites.cs new file mode 100644 index 0000000..c158725 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/RuleSuites.cs @@ -0,0 +1,129 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class RuleSuites : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// The number that identifies the user. + public int? ActorId { get; set; } + /// The handle for the GitHub user account. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? ActorName { get; set; } +#nullable restore +#else + public string ActorName { get; set; } +#endif + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The last commit sha in the push evaluation. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? AfterSha { get; set; } +#nullable restore +#else + public string AfterSha { get; set; } +#endif + /// The first commit sha before the push evaluation. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? BeforeSha { get; set; } +#nullable restore +#else + public string BeforeSha { get; set; } +#endif + /// 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`. + public global::Ayllu.Github.Client.Models.RuleSuites_evaluation_result? EvaluationResult { get; set; } + /// The unique identifier of the rule insight. + public int? Id { get; set; } + /// The pushed_at property + public DateTimeOffset? PushedAt { get; set; } + /// The ref name that the evaluation ran on. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Ref { get; set; } +#nullable restore +#else + public string Ref { get; set; } +#endif + /// The ID of the repository associated with the rule evaluation. + public int? RepositoryId { get; set; } + /// The name of the repository without the `.git` extension. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? RepositoryName { get; set; } +#nullable restore +#else + public string RepositoryName { get; set; } +#endif + /// The result of the rule evaluations for rules with the `active` enforcement status. + public global::Ayllu.Github.Client.Models.RuleSuites_result? Result { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public RuleSuites() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.RuleSuites CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.RuleSuites(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "actor_id", n => { ActorId = n.GetIntValue(); } }, + { "actor_name", n => { ActorName = n.GetStringValue(); } }, + { "after_sha", n => { AfterSha = n.GetStringValue(); } }, + { "before_sha", n => { BeforeSha = n.GetStringValue(); } }, + { "evaluation_result", n => { EvaluationResult = n.GetEnumValue(); } }, + { "id", n => { Id = n.GetIntValue(); } }, + { "pushed_at", n => { PushedAt = n.GetDateTimeOffsetValue(); } }, + { "ref", n => { Ref = n.GetStringValue(); } }, + { "repository_id", n => { RepositoryId = n.GetIntValue(); } }, + { "repository_name", n => { RepositoryName = n.GetStringValue(); } }, + { "result", n => { Result = n.GetEnumValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteIntValue("actor_id", ActorId); + writer.WriteStringValue("actor_name", ActorName); + writer.WriteStringValue("after_sha", AfterSha); + writer.WriteStringValue("before_sha", BeforeSha); + writer.WriteEnumValue("evaluation_result", EvaluationResult); + writer.WriteIntValue("id", Id); + writer.WriteDateTimeOffsetValue("pushed_at", PushedAt); + writer.WriteStringValue("ref", Ref); + writer.WriteIntValue("repository_id", RepositoryId); + writer.WriteStringValue("repository_name", RepositoryName); + writer.WriteEnumValue("result", Result); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/RuleSuites_evaluation_result.cs b/src/Ayllu.Github.Client/Github/Client/Models/RuleSuites_evaluation_result.cs new file mode 100644 index 0000000..62265f1 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/RuleSuites_evaluation_result.cs @@ -0,0 +1,23 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Models +{ + /// 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`. + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public enum RuleSuites_evaluation_result + { + [EnumMember(Value = "pass")] + #pragma warning disable CS1591 + Pass, + #pragma warning restore CS1591 + [EnumMember(Value = "fail")] + #pragma warning disable CS1591 + Fail, + #pragma warning restore CS1591 + [EnumMember(Value = "bypass")] + #pragma warning disable CS1591 + Bypass, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Models/RuleSuites_result.cs b/src/Ayllu.Github.Client/Github/Client/Models/RuleSuites_result.cs new file mode 100644 index 0000000..8970400 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/RuleSuites_result.cs @@ -0,0 +1,23 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Models +{ + /// The result of the rule evaluations for rules with the `active` enforcement status. + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public enum RuleSuites_result + { + [EnumMember(Value = "pass")] + #pragma warning disable CS1591 + Pass, + #pragma warning restore CS1591 + [EnumMember(Value = "fail")] + #pragma warning disable CS1591 + Fail, + #pragma warning restore CS1591 + [EnumMember(Value = "bypass")] + #pragma warning disable CS1591 + Bypass, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Models/RulesetVersion.cs b/src/Ayllu.Github.Client/Github/Client/Models/RulesetVersion.cs new file mode 100644 index 0000000..bc7cf74 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/RulesetVersion.cs @@ -0,0 +1,74 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + /// + /// The historical version of a ruleset + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class RulesetVersion : IAdditionalDataHolder, IParsable + { + /// The actor who updated the ruleset +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.RulesetVersion_actor? Actor { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.RulesetVersion_actor Actor { get; set; } +#endif + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The updated_at property + public DateTimeOffset? UpdatedAt { get; set; } + /// The ID of the previous version of the ruleset + public int? VersionId { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public RulesetVersion() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.RulesetVersion CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.RulesetVersion(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "actor", n => { Actor = n.GetObjectValue(global::Ayllu.Github.Client.Models.RulesetVersion_actor.CreateFromDiscriminatorValue); } }, + { "updated_at", n => { UpdatedAt = n.GetDateTimeOffsetValue(); } }, + { "version_id", n => { VersionId = n.GetIntValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteObjectValue("actor", Actor); + writer.WriteDateTimeOffsetValue("updated_at", UpdatedAt); + writer.WriteIntValue("version_id", VersionId); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/RulesetVersionWithState.cs b/src/Ayllu.Github.Client/Github/Client/Models/RulesetVersionWithState.cs new file mode 100644 index 0000000..ff0f182 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/RulesetVersionWithState.cs @@ -0,0 +1,56 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class RulesetVersionWithState : global::Ayllu.Github.Client.Models.RulesetVersion, IParsable + #pragma warning restore CS1591 + { + /// The state of the ruleset version +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.RulesetVersionWithState_state? State { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.RulesetVersionWithState_state State { get; set; } +#endif + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static new global::Ayllu.Github.Client.Models.RulesetVersionWithState CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.RulesetVersionWithState(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public override IDictionary> GetFieldDeserializers() + { + return new Dictionary>(base.GetFieldDeserializers()) + { + { "state", n => { State = n.GetObjectValue(global::Ayllu.Github.Client.Models.RulesetVersionWithState_state.CreateFromDiscriminatorValue); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public override void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + base.Serialize(writer); + writer.WriteObjectValue("state", State); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/RulesetVersionWithState_state.cs b/src/Ayllu.Github.Client/Github/Client/Models/RulesetVersionWithState_state.cs new file mode 100644 index 0000000..5e766ae --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/RulesetVersionWithState_state.cs @@ -0,0 +1,56 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + /// + /// The state of the ruleset version + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class RulesetVersionWithState_state : IAdditionalDataHolder, IParsable + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public RulesetVersionWithState_state() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.RulesetVersionWithState_state CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.RulesetVersionWithState_state(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/RulesetVersion_actor.cs b/src/Ayllu.Github.Client/Github/Client/Models/RulesetVersion_actor.cs new file mode 100644 index 0000000..c543a90 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/RulesetVersion_actor.cs @@ -0,0 +1,70 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + /// + /// The actor who updated the ruleset + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class RulesetVersion_actor : IAdditionalDataHolder, IParsable + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The id property + public int? Id { get; set; } + /// The type property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Type { get; set; } +#nullable restore +#else + public string Type { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public RulesetVersion_actor() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.RulesetVersion_actor CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.RulesetVersion_actor(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "id", n => { Id = n.GetIntValue(); } }, + { "type", n => { Type = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteIntValue("id", Id); + writer.WriteStringValue("type", Type); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/Runner.cs b/src/Ayllu.Github.Client/Github/Client/Models/Runner.cs new file mode 100644 index 0000000..aaa6116 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/Runner.cs @@ -0,0 +1,112 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + /// + /// A self hosted runner + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class Runner : IAdditionalDataHolder, IParsable + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The busy property + public bool? Busy { get; set; } + /// The ephemeral property + public bool? Ephemeral { get; set; } + /// The ID of the runner. + public int? Id { get; set; } + /// The labels property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? Labels { get; set; } +#nullable restore +#else + public List Labels { get; set; } +#endif + /// The name of the runner. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Name { get; set; } +#nullable restore +#else + public string Name { get; set; } +#endif + /// The Operating System of the runner. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Os { get; set; } +#nullable restore +#else + public string Os { get; set; } +#endif + /// The ID of the runner group. + public int? RunnerGroupId { get; set; } + /// The status of the runner. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Status { get; set; } +#nullable restore +#else + public string Status { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public Runner() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.Runner CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.Runner(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "busy", n => { Busy = n.GetBoolValue(); } }, + { "ephemeral", n => { Ephemeral = n.GetBoolValue(); } }, + { "id", n => { Id = n.GetIntValue(); } }, + { "labels", n => { Labels = n.GetCollectionOfObjectValues(global::Ayllu.Github.Client.Models.RunnerLabel.CreateFromDiscriminatorValue)?.AsList(); } }, + { "name", n => { Name = n.GetStringValue(); } }, + { "os", n => { Os = n.GetStringValue(); } }, + { "runner_group_id", n => { RunnerGroupId = n.GetIntValue(); } }, + { "status", n => { Status = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteBoolValue("busy", Busy); + writer.WriteBoolValue("ephemeral", Ephemeral); + writer.WriteIntValue("id", Id); + writer.WriteCollectionOfObjectValues("labels", Labels); + writer.WriteStringValue("name", Name); + writer.WriteStringValue("os", Os); + writer.WriteIntValue("runner_group_id", RunnerGroupId); + writer.WriteStringValue("status", Status); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/RunnerApplication.cs b/src/Ayllu.Github.Client/Github/Client/Models/RunnerApplication.cs new file mode 100644 index 0000000..478fd14 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/RunnerApplication.cs @@ -0,0 +1,116 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + /// + /// Runner Application + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class RunnerApplication : IAdditionalDataHolder, IParsable + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The architecture property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Architecture { get; set; } +#nullable restore +#else + public string Architecture { get; set; } +#endif + /// The download_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? DownloadUrl { get; set; } +#nullable restore +#else + public string DownloadUrl { get; set; } +#endif + /// The filename property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Filename { get; set; } +#nullable restore +#else + public string Filename { get; set; } +#endif + /// The os property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Os { get; set; } +#nullable restore +#else + public string Os { get; set; } +#endif + /// The sha256_checksum property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Sha256Checksum { get; set; } +#nullable restore +#else + public string Sha256Checksum { get; set; } +#endif + /// A short lived bearer token used to download the runner, if needed. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? TempDownloadToken { get; set; } +#nullable restore +#else + public string TempDownloadToken { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public RunnerApplication() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.RunnerApplication CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.RunnerApplication(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "architecture", n => { Architecture = n.GetStringValue(); } }, + { "download_url", n => { DownloadUrl = n.GetStringValue(); } }, + { "filename", n => { Filename = n.GetStringValue(); } }, + { "os", n => { Os = n.GetStringValue(); } }, + { "sha256_checksum", n => { Sha256Checksum = n.GetStringValue(); } }, + { "temp_download_token", n => { TempDownloadToken = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("architecture", Architecture); + writer.WriteStringValue("download_url", DownloadUrl); + writer.WriteStringValue("filename", Filename); + writer.WriteStringValue("os", Os); + writer.WriteStringValue("sha256_checksum", Sha256Checksum); + writer.WriteStringValue("temp_download_token", TempDownloadToken); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/RunnerGroupsOrg.cs b/src/Ayllu.Github.Client/Github/Client/Models/RunnerGroupsOrg.cs new file mode 100644 index 0000000..85393b9 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/RunnerGroupsOrg.cs @@ -0,0 +1,153 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class RunnerGroupsOrg : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The allows_public_repositories property + public bool? AllowsPublicRepositories { get; set; } + /// The default property + public bool? Default { get; set; } + /// The hosted_runners_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? HostedRunnersUrl { get; set; } +#nullable restore +#else + public string HostedRunnersUrl { get; set; } +#endif + /// The id property + public double? Id { get; set; } + /// The inherited property + public bool? Inherited { get; set; } + /// The inherited_allows_public_repositories property + public bool? InheritedAllowsPublicRepositories { get; set; } + /// The name property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Name { get; set; } +#nullable restore +#else + public string Name { get; set; } +#endif + /// The identifier of a hosted compute network configuration. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? NetworkConfigurationId { get; set; } +#nullable restore +#else + public string NetworkConfigurationId { get; set; } +#endif + /// If `true`, the runner group will be restricted to running only the workflows specified in the `selected_workflows` array. + public bool? RestrictedToWorkflows { get; set; } + /// The runners_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? RunnersUrl { get; set; } +#nullable restore +#else + public string RunnersUrl { get; set; } +#endif + /// Link to the selected repositories resource for this runner group. Not present unless visibility was set to `selected` +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? SelectedRepositoriesUrl { get; set; } +#nullable restore +#else + public string SelectedRepositoriesUrl { get; set; } +#endif + /// List of workflows the runner group should be allowed to run. This setting will be ignored unless `restricted_to_workflows` is set to `true`. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? SelectedWorkflows { get; set; } +#nullable restore +#else + public List SelectedWorkflows { get; set; } +#endif + /// The visibility property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Visibility { get; set; } +#nullable restore +#else + public string Visibility { get; set; } +#endif + /// If `true`, the `restricted_to_workflows` and `selected_workflows` fields cannot be modified. + public bool? WorkflowRestrictionsReadOnly { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public RunnerGroupsOrg() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.RunnerGroupsOrg CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.RunnerGroupsOrg(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "allows_public_repositories", n => { AllowsPublicRepositories = n.GetBoolValue(); } }, + { "default", n => { Default = n.GetBoolValue(); } }, + { "hosted_runners_url", n => { HostedRunnersUrl = n.GetStringValue(); } }, + { "id", n => { Id = n.GetDoubleValue(); } }, + { "inherited", n => { Inherited = n.GetBoolValue(); } }, + { "inherited_allows_public_repositories", n => { InheritedAllowsPublicRepositories = n.GetBoolValue(); } }, + { "name", n => { Name = n.GetStringValue(); } }, + { "network_configuration_id", n => { NetworkConfigurationId = n.GetStringValue(); } }, + { "restricted_to_workflows", n => { RestrictedToWorkflows = n.GetBoolValue(); } }, + { "runners_url", n => { RunnersUrl = n.GetStringValue(); } }, + { "selected_repositories_url", n => { SelectedRepositoriesUrl = n.GetStringValue(); } }, + { "selected_workflows", n => { SelectedWorkflows = n.GetCollectionOfPrimitiveValues()?.AsList(); } }, + { "visibility", n => { Visibility = n.GetStringValue(); } }, + { "workflow_restrictions_read_only", n => { WorkflowRestrictionsReadOnly = n.GetBoolValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteBoolValue("allows_public_repositories", AllowsPublicRepositories); + writer.WriteBoolValue("default", Default); + writer.WriteStringValue("hosted_runners_url", HostedRunnersUrl); + writer.WriteDoubleValue("id", Id); + writer.WriteBoolValue("inherited", Inherited); + writer.WriteBoolValue("inherited_allows_public_repositories", InheritedAllowsPublicRepositories); + writer.WriteStringValue("name", Name); + writer.WriteStringValue("network_configuration_id", NetworkConfigurationId); + writer.WriteBoolValue("restricted_to_workflows", RestrictedToWorkflows); + writer.WriteStringValue("runners_url", RunnersUrl); + writer.WriteStringValue("selected_repositories_url", SelectedRepositoriesUrl); + writer.WriteCollectionOfPrimitiveValues("selected_workflows", SelectedWorkflows); + writer.WriteStringValue("visibility", Visibility); + writer.WriteBoolValue("workflow_restrictions_read_only", WorkflowRestrictionsReadOnly); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/RunnerLabel.cs b/src/Ayllu.Github.Client/Github/Client/Models/RunnerLabel.cs new file mode 100644 index 0000000..04fc4b8 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/RunnerLabel.cs @@ -0,0 +1,74 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + /// + /// A label for a self hosted runner + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class RunnerLabel : IAdditionalDataHolder, IParsable + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// Unique identifier of the label. + public int? Id { get; set; } + /// Name of the label. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Name { get; set; } +#nullable restore +#else + public string Name { get; set; } +#endif + /// The type of label. Read-only labels are applied automatically when the runner is configured. + public global::Ayllu.Github.Client.Models.RunnerLabel_type? Type { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public RunnerLabel() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.RunnerLabel CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.RunnerLabel(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "id", n => { Id = n.GetIntValue(); } }, + { "name", n => { Name = n.GetStringValue(); } }, + { "type", n => { Type = n.GetEnumValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteIntValue("id", Id); + writer.WriteStringValue("name", Name); + writer.WriteEnumValue("type", Type); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/RunnerLabel_type.cs b/src/Ayllu.Github.Client/Github/Client/Models/RunnerLabel_type.cs new file mode 100644 index 0000000..c01b5b7 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/RunnerLabel_type.cs @@ -0,0 +1,19 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Models +{ + /// The type of label. Read-only labels are applied automatically when the runner is configured. + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public enum RunnerLabel_type + { + [EnumMember(Value = "read-only")] + #pragma warning disable CS1591 + ReadOnly, + #pragma warning restore CS1591 + [EnumMember(Value = "custom")] + #pragma warning disable CS1591 + Custom, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Models/SecretScanningAlert.cs b/src/Ayllu.Github.Client/Github/Client/Models/SecretScanningAlert.cs new file mode 100644 index 0000000..79abc8c --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/SecretScanningAlert.cs @@ -0,0 +1,242 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class SecretScanningAlert : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The time that the alert was created in ISO 8601 format: `YYYY-MM-DDTHH:MM:SSZ`. + public DateTimeOffset? CreatedAt { get; private set; } + /// Details on the location where the token was initially detected. This can be a commit, wiki commit, issue, discussion, pull request. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.NullableSecretScanningFirstDetectedLocation? FirstLocationDetected { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.NullableSecretScanningFirstDetectedLocation FirstLocationDetected { get; set; } +#endif + /// A boolean value representing whether or not the token in the alert was detected in more than one location. + public bool? HasMoreLocations { get; set; } + /// The GitHub URL of the alert resource. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? HtmlUrl { get; private set; } +#nullable restore +#else + public string HtmlUrl { get; private set; } +#endif + /// A boolean value representing whether or not alert is base64 encoded + public bool? IsBase64Encoded { get; set; } + /// The REST API URL of the code locations for this alert. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? LocationsUrl { get; set; } +#nullable restore +#else + public string LocationsUrl { get; set; } +#endif + /// Whether the detected secret was found in multiple repositories under the same organization or enterprise. + public bool? MultiRepo { get; set; } + /// The security alert number. + public int? Number { get; private set; } + /// Whether the detected secret was publicly leaked. + public bool? PubliclyLeaked { get; set; } + /// Whether push protection was bypassed for the detected secret. + public bool? PushProtectionBypassed { get; set; } + /// The time that push protection was bypassed in ISO 8601 format: `YYYY-MM-DDTHH:MM:SSZ`. + public DateTimeOffset? PushProtectionBypassedAt { get; set; } + /// A GitHub user. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.NullableSimpleUser? PushProtectionBypassedBy { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.NullableSimpleUser PushProtectionBypassedBy { get; set; } +#endif + /// An optional comment when requesting a push protection bypass. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? PushProtectionBypassRequestComment { get; set; } +#nullable restore +#else + public string PushProtectionBypassRequestComment { get; set; } +#endif + /// The URL to a push protection bypass request. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? PushProtectionBypassRequestHtmlUrl { get; set; } +#nullable restore +#else + public string PushProtectionBypassRequestHtmlUrl { get; set; } +#endif + /// A GitHub user. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.NullableSimpleUser? PushProtectionBypassRequestReviewer { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.NullableSimpleUser PushProtectionBypassRequestReviewer { get; set; } +#endif + /// An optional comment when reviewing a push protection bypass. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? PushProtectionBypassRequestReviewerComment { get; set; } +#nullable restore +#else + public string PushProtectionBypassRequestReviewerComment { get; set; } +#endif + /// **Required when the `state` is `resolved`.** The reason for resolving the alert. + public global::Ayllu.Github.Client.Models.SecretScanningAlertResolution? Resolution { get; set; } + /// An optional comment to resolve an alert. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? ResolutionComment { get; set; } +#nullable restore +#else + public string ResolutionComment { get; set; } +#endif + /// The time that the alert was resolved in ISO 8601 format: `YYYY-MM-DDTHH:MM:SSZ`. + public DateTimeOffset? ResolvedAt { get; set; } + /// A GitHub user. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.NullableSimpleUser? ResolvedBy { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.NullableSimpleUser ResolvedBy { get; set; } +#endif + /// The secret that was detected. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Secret { get; set; } +#nullable restore +#else + public string Secret { get; set; } +#endif + /// The type of secret that secret scanning detected. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? SecretType { get; set; } +#nullable restore +#else + public string SecretType { get; set; } +#endif + /// User-friendly name for the detected secret, matching the `secret_type`.For a list of built-in patterns, see "[Supported secret scanning patterns](https://docs.github.com/code-security/secret-scanning/introduction/supported-secret-scanning-patterns#supported-secrets)." +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? SecretTypeDisplayName { get; set; } +#nullable restore +#else + public string SecretTypeDisplayName { get; set; } +#endif + /// Sets the state of the secret scanning alert. You must provide `resolution` when you set the state to `resolved`. + public global::Ayllu.Github.Client.Models.SecretScanningAlertState? State { get; set; } + /// The time that the alert was last updated in ISO 8601 format: `YYYY-MM-DDTHH:MM:SSZ`. + public DateTimeOffset? UpdatedAt { get; private set; } + /// The REST API URL of the alert resource. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Url { get; private set; } +#nullable restore +#else + public string Url { get; private set; } +#endif + /// The token status as of the latest validity check. + public global::Ayllu.Github.Client.Models.SecretScanningAlert_validity? Validity { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public SecretScanningAlert() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.SecretScanningAlert CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.SecretScanningAlert(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "created_at", n => { CreatedAt = n.GetDateTimeOffsetValue(); } }, + { "first_location_detected", n => { FirstLocationDetected = n.GetObjectValue(global::Ayllu.Github.Client.Models.NullableSecretScanningFirstDetectedLocation.CreateFromDiscriminatorValue); } }, + { "has_more_locations", n => { HasMoreLocations = n.GetBoolValue(); } }, + { "html_url", n => { HtmlUrl = n.GetStringValue(); } }, + { "is_base64_encoded", n => { IsBase64Encoded = n.GetBoolValue(); } }, + { "locations_url", n => { LocationsUrl = n.GetStringValue(); } }, + { "multi_repo", n => { MultiRepo = n.GetBoolValue(); } }, + { "number", n => { Number = n.GetIntValue(); } }, + { "publicly_leaked", n => { PubliclyLeaked = n.GetBoolValue(); } }, + { "push_protection_bypass_request_comment", n => { PushProtectionBypassRequestComment = n.GetStringValue(); } }, + { "push_protection_bypass_request_html_url", n => { PushProtectionBypassRequestHtmlUrl = n.GetStringValue(); } }, + { "push_protection_bypass_request_reviewer", n => { PushProtectionBypassRequestReviewer = n.GetObjectValue(global::Ayllu.Github.Client.Models.NullableSimpleUser.CreateFromDiscriminatorValue); } }, + { "push_protection_bypass_request_reviewer_comment", n => { PushProtectionBypassRequestReviewerComment = n.GetStringValue(); } }, + { "push_protection_bypassed", n => { PushProtectionBypassed = n.GetBoolValue(); } }, + { "push_protection_bypassed_at", n => { PushProtectionBypassedAt = n.GetDateTimeOffsetValue(); } }, + { "push_protection_bypassed_by", n => { PushProtectionBypassedBy = n.GetObjectValue(global::Ayllu.Github.Client.Models.NullableSimpleUser.CreateFromDiscriminatorValue); } }, + { "resolution", n => { Resolution = n.GetEnumValue(); } }, + { "resolution_comment", n => { ResolutionComment = n.GetStringValue(); } }, + { "resolved_at", n => { ResolvedAt = n.GetDateTimeOffsetValue(); } }, + { "resolved_by", n => { ResolvedBy = n.GetObjectValue(global::Ayllu.Github.Client.Models.NullableSimpleUser.CreateFromDiscriminatorValue); } }, + { "secret", n => { Secret = n.GetStringValue(); } }, + { "secret_type", n => { SecretType = n.GetStringValue(); } }, + { "secret_type_display_name", n => { SecretTypeDisplayName = n.GetStringValue(); } }, + { "state", n => { State = n.GetEnumValue(); } }, + { "updated_at", n => { UpdatedAt = n.GetDateTimeOffsetValue(); } }, + { "url", n => { Url = n.GetStringValue(); } }, + { "validity", n => { Validity = n.GetEnumValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteObjectValue("first_location_detected", FirstLocationDetected); + writer.WriteBoolValue("has_more_locations", HasMoreLocations); + writer.WriteBoolValue("is_base64_encoded", IsBase64Encoded); + writer.WriteStringValue("locations_url", LocationsUrl); + writer.WriteBoolValue("multi_repo", MultiRepo); + writer.WriteBoolValue("publicly_leaked", PubliclyLeaked); + writer.WriteBoolValue("push_protection_bypassed", PushProtectionBypassed); + writer.WriteDateTimeOffsetValue("push_protection_bypassed_at", PushProtectionBypassedAt); + writer.WriteObjectValue("push_protection_bypassed_by", PushProtectionBypassedBy); + writer.WriteStringValue("push_protection_bypass_request_comment", PushProtectionBypassRequestComment); + writer.WriteStringValue("push_protection_bypass_request_html_url", PushProtectionBypassRequestHtmlUrl); + writer.WriteObjectValue("push_protection_bypass_request_reviewer", PushProtectionBypassRequestReviewer); + writer.WriteStringValue("push_protection_bypass_request_reviewer_comment", PushProtectionBypassRequestReviewerComment); + writer.WriteEnumValue("resolution", Resolution); + writer.WriteStringValue("resolution_comment", ResolutionComment); + writer.WriteDateTimeOffsetValue("resolved_at", ResolvedAt); + writer.WriteObjectValue("resolved_by", ResolvedBy); + writer.WriteStringValue("secret", Secret); + writer.WriteStringValue("secret_type", SecretType); + writer.WriteStringValue("secret_type_display_name", SecretTypeDisplayName); + writer.WriteEnumValue("state", State); + writer.WriteEnumValue("validity", Validity); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/SecretScanningAlert503Error.cs b/src/Ayllu.Github.Client/Github/Client/Models/SecretScanningAlert503Error.cs new file mode 100644 index 0000000..ff9fe94 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/SecretScanningAlert503Error.cs @@ -0,0 +1,88 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class SecretScanningAlert503Error : ApiException, IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The code property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Code { get; set; } +#nullable restore +#else + public string Code { get; set; } +#endif + /// The documentation_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? DocumentationUrl { get; set; } +#nullable restore +#else + public string DocumentationUrl { get; set; } +#endif + /// The primary error message. + public override string Message { get => MessageEscaped ?? string.Empty; } + /// The message property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? MessageEscaped { get; set; } +#nullable restore +#else + public string MessageEscaped { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public SecretScanningAlert503Error() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.SecretScanningAlert503Error CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.SecretScanningAlert503Error(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "code", n => { Code = n.GetStringValue(); } }, + { "documentation_url", n => { DocumentationUrl = n.GetStringValue(); } }, + { "message", n => { MessageEscaped = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("code", Code); + writer.WriteStringValue("documentation_url", DocumentationUrl); + writer.WriteStringValue("message", MessageEscaped); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/SecretScanningAlertResolution.cs b/src/Ayllu.Github.Client/Github/Client/Models/SecretScanningAlertResolution.cs new file mode 100644 index 0000000..9c5ad5f --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/SecretScanningAlertResolution.cs @@ -0,0 +1,27 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Models +{ + /// **Required when the `state` is `resolved`.** The reason for resolving the alert. + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public enum SecretScanningAlertResolution + { + [EnumMember(Value = "false_positive")] + #pragma warning disable CS1591 + False_positive, + #pragma warning restore CS1591 + [EnumMember(Value = "wont_fix")] + #pragma warning disable CS1591 + Wont_fix, + #pragma warning restore CS1591 + [EnumMember(Value = "revoked")] + #pragma warning disable CS1591 + Revoked, + #pragma warning restore CS1591 + [EnumMember(Value = "used_in_tests")] + #pragma warning disable CS1591 + Used_in_tests, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Models/SecretScanningAlertState.cs b/src/Ayllu.Github.Client/Github/Client/Models/SecretScanningAlertState.cs new file mode 100644 index 0000000..22d0de8 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/SecretScanningAlertState.cs @@ -0,0 +1,19 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Models +{ + /// Sets the state of the secret scanning alert. You must provide `resolution` when you set the state to `resolved`. + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public enum SecretScanningAlertState + { + [EnumMember(Value = "open")] + #pragma warning disable CS1591 + Open, + #pragma warning restore CS1591 + [EnumMember(Value = "resolved")] + #pragma warning disable CS1591 + Resolved, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Models/SecretScanningAlert_validity.cs b/src/Ayllu.Github.Client/Github/Client/Models/SecretScanningAlert_validity.cs new file mode 100644 index 0000000..a48ad4e --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/SecretScanningAlert_validity.cs @@ -0,0 +1,23 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Models +{ + /// The token status as of the latest validity check. + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public enum SecretScanningAlert_validity + { + [EnumMember(Value = "active")] + #pragma warning disable CS1591 + Active, + #pragma warning restore CS1591 + [EnumMember(Value = "inactive")] + #pragma warning disable CS1591 + Inactive, + #pragma warning restore CS1591 + [EnumMember(Value = "unknown")] + #pragma warning disable CS1591 + Unknown, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Models/SecretScanningLocation.cs b/src/Ayllu.Github.Client/Github/Client/Models/SecretScanningLocation.cs new file mode 100644 index 0000000..006a0bd --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/SecretScanningLocation.cs @@ -0,0 +1,364 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class SecretScanningLocation : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The details property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.SecretScanningLocation.SecretScanningLocation_details? Details { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.SecretScanningLocation.SecretScanningLocation_details Details { get; set; } +#endif + /// 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. + public global::Ayllu.Github.Client.Models.SecretScanningLocation_type? Type { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public SecretScanningLocation() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.SecretScanningLocation CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.SecretScanningLocation(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "details", n => { Details = n.GetObjectValue(global::Ayllu.Github.Client.Models.SecretScanningLocation.SecretScanningLocation_details.CreateFromDiscriminatorValue); } }, + { "type", n => { Type = n.GetEnumValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteObjectValue("details", Details); + writer.WriteEnumValue("type", Type); + writer.WriteAdditionalData(AdditionalData); + } + /// + /// Composed type wrapper for classes , , , , , , , , , , , , + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class SecretScanningLocation_details : IComposedTypeWrapper, IParsable + { + /// Composed type representation for type +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.SecretScanningLocationCommit? SecretScanningLocationCommit { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.SecretScanningLocationCommit SecretScanningLocationCommit { get; set; } +#endif + /// Composed type representation for type +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.SecretScanningLocationDiscussionBody? SecretScanningLocationDiscussionBody { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.SecretScanningLocationDiscussionBody SecretScanningLocationDiscussionBody { get; set; } +#endif + /// Composed type representation for type +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.SecretScanningLocationDiscussionComment? SecretScanningLocationDiscussionComment { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.SecretScanningLocationDiscussionComment SecretScanningLocationDiscussionComment { get; set; } +#endif + /// Composed type representation for type +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.SecretScanningLocationDiscussionTitle? SecretScanningLocationDiscussionTitle { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.SecretScanningLocationDiscussionTitle SecretScanningLocationDiscussionTitle { get; set; } +#endif + /// Composed type representation for type +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.SecretScanningLocationIssueBody? SecretScanningLocationIssueBody { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.SecretScanningLocationIssueBody SecretScanningLocationIssueBody { get; set; } +#endif + /// Composed type representation for type +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.SecretScanningLocationIssueComment? SecretScanningLocationIssueComment { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.SecretScanningLocationIssueComment SecretScanningLocationIssueComment { get; set; } +#endif + /// Composed type representation for type +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.SecretScanningLocationIssueTitle? SecretScanningLocationIssueTitle { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.SecretScanningLocationIssueTitle SecretScanningLocationIssueTitle { get; set; } +#endif + /// Composed type representation for type +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.SecretScanningLocationPullRequestBody? SecretScanningLocationPullRequestBody { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.SecretScanningLocationPullRequestBody SecretScanningLocationPullRequestBody { get; set; } +#endif + /// Composed type representation for type +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.SecretScanningLocationPullRequestComment? SecretScanningLocationPullRequestComment { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.SecretScanningLocationPullRequestComment SecretScanningLocationPullRequestComment { get; set; } +#endif + /// Composed type representation for type +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.SecretScanningLocationPullRequestReview? SecretScanningLocationPullRequestReview { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.SecretScanningLocationPullRequestReview SecretScanningLocationPullRequestReview { get; set; } +#endif + /// Composed type representation for type +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.SecretScanningLocationPullRequestReviewComment? SecretScanningLocationPullRequestReviewComment { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.SecretScanningLocationPullRequestReviewComment SecretScanningLocationPullRequestReviewComment { get; set; } +#endif + /// Composed type representation for type +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.SecretScanningLocationPullRequestTitle? SecretScanningLocationPullRequestTitle { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.SecretScanningLocationPullRequestTitle SecretScanningLocationPullRequestTitle { get; set; } +#endif + /// Composed type representation for type +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.SecretScanningLocationWikiCommit? SecretScanningLocationWikiCommit { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.SecretScanningLocationWikiCommit SecretScanningLocationWikiCommit { get; set; } +#endif + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.SecretScanningLocation.SecretScanningLocation_details CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + var mappingValue = parseNode.GetChildNode("")?.GetStringValue(); + var result = new global::Ayllu.Github.Client.Models.SecretScanningLocation.SecretScanningLocation_details(); + if("secret-scanning-location-commit".Equals(mappingValue, StringComparison.OrdinalIgnoreCase)) + { + result.SecretScanningLocationCommit = new global::Ayllu.Github.Client.Models.SecretScanningLocationCommit(); + } + else if("secret-scanning-location-discussion-body".Equals(mappingValue, StringComparison.OrdinalIgnoreCase)) + { + result.SecretScanningLocationDiscussionBody = new global::Ayllu.Github.Client.Models.SecretScanningLocationDiscussionBody(); + } + else if("secret-scanning-location-discussion-comment".Equals(mappingValue, StringComparison.OrdinalIgnoreCase)) + { + result.SecretScanningLocationDiscussionComment = new global::Ayllu.Github.Client.Models.SecretScanningLocationDiscussionComment(); + } + else if("secret-scanning-location-discussion-title".Equals(mappingValue, StringComparison.OrdinalIgnoreCase)) + { + result.SecretScanningLocationDiscussionTitle = new global::Ayllu.Github.Client.Models.SecretScanningLocationDiscussionTitle(); + } + else if("secret-scanning-location-issue-body".Equals(mappingValue, StringComparison.OrdinalIgnoreCase)) + { + result.SecretScanningLocationIssueBody = new global::Ayllu.Github.Client.Models.SecretScanningLocationIssueBody(); + } + else if("secret-scanning-location-issue-comment".Equals(mappingValue, StringComparison.OrdinalIgnoreCase)) + { + result.SecretScanningLocationIssueComment = new global::Ayllu.Github.Client.Models.SecretScanningLocationIssueComment(); + } + else if("secret-scanning-location-issue-title".Equals(mappingValue, StringComparison.OrdinalIgnoreCase)) + { + result.SecretScanningLocationIssueTitle = new global::Ayllu.Github.Client.Models.SecretScanningLocationIssueTitle(); + } + else if("secret-scanning-location-pull-request-body".Equals(mappingValue, StringComparison.OrdinalIgnoreCase)) + { + result.SecretScanningLocationPullRequestBody = new global::Ayllu.Github.Client.Models.SecretScanningLocationPullRequestBody(); + } + else if("secret-scanning-location-pull-request-comment".Equals(mappingValue, StringComparison.OrdinalIgnoreCase)) + { + result.SecretScanningLocationPullRequestComment = new global::Ayllu.Github.Client.Models.SecretScanningLocationPullRequestComment(); + } + else if("secret-scanning-location-pull-request-review".Equals(mappingValue, StringComparison.OrdinalIgnoreCase)) + { + result.SecretScanningLocationPullRequestReview = new global::Ayllu.Github.Client.Models.SecretScanningLocationPullRequestReview(); + } + else if("secret-scanning-location-pull-request-review-comment".Equals(mappingValue, StringComparison.OrdinalIgnoreCase)) + { + result.SecretScanningLocationPullRequestReviewComment = new global::Ayllu.Github.Client.Models.SecretScanningLocationPullRequestReviewComment(); + } + else if("secret-scanning-location-pull-request-title".Equals(mappingValue, StringComparison.OrdinalIgnoreCase)) + { + result.SecretScanningLocationPullRequestTitle = new global::Ayllu.Github.Client.Models.SecretScanningLocationPullRequestTitle(); + } + else if("secret-scanning-location-wiki-commit".Equals(mappingValue, StringComparison.OrdinalIgnoreCase)) + { + result.SecretScanningLocationWikiCommit = new global::Ayllu.Github.Client.Models.SecretScanningLocationWikiCommit(); + } + return result; + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + if(SecretScanningLocationCommit != null) + { + return SecretScanningLocationCommit.GetFieldDeserializers(); + } + else if(SecretScanningLocationDiscussionBody != null) + { + return SecretScanningLocationDiscussionBody.GetFieldDeserializers(); + } + else if(SecretScanningLocationDiscussionComment != null) + { + return SecretScanningLocationDiscussionComment.GetFieldDeserializers(); + } + else if(SecretScanningLocationDiscussionTitle != null) + { + return SecretScanningLocationDiscussionTitle.GetFieldDeserializers(); + } + else if(SecretScanningLocationIssueBody != null) + { + return SecretScanningLocationIssueBody.GetFieldDeserializers(); + } + else if(SecretScanningLocationIssueComment != null) + { + return SecretScanningLocationIssueComment.GetFieldDeserializers(); + } + else if(SecretScanningLocationIssueTitle != null) + { + return SecretScanningLocationIssueTitle.GetFieldDeserializers(); + } + else if(SecretScanningLocationPullRequestBody != null) + { + return SecretScanningLocationPullRequestBody.GetFieldDeserializers(); + } + else if(SecretScanningLocationPullRequestComment != null) + { + return SecretScanningLocationPullRequestComment.GetFieldDeserializers(); + } + else if(SecretScanningLocationPullRequestReview != null) + { + return SecretScanningLocationPullRequestReview.GetFieldDeserializers(); + } + else if(SecretScanningLocationPullRequestReviewComment != null) + { + return SecretScanningLocationPullRequestReviewComment.GetFieldDeserializers(); + } + else if(SecretScanningLocationPullRequestTitle != null) + { + return SecretScanningLocationPullRequestTitle.GetFieldDeserializers(); + } + else if(SecretScanningLocationWikiCommit != null) + { + return SecretScanningLocationWikiCommit.GetFieldDeserializers(); + } + return new Dictionary>(); + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(SecretScanningLocationCommit != null) + { + writer.WriteObjectValue(null, SecretScanningLocationCommit); + } + else if(SecretScanningLocationDiscussionBody != null) + { + writer.WriteObjectValue(null, SecretScanningLocationDiscussionBody); + } + else if(SecretScanningLocationDiscussionComment != null) + { + writer.WriteObjectValue(null, SecretScanningLocationDiscussionComment); + } + else if(SecretScanningLocationDiscussionTitle != null) + { + writer.WriteObjectValue(null, SecretScanningLocationDiscussionTitle); + } + else if(SecretScanningLocationIssueBody != null) + { + writer.WriteObjectValue(null, SecretScanningLocationIssueBody); + } + else if(SecretScanningLocationIssueComment != null) + { + writer.WriteObjectValue(null, SecretScanningLocationIssueComment); + } + else if(SecretScanningLocationIssueTitle != null) + { + writer.WriteObjectValue(null, SecretScanningLocationIssueTitle); + } + else if(SecretScanningLocationPullRequestBody != null) + { + writer.WriteObjectValue(null, SecretScanningLocationPullRequestBody); + } + else if(SecretScanningLocationPullRequestComment != null) + { + writer.WriteObjectValue(null, SecretScanningLocationPullRequestComment); + } + else if(SecretScanningLocationPullRequestReview != null) + { + writer.WriteObjectValue(null, SecretScanningLocationPullRequestReview); + } + else if(SecretScanningLocationPullRequestReviewComment != null) + { + writer.WriteObjectValue(null, SecretScanningLocationPullRequestReviewComment); + } + else if(SecretScanningLocationPullRequestTitle != null) + { + writer.WriteObjectValue(null, SecretScanningLocationPullRequestTitle); + } + else if(SecretScanningLocationWikiCommit != null) + { + writer.WriteObjectValue(null, SecretScanningLocationWikiCommit); + } + } + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/SecretScanningLocationCommit.cs b/src/Ayllu.Github.Client/Github/Client/Models/SecretScanningLocationCommit.cs new file mode 100644 index 0000000..31d5e7c --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/SecretScanningLocationCommit.cs @@ -0,0 +1,122 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + /// + /// Represents a 'commit' secret scanning location type. This location type shows that a secret was detected inside a commit to a repository. + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class SecretScanningLocationCommit : IAdditionalDataHolder, IParsable + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// SHA-1 hash ID of the associated blob +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? BlobSha { get; set; } +#nullable restore +#else + public string BlobSha { get; set; } +#endif + /// The API URL to get the associated blob resource +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? BlobUrl { get; set; } +#nullable restore +#else + public string BlobUrl { get; set; } +#endif + /// SHA-1 hash ID of the associated commit +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? CommitSha { get; set; } +#nullable restore +#else + public string CommitSha { get; set; } +#endif + /// The API URL to get the associated commit resource +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? CommitUrl { get; set; } +#nullable restore +#else + public string CommitUrl { get; set; } +#endif + /// The column at which the secret ends within the end line when the file is interpreted as 8BIT ASCII + public double? EndColumn { get; set; } + /// Line number at which the secret ends in the file + public double? EndLine { get; set; } + /// The file path in the repository +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Path { get; set; } +#nullable restore +#else + public string Path { get; set; } +#endif + /// The column at which the secret starts within the start line when the file is interpreted as 8BIT ASCII + public double? StartColumn { get; set; } + /// Line number at which the secret starts in the file + public double? StartLine { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public SecretScanningLocationCommit() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.SecretScanningLocationCommit CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.SecretScanningLocationCommit(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "blob_sha", n => { BlobSha = n.GetStringValue(); } }, + { "blob_url", n => { BlobUrl = n.GetStringValue(); } }, + { "commit_sha", n => { CommitSha = n.GetStringValue(); } }, + { "commit_url", n => { CommitUrl = n.GetStringValue(); } }, + { "end_column", n => { EndColumn = n.GetDoubleValue(); } }, + { "end_line", n => { EndLine = n.GetDoubleValue(); } }, + { "path", n => { Path = n.GetStringValue(); } }, + { "start_column", n => { StartColumn = n.GetDoubleValue(); } }, + { "start_line", n => { StartLine = n.GetDoubleValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("blob_sha", BlobSha); + writer.WriteStringValue("blob_url", BlobUrl); + writer.WriteStringValue("commit_sha", CommitSha); + writer.WriteStringValue("commit_url", CommitUrl); + writer.WriteDoubleValue("end_column", EndColumn); + writer.WriteDoubleValue("end_line", EndLine); + writer.WriteStringValue("path", Path); + writer.WriteDoubleValue("start_column", StartColumn); + writer.WriteDoubleValue("start_line", StartLine); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/SecretScanningLocationDiscussionBody.cs b/src/Ayllu.Github.Client/Github/Client/Models/SecretScanningLocationDiscussionBody.cs new file mode 100644 index 0000000..1b0bf0c --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/SecretScanningLocationDiscussionBody.cs @@ -0,0 +1,66 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + /// + /// Represents a 'discussion_body' secret scanning location type. This location type shows that a secret was detected in the body of a discussion. + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class SecretScanningLocationDiscussionBody : IAdditionalDataHolder, IParsable + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The URL to the discussion where the secret was detected. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? DiscussionBodyUrl { get; set; } +#nullable restore +#else + public string DiscussionBodyUrl { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public SecretScanningLocationDiscussionBody() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.SecretScanningLocationDiscussionBody CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.SecretScanningLocationDiscussionBody(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "discussion_body_url", n => { DiscussionBodyUrl = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("discussion_body_url", DiscussionBodyUrl); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/SecretScanningLocationDiscussionComment.cs b/src/Ayllu.Github.Client/Github/Client/Models/SecretScanningLocationDiscussionComment.cs new file mode 100644 index 0000000..065c3d9 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/SecretScanningLocationDiscussionComment.cs @@ -0,0 +1,66 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + /// + /// Represents a 'discussion_comment' secret scanning location type. This location type shows that a secret was detected in a comment on a discussion. + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class SecretScanningLocationDiscussionComment : IAdditionalDataHolder, IParsable + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The API URL to get the discussion comment where the secret was detected. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? DiscussionCommentUrl { get; set; } +#nullable restore +#else + public string DiscussionCommentUrl { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public SecretScanningLocationDiscussionComment() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.SecretScanningLocationDiscussionComment CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.SecretScanningLocationDiscussionComment(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "discussion_comment_url", n => { DiscussionCommentUrl = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("discussion_comment_url", DiscussionCommentUrl); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/SecretScanningLocationDiscussionTitle.cs b/src/Ayllu.Github.Client/Github/Client/Models/SecretScanningLocationDiscussionTitle.cs new file mode 100644 index 0000000..ddad9dd --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/SecretScanningLocationDiscussionTitle.cs @@ -0,0 +1,66 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + /// + /// Represents a 'discussion_title' secret scanning location type. This location type shows that a secret was detected in the title of a discussion. + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class SecretScanningLocationDiscussionTitle : IAdditionalDataHolder, IParsable + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The URL to the discussion where the secret was detected. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? DiscussionTitleUrl { get; set; } +#nullable restore +#else + public string DiscussionTitleUrl { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public SecretScanningLocationDiscussionTitle() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.SecretScanningLocationDiscussionTitle CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.SecretScanningLocationDiscussionTitle(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "discussion_title_url", n => { DiscussionTitleUrl = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("discussion_title_url", DiscussionTitleUrl); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/SecretScanningLocationIssueBody.cs b/src/Ayllu.Github.Client/Github/Client/Models/SecretScanningLocationIssueBody.cs new file mode 100644 index 0000000..119f772 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/SecretScanningLocationIssueBody.cs @@ -0,0 +1,66 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + /// + /// Represents an 'issue_body' secret scanning location type. This location type shows that a secret was detected in the body of an issue. + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class SecretScanningLocationIssueBody : IAdditionalDataHolder, IParsable + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The API URL to get the issue where the secret was detected. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? IssueBodyUrl { get; set; } +#nullable restore +#else + public string IssueBodyUrl { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public SecretScanningLocationIssueBody() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.SecretScanningLocationIssueBody CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.SecretScanningLocationIssueBody(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "issue_body_url", n => { IssueBodyUrl = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("issue_body_url", IssueBodyUrl); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/SecretScanningLocationIssueComment.cs b/src/Ayllu.Github.Client/Github/Client/Models/SecretScanningLocationIssueComment.cs new file mode 100644 index 0000000..d229fdb --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/SecretScanningLocationIssueComment.cs @@ -0,0 +1,66 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + /// + /// Represents an 'issue_comment' secret scanning location type. This location type shows that a secret was detected in a comment on an issue. + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class SecretScanningLocationIssueComment : IAdditionalDataHolder, IParsable + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The API URL to get the issue comment where the secret was detected. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? IssueCommentUrl { get; set; } +#nullable restore +#else + public string IssueCommentUrl { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public SecretScanningLocationIssueComment() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.SecretScanningLocationIssueComment CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.SecretScanningLocationIssueComment(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "issue_comment_url", n => { IssueCommentUrl = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("issue_comment_url", IssueCommentUrl); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/SecretScanningLocationIssueTitle.cs b/src/Ayllu.Github.Client/Github/Client/Models/SecretScanningLocationIssueTitle.cs new file mode 100644 index 0000000..76fe002 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/SecretScanningLocationIssueTitle.cs @@ -0,0 +1,66 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + /// + /// Represents an 'issue_title' secret scanning location type. This location type shows that a secret was detected in the title of an issue. + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class SecretScanningLocationIssueTitle : IAdditionalDataHolder, IParsable + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The API URL to get the issue where the secret was detected. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? IssueTitleUrl { get; set; } +#nullable restore +#else + public string IssueTitleUrl { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public SecretScanningLocationIssueTitle() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.SecretScanningLocationIssueTitle CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.SecretScanningLocationIssueTitle(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "issue_title_url", n => { IssueTitleUrl = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("issue_title_url", IssueTitleUrl); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/SecretScanningLocationPullRequestBody.cs b/src/Ayllu.Github.Client/Github/Client/Models/SecretScanningLocationPullRequestBody.cs new file mode 100644 index 0000000..9b2d372 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/SecretScanningLocationPullRequestBody.cs @@ -0,0 +1,66 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + /// + /// 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. + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class SecretScanningLocationPullRequestBody : IAdditionalDataHolder, IParsable + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The API URL to get the pull request where the secret was detected. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? PullRequestBodyUrl { get; set; } +#nullable restore +#else + public string PullRequestBodyUrl { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public SecretScanningLocationPullRequestBody() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.SecretScanningLocationPullRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.SecretScanningLocationPullRequestBody(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "pull_request_body_url", n => { PullRequestBodyUrl = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("pull_request_body_url", PullRequestBodyUrl); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/SecretScanningLocationPullRequestComment.cs b/src/Ayllu.Github.Client/Github/Client/Models/SecretScanningLocationPullRequestComment.cs new file mode 100644 index 0000000..0d1cca6 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/SecretScanningLocationPullRequestComment.cs @@ -0,0 +1,66 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + /// + /// 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. + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class SecretScanningLocationPullRequestComment : IAdditionalDataHolder, IParsable + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The API URL to get the pull request comment where the secret was detected. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? PullRequestCommentUrl { get; set; } +#nullable restore +#else + public string PullRequestCommentUrl { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public SecretScanningLocationPullRequestComment() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.SecretScanningLocationPullRequestComment CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.SecretScanningLocationPullRequestComment(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "pull_request_comment_url", n => { PullRequestCommentUrl = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("pull_request_comment_url", PullRequestCommentUrl); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/SecretScanningLocationPullRequestReview.cs b/src/Ayllu.Github.Client/Github/Client/Models/SecretScanningLocationPullRequestReview.cs new file mode 100644 index 0000000..3f15311 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/SecretScanningLocationPullRequestReview.cs @@ -0,0 +1,66 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + /// + /// 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. + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class SecretScanningLocationPullRequestReview : IAdditionalDataHolder, IParsable + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The API URL to get the pull request review where the secret was detected. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? PullRequestReviewUrl { get; set; } +#nullable restore +#else + public string PullRequestReviewUrl { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public SecretScanningLocationPullRequestReview() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.SecretScanningLocationPullRequestReview CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.SecretScanningLocationPullRequestReview(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "pull_request_review_url", n => { PullRequestReviewUrl = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("pull_request_review_url", PullRequestReviewUrl); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/SecretScanningLocationPullRequestReviewComment.cs b/src/Ayllu.Github.Client/Github/Client/Models/SecretScanningLocationPullRequestReviewComment.cs new file mode 100644 index 0000000..2cad909 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/SecretScanningLocationPullRequestReviewComment.cs @@ -0,0 +1,66 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + /// + /// 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. + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class SecretScanningLocationPullRequestReviewComment : IAdditionalDataHolder, IParsable + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The API URL to get the pull request review comment where the secret was detected. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? PullRequestReviewCommentUrl { get; set; } +#nullable restore +#else + public string PullRequestReviewCommentUrl { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public SecretScanningLocationPullRequestReviewComment() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.SecretScanningLocationPullRequestReviewComment CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.SecretScanningLocationPullRequestReviewComment(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "pull_request_review_comment_url", n => { PullRequestReviewCommentUrl = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("pull_request_review_comment_url", PullRequestReviewCommentUrl); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/SecretScanningLocationPullRequestTitle.cs b/src/Ayllu.Github.Client/Github/Client/Models/SecretScanningLocationPullRequestTitle.cs new file mode 100644 index 0000000..721da68 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/SecretScanningLocationPullRequestTitle.cs @@ -0,0 +1,66 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + /// + /// 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. + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class SecretScanningLocationPullRequestTitle : IAdditionalDataHolder, IParsable + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The API URL to get the pull request where the secret was detected. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? PullRequestTitleUrl { get; set; } +#nullable restore +#else + public string PullRequestTitleUrl { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public SecretScanningLocationPullRequestTitle() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.SecretScanningLocationPullRequestTitle CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.SecretScanningLocationPullRequestTitle(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "pull_request_title_url", n => { PullRequestTitleUrl = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("pull_request_title_url", PullRequestTitleUrl); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/SecretScanningLocationWikiCommit.cs b/src/Ayllu.Github.Client/Github/Client/Models/SecretScanningLocationWikiCommit.cs new file mode 100644 index 0000000..b8a9559 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/SecretScanningLocationWikiCommit.cs @@ -0,0 +1,122 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + /// + /// Represents a 'wiki_commit' secret scanning location type. This location type shows that a secret was detected inside a commit to a repository wiki. + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class SecretScanningLocationWikiCommit : IAdditionalDataHolder, IParsable + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// SHA-1 hash ID of the associated blob +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? BlobSha { get; set; } +#nullable restore +#else + public string BlobSha { get; set; } +#endif + /// SHA-1 hash ID of the associated commit +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? CommitSha { get; set; } +#nullable restore +#else + public string CommitSha { get; set; } +#endif + /// The GitHub URL to get the associated wiki commit +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? CommitUrl { get; set; } +#nullable restore +#else + public string CommitUrl { get; set; } +#endif + /// The column at which the secret ends within the end line when the file is interpreted as 8-bit ASCII. + public double? EndColumn { get; set; } + /// Line number at which the secret ends in the file + public double? EndLine { get; set; } + /// The GitHub URL to get the associated wiki page +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? PageUrl { get; set; } +#nullable restore +#else + public string PageUrl { get; set; } +#endif + /// The file path of the wiki page +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Path { get; set; } +#nullable restore +#else + public string Path { get; set; } +#endif + /// The column at which the secret starts within the start line when the file is interpreted as 8-bit ASCII. + public double? StartColumn { get; set; } + /// Line number at which the secret starts in the file + public double? StartLine { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public SecretScanningLocationWikiCommit() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.SecretScanningLocationWikiCommit CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.SecretScanningLocationWikiCommit(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "blob_sha", n => { BlobSha = n.GetStringValue(); } }, + { "commit_sha", n => { CommitSha = n.GetStringValue(); } }, + { "commit_url", n => { CommitUrl = n.GetStringValue(); } }, + { "end_column", n => { EndColumn = n.GetDoubleValue(); } }, + { "end_line", n => { EndLine = n.GetDoubleValue(); } }, + { "page_url", n => { PageUrl = n.GetStringValue(); } }, + { "path", n => { Path = n.GetStringValue(); } }, + { "start_column", n => { StartColumn = n.GetDoubleValue(); } }, + { "start_line", n => { StartLine = n.GetDoubleValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("blob_sha", BlobSha); + writer.WriteStringValue("commit_sha", CommitSha); + writer.WriteStringValue("commit_url", CommitUrl); + writer.WriteDoubleValue("end_column", EndColumn); + writer.WriteDoubleValue("end_line", EndLine); + writer.WriteStringValue("page_url", PageUrl); + writer.WriteStringValue("path", Path); + writer.WriteDoubleValue("start_column", StartColumn); + writer.WriteDoubleValue("start_line", StartLine); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/SecretScanningLocation_type.cs b/src/Ayllu.Github.Client/Github/Client/Models/SecretScanningLocation_type.cs new file mode 100644 index 0000000..14d9c76 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/SecretScanningLocation_type.cs @@ -0,0 +1,63 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Models +{ + /// 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. + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public enum SecretScanningLocation_type + { + [EnumMember(Value = "commit")] + #pragma warning disable CS1591 + Commit, + #pragma warning restore CS1591 + [EnumMember(Value = "wiki_commit")] + #pragma warning disable CS1591 + Wiki_commit, + #pragma warning restore CS1591 + [EnumMember(Value = "issue_title")] + #pragma warning disable CS1591 + Issue_title, + #pragma warning restore CS1591 + [EnumMember(Value = "issue_body")] + #pragma warning disable CS1591 + Issue_body, + #pragma warning restore CS1591 + [EnumMember(Value = "issue_comment")] + #pragma warning disable CS1591 + Issue_comment, + #pragma warning restore CS1591 + [EnumMember(Value = "discussion_title")] + #pragma warning disable CS1591 + Discussion_title, + #pragma warning restore CS1591 + [EnumMember(Value = "discussion_body")] + #pragma warning disable CS1591 + Discussion_body, + #pragma warning restore CS1591 + [EnumMember(Value = "discussion_comment")] + #pragma warning disable CS1591 + Discussion_comment, + #pragma warning restore CS1591 + [EnumMember(Value = "pull_request_title")] + #pragma warning disable CS1591 + Pull_request_title, + #pragma warning restore CS1591 + [EnumMember(Value = "pull_request_body")] + #pragma warning disable CS1591 + Pull_request_body, + #pragma warning restore CS1591 + [EnumMember(Value = "pull_request_comment")] + #pragma warning disable CS1591 + Pull_request_comment, + #pragma warning restore CS1591 + [EnumMember(Value = "pull_request_review")] + #pragma warning disable CS1591 + Pull_request_review, + #pragma warning restore CS1591 + [EnumMember(Value = "pull_request_review_comment")] + #pragma warning disable CS1591 + Pull_request_review_comment, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Models/SecretScanningPatternConfiguration.cs b/src/Ayllu.Github.Client/Github/Client/Models/SecretScanningPatternConfiguration.cs new file mode 100644 index 0000000..03a157d --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/SecretScanningPatternConfiguration.cs @@ -0,0 +1,86 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + /// + /// A collection of secret scanning patterns and their settings related to push protection. + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class SecretScanningPatternConfiguration : IAdditionalDataHolder, IParsable + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// Overrides for custom patterns defined by the organization. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? CustomPatternOverrides { get; set; } +#nullable restore +#else + public List CustomPatternOverrides { get; set; } +#endif + /// The version of the entity. This is used to confirm you're updating the current version of the entity and mitigate unintentionally overriding someone else's update. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? PatternConfigVersion { get; set; } +#nullable restore +#else + public string PatternConfigVersion { get; set; } +#endif + /// Overrides for partner patterns. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? ProviderPatternOverrides { get; set; } +#nullable restore +#else + public List ProviderPatternOverrides { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public SecretScanningPatternConfiguration() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.SecretScanningPatternConfiguration CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.SecretScanningPatternConfiguration(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "custom_pattern_overrides", n => { CustomPatternOverrides = n.GetCollectionOfObjectValues(global::Ayllu.Github.Client.Models.SecretScanningPatternOverride.CreateFromDiscriminatorValue)?.AsList(); } }, + { "pattern_config_version", n => { PatternConfigVersion = n.GetStringValue(); } }, + { "provider_pattern_overrides", n => { ProviderPatternOverrides = n.GetCollectionOfObjectValues(global::Ayllu.Github.Client.Models.SecretScanningPatternOverride.CreateFromDiscriminatorValue)?.AsList(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteCollectionOfObjectValues("custom_pattern_overrides", CustomPatternOverrides); + writer.WriteStringValue("pattern_config_version", PatternConfigVersion); + writer.WriteCollectionOfObjectValues("provider_pattern_overrides", ProviderPatternOverrides); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/SecretScanningPatternOverride.cs b/src/Ayllu.Github.Client/Github/Client/Models/SecretScanningPatternOverride.cs new file mode 100644 index 0000000..48d0e90 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/SecretScanningPatternOverride.cs @@ -0,0 +1,127 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class SecretScanningPatternOverride : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The total number of alerts generated by this pattern. + public int? AlertTotal { get; set; } + /// The percentage of all alerts that this pattern represents, rounded to the nearest integer. + public int? AlertTotalPercentage { get; set; } + /// The percentage of blocks for this pattern that were bypassed, rounded to the nearest integer. + public int? BypassRate { get; set; } + /// The version of this pattern if it's a custom pattern. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? CustomPatternVersion { get; set; } +#nullable restore +#else + public string CustomPatternVersion { get; set; } +#endif + /// The default push protection setting for this pattern. + public global::Ayllu.Github.Client.Models.SecretScanningPatternOverride_default_setting? DefaultSetting { get; set; } + /// The user-friendly name for the pattern. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? DisplayName { get; set; } +#nullable restore +#else + public string DisplayName { get; set; } +#endif + /// The push protection setting for this pattern set at the enterprise level. Only present for partner patterns when the organization has a parent enterprise. + public global::Ayllu.Github.Client.Models.SecretScanningPatternOverride_enterprise_setting? EnterpriseSetting { get; set; } + /// The percentage of alerts from this pattern that are false positives, rounded to the nearest integer. + public int? FalsePositiveRate { get; set; } + /// The number of false positive alerts generated by this pattern. + public int? FalsePositives { get; set; } + /// The current push protection setting for this pattern. If this is `not-set`, then it inherits either the enterprise setting if it exists or the default setting. + public global::Ayllu.Github.Client.Models.SecretScanningPatternOverride_setting? Setting { get; set; } + /// The slug of the pattern. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Slug { get; set; } +#nullable restore +#else + public string Slug { get; set; } +#endif + /// The ID of the pattern. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? TokenType { get; set; } +#nullable restore +#else + public string TokenType { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public SecretScanningPatternOverride() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.SecretScanningPatternOverride CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.SecretScanningPatternOverride(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "alert_total", n => { AlertTotal = n.GetIntValue(); } }, + { "alert_total_percentage", n => { AlertTotalPercentage = n.GetIntValue(); } }, + { "bypass_rate", n => { BypassRate = n.GetIntValue(); } }, + { "custom_pattern_version", n => { CustomPatternVersion = n.GetStringValue(); } }, + { "default_setting", n => { DefaultSetting = n.GetEnumValue(); } }, + { "display_name", n => { DisplayName = n.GetStringValue(); } }, + { "enterprise_setting", n => { EnterpriseSetting = n.GetEnumValue(); } }, + { "false_positive_rate", n => { FalsePositiveRate = n.GetIntValue(); } }, + { "false_positives", n => { FalsePositives = n.GetIntValue(); } }, + { "setting", n => { Setting = n.GetEnumValue(); } }, + { "slug", n => { Slug = n.GetStringValue(); } }, + { "token_type", n => { TokenType = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteIntValue("alert_total", AlertTotal); + writer.WriteIntValue("alert_total_percentage", AlertTotalPercentage); + writer.WriteIntValue("bypass_rate", BypassRate); + writer.WriteStringValue("custom_pattern_version", CustomPatternVersion); + writer.WriteEnumValue("default_setting", DefaultSetting); + writer.WriteStringValue("display_name", DisplayName); + writer.WriteEnumValue("enterprise_setting", EnterpriseSetting); + writer.WriteIntValue("false_positive_rate", FalsePositiveRate); + writer.WriteIntValue("false_positives", FalsePositives); + writer.WriteEnumValue("setting", Setting); + writer.WriteStringValue("slug", Slug); + writer.WriteStringValue("token_type", TokenType); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/SecretScanningPatternOverride_default_setting.cs b/src/Ayllu.Github.Client/Github/Client/Models/SecretScanningPatternOverride_default_setting.cs new file mode 100644 index 0000000..96228f4 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/SecretScanningPatternOverride_default_setting.cs @@ -0,0 +1,19 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Models +{ + /// The default push protection setting for this pattern. + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public enum SecretScanningPatternOverride_default_setting + { + [EnumMember(Value = "disabled")] + #pragma warning disable CS1591 + Disabled, + #pragma warning restore CS1591 + [EnumMember(Value = "enabled")] + #pragma warning disable CS1591 + Enabled, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Models/SecretScanningPatternOverride_enterprise_setting.cs b/src/Ayllu.Github.Client/Github/Client/Models/SecretScanningPatternOverride_enterprise_setting.cs new file mode 100644 index 0000000..8096a8c --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/SecretScanningPatternOverride_enterprise_setting.cs @@ -0,0 +1,23 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Models +{ + /// The push protection setting for this pattern set at the enterprise level. Only present for partner patterns when the organization has a parent enterprise. + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public enum SecretScanningPatternOverride_enterprise_setting + { + [EnumMember(Value = "not-set")] + #pragma warning disable CS1591 + NotSet, + #pragma warning restore CS1591 + [EnumMember(Value = "disabled")] + #pragma warning disable CS1591 + Disabled, + #pragma warning restore CS1591 + [EnumMember(Value = "enabled")] + #pragma warning disable CS1591 + Enabled, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Models/SecretScanningPatternOverride_setting.cs b/src/Ayllu.Github.Client/Github/Client/Models/SecretScanningPatternOverride_setting.cs new file mode 100644 index 0000000..64e3852 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/SecretScanningPatternOverride_setting.cs @@ -0,0 +1,23 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Models +{ + /// The current push protection setting for this pattern. If this is `not-set`, then it inherits either the enterprise setting if it exists or the default setting. + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public enum SecretScanningPatternOverride_setting + { + [EnumMember(Value = "not-set")] + #pragma warning disable CS1591 + NotSet, + #pragma warning restore CS1591 + [EnumMember(Value = "disabled")] + #pragma warning disable CS1591 + Disabled, + #pragma warning restore CS1591 + [EnumMember(Value = "enabled")] + #pragma warning disable CS1591 + Enabled, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Models/SecretScanningPushProtectionBypass.cs b/src/Ayllu.Github.Client/Github/Client/Models/SecretScanningPushProtectionBypass.cs new file mode 100644 index 0000000..0405146 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/SecretScanningPushProtectionBypass.cs @@ -0,0 +1,73 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class SecretScanningPushProtectionBypass : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The time that the bypass will expire in ISO 8601 format: `YYYY-MM-DDTHH:MM:SSZ`. + public DateTimeOffset? ExpireAt { get; set; } + /// The reason for bypassing push protection. + public global::Ayllu.Github.Client.Models.SecretScanningPushProtectionBypassReason? Reason { get; set; } + /// The token type this bypass is for. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? TokenType { get; set; } +#nullable restore +#else + public string TokenType { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public SecretScanningPushProtectionBypass() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.SecretScanningPushProtectionBypass CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.SecretScanningPushProtectionBypass(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "expire_at", n => { ExpireAt = n.GetDateTimeOffsetValue(); } }, + { "reason", n => { Reason = n.GetEnumValue(); } }, + { "token_type", n => { TokenType = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteDateTimeOffsetValue("expire_at", ExpireAt); + writer.WriteEnumValue("reason", Reason); + writer.WriteStringValue("token_type", TokenType); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/SecretScanningPushProtectionBypass503Error.cs b/src/Ayllu.Github.Client/Github/Client/Models/SecretScanningPushProtectionBypass503Error.cs new file mode 100644 index 0000000..30dd6ba --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/SecretScanningPushProtectionBypass503Error.cs @@ -0,0 +1,88 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class SecretScanningPushProtectionBypass503Error : ApiException, IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The code property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Code { get; set; } +#nullable restore +#else + public string Code { get; set; } +#endif + /// The documentation_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? DocumentationUrl { get; set; } +#nullable restore +#else + public string DocumentationUrl { get; set; } +#endif + /// The primary error message. + public override string Message { get => MessageEscaped ?? string.Empty; } + /// The message property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? MessageEscaped { get; set; } +#nullable restore +#else + public string MessageEscaped { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public SecretScanningPushProtectionBypass503Error() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.SecretScanningPushProtectionBypass503Error CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.SecretScanningPushProtectionBypass503Error(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "code", n => { Code = n.GetStringValue(); } }, + { "documentation_url", n => { DocumentationUrl = n.GetStringValue(); } }, + { "message", n => { MessageEscaped = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("code", Code); + writer.WriteStringValue("documentation_url", DocumentationUrl); + writer.WriteStringValue("message", MessageEscaped); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/SecretScanningPushProtectionBypassReason.cs b/src/Ayllu.Github.Client/Github/Client/Models/SecretScanningPushProtectionBypassReason.cs new file mode 100644 index 0000000..1815550 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/SecretScanningPushProtectionBypassReason.cs @@ -0,0 +1,23 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Models +{ + /// The reason for bypassing push protection. + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public enum SecretScanningPushProtectionBypassReason + { + [EnumMember(Value = "false_positive")] + #pragma warning disable CS1591 + False_positive, + #pragma warning restore CS1591 + [EnumMember(Value = "used_in_tests")] + #pragma warning disable CS1591 + Used_in_tests, + #pragma warning restore CS1591 + [EnumMember(Value = "will_fix_later")] + #pragma warning disable CS1591 + Will_fix_later, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Models/SecretScanningScan.cs b/src/Ayllu.Github.Client/Github/Client/Models/SecretScanningScan.cs new file mode 100644 index 0000000..09ad25c --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/SecretScanningScan.cs @@ -0,0 +1,84 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + /// + /// Information on a single scan performed by secret scanning on the repository + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class SecretScanningScan : IAdditionalDataHolder, IParsable + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The time that the scan was completed. Empty if the scan is running + public DateTimeOffset? CompletedAt { get; set; } + /// The time that the scan was started. Empty if the scan is pending + public DateTimeOffset? StartedAt { get; set; } + /// The state of the scan. Either "completed", "running", or "pending" +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Status { get; set; } +#nullable restore +#else + public string Status { get; set; } +#endif + /// The type of scan +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Type { get; set; } +#nullable restore +#else + public string Type { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public SecretScanningScan() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.SecretScanningScan CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.SecretScanningScan(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "completed_at", n => { CompletedAt = n.GetDateTimeOffsetValue(); } }, + { "started_at", n => { StartedAt = n.GetDateTimeOffsetValue(); } }, + { "status", n => { Status = n.GetStringValue(); } }, + { "type", n => { Type = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteDateTimeOffsetValue("completed_at", CompletedAt); + writer.WriteDateTimeOffsetValue("started_at", StartedAt); + writer.WriteStringValue("status", Status); + writer.WriteStringValue("type", Type); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/SecretScanningScanHistory.cs b/src/Ayllu.Github.Client/Github/Client/Models/SecretScanningScanHistory.cs new file mode 100644 index 0000000..43832c6 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/SecretScanningScanHistory.cs @@ -0,0 +1,95 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class SecretScanningScanHistory : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The backfill_scans property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? BackfillScans { get; set; } +#nullable restore +#else + public List BackfillScans { get; set; } +#endif + /// The custom_pattern_backfill_scans property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? CustomPatternBackfillScans { get; set; } +#nullable restore +#else + public List CustomPatternBackfillScans { get; set; } +#endif + /// The incremental_scans property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? IncrementalScans { get; set; } +#nullable restore +#else + public List IncrementalScans { get; set; } +#endif + /// The pattern_update_scans property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? PatternUpdateScans { get; set; } +#nullable restore +#else + public List PatternUpdateScans { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public SecretScanningScanHistory() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.SecretScanningScanHistory CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.SecretScanningScanHistory(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "backfill_scans", n => { BackfillScans = n.GetCollectionOfObjectValues(global::Ayllu.Github.Client.Models.SecretScanningScan.CreateFromDiscriminatorValue)?.AsList(); } }, + { "custom_pattern_backfill_scans", n => { CustomPatternBackfillScans = n.GetCollectionOfObjectValues(global::Ayllu.Github.Client.Models.SecretScanningScanHistory_custom_pattern_backfill_scans.CreateFromDiscriminatorValue)?.AsList(); } }, + { "incremental_scans", n => { IncrementalScans = n.GetCollectionOfObjectValues(global::Ayllu.Github.Client.Models.SecretScanningScan.CreateFromDiscriminatorValue)?.AsList(); } }, + { "pattern_update_scans", n => { PatternUpdateScans = n.GetCollectionOfObjectValues(global::Ayllu.Github.Client.Models.SecretScanningScan.CreateFromDiscriminatorValue)?.AsList(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteCollectionOfObjectValues("backfill_scans", BackfillScans); + writer.WriteCollectionOfObjectValues("custom_pattern_backfill_scans", CustomPatternBackfillScans); + writer.WriteCollectionOfObjectValues("incremental_scans", IncrementalScans); + writer.WriteCollectionOfObjectValues("pattern_update_scans", PatternUpdateScans); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/SecretScanningScanHistory503Error.cs b/src/Ayllu.Github.Client/Github/Client/Models/SecretScanningScanHistory503Error.cs new file mode 100644 index 0000000..4116785 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/SecretScanningScanHistory503Error.cs @@ -0,0 +1,88 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class SecretScanningScanHistory503Error : ApiException, IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The code property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Code { get; set; } +#nullable restore +#else + public string Code { get; set; } +#endif + /// The documentation_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? DocumentationUrl { get; set; } +#nullable restore +#else + public string DocumentationUrl { get; set; } +#endif + /// The primary error message. + public override string Message { get => MessageEscaped ?? string.Empty; } + /// The message property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? MessageEscaped { get; set; } +#nullable restore +#else + public string MessageEscaped { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public SecretScanningScanHistory503Error() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.SecretScanningScanHistory503Error CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.SecretScanningScanHistory503Error(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "code", n => { Code = n.GetStringValue(); } }, + { "documentation_url", n => { DocumentationUrl = n.GetStringValue(); } }, + { "message", n => { MessageEscaped = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("code", Code); + writer.WriteStringValue("documentation_url", DocumentationUrl); + writer.WriteStringValue("message", MessageEscaped); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/SecretScanningScanHistory_custom_pattern_backfill_scans.cs b/src/Ayllu.Github.Client/Github/Client/Models/SecretScanningScanHistory_custom_pattern_backfill_scans.cs new file mode 100644 index 0000000..a1c18a8 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/SecretScanningScanHistory_custom_pattern_backfill_scans.cs @@ -0,0 +1,66 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class SecretScanningScanHistory_custom_pattern_backfill_scans : global::Ayllu.Github.Client.Models.SecretScanningScan, IParsable + #pragma warning restore CS1591 + { + /// Name of the custom pattern for custom pattern scans +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? PatternName { get; set; } +#nullable restore +#else + public string PatternName { get; set; } +#endif + /// Level at which the custom pattern is defined, one of "repository", "organization", or "enterprise" +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? PatternScope { get; set; } +#nullable restore +#else + public string PatternScope { get; set; } +#endif + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static new global::Ayllu.Github.Client.Models.SecretScanningScanHistory_custom_pattern_backfill_scans CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.SecretScanningScanHistory_custom_pattern_backfill_scans(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public override IDictionary> GetFieldDeserializers() + { + return new Dictionary>(base.GetFieldDeserializers()) + { + { "pattern_name", n => { PatternName = n.GetStringValue(); } }, + { "pattern_scope", n => { PatternScope = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public override void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + base.Serialize(writer); + writer.WriteStringValue("pattern_name", PatternName); + writer.WriteStringValue("pattern_scope", PatternScope); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/SecurityAdvisoryCreditTypes.cs b/src/Ayllu.Github.Client/Github/Client/Models/SecurityAdvisoryCreditTypes.cs new file mode 100644 index 0000000..c1c6f41 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/SecurityAdvisoryCreditTypes.cs @@ -0,0 +1,51 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Models +{ + /// The type of credit the user is receiving. + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public enum SecurityAdvisoryCreditTypes + { + [EnumMember(Value = "analyst")] + #pragma warning disable CS1591 + Analyst, + #pragma warning restore CS1591 + [EnumMember(Value = "finder")] + #pragma warning disable CS1591 + Finder, + #pragma warning restore CS1591 + [EnumMember(Value = "reporter")] + #pragma warning disable CS1591 + Reporter, + #pragma warning restore CS1591 + [EnumMember(Value = "coordinator")] + #pragma warning disable CS1591 + Coordinator, + #pragma warning restore CS1591 + [EnumMember(Value = "remediation_developer")] + #pragma warning disable CS1591 + Remediation_developer, + #pragma warning restore CS1591 + [EnumMember(Value = "remediation_reviewer")] + #pragma warning disable CS1591 + Remediation_reviewer, + #pragma warning restore CS1591 + [EnumMember(Value = "remediation_verifier")] + #pragma warning disable CS1591 + Remediation_verifier, + #pragma warning restore CS1591 + [EnumMember(Value = "tool")] + #pragma warning disable CS1591 + Tool, + #pragma warning restore CS1591 + [EnumMember(Value = "sponsor")] + #pragma warning disable CS1591 + Sponsor, + #pragma warning restore CS1591 + [EnumMember(Value = "other")] + #pragma warning disable CS1591 + Other, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Models/SecurityAdvisoryEcosystems.cs b/src/Ayllu.Github.Client/Github/Client/Models/SecurityAdvisoryEcosystems.cs new file mode 100644 index 0000000..ebbdb56 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/SecurityAdvisoryEcosystems.cs @@ -0,0 +1,63 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Models +{ + /// The package's language or package management ecosystem. + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public enum SecurityAdvisoryEcosystems + { + [EnumMember(Value = "rubygems")] + #pragma warning disable CS1591 + Rubygems, + #pragma warning restore CS1591 + [EnumMember(Value = "npm")] + #pragma warning disable CS1591 + Npm, + #pragma warning restore CS1591 + [EnumMember(Value = "pip")] + #pragma warning disable CS1591 + Pip, + #pragma warning restore CS1591 + [EnumMember(Value = "maven")] + #pragma warning disable CS1591 + Maven, + #pragma warning restore CS1591 + [EnumMember(Value = "nuget")] + #pragma warning disable CS1591 + Nuget, + #pragma warning restore CS1591 + [EnumMember(Value = "composer")] + #pragma warning disable CS1591 + Composer, + #pragma warning restore CS1591 + [EnumMember(Value = "go")] + #pragma warning disable CS1591 + Go, + #pragma warning restore CS1591 + [EnumMember(Value = "rust")] + #pragma warning disable CS1591 + Rust, + #pragma warning restore CS1591 + [EnumMember(Value = "erlang")] + #pragma warning disable CS1591 + Erlang, + #pragma warning restore CS1591 + [EnumMember(Value = "actions")] + #pragma warning disable CS1591 + Actions, + #pragma warning restore CS1591 + [EnumMember(Value = "pub")] + #pragma warning disable CS1591 + Pub, + #pragma warning restore CS1591 + [EnumMember(Value = "other")] + #pragma warning disable CS1591 + Other, + #pragma warning restore CS1591 + [EnumMember(Value = "swift")] + #pragma warning disable CS1591 + Swift, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Models/SecurityAdvisoryEpss.cs b/src/Ayllu.Github.Client/Github/Client/Models/SecurityAdvisoryEpss.cs new file mode 100644 index 0000000..ee4ddef --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/SecurityAdvisoryEpss.cs @@ -0,0 +1,64 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + /// + /// The EPSS scores as calculated by the [Exploit Prediction Scoring System](https://www.first.org/epss). + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class SecurityAdvisoryEpss : IAdditionalDataHolder, IParsable + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The percentage property + public double? Percentage { get; set; } + /// The percentile property + public double? Percentile { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public SecurityAdvisoryEpss() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.SecurityAdvisoryEpss CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.SecurityAdvisoryEpss(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "percentage", n => { Percentage = n.GetDoubleValue(); } }, + { "percentile", n => { Percentile = n.GetDoubleValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteDoubleValue("percentage", Percentage); + writer.WriteDoubleValue("percentile", Percentile); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/SecurityAndAnalysis.cs b/src/Ayllu.Github.Client/Github/Client/Models/SecurityAndAnalysis.cs new file mode 100644 index 0000000..6d04c37 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/SecurityAndAnalysis.cs @@ -0,0 +1,125 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class SecurityAndAnalysis : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// Enable or disable GitHub Advanced Security for the repository.For standalone Code Scanning or Secret Protection products, this parameter cannot be used. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.SecurityAndAnalysis_advanced_security? AdvancedSecurity { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.SecurityAndAnalysis_advanced_security AdvancedSecurity { get; set; } +#endif + /// The code_security property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.SecurityAndAnalysis_code_security? CodeSecurity { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.SecurityAndAnalysis_code_security CodeSecurity { get; set; } +#endif + /// Enable or disable Dependabot security updates for the repository. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.SecurityAndAnalysis_dependabot_security_updates? DependabotSecurityUpdates { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.SecurityAndAnalysis_dependabot_security_updates DependabotSecurityUpdates { get; set; } +#endif + /// The secret_scanning property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.SecurityAndAnalysis_secret_scanning? SecretScanning { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.SecurityAndAnalysis_secret_scanning SecretScanning { get; set; } +#endif + /// The secret_scanning_ai_detection property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.SecurityAndAnalysis_secret_scanning_ai_detection? SecretScanningAiDetection { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.SecurityAndAnalysis_secret_scanning_ai_detection SecretScanningAiDetection { get; set; } +#endif + /// The secret_scanning_non_provider_patterns property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.SecurityAndAnalysis_secret_scanning_non_provider_patterns? SecretScanningNonProviderPatterns { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.SecurityAndAnalysis_secret_scanning_non_provider_patterns SecretScanningNonProviderPatterns { get; set; } +#endif + /// The secret_scanning_push_protection property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.SecurityAndAnalysis_secret_scanning_push_protection? SecretScanningPushProtection { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.SecurityAndAnalysis_secret_scanning_push_protection SecretScanningPushProtection { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public SecurityAndAnalysis() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.SecurityAndAnalysis CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.SecurityAndAnalysis(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "advanced_security", n => { AdvancedSecurity = n.GetObjectValue(global::Ayllu.Github.Client.Models.SecurityAndAnalysis_advanced_security.CreateFromDiscriminatorValue); } }, + { "code_security", n => { CodeSecurity = n.GetObjectValue(global::Ayllu.Github.Client.Models.SecurityAndAnalysis_code_security.CreateFromDiscriminatorValue); } }, + { "dependabot_security_updates", n => { DependabotSecurityUpdates = n.GetObjectValue(global::Ayllu.Github.Client.Models.SecurityAndAnalysis_dependabot_security_updates.CreateFromDiscriminatorValue); } }, + { "secret_scanning", n => { SecretScanning = n.GetObjectValue(global::Ayllu.Github.Client.Models.SecurityAndAnalysis_secret_scanning.CreateFromDiscriminatorValue); } }, + { "secret_scanning_ai_detection", n => { SecretScanningAiDetection = n.GetObjectValue(global::Ayllu.Github.Client.Models.SecurityAndAnalysis_secret_scanning_ai_detection.CreateFromDiscriminatorValue); } }, + { "secret_scanning_non_provider_patterns", n => { SecretScanningNonProviderPatterns = n.GetObjectValue(global::Ayllu.Github.Client.Models.SecurityAndAnalysis_secret_scanning_non_provider_patterns.CreateFromDiscriminatorValue); } }, + { "secret_scanning_push_protection", n => { SecretScanningPushProtection = n.GetObjectValue(global::Ayllu.Github.Client.Models.SecurityAndAnalysis_secret_scanning_push_protection.CreateFromDiscriminatorValue); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteObjectValue("advanced_security", AdvancedSecurity); + writer.WriteObjectValue("code_security", CodeSecurity); + writer.WriteObjectValue("dependabot_security_updates", DependabotSecurityUpdates); + writer.WriteObjectValue("secret_scanning", SecretScanning); + writer.WriteObjectValue("secret_scanning_ai_detection", SecretScanningAiDetection); + writer.WriteObjectValue("secret_scanning_non_provider_patterns", SecretScanningNonProviderPatterns); + writer.WriteObjectValue("secret_scanning_push_protection", SecretScanningPushProtection); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/SecurityAndAnalysis_advanced_security.cs b/src/Ayllu.Github.Client/Github/Client/Models/SecurityAndAnalysis_advanced_security.cs new file mode 100644 index 0000000..dbb3de4 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/SecurityAndAnalysis_advanced_security.cs @@ -0,0 +1,60 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + /// + /// Enable or disable GitHub Advanced Security for the repository.For standalone Code Scanning or Secret Protection products, this parameter cannot be used. + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class SecurityAndAnalysis_advanced_security : IAdditionalDataHolder, IParsable + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The status property + public global::Ayllu.Github.Client.Models.SecurityAndAnalysis_advanced_security_status? Status { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public SecurityAndAnalysis_advanced_security() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.SecurityAndAnalysis_advanced_security CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.SecurityAndAnalysis_advanced_security(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "status", n => { Status = n.GetEnumValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteEnumValue("status", Status); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/SecurityAndAnalysis_advanced_security_status.cs b/src/Ayllu.Github.Client/Github/Client/Models/SecurityAndAnalysis_advanced_security_status.cs new file mode 100644 index 0000000..97f9d2c --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/SecurityAndAnalysis_advanced_security_status.cs @@ -0,0 +1,20 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public enum SecurityAndAnalysis_advanced_security_status + #pragma warning restore CS1591 + { + [EnumMember(Value = "enabled")] + #pragma warning disable CS1591 + Enabled, + #pragma warning restore CS1591 + [EnumMember(Value = "disabled")] + #pragma warning disable CS1591 + Disabled, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Models/SecurityAndAnalysis_code_security.cs b/src/Ayllu.Github.Client/Github/Client/Models/SecurityAndAnalysis_code_security.cs new file mode 100644 index 0000000..f58b670 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/SecurityAndAnalysis_code_security.cs @@ -0,0 +1,59 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class SecurityAndAnalysis_code_security : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The status property + public global::Ayllu.Github.Client.Models.SecurityAndAnalysis_code_security_status? Status { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public SecurityAndAnalysis_code_security() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.SecurityAndAnalysis_code_security CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.SecurityAndAnalysis_code_security(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "status", n => { Status = n.GetEnumValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteEnumValue("status", Status); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/SecurityAndAnalysis_code_security_status.cs b/src/Ayllu.Github.Client/Github/Client/Models/SecurityAndAnalysis_code_security_status.cs new file mode 100644 index 0000000..b64abdb --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/SecurityAndAnalysis_code_security_status.cs @@ -0,0 +1,20 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public enum SecurityAndAnalysis_code_security_status + #pragma warning restore CS1591 + { + [EnumMember(Value = "enabled")] + #pragma warning disable CS1591 + Enabled, + #pragma warning restore CS1591 + [EnumMember(Value = "disabled")] + #pragma warning disable CS1591 + Disabled, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Models/SecurityAndAnalysis_dependabot_security_updates.cs b/src/Ayllu.Github.Client/Github/Client/Models/SecurityAndAnalysis_dependabot_security_updates.cs new file mode 100644 index 0000000..c9cb759 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/SecurityAndAnalysis_dependabot_security_updates.cs @@ -0,0 +1,60 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + /// + /// Enable or disable Dependabot security updates for the repository. + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class SecurityAndAnalysis_dependabot_security_updates : IAdditionalDataHolder, IParsable + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The enablement status of Dependabot security updates for the repository. + public global::Ayllu.Github.Client.Models.SecurityAndAnalysis_dependabot_security_updates_status? Status { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public SecurityAndAnalysis_dependabot_security_updates() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.SecurityAndAnalysis_dependabot_security_updates CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.SecurityAndAnalysis_dependabot_security_updates(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "status", n => { Status = n.GetEnumValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteEnumValue("status", Status); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/SecurityAndAnalysis_dependabot_security_updates_status.cs b/src/Ayllu.Github.Client/Github/Client/Models/SecurityAndAnalysis_dependabot_security_updates_status.cs new file mode 100644 index 0000000..181cac9 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/SecurityAndAnalysis_dependabot_security_updates_status.cs @@ -0,0 +1,19 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Models +{ + /// The enablement status of Dependabot security updates for the repository. + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public enum SecurityAndAnalysis_dependabot_security_updates_status + { + [EnumMember(Value = "enabled")] + #pragma warning disable CS1591 + Enabled, + #pragma warning restore CS1591 + [EnumMember(Value = "disabled")] + #pragma warning disable CS1591 + Disabled, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Models/SecurityAndAnalysis_secret_scanning.cs b/src/Ayllu.Github.Client/Github/Client/Models/SecurityAndAnalysis_secret_scanning.cs new file mode 100644 index 0000000..dc68db2 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/SecurityAndAnalysis_secret_scanning.cs @@ -0,0 +1,59 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class SecurityAndAnalysis_secret_scanning : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The status property + public global::Ayllu.Github.Client.Models.SecurityAndAnalysis_secret_scanning_status? Status { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public SecurityAndAnalysis_secret_scanning() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.SecurityAndAnalysis_secret_scanning CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.SecurityAndAnalysis_secret_scanning(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "status", n => { Status = n.GetEnumValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteEnumValue("status", Status); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/SecurityAndAnalysis_secret_scanning_ai_detection.cs b/src/Ayllu.Github.Client/Github/Client/Models/SecurityAndAnalysis_secret_scanning_ai_detection.cs new file mode 100644 index 0000000..d45e5a7 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/SecurityAndAnalysis_secret_scanning_ai_detection.cs @@ -0,0 +1,59 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class SecurityAndAnalysis_secret_scanning_ai_detection : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The status property + public global::Ayllu.Github.Client.Models.SecurityAndAnalysis_secret_scanning_ai_detection_status? Status { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public SecurityAndAnalysis_secret_scanning_ai_detection() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.SecurityAndAnalysis_secret_scanning_ai_detection CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.SecurityAndAnalysis_secret_scanning_ai_detection(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "status", n => { Status = n.GetEnumValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteEnumValue("status", Status); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/SecurityAndAnalysis_secret_scanning_ai_detection_status.cs b/src/Ayllu.Github.Client/Github/Client/Models/SecurityAndAnalysis_secret_scanning_ai_detection_status.cs new file mode 100644 index 0000000..1c1f734 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/SecurityAndAnalysis_secret_scanning_ai_detection_status.cs @@ -0,0 +1,20 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public enum SecurityAndAnalysis_secret_scanning_ai_detection_status + #pragma warning restore CS1591 + { + [EnumMember(Value = "enabled")] + #pragma warning disable CS1591 + Enabled, + #pragma warning restore CS1591 + [EnumMember(Value = "disabled")] + #pragma warning disable CS1591 + Disabled, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Models/SecurityAndAnalysis_secret_scanning_non_provider_patterns.cs b/src/Ayllu.Github.Client/Github/Client/Models/SecurityAndAnalysis_secret_scanning_non_provider_patterns.cs new file mode 100644 index 0000000..1b9fab4 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/SecurityAndAnalysis_secret_scanning_non_provider_patterns.cs @@ -0,0 +1,59 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class SecurityAndAnalysis_secret_scanning_non_provider_patterns : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The status property + public global::Ayllu.Github.Client.Models.SecurityAndAnalysis_secret_scanning_non_provider_patterns_status? Status { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public SecurityAndAnalysis_secret_scanning_non_provider_patterns() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.SecurityAndAnalysis_secret_scanning_non_provider_patterns CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.SecurityAndAnalysis_secret_scanning_non_provider_patterns(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "status", n => { Status = n.GetEnumValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteEnumValue("status", Status); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/SecurityAndAnalysis_secret_scanning_non_provider_patterns_status.cs b/src/Ayllu.Github.Client/Github/Client/Models/SecurityAndAnalysis_secret_scanning_non_provider_patterns_status.cs new file mode 100644 index 0000000..aea60b4 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/SecurityAndAnalysis_secret_scanning_non_provider_patterns_status.cs @@ -0,0 +1,20 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public enum SecurityAndAnalysis_secret_scanning_non_provider_patterns_status + #pragma warning restore CS1591 + { + [EnumMember(Value = "enabled")] + #pragma warning disable CS1591 + Enabled, + #pragma warning restore CS1591 + [EnumMember(Value = "disabled")] + #pragma warning disable CS1591 + Disabled, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Models/SecurityAndAnalysis_secret_scanning_push_protection.cs b/src/Ayllu.Github.Client/Github/Client/Models/SecurityAndAnalysis_secret_scanning_push_protection.cs new file mode 100644 index 0000000..c52db51 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/SecurityAndAnalysis_secret_scanning_push_protection.cs @@ -0,0 +1,59 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class SecurityAndAnalysis_secret_scanning_push_protection : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The status property + public global::Ayllu.Github.Client.Models.SecurityAndAnalysis_secret_scanning_push_protection_status? Status { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public SecurityAndAnalysis_secret_scanning_push_protection() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.SecurityAndAnalysis_secret_scanning_push_protection CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.SecurityAndAnalysis_secret_scanning_push_protection(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "status", n => { Status = n.GetEnumValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteEnumValue("status", Status); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/SecurityAndAnalysis_secret_scanning_push_protection_status.cs b/src/Ayllu.Github.Client/Github/Client/Models/SecurityAndAnalysis_secret_scanning_push_protection_status.cs new file mode 100644 index 0000000..a135596 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/SecurityAndAnalysis_secret_scanning_push_protection_status.cs @@ -0,0 +1,20 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public enum SecurityAndAnalysis_secret_scanning_push_protection_status + #pragma warning restore CS1591 + { + [EnumMember(Value = "enabled")] + #pragma warning disable CS1591 + Enabled, + #pragma warning restore CS1591 + [EnumMember(Value = "disabled")] + #pragma warning disable CS1591 + Disabled, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Models/SecurityAndAnalysis_secret_scanning_status.cs b/src/Ayllu.Github.Client/Github/Client/Models/SecurityAndAnalysis_secret_scanning_status.cs new file mode 100644 index 0000000..109170f --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/SecurityAndAnalysis_secret_scanning_status.cs @@ -0,0 +1,20 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public enum SecurityAndAnalysis_secret_scanning_status + #pragma warning restore CS1591 + { + [EnumMember(Value = "enabled")] + #pragma warning disable CS1591 + Enabled, + #pragma warning restore CS1591 + [EnumMember(Value = "disabled")] + #pragma warning disable CS1591 + Disabled, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Models/SelectedActions.cs b/src/Ayllu.Github.Client/Github/Client/Models/SelectedActions.cs new file mode 100644 index 0000000..7ad14bd --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/SelectedActions.cs @@ -0,0 +1,73 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class SelectedActions : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// Whether GitHub-owned actions are allowed. For example, this includes the actions in the `actions` organization. + public bool? GithubOwnedAllowed { get; set; } + /// 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/*`.> [!NOTE]> The `patterns_allowed` setting only applies to public repositories. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? PatternsAllowed { get; set; } +#nullable restore +#else + public List PatternsAllowed { get; set; } +#endif + /// Whether actions from GitHub Marketplace verified creators are allowed. Set to `true` to allow all actions by GitHub Marketplace verified creators. + public bool? VerifiedAllowed { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public SelectedActions() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.SelectedActions CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.SelectedActions(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "github_owned_allowed", n => { GithubOwnedAllowed = n.GetBoolValue(); } }, + { "patterns_allowed", n => { PatternsAllowed = n.GetCollectionOfPrimitiveValues()?.AsList(); } }, + { "verified_allowed", n => { VerifiedAllowed = n.GetBoolValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteBoolValue("github_owned_allowed", GithubOwnedAllowed); + writer.WriteCollectionOfPrimitiveValues("patterns_allowed", PatternsAllowed); + writer.WriteBoolValue("verified_allowed", VerifiedAllowed); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/SelfHostedRunnersSettings.cs b/src/Ayllu.Github.Client/Github/Client/Models/SelfHostedRunnersSettings.cs new file mode 100644 index 0000000..215ab4b --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/SelfHostedRunnersSettings.cs @@ -0,0 +1,69 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class SelfHostedRunnersSettings : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The policy that controls whether self-hosted runners can be used by repositories in the organization + public global::Ayllu.Github.Client.Models.SelfHostedRunnersSettings_enabled_repositories? EnabledRepositories { get; set; } + /// The URL to the endpoint for managing selected repositories for self-hosted runners in the organization +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? SelectedRepositoriesUrl { get; set; } +#nullable restore +#else + public string SelectedRepositoriesUrl { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public SelfHostedRunnersSettings() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.SelfHostedRunnersSettings CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.SelfHostedRunnersSettings(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "enabled_repositories", n => { EnabledRepositories = n.GetEnumValue(); } }, + { "selected_repositories_url", n => { SelectedRepositoriesUrl = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteEnumValue("enabled_repositories", EnabledRepositories); + writer.WriteStringValue("selected_repositories_url", SelectedRepositoriesUrl); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/SelfHostedRunnersSettings_enabled_repositories.cs b/src/Ayllu.Github.Client/Github/Client/Models/SelfHostedRunnersSettings_enabled_repositories.cs new file mode 100644 index 0000000..2bfbb95 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/SelfHostedRunnersSettings_enabled_repositories.cs @@ -0,0 +1,23 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Models +{ + /// The policy that controls whether self-hosted runners can be used by repositories in the organization + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public enum SelfHostedRunnersSettings_enabled_repositories + { + [EnumMember(Value = "all")] + #pragma warning disable CS1591 + All, + #pragma warning restore CS1591 + [EnumMember(Value = "selected")] + #pragma warning disable CS1591 + Selected, + #pragma warning restore CS1591 + [EnumMember(Value = "none")] + #pragma warning disable CS1591 + None, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Models/ShortBlob.cs b/src/Ayllu.Github.Client/Github/Client/Models/ShortBlob.cs new file mode 100644 index 0000000..2ced399 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/ShortBlob.cs @@ -0,0 +1,76 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + /// + /// Short Blob + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class ShortBlob : IAdditionalDataHolder, IParsable + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The sha property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Sha { get; set; } +#nullable restore +#else + public string Sha { get; set; } +#endif + /// The url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Url { get; set; } +#nullable restore +#else + public string Url { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public ShortBlob() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.ShortBlob CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.ShortBlob(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "sha", n => { Sha = n.GetStringValue(); } }, + { "url", n => { Url = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("sha", Sha); + writer.WriteStringValue("url", Url); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/ShortBranch.cs b/src/Ayllu.Github.Client/Github/Client/Models/ShortBranch.cs new file mode 100644 index 0000000..261f6d6 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/ShortBranch.cs @@ -0,0 +1,100 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + /// + /// Short Branch + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class ShortBranch : IAdditionalDataHolder, IParsable + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The commit property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.ShortBranch_commit? Commit { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.ShortBranch_commit Commit { get; set; } +#endif + /// The name property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Name { get; set; } +#nullable restore +#else + public string Name { get; set; } +#endif + /// The protected property + public bool? Protected { get; set; } + /// Branch Protection +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.BranchProtection? Protection { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.BranchProtection Protection { get; set; } +#endif + /// The protection_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? ProtectionUrl { get; set; } +#nullable restore +#else + public string ProtectionUrl { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public ShortBranch() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.ShortBranch CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.ShortBranch(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "commit", n => { Commit = n.GetObjectValue(global::Ayllu.Github.Client.Models.ShortBranch_commit.CreateFromDiscriminatorValue); } }, + { "name", n => { Name = n.GetStringValue(); } }, + { "protected", n => { Protected = n.GetBoolValue(); } }, + { "protection", n => { Protection = n.GetObjectValue(global::Ayllu.Github.Client.Models.BranchProtection.CreateFromDiscriminatorValue); } }, + { "protection_url", n => { ProtectionUrl = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteObjectValue("commit", Commit); + writer.WriteStringValue("name", Name); + writer.WriteBoolValue("protected", Protected); + writer.WriteObjectValue("protection", Protection); + writer.WriteStringValue("protection_url", ProtectionUrl); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/ShortBranch_commit.cs b/src/Ayllu.Github.Client/Github/Client/Models/ShortBranch_commit.cs new file mode 100644 index 0000000..8331960 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/ShortBranch_commit.cs @@ -0,0 +1,75 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class ShortBranch_commit : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The sha property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Sha { get; set; } +#nullable restore +#else + public string Sha { get; set; } +#endif + /// The url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Url { get; set; } +#nullable restore +#else + public string Url { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public ShortBranch_commit() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.ShortBranch_commit CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.ShortBranch_commit(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "sha", n => { Sha = n.GetStringValue(); } }, + { "url", n => { Url = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("sha", Sha); + writer.WriteStringValue("url", Url); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/SimpleClassroom.cs b/src/Ayllu.Github.Client/Github/Client/Models/SimpleClassroom.cs new file mode 100644 index 0000000..3001f15 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/SimpleClassroom.cs @@ -0,0 +1,84 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + /// + /// A GitHub Classroom classroom + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class SimpleClassroom : IAdditionalDataHolder, IParsable + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// Returns whether classroom is archived or not. + public bool? Archived { get; set; } + /// Unique identifier of the classroom. + public int? Id { get; set; } + /// The name of the classroom. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Name { get; set; } +#nullable restore +#else + public string Name { get; set; } +#endif + /// The url of the classroom on GitHub Classroom. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Url { get; set; } +#nullable restore +#else + public string Url { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public SimpleClassroom() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.SimpleClassroom CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.SimpleClassroom(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "archived", n => { Archived = n.GetBoolValue(); } }, + { "id", n => { Id = n.GetIntValue(); } }, + { "name", n => { Name = n.GetStringValue(); } }, + { "url", n => { Url = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteBoolValue("archived", Archived); + writer.WriteIntValue("id", Id); + writer.WriteStringValue("name", Name); + writer.WriteStringValue("url", Url); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/SimpleClassroomAssignment.cs b/src/Ayllu.Github.Client/Github/Client/Models/SimpleClassroomAssignment.cs new file mode 100644 index 0000000..b1e3f9a --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/SimpleClassroomAssignment.cs @@ -0,0 +1,164 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + /// + /// A GitHub Classroom assignment + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class SimpleClassroomAssignment : IAdditionalDataHolder, IParsable + { + /// The number of students that have accepted the assignment. + public int? Accepted { get; set; } + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// A GitHub Classroom classroom +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.SimpleClassroom? Classroom { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.SimpleClassroom Classroom { get; set; } +#endif + /// The time at which the assignment is due. + public DateTimeOffset? Deadline { get; set; } + /// The selected editor for the assignment. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Editor { get; set; } +#nullable restore +#else + public string Editor { get; set; } +#endif + /// Whether feedback pull request will be created on assignment acceptance. + public bool? FeedbackPullRequestsEnabled { get; set; } + /// Unique identifier of the repository. + public int? Id { get; set; } + /// Whether the invitation link is enabled. Visiting an enabled invitation link will accept the assignment. + public bool? InvitationsEnabled { get; set; } + /// The link that a student can use to accept the assignment. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? InviteLink { get; set; } +#nullable restore +#else + public string InviteLink { get; set; } +#endif + /// The programming language used in the assignment. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Language { get; set; } +#nullable restore +#else + public string Language { get; set; } +#endif + /// The maximum allowable members per team. + public int? MaxMembers { get; set; } + /// The maximum allowable teams for the assignment. + public int? MaxTeams { get; set; } + /// The number of students that have passed the assignment. + public int? Passing { get; set; } + /// Whether an accepted assignment creates a public repository. + public bool? PublicRepo { get; set; } + /// Sluggified name of the assignment. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Slug { get; set; } +#nullable restore +#else + public string Slug { get; set; } +#endif + /// Whether students are admins on created repository on accepted assignment. + public bool? StudentsAreRepoAdmins { get; set; } + /// The number of students that have submitted the assignment. + public int? Submitted { get; set; } + /// Assignment title. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Title { get; set; } +#nullable restore +#else + public string Title { get; set; } +#endif + /// Whether it's a Group Assignment or Individual Assignment. + public global::Ayllu.Github.Client.Models.SimpleClassroomAssignment_type? Type { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public SimpleClassroomAssignment() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.SimpleClassroomAssignment CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.SimpleClassroomAssignment(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "accepted", n => { Accepted = n.GetIntValue(); } }, + { "classroom", n => { Classroom = n.GetObjectValue(global::Ayllu.Github.Client.Models.SimpleClassroom.CreateFromDiscriminatorValue); } }, + { "deadline", n => { Deadline = n.GetDateTimeOffsetValue(); } }, + { "editor", n => { Editor = n.GetStringValue(); } }, + { "feedback_pull_requests_enabled", n => { FeedbackPullRequestsEnabled = n.GetBoolValue(); } }, + { "id", n => { Id = n.GetIntValue(); } }, + { "invitations_enabled", n => { InvitationsEnabled = n.GetBoolValue(); } }, + { "invite_link", n => { InviteLink = n.GetStringValue(); } }, + { "language", n => { Language = n.GetStringValue(); } }, + { "max_members", n => { MaxMembers = n.GetIntValue(); } }, + { "max_teams", n => { MaxTeams = n.GetIntValue(); } }, + { "passing", n => { Passing = n.GetIntValue(); } }, + { "public_repo", n => { PublicRepo = n.GetBoolValue(); } }, + { "slug", n => { Slug = n.GetStringValue(); } }, + { "students_are_repo_admins", n => { StudentsAreRepoAdmins = n.GetBoolValue(); } }, + { "submitted", n => { Submitted = n.GetIntValue(); } }, + { "title", n => { Title = n.GetStringValue(); } }, + { "type", n => { Type = n.GetEnumValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteIntValue("accepted", Accepted); + writer.WriteObjectValue("classroom", Classroom); + writer.WriteDateTimeOffsetValue("deadline", Deadline); + writer.WriteStringValue("editor", Editor); + writer.WriteBoolValue("feedback_pull_requests_enabled", FeedbackPullRequestsEnabled); + writer.WriteIntValue("id", Id); + writer.WriteBoolValue("invitations_enabled", InvitationsEnabled); + writer.WriteStringValue("invite_link", InviteLink); + writer.WriteStringValue("language", Language); + writer.WriteIntValue("max_members", MaxMembers); + writer.WriteIntValue("max_teams", MaxTeams); + writer.WriteIntValue("passing", Passing); + writer.WriteBoolValue("public_repo", PublicRepo); + writer.WriteStringValue("slug", Slug); + writer.WriteBoolValue("students_are_repo_admins", StudentsAreRepoAdmins); + writer.WriteIntValue("submitted", Submitted); + writer.WriteStringValue("title", Title); + writer.WriteEnumValue("type", Type); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/SimpleClassroomAssignment_type.cs b/src/Ayllu.Github.Client/Github/Client/Models/SimpleClassroomAssignment_type.cs new file mode 100644 index 0000000..d666386 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/SimpleClassroomAssignment_type.cs @@ -0,0 +1,19 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Models +{ + /// Whether it's a Group Assignment or Individual Assignment. + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public enum SimpleClassroomAssignment_type + { + [EnumMember(Value = "individual")] + #pragma warning disable CS1591 + Individual, + #pragma warning restore CS1591 + [EnumMember(Value = "group")] + #pragma warning disable CS1591 + Group, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Models/SimpleClassroomOrganization.cs b/src/Ayllu.Github.Client/Github/Client/Models/SimpleClassroomOrganization.cs new file mode 100644 index 0000000..5d32d0c --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/SimpleClassroomOrganization.cs @@ -0,0 +1,110 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + /// + /// A GitHub organization. + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class SimpleClassroomOrganization : IAdditionalDataHolder, IParsable + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The avatar_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? AvatarUrl { get; set; } +#nullable restore +#else + public string AvatarUrl { get; set; } +#endif + /// The html_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? HtmlUrl { get; set; } +#nullable restore +#else + public string HtmlUrl { get; set; } +#endif + /// The id property + public int? Id { get; set; } + /// The login property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Login { get; set; } +#nullable restore +#else + public string Login { get; set; } +#endif + /// The name property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Name { get; set; } +#nullable restore +#else + public string Name { get; set; } +#endif + /// The node_id property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? NodeId { get; set; } +#nullable restore +#else + public string NodeId { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public SimpleClassroomOrganization() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.SimpleClassroomOrganization CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.SimpleClassroomOrganization(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "avatar_url", n => { AvatarUrl = n.GetStringValue(); } }, + { "html_url", n => { HtmlUrl = n.GetStringValue(); } }, + { "id", n => { Id = n.GetIntValue(); } }, + { "login", n => { Login = n.GetStringValue(); } }, + { "name", n => { Name = n.GetStringValue(); } }, + { "node_id", n => { NodeId = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("avatar_url", AvatarUrl); + writer.WriteStringValue("html_url", HtmlUrl); + writer.WriteIntValue("id", Id); + writer.WriteStringValue("login", Login); + writer.WriteStringValue("name", Name); + writer.WriteStringValue("node_id", NodeId); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/SimpleClassroomRepository.cs b/src/Ayllu.Github.Client/Github/Client/Models/SimpleClassroomRepository.cs new file mode 100644 index 0000000..de01b6a --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/SimpleClassroomRepository.cs @@ -0,0 +1,104 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + /// + /// A GitHub repository view for Classroom + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class SimpleClassroomRepository : IAdditionalDataHolder, IParsable + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The default branch for the repository. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? DefaultBranch { get; set; } +#nullable restore +#else + public string DefaultBranch { get; set; } +#endif + /// The full, globally unique name of the repository. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? FullName { get; set; } +#nullable restore +#else + public string FullName { get; set; } +#endif + /// The URL to view the repository on GitHub.com. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? HtmlUrl { get; set; } +#nullable restore +#else + public string HtmlUrl { get; set; } +#endif + /// A unique identifier of the repository. + public int? Id { get; set; } + /// The GraphQL identifier of the repository. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? NodeId { get; set; } +#nullable restore +#else + public string NodeId { get; set; } +#endif + /// Whether the repository is private. + public bool? Private { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public SimpleClassroomRepository() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.SimpleClassroomRepository CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.SimpleClassroomRepository(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "default_branch", n => { DefaultBranch = n.GetStringValue(); } }, + { "full_name", n => { FullName = n.GetStringValue(); } }, + { "html_url", n => { HtmlUrl = n.GetStringValue(); } }, + { "id", n => { Id = n.GetIntValue(); } }, + { "node_id", n => { NodeId = n.GetStringValue(); } }, + { "private", n => { Private = n.GetBoolValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("default_branch", DefaultBranch); + writer.WriteStringValue("full_name", FullName); + writer.WriteStringValue("html_url", HtmlUrl); + writer.WriteIntValue("id", Id); + writer.WriteStringValue("node_id", NodeId); + writer.WriteBoolValue("private", Private); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/SimpleClassroomUser.cs b/src/Ayllu.Github.Client/Github/Client/Models/SimpleClassroomUser.cs new file mode 100644 index 0000000..23c7126 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/SimpleClassroomUser.cs @@ -0,0 +1,90 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + /// + /// A GitHub user simplified for Classroom. + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class SimpleClassroomUser : IAdditionalDataHolder, IParsable + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The avatar_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? AvatarUrl { get; set; } +#nullable restore +#else + public string AvatarUrl { get; set; } +#endif + /// The html_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? HtmlUrl { get; set; } +#nullable restore +#else + public string HtmlUrl { get; set; } +#endif + /// The id property + public int? Id { get; set; } + /// The login property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Login { get; set; } +#nullable restore +#else + public string Login { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public SimpleClassroomUser() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.SimpleClassroomUser CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.SimpleClassroomUser(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "avatar_url", n => { AvatarUrl = n.GetStringValue(); } }, + { "html_url", n => { HtmlUrl = n.GetStringValue(); } }, + { "id", n => { Id = n.GetIntValue(); } }, + { "login", n => { Login = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("avatar_url", AvatarUrl); + writer.WriteStringValue("html_url", HtmlUrl); + writer.WriteIntValue("id", Id); + writer.WriteStringValue("login", Login); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/SimpleCommit.cs b/src/Ayllu.Github.Client/Github/Client/Models/SimpleCommit.cs new file mode 100644 index 0000000..1c53322 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/SimpleCommit.cs @@ -0,0 +1,110 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + /// + /// A commit. + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class SimpleCommit : IAdditionalDataHolder, IParsable + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// Information about the Git author +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.SimpleCommit_author? Author { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.SimpleCommit_author Author { get; set; } +#endif + /// Information about the Git committer +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.SimpleCommit_committer? Committer { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.SimpleCommit_committer Committer { get; set; } +#endif + /// SHA for the commit +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Id { get; set; } +#nullable restore +#else + public string Id { get; set; } +#endif + /// Message describing the purpose of the commit +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Message { get; set; } +#nullable restore +#else + public string Message { get; set; } +#endif + /// Timestamp of the commit + public DateTimeOffset? Timestamp { get; set; } + /// SHA for the commit's tree +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? TreeId { get; set; } +#nullable restore +#else + public string TreeId { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public SimpleCommit() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.SimpleCommit CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.SimpleCommit(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "author", n => { Author = n.GetObjectValue(global::Ayllu.Github.Client.Models.SimpleCommit_author.CreateFromDiscriminatorValue); } }, + { "committer", n => { Committer = n.GetObjectValue(global::Ayllu.Github.Client.Models.SimpleCommit_committer.CreateFromDiscriminatorValue); } }, + { "id", n => { Id = n.GetStringValue(); } }, + { "message", n => { Message = n.GetStringValue(); } }, + { "timestamp", n => { Timestamp = n.GetDateTimeOffsetValue(); } }, + { "tree_id", n => { TreeId = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteObjectValue("author", Author); + writer.WriteObjectValue("committer", Committer); + writer.WriteStringValue("id", Id); + writer.WriteStringValue("message", Message); + writer.WriteDateTimeOffsetValue("timestamp", Timestamp); + writer.WriteStringValue("tree_id", TreeId); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/SimpleCommitStatus.cs b/src/Ayllu.Github.Client/Github/Client/Models/SimpleCommitStatus.cs new file mode 100644 index 0000000..c7dee52 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/SimpleCommitStatus.cs @@ -0,0 +1,141 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class SimpleCommitStatus : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The avatar_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? AvatarUrl { get; set; } +#nullable restore +#else + public string AvatarUrl { get; set; } +#endif + /// The context property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Context { get; set; } +#nullable restore +#else + public string Context { get; set; } +#endif + /// The created_at property + public DateTimeOffset? CreatedAt { get; set; } + /// The description property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Description { get; set; } +#nullable restore +#else + public string Description { get; set; } +#endif + /// The id property + public int? Id { get; set; } + /// The node_id property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? NodeId { get; set; } +#nullable restore +#else + public string NodeId { get; set; } +#endif + /// The required property + public bool? Required { get; set; } + /// The state property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? State { get; set; } +#nullable restore +#else + public string State { get; set; } +#endif + /// The target_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? TargetUrl { get; set; } +#nullable restore +#else + public string TargetUrl { get; set; } +#endif + /// The updated_at property + public DateTimeOffset? UpdatedAt { get; set; } + /// The url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Url { get; set; } +#nullable restore +#else + public string Url { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public SimpleCommitStatus() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.SimpleCommitStatus CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.SimpleCommitStatus(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "avatar_url", n => { AvatarUrl = n.GetStringValue(); } }, + { "context", n => { Context = n.GetStringValue(); } }, + { "created_at", n => { CreatedAt = n.GetDateTimeOffsetValue(); } }, + { "description", n => { Description = n.GetStringValue(); } }, + { "id", n => { Id = n.GetIntValue(); } }, + { "node_id", n => { NodeId = n.GetStringValue(); } }, + { "required", n => { Required = n.GetBoolValue(); } }, + { "state", n => { State = n.GetStringValue(); } }, + { "target_url", n => { TargetUrl = n.GetStringValue(); } }, + { "updated_at", n => { UpdatedAt = n.GetDateTimeOffsetValue(); } }, + { "url", n => { Url = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("avatar_url", AvatarUrl); + writer.WriteStringValue("context", Context); + writer.WriteDateTimeOffsetValue("created_at", CreatedAt); + writer.WriteStringValue("description", Description); + writer.WriteIntValue("id", Id); + writer.WriteStringValue("node_id", NodeId); + writer.WriteBoolValue("required", Required); + writer.WriteStringValue("state", State); + writer.WriteStringValue("target_url", TargetUrl); + writer.WriteDateTimeOffsetValue("updated_at", UpdatedAt); + writer.WriteStringValue("url", Url); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/SimpleCommit_author.cs b/src/Ayllu.Github.Client/Github/Client/Models/SimpleCommit_author.cs new file mode 100644 index 0000000..e3711d7 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/SimpleCommit_author.cs @@ -0,0 +1,76 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + /// + /// Information about the Git author + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class SimpleCommit_author : IAdditionalDataHolder, IParsable + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// Git email address of the commit's author +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Email { get; set; } +#nullable restore +#else + public string Email { get; set; } +#endif + /// Name of the commit's author +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Name { get; set; } +#nullable restore +#else + public string Name { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public SimpleCommit_author() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.SimpleCommit_author CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.SimpleCommit_author(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "email", n => { Email = n.GetStringValue(); } }, + { "name", n => { Name = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("email", Email); + writer.WriteStringValue("name", Name); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/SimpleCommit_committer.cs b/src/Ayllu.Github.Client/Github/Client/Models/SimpleCommit_committer.cs new file mode 100644 index 0000000..b929594 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/SimpleCommit_committer.cs @@ -0,0 +1,76 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + /// + /// Information about the Git committer + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class SimpleCommit_committer : IAdditionalDataHolder, IParsable + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// Git email address of the commit's committer +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Email { get; set; } +#nullable restore +#else + public string Email { get; set; } +#endif + /// Name of the commit's committer +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Name { get; set; } +#nullable restore +#else + public string Name { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public SimpleCommit_committer() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.SimpleCommit_committer CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.SimpleCommit_committer(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "email", n => { Email = n.GetStringValue(); } }, + { "name", n => { Name = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("email", Email); + writer.WriteStringValue("name", Name); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/SimpleRepository.cs b/src/Ayllu.Github.Client/Github/Client/Models/SimpleRepository.cs new file mode 100644 index 0000000..ecd00a9 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/SimpleRepository.cs @@ -0,0 +1,498 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + /// + /// A GitHub repository. + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class SimpleRepository : IAdditionalDataHolder, IParsable + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// A template for the API URL to download the repository as an archive. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? ArchiveUrl { get; set; } +#nullable restore +#else + public string ArchiveUrl { get; set; } +#endif + /// A template for the API URL to list the available assignees for issues in the repository. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? AssigneesUrl { get; set; } +#nullable restore +#else + public string AssigneesUrl { get; set; } +#endif + /// A template for the API URL to create or retrieve a raw Git blob in the repository. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? BlobsUrl { get; set; } +#nullable restore +#else + public string BlobsUrl { get; set; } +#endif + /// A template for the API URL to get information about branches in the repository. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? BranchesUrl { get; set; } +#nullable restore +#else + public string BranchesUrl { get; set; } +#endif + /// A template for the API URL to get information about collaborators of the repository. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? CollaboratorsUrl { get; set; } +#nullable restore +#else + public string CollaboratorsUrl { get; set; } +#endif + /// A template for the API URL to get information about comments on the repository. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? CommentsUrl { get; set; } +#nullable restore +#else + public string CommentsUrl { get; set; } +#endif + /// A template for the API URL to get information about commits on the repository. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? CommitsUrl { get; set; } +#nullable restore +#else + public string CommitsUrl { get; set; } +#endif + /// A template for the API URL to compare two commits or refs. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? CompareUrl { get; set; } +#nullable restore +#else + public string CompareUrl { get; set; } +#endif + /// A template for the API URL to get the contents of the repository. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? ContentsUrl { get; set; } +#nullable restore +#else + public string ContentsUrl { get; set; } +#endif + /// A template for the API URL to list the contributors to the repository. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? ContributorsUrl { get; set; } +#nullable restore +#else + public string ContributorsUrl { get; set; } +#endif + /// The API URL to list the deployments of the repository. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? DeploymentsUrl { get; set; } +#nullable restore +#else + public string DeploymentsUrl { get; set; } +#endif + /// The repository description. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Description { get; set; } +#nullable restore +#else + public string Description { get; set; } +#endif + /// The API URL to list the downloads on the repository. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? DownloadsUrl { get; set; } +#nullable restore +#else + public string DownloadsUrl { get; set; } +#endif + /// The API URL to list the events of the repository. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? EventsUrl { get; set; } +#nullable restore +#else + public string EventsUrl { get; set; } +#endif + /// Whether the repository is a fork. + public bool? Fork { get; set; } + /// The API URL to list the forks of the repository. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? ForksUrl { get; set; } +#nullable restore +#else + public string ForksUrl { get; set; } +#endif + /// The full, globally unique, name of the repository. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? FullName { get; set; } +#nullable restore +#else + public string FullName { get; set; } +#endif + /// A template for the API URL to get information about Git commits of the repository. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? GitCommitsUrl { get; set; } +#nullable restore +#else + public string GitCommitsUrl { get; set; } +#endif + /// A template for the API URL to get information about Git refs of the repository. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? GitRefsUrl { get; set; } +#nullable restore +#else + public string GitRefsUrl { get; set; } +#endif + /// A template for the API URL to get information about Git tags of the repository. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? GitTagsUrl { get; set; } +#nullable restore +#else + public string GitTagsUrl { get; set; } +#endif + /// The API URL to list the hooks on the repository. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? HooksUrl { get; set; } +#nullable restore +#else + public string HooksUrl { get; set; } +#endif + /// The URL to view the repository on GitHub.com. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? HtmlUrl { get; set; } +#nullable restore +#else + public string HtmlUrl { get; set; } +#endif + /// A unique identifier of the repository. + public long? Id { get; set; } + /// A template for the API URL to get information about issue comments on the repository. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? IssueCommentUrl { get; set; } +#nullable restore +#else + public string IssueCommentUrl { get; set; } +#endif + /// A template for the API URL to get information about issue events on the repository. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? IssueEventsUrl { get; set; } +#nullable restore +#else + public string IssueEventsUrl { get; set; } +#endif + /// A template for the API URL to get information about issues on the repository. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? IssuesUrl { get; set; } +#nullable restore +#else + public string IssuesUrl { get; set; } +#endif + /// A template for the API URL to get information about deploy keys on the repository. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? KeysUrl { get; set; } +#nullable restore +#else + public string KeysUrl { get; set; } +#endif + /// A template for the API URL to get information about labels of the repository. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? LabelsUrl { get; set; } +#nullable restore +#else + public string LabelsUrl { get; set; } +#endif + /// The API URL to get information about the languages of the repository. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? LanguagesUrl { get; set; } +#nullable restore +#else + public string LanguagesUrl { get; set; } +#endif + /// The API URL to merge branches in the repository. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? MergesUrl { get; set; } +#nullable restore +#else + public string MergesUrl { get; set; } +#endif + /// A template for the API URL to get information about milestones of the repository. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? MilestonesUrl { get; set; } +#nullable restore +#else + public string MilestonesUrl { get; set; } +#endif + /// The name of the repository. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Name { get; set; } +#nullable restore +#else + public string Name { get; set; } +#endif + /// The GraphQL identifier of the repository. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? NodeId { get; set; } +#nullable restore +#else + public string NodeId { get; set; } +#endif + /// A template for the API URL to get information about notifications on the repository. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? NotificationsUrl { get; set; } +#nullable restore +#else + public string NotificationsUrl { get; set; } +#endif + /// A GitHub user. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.SimpleUser? Owner { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.SimpleUser Owner { get; set; } +#endif + /// Whether the repository is private. + public bool? Private { get; set; } + /// A template for the API URL to get information about pull requests on the repository. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? PullsUrl { get; set; } +#nullable restore +#else + public string PullsUrl { get; set; } +#endif + /// A template for the API URL to get information about releases on the repository. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? ReleasesUrl { get; set; } +#nullable restore +#else + public string ReleasesUrl { get; set; } +#endif + /// The API URL to list the stargazers on the repository. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? StargazersUrl { get; set; } +#nullable restore +#else + public string StargazersUrl { get; set; } +#endif + /// A template for the API URL to get information about statuses of a commit. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? StatusesUrl { get; set; } +#nullable restore +#else + public string StatusesUrl { get; set; } +#endif + /// The API URL to list the subscribers on the repository. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? SubscribersUrl { get; set; } +#nullable restore +#else + public string SubscribersUrl { get; set; } +#endif + /// The API URL to subscribe to notifications for this repository. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? SubscriptionUrl { get; set; } +#nullable restore +#else + public string SubscriptionUrl { get; set; } +#endif + /// The API URL to get information about tags on the repository. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? TagsUrl { get; set; } +#nullable restore +#else + public string TagsUrl { get; set; } +#endif + /// The API URL to list the teams on the repository. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? TeamsUrl { get; set; } +#nullable restore +#else + public string TeamsUrl { get; set; } +#endif + /// A template for the API URL to create or retrieve a raw Git tree of the repository. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? TreesUrl { get; set; } +#nullable restore +#else + public string TreesUrl { get; set; } +#endif + /// The URL to get more information about the repository from the GitHub API. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Url { get; set; } +#nullable restore +#else + public string Url { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public SimpleRepository() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.SimpleRepository CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.SimpleRepository(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "archive_url", n => { ArchiveUrl = n.GetStringValue(); } }, + { "assignees_url", n => { AssigneesUrl = n.GetStringValue(); } }, + { "blobs_url", n => { BlobsUrl = n.GetStringValue(); } }, + { "branches_url", n => { BranchesUrl = n.GetStringValue(); } }, + { "collaborators_url", n => { CollaboratorsUrl = n.GetStringValue(); } }, + { "comments_url", n => { CommentsUrl = n.GetStringValue(); } }, + { "commits_url", n => { CommitsUrl = n.GetStringValue(); } }, + { "compare_url", n => { CompareUrl = n.GetStringValue(); } }, + { "contents_url", n => { ContentsUrl = n.GetStringValue(); } }, + { "contributors_url", n => { ContributorsUrl = n.GetStringValue(); } }, + { "deployments_url", n => { DeploymentsUrl = n.GetStringValue(); } }, + { "description", n => { Description = n.GetStringValue(); } }, + { "downloads_url", n => { DownloadsUrl = n.GetStringValue(); } }, + { "events_url", n => { EventsUrl = n.GetStringValue(); } }, + { "fork", n => { Fork = n.GetBoolValue(); } }, + { "forks_url", n => { ForksUrl = n.GetStringValue(); } }, + { "full_name", n => { FullName = n.GetStringValue(); } }, + { "git_commits_url", n => { GitCommitsUrl = n.GetStringValue(); } }, + { "git_refs_url", n => { GitRefsUrl = n.GetStringValue(); } }, + { "git_tags_url", n => { GitTagsUrl = n.GetStringValue(); } }, + { "hooks_url", n => { HooksUrl = n.GetStringValue(); } }, + { "html_url", n => { HtmlUrl = n.GetStringValue(); } }, + { "id", n => { Id = n.GetLongValue(); } }, + { "issue_comment_url", n => { IssueCommentUrl = n.GetStringValue(); } }, + { "issue_events_url", n => { IssueEventsUrl = n.GetStringValue(); } }, + { "issues_url", n => { IssuesUrl = n.GetStringValue(); } }, + { "keys_url", n => { KeysUrl = n.GetStringValue(); } }, + { "labels_url", n => { LabelsUrl = n.GetStringValue(); } }, + { "languages_url", n => { LanguagesUrl = n.GetStringValue(); } }, + { "merges_url", n => { MergesUrl = n.GetStringValue(); } }, + { "milestones_url", n => { MilestonesUrl = n.GetStringValue(); } }, + { "name", n => { Name = n.GetStringValue(); } }, + { "node_id", n => { NodeId = n.GetStringValue(); } }, + { "notifications_url", n => { NotificationsUrl = n.GetStringValue(); } }, + { "owner", n => { Owner = n.GetObjectValue(global::Ayllu.Github.Client.Models.SimpleUser.CreateFromDiscriminatorValue); } }, + { "private", n => { Private = n.GetBoolValue(); } }, + { "pulls_url", n => { PullsUrl = n.GetStringValue(); } }, + { "releases_url", n => { ReleasesUrl = n.GetStringValue(); } }, + { "stargazers_url", n => { StargazersUrl = n.GetStringValue(); } }, + { "statuses_url", n => { StatusesUrl = n.GetStringValue(); } }, + { "subscribers_url", n => { SubscribersUrl = n.GetStringValue(); } }, + { "subscription_url", n => { SubscriptionUrl = n.GetStringValue(); } }, + { "tags_url", n => { TagsUrl = n.GetStringValue(); } }, + { "teams_url", n => { TeamsUrl = n.GetStringValue(); } }, + { "trees_url", n => { TreesUrl = n.GetStringValue(); } }, + { "url", n => { Url = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("archive_url", ArchiveUrl); + writer.WriteStringValue("assignees_url", AssigneesUrl); + writer.WriteStringValue("blobs_url", BlobsUrl); + writer.WriteStringValue("branches_url", BranchesUrl); + writer.WriteStringValue("collaborators_url", CollaboratorsUrl); + writer.WriteStringValue("comments_url", CommentsUrl); + writer.WriteStringValue("commits_url", CommitsUrl); + writer.WriteStringValue("compare_url", CompareUrl); + writer.WriteStringValue("contents_url", ContentsUrl); + writer.WriteStringValue("contributors_url", ContributorsUrl); + writer.WriteStringValue("deployments_url", DeploymentsUrl); + writer.WriteStringValue("description", Description); + writer.WriteStringValue("downloads_url", DownloadsUrl); + writer.WriteStringValue("events_url", EventsUrl); + writer.WriteBoolValue("fork", Fork); + writer.WriteStringValue("forks_url", ForksUrl); + writer.WriteStringValue("full_name", FullName); + writer.WriteStringValue("git_commits_url", GitCommitsUrl); + writer.WriteStringValue("git_refs_url", GitRefsUrl); + writer.WriteStringValue("git_tags_url", GitTagsUrl); + writer.WriteStringValue("hooks_url", HooksUrl); + writer.WriteStringValue("html_url", HtmlUrl); + writer.WriteLongValue("id", Id); + writer.WriteStringValue("issue_comment_url", IssueCommentUrl); + writer.WriteStringValue("issue_events_url", IssueEventsUrl); + writer.WriteStringValue("issues_url", IssuesUrl); + writer.WriteStringValue("keys_url", KeysUrl); + writer.WriteStringValue("labels_url", LabelsUrl); + writer.WriteStringValue("languages_url", LanguagesUrl); + writer.WriteStringValue("merges_url", MergesUrl); + writer.WriteStringValue("milestones_url", MilestonesUrl); + writer.WriteStringValue("name", Name); + writer.WriteStringValue("node_id", NodeId); + writer.WriteStringValue("notifications_url", NotificationsUrl); + writer.WriteObjectValue("owner", Owner); + writer.WriteBoolValue("private", Private); + writer.WriteStringValue("pulls_url", PullsUrl); + writer.WriteStringValue("releases_url", ReleasesUrl); + writer.WriteStringValue("stargazers_url", StargazersUrl); + writer.WriteStringValue("statuses_url", StatusesUrl); + writer.WriteStringValue("subscribers_url", SubscribersUrl); + writer.WriteStringValue("subscription_url", SubscriptionUrl); + writer.WriteStringValue("tags_url", TagsUrl); + writer.WriteStringValue("teams_url", TeamsUrl); + writer.WriteStringValue("trees_url", TreesUrl); + writer.WriteStringValue("url", Url); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/SimpleUser.cs b/src/Ayllu.Github.Client/Github/Client/Models/SimpleUser.cs new file mode 100644 index 0000000..97ba776 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/SimpleUser.cs @@ -0,0 +1,264 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + /// + /// A GitHub user. + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class SimpleUser : IAdditionalDataHolder, IParsable + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The avatar_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? AvatarUrl { get; set; } +#nullable restore +#else + public string AvatarUrl { get; set; } +#endif + /// The email property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Email { get; set; } +#nullable restore +#else + public string Email { get; set; } +#endif + /// The events_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? EventsUrl { get; set; } +#nullable restore +#else + public string EventsUrl { get; set; } +#endif + /// The followers_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? FollowersUrl { get; set; } +#nullable restore +#else + public string FollowersUrl { get; set; } +#endif + /// The following_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? FollowingUrl { get; set; } +#nullable restore +#else + public string FollowingUrl { get; set; } +#endif + /// The gists_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? GistsUrl { get; set; } +#nullable restore +#else + public string GistsUrl { get; set; } +#endif + /// The gravatar_id property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? GravatarId { get; set; } +#nullable restore +#else + public string GravatarId { get; set; } +#endif + /// The html_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? HtmlUrl { get; set; } +#nullable restore +#else + public string HtmlUrl { get; set; } +#endif + /// The id property + public long? Id { get; set; } + /// The login property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Login { get; set; } +#nullable restore +#else + public string Login { get; set; } +#endif + /// The name property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Name { get; set; } +#nullable restore +#else + public string Name { get; set; } +#endif + /// The node_id property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? NodeId { get; set; } +#nullable restore +#else + public string NodeId { get; set; } +#endif + /// The organizations_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? OrganizationsUrl { get; set; } +#nullable restore +#else + public string OrganizationsUrl { get; set; } +#endif + /// The received_events_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? ReceivedEventsUrl { get; set; } +#nullable restore +#else + public string ReceivedEventsUrl { get; set; } +#endif + /// The repos_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? ReposUrl { get; set; } +#nullable restore +#else + public string ReposUrl { get; set; } +#endif + /// The site_admin property + public bool? SiteAdmin { get; set; } + /// The starred_at property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? StarredAt { get; set; } +#nullable restore +#else + public string StarredAt { get; set; } +#endif + /// The starred_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? StarredUrl { get; set; } +#nullable restore +#else + public string StarredUrl { get; set; } +#endif + /// The subscriptions_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? SubscriptionsUrl { get; set; } +#nullable restore +#else + public string SubscriptionsUrl { get; set; } +#endif + /// The type property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Type { get; set; } +#nullable restore +#else + public string Type { get; set; } +#endif + /// The url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Url { get; set; } +#nullable restore +#else + public string Url { get; set; } +#endif + /// The user_view_type property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? UserViewType { get; set; } +#nullable restore +#else + public string UserViewType { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public SimpleUser() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.SimpleUser CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.SimpleUser(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "avatar_url", n => { AvatarUrl = n.GetStringValue(); } }, + { "email", n => { Email = n.GetStringValue(); } }, + { "events_url", n => { EventsUrl = n.GetStringValue(); } }, + { "followers_url", n => { FollowersUrl = n.GetStringValue(); } }, + { "following_url", n => { FollowingUrl = n.GetStringValue(); } }, + { "gists_url", n => { GistsUrl = n.GetStringValue(); } }, + { "gravatar_id", n => { GravatarId = n.GetStringValue(); } }, + { "html_url", n => { HtmlUrl = n.GetStringValue(); } }, + { "id", n => { Id = n.GetLongValue(); } }, + { "login", n => { Login = n.GetStringValue(); } }, + { "name", n => { Name = n.GetStringValue(); } }, + { "node_id", n => { NodeId = n.GetStringValue(); } }, + { "organizations_url", n => { OrganizationsUrl = n.GetStringValue(); } }, + { "received_events_url", n => { ReceivedEventsUrl = n.GetStringValue(); } }, + { "repos_url", n => { ReposUrl = n.GetStringValue(); } }, + { "site_admin", n => { SiteAdmin = n.GetBoolValue(); } }, + { "starred_at", n => { StarredAt = n.GetStringValue(); } }, + { "starred_url", n => { StarredUrl = n.GetStringValue(); } }, + { "subscriptions_url", n => { SubscriptionsUrl = n.GetStringValue(); } }, + { "type", n => { Type = n.GetStringValue(); } }, + { "url", n => { Url = n.GetStringValue(); } }, + { "user_view_type", n => { UserViewType = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("avatar_url", AvatarUrl); + writer.WriteStringValue("email", Email); + writer.WriteStringValue("events_url", EventsUrl); + writer.WriteStringValue("followers_url", FollowersUrl); + writer.WriteStringValue("following_url", FollowingUrl); + writer.WriteStringValue("gists_url", GistsUrl); + writer.WriteStringValue("gravatar_id", GravatarId); + writer.WriteStringValue("html_url", HtmlUrl); + writer.WriteLongValue("id", Id); + writer.WriteStringValue("login", Login); + writer.WriteStringValue("name", Name); + writer.WriteStringValue("node_id", NodeId); + writer.WriteStringValue("organizations_url", OrganizationsUrl); + writer.WriteStringValue("received_events_url", ReceivedEventsUrl); + writer.WriteStringValue("repos_url", ReposUrl); + writer.WriteBoolValue("site_admin", SiteAdmin); + writer.WriteStringValue("starred_at", StarredAt); + writer.WriteStringValue("starred_url", StarredUrl); + writer.WriteStringValue("subscriptions_url", SubscriptionsUrl); + writer.WriteStringValue("type", Type); + writer.WriteStringValue("url", Url); + writer.WriteStringValue("user_view_type", UserViewType); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/Snapshot.cs b/src/Ayllu.Github.Client/Github/Client/Models/Snapshot.cs new file mode 100644 index 0000000..5eb8bde --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/Snapshot.cs @@ -0,0 +1,114 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + /// + /// Create a new snapshot of a repository's dependencies. + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class Snapshot : IParsable + { + /// A description of the detector used. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.Snapshot_detector? Detector { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.Snapshot_detector Detector { get; set; } +#endif + /// The job property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.Snapshot_job? Job { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.Snapshot_job Job { get; set; } +#endif + /// A collection of package manifests, which are a collection of related dependencies declared in a file or representing a logical group of dependencies. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.Snapshot_manifests? Manifests { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.Snapshot_manifests Manifests { get; set; } +#endif + /// User-defined metadata to store domain-specific information limited to 8 keys with scalar values. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.Metadata? Metadata { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.Metadata Metadata { get; set; } +#endif + /// The repository branch that triggered this snapshot. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Ref { get; set; } +#nullable restore +#else + public string Ref { get; set; } +#endif + /// The time at which the snapshot was scanned. + public DateTimeOffset? Scanned { get; set; } + /// The commit SHA associated with this dependency snapshot. Maximum length: 40 characters. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Sha { get; set; } +#nullable restore +#else + public string Sha { get; set; } +#endif + /// The version of the repository snapshot submission. + public int? Version { get; set; } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.Snapshot CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.Snapshot(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "detector", n => { Detector = n.GetObjectValue(global::Ayllu.Github.Client.Models.Snapshot_detector.CreateFromDiscriminatorValue); } }, + { "job", n => { Job = n.GetObjectValue(global::Ayllu.Github.Client.Models.Snapshot_job.CreateFromDiscriminatorValue); } }, + { "manifests", n => { Manifests = n.GetObjectValue(global::Ayllu.Github.Client.Models.Snapshot_manifests.CreateFromDiscriminatorValue); } }, + { "metadata", n => { Metadata = n.GetObjectValue(global::Ayllu.Github.Client.Models.Metadata.CreateFromDiscriminatorValue); } }, + { "ref", n => { Ref = n.GetStringValue(); } }, + { "scanned", n => { Scanned = n.GetDateTimeOffsetValue(); } }, + { "sha", n => { Sha = n.GetStringValue(); } }, + { "version", n => { Version = n.GetIntValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteObjectValue("detector", Detector); + writer.WriteObjectValue("job", Job); + writer.WriteObjectValue("manifests", Manifests); + writer.WriteObjectValue("metadata", Metadata); + writer.WriteStringValue("ref", Ref); + writer.WriteDateTimeOffsetValue("scanned", Scanned); + writer.WriteStringValue("sha", Sha); + writer.WriteIntValue("version", Version); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/Snapshot_detector.cs b/src/Ayllu.Github.Client/Github/Client/Models/Snapshot_detector.cs new file mode 100644 index 0000000..5a7d66a --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/Snapshot_detector.cs @@ -0,0 +1,76 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + /// + /// A description of the detector used. + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class Snapshot_detector : IParsable + { + /// The name of the detector used. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Name { get; set; } +#nullable restore +#else + public string Name { get; set; } +#endif + /// The url of the detector used. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Url { get; set; } +#nullable restore +#else + public string Url { get; set; } +#endif + /// The version of the detector used. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Version { get; set; } +#nullable restore +#else + public string Version { get; set; } +#endif + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.Snapshot_detector CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.Snapshot_detector(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "name", n => { Name = n.GetStringValue(); } }, + { "url", n => { Url = n.GetStringValue(); } }, + { "version", n => { Version = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("name", Name); + writer.WriteStringValue("url", Url); + writer.WriteStringValue("version", Version); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/Snapshot_job.cs b/src/Ayllu.Github.Client/Github/Client/Models/Snapshot_job.cs new file mode 100644 index 0000000..bce3c36 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/Snapshot_job.cs @@ -0,0 +1,75 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class Snapshot_job : IParsable + #pragma warning restore CS1591 + { + /// 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. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Correlator { get; set; } +#nullable restore +#else + public string Correlator { get; set; } +#endif + /// The url for the job. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? HtmlUrl { get; set; } +#nullable restore +#else + public string HtmlUrl { get; set; } +#endif + /// The external ID of the job. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Id { get; set; } +#nullable restore +#else + public string Id { get; set; } +#endif + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.Snapshot_job CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.Snapshot_job(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "correlator", n => { Correlator = n.GetStringValue(); } }, + { "html_url", n => { HtmlUrl = n.GetStringValue(); } }, + { "id", n => { Id = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("correlator", Correlator); + writer.WriteStringValue("html_url", HtmlUrl); + writer.WriteStringValue("id", Id); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/Snapshot_manifests.cs b/src/Ayllu.Github.Client/Github/Client/Models/Snapshot_manifests.cs new file mode 100644 index 0000000..b8a5c7a --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/Snapshot_manifests.cs @@ -0,0 +1,56 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + /// + /// A collection of package manifests, which are a collection of related dependencies declared in a file or representing a logical group of dependencies. + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class Snapshot_manifests : IAdditionalDataHolder, IParsable + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public Snapshot_manifests() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.Snapshot_manifests CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.Snapshot_manifests(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/SocialAccount.cs b/src/Ayllu.Github.Client/Github/Client/Models/SocialAccount.cs new file mode 100644 index 0000000..576c296 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/SocialAccount.cs @@ -0,0 +1,76 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + /// + /// Social media account + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class SocialAccount : IAdditionalDataHolder, IParsable + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The provider property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Provider { get; set; } +#nullable restore +#else + public string Provider { get; set; } +#endif + /// The url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Url { get; set; } +#nullable restore +#else + public string Url { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public SocialAccount() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.SocialAccount CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.SocialAccount(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "provider", n => { Provider = n.GetStringValue(); } }, + { "url", n => { Url = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("provider", Provider); + writer.WriteStringValue("url", Url); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/SshSigningKey.cs b/src/Ayllu.Github.Client/Github/Client/Models/SshSigningKey.cs new file mode 100644 index 0000000..41a2183 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/SshSigningKey.cs @@ -0,0 +1,84 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + /// + /// A public SSH key used to sign Git commits + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class SshSigningKey : IAdditionalDataHolder, IParsable + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The created_at property + public DateTimeOffset? CreatedAt { get; set; } + /// The id property + public int? Id { get; set; } + /// The key property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Key { get; set; } +#nullable restore +#else + public string Key { get; set; } +#endif + /// The title property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Title { get; set; } +#nullable restore +#else + public string Title { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public SshSigningKey() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.SshSigningKey CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.SshSigningKey(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "created_at", n => { CreatedAt = n.GetDateTimeOffsetValue(); } }, + { "id", n => { Id = n.GetIntValue(); } }, + { "key", n => { Key = n.GetStringValue(); } }, + { "title", n => { Title = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteDateTimeOffsetValue("created_at", CreatedAt); + writer.WriteIntValue("id", Id); + writer.WriteStringValue("key", Key); + writer.WriteStringValue("title", Title); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/StateChangeIssueEvent.cs b/src/Ayllu.Github.Client/Github/Client/Models/StateChangeIssueEvent.cs new file mode 100644 index 0000000..0fe8f7e --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/StateChangeIssueEvent.cs @@ -0,0 +1,150 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + /// + /// State Change Issue Event + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class StateChangeIssueEvent : IAdditionalDataHolder, IParsable + { + /// A GitHub user. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.SimpleUser? Actor { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.SimpleUser Actor { get; set; } +#endif + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The commit_id property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? CommitId { get; set; } +#nullable restore +#else + public string CommitId { get; set; } +#endif + /// The commit_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? CommitUrl { get; set; } +#nullable restore +#else + public string CommitUrl { get; set; } +#endif + /// The created_at property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? CreatedAt { get; set; } +#nullable restore +#else + public string CreatedAt { get; set; } +#endif + /// The event property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Event { get; set; } +#nullable restore +#else + public string Event { get; set; } +#endif + /// The id property + public int? Id { get; set; } + /// The node_id property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? NodeId { get; set; } +#nullable restore +#else + public string NodeId { get; set; } +#endif + /// 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. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.NullableIntegration? PerformedViaGithubApp { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.NullableIntegration PerformedViaGithubApp { get; set; } +#endif + /// The state_reason property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? StateReason { get; set; } +#nullable restore +#else + public string StateReason { get; set; } +#endif + /// The url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Url { get; set; } +#nullable restore +#else + public string Url { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public StateChangeIssueEvent() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.StateChangeIssueEvent CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.StateChangeIssueEvent(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "actor", n => { Actor = n.GetObjectValue(global::Ayllu.Github.Client.Models.SimpleUser.CreateFromDiscriminatorValue); } }, + { "commit_id", n => { CommitId = n.GetStringValue(); } }, + { "commit_url", n => { CommitUrl = n.GetStringValue(); } }, + { "created_at", n => { CreatedAt = n.GetStringValue(); } }, + { "event", n => { Event = n.GetStringValue(); } }, + { "id", n => { Id = n.GetIntValue(); } }, + { "node_id", n => { NodeId = n.GetStringValue(); } }, + { "performed_via_github_app", n => { PerformedViaGithubApp = n.GetObjectValue(global::Ayllu.Github.Client.Models.NullableIntegration.CreateFromDiscriminatorValue); } }, + { "state_reason", n => { StateReason = n.GetStringValue(); } }, + { "url", n => { Url = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteObjectValue("actor", Actor); + writer.WriteStringValue("commit_id", CommitId); + writer.WriteStringValue("commit_url", CommitUrl); + writer.WriteStringValue("created_at", CreatedAt); + writer.WriteStringValue("event", Event); + writer.WriteIntValue("id", Id); + writer.WriteStringValue("node_id", NodeId); + writer.WriteObjectValue("performed_via_github_app", PerformedViaGithubApp); + writer.WriteStringValue("state_reason", StateReason); + writer.WriteStringValue("url", Url); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/Status.cs b/src/Ayllu.Github.Client/Github/Client/Models/Status.cs new file mode 100644 index 0000000..b42497e --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/Status.cs @@ -0,0 +1,160 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + /// + /// The status of a commit. + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class Status : IAdditionalDataHolder, IParsable + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The avatar_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? AvatarUrl { get; set; } +#nullable restore +#else + public string AvatarUrl { get; set; } +#endif + /// The context property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Context { get; set; } +#nullable restore +#else + public string Context { get; set; } +#endif + /// The created_at property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? CreatedAt { get; set; } +#nullable restore +#else + public string CreatedAt { get; set; } +#endif + /// A GitHub user. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.NullableSimpleUser? Creator { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.NullableSimpleUser Creator { get; set; } +#endif + /// The description property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Description { get; set; } +#nullable restore +#else + public string Description { get; set; } +#endif + /// The id property + public int? Id { get; set; } + /// The node_id property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? NodeId { get; set; } +#nullable restore +#else + public string NodeId { get; set; } +#endif + /// The state property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? State { get; set; } +#nullable restore +#else + public string State { get; set; } +#endif + /// The target_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? TargetUrl { get; set; } +#nullable restore +#else + public string TargetUrl { get; set; } +#endif + /// The updated_at property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? UpdatedAt { get; set; } +#nullable restore +#else + public string UpdatedAt { get; set; } +#endif + /// The url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Url { get; set; } +#nullable restore +#else + public string Url { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public Status() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.Status CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.Status(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "avatar_url", n => { AvatarUrl = n.GetStringValue(); } }, + { "context", n => { Context = n.GetStringValue(); } }, + { "created_at", n => { CreatedAt = n.GetStringValue(); } }, + { "creator", n => { Creator = n.GetObjectValue(global::Ayllu.Github.Client.Models.NullableSimpleUser.CreateFromDiscriminatorValue); } }, + { "description", n => { Description = n.GetStringValue(); } }, + { "id", n => { Id = n.GetIntValue(); } }, + { "node_id", n => { NodeId = n.GetStringValue(); } }, + { "state", n => { State = n.GetStringValue(); } }, + { "target_url", n => { TargetUrl = n.GetStringValue(); } }, + { "updated_at", n => { UpdatedAt = n.GetStringValue(); } }, + { "url", n => { Url = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("avatar_url", AvatarUrl); + writer.WriteStringValue("context", Context); + writer.WriteStringValue("created_at", CreatedAt); + writer.WriteObjectValue("creator", Creator); + writer.WriteStringValue("description", Description); + writer.WriteIntValue("id", Id); + writer.WriteStringValue("node_id", NodeId); + writer.WriteStringValue("state", State); + writer.WriteStringValue("target_url", TargetUrl); + writer.WriteStringValue("updated_at", UpdatedAt); + writer.WriteStringValue("url", Url); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/StatusCheckPolicy.cs b/src/Ayllu.Github.Client/Github/Client/Models/StatusCheckPolicy.cs new file mode 100644 index 0000000..cb50b26 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/StatusCheckPolicy.cs @@ -0,0 +1,100 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + /// + /// Status Check Policy + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class StatusCheckPolicy : IAdditionalDataHolder, IParsable + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The checks property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? Checks { get; set; } +#nullable restore +#else + public List Checks { get; set; } +#endif + /// The contexts property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? Contexts { get; set; } +#nullable restore +#else + public List Contexts { get; set; } +#endif + /// The contexts_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? ContextsUrl { get; set; } +#nullable restore +#else + public string ContextsUrl { get; set; } +#endif + /// The strict property + public bool? Strict { get; set; } + /// The url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Url { get; set; } +#nullable restore +#else + public string Url { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public StatusCheckPolicy() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.StatusCheckPolicy CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.StatusCheckPolicy(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "checks", n => { Checks = n.GetCollectionOfObjectValues(global::Ayllu.Github.Client.Models.StatusCheckPolicy_checks.CreateFromDiscriminatorValue)?.AsList(); } }, + { "contexts", n => { Contexts = n.GetCollectionOfPrimitiveValues()?.AsList(); } }, + { "contexts_url", n => { ContextsUrl = n.GetStringValue(); } }, + { "strict", n => { Strict = n.GetBoolValue(); } }, + { "url", n => { Url = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteCollectionOfObjectValues("checks", Checks); + writer.WriteCollectionOfPrimitiveValues("contexts", Contexts); + writer.WriteStringValue("contexts_url", ContextsUrl); + writer.WriteBoolValue("strict", Strict); + writer.WriteStringValue("url", Url); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/StatusCheckPolicy_checks.cs b/src/Ayllu.Github.Client/Github/Client/Models/StatusCheckPolicy_checks.cs new file mode 100644 index 0000000..8228766 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/StatusCheckPolicy_checks.cs @@ -0,0 +1,69 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class StatusCheckPolicy_checks : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The app_id property + public int? AppId { get; set; } + /// The context property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Context { get; set; } +#nullable restore +#else + public string Context { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public StatusCheckPolicy_checks() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.StatusCheckPolicy_checks CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.StatusCheckPolicy_checks(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "app_id", n => { AppId = n.GetIntValue(); } }, + { "context", n => { Context = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteIntValue("app_id", AppId); + writer.WriteStringValue("context", Context); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/SubIssuesSummary.cs b/src/Ayllu.Github.Client/Github/Client/Models/SubIssuesSummary.cs new file mode 100644 index 0000000..4016600 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/SubIssuesSummary.cs @@ -0,0 +1,67 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class SubIssuesSummary : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The completed property + public int? Completed { get; set; } + /// The percent_completed property + public int? PercentCompleted { get; set; } + /// The total property + public int? Total { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public SubIssuesSummary() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.SubIssuesSummary CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.SubIssuesSummary(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "completed", n => { Completed = n.GetIntValue(); } }, + { "percent_completed", n => { PercentCompleted = n.GetIntValue(); } }, + { "total", n => { Total = n.GetIntValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteIntValue("completed", Completed); + writer.WriteIntValue("percent_completed", PercentCompleted); + writer.WriteIntValue("total", Total); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/Tag.cs b/src/Ayllu.Github.Client/Github/Client/Models/Tag.cs new file mode 100644 index 0000000..2425693 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/Tag.cs @@ -0,0 +1,106 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + /// + /// Tag + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class Tag : IAdditionalDataHolder, IParsable + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The commit property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.Tag_commit? Commit { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.Tag_commit Commit { get; set; } +#endif + /// The name property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Name { get; set; } +#nullable restore +#else + public string Name { get; set; } +#endif + /// The node_id property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? NodeId { get; set; } +#nullable restore +#else + public string NodeId { get; set; } +#endif + /// The tarball_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? TarballUrl { get; set; } +#nullable restore +#else + public string TarballUrl { get; set; } +#endif + /// The zipball_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? ZipballUrl { get; set; } +#nullable restore +#else + public string ZipballUrl { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public Tag() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.Tag CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.Tag(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "commit", n => { Commit = n.GetObjectValue(global::Ayllu.Github.Client.Models.Tag_commit.CreateFromDiscriminatorValue); } }, + { "name", n => { Name = n.GetStringValue(); } }, + { "node_id", n => { NodeId = n.GetStringValue(); } }, + { "tarball_url", n => { TarballUrl = n.GetStringValue(); } }, + { "zipball_url", n => { ZipballUrl = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteObjectValue("commit", Commit); + writer.WriteStringValue("name", Name); + writer.WriteStringValue("node_id", NodeId); + writer.WriteStringValue("tarball_url", TarballUrl); + writer.WriteStringValue("zipball_url", ZipballUrl); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/TagProtection.cs b/src/Ayllu.Github.Client/Github/Client/Models/TagProtection.cs new file mode 100644 index 0000000..c5c925b --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/TagProtection.cs @@ -0,0 +1,94 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + /// + /// Tag protection + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class TagProtection : IAdditionalDataHolder, IParsable + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The created_at property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? CreatedAt { get; set; } +#nullable restore +#else + public string CreatedAt { get; set; } +#endif + /// The enabled property + public bool? Enabled { get; set; } + /// The id property + public int? Id { get; set; } + /// The pattern property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Pattern { get; set; } +#nullable restore +#else + public string Pattern { get; set; } +#endif + /// The updated_at property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? UpdatedAt { get; set; } +#nullable restore +#else + public string UpdatedAt { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public TagProtection() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.TagProtection CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.TagProtection(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "created_at", n => { CreatedAt = n.GetStringValue(); } }, + { "enabled", n => { Enabled = n.GetBoolValue(); } }, + { "id", n => { Id = n.GetIntValue(); } }, + { "pattern", n => { Pattern = n.GetStringValue(); } }, + { "updated_at", n => { UpdatedAt = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("created_at", CreatedAt); + writer.WriteBoolValue("enabled", Enabled); + writer.WriteIntValue("id", Id); + writer.WriteStringValue("pattern", Pattern); + writer.WriteStringValue("updated_at", UpdatedAt); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/Tag_commit.cs b/src/Ayllu.Github.Client/Github/Client/Models/Tag_commit.cs new file mode 100644 index 0000000..ae91e32 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/Tag_commit.cs @@ -0,0 +1,75 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class Tag_commit : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The sha property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Sha { get; set; } +#nullable restore +#else + public string Sha { get; set; } +#endif + /// The url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Url { get; set; } +#nullable restore +#else + public string Url { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public Tag_commit() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.Tag_commit CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.Tag_commit(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "sha", n => { Sha = n.GetStringValue(); } }, + { "url", n => { Url = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("sha", Sha); + writer.WriteStringValue("url", Url); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/Team.cs b/src/Ayllu.Github.Client/Github/Client/Models/Team.cs new file mode 100644 index 0000000..dda322e --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/Team.cs @@ -0,0 +1,190 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + /// + /// Groups of organization members that gives permissions on specified repositories. + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class Team : IAdditionalDataHolder, IParsable + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The description property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Description { get; set; } +#nullable restore +#else + public string Description { get; set; } +#endif + /// The html_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? HtmlUrl { get; set; } +#nullable restore +#else + public string HtmlUrl { get; set; } +#endif + /// The id property + public int? Id { get; set; } + /// The members_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? MembersUrl { get; set; } +#nullable restore +#else + public string MembersUrl { get; set; } +#endif + /// The name property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Name { get; set; } +#nullable restore +#else + public string Name { get; set; } +#endif + /// The node_id property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? NodeId { get; set; } +#nullable restore +#else + public string NodeId { get; set; } +#endif + /// The notification_setting property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? NotificationSetting { get; set; } +#nullable restore +#else + public string NotificationSetting { get; set; } +#endif + /// Groups of organization members that gives permissions on specified repositories. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.NullableTeamSimple? Parent { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.NullableTeamSimple Parent { get; set; } +#endif + /// The permission property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Permission { get; set; } +#nullable restore +#else + public string Permission { get; set; } +#endif + /// The permissions property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.Team_permissions? Permissions { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.Team_permissions Permissions { get; set; } +#endif + /// The privacy property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Privacy { get; set; } +#nullable restore +#else + public string Privacy { get; set; } +#endif + /// The repositories_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? RepositoriesUrl { get; set; } +#nullable restore +#else + public string RepositoriesUrl { get; set; } +#endif + /// The slug property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Slug { get; set; } +#nullable restore +#else + public string Slug { get; set; } +#endif + /// The url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Url { get; set; } +#nullable restore +#else + public string Url { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public Team() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.Team CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.Team(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "description", n => { Description = n.GetStringValue(); } }, + { "html_url", n => { HtmlUrl = n.GetStringValue(); } }, + { "id", n => { Id = n.GetIntValue(); } }, + { "members_url", n => { MembersUrl = n.GetStringValue(); } }, + { "name", n => { Name = n.GetStringValue(); } }, + { "node_id", n => { NodeId = n.GetStringValue(); } }, + { "notification_setting", n => { NotificationSetting = n.GetStringValue(); } }, + { "parent", n => { Parent = n.GetObjectValue(global::Ayllu.Github.Client.Models.NullableTeamSimple.CreateFromDiscriminatorValue); } }, + { "permission", n => { Permission = n.GetStringValue(); } }, + { "permissions", n => { Permissions = n.GetObjectValue(global::Ayllu.Github.Client.Models.Team_permissions.CreateFromDiscriminatorValue); } }, + { "privacy", n => { Privacy = n.GetStringValue(); } }, + { "repositories_url", n => { RepositoriesUrl = n.GetStringValue(); } }, + { "slug", n => { Slug = n.GetStringValue(); } }, + { "url", n => { Url = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("description", Description); + writer.WriteStringValue("html_url", HtmlUrl); + writer.WriteIntValue("id", Id); + writer.WriteStringValue("members_url", MembersUrl); + writer.WriteStringValue("name", Name); + writer.WriteStringValue("node_id", NodeId); + writer.WriteStringValue("notification_setting", NotificationSetting); + writer.WriteObjectValue("parent", Parent); + writer.WriteStringValue("permission", Permission); + writer.WriteObjectValue("permissions", Permissions); + writer.WriteStringValue("privacy", Privacy); + writer.WriteStringValue("repositories_url", RepositoriesUrl); + writer.WriteStringValue("slug", Slug); + writer.WriteStringValue("url", Url); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/TeamDiscussion.cs b/src/Ayllu.Github.Client/Github/Client/Models/TeamDiscussion.cs new file mode 100644 index 0000000..62afe56 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/TeamDiscussion.cs @@ -0,0 +1,194 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + /// + /// A team discussion is a persistent record of a free-form conversation within a team. + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class TeamDiscussion : IAdditionalDataHolder, IParsable + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// A GitHub user. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.NullableSimpleUser? Author { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.NullableSimpleUser Author { get; set; } +#endif + /// The main text of the discussion. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Body { get; set; } +#nullable restore +#else + public string Body { get; set; } +#endif + /// The body_html property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? BodyHtml { get; set; } +#nullable restore +#else + public string BodyHtml { get; set; } +#endif + /// 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. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? BodyVersion { get; set; } +#nullable restore +#else + public string BodyVersion { get; set; } +#endif + /// The comments_count property + public int? CommentsCount { get; set; } + /// The comments_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? CommentsUrl { get; set; } +#nullable restore +#else + public string CommentsUrl { get; set; } +#endif + /// The created_at property + public DateTimeOffset? CreatedAt { get; set; } + /// The html_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? HtmlUrl { get; set; } +#nullable restore +#else + public string HtmlUrl { get; set; } +#endif + /// The last_edited_at property + public DateTimeOffset? LastEditedAt { get; set; } + /// The node_id property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? NodeId { get; set; } +#nullable restore +#else + public string NodeId { get; set; } +#endif + /// The unique sequence number of a team discussion. + public int? Number { get; set; } + /// Whether or not this discussion should be pinned for easy retrieval. + public bool? Pinned { get; set; } + /// Whether or not this discussion should be restricted to team members and organization owners. + public bool? Private { get; set; } + /// The reactions property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.ReactionRollup? Reactions { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.ReactionRollup Reactions { get; set; } +#endif + /// The team_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? TeamUrl { get; set; } +#nullable restore +#else + public string TeamUrl { get; set; } +#endif + /// The title of the discussion. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Title { get; set; } +#nullable restore +#else + public string Title { get; set; } +#endif + /// The updated_at property + public DateTimeOffset? UpdatedAt { get; set; } + /// The url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Url { get; set; } +#nullable restore +#else + public string Url { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public TeamDiscussion() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.TeamDiscussion CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.TeamDiscussion(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "author", n => { Author = n.GetObjectValue(global::Ayllu.Github.Client.Models.NullableSimpleUser.CreateFromDiscriminatorValue); } }, + { "body", n => { Body = n.GetStringValue(); } }, + { "body_html", n => { BodyHtml = n.GetStringValue(); } }, + { "body_version", n => { BodyVersion = n.GetStringValue(); } }, + { "comments_count", n => { CommentsCount = n.GetIntValue(); } }, + { "comments_url", n => { CommentsUrl = n.GetStringValue(); } }, + { "created_at", n => { CreatedAt = n.GetDateTimeOffsetValue(); } }, + { "html_url", n => { HtmlUrl = n.GetStringValue(); } }, + { "last_edited_at", n => { LastEditedAt = n.GetDateTimeOffsetValue(); } }, + { "node_id", n => { NodeId = n.GetStringValue(); } }, + { "number", n => { Number = n.GetIntValue(); } }, + { "pinned", n => { Pinned = n.GetBoolValue(); } }, + { "private", n => { Private = n.GetBoolValue(); } }, + { "reactions", n => { Reactions = n.GetObjectValue(global::Ayllu.Github.Client.Models.ReactionRollup.CreateFromDiscriminatorValue); } }, + { "team_url", n => { TeamUrl = n.GetStringValue(); } }, + { "title", n => { Title = n.GetStringValue(); } }, + { "updated_at", n => { UpdatedAt = n.GetDateTimeOffsetValue(); } }, + { "url", n => { Url = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteObjectValue("author", Author); + writer.WriteStringValue("body", Body); + writer.WriteStringValue("body_html", BodyHtml); + writer.WriteStringValue("body_version", BodyVersion); + writer.WriteIntValue("comments_count", CommentsCount); + writer.WriteStringValue("comments_url", CommentsUrl); + writer.WriteDateTimeOffsetValue("created_at", CreatedAt); + writer.WriteStringValue("html_url", HtmlUrl); + writer.WriteDateTimeOffsetValue("last_edited_at", LastEditedAt); + writer.WriteStringValue("node_id", NodeId); + writer.WriteIntValue("number", Number); + writer.WriteBoolValue("pinned", Pinned); + writer.WriteBoolValue("private", Private); + writer.WriteObjectValue("reactions", Reactions); + writer.WriteStringValue("team_url", TeamUrl); + writer.WriteStringValue("title", Title); + writer.WriteDateTimeOffsetValue("updated_at", UpdatedAt); + writer.WriteStringValue("url", Url); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/TeamDiscussionComment.cs b/src/Ayllu.Github.Client/Github/Client/Models/TeamDiscussionComment.cs new file mode 100644 index 0000000..afee273 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/TeamDiscussionComment.cs @@ -0,0 +1,162 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + /// + /// A reply to a discussion within a team. + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class TeamDiscussionComment : IAdditionalDataHolder, IParsable + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// A GitHub user. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.NullableSimpleUser? Author { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.NullableSimpleUser Author { get; set; } +#endif + /// The main text of the comment. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Body { get; set; } +#nullable restore +#else + public string Body { get; set; } +#endif + /// The body_html property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? BodyHtml { get; set; } +#nullable restore +#else + public string BodyHtml { get; set; } +#endif + /// 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. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? BodyVersion { get; set; } +#nullable restore +#else + public string BodyVersion { get; set; } +#endif + /// The created_at property + public DateTimeOffset? CreatedAt { get; set; } + /// The discussion_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? DiscussionUrl { get; set; } +#nullable restore +#else + public string DiscussionUrl { get; set; } +#endif + /// The html_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? HtmlUrl { get; set; } +#nullable restore +#else + public string HtmlUrl { get; set; } +#endif + /// The last_edited_at property + public DateTimeOffset? LastEditedAt { get; set; } + /// The node_id property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? NodeId { get; set; } +#nullable restore +#else + public string NodeId { get; set; } +#endif + /// The unique sequence number of a team discussion comment. + public int? Number { get; set; } + /// The reactions property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.ReactionRollup? Reactions { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.ReactionRollup Reactions { get; set; } +#endif + /// The updated_at property + public DateTimeOffset? UpdatedAt { get; set; } + /// The url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Url { get; set; } +#nullable restore +#else + public string Url { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public TeamDiscussionComment() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.TeamDiscussionComment CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.TeamDiscussionComment(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "author", n => { Author = n.GetObjectValue(global::Ayllu.Github.Client.Models.NullableSimpleUser.CreateFromDiscriminatorValue); } }, + { "body", n => { Body = n.GetStringValue(); } }, + { "body_html", n => { BodyHtml = n.GetStringValue(); } }, + { "body_version", n => { BodyVersion = n.GetStringValue(); } }, + { "created_at", n => { CreatedAt = n.GetDateTimeOffsetValue(); } }, + { "discussion_url", n => { DiscussionUrl = n.GetStringValue(); } }, + { "html_url", n => { HtmlUrl = n.GetStringValue(); } }, + { "last_edited_at", n => { LastEditedAt = n.GetDateTimeOffsetValue(); } }, + { "node_id", n => { NodeId = n.GetStringValue(); } }, + { "number", n => { Number = n.GetIntValue(); } }, + { "reactions", n => { Reactions = n.GetObjectValue(global::Ayllu.Github.Client.Models.ReactionRollup.CreateFromDiscriminatorValue); } }, + { "updated_at", n => { UpdatedAt = n.GetDateTimeOffsetValue(); } }, + { "url", n => { Url = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteObjectValue("author", Author); + writer.WriteStringValue("body", Body); + writer.WriteStringValue("body_html", BodyHtml); + writer.WriteStringValue("body_version", BodyVersion); + writer.WriteDateTimeOffsetValue("created_at", CreatedAt); + writer.WriteStringValue("discussion_url", DiscussionUrl); + writer.WriteStringValue("html_url", HtmlUrl); + writer.WriteDateTimeOffsetValue("last_edited_at", LastEditedAt); + writer.WriteStringValue("node_id", NodeId); + writer.WriteIntValue("number", Number); + writer.WriteObjectValue("reactions", Reactions); + writer.WriteDateTimeOffsetValue("updated_at", UpdatedAt); + writer.WriteStringValue("url", Url); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/TeamFull.cs b/src/Ayllu.Github.Client/Github/Client/Models/TeamFull.cs new file mode 100644 index 0000000..9cc58f2 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/TeamFull.cs @@ -0,0 +1,204 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + /// + /// Groups of organization members that gives permissions on specified repositories. + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class TeamFull : IAdditionalDataHolder, IParsable + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The created_at property + public DateTimeOffset? CreatedAt { get; set; } + /// The description property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Description { get; set; } +#nullable restore +#else + public string Description { get; set; } +#endif + /// The html_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? HtmlUrl { get; set; } +#nullable restore +#else + public string HtmlUrl { get; set; } +#endif + /// Unique identifier of the team + public int? Id { get; set; } + /// Distinguished Name (DN) that team maps to within LDAP environment +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? LdapDn { get; set; } +#nullable restore +#else + public string LdapDn { get; set; } +#endif + /// The members_count property + public int? MembersCount { get; set; } + /// The members_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? MembersUrl { get; set; } +#nullable restore +#else + public string MembersUrl { get; set; } +#endif + /// Name of the team +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Name { get; set; } +#nullable restore +#else + public string Name { get; set; } +#endif + /// The node_id property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? NodeId { get; set; } +#nullable restore +#else + public string NodeId { get; set; } +#endif + /// The notification setting the team has set + public global::Ayllu.Github.Client.Models.TeamFull_notification_setting? NotificationSetting { get; set; } + /// Team Organization +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.TeamOrganization? Organization { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.TeamOrganization Organization { get; set; } +#endif + /// Groups of organization members that gives permissions on specified repositories. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.NullableTeamSimple? Parent { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.NullableTeamSimple Parent { get; set; } +#endif + /// Permission that the team will have for its repositories +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Permission { get; set; } +#nullable restore +#else + public string Permission { get; set; } +#endif + /// The level of privacy this team should have + public global::Ayllu.Github.Client.Models.TeamFull_privacy? Privacy { get; set; } + /// The repos_count property + public int? ReposCount { get; set; } + /// The repositories_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? RepositoriesUrl { get; set; } +#nullable restore +#else + public string RepositoriesUrl { get; set; } +#endif + /// The slug property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Slug { get; set; } +#nullable restore +#else + public string Slug { get; set; } +#endif + /// The updated_at property + public DateTimeOffset? UpdatedAt { get; set; } + /// URL for the team +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Url { get; set; } +#nullable restore +#else + public string Url { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public TeamFull() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.TeamFull CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.TeamFull(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "created_at", n => { CreatedAt = n.GetDateTimeOffsetValue(); } }, + { "description", n => { Description = n.GetStringValue(); } }, + { "html_url", n => { HtmlUrl = n.GetStringValue(); } }, + { "id", n => { Id = n.GetIntValue(); } }, + { "ldap_dn", n => { LdapDn = n.GetStringValue(); } }, + { "members_count", n => { MembersCount = n.GetIntValue(); } }, + { "members_url", n => { MembersUrl = n.GetStringValue(); } }, + { "name", n => { Name = n.GetStringValue(); } }, + { "node_id", n => { NodeId = n.GetStringValue(); } }, + { "notification_setting", n => { NotificationSetting = n.GetEnumValue(); } }, + { "organization", n => { Organization = n.GetObjectValue(global::Ayllu.Github.Client.Models.TeamOrganization.CreateFromDiscriminatorValue); } }, + { "parent", n => { Parent = n.GetObjectValue(global::Ayllu.Github.Client.Models.NullableTeamSimple.CreateFromDiscriminatorValue); } }, + { "permission", n => { Permission = n.GetStringValue(); } }, + { "privacy", n => { Privacy = n.GetEnumValue(); } }, + { "repos_count", n => { ReposCount = n.GetIntValue(); } }, + { "repositories_url", n => { RepositoriesUrl = n.GetStringValue(); } }, + { "slug", n => { Slug = n.GetStringValue(); } }, + { "updated_at", n => { UpdatedAt = n.GetDateTimeOffsetValue(); } }, + { "url", n => { Url = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteDateTimeOffsetValue("created_at", CreatedAt); + writer.WriteStringValue("description", Description); + writer.WriteStringValue("html_url", HtmlUrl); + writer.WriteIntValue("id", Id); + writer.WriteStringValue("ldap_dn", LdapDn); + writer.WriteIntValue("members_count", MembersCount); + writer.WriteStringValue("members_url", MembersUrl); + writer.WriteStringValue("name", Name); + writer.WriteStringValue("node_id", NodeId); + writer.WriteEnumValue("notification_setting", NotificationSetting); + writer.WriteObjectValue("organization", Organization); + writer.WriteObjectValue("parent", Parent); + writer.WriteStringValue("permission", Permission); + writer.WriteEnumValue("privacy", Privacy); + writer.WriteIntValue("repos_count", ReposCount); + writer.WriteStringValue("repositories_url", RepositoriesUrl); + writer.WriteStringValue("slug", Slug); + writer.WriteDateTimeOffsetValue("updated_at", UpdatedAt); + writer.WriteStringValue("url", Url); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/TeamFull_notification_setting.cs b/src/Ayllu.Github.Client/Github/Client/Models/TeamFull_notification_setting.cs new file mode 100644 index 0000000..ec101bf --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/TeamFull_notification_setting.cs @@ -0,0 +1,19 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Models +{ + /// The notification setting the team has set + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public enum TeamFull_notification_setting + { + [EnumMember(Value = "notifications_enabled")] + #pragma warning disable CS1591 + Notifications_enabled, + #pragma warning restore CS1591 + [EnumMember(Value = "notifications_disabled")] + #pragma warning disable CS1591 + Notifications_disabled, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Models/TeamFull_privacy.cs b/src/Ayllu.Github.Client/Github/Client/Models/TeamFull_privacy.cs new file mode 100644 index 0000000..28c63e5 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/TeamFull_privacy.cs @@ -0,0 +1,19 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Models +{ + /// The level of privacy this team should have + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public enum TeamFull_privacy + { + [EnumMember(Value = "closed")] + #pragma warning disable CS1591 + Closed, + #pragma warning restore CS1591 + [EnumMember(Value = "secret")] + #pragma warning disable CS1591 + Secret, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Models/TeamMembership.cs b/src/Ayllu.Github.Client/Github/Client/Models/TeamMembership.cs new file mode 100644 index 0000000..ee63840 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/TeamMembership.cs @@ -0,0 +1,75 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + /// + /// Team Membership + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class TeamMembership : IAdditionalDataHolder, IParsable + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The role of the user in the team. + public global::Ayllu.Github.Client.Models.TeamMembership_role? Role { get; set; } + /// The state of the user's membership in the team. + public global::Ayllu.Github.Client.Models.TeamMembership_state? State { get; set; } + /// The url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Url { get; set; } +#nullable restore +#else + public string Url { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public TeamMembership() + { + AdditionalData = new Dictionary(); + Role = global::Ayllu.Github.Client.Models.TeamMembership_role.Member; + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.TeamMembership CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.TeamMembership(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "role", n => { Role = n.GetEnumValue(); } }, + { "state", n => { State = n.GetEnumValue(); } }, + { "url", n => { Url = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteEnumValue("role", Role); + writer.WriteEnumValue("state", State); + writer.WriteStringValue("url", Url); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/TeamMembership_role.cs b/src/Ayllu.Github.Client/Github/Client/Models/TeamMembership_role.cs new file mode 100644 index 0000000..5f65825 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/TeamMembership_role.cs @@ -0,0 +1,19 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Models +{ + /// The role of the user in the team. + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public enum TeamMembership_role + { + [EnumMember(Value = "member")] + #pragma warning disable CS1591 + Member, + #pragma warning restore CS1591 + [EnumMember(Value = "maintainer")] + #pragma warning disable CS1591 + Maintainer, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Models/TeamMembership_state.cs b/src/Ayllu.Github.Client/Github/Client/Models/TeamMembership_state.cs new file mode 100644 index 0000000..2cace40 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/TeamMembership_state.cs @@ -0,0 +1,19 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Models +{ + /// The state of the user's membership in the team. + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public enum TeamMembership_state + { + [EnumMember(Value = "active")] + #pragma warning disable CS1591 + Active, + #pragma warning restore CS1591 + [EnumMember(Value = "pending")] + #pragma warning disable CS1591 + Pending, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Models/TeamOrganization.cs b/src/Ayllu.Github.Client/Github/Client/Models/TeamOrganization.cs new file mode 100644 index 0000000..1c0729f --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/TeamOrganization.cs @@ -0,0 +1,390 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + /// + /// Team Organization + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class TeamOrganization : IAdditionalDataHolder, IParsable + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The archived_at property + public DateTimeOffset? ArchivedAt { get; set; } + /// The avatar_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? AvatarUrl { get; set; } +#nullable restore +#else + public string AvatarUrl { get; set; } +#endif + /// The billing_email property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? BillingEmail { get; set; } +#nullable restore +#else + public string BillingEmail { get; set; } +#endif + /// The blog property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Blog { get; set; } +#nullable restore +#else + public string Blog { get; set; } +#endif + /// The collaborators property + public int? Collaborators { get; set; } + /// The company property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Company { get; set; } +#nullable restore +#else + public string Company { get; set; } +#endif + /// The created_at property + public DateTimeOffset? CreatedAt { get; set; } + /// The default_repository_permission property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? DefaultRepositoryPermission { get; set; } +#nullable restore +#else + public string DefaultRepositoryPermission { get; set; } +#endif + /// The description property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Description { get; set; } +#nullable restore +#else + public string Description { get; set; } +#endif + /// The disk_usage property + public int? DiskUsage { get; set; } + /// The email property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Email { get; set; } +#nullable restore +#else + public string Email { get; set; } +#endif + /// The events_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? EventsUrl { get; set; } +#nullable restore +#else + public string EventsUrl { get; set; } +#endif + /// The followers property + public int? Followers { get; set; } + /// The following property + public int? Following { get; set; } + /// The has_organization_projects property + public bool? HasOrganizationProjects { get; set; } + /// The has_repository_projects property + public bool? HasRepositoryProjects { get; set; } + /// The hooks_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? HooksUrl { get; set; } +#nullable restore +#else + public string HooksUrl { get; set; } +#endif + /// The html_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? HtmlUrl { get; set; } +#nullable restore +#else + public string HtmlUrl { get; set; } +#endif + /// The id property + public int? Id { get; set; } + /// The issues_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? IssuesUrl { get; set; } +#nullable restore +#else + public string IssuesUrl { get; set; } +#endif + /// The is_verified property + public bool? IsVerified { get; set; } + /// The location property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Location { get; set; } +#nullable restore +#else + public string Location { get; set; } +#endif + /// The login property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Login { get; set; } +#nullable restore +#else + public string Login { get; set; } +#endif + /// The members_allowed_repository_creation_type property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? MembersAllowedRepositoryCreationType { get; set; } +#nullable restore +#else + public string MembersAllowedRepositoryCreationType { get; set; } +#endif + /// The members_can_create_internal_repositories property + public bool? MembersCanCreateInternalRepositories { get; set; } + /// The members_can_create_pages property + public bool? MembersCanCreatePages { get; set; } + /// The members_can_create_private_pages property + public bool? MembersCanCreatePrivatePages { get; set; } + /// The members_can_create_private_repositories property + public bool? MembersCanCreatePrivateRepositories { get; set; } + /// The members_can_create_public_pages property + public bool? MembersCanCreatePublicPages { get; set; } + /// The members_can_create_public_repositories property + public bool? MembersCanCreatePublicRepositories { get; set; } + /// The members_can_create_repositories property + public bool? MembersCanCreateRepositories { get; set; } + /// The members_can_fork_private_repositories property + public bool? MembersCanForkPrivateRepositories { get; set; } + /// The members_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? MembersUrl { get; set; } +#nullable restore +#else + public string MembersUrl { get; set; } +#endif + /// The name property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Name { get; set; } +#nullable restore +#else + public string Name { get; set; } +#endif + /// The node_id property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? NodeId { get; set; } +#nullable restore +#else + public string NodeId { get; set; } +#endif + /// The owned_private_repos property + public int? OwnedPrivateRepos { get; set; } + /// The plan property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.TeamOrganization_plan? Plan { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.TeamOrganization_plan Plan { get; set; } +#endif + /// The private_gists property + public int? PrivateGists { get; set; } + /// The public_gists property + public int? PublicGists { get; set; } + /// The public_members_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? PublicMembersUrl { get; set; } +#nullable restore +#else + public string PublicMembersUrl { get; set; } +#endif + /// The public_repos property + public int? PublicRepos { get; set; } + /// The repos_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? ReposUrl { get; set; } +#nullable restore +#else + public string ReposUrl { get; set; } +#endif + /// The total_private_repos property + public int? TotalPrivateRepos { get; set; } + /// The twitter_username property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? TwitterUsername { get; set; } +#nullable restore +#else + public string TwitterUsername { get; set; } +#endif + /// The two_factor_requirement_enabled property + public bool? TwoFactorRequirementEnabled { get; set; } + /// The type property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Type { get; set; } +#nullable restore +#else + public string Type { get; set; } +#endif + /// The updated_at property + public DateTimeOffset? UpdatedAt { get; set; } + /// The url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Url { get; set; } +#nullable restore +#else + public string Url { get; set; } +#endif + /// The web_commit_signoff_required property + public bool? WebCommitSignoffRequired { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public TeamOrganization() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.TeamOrganization CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.TeamOrganization(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "archived_at", n => { ArchivedAt = n.GetDateTimeOffsetValue(); } }, + { "avatar_url", n => { AvatarUrl = n.GetStringValue(); } }, + { "billing_email", n => { BillingEmail = n.GetStringValue(); } }, + { "blog", n => { Blog = n.GetStringValue(); } }, + { "collaborators", n => { Collaborators = n.GetIntValue(); } }, + { "company", n => { Company = n.GetStringValue(); } }, + { "created_at", n => { CreatedAt = n.GetDateTimeOffsetValue(); } }, + { "default_repository_permission", n => { DefaultRepositoryPermission = n.GetStringValue(); } }, + { "description", n => { Description = n.GetStringValue(); } }, + { "disk_usage", n => { DiskUsage = n.GetIntValue(); } }, + { "email", n => { Email = n.GetStringValue(); } }, + { "events_url", n => { EventsUrl = n.GetStringValue(); } }, + { "followers", n => { Followers = n.GetIntValue(); } }, + { "following", n => { Following = n.GetIntValue(); } }, + { "has_organization_projects", n => { HasOrganizationProjects = n.GetBoolValue(); } }, + { "has_repository_projects", n => { HasRepositoryProjects = n.GetBoolValue(); } }, + { "hooks_url", n => { HooksUrl = n.GetStringValue(); } }, + { "html_url", n => { HtmlUrl = n.GetStringValue(); } }, + { "id", n => { Id = n.GetIntValue(); } }, + { "is_verified", n => { IsVerified = n.GetBoolValue(); } }, + { "issues_url", n => { IssuesUrl = n.GetStringValue(); } }, + { "location", n => { Location = n.GetStringValue(); } }, + { "login", n => { Login = n.GetStringValue(); } }, + { "members_allowed_repository_creation_type", n => { MembersAllowedRepositoryCreationType = n.GetStringValue(); } }, + { "members_can_create_internal_repositories", n => { MembersCanCreateInternalRepositories = n.GetBoolValue(); } }, + { "members_can_create_pages", n => { MembersCanCreatePages = n.GetBoolValue(); } }, + { "members_can_create_private_pages", n => { MembersCanCreatePrivatePages = n.GetBoolValue(); } }, + { "members_can_create_private_repositories", n => { MembersCanCreatePrivateRepositories = n.GetBoolValue(); } }, + { "members_can_create_public_pages", n => { MembersCanCreatePublicPages = n.GetBoolValue(); } }, + { "members_can_create_public_repositories", n => { MembersCanCreatePublicRepositories = n.GetBoolValue(); } }, + { "members_can_create_repositories", n => { MembersCanCreateRepositories = n.GetBoolValue(); } }, + { "members_can_fork_private_repositories", n => { MembersCanForkPrivateRepositories = n.GetBoolValue(); } }, + { "members_url", n => { MembersUrl = n.GetStringValue(); } }, + { "name", n => { Name = n.GetStringValue(); } }, + { "node_id", n => { NodeId = n.GetStringValue(); } }, + { "owned_private_repos", n => { OwnedPrivateRepos = n.GetIntValue(); } }, + { "plan", n => { Plan = n.GetObjectValue(global::Ayllu.Github.Client.Models.TeamOrganization_plan.CreateFromDiscriminatorValue); } }, + { "private_gists", n => { PrivateGists = n.GetIntValue(); } }, + { "public_gists", n => { PublicGists = n.GetIntValue(); } }, + { "public_members_url", n => { PublicMembersUrl = n.GetStringValue(); } }, + { "public_repos", n => { PublicRepos = n.GetIntValue(); } }, + { "repos_url", n => { ReposUrl = n.GetStringValue(); } }, + { "total_private_repos", n => { TotalPrivateRepos = n.GetIntValue(); } }, + { "twitter_username", n => { TwitterUsername = n.GetStringValue(); } }, + { "two_factor_requirement_enabled", n => { TwoFactorRequirementEnabled = n.GetBoolValue(); } }, + { "type", n => { Type = n.GetStringValue(); } }, + { "updated_at", n => { UpdatedAt = n.GetDateTimeOffsetValue(); } }, + { "url", n => { Url = n.GetStringValue(); } }, + { "web_commit_signoff_required", n => { WebCommitSignoffRequired = n.GetBoolValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteDateTimeOffsetValue("archived_at", ArchivedAt); + writer.WriteStringValue("avatar_url", AvatarUrl); + writer.WriteStringValue("billing_email", BillingEmail); + writer.WriteStringValue("blog", Blog); + writer.WriteIntValue("collaborators", Collaborators); + writer.WriteStringValue("company", Company); + writer.WriteDateTimeOffsetValue("created_at", CreatedAt); + writer.WriteStringValue("default_repository_permission", DefaultRepositoryPermission); + writer.WriteStringValue("description", Description); + writer.WriteIntValue("disk_usage", DiskUsage); + writer.WriteStringValue("email", Email); + writer.WriteStringValue("events_url", EventsUrl); + writer.WriteIntValue("followers", Followers); + writer.WriteIntValue("following", Following); + writer.WriteBoolValue("has_organization_projects", HasOrganizationProjects); + writer.WriteBoolValue("has_repository_projects", HasRepositoryProjects); + writer.WriteStringValue("hooks_url", HooksUrl); + writer.WriteStringValue("html_url", HtmlUrl); + writer.WriteIntValue("id", Id); + writer.WriteStringValue("issues_url", IssuesUrl); + writer.WriteBoolValue("is_verified", IsVerified); + writer.WriteStringValue("location", Location); + writer.WriteStringValue("login", Login); + writer.WriteStringValue("members_allowed_repository_creation_type", MembersAllowedRepositoryCreationType); + writer.WriteBoolValue("members_can_create_internal_repositories", MembersCanCreateInternalRepositories); + writer.WriteBoolValue("members_can_create_pages", MembersCanCreatePages); + writer.WriteBoolValue("members_can_create_private_pages", MembersCanCreatePrivatePages); + writer.WriteBoolValue("members_can_create_private_repositories", MembersCanCreatePrivateRepositories); + writer.WriteBoolValue("members_can_create_public_pages", MembersCanCreatePublicPages); + writer.WriteBoolValue("members_can_create_public_repositories", MembersCanCreatePublicRepositories); + writer.WriteBoolValue("members_can_create_repositories", MembersCanCreateRepositories); + writer.WriteBoolValue("members_can_fork_private_repositories", MembersCanForkPrivateRepositories); + writer.WriteStringValue("members_url", MembersUrl); + writer.WriteStringValue("name", Name); + writer.WriteStringValue("node_id", NodeId); + writer.WriteIntValue("owned_private_repos", OwnedPrivateRepos); + writer.WriteObjectValue("plan", Plan); + writer.WriteIntValue("private_gists", PrivateGists); + writer.WriteIntValue("public_gists", PublicGists); + writer.WriteStringValue("public_members_url", PublicMembersUrl); + writer.WriteIntValue("public_repos", PublicRepos); + writer.WriteStringValue("repos_url", ReposUrl); + writer.WriteIntValue("total_private_repos", TotalPrivateRepos); + writer.WriteStringValue("twitter_username", TwitterUsername); + writer.WriteBoolValue("two_factor_requirement_enabled", TwoFactorRequirementEnabled); + writer.WriteStringValue("type", Type); + writer.WriteDateTimeOffsetValue("updated_at", UpdatedAt); + writer.WriteStringValue("url", Url); + writer.WriteBoolValue("web_commit_signoff_required", WebCommitSignoffRequired); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/TeamOrganization_plan.cs b/src/Ayllu.Github.Client/Github/Client/Models/TeamOrganization_plan.cs new file mode 100644 index 0000000..29cb144 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/TeamOrganization_plan.cs @@ -0,0 +1,81 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class TeamOrganization_plan : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The filled_seats property + public int? FilledSeats { get; set; } + /// The name property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Name { get; set; } +#nullable restore +#else + public string Name { get; set; } +#endif + /// The private_repos property + public int? PrivateRepos { get; set; } + /// The seats property + public int? Seats { get; set; } + /// The space property + public int? Space { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public TeamOrganization_plan() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.TeamOrganization_plan CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.TeamOrganization_plan(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "filled_seats", n => { FilledSeats = n.GetIntValue(); } }, + { "name", n => { Name = n.GetStringValue(); } }, + { "private_repos", n => { PrivateRepos = n.GetIntValue(); } }, + { "seats", n => { Seats = n.GetIntValue(); } }, + { "space", n => { Space = n.GetIntValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteIntValue("filled_seats", FilledSeats); + writer.WriteStringValue("name", Name); + writer.WriteIntValue("private_repos", PrivateRepos); + writer.WriteIntValue("seats", Seats); + writer.WriteIntValue("space", Space); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/TeamProject.cs b/src/Ayllu.Github.Client/Github/Client/Models/TeamProject.cs new file mode 100644 index 0000000..6a6ebb7 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/TeamProject.cs @@ -0,0 +1,198 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + /// + /// A team's access to a project. + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class TeamProject : IAdditionalDataHolder, IParsable + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The body property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Body { get; set; } +#nullable restore +#else + public string Body { get; set; } +#endif + /// The columns_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? ColumnsUrl { get; set; } +#nullable restore +#else + public string ColumnsUrl { get; set; } +#endif + /// The created_at property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? CreatedAt { get; set; } +#nullable restore +#else + public string CreatedAt { get; set; } +#endif + /// A GitHub user. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.SimpleUser? Creator { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.SimpleUser Creator { get; set; } +#endif + /// The html_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? HtmlUrl { get; set; } +#nullable restore +#else + public string HtmlUrl { get; set; } +#endif + /// The id property + public int? Id { get; set; } + /// The name property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Name { get; set; } +#nullable restore +#else + public string Name { get; set; } +#endif + /// The node_id property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? NodeId { get; set; } +#nullable restore +#else + public string NodeId { get; set; } +#endif + /// The number property + public int? Number { get; set; } + /// The organization permission for this project. Only present when owner is an organization. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? OrganizationPermission { get; set; } +#nullable restore +#else + public string OrganizationPermission { get; set; } +#endif + /// The owner_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? OwnerUrl { get; set; } +#nullable restore +#else + public string OwnerUrl { get; set; } +#endif + /// The permissions property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.TeamProject_permissions? Permissions { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.TeamProject_permissions Permissions { get; set; } +#endif + /// Whether the project is private or not. Only present when owner is an organization. + public bool? Private { get; set; } + /// The state property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? State { get; set; } +#nullable restore +#else + public string State { get; set; } +#endif + /// The updated_at property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? UpdatedAt { get; set; } +#nullable restore +#else + public string UpdatedAt { get; set; } +#endif + /// The url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Url { get; set; } +#nullable restore +#else + public string Url { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public TeamProject() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.TeamProject CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.TeamProject(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "body", n => { Body = n.GetStringValue(); } }, + { "columns_url", n => { ColumnsUrl = n.GetStringValue(); } }, + { "created_at", n => { CreatedAt = n.GetStringValue(); } }, + { "creator", n => { Creator = n.GetObjectValue(global::Ayllu.Github.Client.Models.SimpleUser.CreateFromDiscriminatorValue); } }, + { "html_url", n => { HtmlUrl = n.GetStringValue(); } }, + { "id", n => { Id = n.GetIntValue(); } }, + { "name", n => { Name = n.GetStringValue(); } }, + { "node_id", n => { NodeId = n.GetStringValue(); } }, + { "number", n => { Number = n.GetIntValue(); } }, + { "organization_permission", n => { OrganizationPermission = n.GetStringValue(); } }, + { "owner_url", n => { OwnerUrl = n.GetStringValue(); } }, + { "permissions", n => { Permissions = n.GetObjectValue(global::Ayllu.Github.Client.Models.TeamProject_permissions.CreateFromDiscriminatorValue); } }, + { "private", n => { Private = n.GetBoolValue(); } }, + { "state", n => { State = n.GetStringValue(); } }, + { "updated_at", n => { UpdatedAt = n.GetStringValue(); } }, + { "url", n => { Url = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("body", Body); + writer.WriteStringValue("columns_url", ColumnsUrl); + writer.WriteStringValue("created_at", CreatedAt); + writer.WriteObjectValue("creator", Creator); + writer.WriteStringValue("html_url", HtmlUrl); + writer.WriteIntValue("id", Id); + writer.WriteStringValue("name", Name); + writer.WriteStringValue("node_id", NodeId); + writer.WriteIntValue("number", Number); + writer.WriteStringValue("organization_permission", OrganizationPermission); + writer.WriteStringValue("owner_url", OwnerUrl); + writer.WriteObjectValue("permissions", Permissions); + writer.WriteBoolValue("private", Private); + writer.WriteStringValue("state", State); + writer.WriteStringValue("updated_at", UpdatedAt); + writer.WriteStringValue("url", Url); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/TeamProject_permissions.cs b/src/Ayllu.Github.Client/Github/Client/Models/TeamProject_permissions.cs new file mode 100644 index 0000000..7d9e12d --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/TeamProject_permissions.cs @@ -0,0 +1,67 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class TeamProject_permissions : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The admin property + public bool? Admin { get; set; } + /// The read property + public bool? Read { get; set; } + /// The write property + public bool? Write { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public TeamProject_permissions() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.TeamProject_permissions CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.TeamProject_permissions(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "admin", n => { Admin = n.GetBoolValue(); } }, + { "read", n => { Read = n.GetBoolValue(); } }, + { "write", n => { Write = n.GetBoolValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteBoolValue("admin", Admin); + writer.WriteBoolValue("read", Read); + writer.WriteBoolValue("write", Write); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/TeamRepository.cs b/src/Ayllu.Github.Client/Github/Client/Models/TeamRepository.cs new file mode 100644 index 0000000..29ced41 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/TeamRepository.cs @@ -0,0 +1,761 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + /// + /// A team's access to a repository. + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class TeamRepository : IAdditionalDataHolder, IParsable + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// Whether to allow Auto-merge to be used on pull requests. + public bool? AllowAutoMerge { get; set; } + /// Whether to allow forking this repo + public bool? AllowForking { get; set; } + /// Whether to allow merge commits for pull requests. + public bool? AllowMergeCommit { get; set; } + /// Whether to allow rebase merges for pull requests. + public bool? AllowRebaseMerge { get; set; } + /// Whether to allow squash merges for pull requests. + public bool? AllowSquashMerge { get; set; } + /// Whether the repository is archived. + public bool? Archived { get; set; } + /// The archive_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? ArchiveUrl { get; set; } +#nullable restore +#else + public string ArchiveUrl { get; set; } +#endif + /// The assignees_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? AssigneesUrl { get; set; } +#nullable restore +#else + public string AssigneesUrl { get; set; } +#endif + /// The blobs_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? BlobsUrl { get; set; } +#nullable restore +#else + public string BlobsUrl { get; set; } +#endif + /// The branches_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? BranchesUrl { get; set; } +#nullable restore +#else + public string BranchesUrl { get; set; } +#endif + /// The clone_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? CloneUrl { get; set; } +#nullable restore +#else + public string CloneUrl { get; set; } +#endif + /// The collaborators_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? CollaboratorsUrl { get; set; } +#nullable restore +#else + public string CollaboratorsUrl { get; set; } +#endif + /// The comments_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? CommentsUrl { get; set; } +#nullable restore +#else + public string CommentsUrl { get; set; } +#endif + /// The commits_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? CommitsUrl { get; set; } +#nullable restore +#else + public string CommitsUrl { get; set; } +#endif + /// The compare_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? CompareUrl { get; set; } +#nullable restore +#else + public string CompareUrl { get; set; } +#endif + /// The contents_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? ContentsUrl { get; set; } +#nullable restore +#else + public string ContentsUrl { get; set; } +#endif + /// The contributors_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? ContributorsUrl { get; set; } +#nullable restore +#else + public string ContributorsUrl { get; set; } +#endif + /// The created_at property + public DateTimeOffset? CreatedAt { get; set; } + /// The default branch of the repository. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? DefaultBranch { get; set; } +#nullable restore +#else + public string DefaultBranch { get; set; } +#endif + /// Whether to delete head branches when pull requests are merged + public bool? DeleteBranchOnMerge { get; set; } + /// The deployments_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? DeploymentsUrl { get; set; } +#nullable restore +#else + public string DeploymentsUrl { get; set; } +#endif + /// The description property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Description { get; set; } +#nullable restore +#else + public string Description { get; set; } +#endif + /// Returns whether or not this repository disabled. + public bool? Disabled { get; set; } + /// The downloads_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? DownloadsUrl { get; set; } +#nullable restore +#else + public string DownloadsUrl { get; set; } +#endif + /// The events_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? EventsUrl { get; set; } +#nullable restore +#else + public string EventsUrl { get; set; } +#endif + /// The fork property + public bool? Fork { get; set; } + /// The forks property + public int? Forks { get; set; } + /// The forks_count property + public int? ForksCount { get; set; } + /// The forks_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? ForksUrl { get; set; } +#nullable restore +#else + public string ForksUrl { get; set; } +#endif + /// The full_name property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? FullName { get; set; } +#nullable restore +#else + public string FullName { get; set; } +#endif + /// The git_commits_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? GitCommitsUrl { get; set; } +#nullable restore +#else + public string GitCommitsUrl { get; set; } +#endif + /// The git_refs_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? GitRefsUrl { get; set; } +#nullable restore +#else + public string GitRefsUrl { get; set; } +#endif + /// The git_tags_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? GitTagsUrl { get; set; } +#nullable restore +#else + public string GitTagsUrl { get; set; } +#endif + /// The git_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? GitUrl { get; set; } +#nullable restore +#else + public string GitUrl { get; set; } +#endif + /// Whether downloads are enabled. + public bool? HasDownloads { get; set; } + /// Whether issues are enabled. + public bool? HasIssues { get; set; } + /// The has_pages property + public bool? HasPages { get; set; } + /// Whether projects are enabled. + public bool? HasProjects { get; set; } + /// Whether the wiki is enabled. + public bool? HasWiki { get; set; } + /// The homepage property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Homepage { get; set; } +#nullable restore +#else + public string Homepage { get; set; } +#endif + /// The hooks_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? HooksUrl { get; set; } +#nullable restore +#else + public string HooksUrl { get; set; } +#endif + /// The html_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? HtmlUrl { get; set; } +#nullable restore +#else + public string HtmlUrl { get; set; } +#endif + /// Unique identifier of the repository + public int? Id { get; set; } + /// The issue_comment_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? IssueCommentUrl { get; set; } +#nullable restore +#else + public string IssueCommentUrl { get; set; } +#endif + /// The issue_events_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? IssueEventsUrl { get; set; } +#nullable restore +#else + public string IssueEventsUrl { get; set; } +#endif + /// The issues_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? IssuesUrl { get; set; } +#nullable restore +#else + public string IssuesUrl { get; set; } +#endif + /// Whether this repository acts as a template that can be used to generate new repositories. + public bool? IsTemplate { get; set; } + /// The keys_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? KeysUrl { get; set; } +#nullable restore +#else + public string KeysUrl { get; set; } +#endif + /// The labels_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? LabelsUrl { get; set; } +#nullable restore +#else + public string LabelsUrl { get; set; } +#endif + /// The language property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Language { get; set; } +#nullable restore +#else + public string Language { get; set; } +#endif + /// The languages_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? LanguagesUrl { get; set; } +#nullable restore +#else + public string LanguagesUrl { get; set; } +#endif + /// License Simple +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.NullableLicenseSimple? License { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.NullableLicenseSimple License { get; set; } +#endif + /// The master_branch property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? MasterBranch { get; set; } +#nullable restore +#else + public string MasterBranch { get; set; } +#endif + /// The merges_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? MergesUrl { get; set; } +#nullable restore +#else + public string MergesUrl { get; set; } +#endif + /// The milestones_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? MilestonesUrl { get; set; } +#nullable restore +#else + public string MilestonesUrl { get; set; } +#endif + /// The mirror_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? MirrorUrl { get; set; } +#nullable restore +#else + public string MirrorUrl { get; set; } +#endif + /// The name of the repository. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Name { get; set; } +#nullable restore +#else + public string Name { get; set; } +#endif + /// The network_count property + public int? NetworkCount { get; set; } + /// The node_id property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? NodeId { get; set; } +#nullable restore +#else + public string NodeId { get; set; } +#endif + /// The notifications_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? NotificationsUrl { get; set; } +#nullable restore +#else + public string NotificationsUrl { get; set; } +#endif + /// The open_issues property + public int? OpenIssues { get; set; } + /// The open_issues_count property + public int? OpenIssuesCount { get; set; } + /// A GitHub user. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.NullableSimpleUser? Owner { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.NullableSimpleUser Owner { get; set; } +#endif + /// The permissions property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.TeamRepository_permissions? Permissions { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.TeamRepository_permissions Permissions { get; set; } +#endif + /// Whether the repository is private or public. + public bool? Private { get; set; } + /// The pulls_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? PullsUrl { get; set; } +#nullable restore +#else + public string PullsUrl { get; set; } +#endif + /// The pushed_at property + public DateTimeOffset? PushedAt { get; set; } + /// The releases_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? ReleasesUrl { get; set; } +#nullable restore +#else + public string ReleasesUrl { get; set; } +#endif + /// The role_name property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? RoleName { get; set; } +#nullable restore +#else + public string RoleName { get; set; } +#endif + /// The size property + public int? Size { get; set; } + /// The ssh_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? SshUrl { get; set; } +#nullable restore +#else + public string SshUrl { get; set; } +#endif + /// The stargazers_count property + public int? StargazersCount { get; set; } + /// The stargazers_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? StargazersUrl { get; set; } +#nullable restore +#else + public string StargazersUrl { get; set; } +#endif + /// The statuses_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? StatusesUrl { get; set; } +#nullable restore +#else + public string StatusesUrl { get; set; } +#endif + /// The subscribers_count property + public int? SubscribersCount { get; set; } + /// The subscribers_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? SubscribersUrl { get; set; } +#nullable restore +#else + public string SubscribersUrl { get; set; } +#endif + /// The subscription_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? SubscriptionUrl { get; set; } +#nullable restore +#else + public string SubscriptionUrl { get; set; } +#endif + /// The svn_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? SvnUrl { get; set; } +#nullable restore +#else + public string SvnUrl { get; set; } +#endif + /// The tags_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? TagsUrl { get; set; } +#nullable restore +#else + public string TagsUrl { get; set; } +#endif + /// The teams_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? TeamsUrl { get; set; } +#nullable restore +#else + public string TeamsUrl { get; set; } +#endif + /// The temp_clone_token property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? TempCloneToken { get; set; } +#nullable restore +#else + public string TempCloneToken { get; set; } +#endif + /// The topics property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? Topics { get; set; } +#nullable restore +#else + public List Topics { get; set; } +#endif + /// The trees_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? TreesUrl { get; set; } +#nullable restore +#else + public string TreesUrl { get; set; } +#endif + /// The updated_at property + public DateTimeOffset? UpdatedAt { get; set; } + /// The url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Url { get; set; } +#nullable restore +#else + public string Url { get; set; } +#endif + /// The repository visibility: public, private, or internal. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Visibility { get; set; } +#nullable restore +#else + public string Visibility { get; set; } +#endif + /// The watchers property + public int? Watchers { get; set; } + /// The watchers_count property + public int? WatchersCount { get; set; } + /// Whether to require contributors to sign off on web-based commits + public bool? WebCommitSignoffRequired { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public TeamRepository() + { + AdditionalData = new Dictionary(); + Visibility = "public"; + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.TeamRepository CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.TeamRepository(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "allow_auto_merge", n => { AllowAutoMerge = n.GetBoolValue(); } }, + { "allow_forking", n => { AllowForking = n.GetBoolValue(); } }, + { "allow_merge_commit", n => { AllowMergeCommit = n.GetBoolValue(); } }, + { "allow_rebase_merge", n => { AllowRebaseMerge = n.GetBoolValue(); } }, + { "allow_squash_merge", n => { AllowSquashMerge = n.GetBoolValue(); } }, + { "archive_url", n => { ArchiveUrl = n.GetStringValue(); } }, + { "archived", n => { Archived = n.GetBoolValue(); } }, + { "assignees_url", n => { AssigneesUrl = n.GetStringValue(); } }, + { "blobs_url", n => { BlobsUrl = n.GetStringValue(); } }, + { "branches_url", n => { BranchesUrl = n.GetStringValue(); } }, + { "clone_url", n => { CloneUrl = n.GetStringValue(); } }, + { "collaborators_url", n => { CollaboratorsUrl = n.GetStringValue(); } }, + { "comments_url", n => { CommentsUrl = n.GetStringValue(); } }, + { "commits_url", n => { CommitsUrl = n.GetStringValue(); } }, + { "compare_url", n => { CompareUrl = n.GetStringValue(); } }, + { "contents_url", n => { ContentsUrl = n.GetStringValue(); } }, + { "contributors_url", n => { ContributorsUrl = n.GetStringValue(); } }, + { "created_at", n => { CreatedAt = n.GetDateTimeOffsetValue(); } }, + { "default_branch", n => { DefaultBranch = n.GetStringValue(); } }, + { "delete_branch_on_merge", n => { DeleteBranchOnMerge = n.GetBoolValue(); } }, + { "deployments_url", n => { DeploymentsUrl = n.GetStringValue(); } }, + { "description", n => { Description = n.GetStringValue(); } }, + { "disabled", n => { Disabled = n.GetBoolValue(); } }, + { "downloads_url", n => { DownloadsUrl = n.GetStringValue(); } }, + { "events_url", n => { EventsUrl = n.GetStringValue(); } }, + { "fork", n => { Fork = n.GetBoolValue(); } }, + { "forks", n => { Forks = n.GetIntValue(); } }, + { "forks_count", n => { ForksCount = n.GetIntValue(); } }, + { "forks_url", n => { ForksUrl = n.GetStringValue(); } }, + { "full_name", n => { FullName = n.GetStringValue(); } }, + { "git_commits_url", n => { GitCommitsUrl = n.GetStringValue(); } }, + { "git_refs_url", n => { GitRefsUrl = n.GetStringValue(); } }, + { "git_tags_url", n => { GitTagsUrl = n.GetStringValue(); } }, + { "git_url", n => { GitUrl = n.GetStringValue(); } }, + { "has_downloads", n => { HasDownloads = n.GetBoolValue(); } }, + { "has_issues", n => { HasIssues = n.GetBoolValue(); } }, + { "has_pages", n => { HasPages = n.GetBoolValue(); } }, + { "has_projects", n => { HasProjects = n.GetBoolValue(); } }, + { "has_wiki", n => { HasWiki = n.GetBoolValue(); } }, + { "homepage", n => { Homepage = n.GetStringValue(); } }, + { "hooks_url", n => { HooksUrl = n.GetStringValue(); } }, + { "html_url", n => { HtmlUrl = n.GetStringValue(); } }, + { "id", n => { Id = n.GetIntValue(); } }, + { "is_template", n => { IsTemplate = n.GetBoolValue(); } }, + { "issue_comment_url", n => { IssueCommentUrl = n.GetStringValue(); } }, + { "issue_events_url", n => { IssueEventsUrl = n.GetStringValue(); } }, + { "issues_url", n => { IssuesUrl = n.GetStringValue(); } }, + { "keys_url", n => { KeysUrl = n.GetStringValue(); } }, + { "labels_url", n => { LabelsUrl = n.GetStringValue(); } }, + { "language", n => { Language = n.GetStringValue(); } }, + { "languages_url", n => { LanguagesUrl = n.GetStringValue(); } }, + { "license", n => { License = n.GetObjectValue(global::Ayllu.Github.Client.Models.NullableLicenseSimple.CreateFromDiscriminatorValue); } }, + { "master_branch", n => { MasterBranch = n.GetStringValue(); } }, + { "merges_url", n => { MergesUrl = n.GetStringValue(); } }, + { "milestones_url", n => { MilestonesUrl = n.GetStringValue(); } }, + { "mirror_url", n => { MirrorUrl = n.GetStringValue(); } }, + { "name", n => { Name = n.GetStringValue(); } }, + { "network_count", n => { NetworkCount = n.GetIntValue(); } }, + { "node_id", n => { NodeId = n.GetStringValue(); } }, + { "notifications_url", n => { NotificationsUrl = n.GetStringValue(); } }, + { "open_issues", n => { OpenIssues = n.GetIntValue(); } }, + { "open_issues_count", n => { OpenIssuesCount = n.GetIntValue(); } }, + { "owner", n => { Owner = n.GetObjectValue(global::Ayllu.Github.Client.Models.NullableSimpleUser.CreateFromDiscriminatorValue); } }, + { "permissions", n => { Permissions = n.GetObjectValue(global::Ayllu.Github.Client.Models.TeamRepository_permissions.CreateFromDiscriminatorValue); } }, + { "private", n => { Private = n.GetBoolValue(); } }, + { "pulls_url", n => { PullsUrl = n.GetStringValue(); } }, + { "pushed_at", n => { PushedAt = n.GetDateTimeOffsetValue(); } }, + { "releases_url", n => { ReleasesUrl = n.GetStringValue(); } }, + { "role_name", n => { RoleName = n.GetStringValue(); } }, + { "size", n => { Size = n.GetIntValue(); } }, + { "ssh_url", n => { SshUrl = n.GetStringValue(); } }, + { "stargazers_count", n => { StargazersCount = n.GetIntValue(); } }, + { "stargazers_url", n => { StargazersUrl = n.GetStringValue(); } }, + { "statuses_url", n => { StatusesUrl = n.GetStringValue(); } }, + { "subscribers_count", n => { SubscribersCount = n.GetIntValue(); } }, + { "subscribers_url", n => { SubscribersUrl = n.GetStringValue(); } }, + { "subscription_url", n => { SubscriptionUrl = n.GetStringValue(); } }, + { "svn_url", n => { SvnUrl = n.GetStringValue(); } }, + { "tags_url", n => { TagsUrl = n.GetStringValue(); } }, + { "teams_url", n => { TeamsUrl = n.GetStringValue(); } }, + { "temp_clone_token", n => { TempCloneToken = n.GetStringValue(); } }, + { "topics", n => { Topics = n.GetCollectionOfPrimitiveValues()?.AsList(); } }, + { "trees_url", n => { TreesUrl = n.GetStringValue(); } }, + { "updated_at", n => { UpdatedAt = n.GetDateTimeOffsetValue(); } }, + { "url", n => { Url = n.GetStringValue(); } }, + { "visibility", n => { Visibility = n.GetStringValue(); } }, + { "watchers", n => { Watchers = n.GetIntValue(); } }, + { "watchers_count", n => { WatchersCount = n.GetIntValue(); } }, + { "web_commit_signoff_required", n => { WebCommitSignoffRequired = n.GetBoolValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteBoolValue("allow_auto_merge", AllowAutoMerge); + writer.WriteBoolValue("allow_forking", AllowForking); + writer.WriteBoolValue("allow_merge_commit", AllowMergeCommit); + writer.WriteBoolValue("allow_rebase_merge", AllowRebaseMerge); + writer.WriteBoolValue("allow_squash_merge", AllowSquashMerge); + writer.WriteBoolValue("archived", Archived); + writer.WriteStringValue("archive_url", ArchiveUrl); + writer.WriteStringValue("assignees_url", AssigneesUrl); + writer.WriteStringValue("blobs_url", BlobsUrl); + writer.WriteStringValue("branches_url", BranchesUrl); + writer.WriteStringValue("clone_url", CloneUrl); + writer.WriteStringValue("collaborators_url", CollaboratorsUrl); + writer.WriteStringValue("comments_url", CommentsUrl); + writer.WriteStringValue("commits_url", CommitsUrl); + writer.WriteStringValue("compare_url", CompareUrl); + writer.WriteStringValue("contents_url", ContentsUrl); + writer.WriteStringValue("contributors_url", ContributorsUrl); + writer.WriteDateTimeOffsetValue("created_at", CreatedAt); + writer.WriteStringValue("default_branch", DefaultBranch); + writer.WriteBoolValue("delete_branch_on_merge", DeleteBranchOnMerge); + writer.WriteStringValue("deployments_url", DeploymentsUrl); + writer.WriteStringValue("description", Description); + writer.WriteBoolValue("disabled", Disabled); + writer.WriteStringValue("downloads_url", DownloadsUrl); + writer.WriteStringValue("events_url", EventsUrl); + writer.WriteBoolValue("fork", Fork); + writer.WriteIntValue("forks", Forks); + writer.WriteIntValue("forks_count", ForksCount); + writer.WriteStringValue("forks_url", ForksUrl); + writer.WriteStringValue("full_name", FullName); + writer.WriteStringValue("git_commits_url", GitCommitsUrl); + writer.WriteStringValue("git_refs_url", GitRefsUrl); + writer.WriteStringValue("git_tags_url", GitTagsUrl); + writer.WriteStringValue("git_url", GitUrl); + writer.WriteBoolValue("has_downloads", HasDownloads); + writer.WriteBoolValue("has_issues", HasIssues); + writer.WriteBoolValue("has_pages", HasPages); + writer.WriteBoolValue("has_projects", HasProjects); + writer.WriteBoolValue("has_wiki", HasWiki); + writer.WriteStringValue("homepage", Homepage); + writer.WriteStringValue("hooks_url", HooksUrl); + writer.WriteStringValue("html_url", HtmlUrl); + writer.WriteIntValue("id", Id); + writer.WriteStringValue("issue_comment_url", IssueCommentUrl); + writer.WriteStringValue("issue_events_url", IssueEventsUrl); + writer.WriteStringValue("issues_url", IssuesUrl); + writer.WriteBoolValue("is_template", IsTemplate); + writer.WriteStringValue("keys_url", KeysUrl); + writer.WriteStringValue("labels_url", LabelsUrl); + writer.WriteStringValue("language", Language); + writer.WriteStringValue("languages_url", LanguagesUrl); + writer.WriteObjectValue("license", License); + writer.WriteStringValue("master_branch", MasterBranch); + writer.WriteStringValue("merges_url", MergesUrl); + writer.WriteStringValue("milestones_url", MilestonesUrl); + writer.WriteStringValue("mirror_url", MirrorUrl); + writer.WriteStringValue("name", Name); + writer.WriteIntValue("network_count", NetworkCount); + writer.WriteStringValue("node_id", NodeId); + writer.WriteStringValue("notifications_url", NotificationsUrl); + writer.WriteIntValue("open_issues", OpenIssues); + writer.WriteIntValue("open_issues_count", OpenIssuesCount); + writer.WriteObjectValue("owner", Owner); + writer.WriteObjectValue("permissions", Permissions); + writer.WriteBoolValue("private", Private); + writer.WriteStringValue("pulls_url", PullsUrl); + writer.WriteDateTimeOffsetValue("pushed_at", PushedAt); + writer.WriteStringValue("releases_url", ReleasesUrl); + writer.WriteStringValue("role_name", RoleName); + writer.WriteIntValue("size", Size); + writer.WriteStringValue("ssh_url", SshUrl); + writer.WriteIntValue("stargazers_count", StargazersCount); + writer.WriteStringValue("stargazers_url", StargazersUrl); + writer.WriteStringValue("statuses_url", StatusesUrl); + writer.WriteIntValue("subscribers_count", SubscribersCount); + writer.WriteStringValue("subscribers_url", SubscribersUrl); + writer.WriteStringValue("subscription_url", SubscriptionUrl); + writer.WriteStringValue("svn_url", SvnUrl); + writer.WriteStringValue("tags_url", TagsUrl); + writer.WriteStringValue("teams_url", TeamsUrl); + writer.WriteStringValue("temp_clone_token", TempCloneToken); + writer.WriteCollectionOfPrimitiveValues("topics", Topics); + writer.WriteStringValue("trees_url", TreesUrl); + writer.WriteDateTimeOffsetValue("updated_at", UpdatedAt); + writer.WriteStringValue("url", Url); + writer.WriteStringValue("visibility", Visibility); + writer.WriteIntValue("watchers", Watchers); + writer.WriteIntValue("watchers_count", WatchersCount); + writer.WriteBoolValue("web_commit_signoff_required", WebCommitSignoffRequired); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/TeamRepository_permissions.cs b/src/Ayllu.Github.Client/Github/Client/Models/TeamRepository_permissions.cs new file mode 100644 index 0000000..b650b35 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/TeamRepository_permissions.cs @@ -0,0 +1,75 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class TeamRepository_permissions : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The admin property + public bool? Admin { get; set; } + /// The maintain property + public bool? Maintain { get; set; } + /// The pull property + public bool? Pull { get; set; } + /// The push property + public bool? Push { get; set; } + /// The triage property + public bool? Triage { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public TeamRepository_permissions() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.TeamRepository_permissions CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.TeamRepository_permissions(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "admin", n => { Admin = n.GetBoolValue(); } }, + { "maintain", n => { Maintain = n.GetBoolValue(); } }, + { "pull", n => { Pull = n.GetBoolValue(); } }, + { "push", n => { Push = n.GetBoolValue(); } }, + { "triage", n => { Triage = n.GetBoolValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteBoolValue("admin", Admin); + writer.WriteBoolValue("maintain", Maintain); + writer.WriteBoolValue("pull", Pull); + writer.WriteBoolValue("push", Push); + writer.WriteBoolValue("triage", Triage); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/TeamRoleAssignment.cs b/src/Ayllu.Github.Client/Github/Client/Models/TeamRoleAssignment.cs new file mode 100644 index 0000000..49701de --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/TeamRoleAssignment.cs @@ -0,0 +1,194 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + /// + /// The Relationship a Team has with a role. + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class TeamRoleAssignment : IAdditionalDataHolder, IParsable + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// Determines if the team has a direct, indirect, or mixed relationship to a role + public global::Ayllu.Github.Client.Models.TeamRoleAssignment_assignment? Assignment { get; set; } + /// The description property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Description { get; set; } +#nullable restore +#else + public string Description { get; set; } +#endif + /// The html_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? HtmlUrl { get; set; } +#nullable restore +#else + public string HtmlUrl { get; set; } +#endif + /// The id property + public int? Id { get; set; } + /// The members_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? MembersUrl { get; set; } +#nullable restore +#else + public string MembersUrl { get; set; } +#endif + /// The name property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Name { get; set; } +#nullable restore +#else + public string Name { get; set; } +#endif + /// The node_id property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? NodeId { get; set; } +#nullable restore +#else + public string NodeId { get; set; } +#endif + /// The notification_setting property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? NotificationSetting { get; set; } +#nullable restore +#else + public string NotificationSetting { get; set; } +#endif + /// Groups of organization members that gives permissions on specified repositories. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.NullableTeamSimple? Parent { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.NullableTeamSimple Parent { get; set; } +#endif + /// The permission property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Permission { get; set; } +#nullable restore +#else + public string Permission { get; set; } +#endif + /// The permissions property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.TeamRoleAssignment_permissions? Permissions { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.TeamRoleAssignment_permissions Permissions { get; set; } +#endif + /// The privacy property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Privacy { get; set; } +#nullable restore +#else + public string Privacy { get; set; } +#endif + /// The repositories_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? RepositoriesUrl { get; set; } +#nullable restore +#else + public string RepositoriesUrl { get; set; } +#endif + /// The slug property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Slug { get; set; } +#nullable restore +#else + public string Slug { get; set; } +#endif + /// The url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Url { get; set; } +#nullable restore +#else + public string Url { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public TeamRoleAssignment() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.TeamRoleAssignment CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.TeamRoleAssignment(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "assignment", n => { Assignment = n.GetEnumValue(); } }, + { "description", n => { Description = n.GetStringValue(); } }, + { "html_url", n => { HtmlUrl = n.GetStringValue(); } }, + { "id", n => { Id = n.GetIntValue(); } }, + { "members_url", n => { MembersUrl = n.GetStringValue(); } }, + { "name", n => { Name = n.GetStringValue(); } }, + { "node_id", n => { NodeId = n.GetStringValue(); } }, + { "notification_setting", n => { NotificationSetting = n.GetStringValue(); } }, + { "parent", n => { Parent = n.GetObjectValue(global::Ayllu.Github.Client.Models.NullableTeamSimple.CreateFromDiscriminatorValue); } }, + { "permission", n => { Permission = n.GetStringValue(); } }, + { "permissions", n => { Permissions = n.GetObjectValue(global::Ayllu.Github.Client.Models.TeamRoleAssignment_permissions.CreateFromDiscriminatorValue); } }, + { "privacy", n => { Privacy = n.GetStringValue(); } }, + { "repositories_url", n => { RepositoriesUrl = n.GetStringValue(); } }, + { "slug", n => { Slug = n.GetStringValue(); } }, + { "url", n => { Url = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteEnumValue("assignment", Assignment); + writer.WriteStringValue("description", Description); + writer.WriteStringValue("html_url", HtmlUrl); + writer.WriteIntValue("id", Id); + writer.WriteStringValue("members_url", MembersUrl); + writer.WriteStringValue("name", Name); + writer.WriteStringValue("node_id", NodeId); + writer.WriteStringValue("notification_setting", NotificationSetting); + writer.WriteObjectValue("parent", Parent); + writer.WriteStringValue("permission", Permission); + writer.WriteObjectValue("permissions", Permissions); + writer.WriteStringValue("privacy", Privacy); + writer.WriteStringValue("repositories_url", RepositoriesUrl); + writer.WriteStringValue("slug", Slug); + writer.WriteStringValue("url", Url); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/TeamRoleAssignment_assignment.cs b/src/Ayllu.Github.Client/Github/Client/Models/TeamRoleAssignment_assignment.cs new file mode 100644 index 0000000..966162d --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/TeamRoleAssignment_assignment.cs @@ -0,0 +1,23 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Models +{ + /// Determines if the team has a direct, indirect, or mixed relationship to a role + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public enum TeamRoleAssignment_assignment + { + [EnumMember(Value = "direct")] + #pragma warning disable CS1591 + Direct, + #pragma warning restore CS1591 + [EnumMember(Value = "indirect")] + #pragma warning disable CS1591 + Indirect, + #pragma warning restore CS1591 + [EnumMember(Value = "mixed")] + #pragma warning disable CS1591 + Mixed, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Models/TeamRoleAssignment_permissions.cs b/src/Ayllu.Github.Client/Github/Client/Models/TeamRoleAssignment_permissions.cs new file mode 100644 index 0000000..83cee4b --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/TeamRoleAssignment_permissions.cs @@ -0,0 +1,75 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class TeamRoleAssignment_permissions : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The admin property + public bool? Admin { get; set; } + /// The maintain property + public bool? Maintain { get; set; } + /// The pull property + public bool? Pull { get; set; } + /// The push property + public bool? Push { get; set; } + /// The triage property + public bool? Triage { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public TeamRoleAssignment_permissions() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.TeamRoleAssignment_permissions CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.TeamRoleAssignment_permissions(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "admin", n => { Admin = n.GetBoolValue(); } }, + { "maintain", n => { Maintain = n.GetBoolValue(); } }, + { "pull", n => { Pull = n.GetBoolValue(); } }, + { "push", n => { Push = n.GetBoolValue(); } }, + { "triage", n => { Triage = n.GetBoolValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteBoolValue("admin", Admin); + writer.WriteBoolValue("maintain", Maintain); + writer.WriteBoolValue("pull", Pull); + writer.WriteBoolValue("push", Push); + writer.WriteBoolValue("triage", Triage); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/TeamSimple.cs b/src/Ayllu.Github.Client/Github/Client/Models/TeamSimple.cs new file mode 100644 index 0000000..30f8e3c --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/TeamSimple.cs @@ -0,0 +1,180 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + /// + /// Groups of organization members that gives permissions on specified repositories. + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class TeamSimple : IAdditionalDataHolder, IParsable + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// Description of the team +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Description { get; set; } +#nullable restore +#else + public string Description { get; set; } +#endif + /// The html_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? HtmlUrl { get; set; } +#nullable restore +#else + public string HtmlUrl { get; set; } +#endif + /// Unique identifier of the team + public int? Id { get; set; } + /// Distinguished Name (DN) that team maps to within LDAP environment +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? LdapDn { get; set; } +#nullable restore +#else + public string LdapDn { get; set; } +#endif + /// The members_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? MembersUrl { get; set; } +#nullable restore +#else + public string MembersUrl { get; set; } +#endif + /// Name of the team +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Name { get; set; } +#nullable restore +#else + public string Name { get; set; } +#endif + /// The node_id property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? NodeId { get; set; } +#nullable restore +#else + public string NodeId { get; set; } +#endif + /// The notification setting the team has set +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? NotificationSetting { get; set; } +#nullable restore +#else + public string NotificationSetting { get; set; } +#endif + /// Permission that the team will have for its repositories +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Permission { get; set; } +#nullable restore +#else + public string Permission { get; set; } +#endif + /// The level of privacy this team should have +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Privacy { get; set; } +#nullable restore +#else + public string Privacy { get; set; } +#endif + /// The repositories_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? RepositoriesUrl { get; set; } +#nullable restore +#else + public string RepositoriesUrl { get; set; } +#endif + /// The slug property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Slug { get; set; } +#nullable restore +#else + public string Slug { get; set; } +#endif + /// URL for the team +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Url { get; set; } +#nullable restore +#else + public string Url { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public TeamSimple() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.TeamSimple CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.TeamSimple(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "description", n => { Description = n.GetStringValue(); } }, + { "html_url", n => { HtmlUrl = n.GetStringValue(); } }, + { "id", n => { Id = n.GetIntValue(); } }, + { "ldap_dn", n => { LdapDn = n.GetStringValue(); } }, + { "members_url", n => { MembersUrl = n.GetStringValue(); } }, + { "name", n => { Name = n.GetStringValue(); } }, + { "node_id", n => { NodeId = n.GetStringValue(); } }, + { "notification_setting", n => { NotificationSetting = n.GetStringValue(); } }, + { "permission", n => { Permission = n.GetStringValue(); } }, + { "privacy", n => { Privacy = n.GetStringValue(); } }, + { "repositories_url", n => { RepositoriesUrl = n.GetStringValue(); } }, + { "slug", n => { Slug = n.GetStringValue(); } }, + { "url", n => { Url = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("description", Description); + writer.WriteStringValue("html_url", HtmlUrl); + writer.WriteIntValue("id", Id); + writer.WriteStringValue("ldap_dn", LdapDn); + writer.WriteStringValue("members_url", MembersUrl); + writer.WriteStringValue("name", Name); + writer.WriteStringValue("node_id", NodeId); + writer.WriteStringValue("notification_setting", NotificationSetting); + writer.WriteStringValue("permission", Permission); + writer.WriteStringValue("privacy", Privacy); + writer.WriteStringValue("repositories_url", RepositoriesUrl); + writer.WriteStringValue("slug", Slug); + writer.WriteStringValue("url", Url); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/Team_permissions.cs b/src/Ayllu.Github.Client/Github/Client/Models/Team_permissions.cs new file mode 100644 index 0000000..207e94c --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/Team_permissions.cs @@ -0,0 +1,75 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class Team_permissions : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The admin property + public bool? Admin { get; set; } + /// The maintain property + public bool? Maintain { get; set; } + /// The pull property + public bool? Pull { get; set; } + /// The push property + public bool? Push { get; set; } + /// The triage property + public bool? Triage { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public Team_permissions() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.Team_permissions CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.Team_permissions(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "admin", n => { Admin = n.GetBoolValue(); } }, + { "maintain", n => { Maintain = n.GetBoolValue(); } }, + { "pull", n => { Pull = n.GetBoolValue(); } }, + { "push", n => { Push = n.GetBoolValue(); } }, + { "triage", n => { Triage = n.GetBoolValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteBoolValue("admin", Admin); + writer.WriteBoolValue("maintain", Maintain); + writer.WriteBoolValue("pull", Pull); + writer.WriteBoolValue("push", Push); + writer.WriteBoolValue("triage", Triage); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/ThreadObject.cs b/src/Ayllu.Github.Client/Github/Client/Models/ThreadObject.cs new file mode 100644 index 0000000..eb31998 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/ThreadObject.cs @@ -0,0 +1,140 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + /// + /// Thread + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class ThreadObject : IAdditionalDataHolder, IParsable + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The id property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Id { get; set; } +#nullable restore +#else + public string Id { get; set; } +#endif + /// The last_read_at property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? LastReadAt { get; set; } +#nullable restore +#else + public string LastReadAt { get; set; } +#endif + /// The reason property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Reason { get; set; } +#nullable restore +#else + public string Reason { get; set; } +#endif + /// Minimal Repository +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.MinimalRepository? Repository { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.MinimalRepository Repository { get; set; } +#endif + /// The subject property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.Thread_subject? Subject { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.Thread_subject Subject { get; set; } +#endif + /// The subscription_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? SubscriptionUrl { get; set; } +#nullable restore +#else + public string SubscriptionUrl { get; set; } +#endif + /// The unread property + public bool? Unread { get; set; } + /// The updated_at property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? UpdatedAt { get; set; } +#nullable restore +#else + public string UpdatedAt { get; set; } +#endif + /// The url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Url { get; set; } +#nullable restore +#else + public string Url { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public ThreadObject() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.ThreadObject CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.ThreadObject(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "id", n => { Id = n.GetStringValue(); } }, + { "last_read_at", n => { LastReadAt = n.GetStringValue(); } }, + { "reason", n => { Reason = n.GetStringValue(); } }, + { "repository", n => { Repository = n.GetObjectValue(global::Ayllu.Github.Client.Models.MinimalRepository.CreateFromDiscriminatorValue); } }, + { "subject", n => { Subject = n.GetObjectValue(global::Ayllu.Github.Client.Models.Thread_subject.CreateFromDiscriminatorValue); } }, + { "subscription_url", n => { SubscriptionUrl = n.GetStringValue(); } }, + { "unread", n => { Unread = n.GetBoolValue(); } }, + { "updated_at", n => { UpdatedAt = n.GetStringValue(); } }, + { "url", n => { Url = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("id", Id); + writer.WriteStringValue("last_read_at", LastReadAt); + writer.WriteStringValue("reason", Reason); + writer.WriteObjectValue("repository", Repository); + writer.WriteObjectValue("subject", Subject); + writer.WriteStringValue("subscription_url", SubscriptionUrl); + writer.WriteBoolValue("unread", Unread); + writer.WriteStringValue("updated_at", UpdatedAt); + writer.WriteStringValue("url", Url); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/ThreadSubscription.cs b/src/Ayllu.Github.Client/Github/Client/Models/ThreadSubscription.cs new file mode 100644 index 0000000..e916591 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/ThreadSubscription.cs @@ -0,0 +1,108 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + /// + /// Thread Subscription + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class ThreadSubscription : IAdditionalDataHolder, IParsable + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The created_at property + public DateTimeOffset? CreatedAt { get; set; } + /// The ignored property + public bool? Ignored { get; set; } + /// The reason property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Reason { get; set; } +#nullable restore +#else + public string Reason { get; set; } +#endif + /// The repository_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? RepositoryUrl { get; set; } +#nullable restore +#else + public string RepositoryUrl { get; set; } +#endif + /// The subscribed property + public bool? Subscribed { get; set; } + /// The thread_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? ThreadUrl { get; set; } +#nullable restore +#else + public string ThreadUrl { get; set; } +#endif + /// The url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Url { get; set; } +#nullable restore +#else + public string Url { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public ThreadSubscription() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.ThreadSubscription CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.ThreadSubscription(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "created_at", n => { CreatedAt = n.GetDateTimeOffsetValue(); } }, + { "ignored", n => { Ignored = n.GetBoolValue(); } }, + { "reason", n => { Reason = n.GetStringValue(); } }, + { "repository_url", n => { RepositoryUrl = n.GetStringValue(); } }, + { "subscribed", n => { Subscribed = n.GetBoolValue(); } }, + { "thread_url", n => { ThreadUrl = n.GetStringValue(); } }, + { "url", n => { Url = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteDateTimeOffsetValue("created_at", CreatedAt); + writer.WriteBoolValue("ignored", Ignored); + writer.WriteStringValue("reason", Reason); + writer.WriteStringValue("repository_url", RepositoryUrl); + writer.WriteBoolValue("subscribed", Subscribed); + writer.WriteStringValue("thread_url", ThreadUrl); + writer.WriteStringValue("url", Url); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/Thread_subject.cs b/src/Ayllu.Github.Client/Github/Client/Models/Thread_subject.cs new file mode 100644 index 0000000..8382c3d --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/Thread_subject.cs @@ -0,0 +1,95 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class Thread_subject : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The latest_comment_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? LatestCommentUrl { get; set; } +#nullable restore +#else + public string LatestCommentUrl { get; set; } +#endif + /// The title property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Title { get; set; } +#nullable restore +#else + public string Title { get; set; } +#endif + /// The type property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Type { get; set; } +#nullable restore +#else + public string Type { get; set; } +#endif + /// The url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Url { get; set; } +#nullable restore +#else + public string Url { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public Thread_subject() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.Thread_subject CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.Thread_subject(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "latest_comment_url", n => { LatestCommentUrl = n.GetStringValue(); } }, + { "title", n => { Title = n.GetStringValue(); } }, + { "type", n => { Type = n.GetStringValue(); } }, + { "url", n => { Url = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("latest_comment_url", LatestCommentUrl); + writer.WriteStringValue("title", Title); + writer.WriteStringValue("type", Type); + writer.WriteStringValue("url", Url); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/TimelineAssignedIssueEvent.cs b/src/Ayllu.Github.Client/Github/Client/Models/TimelineAssignedIssueEvent.cs new file mode 100644 index 0000000..6e3dda7 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/TimelineAssignedIssueEvent.cs @@ -0,0 +1,150 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + /// + /// Timeline Assigned Issue Event + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class TimelineAssignedIssueEvent : IAdditionalDataHolder, IParsable + { + /// A GitHub user. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.SimpleUser? Actor { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.SimpleUser Actor { get; set; } +#endif + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// A GitHub user. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.SimpleUser? Assignee { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.SimpleUser Assignee { get; set; } +#endif + /// The commit_id property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? CommitId { get; set; } +#nullable restore +#else + public string CommitId { get; set; } +#endif + /// The commit_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? CommitUrl { get; set; } +#nullable restore +#else + public string CommitUrl { get; set; } +#endif + /// The created_at property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? CreatedAt { get; set; } +#nullable restore +#else + public string CreatedAt { get; set; } +#endif + /// The event property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Event { get; set; } +#nullable restore +#else + public string Event { get; set; } +#endif + /// The id property + public int? Id { get; set; } + /// The node_id property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? NodeId { get; set; } +#nullable restore +#else + public string NodeId { get; set; } +#endif + /// 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. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.NullableIntegration? PerformedViaGithubApp { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.NullableIntegration PerformedViaGithubApp { get; set; } +#endif + /// The url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Url { get; set; } +#nullable restore +#else + public string Url { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public TimelineAssignedIssueEvent() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.TimelineAssignedIssueEvent CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.TimelineAssignedIssueEvent(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "actor", n => { Actor = n.GetObjectValue(global::Ayllu.Github.Client.Models.SimpleUser.CreateFromDiscriminatorValue); } }, + { "assignee", n => { Assignee = n.GetObjectValue(global::Ayllu.Github.Client.Models.SimpleUser.CreateFromDiscriminatorValue); } }, + { "commit_id", n => { CommitId = n.GetStringValue(); } }, + { "commit_url", n => { CommitUrl = n.GetStringValue(); } }, + { "created_at", n => { CreatedAt = n.GetStringValue(); } }, + { "event", n => { Event = n.GetStringValue(); } }, + { "id", n => { Id = n.GetIntValue(); } }, + { "node_id", n => { NodeId = n.GetStringValue(); } }, + { "performed_via_github_app", n => { PerformedViaGithubApp = n.GetObjectValue(global::Ayllu.Github.Client.Models.NullableIntegration.CreateFromDiscriminatorValue); } }, + { "url", n => { Url = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteObjectValue("actor", Actor); + writer.WriteObjectValue("assignee", Assignee); + writer.WriteStringValue("commit_id", CommitId); + writer.WriteStringValue("commit_url", CommitUrl); + writer.WriteStringValue("created_at", CreatedAt); + writer.WriteStringValue("event", Event); + writer.WriteIntValue("id", Id); + writer.WriteStringValue("node_id", NodeId); + writer.WriteObjectValue("performed_via_github_app", PerformedViaGithubApp); + writer.WriteStringValue("url", Url); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/TimelineCommentEvent.cs b/src/Ayllu.Github.Client/Github/Client/Models/TimelineCommentEvent.cs new file mode 100644 index 0000000..253ce29 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/TimelineCommentEvent.cs @@ -0,0 +1,192 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + /// + /// Timeline Comment Event + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class TimelineCommentEvent : IAdditionalDataHolder, IParsable + { + /// A GitHub user. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.SimpleUser? Actor { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.SimpleUser Actor { get; set; } +#endif + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// How the author is associated with the repository. + public global::Ayllu.Github.Client.Models.AuthorAssociation? AuthorAssociation { get; set; } + /// Contents of the issue comment +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Body { get; set; } +#nullable restore +#else + public string Body { get; set; } +#endif + /// The body_html property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? BodyHtml { get; set; } +#nullable restore +#else + public string BodyHtml { get; set; } +#endif + /// The body_text property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? BodyText { get; set; } +#nullable restore +#else + public string BodyText { get; set; } +#endif + /// The created_at property + public DateTimeOffset? CreatedAt { get; set; } + /// The event property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Event { get; set; } +#nullable restore +#else + public string Event { get; set; } +#endif + /// The html_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? HtmlUrl { get; set; } +#nullable restore +#else + public string HtmlUrl { get; set; } +#endif + /// Unique identifier of the issue comment + public int? Id { get; set; } + /// The issue_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? IssueUrl { get; set; } +#nullable restore +#else + public string IssueUrl { get; set; } +#endif + /// The node_id property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? NodeId { get; set; } +#nullable restore +#else + public string NodeId { get; set; } +#endif + /// 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. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.NullableIntegration? PerformedViaGithubApp { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.NullableIntegration PerformedViaGithubApp { get; set; } +#endif + /// The reactions property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.ReactionRollup? Reactions { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.ReactionRollup Reactions { get; set; } +#endif + /// The updated_at property + public DateTimeOffset? UpdatedAt { get; set; } + /// URL for the issue comment +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Url { get; set; } +#nullable restore +#else + public string Url { get; set; } +#endif + /// A GitHub user. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.SimpleUser? User { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.SimpleUser User { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public TimelineCommentEvent() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.TimelineCommentEvent CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.TimelineCommentEvent(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "actor", n => { Actor = n.GetObjectValue(global::Ayllu.Github.Client.Models.SimpleUser.CreateFromDiscriminatorValue); } }, + { "author_association", n => { AuthorAssociation = n.GetEnumValue(); } }, + { "body", n => { Body = n.GetStringValue(); } }, + { "body_html", n => { BodyHtml = n.GetStringValue(); } }, + { "body_text", n => { BodyText = n.GetStringValue(); } }, + { "created_at", n => { CreatedAt = n.GetDateTimeOffsetValue(); } }, + { "event", n => { Event = n.GetStringValue(); } }, + { "html_url", n => { HtmlUrl = n.GetStringValue(); } }, + { "id", n => { Id = n.GetIntValue(); } }, + { "issue_url", n => { IssueUrl = n.GetStringValue(); } }, + { "node_id", n => { NodeId = n.GetStringValue(); } }, + { "performed_via_github_app", n => { PerformedViaGithubApp = n.GetObjectValue(global::Ayllu.Github.Client.Models.NullableIntegration.CreateFromDiscriminatorValue); } }, + { "reactions", n => { Reactions = n.GetObjectValue(global::Ayllu.Github.Client.Models.ReactionRollup.CreateFromDiscriminatorValue); } }, + { "updated_at", n => { UpdatedAt = n.GetDateTimeOffsetValue(); } }, + { "url", n => { Url = n.GetStringValue(); } }, + { "user", n => { User = n.GetObjectValue(global::Ayllu.Github.Client.Models.SimpleUser.CreateFromDiscriminatorValue); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteObjectValue("actor", Actor); + writer.WriteEnumValue("author_association", AuthorAssociation); + writer.WriteStringValue("body", Body); + writer.WriteStringValue("body_html", BodyHtml); + writer.WriteStringValue("body_text", BodyText); + writer.WriteDateTimeOffsetValue("created_at", CreatedAt); + writer.WriteStringValue("event", Event); + writer.WriteStringValue("html_url", HtmlUrl); + writer.WriteIntValue("id", Id); + writer.WriteStringValue("issue_url", IssueUrl); + writer.WriteStringValue("node_id", NodeId); + writer.WriteObjectValue("performed_via_github_app", PerformedViaGithubApp); + writer.WriteObjectValue("reactions", Reactions); + writer.WriteDateTimeOffsetValue("updated_at", UpdatedAt); + writer.WriteStringValue("url", Url); + writer.WriteObjectValue("user", User); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/TimelineCommitCommentedEvent.cs b/src/Ayllu.Github.Client/Github/Client/Models/TimelineCommitCommentedEvent.cs new file mode 100644 index 0000000..9999e8b --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/TimelineCommitCommentedEvent.cs @@ -0,0 +1,96 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + /// + /// Timeline Commit Commented Event + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class TimelineCommitCommentedEvent : IAdditionalDataHolder, IParsable + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The comments property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? Comments { get; set; } +#nullable restore +#else + public List Comments { get; set; } +#endif + /// The commit_id property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? CommitId { get; set; } +#nullable restore +#else + public string CommitId { get; set; } +#endif + /// The event property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Event { get; set; } +#nullable restore +#else + public string Event { get; set; } +#endif + /// The node_id property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? NodeId { get; set; } +#nullable restore +#else + public string NodeId { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public TimelineCommitCommentedEvent() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.TimelineCommitCommentedEvent CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.TimelineCommitCommentedEvent(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "comments", n => { Comments = n.GetCollectionOfObjectValues(global::Ayllu.Github.Client.Models.CommitComment.CreateFromDiscriminatorValue)?.AsList(); } }, + { "commit_id", n => { CommitId = n.GetStringValue(); } }, + { "event", n => { Event = n.GetStringValue(); } }, + { "node_id", n => { NodeId = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteCollectionOfObjectValues("comments", Comments); + writer.WriteStringValue("commit_id", CommitId); + writer.WriteStringValue("event", Event); + writer.WriteStringValue("node_id", NodeId); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/TimelineCommittedEvent.cs b/src/Ayllu.Github.Client/Github/Client/Models/TimelineCommittedEvent.cs new file mode 100644 index 0000000..93a89be --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/TimelineCommittedEvent.cs @@ -0,0 +1,166 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + /// + /// Timeline Committed Event + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class TimelineCommittedEvent : IAdditionalDataHolder, IParsable + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// Identifying information for the git-user +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.TimelineCommittedEvent_author? Author { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.TimelineCommittedEvent_author Author { get; set; } +#endif + /// Identifying information for the git-user +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.TimelineCommittedEvent_committer? Committer { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.TimelineCommittedEvent_committer Committer { get; set; } +#endif + /// The event property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Event { get; set; } +#nullable restore +#else + public string Event { get; set; } +#endif + /// The html_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? HtmlUrl { get; set; } +#nullable restore +#else + public string HtmlUrl { get; set; } +#endif + /// Message describing the purpose of the commit +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Message { get; set; } +#nullable restore +#else + public string Message { get; set; } +#endif + /// The node_id property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? NodeId { get; set; } +#nullable restore +#else + public string NodeId { get; set; } +#endif + /// The parents property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? Parents { get; set; } +#nullable restore +#else + public List Parents { get; set; } +#endif + /// SHA for the commit +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Sha { get; set; } +#nullable restore +#else + public string Sha { get; set; } +#endif + /// The tree property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.TimelineCommittedEvent_tree? Tree { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.TimelineCommittedEvent_tree Tree { get; set; } +#endif + /// The url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Url { get; set; } +#nullable restore +#else + public string Url { get; set; } +#endif + /// The verification property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.TimelineCommittedEvent_verification? Verification { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.TimelineCommittedEvent_verification Verification { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public TimelineCommittedEvent() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.TimelineCommittedEvent CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.TimelineCommittedEvent(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "author", n => { Author = n.GetObjectValue(global::Ayllu.Github.Client.Models.TimelineCommittedEvent_author.CreateFromDiscriminatorValue); } }, + { "committer", n => { Committer = n.GetObjectValue(global::Ayllu.Github.Client.Models.TimelineCommittedEvent_committer.CreateFromDiscriminatorValue); } }, + { "event", n => { Event = n.GetStringValue(); } }, + { "html_url", n => { HtmlUrl = n.GetStringValue(); } }, + { "message", n => { Message = n.GetStringValue(); } }, + { "node_id", n => { NodeId = n.GetStringValue(); } }, + { "parents", n => { Parents = n.GetCollectionOfObjectValues(global::Ayllu.Github.Client.Models.TimelineCommittedEvent_parents.CreateFromDiscriminatorValue)?.AsList(); } }, + { "sha", n => { Sha = n.GetStringValue(); } }, + { "tree", n => { Tree = n.GetObjectValue(global::Ayllu.Github.Client.Models.TimelineCommittedEvent_tree.CreateFromDiscriminatorValue); } }, + { "url", n => { Url = n.GetStringValue(); } }, + { "verification", n => { Verification = n.GetObjectValue(global::Ayllu.Github.Client.Models.TimelineCommittedEvent_verification.CreateFromDiscriminatorValue); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteObjectValue("author", Author); + writer.WriteObjectValue("committer", Committer); + writer.WriteStringValue("event", Event); + writer.WriteStringValue("html_url", HtmlUrl); + writer.WriteStringValue("message", Message); + writer.WriteStringValue("node_id", NodeId); + writer.WriteCollectionOfObjectValues("parents", Parents); + writer.WriteStringValue("sha", Sha); + writer.WriteObjectValue("tree", Tree); + writer.WriteStringValue("url", Url); + writer.WriteObjectValue("verification", Verification); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/TimelineCommittedEvent_author.cs b/src/Ayllu.Github.Client/Github/Client/Models/TimelineCommittedEvent_author.cs new file mode 100644 index 0000000..09f088c --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/TimelineCommittedEvent_author.cs @@ -0,0 +1,80 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + /// + /// Identifying information for the git-user + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class TimelineCommittedEvent_author : IAdditionalDataHolder, IParsable + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// Timestamp of the commit + public DateTimeOffset? Date { get; set; } + /// Git email address of the user +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Email { get; set; } +#nullable restore +#else + public string Email { get; set; } +#endif + /// Name of the git user +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Name { get; set; } +#nullable restore +#else + public string Name { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public TimelineCommittedEvent_author() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.TimelineCommittedEvent_author CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.TimelineCommittedEvent_author(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "date", n => { Date = n.GetDateTimeOffsetValue(); } }, + { "email", n => { Email = n.GetStringValue(); } }, + { "name", n => { Name = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteDateTimeOffsetValue("date", Date); + writer.WriteStringValue("email", Email); + writer.WriteStringValue("name", Name); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/TimelineCommittedEvent_committer.cs b/src/Ayllu.Github.Client/Github/Client/Models/TimelineCommittedEvent_committer.cs new file mode 100644 index 0000000..aa5fcd5 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/TimelineCommittedEvent_committer.cs @@ -0,0 +1,80 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + /// + /// Identifying information for the git-user + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class TimelineCommittedEvent_committer : IAdditionalDataHolder, IParsable + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// Timestamp of the commit + public DateTimeOffset? Date { get; set; } + /// Git email address of the user +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Email { get; set; } +#nullable restore +#else + public string Email { get; set; } +#endif + /// Name of the git user +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Name { get; set; } +#nullable restore +#else + public string Name { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public TimelineCommittedEvent_committer() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.TimelineCommittedEvent_committer CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.TimelineCommittedEvent_committer(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "date", n => { Date = n.GetDateTimeOffsetValue(); } }, + { "email", n => { Email = n.GetStringValue(); } }, + { "name", n => { Name = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteDateTimeOffsetValue("date", Date); + writer.WriteStringValue("email", Email); + writer.WriteStringValue("name", Name); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/TimelineCommittedEvent_parents.cs b/src/Ayllu.Github.Client/Github/Client/Models/TimelineCommittedEvent_parents.cs new file mode 100644 index 0000000..df6917f --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/TimelineCommittedEvent_parents.cs @@ -0,0 +1,85 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class TimelineCommittedEvent_parents : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The html_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? HtmlUrl { get; set; } +#nullable restore +#else + public string HtmlUrl { get; set; } +#endif + /// SHA for the commit +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Sha { get; set; } +#nullable restore +#else + public string Sha { get; set; } +#endif + /// The url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Url { get; set; } +#nullable restore +#else + public string Url { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public TimelineCommittedEvent_parents() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.TimelineCommittedEvent_parents CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.TimelineCommittedEvent_parents(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "html_url", n => { HtmlUrl = n.GetStringValue(); } }, + { "sha", n => { Sha = n.GetStringValue(); } }, + { "url", n => { Url = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("html_url", HtmlUrl); + writer.WriteStringValue("sha", Sha); + writer.WriteStringValue("url", Url); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/TimelineCommittedEvent_tree.cs b/src/Ayllu.Github.Client/Github/Client/Models/TimelineCommittedEvent_tree.cs new file mode 100644 index 0000000..355e640 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/TimelineCommittedEvent_tree.cs @@ -0,0 +1,75 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class TimelineCommittedEvent_tree : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// SHA for the commit +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Sha { get; set; } +#nullable restore +#else + public string Sha { get; set; } +#endif + /// The url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Url { get; set; } +#nullable restore +#else + public string Url { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public TimelineCommittedEvent_tree() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.TimelineCommittedEvent_tree CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.TimelineCommittedEvent_tree(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "sha", n => { Sha = n.GetStringValue(); } }, + { "url", n => { Url = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("sha", Sha); + writer.WriteStringValue("url", Url); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/TimelineCommittedEvent_verification.cs b/src/Ayllu.Github.Client/Github/Client/Models/TimelineCommittedEvent_verification.cs new file mode 100644 index 0000000..297ed7f --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/TimelineCommittedEvent_verification.cs @@ -0,0 +1,99 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class TimelineCommittedEvent_verification : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The payload property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Payload { get; set; } +#nullable restore +#else + public string Payload { get; set; } +#endif + /// The reason property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Reason { get; set; } +#nullable restore +#else + public string Reason { get; set; } +#endif + /// The signature property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Signature { get; set; } +#nullable restore +#else + public string Signature { get; set; } +#endif + /// The verified property + public bool? Verified { get; set; } + /// The verified_at property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? VerifiedAt { get; set; } +#nullable restore +#else + public string VerifiedAt { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public TimelineCommittedEvent_verification() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.TimelineCommittedEvent_verification CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.TimelineCommittedEvent_verification(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "payload", n => { Payload = n.GetStringValue(); } }, + { "reason", n => { Reason = n.GetStringValue(); } }, + { "signature", n => { Signature = n.GetStringValue(); } }, + { "verified", n => { Verified = n.GetBoolValue(); } }, + { "verified_at", n => { VerifiedAt = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("payload", Payload); + writer.WriteStringValue("reason", Reason); + writer.WriteStringValue("signature", Signature); + writer.WriteBoolValue("verified", Verified); + writer.WriteStringValue("verified_at", VerifiedAt); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/TimelineCrossReferencedEvent.cs b/src/Ayllu.Github.Client/Github/Client/Models/TimelineCrossReferencedEvent.cs new file mode 100644 index 0000000..f5de89c --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/TimelineCrossReferencedEvent.cs @@ -0,0 +1,94 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + /// + /// Timeline Cross Referenced Event + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class TimelineCrossReferencedEvent : IAdditionalDataHolder, IParsable + { + /// A GitHub user. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.SimpleUser? Actor { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.SimpleUser Actor { get; set; } +#endif + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The created_at property + public DateTimeOffset? CreatedAt { get; set; } + /// The event property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Event { get; set; } +#nullable restore +#else + public string Event { get; set; } +#endif + /// The source property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.TimelineCrossReferencedEvent_source? Source { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.TimelineCrossReferencedEvent_source Source { get; set; } +#endif + /// The updated_at property + public DateTimeOffset? UpdatedAt { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public TimelineCrossReferencedEvent() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.TimelineCrossReferencedEvent CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.TimelineCrossReferencedEvent(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "actor", n => { Actor = n.GetObjectValue(global::Ayllu.Github.Client.Models.SimpleUser.CreateFromDiscriminatorValue); } }, + { "created_at", n => { CreatedAt = n.GetDateTimeOffsetValue(); } }, + { "event", n => { Event = n.GetStringValue(); } }, + { "source", n => { Source = n.GetObjectValue(global::Ayllu.Github.Client.Models.TimelineCrossReferencedEvent_source.CreateFromDiscriminatorValue); } }, + { "updated_at", n => { UpdatedAt = n.GetDateTimeOffsetValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteObjectValue("actor", Actor); + writer.WriteDateTimeOffsetValue("created_at", CreatedAt); + writer.WriteStringValue("event", Event); + writer.WriteObjectValue("source", Source); + writer.WriteDateTimeOffsetValue("updated_at", UpdatedAt); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/TimelineCrossReferencedEvent_source.cs b/src/Ayllu.Github.Client/Github/Client/Models/TimelineCrossReferencedEvent_source.cs new file mode 100644 index 0000000..f37502d --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/TimelineCrossReferencedEvent_source.cs @@ -0,0 +1,75 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class TimelineCrossReferencedEvent_source : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// Issues are a great way to keep track of tasks, enhancements, and bugs for your projects. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.Issue? Issue { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.Issue Issue { get; set; } +#endif + /// The type property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Type { get; set; } +#nullable restore +#else + public string Type { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public TimelineCrossReferencedEvent_source() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.TimelineCrossReferencedEvent_source CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.TimelineCrossReferencedEvent_source(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "issue", n => { Issue = n.GetObjectValue(global::Ayllu.Github.Client.Models.Issue.CreateFromDiscriminatorValue); } }, + { "type", n => { Type = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteObjectValue("issue", Issue); + writer.WriteStringValue("type", Type); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/TimelineIssueEvents.cs b/src/Ayllu.Github.Client/Github/Client/Models/TimelineIssueEvents.cs new file mode 100644 index 0000000..77f061a --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/TimelineIssueEvents.cs @@ -0,0 +1,248 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + /// + /// Composed type wrapper for classes , , , , , , , , , , , , , , , , , , , , , + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class TimelineIssueEvents : IComposedTypeWrapper, IParsable + { + /// Composed type representation for type +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.AddedToProjectIssueEvent? AddedToProjectIssueEvent { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.AddedToProjectIssueEvent AddedToProjectIssueEvent { get; set; } +#endif + /// Composed type representation for type +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.ConvertedNoteToIssueIssueEvent? ConvertedNoteToIssueIssueEvent { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.ConvertedNoteToIssueIssueEvent ConvertedNoteToIssueIssueEvent { get; set; } +#endif + /// Composed type representation for type +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.DemilestonedIssueEvent? DemilestonedIssueEvent { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.DemilestonedIssueEvent DemilestonedIssueEvent { get; set; } +#endif + /// Composed type representation for type +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.LabeledIssueEvent? LabeledIssueEvent { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.LabeledIssueEvent LabeledIssueEvent { get; set; } +#endif + /// Composed type representation for type +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.LockedIssueEvent? LockedIssueEvent { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.LockedIssueEvent LockedIssueEvent { get; set; } +#endif + /// Composed type representation for type +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.MilestonedIssueEvent? MilestonedIssueEvent { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.MilestonedIssueEvent MilestonedIssueEvent { get; set; } +#endif + /// Composed type representation for type +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.MovedColumnInProjectIssueEvent? MovedColumnInProjectIssueEvent { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.MovedColumnInProjectIssueEvent MovedColumnInProjectIssueEvent { get; set; } +#endif + /// Composed type representation for type +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.RemovedFromProjectIssueEvent? RemovedFromProjectIssueEvent { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.RemovedFromProjectIssueEvent RemovedFromProjectIssueEvent { get; set; } +#endif + /// Composed type representation for type +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.RenamedIssueEvent? RenamedIssueEvent { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.RenamedIssueEvent RenamedIssueEvent { get; set; } +#endif + /// Composed type representation for type +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.ReviewDismissedIssueEvent? ReviewDismissedIssueEvent { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.ReviewDismissedIssueEvent ReviewDismissedIssueEvent { get; set; } +#endif + /// Composed type representation for type +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.ReviewRequestedIssueEvent? ReviewRequestedIssueEvent { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.ReviewRequestedIssueEvent ReviewRequestedIssueEvent { get; set; } +#endif + /// Composed type representation for type +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.ReviewRequestRemovedIssueEvent? ReviewRequestRemovedIssueEvent { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.ReviewRequestRemovedIssueEvent ReviewRequestRemovedIssueEvent { get; set; } +#endif + /// Composed type representation for type +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.StateChangeIssueEvent? StateChangeIssueEvent { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.StateChangeIssueEvent StateChangeIssueEvent { get; set; } +#endif + /// Composed type representation for type +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.TimelineAssignedIssueEvent? TimelineAssignedIssueEvent { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.TimelineAssignedIssueEvent TimelineAssignedIssueEvent { get; set; } +#endif + /// Composed type representation for type +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.TimelineCommentEvent? TimelineCommentEvent { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.TimelineCommentEvent TimelineCommentEvent { get; set; } +#endif + /// Composed type representation for type +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.TimelineCommitCommentedEvent? TimelineCommitCommentedEvent { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.TimelineCommitCommentedEvent TimelineCommitCommentedEvent { get; set; } +#endif + /// Composed type representation for type +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.TimelineCommittedEvent? TimelineCommittedEvent { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.TimelineCommittedEvent TimelineCommittedEvent { get; set; } +#endif + /// Composed type representation for type +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.TimelineCrossReferencedEvent? TimelineCrossReferencedEvent { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.TimelineCrossReferencedEvent TimelineCrossReferencedEvent { get; set; } +#endif + /// Composed type representation for type +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.TimelineLineCommentedEvent? TimelineLineCommentedEvent { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.TimelineLineCommentedEvent TimelineLineCommentedEvent { get; set; } +#endif + /// Composed type representation for type +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.TimelineReviewedEvent? TimelineReviewedEvent { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.TimelineReviewedEvent TimelineReviewedEvent { get; set; } +#endif + /// Composed type representation for type +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.TimelineUnassignedIssueEvent? TimelineUnassignedIssueEvent { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.TimelineUnassignedIssueEvent TimelineUnassignedIssueEvent { get; set; } +#endif + /// Composed type representation for type +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.UnlabeledIssueEvent? UnlabeledIssueEvent { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.UnlabeledIssueEvent UnlabeledIssueEvent { get; set; } +#endif + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.TimelineIssueEvents CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + var result = new global::Ayllu.Github.Client.Models.TimelineIssueEvents(); + result.AddedToProjectIssueEvent = new global::Ayllu.Github.Client.Models.AddedToProjectIssueEvent(); + result.ConvertedNoteToIssueIssueEvent = new global::Ayllu.Github.Client.Models.ConvertedNoteToIssueIssueEvent(); + result.DemilestonedIssueEvent = new global::Ayllu.Github.Client.Models.DemilestonedIssueEvent(); + result.LabeledIssueEvent = new global::Ayllu.Github.Client.Models.LabeledIssueEvent(); + result.LockedIssueEvent = new global::Ayllu.Github.Client.Models.LockedIssueEvent(); + result.MilestonedIssueEvent = new global::Ayllu.Github.Client.Models.MilestonedIssueEvent(); + result.MovedColumnInProjectIssueEvent = new global::Ayllu.Github.Client.Models.MovedColumnInProjectIssueEvent(); + result.RemovedFromProjectIssueEvent = new global::Ayllu.Github.Client.Models.RemovedFromProjectIssueEvent(); + result.RenamedIssueEvent = new global::Ayllu.Github.Client.Models.RenamedIssueEvent(); + result.ReviewDismissedIssueEvent = new global::Ayllu.Github.Client.Models.ReviewDismissedIssueEvent(); + result.ReviewRequestedIssueEvent = new global::Ayllu.Github.Client.Models.ReviewRequestedIssueEvent(); + result.ReviewRequestRemovedIssueEvent = new global::Ayllu.Github.Client.Models.ReviewRequestRemovedIssueEvent(); + result.StateChangeIssueEvent = new global::Ayllu.Github.Client.Models.StateChangeIssueEvent(); + result.TimelineAssignedIssueEvent = new global::Ayllu.Github.Client.Models.TimelineAssignedIssueEvent(); + result.TimelineCommentEvent = new global::Ayllu.Github.Client.Models.TimelineCommentEvent(); + result.TimelineCommitCommentedEvent = new global::Ayllu.Github.Client.Models.TimelineCommitCommentedEvent(); + result.TimelineCommittedEvent = new global::Ayllu.Github.Client.Models.TimelineCommittedEvent(); + result.TimelineCrossReferencedEvent = new global::Ayllu.Github.Client.Models.TimelineCrossReferencedEvent(); + result.TimelineLineCommentedEvent = new global::Ayllu.Github.Client.Models.TimelineLineCommentedEvent(); + result.TimelineReviewedEvent = new global::Ayllu.Github.Client.Models.TimelineReviewedEvent(); + result.TimelineUnassignedIssueEvent = new global::Ayllu.Github.Client.Models.TimelineUnassignedIssueEvent(); + result.UnlabeledIssueEvent = new global::Ayllu.Github.Client.Models.UnlabeledIssueEvent(); + return result; + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + if(AddedToProjectIssueEvent != null || ConvertedNoteToIssueIssueEvent != null || DemilestonedIssueEvent != null || LabeledIssueEvent != null || LockedIssueEvent != null || MilestonedIssueEvent != null || MovedColumnInProjectIssueEvent != null || RemovedFromProjectIssueEvent != null || RenamedIssueEvent != null || ReviewDismissedIssueEvent != null || ReviewRequestedIssueEvent != null || ReviewRequestRemovedIssueEvent != null || StateChangeIssueEvent != null || TimelineAssignedIssueEvent != null || TimelineCommentEvent != null || TimelineCommitCommentedEvent != null || TimelineCommittedEvent != null || TimelineCrossReferencedEvent != null || TimelineLineCommentedEvent != null || TimelineReviewedEvent != null || TimelineUnassignedIssueEvent != null || UnlabeledIssueEvent != null) + { + return ParseNodeHelper.MergeDeserializersForIntersectionWrapper(AddedToProjectIssueEvent, ConvertedNoteToIssueIssueEvent, DemilestonedIssueEvent, LabeledIssueEvent, LockedIssueEvent, MilestonedIssueEvent, MovedColumnInProjectIssueEvent, RemovedFromProjectIssueEvent, RenamedIssueEvent, ReviewDismissedIssueEvent, ReviewRequestedIssueEvent, ReviewRequestRemovedIssueEvent, StateChangeIssueEvent, TimelineAssignedIssueEvent, TimelineCommentEvent, TimelineCommitCommentedEvent, TimelineCommittedEvent, TimelineCrossReferencedEvent, TimelineLineCommentedEvent, TimelineReviewedEvent, TimelineUnassignedIssueEvent, UnlabeledIssueEvent); + } + return new Dictionary>(); + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteObjectValue(null, AddedToProjectIssueEvent, ConvertedNoteToIssueIssueEvent, DemilestonedIssueEvent, LabeledIssueEvent, LockedIssueEvent, MilestonedIssueEvent, MovedColumnInProjectIssueEvent, RemovedFromProjectIssueEvent, RenamedIssueEvent, ReviewDismissedIssueEvent, ReviewRequestedIssueEvent, ReviewRequestRemovedIssueEvent, StateChangeIssueEvent, TimelineAssignedIssueEvent, TimelineCommentEvent, TimelineCommitCommentedEvent, TimelineCommittedEvent, TimelineCrossReferencedEvent, TimelineLineCommentedEvent, TimelineReviewedEvent, TimelineUnassignedIssueEvent, UnlabeledIssueEvent); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/TimelineLineCommentedEvent.cs b/src/Ayllu.Github.Client/Github/Client/Models/TimelineLineCommentedEvent.cs new file mode 100644 index 0000000..8e6f551 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/TimelineLineCommentedEvent.cs @@ -0,0 +1,86 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + /// + /// Timeline Line Commented Event + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class TimelineLineCommentedEvent : IAdditionalDataHolder, IParsable + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The comments property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? Comments { get; set; } +#nullable restore +#else + public List Comments { get; set; } +#endif + /// The event property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Event { get; set; } +#nullable restore +#else + public string Event { get; set; } +#endif + /// The node_id property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? NodeId { get; set; } +#nullable restore +#else + public string NodeId { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public TimelineLineCommentedEvent() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.TimelineLineCommentedEvent CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.TimelineLineCommentedEvent(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "comments", n => { Comments = n.GetCollectionOfObjectValues(global::Ayllu.Github.Client.Models.PullRequestReviewComment.CreateFromDiscriminatorValue)?.AsList(); } }, + { "event", n => { Event = n.GetStringValue(); } }, + { "node_id", n => { NodeId = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteCollectionOfObjectValues("comments", Comments); + writer.WriteStringValue("event", Event); + writer.WriteStringValue("node_id", NodeId); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/TimelineReviewedEvent.cs b/src/Ayllu.Github.Client/Github/Client/Models/TimelineReviewedEvent.cs new file mode 100644 index 0000000..17926e8 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/TimelineReviewedEvent.cs @@ -0,0 +1,182 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + /// + /// Timeline Reviewed Event + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class TimelineReviewedEvent : IAdditionalDataHolder, IParsable + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// How the author is associated with the repository. + public global::Ayllu.Github.Client.Models.AuthorAssociation? AuthorAssociation { get; set; } + /// The text of the review. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Body { get; set; } +#nullable restore +#else + public string Body { get; set; } +#endif + /// The body_html property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? BodyHtml { get; set; } +#nullable restore +#else + public string BodyHtml { get; set; } +#endif + /// The body_text property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? BodyText { get; set; } +#nullable restore +#else + public string BodyText { get; set; } +#endif + /// A commit SHA for the review. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? CommitId { get; set; } +#nullable restore +#else + public string CommitId { get; set; } +#endif + /// The event property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Event { get; set; } +#nullable restore +#else + public string Event { get; set; } +#endif + /// The html_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? HtmlUrl { get; set; } +#nullable restore +#else + public string HtmlUrl { get; set; } +#endif + /// Unique identifier of the review + public int? Id { get; set; } + /// The _links property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.TimelineReviewedEvent__links? Links { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.TimelineReviewedEvent__links Links { get; set; } +#endif + /// The node_id property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? NodeId { get; set; } +#nullable restore +#else + public string NodeId { get; set; } +#endif + /// The pull_request_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? PullRequestUrl { get; set; } +#nullable restore +#else + public string PullRequestUrl { get; set; } +#endif + /// The state property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? State { get; set; } +#nullable restore +#else + public string State { get; set; } +#endif + /// The submitted_at property + public DateTimeOffset? SubmittedAt { get; set; } + /// The updated_at property + public DateTimeOffset? UpdatedAt { get; set; } + /// A GitHub user. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.SimpleUser? User { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.SimpleUser User { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public TimelineReviewedEvent() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.TimelineReviewedEvent CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.TimelineReviewedEvent(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "author_association", n => { AuthorAssociation = n.GetEnumValue(); } }, + { "body", n => { Body = n.GetStringValue(); } }, + { "body_html", n => { BodyHtml = n.GetStringValue(); } }, + { "body_text", n => { BodyText = n.GetStringValue(); } }, + { "commit_id", n => { CommitId = n.GetStringValue(); } }, + { "event", n => { Event = n.GetStringValue(); } }, + { "html_url", n => { HtmlUrl = n.GetStringValue(); } }, + { "id", n => { Id = n.GetIntValue(); } }, + { "_links", n => { Links = n.GetObjectValue(global::Ayllu.Github.Client.Models.TimelineReviewedEvent__links.CreateFromDiscriminatorValue); } }, + { "node_id", n => { NodeId = n.GetStringValue(); } }, + { "pull_request_url", n => { PullRequestUrl = n.GetStringValue(); } }, + { "state", n => { State = n.GetStringValue(); } }, + { "submitted_at", n => { SubmittedAt = n.GetDateTimeOffsetValue(); } }, + { "updated_at", n => { UpdatedAt = n.GetDateTimeOffsetValue(); } }, + { "user", n => { User = n.GetObjectValue(global::Ayllu.Github.Client.Models.SimpleUser.CreateFromDiscriminatorValue); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteEnumValue("author_association", AuthorAssociation); + writer.WriteStringValue("body", Body); + writer.WriteStringValue("body_html", BodyHtml); + writer.WriteStringValue("body_text", BodyText); + writer.WriteStringValue("commit_id", CommitId); + writer.WriteStringValue("event", Event); + writer.WriteStringValue("html_url", HtmlUrl); + writer.WriteIntValue("id", Id); + writer.WriteObjectValue("_links", Links); + writer.WriteStringValue("node_id", NodeId); + writer.WriteStringValue("pull_request_url", PullRequestUrl); + writer.WriteStringValue("state", State); + writer.WriteDateTimeOffsetValue("submitted_at", SubmittedAt); + writer.WriteDateTimeOffsetValue("updated_at", UpdatedAt); + writer.WriteObjectValue("user", User); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/TimelineReviewedEvent__links.cs b/src/Ayllu.Github.Client/Github/Client/Models/TimelineReviewedEvent__links.cs new file mode 100644 index 0000000..6531c93 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/TimelineReviewedEvent__links.cs @@ -0,0 +1,75 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class TimelineReviewedEvent__links : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The html property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.TimelineReviewedEvent__links_html? Html { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.TimelineReviewedEvent__links_html Html { get; set; } +#endif + /// The pull_request property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.TimelineReviewedEvent__links_pull_request? PullRequest { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.TimelineReviewedEvent__links_pull_request PullRequest { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public TimelineReviewedEvent__links() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.TimelineReviewedEvent__links CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.TimelineReviewedEvent__links(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "html", n => { Html = n.GetObjectValue(global::Ayllu.Github.Client.Models.TimelineReviewedEvent__links_html.CreateFromDiscriminatorValue); } }, + { "pull_request", n => { PullRequest = n.GetObjectValue(global::Ayllu.Github.Client.Models.TimelineReviewedEvent__links_pull_request.CreateFromDiscriminatorValue); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteObjectValue("html", Html); + writer.WriteObjectValue("pull_request", PullRequest); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/TimelineReviewedEvent__links_html.cs b/src/Ayllu.Github.Client/Github/Client/Models/TimelineReviewedEvent__links_html.cs new file mode 100644 index 0000000..1469219 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/TimelineReviewedEvent__links_html.cs @@ -0,0 +1,65 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class TimelineReviewedEvent__links_html : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The href property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Href { get; set; } +#nullable restore +#else + public string Href { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public TimelineReviewedEvent__links_html() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.TimelineReviewedEvent__links_html CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.TimelineReviewedEvent__links_html(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "href", n => { Href = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("href", Href); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/TimelineReviewedEvent__links_pull_request.cs b/src/Ayllu.Github.Client/Github/Client/Models/TimelineReviewedEvent__links_pull_request.cs new file mode 100644 index 0000000..3f75524 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/TimelineReviewedEvent__links_pull_request.cs @@ -0,0 +1,65 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class TimelineReviewedEvent__links_pull_request : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The href property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Href { get; set; } +#nullable restore +#else + public string Href { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public TimelineReviewedEvent__links_pull_request() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.TimelineReviewedEvent__links_pull_request CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.TimelineReviewedEvent__links_pull_request(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "href", n => { Href = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("href", Href); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/TimelineUnassignedIssueEvent.cs b/src/Ayllu.Github.Client/Github/Client/Models/TimelineUnassignedIssueEvent.cs new file mode 100644 index 0000000..f545b3b --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/TimelineUnassignedIssueEvent.cs @@ -0,0 +1,150 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + /// + /// Timeline Unassigned Issue Event + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class TimelineUnassignedIssueEvent : IAdditionalDataHolder, IParsable + { + /// A GitHub user. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.SimpleUser? Actor { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.SimpleUser Actor { get; set; } +#endif + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// A GitHub user. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.SimpleUser? Assignee { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.SimpleUser Assignee { get; set; } +#endif + /// The commit_id property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? CommitId { get; set; } +#nullable restore +#else + public string CommitId { get; set; } +#endif + /// The commit_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? CommitUrl { get; set; } +#nullable restore +#else + public string CommitUrl { get; set; } +#endif + /// The created_at property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? CreatedAt { get; set; } +#nullable restore +#else + public string CreatedAt { get; set; } +#endif + /// The event property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Event { get; set; } +#nullable restore +#else + public string Event { get; set; } +#endif + /// The id property + public int? Id { get; set; } + /// The node_id property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? NodeId { get; set; } +#nullable restore +#else + public string NodeId { get; set; } +#endif + /// 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. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.NullableIntegration? PerformedViaGithubApp { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.NullableIntegration PerformedViaGithubApp { get; set; } +#endif + /// The url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Url { get; set; } +#nullable restore +#else + public string Url { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public TimelineUnassignedIssueEvent() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.TimelineUnassignedIssueEvent CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.TimelineUnassignedIssueEvent(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "actor", n => { Actor = n.GetObjectValue(global::Ayllu.Github.Client.Models.SimpleUser.CreateFromDiscriminatorValue); } }, + { "assignee", n => { Assignee = n.GetObjectValue(global::Ayllu.Github.Client.Models.SimpleUser.CreateFromDiscriminatorValue); } }, + { "commit_id", n => { CommitId = n.GetStringValue(); } }, + { "commit_url", n => { CommitUrl = n.GetStringValue(); } }, + { "created_at", n => { CreatedAt = n.GetStringValue(); } }, + { "event", n => { Event = n.GetStringValue(); } }, + { "id", n => { Id = n.GetIntValue(); } }, + { "node_id", n => { NodeId = n.GetStringValue(); } }, + { "performed_via_github_app", n => { PerformedViaGithubApp = n.GetObjectValue(global::Ayllu.Github.Client.Models.NullableIntegration.CreateFromDiscriminatorValue); } }, + { "url", n => { Url = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteObjectValue("actor", Actor); + writer.WriteObjectValue("assignee", Assignee); + writer.WriteStringValue("commit_id", CommitId); + writer.WriteStringValue("commit_url", CommitUrl); + writer.WriteStringValue("created_at", CreatedAt); + writer.WriteStringValue("event", Event); + writer.WriteIntValue("id", Id); + writer.WriteStringValue("node_id", NodeId); + writer.WriteObjectValue("performed_via_github_app", PerformedViaGithubApp); + writer.WriteStringValue("url", Url); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/Topic.cs b/src/Ayllu.Github.Client/Github/Client/Models/Topic.cs new file mode 100644 index 0000000..4e040b5 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/Topic.cs @@ -0,0 +1,66 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + /// + /// A topic aggregates entities that are related to a subject. + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class Topic : IAdditionalDataHolder, IParsable + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The names property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? Names { get; set; } +#nullable restore +#else + public List Names { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public Topic() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.Topic CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.Topic(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "names", n => { Names = n.GetCollectionOfPrimitiveValues()?.AsList(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteCollectionOfPrimitiveValues("names", Names); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/TopicSearchResultItem.cs b/src/Ayllu.Github.Client/Github/Client/Models/TopicSearchResultItem.cs new file mode 100644 index 0000000..9e76b94 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/TopicSearchResultItem.cs @@ -0,0 +1,180 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + /// + /// Topic Search Result Item + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class TopicSearchResultItem : IAdditionalDataHolder, IParsable + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The aliases property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? Aliases { get; set; } +#nullable restore +#else + public List Aliases { get; set; } +#endif + /// The created_at property + public DateTimeOffset? CreatedAt { get; set; } + /// The created_by property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? CreatedBy { get; set; } +#nullable restore +#else + public string CreatedBy { get; set; } +#endif + /// The curated property + public bool? Curated { get; set; } + /// The description property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Description { get; set; } +#nullable restore +#else + public string Description { get; set; } +#endif + /// The display_name property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? DisplayName { get; set; } +#nullable restore +#else + public string DisplayName { get; set; } +#endif + /// The featured property + public bool? Featured { get; set; } + /// The logo_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? LogoUrl { get; set; } +#nullable restore +#else + public string LogoUrl { get; set; } +#endif + /// The name property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Name { get; set; } +#nullable restore +#else + public string Name { get; set; } +#endif + /// The related property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? Related { get; set; } +#nullable restore +#else + public List Related { get; set; } +#endif + /// The released property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Released { get; set; } +#nullable restore +#else + public string Released { get; set; } +#endif + /// The repository_count property + public int? RepositoryCount { get; set; } + /// The score property + public double? Score { get; set; } + /// The short_description property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? ShortDescription { get; set; } +#nullable restore +#else + public string ShortDescription { get; set; } +#endif + /// The text_matches property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? TextMatches { get; set; } +#nullable restore +#else + public List TextMatches { get; set; } +#endif + /// The updated_at property + public DateTimeOffset? UpdatedAt { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public TopicSearchResultItem() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.TopicSearchResultItem CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.TopicSearchResultItem(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "aliases", n => { Aliases = n.GetCollectionOfObjectValues(global::Ayllu.Github.Client.Models.TopicSearchResultItem_aliases.CreateFromDiscriminatorValue)?.AsList(); } }, + { "created_at", n => { CreatedAt = n.GetDateTimeOffsetValue(); } }, + { "created_by", n => { CreatedBy = n.GetStringValue(); } }, + { "curated", n => { Curated = n.GetBoolValue(); } }, + { "description", n => { Description = n.GetStringValue(); } }, + { "display_name", n => { DisplayName = n.GetStringValue(); } }, + { "featured", n => { Featured = n.GetBoolValue(); } }, + { "logo_url", n => { LogoUrl = n.GetStringValue(); } }, + { "name", n => { Name = n.GetStringValue(); } }, + { "related", n => { Related = n.GetCollectionOfObjectValues(global::Ayllu.Github.Client.Models.TopicSearchResultItem_related.CreateFromDiscriminatorValue)?.AsList(); } }, + { "released", n => { Released = n.GetStringValue(); } }, + { "repository_count", n => { RepositoryCount = n.GetIntValue(); } }, + { "score", n => { Score = n.GetDoubleValue(); } }, + { "short_description", n => { ShortDescription = n.GetStringValue(); } }, + { "text_matches", n => { TextMatches = n.GetCollectionOfObjectValues(global::Ayllu.Github.Client.Models.Topics.CreateFromDiscriminatorValue)?.AsList(); } }, + { "updated_at", n => { UpdatedAt = n.GetDateTimeOffsetValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteCollectionOfObjectValues("aliases", Aliases); + writer.WriteDateTimeOffsetValue("created_at", CreatedAt); + writer.WriteStringValue("created_by", CreatedBy); + writer.WriteBoolValue("curated", Curated); + writer.WriteStringValue("description", Description); + writer.WriteStringValue("display_name", DisplayName); + writer.WriteBoolValue("featured", Featured); + writer.WriteStringValue("logo_url", LogoUrl); + writer.WriteStringValue("name", Name); + writer.WriteCollectionOfObjectValues("related", Related); + writer.WriteStringValue("released", Released); + writer.WriteIntValue("repository_count", RepositoryCount); + writer.WriteDoubleValue("score", Score); + writer.WriteStringValue("short_description", ShortDescription); + writer.WriteCollectionOfObjectValues("text_matches", TextMatches); + writer.WriteDateTimeOffsetValue("updated_at", UpdatedAt); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/TopicSearchResultItem_aliases.cs b/src/Ayllu.Github.Client/Github/Client/Models/TopicSearchResultItem_aliases.cs new file mode 100644 index 0000000..5d28bac --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/TopicSearchResultItem_aliases.cs @@ -0,0 +1,65 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class TopicSearchResultItem_aliases : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The topic_relation property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.TopicSearchResultItem_aliases_topic_relation? TopicRelation { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.TopicSearchResultItem_aliases_topic_relation TopicRelation { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public TopicSearchResultItem_aliases() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.TopicSearchResultItem_aliases CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.TopicSearchResultItem_aliases(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "topic_relation", n => { TopicRelation = n.GetObjectValue(global::Ayllu.Github.Client.Models.TopicSearchResultItem_aliases_topic_relation.CreateFromDiscriminatorValue); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteObjectValue("topic_relation", TopicRelation); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/TopicSearchResultItem_aliases_topic_relation.cs b/src/Ayllu.Github.Client/Github/Client/Models/TopicSearchResultItem_aliases_topic_relation.cs new file mode 100644 index 0000000..24f8efe --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/TopicSearchResultItem_aliases_topic_relation.cs @@ -0,0 +1,83 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class TopicSearchResultItem_aliases_topic_relation : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The id property + public int? Id { get; set; } + /// The name property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Name { get; set; } +#nullable restore +#else + public string Name { get; set; } +#endif + /// The relation_type property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? RelationType { get; set; } +#nullable restore +#else + public string RelationType { get; set; } +#endif + /// The topic_id property + public int? TopicId { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public TopicSearchResultItem_aliases_topic_relation() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.TopicSearchResultItem_aliases_topic_relation CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.TopicSearchResultItem_aliases_topic_relation(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "id", n => { Id = n.GetIntValue(); } }, + { "name", n => { Name = n.GetStringValue(); } }, + { "relation_type", n => { RelationType = n.GetStringValue(); } }, + { "topic_id", n => { TopicId = n.GetIntValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteIntValue("id", Id); + writer.WriteStringValue("name", Name); + writer.WriteStringValue("relation_type", RelationType); + writer.WriteIntValue("topic_id", TopicId); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/TopicSearchResultItem_related.cs b/src/Ayllu.Github.Client/Github/Client/Models/TopicSearchResultItem_related.cs new file mode 100644 index 0000000..5864269 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/TopicSearchResultItem_related.cs @@ -0,0 +1,65 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class TopicSearchResultItem_related : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The topic_relation property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.TopicSearchResultItem_related_topic_relation? TopicRelation { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.TopicSearchResultItem_related_topic_relation TopicRelation { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public TopicSearchResultItem_related() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.TopicSearchResultItem_related CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.TopicSearchResultItem_related(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "topic_relation", n => { TopicRelation = n.GetObjectValue(global::Ayllu.Github.Client.Models.TopicSearchResultItem_related_topic_relation.CreateFromDiscriminatorValue); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteObjectValue("topic_relation", TopicRelation); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/TopicSearchResultItem_related_topic_relation.cs b/src/Ayllu.Github.Client/Github/Client/Models/TopicSearchResultItem_related_topic_relation.cs new file mode 100644 index 0000000..43c8391 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/TopicSearchResultItem_related_topic_relation.cs @@ -0,0 +1,83 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class TopicSearchResultItem_related_topic_relation : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The id property + public int? Id { get; set; } + /// The name property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Name { get; set; } +#nullable restore +#else + public string Name { get; set; } +#endif + /// The relation_type property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? RelationType { get; set; } +#nullable restore +#else + public string RelationType { get; set; } +#endif + /// The topic_id property + public int? TopicId { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public TopicSearchResultItem_related_topic_relation() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.TopicSearchResultItem_related_topic_relation CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.TopicSearchResultItem_related_topic_relation(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "id", n => { Id = n.GetIntValue(); } }, + { "name", n => { Name = n.GetStringValue(); } }, + { "relation_type", n => { RelationType = n.GetStringValue(); } }, + { "topic_id", n => { TopicId = n.GetIntValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteIntValue("id", Id); + writer.WriteStringValue("name", Name); + writer.WriteStringValue("relation_type", RelationType); + writer.WriteIntValue("topic_id", TopicId); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/Topics.cs b/src/Ayllu.Github.Client/Github/Client/Models/Topics.cs new file mode 100644 index 0000000..203eefc --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/Topics.cs @@ -0,0 +1,105 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class Topics : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The fragment property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Fragment { get; set; } +#nullable restore +#else + public string Fragment { get; set; } +#endif + /// The matches property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? Matches { get; set; } +#nullable restore +#else + public List Matches { get; set; } +#endif + /// The object_type property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? ObjectType { get; set; } +#nullable restore +#else + public string ObjectType { get; set; } +#endif + /// The object_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? ObjectUrl { get; set; } +#nullable restore +#else + public string ObjectUrl { get; set; } +#endif + /// The property property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Property { get; set; } +#nullable restore +#else + public string Property { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public Topics() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.Topics CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.Topics(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "fragment", n => { Fragment = n.GetStringValue(); } }, + { "matches", n => { Matches = n.GetCollectionOfObjectValues(global::Ayllu.Github.Client.Models.Topics_matches.CreateFromDiscriminatorValue)?.AsList(); } }, + { "object_type", n => { ObjectType = n.GetStringValue(); } }, + { "object_url", n => { ObjectUrl = n.GetStringValue(); } }, + { "property", n => { Property = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("fragment", Fragment); + writer.WriteCollectionOfObjectValues("matches", Matches); + writer.WriteStringValue("object_type", ObjectType); + writer.WriteStringValue("object_url", ObjectUrl); + writer.WriteStringValue("property", Property); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/Topics_matches.cs b/src/Ayllu.Github.Client/Github/Client/Models/Topics_matches.cs new file mode 100644 index 0000000..cd0816e --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/Topics_matches.cs @@ -0,0 +1,75 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class Topics_matches : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The indices property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? Indices { get; set; } +#nullable restore +#else + public List Indices { get; set; } +#endif + /// The text property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Text { get; set; } +#nullable restore +#else + public string Text { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public Topics_matches() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.Topics_matches CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.Topics_matches(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "indices", n => { Indices = n.GetCollectionOfPrimitiveValues()?.AsList(); } }, + { "text", n => { Text = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteCollectionOfPrimitiveValues("indices", Indices); + writer.WriteStringValue("text", Text); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/Traffic.cs b/src/Ayllu.Github.Client/Github/Client/Models/Traffic.cs new file mode 100644 index 0000000..b5e9583 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/Traffic.cs @@ -0,0 +1,67 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class Traffic : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The count property + public int? Count { get; set; } + /// The timestamp property + public DateTimeOffset? Timestamp { get; set; } + /// The uniques property + public int? Uniques { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public Traffic() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.Traffic CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.Traffic(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "count", n => { Count = n.GetIntValue(); } }, + { "timestamp", n => { Timestamp = n.GetDateTimeOffsetValue(); } }, + { "uniques", n => { Uniques = n.GetIntValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteIntValue("count", Count); + writer.WriteDateTimeOffsetValue("timestamp", Timestamp); + writer.WriteIntValue("uniques", Uniques); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/UnassignedIssueEvent.cs b/src/Ayllu.Github.Client/Github/Client/Models/UnassignedIssueEvent.cs new file mode 100644 index 0000000..0cb4570 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/UnassignedIssueEvent.cs @@ -0,0 +1,160 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + /// + /// Unassigned Issue Event + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class UnassignedIssueEvent : IAdditionalDataHolder, IParsable + { + /// A GitHub user. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.SimpleUser? Actor { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.SimpleUser Actor { get; set; } +#endif + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// A GitHub user. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.SimpleUser? Assignee { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.SimpleUser Assignee { get; set; } +#endif + /// A GitHub user. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.SimpleUser? Assigner { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.SimpleUser Assigner { get; set; } +#endif + /// The commit_id property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? CommitId { get; set; } +#nullable restore +#else + public string CommitId { get; set; } +#endif + /// The commit_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? CommitUrl { get; set; } +#nullable restore +#else + public string CommitUrl { get; set; } +#endif + /// The created_at property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? CreatedAt { get; set; } +#nullable restore +#else + public string CreatedAt { get; set; } +#endif + /// The event property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Event { get; set; } +#nullable restore +#else + public string Event { get; set; } +#endif + /// The id property + public int? Id { get; set; } + /// The node_id property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? NodeId { get; set; } +#nullable restore +#else + public string NodeId { get; set; } +#endif + /// 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. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.NullableIntegration? PerformedViaGithubApp { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.NullableIntegration PerformedViaGithubApp { get; set; } +#endif + /// The url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Url { get; set; } +#nullable restore +#else + public string Url { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public UnassignedIssueEvent() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.UnassignedIssueEvent CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.UnassignedIssueEvent(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "actor", n => { Actor = n.GetObjectValue(global::Ayllu.Github.Client.Models.SimpleUser.CreateFromDiscriminatorValue); } }, + { "assignee", n => { Assignee = n.GetObjectValue(global::Ayllu.Github.Client.Models.SimpleUser.CreateFromDiscriminatorValue); } }, + { "assigner", n => { Assigner = n.GetObjectValue(global::Ayllu.Github.Client.Models.SimpleUser.CreateFromDiscriminatorValue); } }, + { "commit_id", n => { CommitId = n.GetStringValue(); } }, + { "commit_url", n => { CommitUrl = n.GetStringValue(); } }, + { "created_at", n => { CreatedAt = n.GetStringValue(); } }, + { "event", n => { Event = n.GetStringValue(); } }, + { "id", n => { Id = n.GetIntValue(); } }, + { "node_id", n => { NodeId = n.GetStringValue(); } }, + { "performed_via_github_app", n => { PerformedViaGithubApp = n.GetObjectValue(global::Ayllu.Github.Client.Models.NullableIntegration.CreateFromDiscriminatorValue); } }, + { "url", n => { Url = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteObjectValue("actor", Actor); + writer.WriteObjectValue("assignee", Assignee); + writer.WriteObjectValue("assigner", Assigner); + writer.WriteStringValue("commit_id", CommitId); + writer.WriteStringValue("commit_url", CommitUrl); + writer.WriteStringValue("created_at", CreatedAt); + writer.WriteStringValue("event", Event); + writer.WriteIntValue("id", Id); + writer.WriteStringValue("node_id", NodeId); + writer.WriteObjectValue("performed_via_github_app", PerformedViaGithubApp); + writer.WriteStringValue("url", Url); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/UnlabeledIssueEvent.cs b/src/Ayllu.Github.Client/Github/Client/Models/UnlabeledIssueEvent.cs new file mode 100644 index 0000000..ebf8067 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/UnlabeledIssueEvent.cs @@ -0,0 +1,150 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + /// + /// Unlabeled Issue Event + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class UnlabeledIssueEvent : IAdditionalDataHolder, IParsable + { + /// A GitHub user. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.SimpleUser? Actor { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.SimpleUser Actor { get; set; } +#endif + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The commit_id property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? CommitId { get; set; } +#nullable restore +#else + public string CommitId { get; set; } +#endif + /// The commit_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? CommitUrl { get; set; } +#nullable restore +#else + public string CommitUrl { get; set; } +#endif + /// The created_at property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? CreatedAt { get; set; } +#nullable restore +#else + public string CreatedAt { get; set; } +#endif + /// The event property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Event { get; set; } +#nullable restore +#else + public string Event { get; set; } +#endif + /// The id property + public int? Id { get; set; } + /// The label property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.UnlabeledIssueEvent_label? Label { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.UnlabeledIssueEvent_label Label { get; set; } +#endif + /// The node_id property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? NodeId { get; set; } +#nullable restore +#else + public string NodeId { get; set; } +#endif + /// 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. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.NullableIntegration? PerformedViaGithubApp { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.NullableIntegration PerformedViaGithubApp { get; set; } +#endif + /// The url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Url { get; set; } +#nullable restore +#else + public string Url { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public UnlabeledIssueEvent() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.UnlabeledIssueEvent CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.UnlabeledIssueEvent(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "actor", n => { Actor = n.GetObjectValue(global::Ayllu.Github.Client.Models.SimpleUser.CreateFromDiscriminatorValue); } }, + { "commit_id", n => { CommitId = n.GetStringValue(); } }, + { "commit_url", n => { CommitUrl = n.GetStringValue(); } }, + { "created_at", n => { CreatedAt = n.GetStringValue(); } }, + { "event", n => { Event = n.GetStringValue(); } }, + { "id", n => { Id = n.GetIntValue(); } }, + { "label", n => { Label = n.GetObjectValue(global::Ayllu.Github.Client.Models.UnlabeledIssueEvent_label.CreateFromDiscriminatorValue); } }, + { "node_id", n => { NodeId = n.GetStringValue(); } }, + { "performed_via_github_app", n => { PerformedViaGithubApp = n.GetObjectValue(global::Ayllu.Github.Client.Models.NullableIntegration.CreateFromDiscriminatorValue); } }, + { "url", n => { Url = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteObjectValue("actor", Actor); + writer.WriteStringValue("commit_id", CommitId); + writer.WriteStringValue("commit_url", CommitUrl); + writer.WriteStringValue("created_at", CreatedAt); + writer.WriteStringValue("event", Event); + writer.WriteIntValue("id", Id); + writer.WriteObjectValue("label", Label); + writer.WriteStringValue("node_id", NodeId); + writer.WriteObjectValue("performed_via_github_app", PerformedViaGithubApp); + writer.WriteStringValue("url", Url); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/UnlabeledIssueEvent_label.cs b/src/Ayllu.Github.Client/Github/Client/Models/UnlabeledIssueEvent_label.cs new file mode 100644 index 0000000..68eed3c --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/UnlabeledIssueEvent_label.cs @@ -0,0 +1,75 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class UnlabeledIssueEvent_label : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The color property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Color { get; set; } +#nullable restore +#else + public string Color { get; set; } +#endif + /// The name property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Name { get; set; } +#nullable restore +#else + public string Name { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public UnlabeledIssueEvent_label() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.UnlabeledIssueEvent_label CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.UnlabeledIssueEvent_label(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "color", n => { Color = n.GetStringValue(); } }, + { "name", n => { Name = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("color", Color); + writer.WriteStringValue("name", Name); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/UserMarketplacePurchase.cs b/src/Ayllu.Github.Client/Github/Client/Models/UserMarketplacePurchase.cs new file mode 100644 index 0000000..667f953 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/UserMarketplacePurchase.cs @@ -0,0 +1,106 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + /// + /// User Marketplace Purchase + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class UserMarketplacePurchase : IAdditionalDataHolder, IParsable + { + /// The account property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.MarketplaceAccount? Account { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.MarketplaceAccount Account { get; set; } +#endif + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The billing_cycle property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? BillingCycle { get; set; } +#nullable restore +#else + public string BillingCycle { get; set; } +#endif + /// The free_trial_ends_on property + public DateTimeOffset? FreeTrialEndsOn { get; set; } + /// The next_billing_date property + public DateTimeOffset? NextBillingDate { get; set; } + /// The on_free_trial property + public bool? OnFreeTrial { get; set; } + /// Marketplace Listing Plan +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.MarketplaceListingPlan? Plan { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.MarketplaceListingPlan Plan { get; set; } +#endif + /// The unit_count property + public int? UnitCount { get; set; } + /// The updated_at property + public DateTimeOffset? UpdatedAt { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public UserMarketplacePurchase() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.UserMarketplacePurchase CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.UserMarketplacePurchase(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "account", n => { Account = n.GetObjectValue(global::Ayllu.Github.Client.Models.MarketplaceAccount.CreateFromDiscriminatorValue); } }, + { "billing_cycle", n => { BillingCycle = n.GetStringValue(); } }, + { "free_trial_ends_on", n => { FreeTrialEndsOn = n.GetDateTimeOffsetValue(); } }, + { "next_billing_date", n => { NextBillingDate = n.GetDateTimeOffsetValue(); } }, + { "on_free_trial", n => { OnFreeTrial = n.GetBoolValue(); } }, + { "plan", n => { Plan = n.GetObjectValue(global::Ayllu.Github.Client.Models.MarketplaceListingPlan.CreateFromDiscriminatorValue); } }, + { "unit_count", n => { UnitCount = n.GetIntValue(); } }, + { "updated_at", n => { UpdatedAt = n.GetDateTimeOffsetValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteObjectValue("account", Account); + writer.WriteStringValue("billing_cycle", BillingCycle); + writer.WriteDateTimeOffsetValue("free_trial_ends_on", FreeTrialEndsOn); + writer.WriteDateTimeOffsetValue("next_billing_date", NextBillingDate); + writer.WriteBoolValue("on_free_trial", OnFreeTrial); + writer.WriteObjectValue("plan", Plan); + writer.WriteIntValue("unit_count", UnitCount); + writer.WriteDateTimeOffsetValue("updated_at", UpdatedAt); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/UserRoleAssignment.cs b/src/Ayllu.Github.Client/Github/Client/Models/UserRoleAssignment.cs new file mode 100644 index 0000000..f39f34a --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/UserRoleAssignment.cs @@ -0,0 +1,278 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + /// + /// The Relationship a User has with a role. + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class UserRoleAssignment : IAdditionalDataHolder, IParsable + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// Determines if the user has a direct, indirect, or mixed relationship to a role + public global::Ayllu.Github.Client.Models.UserRoleAssignment_assignment? Assignment { get; set; } + /// The avatar_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? AvatarUrl { get; set; } +#nullable restore +#else + public string AvatarUrl { get; set; } +#endif + /// The email property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Email { get; set; } +#nullable restore +#else + public string Email { get; set; } +#endif + /// The events_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? EventsUrl { get; set; } +#nullable restore +#else + public string EventsUrl { get; set; } +#endif + /// The followers_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? FollowersUrl { get; set; } +#nullable restore +#else + public string FollowersUrl { get; set; } +#endif + /// The following_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? FollowingUrl { get; set; } +#nullable restore +#else + public string FollowingUrl { get; set; } +#endif + /// The gists_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? GistsUrl { get; set; } +#nullable restore +#else + public string GistsUrl { get; set; } +#endif + /// The gravatar_id property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? GravatarId { get; set; } +#nullable restore +#else + public string GravatarId { get; set; } +#endif + /// The html_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? HtmlUrl { get; set; } +#nullable restore +#else + public string HtmlUrl { get; set; } +#endif + /// The id property + public int? Id { get; set; } + /// Team the user has gotten the role through +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? InheritedFrom { get; set; } +#nullable restore +#else + public List InheritedFrom { get; set; } +#endif + /// The login property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Login { get; set; } +#nullable restore +#else + public string Login { get; set; } +#endif + /// The name property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Name { get; set; } +#nullable restore +#else + public string Name { get; set; } +#endif + /// The node_id property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? NodeId { get; set; } +#nullable restore +#else + public string NodeId { get; set; } +#endif + /// The organizations_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? OrganizationsUrl { get; set; } +#nullable restore +#else + public string OrganizationsUrl { get; set; } +#endif + /// The received_events_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? ReceivedEventsUrl { get; set; } +#nullable restore +#else + public string ReceivedEventsUrl { get; set; } +#endif + /// The repos_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? ReposUrl { get; set; } +#nullable restore +#else + public string ReposUrl { get; set; } +#endif + /// The site_admin property + public bool? SiteAdmin { get; set; } + /// The starred_at property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? StarredAt { get; set; } +#nullable restore +#else + public string StarredAt { get; set; } +#endif + /// The starred_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? StarredUrl { get; set; } +#nullable restore +#else + public string StarredUrl { get; set; } +#endif + /// The subscriptions_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? SubscriptionsUrl { get; set; } +#nullable restore +#else + public string SubscriptionsUrl { get; set; } +#endif + /// The type property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Type { get; set; } +#nullable restore +#else + public string Type { get; set; } +#endif + /// The url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Url { get; set; } +#nullable restore +#else + public string Url { get; set; } +#endif + /// The user_view_type property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? UserViewType { get; set; } +#nullable restore +#else + public string UserViewType { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public UserRoleAssignment() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.UserRoleAssignment CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.UserRoleAssignment(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "assignment", n => { Assignment = n.GetEnumValue(); } }, + { "avatar_url", n => { AvatarUrl = n.GetStringValue(); } }, + { "email", n => { Email = n.GetStringValue(); } }, + { "events_url", n => { EventsUrl = n.GetStringValue(); } }, + { "followers_url", n => { FollowersUrl = n.GetStringValue(); } }, + { "following_url", n => { FollowingUrl = n.GetStringValue(); } }, + { "gists_url", n => { GistsUrl = n.GetStringValue(); } }, + { "gravatar_id", n => { GravatarId = n.GetStringValue(); } }, + { "html_url", n => { HtmlUrl = n.GetStringValue(); } }, + { "id", n => { Id = n.GetIntValue(); } }, + { "inherited_from", n => { InheritedFrom = n.GetCollectionOfObjectValues(global::Ayllu.Github.Client.Models.TeamSimple.CreateFromDiscriminatorValue)?.AsList(); } }, + { "login", n => { Login = n.GetStringValue(); } }, + { "name", n => { Name = n.GetStringValue(); } }, + { "node_id", n => { NodeId = n.GetStringValue(); } }, + { "organizations_url", n => { OrganizationsUrl = n.GetStringValue(); } }, + { "received_events_url", n => { ReceivedEventsUrl = n.GetStringValue(); } }, + { "repos_url", n => { ReposUrl = n.GetStringValue(); } }, + { "site_admin", n => { SiteAdmin = n.GetBoolValue(); } }, + { "starred_at", n => { StarredAt = n.GetStringValue(); } }, + { "starred_url", n => { StarredUrl = n.GetStringValue(); } }, + { "subscriptions_url", n => { SubscriptionsUrl = n.GetStringValue(); } }, + { "type", n => { Type = n.GetStringValue(); } }, + { "url", n => { Url = n.GetStringValue(); } }, + { "user_view_type", n => { UserViewType = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteEnumValue("assignment", Assignment); + writer.WriteStringValue("avatar_url", AvatarUrl); + writer.WriteStringValue("email", Email); + writer.WriteStringValue("events_url", EventsUrl); + writer.WriteStringValue("followers_url", FollowersUrl); + writer.WriteStringValue("following_url", FollowingUrl); + writer.WriteStringValue("gists_url", GistsUrl); + writer.WriteStringValue("gravatar_id", GravatarId); + writer.WriteStringValue("html_url", HtmlUrl); + writer.WriteIntValue("id", Id); + writer.WriteCollectionOfObjectValues("inherited_from", InheritedFrom); + writer.WriteStringValue("login", Login); + writer.WriteStringValue("name", Name); + writer.WriteStringValue("node_id", NodeId); + writer.WriteStringValue("organizations_url", OrganizationsUrl); + writer.WriteStringValue("received_events_url", ReceivedEventsUrl); + writer.WriteStringValue("repos_url", ReposUrl); + writer.WriteBoolValue("site_admin", SiteAdmin); + writer.WriteStringValue("starred_at", StarredAt); + writer.WriteStringValue("starred_url", StarredUrl); + writer.WriteStringValue("subscriptions_url", SubscriptionsUrl); + writer.WriteStringValue("type", Type); + writer.WriteStringValue("url", Url); + writer.WriteStringValue("user_view_type", UserViewType); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/UserRoleAssignment_assignment.cs b/src/Ayllu.Github.Client/Github/Client/Models/UserRoleAssignment_assignment.cs new file mode 100644 index 0000000..13a28df --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/UserRoleAssignment_assignment.cs @@ -0,0 +1,23 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Models +{ + /// Determines if the user has a direct, indirect, or mixed relationship to a role + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public enum UserRoleAssignment_assignment + { + [EnumMember(Value = "direct")] + #pragma warning disable CS1591 + Direct, + #pragma warning restore CS1591 + [EnumMember(Value = "indirect")] + #pragma warning disable CS1591 + Indirect, + #pragma warning restore CS1591 + [EnumMember(Value = "mixed")] + #pragma warning disable CS1591 + Mixed, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Models/UserSearchResultItem.cs b/src/Ayllu.Github.Client/Github/Client/Models/UserSearchResultItem.cs new file mode 100644 index 0000000..ab6bc5c --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/UserSearchResultItem.cs @@ -0,0 +1,340 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + /// + /// User Search Result Item + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class UserSearchResultItem : IAdditionalDataHolder, IParsable + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The avatar_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? AvatarUrl { get; set; } +#nullable restore +#else + public string AvatarUrl { get; set; } +#endif + /// The bio property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Bio { get; set; } +#nullable restore +#else + public string Bio { get; set; } +#endif + /// The blog property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Blog { get; set; } +#nullable restore +#else + public string Blog { get; set; } +#endif + /// The company property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Company { get; set; } +#nullable restore +#else + public string Company { get; set; } +#endif + /// The created_at property + public DateTimeOffset? CreatedAt { get; set; } + /// The email property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Email { get; set; } +#nullable restore +#else + public string Email { get; set; } +#endif + /// The events_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? EventsUrl { get; set; } +#nullable restore +#else + public string EventsUrl { get; set; } +#endif + /// The followers property + public int? Followers { get; set; } + /// The followers_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? FollowersUrl { get; set; } +#nullable restore +#else + public string FollowersUrl { get; set; } +#endif + /// The following property + public int? Following { get; set; } + /// The following_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? FollowingUrl { get; set; } +#nullable restore +#else + public string FollowingUrl { get; set; } +#endif + /// The gists_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? GistsUrl { get; set; } +#nullable restore +#else + public string GistsUrl { get; set; } +#endif + /// The gravatar_id property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? GravatarId { get; set; } +#nullable restore +#else + public string GravatarId { get; set; } +#endif + /// The hireable property + public bool? Hireable { get; set; } + /// The html_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? HtmlUrl { get; set; } +#nullable restore +#else + public string HtmlUrl { get; set; } +#endif + /// The id property + public long? Id { get; set; } + /// The location property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Location { get; set; } +#nullable restore +#else + public string Location { get; set; } +#endif + /// The login property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Login { get; set; } +#nullable restore +#else + public string Login { get; set; } +#endif + /// The name property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Name { get; set; } +#nullable restore +#else + public string Name { get; set; } +#endif + /// The node_id property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? NodeId { get; set; } +#nullable restore +#else + public string NodeId { get; set; } +#endif + /// The organizations_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? OrganizationsUrl { get; set; } +#nullable restore +#else + public string OrganizationsUrl { get; set; } +#endif + /// The public_gists property + public int? PublicGists { get; set; } + /// The public_repos property + public int? PublicRepos { get; set; } + /// The received_events_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? ReceivedEventsUrl { get; set; } +#nullable restore +#else + public string ReceivedEventsUrl { get; set; } +#endif + /// The repos_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? ReposUrl { get; set; } +#nullable restore +#else + public string ReposUrl { get; set; } +#endif + /// The score property + public double? Score { get; set; } + /// The site_admin property + public bool? SiteAdmin { get; set; } + /// The starred_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? StarredUrl { get; set; } +#nullable restore +#else + public string StarredUrl { get; set; } +#endif + /// The subscriptions_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? SubscriptionsUrl { get; set; } +#nullable restore +#else + public string SubscriptionsUrl { get; set; } +#endif + /// The suspended_at property + public DateTimeOffset? SuspendedAt { get; set; } + /// The text_matches property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? TextMatches { get; set; } +#nullable restore +#else + public List TextMatches { get; set; } +#endif + /// The type property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Type { get; set; } +#nullable restore +#else + public string Type { get; set; } +#endif + /// The updated_at property + public DateTimeOffset? UpdatedAt { get; set; } + /// The url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Url { get; set; } +#nullable restore +#else + public string Url { get; set; } +#endif + /// The user_view_type property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? UserViewType { get; set; } +#nullable restore +#else + public string UserViewType { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public UserSearchResultItem() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.UserSearchResultItem CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.UserSearchResultItem(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "avatar_url", n => { AvatarUrl = n.GetStringValue(); } }, + { "bio", n => { Bio = n.GetStringValue(); } }, + { "blog", n => { Blog = n.GetStringValue(); } }, + { "company", n => { Company = n.GetStringValue(); } }, + { "created_at", n => { CreatedAt = n.GetDateTimeOffsetValue(); } }, + { "email", n => { Email = n.GetStringValue(); } }, + { "events_url", n => { EventsUrl = n.GetStringValue(); } }, + { "followers", n => { Followers = n.GetIntValue(); } }, + { "followers_url", n => { FollowersUrl = n.GetStringValue(); } }, + { "following", n => { Following = n.GetIntValue(); } }, + { "following_url", n => { FollowingUrl = n.GetStringValue(); } }, + { "gists_url", n => { GistsUrl = n.GetStringValue(); } }, + { "gravatar_id", n => { GravatarId = n.GetStringValue(); } }, + { "hireable", n => { Hireable = n.GetBoolValue(); } }, + { "html_url", n => { HtmlUrl = n.GetStringValue(); } }, + { "id", n => { Id = n.GetLongValue(); } }, + { "location", n => { Location = n.GetStringValue(); } }, + { "login", n => { Login = n.GetStringValue(); } }, + { "name", n => { Name = n.GetStringValue(); } }, + { "node_id", n => { NodeId = n.GetStringValue(); } }, + { "organizations_url", n => { OrganizationsUrl = n.GetStringValue(); } }, + { "public_gists", n => { PublicGists = n.GetIntValue(); } }, + { "public_repos", n => { PublicRepos = n.GetIntValue(); } }, + { "received_events_url", n => { ReceivedEventsUrl = n.GetStringValue(); } }, + { "repos_url", n => { ReposUrl = n.GetStringValue(); } }, + { "score", n => { Score = n.GetDoubleValue(); } }, + { "site_admin", n => { SiteAdmin = n.GetBoolValue(); } }, + { "starred_url", n => { StarredUrl = n.GetStringValue(); } }, + { "subscriptions_url", n => { SubscriptionsUrl = n.GetStringValue(); } }, + { "suspended_at", n => { SuspendedAt = n.GetDateTimeOffsetValue(); } }, + { "text_matches", n => { TextMatches = n.GetCollectionOfObjectValues(global::Ayllu.Github.Client.Models.Users.CreateFromDiscriminatorValue)?.AsList(); } }, + { "type", n => { Type = n.GetStringValue(); } }, + { "updated_at", n => { UpdatedAt = n.GetDateTimeOffsetValue(); } }, + { "url", n => { Url = n.GetStringValue(); } }, + { "user_view_type", n => { UserViewType = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("avatar_url", AvatarUrl); + writer.WriteStringValue("bio", Bio); + writer.WriteStringValue("blog", Blog); + writer.WriteStringValue("company", Company); + writer.WriteDateTimeOffsetValue("created_at", CreatedAt); + writer.WriteStringValue("email", Email); + writer.WriteStringValue("events_url", EventsUrl); + writer.WriteIntValue("followers", Followers); + writer.WriteStringValue("followers_url", FollowersUrl); + writer.WriteIntValue("following", Following); + writer.WriteStringValue("following_url", FollowingUrl); + writer.WriteStringValue("gists_url", GistsUrl); + writer.WriteStringValue("gravatar_id", GravatarId); + writer.WriteBoolValue("hireable", Hireable); + writer.WriteStringValue("html_url", HtmlUrl); + writer.WriteLongValue("id", Id); + writer.WriteStringValue("location", Location); + writer.WriteStringValue("login", Login); + writer.WriteStringValue("name", Name); + writer.WriteStringValue("node_id", NodeId); + writer.WriteStringValue("organizations_url", OrganizationsUrl); + writer.WriteIntValue("public_gists", PublicGists); + writer.WriteIntValue("public_repos", PublicRepos); + writer.WriteStringValue("received_events_url", ReceivedEventsUrl); + writer.WriteStringValue("repos_url", ReposUrl); + writer.WriteDoubleValue("score", Score); + writer.WriteBoolValue("site_admin", SiteAdmin); + writer.WriteStringValue("starred_url", StarredUrl); + writer.WriteStringValue("subscriptions_url", SubscriptionsUrl); + writer.WriteDateTimeOffsetValue("suspended_at", SuspendedAt); + writer.WriteCollectionOfObjectValues("text_matches", TextMatches); + writer.WriteStringValue("type", Type); + writer.WriteDateTimeOffsetValue("updated_at", UpdatedAt); + writer.WriteStringValue("url", Url); + writer.WriteStringValue("user_view_type", UserViewType); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/Users.cs b/src/Ayllu.Github.Client/Github/Client/Models/Users.cs new file mode 100644 index 0000000..f41c215 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/Users.cs @@ -0,0 +1,105 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class Users : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The fragment property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Fragment { get; set; } +#nullable restore +#else + public string Fragment { get; set; } +#endif + /// The matches property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? Matches { get; set; } +#nullable restore +#else + public List Matches { get; set; } +#endif + /// The object_type property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? ObjectType { get; set; } +#nullable restore +#else + public string ObjectType { get; set; } +#endif + /// The object_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? ObjectUrl { get; set; } +#nullable restore +#else + public string ObjectUrl { get; set; } +#endif + /// The property property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Property { get; set; } +#nullable restore +#else + public string Property { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public Users() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.Users CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.Users(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "fragment", n => { Fragment = n.GetStringValue(); } }, + { "matches", n => { Matches = n.GetCollectionOfObjectValues(global::Ayllu.Github.Client.Models.Users_matches.CreateFromDiscriminatorValue)?.AsList(); } }, + { "object_type", n => { ObjectType = n.GetStringValue(); } }, + { "object_url", n => { ObjectUrl = n.GetStringValue(); } }, + { "property", n => { Property = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("fragment", Fragment); + writer.WriteCollectionOfObjectValues("matches", Matches); + writer.WriteStringValue("object_type", ObjectType); + writer.WriteStringValue("object_url", ObjectUrl); + writer.WriteStringValue("property", Property); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/Users503Error.cs b/src/Ayllu.Github.Client/Github/Client/Models/Users503Error.cs new file mode 100644 index 0000000..ddf553f --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/Users503Error.cs @@ -0,0 +1,88 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class Users503Error : ApiException, IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The code property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Code { get; set; } +#nullable restore +#else + public string Code { get; set; } +#endif + /// The documentation_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? DocumentationUrl { get; set; } +#nullable restore +#else + public string DocumentationUrl { get; set; } +#endif + /// The primary error message. + public override string Message { get => MessageEscaped ?? string.Empty; } + /// The message property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? MessageEscaped { get; set; } +#nullable restore +#else + public string MessageEscaped { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public Users503Error() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.Users503Error CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.Users503Error(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "code", n => { Code = n.GetStringValue(); } }, + { "documentation_url", n => { DocumentationUrl = n.GetStringValue(); } }, + { "message", n => { MessageEscaped = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("code", Code); + writer.WriteStringValue("documentation_url", DocumentationUrl); + writer.WriteStringValue("message", MessageEscaped); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/Users_matches.cs b/src/Ayllu.Github.Client/Github/Client/Models/Users_matches.cs new file mode 100644 index 0000000..a00b796 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/Users_matches.cs @@ -0,0 +1,75 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class Users_matches : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The indices property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? Indices { get; set; } +#nullable restore +#else + public List Indices { get; set; } +#endif + /// The text property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Text { get; set; } +#nullable restore +#else + public string Text { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public Users_matches() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.Users_matches CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.Users_matches(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "indices", n => { Indices = n.GetCollectionOfPrimitiveValues()?.AsList(); } }, + { "text", n => { Text = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteCollectionOfPrimitiveValues("indices", Indices); + writer.WriteStringValue("text", Text); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/ValidationError.cs b/src/Ayllu.Github.Client/Github/Client/Models/ValidationError.cs new file mode 100644 index 0000000..6c3444d --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/ValidationError.cs @@ -0,0 +1,89 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + /// + /// Validation Error + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class ValidationError : ApiException, IAdditionalDataHolder, IParsable + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The documentation_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? DocumentationUrl { get; set; } +#nullable restore +#else + public string DocumentationUrl { get; set; } +#endif + /// The errors property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? Errors { get; set; } +#nullable restore +#else + public List Errors { get; set; } +#endif + /// The primary error message. + public override string Message { get => MessageEscaped ?? string.Empty; } + /// The message property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? MessageEscaped { get; set; } +#nullable restore +#else + public string MessageEscaped { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public ValidationError() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.ValidationError CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.ValidationError(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "documentation_url", n => { DocumentationUrl = n.GetStringValue(); } }, + { "errors", n => { Errors = n.GetCollectionOfObjectValues(global::Ayllu.Github.Client.Models.ValidationError_errors.CreateFromDiscriminatorValue)?.AsList(); } }, + { "message", n => { MessageEscaped = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("documentation_url", DocumentationUrl); + writer.WriteCollectionOfObjectValues("errors", Errors); + writer.WriteStringValue("message", MessageEscaped); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/ValidationErrorSimple.cs b/src/Ayllu.Github.Client/Github/Client/Models/ValidationErrorSimple.cs new file mode 100644 index 0000000..f9333c5 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/ValidationErrorSimple.cs @@ -0,0 +1,89 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + /// + /// Validation Error Simple + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class ValidationErrorSimple : ApiException, IAdditionalDataHolder, IParsable + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The documentation_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? DocumentationUrl { get; set; } +#nullable restore +#else + public string DocumentationUrl { get; set; } +#endif + /// The errors property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? Errors { get; set; } +#nullable restore +#else + public List Errors { get; set; } +#endif + /// The primary error message. + public override string Message { get => MessageEscaped ?? string.Empty; } + /// The message property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? MessageEscaped { get; set; } +#nullable restore +#else + public string MessageEscaped { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public ValidationErrorSimple() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.ValidationErrorSimple CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.ValidationErrorSimple(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "documentation_url", n => { DocumentationUrl = n.GetStringValue(); } }, + { "errors", n => { Errors = n.GetCollectionOfPrimitiveValues()?.AsList(); } }, + { "message", n => { MessageEscaped = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("documentation_url", DocumentationUrl); + writer.WriteCollectionOfPrimitiveValues("errors", Errors); + writer.WriteStringValue("message", MessageEscaped); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/ValidationError_errors.cs b/src/Ayllu.Github.Client/Github/Client/Models/ValidationError_errors.cs new file mode 100644 index 0000000..1f05ee2 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/ValidationError_errors.cs @@ -0,0 +1,186 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class ValidationError_errors : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The code property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Code { get; set; } +#nullable restore +#else + public string Code { get; set; } +#endif + /// The field property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Field { get; set; } +#nullable restore +#else + public string Field { get; set; } +#endif + /// The index property + public int? Index { get; set; } + /// The message property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Message { get; set; } +#nullable restore +#else + public string Message { get; set; } +#endif + /// The resource property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Resource { get; set; } +#nullable restore +#else + public string Resource { get; set; } +#endif + /// The value property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.ValidationError_errors.ValidationError_errors_value? Value { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.ValidationError_errors.ValidationError_errors_value Value { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public ValidationError_errors() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.ValidationError_errors CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.ValidationError_errors(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "code", n => { Code = n.GetStringValue(); } }, + { "field", n => { Field = n.GetStringValue(); } }, + { "index", n => { Index = n.GetIntValue(); } }, + { "message", n => { Message = n.GetStringValue(); } }, + { "resource", n => { Resource = n.GetStringValue(); } }, + { "value", n => { Value = n.GetObjectValue(global::Ayllu.Github.Client.Models.ValidationError_errors.ValidationError_errors_value.CreateFromDiscriminatorValue); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("code", Code); + writer.WriteStringValue("field", Field); + writer.WriteIntValue("index", Index); + writer.WriteStringValue("message", Message); + writer.WriteStringValue("resource", Resource); + writer.WriteObjectValue("value", Value); + writer.WriteAdditionalData(AdditionalData); + } + /// + /// Composed type wrapper for classes , , List<string> + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class ValidationError_errors_value : IComposedTypeWrapper, IParsable + { + /// Composed type representation for type + public int? Integer { get; set; } + /// Composed type representation for type List<string> +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? String { get; set; } +#nullable restore +#else + public List String { get; set; } +#endif + /// Composed type representation for type +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? ValidationErrorErrorsValueString { get; set; } +#nullable restore +#else + public string ValidationErrorErrorsValueString { get; set; } +#endif + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.ValidationError_errors.ValidationError_errors_value CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + var mappingValue = parseNode.GetChildNode("")?.GetStringValue(); + var result = new global::Ayllu.Github.Client.Models.ValidationError_errors.ValidationError_errors_value(); + if(parseNode.GetIntValue() is int integerValue) + { + result.Integer = integerValue; + } + else if(parseNode.GetStringValue() is string validationErrorErrorsValueStringValue) + { + result.ValidationErrorErrorsValueString = validationErrorErrorsValueStringValue; + } + else if(parseNode.GetCollectionOfPrimitiveValues()?.AsList() is List stringValue) + { + result.String = stringValue; + } + return result; + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary>(); + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(Integer != null) + { + writer.WriteIntValue(null, Integer); + } + else if(ValidationErrorErrorsValueString != null) + { + writer.WriteStringValue(null, ValidationErrorErrorsValueString); + } + else if(String != null) + { + writer.WriteCollectionOfPrimitiveValues(null, String); + } + } + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/Verification.cs b/src/Ayllu.Github.Client/Github/Client/Models/Verification.cs new file mode 100644 index 0000000..8111d9c --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/Verification.cs @@ -0,0 +1,99 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class Verification : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The payload property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Payload { get; set; } +#nullable restore +#else + public string Payload { get; set; } +#endif + /// The reason property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Reason { get; set; } +#nullable restore +#else + public string Reason { get; set; } +#endif + /// The signature property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Signature { get; set; } +#nullable restore +#else + public string Signature { get; set; } +#endif + /// The verified property + public bool? Verified { get; set; } + /// The verified_at property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? VerifiedAt { get; set; } +#nullable restore +#else + public string VerifiedAt { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public Verification() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.Verification CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.Verification(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "payload", n => { Payload = n.GetStringValue(); } }, + { "reason", n => { Reason = n.GetStringValue(); } }, + { "signature", n => { Signature = n.GetStringValue(); } }, + { "verified", n => { Verified = n.GetBoolValue(); } }, + { "verified_at", n => { VerifiedAt = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("payload", Payload); + writer.WriteStringValue("reason", Reason); + writer.WriteStringValue("signature", Signature); + writer.WriteBoolValue("verified", Verified); + writer.WriteStringValue("verified_at", VerifiedAt); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/ViewTraffic.cs b/src/Ayllu.Github.Client/Github/Client/Models/ViewTraffic.cs new file mode 100644 index 0000000..6315b26 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/ViewTraffic.cs @@ -0,0 +1,74 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + /// + /// View Traffic + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class ViewTraffic : IAdditionalDataHolder, IParsable + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The count property + public int? Count { get; set; } + /// The uniques property + public int? Uniques { get; set; } + /// The views property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? Views { get; set; } +#nullable restore +#else + public List Views { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public ViewTraffic() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.ViewTraffic CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.ViewTraffic(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "count", n => { Count = n.GetIntValue(); } }, + { "uniques", n => { Uniques = n.GetIntValue(); } }, + { "views", n => { Views = n.GetCollectionOfObjectValues(global::Ayllu.Github.Client.Models.Traffic.CreateFromDiscriminatorValue)?.AsList(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteIntValue("count", Count); + writer.WriteIntValue("uniques", Uniques); + writer.WriteCollectionOfObjectValues("views", Views); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/Vulnerability.cs b/src/Ayllu.Github.Client/Github/Client/Models/Vulnerability.cs new file mode 100644 index 0000000..fd12159 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/Vulnerability.cs @@ -0,0 +1,95 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + /// + /// A vulnerability describing the product and its affected versions within a GitHub Security Advisory. + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class Vulnerability : IAdditionalDataHolder, IParsable + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The package version that resolves the vulnerability. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? FirstPatchedVersion { get; set; } +#nullable restore +#else + public string FirstPatchedVersion { get; set; } +#endif + /// The name of the package affected by the vulnerability. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.Vulnerability_package? Package { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.Vulnerability_package Package { get; set; } +#endif + /// The functions in the package that are affected by the vulnerability. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? VulnerableFunctions { get; private set; } +#nullable restore +#else + public List VulnerableFunctions { get; private set; } +#endif + /// The range of the package versions affected by the vulnerability. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? VulnerableVersionRange { get; set; } +#nullable restore +#else + public string VulnerableVersionRange { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public Vulnerability() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.Vulnerability CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.Vulnerability(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "first_patched_version", n => { FirstPatchedVersion = n.GetStringValue(); } }, + { "package", n => { Package = n.GetObjectValue(global::Ayllu.Github.Client.Models.Vulnerability_package.CreateFromDiscriminatorValue); } }, + { "vulnerable_functions", n => { VulnerableFunctions = n.GetCollectionOfPrimitiveValues()?.AsList(); } }, + { "vulnerable_version_range", n => { VulnerableVersionRange = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("first_patched_version", FirstPatchedVersion); + writer.WriteObjectValue("package", Package); + writer.WriteStringValue("vulnerable_version_range", VulnerableVersionRange); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/Vulnerability_package.cs b/src/Ayllu.Github.Client/Github/Client/Models/Vulnerability_package.cs new file mode 100644 index 0000000..3ad8177 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/Vulnerability_package.cs @@ -0,0 +1,70 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + /// + /// The name of the package affected by the vulnerability. + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class Vulnerability_package : IAdditionalDataHolder, IParsable + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The package's language or package management ecosystem. + public global::Ayllu.Github.Client.Models.SecurityAdvisoryEcosystems? Ecosystem { get; set; } + /// The unique package name within its ecosystem. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Name { get; set; } +#nullable restore +#else + public string Name { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public Vulnerability_package() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.Vulnerability_package CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.Vulnerability_package(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "ecosystem", n => { Ecosystem = n.GetEnumValue(); } }, + { "name", n => { Name = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteEnumValue("ecosystem", Ecosystem); + writer.WriteStringValue("name", Name); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/WebhookConfig.cs b/src/Ayllu.Github.Client/Github/Client/Models/WebhookConfig.cs new file mode 100644 index 0000000..7765296 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/WebhookConfig.cs @@ -0,0 +1,96 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + /// + /// Configuration object of the webhook + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WebhookConfig : IAdditionalDataHolder, IParsable + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The media type used to serialize the payloads. Supported values include `json` and `form`. The default is `form`. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? ContentType { get; set; } +#nullable restore +#else + public string ContentType { get; set; } +#endif + /// The insecure_ssl property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.WebhookConfigInsecureSsl? InsecureSsl { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.WebhookConfigInsecureSsl InsecureSsl { get; set; } +#endif + /// 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/webhooks/event-payloads/#delivery-headers). +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Secret { get; set; } +#nullable restore +#else + public string Secret { get; set; } +#endif + /// The URL to which the payloads will be delivered. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Url { get; set; } +#nullable restore +#else + public string Url { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public WebhookConfig() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.WebhookConfig CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.WebhookConfig(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "content_type", n => { ContentType = n.GetStringValue(); } }, + { "insecure_ssl", n => { InsecureSsl = n.GetObjectValue(global::Ayllu.Github.Client.Models.WebhookConfigInsecureSsl.CreateFromDiscriminatorValue); } }, + { "secret", n => { Secret = n.GetStringValue(); } }, + { "url", n => { Url = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("content_type", ContentType); + writer.WriteObjectValue("insecure_ssl", InsecureSsl); + writer.WriteStringValue("secret", Secret); + writer.WriteStringValue("url", Url); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/WebhookConfigInsecureSsl.cs b/src/Ayllu.Github.Client/Github/Client/Models/WebhookConfigInsecureSsl.cs new file mode 100644 index 0000000..36ac074 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/WebhookConfigInsecureSsl.cs @@ -0,0 +1,68 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Serialization; +namespace Ayllu.Github.Client.Models +{ + /// + /// Composed type wrapper for classes , + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WebhookConfigInsecureSsl : IComposedTypeWrapper, IParsable + { + /// Composed type representation for type + public double? Double { get; set; } + /// Composed type representation for type +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? String { get; set; } +#nullable restore +#else + public string String { get; set; } +#endif + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.WebhookConfigInsecureSsl CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + var mappingValue = parseNode.GetChildNode("")?.GetStringValue(); + var result = new global::Ayllu.Github.Client.Models.WebhookConfigInsecureSsl(); + if(parseNode.GetDoubleValue() is double doubleValue) + { + result.Double = doubleValue; + } + else if(parseNode.GetStringValue() is string stringValue) + { + result.String = stringValue; + } + return result; + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary>(); + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(Double != null) + { + writer.WriteDoubleValue(null, Double); + } + else if(String != null) + { + writer.WriteStringValue(null, String); + } + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/WithCampaign_number503Error.cs b/src/Ayllu.Github.Client/Github/Client/Models/WithCampaign_number503Error.cs new file mode 100644 index 0000000..87cde3a --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/WithCampaign_number503Error.cs @@ -0,0 +1,88 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class WithCampaign_number503Error : ApiException, IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The code property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Code { get; set; } +#nullable restore +#else + public string Code { get; set; } +#endif + /// The documentation_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? DocumentationUrl { get; set; } +#nullable restore +#else + public string DocumentationUrl { get; set; } +#endif + /// The primary error message. + public override string Message { get => MessageEscaped ?? string.Empty; } + /// The message property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? MessageEscaped { get; set; } +#nullable restore +#else + public string MessageEscaped { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public WithCampaign_number503Error() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.WithCampaign_number503Error CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.WithCampaign_number503Error(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "code", n => { Code = n.GetStringValue(); } }, + { "documentation_url", n => { DocumentationUrl = n.GetStringValue(); } }, + { "message", n => { MessageEscaped = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("code", Code); + writer.WriteStringValue("documentation_url", DocumentationUrl); + writer.WriteStringValue("message", MessageEscaped); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/WithLanguage503Error.cs b/src/Ayllu.Github.Client/Github/Client/Models/WithLanguage503Error.cs new file mode 100644 index 0000000..385f3a0 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/WithLanguage503Error.cs @@ -0,0 +1,88 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class WithLanguage503Error : ApiException, IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The code property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Code { get; set; } +#nullable restore +#else + public string Code { get; set; } +#endif + /// The documentation_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? DocumentationUrl { get; set; } +#nullable restore +#else + public string DocumentationUrl { get; set; } +#endif + /// The primary error message. + public override string Message { get => MessageEscaped ?? string.Empty; } + /// The message property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? MessageEscaped { get; set; } +#nullable restore +#else + public string MessageEscaped { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public WithLanguage503Error() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.WithLanguage503Error CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.WithLanguage503Error(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "code", n => { Code = n.GetStringValue(); } }, + { "documentation_url", n => { DocumentationUrl = n.GetStringValue(); } }, + { "message", n => { MessageEscaped = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("code", Code); + writer.WriteStringValue("documentation_url", DocumentationUrl); + writer.WriteStringValue("message", MessageEscaped); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/WithPathGetResponseMember1.cs b/src/Ayllu.Github.Client/Github/Client/Models/WithPathGetResponseMember1.cs new file mode 100644 index 0000000..3070ce5 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/WithPathGetResponseMember1.cs @@ -0,0 +1,56 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + /// + /// A list of directory items + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithPathGetResponseMember1 : IAdditionalDataHolder, IParsable + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public WithPathGetResponseMember1() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.WithPathGetResponseMember1 CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.WithPathGetResponseMember1(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/Workflow.cs b/src/Ayllu.Github.Client/Github/Client/Models/Workflow.cs new file mode 100644 index 0000000..e5b7139 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/Workflow.cs @@ -0,0 +1,136 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + /// + /// A GitHub Actions workflow + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class Workflow : IAdditionalDataHolder, IParsable + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The badge_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? BadgeUrl { get; set; } +#nullable restore +#else + public string BadgeUrl { get; set; } +#endif + /// The created_at property + public DateTimeOffset? CreatedAt { get; set; } + /// The deleted_at property + public DateTimeOffset? DeletedAt { get; set; } + /// The html_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? HtmlUrl { get; set; } +#nullable restore +#else + public string HtmlUrl { get; set; } +#endif + /// The id property + public int? Id { get; set; } + /// The name property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Name { get; set; } +#nullable restore +#else + public string Name { get; set; } +#endif + /// The node_id property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? NodeId { get; set; } +#nullable restore +#else + public string NodeId { get; set; } +#endif + /// The path property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Path { get; set; } +#nullable restore +#else + public string Path { get; set; } +#endif + /// The state property + public global::Ayllu.Github.Client.Models.Workflow_state? State { get; set; } + /// The updated_at property + public DateTimeOffset? UpdatedAt { get; set; } + /// The url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Url { get; set; } +#nullable restore +#else + public string Url { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public Workflow() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.Workflow CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.Workflow(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "badge_url", n => { BadgeUrl = n.GetStringValue(); } }, + { "created_at", n => { CreatedAt = n.GetDateTimeOffsetValue(); } }, + { "deleted_at", n => { DeletedAt = n.GetDateTimeOffsetValue(); } }, + { "html_url", n => { HtmlUrl = n.GetStringValue(); } }, + { "id", n => { Id = n.GetIntValue(); } }, + { "name", n => { Name = n.GetStringValue(); } }, + { "node_id", n => { NodeId = n.GetStringValue(); } }, + { "path", n => { Path = n.GetStringValue(); } }, + { "state", n => { State = n.GetEnumValue(); } }, + { "updated_at", n => { UpdatedAt = n.GetDateTimeOffsetValue(); } }, + { "url", n => { Url = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("badge_url", BadgeUrl); + writer.WriteDateTimeOffsetValue("created_at", CreatedAt); + writer.WriteDateTimeOffsetValue("deleted_at", DeletedAt); + writer.WriteStringValue("html_url", HtmlUrl); + writer.WriteIntValue("id", Id); + writer.WriteStringValue("name", Name); + writer.WriteStringValue("node_id", NodeId); + writer.WriteStringValue("path", Path); + writer.WriteEnumValue("state", State); + writer.WriteDateTimeOffsetValue("updated_at", UpdatedAt); + writer.WriteStringValue("url", Url); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/WorkflowRun.cs b/src/Ayllu.Github.Client/Github/Client/Models/WorkflowRun.cs new file mode 100644 index 0000000..7301a34 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/WorkflowRun.cs @@ -0,0 +1,362 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + /// + /// An invocation of a workflow + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WorkflowRun : IAdditionalDataHolder, IParsable + { + /// A GitHub user. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.SimpleUser? Actor { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.SimpleUser Actor { get; set; } +#endif + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The URL to the artifacts for the workflow run. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? ArtifactsUrl { get; set; } +#nullable restore +#else + public string ArtifactsUrl { get; set; } +#endif + /// The URL to cancel the workflow run. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? CancelUrl { get; set; } +#nullable restore +#else + public string CancelUrl { get; set; } +#endif + /// The ID of the associated check suite. + public int? CheckSuiteId { get; set; } + /// The node ID of the associated check suite. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? CheckSuiteNodeId { get; set; } +#nullable restore +#else + public string CheckSuiteNodeId { get; set; } +#endif + /// The URL to the associated check suite. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? CheckSuiteUrl { get; set; } +#nullable restore +#else + public string CheckSuiteUrl { get; set; } +#endif + /// The conclusion property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Conclusion { get; set; } +#nullable restore +#else + public string Conclusion { get; set; } +#endif + /// The created_at property + public DateTimeOffset? CreatedAt { get; set; } + /// 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. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? DisplayTitle { get; set; } +#nullable restore +#else + public string DisplayTitle { get; set; } +#endif + /// The event property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Event { get; set; } +#nullable restore +#else + public string Event { get; set; } +#endif + /// The head_branch property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? HeadBranch { get; set; } +#nullable restore +#else + public string HeadBranch { get; set; } +#endif + /// A commit. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.NullableSimpleCommit? HeadCommit { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.NullableSimpleCommit HeadCommit { get; set; } +#endif + /// Minimal Repository +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.MinimalRepository? HeadRepository { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.MinimalRepository HeadRepository { get; set; } +#endif + /// The head_repository_id property + public int? HeadRepositoryId { get; set; } + /// The SHA of the head commit that points to the version of the workflow being run. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? HeadSha { get; set; } +#nullable restore +#else + public string HeadSha { get; set; } +#endif + /// The html_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? HtmlUrl { get; set; } +#nullable restore +#else + public string HtmlUrl { get; set; } +#endif + /// The ID of the workflow run. + public int? Id { get; set; } + /// The URL to the jobs for the workflow run. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? JobsUrl { get; set; } +#nullable restore +#else + public string JobsUrl { get; set; } +#endif + /// The URL to download the logs for the workflow run. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? LogsUrl { get; set; } +#nullable restore +#else + public string LogsUrl { get; set; } +#endif + /// The name of the workflow run. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Name { get; set; } +#nullable restore +#else + public string Name { get; set; } +#endif + /// The node_id property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? NodeId { get; set; } +#nullable restore +#else + public string NodeId { get; set; } +#endif + /// The full path of the workflow +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Path { get; set; } +#nullable restore +#else + public string Path { get; set; } +#endif + /// The URL to the previous attempted run of this workflow, if one exists. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? PreviousAttemptUrl { get; set; } +#nullable restore +#else + public string PreviousAttemptUrl { get; set; } +#endif + /// 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. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? PullRequests { get; set; } +#nullable restore +#else + public List PullRequests { get; set; } +#endif + /// The referenced_workflows property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? ReferencedWorkflows { get; set; } +#nullable restore +#else + public List ReferencedWorkflows { get; set; } +#endif + /// Minimal Repository +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.MinimalRepository? Repository { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.MinimalRepository Repository { get; set; } +#endif + /// The URL to rerun the workflow run. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? RerunUrl { get; set; } +#nullable restore +#else + public string RerunUrl { get; set; } +#endif + /// Attempt number of the run, 1 for first attempt and higher if the workflow was re-run. + public int? RunAttempt { get; set; } + /// The auto incrementing run number for the workflow run. + public int? RunNumber { get; set; } + /// The start time of the latest run. Resets on re-run. + public DateTimeOffset? RunStartedAt { get; set; } + /// The status property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Status { get; set; } +#nullable restore +#else + public string Status { get; set; } +#endif + /// A GitHub user. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.SimpleUser? TriggeringActor { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.SimpleUser TriggeringActor { get; set; } +#endif + /// The updated_at property + public DateTimeOffset? UpdatedAt { get; set; } + /// The URL to the workflow run. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Url { get; set; } +#nullable restore +#else + public string Url { get; set; } +#endif + /// The ID of the parent workflow. + public int? WorkflowId { get; set; } + /// The URL to the workflow. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? WorkflowUrl { get; set; } +#nullable restore +#else + public string WorkflowUrl { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public WorkflowRun() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.WorkflowRun CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.WorkflowRun(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "actor", n => { Actor = n.GetObjectValue(global::Ayllu.Github.Client.Models.SimpleUser.CreateFromDiscriminatorValue); } }, + { "artifacts_url", n => { ArtifactsUrl = n.GetStringValue(); } }, + { "cancel_url", n => { CancelUrl = n.GetStringValue(); } }, + { "check_suite_id", n => { CheckSuiteId = n.GetIntValue(); } }, + { "check_suite_node_id", n => { CheckSuiteNodeId = n.GetStringValue(); } }, + { "check_suite_url", n => { CheckSuiteUrl = n.GetStringValue(); } }, + { "conclusion", n => { Conclusion = n.GetStringValue(); } }, + { "created_at", n => { CreatedAt = n.GetDateTimeOffsetValue(); } }, + { "display_title", n => { DisplayTitle = n.GetStringValue(); } }, + { "event", n => { Event = n.GetStringValue(); } }, + { "head_branch", n => { HeadBranch = n.GetStringValue(); } }, + { "head_commit", n => { HeadCommit = n.GetObjectValue(global::Ayllu.Github.Client.Models.NullableSimpleCommit.CreateFromDiscriminatorValue); } }, + { "head_repository", n => { HeadRepository = n.GetObjectValue(global::Ayllu.Github.Client.Models.MinimalRepository.CreateFromDiscriminatorValue); } }, + { "head_repository_id", n => { HeadRepositoryId = n.GetIntValue(); } }, + { "head_sha", n => { HeadSha = n.GetStringValue(); } }, + { "html_url", n => { HtmlUrl = n.GetStringValue(); } }, + { "id", n => { Id = n.GetIntValue(); } }, + { "jobs_url", n => { JobsUrl = n.GetStringValue(); } }, + { "logs_url", n => { LogsUrl = n.GetStringValue(); } }, + { "name", n => { Name = n.GetStringValue(); } }, + { "node_id", n => { NodeId = n.GetStringValue(); } }, + { "path", n => { Path = n.GetStringValue(); } }, + { "previous_attempt_url", n => { PreviousAttemptUrl = n.GetStringValue(); } }, + { "pull_requests", n => { PullRequests = n.GetCollectionOfObjectValues(global::Ayllu.Github.Client.Models.PullRequestMinimal.CreateFromDiscriminatorValue)?.AsList(); } }, + { "referenced_workflows", n => { ReferencedWorkflows = n.GetCollectionOfObjectValues(global::Ayllu.Github.Client.Models.ReferencedWorkflow.CreateFromDiscriminatorValue)?.AsList(); } }, + { "repository", n => { Repository = n.GetObjectValue(global::Ayllu.Github.Client.Models.MinimalRepository.CreateFromDiscriminatorValue); } }, + { "rerun_url", n => { RerunUrl = n.GetStringValue(); } }, + { "run_attempt", n => { RunAttempt = n.GetIntValue(); } }, + { "run_number", n => { RunNumber = n.GetIntValue(); } }, + { "run_started_at", n => { RunStartedAt = n.GetDateTimeOffsetValue(); } }, + { "status", n => { Status = n.GetStringValue(); } }, + { "triggering_actor", n => { TriggeringActor = n.GetObjectValue(global::Ayllu.Github.Client.Models.SimpleUser.CreateFromDiscriminatorValue); } }, + { "updated_at", n => { UpdatedAt = n.GetDateTimeOffsetValue(); } }, + { "url", n => { Url = n.GetStringValue(); } }, + { "workflow_id", n => { WorkflowId = n.GetIntValue(); } }, + { "workflow_url", n => { WorkflowUrl = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteObjectValue("actor", Actor); + writer.WriteStringValue("artifacts_url", ArtifactsUrl); + writer.WriteStringValue("cancel_url", CancelUrl); + writer.WriteIntValue("check_suite_id", CheckSuiteId); + writer.WriteStringValue("check_suite_node_id", CheckSuiteNodeId); + writer.WriteStringValue("check_suite_url", CheckSuiteUrl); + writer.WriteStringValue("conclusion", Conclusion); + writer.WriteDateTimeOffsetValue("created_at", CreatedAt); + writer.WriteStringValue("display_title", DisplayTitle); + writer.WriteStringValue("event", Event); + writer.WriteStringValue("head_branch", HeadBranch); + writer.WriteObjectValue("head_commit", HeadCommit); + writer.WriteObjectValue("head_repository", HeadRepository); + writer.WriteIntValue("head_repository_id", HeadRepositoryId); + writer.WriteStringValue("head_sha", HeadSha); + writer.WriteStringValue("html_url", HtmlUrl); + writer.WriteIntValue("id", Id); + writer.WriteStringValue("jobs_url", JobsUrl); + writer.WriteStringValue("logs_url", LogsUrl); + writer.WriteStringValue("name", Name); + writer.WriteStringValue("node_id", NodeId); + writer.WriteStringValue("path", Path); + writer.WriteStringValue("previous_attempt_url", PreviousAttemptUrl); + writer.WriteCollectionOfObjectValues("pull_requests", PullRequests); + writer.WriteCollectionOfObjectValues("referenced_workflows", ReferencedWorkflows); + writer.WriteObjectValue("repository", Repository); + writer.WriteStringValue("rerun_url", RerunUrl); + writer.WriteIntValue("run_attempt", RunAttempt); + writer.WriteIntValue("run_number", RunNumber); + writer.WriteDateTimeOffsetValue("run_started_at", RunStartedAt); + writer.WriteStringValue("status", Status); + writer.WriteObjectValue("triggering_actor", TriggeringActor); + writer.WriteDateTimeOffsetValue("updated_at", UpdatedAt); + writer.WriteStringValue("url", Url); + writer.WriteIntValue("workflow_id", WorkflowId); + writer.WriteStringValue("workflow_url", WorkflowUrl); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/WorkflowRunUsage.cs b/src/Ayllu.Github.Client/Github/Client/Models/WorkflowRunUsage.cs new file mode 100644 index 0000000..052df40 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/WorkflowRunUsage.cs @@ -0,0 +1,70 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + /// + /// Workflow Run Usage + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WorkflowRunUsage : IAdditionalDataHolder, IParsable + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The billable property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.WorkflowRunUsage_billable? Billable { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.WorkflowRunUsage_billable Billable { get; set; } +#endif + /// The run_duration_ms property + public int? RunDurationMs { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public WorkflowRunUsage() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.WorkflowRunUsage CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.WorkflowRunUsage(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "billable", n => { Billable = n.GetObjectValue(global::Ayllu.Github.Client.Models.WorkflowRunUsage_billable.CreateFromDiscriminatorValue); } }, + { "run_duration_ms", n => { RunDurationMs = n.GetIntValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteObjectValue("billable", Billable); + writer.WriteIntValue("run_duration_ms", RunDurationMs); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/WorkflowRunUsage_billable.cs b/src/Ayllu.Github.Client/Github/Client/Models/WorkflowRunUsage_billable.cs new file mode 100644 index 0000000..8b92dc4 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/WorkflowRunUsage_billable.cs @@ -0,0 +1,85 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class WorkflowRunUsage_billable : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The MACOS property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.WorkflowRunUsage_billable_MACOS? MACOS { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.WorkflowRunUsage_billable_MACOS MACOS { get; set; } +#endif + /// The UBUNTU property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.WorkflowRunUsage_billable_UBUNTU? UBUNTU { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.WorkflowRunUsage_billable_UBUNTU UBUNTU { get; set; } +#endif + /// The WINDOWS property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.WorkflowRunUsage_billable_WINDOWS? WINDOWS { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.WorkflowRunUsage_billable_WINDOWS WINDOWS { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public WorkflowRunUsage_billable() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.WorkflowRunUsage_billable CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.WorkflowRunUsage_billable(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "MACOS", n => { MACOS = n.GetObjectValue(global::Ayllu.Github.Client.Models.WorkflowRunUsage_billable_MACOS.CreateFromDiscriminatorValue); } }, + { "UBUNTU", n => { UBUNTU = n.GetObjectValue(global::Ayllu.Github.Client.Models.WorkflowRunUsage_billable_UBUNTU.CreateFromDiscriminatorValue); } }, + { "WINDOWS", n => { WINDOWS = n.GetObjectValue(global::Ayllu.Github.Client.Models.WorkflowRunUsage_billable_WINDOWS.CreateFromDiscriminatorValue); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteObjectValue("MACOS", MACOS); + writer.WriteObjectValue("UBUNTU", UBUNTU); + writer.WriteObjectValue("WINDOWS", WINDOWS); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/WorkflowRunUsage_billable_MACOS.cs b/src/Ayllu.Github.Client/Github/Client/Models/WorkflowRunUsage_billable_MACOS.cs new file mode 100644 index 0000000..893cddb --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/WorkflowRunUsage_billable_MACOS.cs @@ -0,0 +1,73 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class WorkflowRunUsage_billable_MACOS : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The job_runs property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? JobRuns { get; set; } +#nullable restore +#else + public List JobRuns { get; set; } +#endif + /// The jobs property + public int? Jobs { get; set; } + /// The total_ms property + public int? TotalMs { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public WorkflowRunUsage_billable_MACOS() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.WorkflowRunUsage_billable_MACOS CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.WorkflowRunUsage_billable_MACOS(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "job_runs", n => { JobRuns = n.GetCollectionOfObjectValues(global::Ayllu.Github.Client.Models.WorkflowRunUsage_billable_MACOS_job_runs.CreateFromDiscriminatorValue)?.AsList(); } }, + { "jobs", n => { Jobs = n.GetIntValue(); } }, + { "total_ms", n => { TotalMs = n.GetIntValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteCollectionOfObjectValues("job_runs", JobRuns); + writer.WriteIntValue("jobs", Jobs); + writer.WriteIntValue("total_ms", TotalMs); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/WorkflowRunUsage_billable_MACOS_job_runs.cs b/src/Ayllu.Github.Client/Github/Client/Models/WorkflowRunUsage_billable_MACOS_job_runs.cs new file mode 100644 index 0000000..81f0af9 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/WorkflowRunUsage_billable_MACOS_job_runs.cs @@ -0,0 +1,63 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class WorkflowRunUsage_billable_MACOS_job_runs : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The duration_ms property + public int? DurationMs { get; set; } + /// The job_id property + public int? JobId { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public WorkflowRunUsage_billable_MACOS_job_runs() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.WorkflowRunUsage_billable_MACOS_job_runs CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.WorkflowRunUsage_billable_MACOS_job_runs(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "duration_ms", n => { DurationMs = n.GetIntValue(); } }, + { "job_id", n => { JobId = n.GetIntValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteIntValue("duration_ms", DurationMs); + writer.WriteIntValue("job_id", JobId); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/WorkflowRunUsage_billable_UBUNTU.cs b/src/Ayllu.Github.Client/Github/Client/Models/WorkflowRunUsage_billable_UBUNTU.cs new file mode 100644 index 0000000..8f16345 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/WorkflowRunUsage_billable_UBUNTU.cs @@ -0,0 +1,73 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class WorkflowRunUsage_billable_UBUNTU : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The job_runs property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? JobRuns { get; set; } +#nullable restore +#else + public List JobRuns { get; set; } +#endif + /// The jobs property + public int? Jobs { get; set; } + /// The total_ms property + public int? TotalMs { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public WorkflowRunUsage_billable_UBUNTU() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.WorkflowRunUsage_billable_UBUNTU CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.WorkflowRunUsage_billable_UBUNTU(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "job_runs", n => { JobRuns = n.GetCollectionOfObjectValues(global::Ayllu.Github.Client.Models.WorkflowRunUsage_billable_UBUNTU_job_runs.CreateFromDiscriminatorValue)?.AsList(); } }, + { "jobs", n => { Jobs = n.GetIntValue(); } }, + { "total_ms", n => { TotalMs = n.GetIntValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteCollectionOfObjectValues("job_runs", JobRuns); + writer.WriteIntValue("jobs", Jobs); + writer.WriteIntValue("total_ms", TotalMs); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/WorkflowRunUsage_billable_UBUNTU_job_runs.cs b/src/Ayllu.Github.Client/Github/Client/Models/WorkflowRunUsage_billable_UBUNTU_job_runs.cs new file mode 100644 index 0000000..3879f2c --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/WorkflowRunUsage_billable_UBUNTU_job_runs.cs @@ -0,0 +1,63 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class WorkflowRunUsage_billable_UBUNTU_job_runs : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The duration_ms property + public int? DurationMs { get; set; } + /// The job_id property + public int? JobId { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public WorkflowRunUsage_billable_UBUNTU_job_runs() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.WorkflowRunUsage_billable_UBUNTU_job_runs CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.WorkflowRunUsage_billable_UBUNTU_job_runs(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "duration_ms", n => { DurationMs = n.GetIntValue(); } }, + { "job_id", n => { JobId = n.GetIntValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteIntValue("duration_ms", DurationMs); + writer.WriteIntValue("job_id", JobId); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/WorkflowRunUsage_billable_WINDOWS.cs b/src/Ayllu.Github.Client/Github/Client/Models/WorkflowRunUsage_billable_WINDOWS.cs new file mode 100644 index 0000000..1028b1d --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/WorkflowRunUsage_billable_WINDOWS.cs @@ -0,0 +1,73 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class WorkflowRunUsage_billable_WINDOWS : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The job_runs property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? JobRuns { get; set; } +#nullable restore +#else + public List JobRuns { get; set; } +#endif + /// The jobs property + public int? Jobs { get; set; } + /// The total_ms property + public int? TotalMs { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public WorkflowRunUsage_billable_WINDOWS() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.WorkflowRunUsage_billable_WINDOWS CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.WorkflowRunUsage_billable_WINDOWS(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "job_runs", n => { JobRuns = n.GetCollectionOfObjectValues(global::Ayllu.Github.Client.Models.WorkflowRunUsage_billable_WINDOWS_job_runs.CreateFromDiscriminatorValue)?.AsList(); } }, + { "jobs", n => { Jobs = n.GetIntValue(); } }, + { "total_ms", n => { TotalMs = n.GetIntValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteCollectionOfObjectValues("job_runs", JobRuns); + writer.WriteIntValue("jobs", Jobs); + writer.WriteIntValue("total_ms", TotalMs); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/WorkflowRunUsage_billable_WINDOWS_job_runs.cs b/src/Ayllu.Github.Client/Github/Client/Models/WorkflowRunUsage_billable_WINDOWS_job_runs.cs new file mode 100644 index 0000000..a5a23bf --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/WorkflowRunUsage_billable_WINDOWS_job_runs.cs @@ -0,0 +1,63 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class WorkflowRunUsage_billable_WINDOWS_job_runs : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The duration_ms property + public int? DurationMs { get; set; } + /// The job_id property + public int? JobId { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public WorkflowRunUsage_billable_WINDOWS_job_runs() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.WorkflowRunUsage_billable_WINDOWS_job_runs CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.WorkflowRunUsage_billable_WINDOWS_job_runs(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "duration_ms", n => { DurationMs = n.GetIntValue(); } }, + { "job_id", n => { JobId = n.GetIntValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteIntValue("duration_ms", DurationMs); + writer.WriteIntValue("job_id", JobId); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/WorkflowUsage.cs b/src/Ayllu.Github.Client/Github/Client/Models/WorkflowUsage.cs new file mode 100644 index 0000000..fb74671 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/WorkflowUsage.cs @@ -0,0 +1,66 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + /// + /// Workflow Usage + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WorkflowUsage : IAdditionalDataHolder, IParsable + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The billable property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.WorkflowUsage_billable? Billable { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.WorkflowUsage_billable Billable { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public WorkflowUsage() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.WorkflowUsage CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.WorkflowUsage(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "billable", n => { Billable = n.GetObjectValue(global::Ayllu.Github.Client.Models.WorkflowUsage_billable.CreateFromDiscriminatorValue); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteObjectValue("billable", Billable); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/WorkflowUsage_billable.cs b/src/Ayllu.Github.Client/Github/Client/Models/WorkflowUsage_billable.cs new file mode 100644 index 0000000..82b9385 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/WorkflowUsage_billable.cs @@ -0,0 +1,85 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class WorkflowUsage_billable : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The MACOS property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.WorkflowUsage_billable_MACOS? MACOS { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.WorkflowUsage_billable_MACOS MACOS { get; set; } +#endif + /// The UBUNTU property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.WorkflowUsage_billable_UBUNTU? UBUNTU { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.WorkflowUsage_billable_UBUNTU UBUNTU { get; set; } +#endif + /// The WINDOWS property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.WorkflowUsage_billable_WINDOWS? WINDOWS { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.WorkflowUsage_billable_WINDOWS WINDOWS { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public WorkflowUsage_billable() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.WorkflowUsage_billable CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.WorkflowUsage_billable(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "MACOS", n => { MACOS = n.GetObjectValue(global::Ayllu.Github.Client.Models.WorkflowUsage_billable_MACOS.CreateFromDiscriminatorValue); } }, + { "UBUNTU", n => { UBUNTU = n.GetObjectValue(global::Ayllu.Github.Client.Models.WorkflowUsage_billable_UBUNTU.CreateFromDiscriminatorValue); } }, + { "WINDOWS", n => { WINDOWS = n.GetObjectValue(global::Ayllu.Github.Client.Models.WorkflowUsage_billable_WINDOWS.CreateFromDiscriminatorValue); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteObjectValue("MACOS", MACOS); + writer.WriteObjectValue("UBUNTU", UBUNTU); + writer.WriteObjectValue("WINDOWS", WINDOWS); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/WorkflowUsage_billable_MACOS.cs b/src/Ayllu.Github.Client/Github/Client/Models/WorkflowUsage_billable_MACOS.cs new file mode 100644 index 0000000..e209701 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/WorkflowUsage_billable_MACOS.cs @@ -0,0 +1,59 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class WorkflowUsage_billable_MACOS : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The total_ms property + public int? TotalMs { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public WorkflowUsage_billable_MACOS() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.WorkflowUsage_billable_MACOS CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.WorkflowUsage_billable_MACOS(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "total_ms", n => { TotalMs = n.GetIntValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteIntValue("total_ms", TotalMs); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/WorkflowUsage_billable_UBUNTU.cs b/src/Ayllu.Github.Client/Github/Client/Models/WorkflowUsage_billable_UBUNTU.cs new file mode 100644 index 0000000..1c9ac44 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/WorkflowUsage_billable_UBUNTU.cs @@ -0,0 +1,59 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class WorkflowUsage_billable_UBUNTU : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The total_ms property + public int? TotalMs { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public WorkflowUsage_billable_UBUNTU() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.WorkflowUsage_billable_UBUNTU CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.WorkflowUsage_billable_UBUNTU(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "total_ms", n => { TotalMs = n.GetIntValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteIntValue("total_ms", TotalMs); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/WorkflowUsage_billable_WINDOWS.cs b/src/Ayllu.Github.Client/Github/Client/Models/WorkflowUsage_billable_WINDOWS.cs new file mode 100644 index 0000000..1633d3c --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/WorkflowUsage_billable_WINDOWS.cs @@ -0,0 +1,59 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class WorkflowUsage_billable_WINDOWS : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The total_ms property + public int? TotalMs { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public WorkflowUsage_billable_WINDOWS() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Models.WorkflowUsage_billable_WINDOWS CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Models.WorkflowUsage_billable_WINDOWS(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "total_ms", n => { TotalMs = n.GetIntValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteIntValue("total_ms", TotalMs); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Models/Workflow_state.cs b/src/Ayllu.Github.Client/Github/Client/Models/Workflow_state.cs new file mode 100644 index 0000000..1c46919 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Models/Workflow_state.cs @@ -0,0 +1,32 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public enum Workflow_state + #pragma warning restore CS1591 + { + [EnumMember(Value = "active")] + #pragma warning disable CS1591 + Active, + #pragma warning restore CS1591 + [EnumMember(Value = "deleted")] + #pragma warning disable CS1591 + Deleted, + #pragma warning restore CS1591 + [EnumMember(Value = "disabled_fork")] + #pragma warning disable CS1591 + Disabled_fork, + #pragma warning restore CS1591 + [EnumMember(Value = "disabled_inactivity")] + #pragma warning disable CS1591 + Disabled_inactivity, + #pragma warning restore CS1591 + [EnumMember(Value = "disabled_manually")] + #pragma warning disable CS1591 + Disabled_manually, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Networks/Item/Item/Events/EventsRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Networks/Item/Item/Events/EventsRequestBuilder.cs new file mode 100644 index 0000000..813cadb --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Networks/Item/Item/Events/EventsRequestBuilder.cs @@ -0,0 +1,114 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Networks.Item.Item.Events +{ + /// + /// Builds and executes requests for operations under \networks\{owner}\{repo}\events + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class EventsRequestBuilder : BaseRequestBuilder + { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public EventsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/networks/{owner}/{repo}/events{?page*,per_page*}", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public EventsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/networks/{owner}/{repo}/events{?page*,per_page*}", rawUrl) + { + } + /// + /// > [!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. + /// API method documentation + /// + /// A List<global::Ayllu.Github.Client.Models.Event> + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 403 status code + /// When receiving a 404 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task?> GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task> GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "403", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "404", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + }; + var collectionResult = await RequestAdapter.SendCollectionAsync(requestInfo, global::Ayllu.Github.Client.Models.Event.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + return collectionResult?.AsList(); + } + /// + /// > [!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. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.Networks.Item.Item.Events.EventsRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Networks.Item.Item.Events.EventsRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// > [!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. + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class EventsRequestBuilderGetQueryParameters + { + /// The page number of the results to fetch. For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." + [QueryParameter("page")] + public int? Page { get; set; } + /// The number of results per page (max 100). For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." + [QueryParameter("per_page")] + public int? PerPage { get; set; } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class EventsRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Networks/Item/Item/WithRepoItemRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Networks/Item/Item/WithRepoItemRequestBuilder.cs new file mode 100644 index 0000000..e0665f2 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Networks/Item/Item/WithRepoItemRequestBuilder.cs @@ -0,0 +1,41 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Networks.Item.Item.Events; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System; +namespace Ayllu.Github.Client.Networks.Item.Item +{ + /// + /// Builds and executes requests for operations under \networks\{owner}\{repo} + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithRepoItemRequestBuilder : BaseRequestBuilder + { + /// The events property + public global::Ayllu.Github.Client.Networks.Item.Item.Events.EventsRequestBuilder Events + { + get => new global::Ayllu.Github.Client.Networks.Item.Item.Events.EventsRequestBuilder(PathParameters, RequestAdapter); + } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public WithRepoItemRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/networks/{owner}/{repo}", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public WithRepoItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/networks/{owner}/{repo}", rawUrl) + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Networks/Item/WithOwnerItemRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Networks/Item/WithOwnerItemRequestBuilder.cs new file mode 100644 index 0000000..63c546f --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Networks/Item/WithOwnerItemRequestBuilder.cs @@ -0,0 +1,48 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Networks.Item.Item; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System; +namespace Ayllu.Github.Client.Networks.Item +{ + /// + /// Builds and executes requests for operations under \networks\{owner} + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithOwnerItemRequestBuilder : BaseRequestBuilder + { + /// Gets an item from the Ayllu.Github.Client.networks.item.item collection + /// Unique identifier of the item + /// A + public global::Ayllu.Github.Client.Networks.Item.Item.WithRepoItemRequestBuilder this[string position] + { + get + { + var urlTplParams = new Dictionary(PathParameters); + urlTplParams.Add("repo", position); + return new global::Ayllu.Github.Client.Networks.Item.Item.WithRepoItemRequestBuilder(urlTplParams, RequestAdapter); + } + } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public WithOwnerItemRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/networks/{owner}", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public WithOwnerItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/networks/{owner}", rawUrl) + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Networks/NetworksRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Networks/NetworksRequestBuilder.cs new file mode 100644 index 0000000..9a3b14e --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Networks/NetworksRequestBuilder.cs @@ -0,0 +1,48 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Networks.Item; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System; +namespace Ayllu.Github.Client.Networks +{ + /// + /// Builds and executes requests for operations under \networks + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class NetworksRequestBuilder : BaseRequestBuilder + { + /// Gets an item from the Ayllu.Github.Client.networks.item collection + /// Unique identifier of the item + /// A + public global::Ayllu.Github.Client.Networks.Item.WithOwnerItemRequestBuilder this[string position] + { + get + { + var urlTplParams = new Dictionary(PathParameters); + urlTplParams.Add("owner", position); + return new global::Ayllu.Github.Client.Networks.Item.WithOwnerItemRequestBuilder(urlTplParams, RequestAdapter); + } + } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public NetworksRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/networks", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public NetworksRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/networks", rawUrl) + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Notifications/NotificationsPutRequestBody.cs b/src/Ayllu.Github.Client/Github/Client/Notifications/NotificationsPutRequestBody.cs new file mode 100644 index 0000000..7db4340 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Notifications/NotificationsPutRequestBody.cs @@ -0,0 +1,63 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Notifications +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class NotificationsPutRequestBody : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// 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. + public DateTimeOffset? LastReadAt { get; set; } + /// Whether the notification has been read. + public bool? Read { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public NotificationsPutRequestBody() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Notifications.NotificationsPutRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Notifications.NotificationsPutRequestBody(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "last_read_at", n => { LastReadAt = n.GetDateTimeOffsetValue(); } }, + { "read", n => { Read = n.GetBoolValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteDateTimeOffsetValue("last_read_at", LastReadAt); + writer.WriteBoolValue("read", Read); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Notifications/NotificationsPutResponse.cs b/src/Ayllu.Github.Client/Github/Client/Notifications/NotificationsPutResponse.cs new file mode 100644 index 0000000..5e858cb --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Notifications/NotificationsPutResponse.cs @@ -0,0 +1,65 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Notifications +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class NotificationsPutResponse : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The message property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Message { get; set; } +#nullable restore +#else + public string Message { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public NotificationsPutResponse() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Notifications.NotificationsPutResponse CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Notifications.NotificationsPutResponse(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "message", n => { Message = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("message", Message); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Notifications/NotificationsRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Notifications/NotificationsRequestBuilder.cs new file mode 100644 index 0000000..7bd2c34 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Notifications/NotificationsRequestBuilder.cs @@ -0,0 +1,221 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Ayllu.Github.Client.Notifications.Threads; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Notifications +{ + /// + /// Builds and executes requests for operations under \notifications + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class NotificationsRequestBuilder : BaseRequestBuilder + { + /// The threads property + public global::Ayllu.Github.Client.Notifications.Threads.ThreadsRequestBuilder Threads + { + get => new global::Ayllu.Github.Client.Notifications.Threads.ThreadsRequestBuilder(PathParameters, RequestAdapter); + } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public NotificationsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/notifications{?all*,before*,page*,participating*,per_page*,since*}", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public NotificationsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/notifications{?all*,before*,page*,participating*,per_page*,since*}", rawUrl) + { + } + /// + /// List all notifications for the current user, sorted by most recently updated. + /// API method documentation + /// + /// A List<global::Ayllu.Github.Client.Models.ThreadObject> + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 401 status code + /// When receiving a 403 status code + /// When receiving a 422 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task?> GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task> GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "401", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "403", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "422", global::Ayllu.Github.Client.Models.ValidationError.CreateFromDiscriminatorValue }, + }; + var collectionResult = await RequestAdapter.SendCollectionAsync(requestInfo, global::Ayllu.Github.Client.Models.ThreadObject.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + return collectionResult?.AsList(); + } + /// + /// 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 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/rest/activity/notifications#list-notifications-for-the-authenticated-user) endpoint and pass the query parameter `all=false`. + /// API method documentation + /// + /// A + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 401 status code + /// When receiving a 403 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PutAsNotificationsPutResponseAsync(global::Ayllu.Github.Client.Notifications.NotificationsPutRequestBody body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task PutAsNotificationsPutResponseAsync(global::Ayllu.Github.Client.Notifications.NotificationsPutRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPutRequestInformation(body, requestConfiguration); + var errorMapping = new Dictionary> + { + { "401", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "403", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Notifications.NotificationsPutResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// 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 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/rest/activity/notifications#list-notifications-for-the-authenticated-user) endpoint and pass the query parameter `all=false`. + /// API method documentation + /// + /// A + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 401 status code + /// When receiving a 403 status code + [Obsolete("This method is obsolete. Use PutAsNotificationsPutResponseAsync instead.")] +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PutAsync(global::Ayllu.Github.Client.Notifications.NotificationsPutRequestBody body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task PutAsync(global::Ayllu.Github.Client.Notifications.NotificationsPutRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPutRequestInformation(body, requestConfiguration); + var errorMapping = new Dictionary> + { + { "401", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "403", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Notifications.NotificationsResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// List all notifications for the current user, sorted by most recently updated. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// 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 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/rest/activity/notifications#list-notifications-for-the-authenticated-user) endpoint and pass the query parameter `all=false`. + /// + /// A + /// The request body + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPutRequestInformation(global::Ayllu.Github.Client.Notifications.NotificationsPutRequestBody body, Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToPutRequestInformation(global::Ayllu.Github.Client.Notifications.NotificationsPutRequestBody body, Action> requestConfiguration = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation(Method.PUT, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.Notifications.NotificationsRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Notifications.NotificationsRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// List all notifications for the current user, sorted by most recently updated. + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class NotificationsRequestBuilderGetQueryParameters + { + /// If `true`, show notifications marked as read. + [QueryParameter("all")] + public bool? All { get; set; } + /// 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`. + [QueryParameter("before")] + public DateTimeOffset? Before { get; set; } + /// The page number of the results to fetch. For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." + [QueryParameter("page")] + public int? Page { get; set; } + /// If `true`, only shows notifications in which the user is directly participating or mentioned. + [QueryParameter("participating")] + public bool? Participating { get; set; } + /// The number of results per page (max 50). For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." + [QueryParameter("per_page")] + public int? PerPage { get; set; } + /// 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`. + [QueryParameter("since")] + public DateTimeOffset? Since { get; set; } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class NotificationsRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class NotificationsRequestBuilderPutRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Notifications/NotificationsResponse.cs b/src/Ayllu.Github.Client/Github/Client/Notifications/NotificationsResponse.cs new file mode 100644 index 0000000..4a6820d --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Notifications/NotificationsResponse.cs @@ -0,0 +1,28 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Notifications +{ + [Obsolete("This class is obsolete. Use NotificationsPutResponse instead.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class NotificationsResponse : global::Ayllu.Github.Client.Notifications.NotificationsPutResponse, IParsable + #pragma warning restore CS1591 + { + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static new global::Ayllu.Github.Client.Notifications.NotificationsResponse CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Notifications.NotificationsResponse(); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Notifications/Threads/Item/Subscription/SubscriptionPutRequestBody.cs b/src/Ayllu.Github.Client/Github/Client/Notifications/Threads/Item/Subscription/SubscriptionPutRequestBody.cs new file mode 100644 index 0000000..08f1e2e --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Notifications/Threads/Item/Subscription/SubscriptionPutRequestBody.cs @@ -0,0 +1,59 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Notifications.Threads.Item.Subscription +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class SubscriptionPutRequestBody : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// Whether to block all notifications from a thread. + public bool? Ignored { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public SubscriptionPutRequestBody() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Notifications.Threads.Item.Subscription.SubscriptionPutRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Notifications.Threads.Item.Subscription.SubscriptionPutRequestBody(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "ignored", n => { Ignored = n.GetBoolValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteBoolValue("ignored", Ignored); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Notifications/Threads/Item/Subscription/SubscriptionRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Notifications/Threads/Item/Subscription/SubscriptionRequestBuilder.cs new file mode 100644 index 0000000..75d2d87 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Notifications/Threads/Item/Subscription/SubscriptionRequestBuilder.cs @@ -0,0 +1,210 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Notifications.Threads.Item.Subscription +{ + /// + /// Builds and executes requests for operations under \notifications\threads\{thread_id}\subscription + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class SubscriptionRequestBuilder : BaseRequestBuilder + { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public SubscriptionRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/notifications/threads/{thread_id}/subscription", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public SubscriptionRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/notifications/threads/{thread_id}/subscription", rawUrl) + { + } + /// + /// 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/rest/activity/notifications#set-a-thread-subscription) endpoint and set `ignore` to `true`. + /// API method documentation + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 401 status code + /// When receiving a 403 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task DeleteAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task DeleteAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToDeleteRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "401", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "403", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + }; + await RequestAdapter.SendNoContentAsync(requestInfo, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// This checks to see if the current user is subscribed to a thread. You can also [get a repository subscription](https://docs.github.com/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. + /// API method documentation + /// + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 401 status code + /// When receiving a 403 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "401", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "403", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Models.ThreadSubscription.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// 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/rest/activity/notifications#delete-a-thread-subscription) endpoint. + /// API method documentation + /// + /// A + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 401 status code + /// When receiving a 403 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PutAsync(global::Ayllu.Github.Client.Notifications.Threads.Item.Subscription.SubscriptionPutRequestBody body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task PutAsync(global::Ayllu.Github.Client.Notifications.Threads.Item.Subscription.SubscriptionPutRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPutRequestInformation(body, requestConfiguration); + var errorMapping = new Dictionary> + { + { "401", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "403", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Models.ThreadSubscription.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// 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/rest/activity/notifications#set-a-thread-subscription) endpoint and set `ignore` to `true`. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToDeleteRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToDeleteRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.DELETE, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// This checks to see if the current user is subscribed to a thread. You can also [get a repository subscription](https://docs.github.com/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. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// 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/rest/activity/notifications#delete-a-thread-subscription) endpoint. + /// + /// A + /// The request body + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPutRequestInformation(global::Ayllu.Github.Client.Notifications.Threads.Item.Subscription.SubscriptionPutRequestBody body, Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToPutRequestInformation(global::Ayllu.Github.Client.Notifications.Threads.Item.Subscription.SubscriptionPutRequestBody body, Action> requestConfiguration = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation(Method.PUT, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.Notifications.Threads.Item.Subscription.SubscriptionRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Notifications.Threads.Item.Subscription.SubscriptionRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class SubscriptionRequestBuilderDeleteRequestConfiguration : RequestConfiguration + { + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class SubscriptionRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class SubscriptionRequestBuilderPutRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Notifications/Threads/Item/WithThread_ItemRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Notifications/Threads/Item/WithThread_ItemRequestBuilder.cs new file mode 100644 index 0000000..7167d32 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Notifications/Threads/Item/WithThread_ItemRequestBuilder.cs @@ -0,0 +1,200 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Ayllu.Github.Client.Notifications.Threads.Item.Subscription; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Notifications.Threads.Item +{ + /// + /// Builds and executes requests for operations under \notifications\threads\{thread_id} + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithThread_ItemRequestBuilder : BaseRequestBuilder + { + /// The subscription property + public global::Ayllu.Github.Client.Notifications.Threads.Item.Subscription.SubscriptionRequestBuilder Subscription + { + get => new global::Ayllu.Github.Client.Notifications.Threads.Item.Subscription.SubscriptionRequestBuilder(PathParameters, RequestAdapter); + } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public WithThread_ItemRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/notifications/threads/{thread_id}", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public WithThread_ItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/notifications/threads/{thread_id}", rawUrl) + { + } + /// + /// Marks a thread as "done." Marking a thread as "done" is equivalent to marking a notification in your notification inbox on GitHub as done: https://github.com/notifications. + /// API method documentation + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task DeleteAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task DeleteAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToDeleteRequestInformation(requestConfiguration); + await RequestAdapter.SendNoContentAsync(requestInfo, default, cancellationToken).ConfigureAwait(false); + } + /// + /// Gets information about a notification thread. + /// API method documentation + /// + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 401 status code + /// When receiving a 403 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "401", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "403", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Models.ThreadObject.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// Marks a thread as "read." Marking a thread as "read" is equivalent to clicking a notification in your notification inbox on GitHub: https://github.com/notifications. + /// API method documentation + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 403 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PatchAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task PatchAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToPatchRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "403", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + }; + await RequestAdapter.SendNoContentAsync(requestInfo, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// Marks a thread as "done." Marking a thread as "done" is equivalent to marking a notification in your notification inbox on GitHub as done: https://github.com/notifications. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToDeleteRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToDeleteRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.DELETE, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + return requestInfo; + } + /// + /// Gets information about a notification thread. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Marks a thread as "read." Marking a thread as "read" is equivalent to clicking a notification in your notification inbox on GitHub: https://github.com/notifications. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPatchRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToPatchRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.Notifications.Threads.Item.WithThread_ItemRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Notifications.Threads.Item.WithThread_ItemRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithThread_ItemRequestBuilderDeleteRequestConfiguration : RequestConfiguration + { + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithThread_ItemRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithThread_ItemRequestBuilderPatchRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Notifications/Threads/ThreadsRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Notifications/Threads/ThreadsRequestBuilder.cs new file mode 100644 index 0000000..bae15d0 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Notifications/Threads/ThreadsRequestBuilder.cs @@ -0,0 +1,61 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Notifications.Threads.Item; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System; +namespace Ayllu.Github.Client.Notifications.Threads +{ + /// + /// Builds and executes requests for operations under \notifications\threads + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class ThreadsRequestBuilder : BaseRequestBuilder + { + /// Gets an item from the Ayllu.Github.Client.notifications.threads.item collection + /// The unique identifier of the notification thread. This corresponds to the value returned in the `id` field when you retrieve notifications (for example with the [`GET /notifications` operation](https://docs.github.com/rest/activity/notifications#list-notifications-for-the-authenticated-user)). + /// A + public global::Ayllu.Github.Client.Notifications.Threads.Item.WithThread_ItemRequestBuilder this[int position] + { + get + { + var urlTplParams = new Dictionary(PathParameters); + urlTplParams.Add("thread_id", position); + return new global::Ayllu.Github.Client.Notifications.Threads.Item.WithThread_ItemRequestBuilder(urlTplParams, RequestAdapter); + } + } + /// Gets an item from the Ayllu.Github.Client.notifications.threads.item collection + /// The unique identifier of the notification thread. This corresponds to the value returned in the `id` field when you retrieve notifications (for example with the [`GET /notifications` operation](https://docs.github.com/rest/activity/notifications#list-notifications-for-the-authenticated-user)). + /// A + [Obsolete("This indexer is deprecated and will be removed in the next major version. Use the one with the typed parameter instead.")] + public global::Ayllu.Github.Client.Notifications.Threads.Item.WithThread_ItemRequestBuilder this[string position] + { + get + { + var urlTplParams = new Dictionary(PathParameters); + if (!string.IsNullOrWhiteSpace(position)) urlTplParams.Add("thread_id", position); + return new global::Ayllu.Github.Client.Notifications.Threads.Item.WithThread_ItemRequestBuilder(urlTplParams, RequestAdapter); + } + } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public ThreadsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/notifications/threads", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public ThreadsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/notifications/threads", rawUrl) + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Octocat/OctocatRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Octocat/OctocatRequestBuilder.cs new file mode 100644 index 0000000..c6394f1 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Octocat/OctocatRequestBuilder.cs @@ -0,0 +1,109 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Octocat +{ + /// + /// Builds and executes requests for operations under \octocat + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class OctocatRequestBuilder : BaseRequestBuilder + { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public OctocatRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/octocat{?s*}", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public OctocatRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/octocat{?s*}", rawUrl) + { + } + /// + /// Get the octocat as ASCII art + /// API method documentation + /// + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + return await RequestAdapter.SendPrimitiveAsync(requestInfo, default, cancellationToken).ConfigureAwait(false); + } + /// + /// Get the octocat as ASCII art + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/octocat-stream"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.Octocat.OctocatRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Octocat.OctocatRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Get the octocat as ASCII art + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class OctocatRequestBuilderGetQueryParameters + { + /// The words to show in Octocat's speech bubble +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("s")] + public string? S { get; set; } +#nullable restore +#else + [QueryParameter("s")] + public string S { get; set; } +#endif + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class OctocatRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Organizations/Item/Dependabot/DependabotRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Organizations/Item/Dependabot/DependabotRequestBuilder.cs new file mode 100644 index 0000000..b7c9344 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Organizations/Item/Dependabot/DependabotRequestBuilder.cs @@ -0,0 +1,41 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Organizations.Item.Dependabot.RepositoryAccess; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System; +namespace Ayllu.Github.Client.Organizations.Item.Dependabot +{ + /// + /// Builds and executes requests for operations under \organizations\{org}\dependabot + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class DependabotRequestBuilder : BaseRequestBuilder + { + /// The repositoryAccess property + public global::Ayllu.Github.Client.Organizations.Item.Dependabot.RepositoryAccess.RepositoryAccessRequestBuilder RepositoryAccess + { + get => new global::Ayllu.Github.Client.Organizations.Item.Dependabot.RepositoryAccess.RepositoryAccessRequestBuilder(PathParameters, RequestAdapter); + } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public DependabotRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/organizations/{org}/dependabot", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public DependabotRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/organizations/{org}/dependabot", rawUrl) + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Organizations/Item/Dependabot/RepositoryAccess/DefaultLevel/DefaultLevelPutRequestBody.cs b/src/Ayllu.Github.Client/Github/Client/Organizations/Item/Dependabot/RepositoryAccess/DefaultLevel/DefaultLevelPutRequestBody.cs new file mode 100644 index 0000000..c42091d --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Organizations/Item/Dependabot/RepositoryAccess/DefaultLevel/DefaultLevelPutRequestBody.cs @@ -0,0 +1,59 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Organizations.Item.Dependabot.RepositoryAccess.DefaultLevel +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class DefaultLevelPutRequestBody : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The default repository access level for Dependabot updates. + public global::Ayllu.Github.Client.Organizations.Item.Dependabot.RepositoryAccess.DefaultLevel.DefaultLevelPutRequestBody_default_level? DefaultLevel { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public DefaultLevelPutRequestBody() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Organizations.Item.Dependabot.RepositoryAccess.DefaultLevel.DefaultLevelPutRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Organizations.Item.Dependabot.RepositoryAccess.DefaultLevel.DefaultLevelPutRequestBody(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "default_level", n => { DefaultLevel = n.GetEnumValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteEnumValue("default_level", DefaultLevel); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Organizations/Item/Dependabot/RepositoryAccess/DefaultLevel/DefaultLevelPutRequestBody_default_level.cs b/src/Ayllu.Github.Client/Github/Client/Organizations/Item/Dependabot/RepositoryAccess/DefaultLevel/DefaultLevelPutRequestBody_default_level.cs new file mode 100644 index 0000000..39ab804 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Organizations/Item/Dependabot/RepositoryAccess/DefaultLevel/DefaultLevelPutRequestBody_default_level.cs @@ -0,0 +1,19 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Organizations.Item.Dependabot.RepositoryAccess.DefaultLevel +{ + /// The default repository access level for Dependabot updates. + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public enum DefaultLevelPutRequestBody_default_level + { + [EnumMember(Value = "public")] + #pragma warning disable CS1591 + Public, + #pragma warning restore CS1591 + [EnumMember(Value = "internal")] + #pragma warning disable CS1591 + Internal, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Organizations/Item/Dependabot/RepositoryAccess/DefaultLevel/DefaultLevelRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Organizations/Item/Dependabot/RepositoryAccess/DefaultLevel/DefaultLevelRequestBuilder.cs new file mode 100644 index 0000000..57cc977 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Organizations/Item/Dependabot/RepositoryAccess/DefaultLevel/DefaultLevelRequestBuilder.cs @@ -0,0 +1,104 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Organizations.Item.Dependabot.RepositoryAccess.DefaultLevel +{ + /// + /// Builds and executes requests for operations under \organizations\{org}\dependabot\repository-access\default-level + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class DefaultLevelRequestBuilder : BaseRequestBuilder + { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public DefaultLevelRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/organizations/{org}/dependabot/repository-access/default-level", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public DefaultLevelRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/organizations/{org}/dependabot/repository-access/default-level", rawUrl) + { + } + /// + /// Sets the default level of repository access Dependabot will have while performing an update. Available values are:- 'public' - Dependabot will only have access to public repositories, unless access is explicitly granted to non-public repositories.- 'internal' - Dependabot will only have access to public and internal repositories, unless access is explicitly granted to private repositories.Unauthorized users will not see the existence of this endpoint.This operation supports both server-to-server and user-to-server access. + /// API method documentation + /// + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 403 status code + /// When receiving a 404 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PutAsync(global::Ayllu.Github.Client.Organizations.Item.Dependabot.RepositoryAccess.DefaultLevel.DefaultLevelPutRequestBody body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task PutAsync(global::Ayllu.Github.Client.Organizations.Item.Dependabot.RepositoryAccess.DefaultLevel.DefaultLevelPutRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPutRequestInformation(body, requestConfiguration); + var errorMapping = new Dictionary> + { + { "403", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "404", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + }; + await RequestAdapter.SendNoContentAsync(requestInfo, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// Sets the default level of repository access Dependabot will have while performing an update. Available values are:- 'public' - Dependabot will only have access to public repositories, unless access is explicitly granted to non-public repositories.- 'internal' - Dependabot will only have access to public and internal repositories, unless access is explicitly granted to private repositories.Unauthorized users will not see the existence of this endpoint.This operation supports both server-to-server and user-to-server access. + /// + /// A + /// The request body + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPutRequestInformation(global::Ayllu.Github.Client.Organizations.Item.Dependabot.RepositoryAccess.DefaultLevel.DefaultLevelPutRequestBody body, Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToPutRequestInformation(global::Ayllu.Github.Client.Organizations.Item.Dependabot.RepositoryAccess.DefaultLevel.DefaultLevelPutRequestBody body, Action> requestConfiguration = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation(Method.PUT, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.Organizations.Item.Dependabot.RepositoryAccess.DefaultLevel.DefaultLevelRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Organizations.Item.Dependabot.RepositoryAccess.DefaultLevel.DefaultLevelRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class DefaultLevelRequestBuilderPutRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Organizations/Item/Dependabot/RepositoryAccess/RepositoryAccessPatchRequestBody.cs b/src/Ayllu.Github.Client/Github/Client/Organizations/Item/Dependabot/RepositoryAccess/RepositoryAccessPatchRequestBody.cs new file mode 100644 index 0000000..74983f6 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Organizations/Item/Dependabot/RepositoryAccess/RepositoryAccessPatchRequestBody.cs @@ -0,0 +1,75 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Organizations.Item.Dependabot.RepositoryAccess +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class RepositoryAccessPatchRequestBody : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// List of repository IDs to add. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? RepositoryIdsToAdd { get; set; } +#nullable restore +#else + public List RepositoryIdsToAdd { get; set; } +#endif + /// List of repository IDs to remove. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? RepositoryIdsToRemove { get; set; } +#nullable restore +#else + public List RepositoryIdsToRemove { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public RepositoryAccessPatchRequestBody() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Organizations.Item.Dependabot.RepositoryAccess.RepositoryAccessPatchRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Organizations.Item.Dependabot.RepositoryAccess.RepositoryAccessPatchRequestBody(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "repository_ids_to_add", n => { RepositoryIdsToAdd = n.GetCollectionOfPrimitiveValues()?.AsList(); } }, + { "repository_ids_to_remove", n => { RepositoryIdsToRemove = n.GetCollectionOfPrimitiveValues()?.AsList(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteCollectionOfPrimitiveValues("repository_ids_to_add", RepositoryIdsToAdd); + writer.WriteCollectionOfPrimitiveValues("repository_ids_to_remove", RepositoryIdsToRemove); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Organizations/Item/Dependabot/RepositoryAccess/RepositoryAccessRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Organizations/Item/Dependabot/RepositoryAccess/RepositoryAccessRequestBuilder.cs new file mode 100644 index 0000000..2f373f6 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Organizations/Item/Dependabot/RepositoryAccess/RepositoryAccessRequestBuilder.cs @@ -0,0 +1,176 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Ayllu.Github.Client.Organizations.Item.Dependabot.RepositoryAccess.DefaultLevel; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Organizations.Item.Dependabot.RepositoryAccess +{ + /// + /// Builds and executes requests for operations under \organizations\{org}\dependabot\repository-access + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class RepositoryAccessRequestBuilder : BaseRequestBuilder + { + /// The defaultLevel property + public global::Ayllu.Github.Client.Organizations.Item.Dependabot.RepositoryAccess.DefaultLevel.DefaultLevelRequestBuilder DefaultLevel + { + get => new global::Ayllu.Github.Client.Organizations.Item.Dependabot.RepositoryAccess.DefaultLevel.DefaultLevelRequestBuilder(PathParameters, RequestAdapter); + } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public RepositoryAccessRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/organizations/{org}/dependabot/repository-access{?page*,per_page*}", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public RepositoryAccessRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/organizations/{org}/dependabot/repository-access{?page*,per_page*}", rawUrl) + { + } + /// + /// Lists repositories that organization admins have allowed Dependabot to access when updating dependencies.> [!NOTE]> This operation supports both server-to-server and user-to-server access.Unauthorized users will not see the existence of this endpoint. + /// API method documentation + /// + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 403 status code + /// When receiving a 404 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "403", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "404", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Models.DependabotRepositoryAccessDetails.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// Updates repositories according to the list of repositories that organization admins have given Dependabot access to when they've updated dependencies.> [!NOTE]> This operation supports both server-to-server and user-to-server access.Unauthorized users will not see the existence of this endpoint.**Example request body:**```json{ "repository_ids_to_add": [123, 456], "repository_ids_to_remove": [789]}``` + /// API method documentation + /// + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 403 status code + /// When receiving a 404 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PatchAsync(global::Ayllu.Github.Client.Organizations.Item.Dependabot.RepositoryAccess.RepositoryAccessPatchRequestBody body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task PatchAsync(global::Ayllu.Github.Client.Organizations.Item.Dependabot.RepositoryAccess.RepositoryAccessPatchRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPatchRequestInformation(body, requestConfiguration); + var errorMapping = new Dictionary> + { + { "403", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "404", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + }; + await RequestAdapter.SendNoContentAsync(requestInfo, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// Lists repositories that organization admins have allowed Dependabot to access when updating dependencies.> [!NOTE]> This operation supports both server-to-server and user-to-server access.Unauthorized users will not see the existence of this endpoint. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Updates repositories according to the list of repositories that organization admins have given Dependabot access to when they've updated dependencies.> [!NOTE]> This operation supports both server-to-server and user-to-server access.Unauthorized users will not see the existence of this endpoint.**Example request body:**```json{ "repository_ids_to_add": [123, 456], "repository_ids_to_remove": [789]}``` + /// + /// A + /// The request body + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPatchRequestInformation(global::Ayllu.Github.Client.Organizations.Item.Dependabot.RepositoryAccess.RepositoryAccessPatchRequestBody body, Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToPatchRequestInformation(global::Ayllu.Github.Client.Organizations.Item.Dependabot.RepositoryAccess.RepositoryAccessPatchRequestBody body, Action> requestConfiguration = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.Organizations.Item.Dependabot.RepositoryAccess.RepositoryAccessRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Organizations.Item.Dependabot.RepositoryAccess.RepositoryAccessRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Lists repositories that organization admins have allowed Dependabot to access when updating dependencies.> [!NOTE]> This operation supports both server-to-server and user-to-server access.Unauthorized users will not see the existence of this endpoint. + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class RepositoryAccessRequestBuilderGetQueryParameters + { + /// The page number of results to fetch. + [QueryParameter("page")] + public int? Page { get; set; } + /// Number of results per page. + [QueryParameter("per_page")] + public int? PerPage { get; set; } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class RepositoryAccessRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class RepositoryAccessRequestBuilderPatchRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Organizations/Item/Settings/Billing/BillingRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Organizations/Item/Settings/Billing/BillingRequestBuilder.cs new file mode 100644 index 0000000..78b1430 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Organizations/Item/Settings/Billing/BillingRequestBuilder.cs @@ -0,0 +1,41 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Organizations.Item.Settings.Billing.Usage; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System; +namespace Ayllu.Github.Client.Organizations.Item.Settings.Billing +{ + /// + /// Builds and executes requests for operations under \organizations\{org}\settings\billing + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class BillingRequestBuilder : BaseRequestBuilder + { + /// The usage property + public global::Ayllu.Github.Client.Organizations.Item.Settings.Billing.Usage.UsageRequestBuilder Usage + { + get => new global::Ayllu.Github.Client.Organizations.Item.Settings.Billing.Usage.UsageRequestBuilder(PathParameters, RequestAdapter); + } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public BillingRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/organizations/{org}/settings/billing", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public BillingRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/organizations/{org}/settings/billing", rawUrl) + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Organizations/Item/Settings/Billing/Usage/UsageRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Organizations/Item/Settings/Billing/Usage/UsageRequestBuilder.cs new file mode 100644 index 0000000..f438030 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Organizations/Item/Settings/Billing/Usage/UsageRequestBuilder.cs @@ -0,0 +1,123 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Organizations.Item.Settings.Billing.Usage +{ + /// + /// Builds and executes requests for operations under \organizations\{org}\settings\billing\usage + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class UsageRequestBuilder : BaseRequestBuilder + { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public UsageRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/organizations/{org}/settings/billing/usage{?day*,hour*,month*,year*}", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public UsageRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/organizations/{org}/settings/billing/usage{?day*,hour*,month*,year*}", rawUrl) + { + } + /// + /// Gets a report of the total usage for an organization. To use this endpoint, you must be an administrator of an organization within an enterprise or an organization account.**Note:** This endpoint is only available to organizations with access to the enhanced billing platform. For more information, see "[About the enhanced billing platform](https://docs.github.com/billing/using-the-new-billing-platform)." + /// API method documentation + /// + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 400 status code + /// When receiving a 403 status code + /// When receiving a 500 status code + /// When receiving a 503 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "400", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "403", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "500", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "503", global::Ayllu.Github.Client.Models.BillingUsageReport503Error.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Models.BillingUsageReport.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// Gets a report of the total usage for an organization. To use this endpoint, you must be an administrator of an organization within an enterprise or an organization account.**Note:** This endpoint is only available to organizations with access to the enhanced billing platform. For more information, see "[About the enhanced billing platform](https://docs.github.com/billing/using-the-new-billing-platform)." + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.Organizations.Item.Settings.Billing.Usage.UsageRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Organizations.Item.Settings.Billing.Usage.UsageRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Gets a report of the total usage for an organization. To use this endpoint, you must be an administrator of an organization within an enterprise or an organization account.**Note:** This endpoint is only available to organizations with access to the enhanced billing platform. For more information, see "[About the enhanced billing platform](https://docs.github.com/billing/using-the-new-billing-platform)." + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class UsageRequestBuilderGetQueryParameters + { + /// If specified, only return results for a single day. The value of `day` is an integer between `1` and `31`. If no `year` or `month` is specified, the default `year` and `month` are used. + [QueryParameter("day")] + public int? Day { get; set; } + /// If specified, only return results for a single hour. The value of `hour` is an integer between `0` and `23`. If no `year`, `month`, or `day` is specified, the default `year`, `month`, and `day` are used. + [QueryParameter("hour")] + public int? Hour { get; set; } + /// If specified, only return results for a single month. The value of `month` is an integer between `1` and `12`. If no year is specified the default `year` is used. + [QueryParameter("month")] + public int? Month { get; set; } + /// If specified, only return results for a single year. The value of `year` is an integer with four digits representing a year. For example, `2025`. Default value is the current year. + [QueryParameter("year")] + public int? Year { get; set; } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class UsageRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Organizations/Item/Settings/SettingsRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Organizations/Item/Settings/SettingsRequestBuilder.cs new file mode 100644 index 0000000..aa28349 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Organizations/Item/Settings/SettingsRequestBuilder.cs @@ -0,0 +1,41 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Organizations.Item.Settings.Billing; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System; +namespace Ayllu.Github.Client.Organizations.Item.Settings +{ + /// + /// Builds and executes requests for operations under \organizations\{org}\settings + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class SettingsRequestBuilder : BaseRequestBuilder + { + /// The billing property + public global::Ayllu.Github.Client.Organizations.Item.Settings.Billing.BillingRequestBuilder Billing + { + get => new global::Ayllu.Github.Client.Organizations.Item.Settings.Billing.BillingRequestBuilder(PathParameters, RequestAdapter); + } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public SettingsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/organizations/{org}/settings", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public SettingsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/organizations/{org}/settings", rawUrl) + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Organizations/Item/WithOrgItemRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Organizations/Item/WithOrgItemRequestBuilder.cs new file mode 100644 index 0000000..ace9285 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Organizations/Item/WithOrgItemRequestBuilder.cs @@ -0,0 +1,47 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Organizations.Item.Dependabot; +using Ayllu.Github.Client.Organizations.Item.Settings; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System; +namespace Ayllu.Github.Client.Organizations.Item +{ + /// + /// Builds and executes requests for operations under \organizations\{org} + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithOrgItemRequestBuilder : BaseRequestBuilder + { + /// The dependabot property + public global::Ayllu.Github.Client.Organizations.Item.Dependabot.DependabotRequestBuilder Dependabot + { + get => new global::Ayllu.Github.Client.Organizations.Item.Dependabot.DependabotRequestBuilder(PathParameters, RequestAdapter); + } + /// The settings property + public global::Ayllu.Github.Client.Organizations.Item.Settings.SettingsRequestBuilder Settings + { + get => new global::Ayllu.Github.Client.Organizations.Item.Settings.SettingsRequestBuilder(PathParameters, RequestAdapter); + } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public WithOrgItemRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/organizations/{org}", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public WithOrgItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/organizations/{org}", rawUrl) + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Organizations/OrganizationsRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Organizations/OrganizationsRequestBuilder.cs new file mode 100644 index 0000000..3c86ad1 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Organizations/OrganizationsRequestBuilder.cs @@ -0,0 +1,120 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Ayllu.Github.Client.Organizations.Item; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Organizations +{ + /// + /// Builds and executes requests for operations under \organizations + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class OrganizationsRequestBuilder : BaseRequestBuilder + { + /// Gets an item from the Ayllu.Github.Client.organizations.item collection + /// The organization name. The name is not case sensitive. + /// A + public global::Ayllu.Github.Client.Organizations.Item.WithOrgItemRequestBuilder this[string position] + { + get + { + var urlTplParams = new Dictionary(PathParameters); + urlTplParams.Add("org", position); + return new global::Ayllu.Github.Client.Organizations.Item.WithOrgItemRequestBuilder(urlTplParams, RequestAdapter); + } + } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public OrganizationsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/organizations{?per_page*,since*}", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public OrganizationsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/organizations{?per_page*,since*}", rawUrl) + { + } + /// + /// 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/rest/guides/using-pagination-in-the-rest-api#using-link-headers) to get the URL for the next page of organizations. + /// API method documentation + /// + /// A List<global::Ayllu.Github.Client.Models.OrganizationSimple> + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task?> GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task> GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var collectionResult = await RequestAdapter.SendCollectionAsync(requestInfo, global::Ayllu.Github.Client.Models.OrganizationSimple.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false); + return collectionResult?.AsList(); + } + /// + /// 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/rest/guides/using-pagination-in-the-rest-api#using-link-headers) to get the URL for the next page of organizations. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.Organizations.OrganizationsRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Organizations.OrganizationsRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// 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/rest/guides/using-pagination-in-the-rest-api#using-link-headers) to get the URL for the next page of organizations. + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class OrganizationsRequestBuilderGetQueryParameters + { + /// The number of results per page (max 100). For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." + [QueryParameter("per_page")] + public int? PerPage { get; set; } + /// An organization ID. Only return organizations with an ID greater than this ID. + [QueryParameter("since")] + public int? Since { get; set; } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class OrganizationsRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Actions/ActionsRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Actions/ActionsRequestBuilder.cs new file mode 100644 index 0000000..260a037 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Actions/ActionsRequestBuilder.cs @@ -0,0 +1,83 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Orgs.Item.Actions.Cache; +using Ayllu.Github.Client.Orgs.Item.Actions.HostedRunners; +using Ayllu.Github.Client.Orgs.Item.Actions.Oidc; +using Ayllu.Github.Client.Orgs.Item.Actions.Permissions; +using Ayllu.Github.Client.Orgs.Item.Actions.RunnerGroups; +using Ayllu.Github.Client.Orgs.Item.Actions.Runners; +using Ayllu.Github.Client.Orgs.Item.Actions.Secrets; +using Ayllu.Github.Client.Orgs.Item.Actions.Variables; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System; +namespace Ayllu.Github.Client.Orgs.Item.Actions +{ + /// + /// Builds and executes requests for operations under \orgs\{org}\actions + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class ActionsRequestBuilder : BaseRequestBuilder + { + /// The cache property + public global::Ayllu.Github.Client.Orgs.Item.Actions.Cache.CacheRequestBuilder Cache + { + get => new global::Ayllu.Github.Client.Orgs.Item.Actions.Cache.CacheRequestBuilder(PathParameters, RequestAdapter); + } + /// The hostedRunners property + public global::Ayllu.Github.Client.Orgs.Item.Actions.HostedRunners.HostedRunnersRequestBuilder HostedRunners + { + get => new global::Ayllu.Github.Client.Orgs.Item.Actions.HostedRunners.HostedRunnersRequestBuilder(PathParameters, RequestAdapter); + } + /// The oidc property + public global::Ayllu.Github.Client.Orgs.Item.Actions.Oidc.OidcRequestBuilder Oidc + { + get => new global::Ayllu.Github.Client.Orgs.Item.Actions.Oidc.OidcRequestBuilder(PathParameters, RequestAdapter); + } + /// The permissions property + public global::Ayllu.Github.Client.Orgs.Item.Actions.Permissions.PermissionsRequestBuilder Permissions + { + get => new global::Ayllu.Github.Client.Orgs.Item.Actions.Permissions.PermissionsRequestBuilder(PathParameters, RequestAdapter); + } + /// The runnerGroups property + public global::Ayllu.Github.Client.Orgs.Item.Actions.RunnerGroups.RunnerGroupsRequestBuilder RunnerGroups + { + get => new global::Ayllu.Github.Client.Orgs.Item.Actions.RunnerGroups.RunnerGroupsRequestBuilder(PathParameters, RequestAdapter); + } + /// The runners property + public global::Ayllu.Github.Client.Orgs.Item.Actions.Runners.RunnersRequestBuilder Runners + { + get => new global::Ayllu.Github.Client.Orgs.Item.Actions.Runners.RunnersRequestBuilder(PathParameters, RequestAdapter); + } + /// The secrets property + public global::Ayllu.Github.Client.Orgs.Item.Actions.Secrets.SecretsRequestBuilder Secrets + { + get => new global::Ayllu.Github.Client.Orgs.Item.Actions.Secrets.SecretsRequestBuilder(PathParameters, RequestAdapter); + } + /// The variables property + public global::Ayllu.Github.Client.Orgs.Item.Actions.Variables.VariablesRequestBuilder Variables + { + get => new global::Ayllu.Github.Client.Orgs.Item.Actions.Variables.VariablesRequestBuilder(PathParameters, RequestAdapter); + } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public ActionsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/orgs/{org}/actions", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public ActionsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/orgs/{org}/actions", rawUrl) + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Actions/Cache/CacheRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Actions/Cache/CacheRequestBuilder.cs new file mode 100644 index 0000000..aaeb6e9 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Actions/Cache/CacheRequestBuilder.cs @@ -0,0 +1,47 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Orgs.Item.Actions.Cache.Usage; +using Ayllu.Github.Client.Orgs.Item.Actions.Cache.UsageByRepository; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System; +namespace Ayllu.Github.Client.Orgs.Item.Actions.Cache +{ + /// + /// Builds and executes requests for operations under \orgs\{org}\actions\cache + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class CacheRequestBuilder : BaseRequestBuilder + { + /// The usage property + public global::Ayllu.Github.Client.Orgs.Item.Actions.Cache.Usage.UsageRequestBuilder Usage + { + get => new global::Ayllu.Github.Client.Orgs.Item.Actions.Cache.Usage.UsageRequestBuilder(PathParameters, RequestAdapter); + } + /// The usageByRepository property + public global::Ayllu.Github.Client.Orgs.Item.Actions.Cache.UsageByRepository.UsageByRepositoryRequestBuilder UsageByRepository + { + get => new global::Ayllu.Github.Client.Orgs.Item.Actions.Cache.UsageByRepository.UsageByRepositoryRequestBuilder(PathParameters, RequestAdapter); + } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public CacheRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/orgs/{org}/actions/cache", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public CacheRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/orgs/{org}/actions/cache", rawUrl) + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Actions/Cache/Usage/UsageRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Actions/Cache/Usage/UsageRequestBuilder.cs new file mode 100644 index 0000000..d71e007 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Actions/Cache/Usage/UsageRequestBuilder.cs @@ -0,0 +1,93 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Orgs.Item.Actions.Cache.Usage +{ + /// + /// Builds and executes requests for operations under \orgs\{org}\actions\cache\usage + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class UsageRequestBuilder : BaseRequestBuilder + { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public UsageRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/orgs/{org}/actions/cache/usage", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public UsageRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/orgs/{org}/actions/cache/usage", rawUrl) + { + } + /// + /// 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. + /// API method documentation + /// + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Models.ActionsCacheUsageOrgEnterprise.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false); + } + /// + /// 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. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.Orgs.Item.Actions.Cache.Usage.UsageRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Orgs.Item.Actions.Cache.Usage.UsageRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class UsageRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Actions/Cache/UsageByRepository/UsageByRepositoryGetResponse.cs b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Actions/Cache/UsageByRepository/UsageByRepositoryGetResponse.cs new file mode 100644 index 0000000..cd23603 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Actions/Cache/UsageByRepository/UsageByRepositoryGetResponse.cs @@ -0,0 +1,70 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Orgs.Item.Actions.Cache.UsageByRepository +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class UsageByRepositoryGetResponse : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The repository_cache_usages property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? RepositoryCacheUsages { get; set; } +#nullable restore +#else + public List RepositoryCacheUsages { get; set; } +#endif + /// The total_count property + public int? TotalCount { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public UsageByRepositoryGetResponse() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Orgs.Item.Actions.Cache.UsageByRepository.UsageByRepositoryGetResponse CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Orgs.Item.Actions.Cache.UsageByRepository.UsageByRepositoryGetResponse(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "repository_cache_usages", n => { RepositoryCacheUsages = n.GetCollectionOfObjectValues(global::Ayllu.Github.Client.Models.ActionsCacheUsageByRepository.CreateFromDiscriminatorValue)?.AsList(); } }, + { "total_count", n => { TotalCount = n.GetIntValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteCollectionOfObjectValues("repository_cache_usages", RepositoryCacheUsages); + writer.WriteIntValue("total_count", TotalCount); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Actions/Cache/UsageByRepository/UsageByRepositoryRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Actions/Cache/UsageByRepository/UsageByRepositoryRequestBuilder.cs new file mode 100644 index 0000000..6e66a14 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Actions/Cache/UsageByRepository/UsageByRepositoryRequestBuilder.cs @@ -0,0 +1,125 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Orgs.Item.Actions.Cache.UsageByRepository +{ + /// + /// Builds and executes requests for operations under \orgs\{org}\actions\cache\usage-by-repository + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class UsageByRepositoryRequestBuilder : BaseRequestBuilder + { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public UsageByRepositoryRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/orgs/{org}/actions/cache/usage-by-repository{?page*,per_page*}", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public UsageByRepositoryRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/orgs/{org}/actions/cache/usage-by-repository{?page*,per_page*}", rawUrl) + { + } + /// + /// 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. + /// API method documentation + /// + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsUsageByRepositoryGetResponseAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task GetAsUsageByRepositoryGetResponseAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Orgs.Item.Actions.Cache.UsageByRepository.UsageByRepositoryGetResponse.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false); + } + /// + /// 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. + /// API method documentation + /// + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + [Obsolete("This method is obsolete. Use GetAsUsageByRepositoryGetResponseAsync instead.")] +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Orgs.Item.Actions.Cache.UsageByRepository.UsageByRepositoryResponse.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false); + } + /// + /// 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. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.Orgs.Item.Actions.Cache.UsageByRepository.UsageByRepositoryRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Orgs.Item.Actions.Cache.UsageByRepository.UsageByRepositoryRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// 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. + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class UsageByRepositoryRequestBuilderGetQueryParameters + { + /// The page number of the results to fetch. For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." + [QueryParameter("page")] + public int? Page { get; set; } + /// The number of results per page (max 100). For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." + [QueryParameter("per_page")] + public int? PerPage { get; set; } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class UsageByRepositoryRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Actions/Cache/UsageByRepository/UsageByRepositoryResponse.cs b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Actions/Cache/UsageByRepository/UsageByRepositoryResponse.cs new file mode 100644 index 0000000..d08ecdb --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Actions/Cache/UsageByRepository/UsageByRepositoryResponse.cs @@ -0,0 +1,28 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Orgs.Item.Actions.Cache.UsageByRepository +{ + [Obsolete("This class is obsolete. Use UsageByRepositoryGetResponse instead.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class UsageByRepositoryResponse : global::Ayllu.Github.Client.Orgs.Item.Actions.Cache.UsageByRepository.UsageByRepositoryGetResponse, IParsable + #pragma warning restore CS1591 + { + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static new global::Ayllu.Github.Client.Orgs.Item.Actions.Cache.UsageByRepository.UsageByRepositoryResponse CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Orgs.Item.Actions.Cache.UsageByRepository.UsageByRepositoryResponse(); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Actions/HostedRunners/HostedRunnersGetResponse.cs b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Actions/HostedRunners/HostedRunnersGetResponse.cs new file mode 100644 index 0000000..0172b7e --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Actions/HostedRunners/HostedRunnersGetResponse.cs @@ -0,0 +1,70 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Orgs.Item.Actions.HostedRunners +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class HostedRunnersGetResponse : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The runners property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? Runners { get; set; } +#nullable restore +#else + public List Runners { get; set; } +#endif + /// The total_count property + public int? TotalCount { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public HostedRunnersGetResponse() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Orgs.Item.Actions.HostedRunners.HostedRunnersGetResponse CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Orgs.Item.Actions.HostedRunners.HostedRunnersGetResponse(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "runners", n => { Runners = n.GetCollectionOfObjectValues(global::Ayllu.Github.Client.Models.ActionsHostedRunner.CreateFromDiscriminatorValue)?.AsList(); } }, + { "total_count", n => { TotalCount = n.GetIntValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteCollectionOfObjectValues("runners", Runners); + writer.WriteIntValue("total_count", TotalCount); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Actions/HostedRunners/HostedRunnersPostRequestBody.cs b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Actions/HostedRunners/HostedRunnersPostRequestBody.cs new file mode 100644 index 0000000..7c3eb8c --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Actions/HostedRunners/HostedRunnersPostRequestBody.cs @@ -0,0 +1,97 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Orgs.Item.Actions.HostedRunners +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class HostedRunnersPostRequestBody : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// Whether this runner should be created with a static public IP. Note limit on account. To list limits on account, use `GET actions/hosted-runners/limits` + public bool? EnableStaticIp { get; set; } + /// The image of runner. To list all available images, use `GET /actions/hosted-runners/images/github-owned` or `GET /actions/hosted-runners/images/partner`. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Orgs.Item.Actions.HostedRunners.HostedRunnersPostRequestBody_image? Image { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Orgs.Item.Actions.HostedRunners.HostedRunnersPostRequestBody_image Image { get; set; } +#endif + /// The maximum amount of runners to scale up to. Runners will not auto-scale above this number. Use this setting to limit your cost. + public int? MaximumRunners { get; set; } + /// Name of the runner. Must be between 1 and 64 characters and may only contain upper and lowercase letters a-z, numbers 0-9, '.', '-', and '_'. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Name { get; set; } +#nullable restore +#else + public string Name { get; set; } +#endif + /// The existing runner group to add this runner to. + public int? RunnerGroupId { get; set; } + /// The machine size of the runner. To list available sizes, use `GET actions/hosted-runners/machine-sizes` +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Size { get; set; } +#nullable restore +#else + public string Size { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public HostedRunnersPostRequestBody() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Orgs.Item.Actions.HostedRunners.HostedRunnersPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Orgs.Item.Actions.HostedRunners.HostedRunnersPostRequestBody(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "enable_static_ip", n => { EnableStaticIp = n.GetBoolValue(); } }, + { "image", n => { Image = n.GetObjectValue(global::Ayllu.Github.Client.Orgs.Item.Actions.HostedRunners.HostedRunnersPostRequestBody_image.CreateFromDiscriminatorValue); } }, + { "maximum_runners", n => { MaximumRunners = n.GetIntValue(); } }, + { "name", n => { Name = n.GetStringValue(); } }, + { "runner_group_id", n => { RunnerGroupId = n.GetIntValue(); } }, + { "size", n => { Size = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteBoolValue("enable_static_ip", EnableStaticIp); + writer.WriteObjectValue("image", Image); + writer.WriteIntValue("maximum_runners", MaximumRunners); + writer.WriteStringValue("name", Name); + writer.WriteIntValue("runner_group_id", RunnerGroupId); + writer.WriteStringValue("size", Size); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Actions/HostedRunners/HostedRunnersPostRequestBody_image.cs b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Actions/HostedRunners/HostedRunnersPostRequestBody_image.cs new file mode 100644 index 0000000..0786870 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Actions/HostedRunners/HostedRunnersPostRequestBody_image.cs @@ -0,0 +1,70 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Orgs.Item.Actions.HostedRunners +{ + /// + /// The image of runner. To list all available images, use `GET /actions/hosted-runners/images/github-owned` or `GET /actions/hosted-runners/images/partner`. + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class HostedRunnersPostRequestBody_image : IAdditionalDataHolder, IParsable + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The unique identifier of the runner image. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Id { get; set; } +#nullable restore +#else + public string Id { get; set; } +#endif + /// The source of the runner image. + public global::Ayllu.Github.Client.Orgs.Item.Actions.HostedRunners.HostedRunnersPostRequestBody_image_source? Source { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public HostedRunnersPostRequestBody_image() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Orgs.Item.Actions.HostedRunners.HostedRunnersPostRequestBody_image CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Orgs.Item.Actions.HostedRunners.HostedRunnersPostRequestBody_image(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "id", n => { Id = n.GetStringValue(); } }, + { "source", n => { Source = n.GetEnumValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("id", Id); + writer.WriteEnumValue("source", Source); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Actions/HostedRunners/HostedRunnersPostRequestBody_image_source.cs b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Actions/HostedRunners/HostedRunnersPostRequestBody_image_source.cs new file mode 100644 index 0000000..f4c4488 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Actions/HostedRunners/HostedRunnersPostRequestBody_image_source.cs @@ -0,0 +1,23 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Orgs.Item.Actions.HostedRunners +{ + /// The source of the runner image. + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public enum HostedRunnersPostRequestBody_image_source + { + [EnumMember(Value = "github")] + #pragma warning disable CS1591 + Github, + #pragma warning restore CS1591 + [EnumMember(Value = "partner")] + #pragma warning disable CS1591 + Partner, + #pragma warning restore CS1591 + [EnumMember(Value = "custom")] + #pragma warning disable CS1591 + Custom, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Actions/HostedRunners/HostedRunnersRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Actions/HostedRunners/HostedRunnersRequestBuilder.cs new file mode 100644 index 0000000..7e56b9e --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Actions/HostedRunners/HostedRunnersRequestBuilder.cs @@ -0,0 +1,227 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Ayllu.Github.Client.Orgs.Item.Actions.HostedRunners.Images; +using Ayllu.Github.Client.Orgs.Item.Actions.HostedRunners.Item; +using Ayllu.Github.Client.Orgs.Item.Actions.HostedRunners.Limits; +using Ayllu.Github.Client.Orgs.Item.Actions.HostedRunners.MachineSizes; +using Ayllu.Github.Client.Orgs.Item.Actions.HostedRunners.Platforms; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Orgs.Item.Actions.HostedRunners +{ + /// + /// Builds and executes requests for operations under \orgs\{org}\actions\hosted-runners + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class HostedRunnersRequestBuilder : BaseRequestBuilder + { + /// The images property + public global::Ayllu.Github.Client.Orgs.Item.Actions.HostedRunners.Images.ImagesRequestBuilder Images + { + get => new global::Ayllu.Github.Client.Orgs.Item.Actions.HostedRunners.Images.ImagesRequestBuilder(PathParameters, RequestAdapter); + } + /// The limits property + public global::Ayllu.Github.Client.Orgs.Item.Actions.HostedRunners.Limits.LimitsRequestBuilder Limits + { + get => new global::Ayllu.Github.Client.Orgs.Item.Actions.HostedRunners.Limits.LimitsRequestBuilder(PathParameters, RequestAdapter); + } + /// The machineSizes property + public global::Ayllu.Github.Client.Orgs.Item.Actions.HostedRunners.MachineSizes.MachineSizesRequestBuilder MachineSizes + { + get => new global::Ayllu.Github.Client.Orgs.Item.Actions.HostedRunners.MachineSizes.MachineSizesRequestBuilder(PathParameters, RequestAdapter); + } + /// The platforms property + public global::Ayllu.Github.Client.Orgs.Item.Actions.HostedRunners.Platforms.PlatformsRequestBuilder Platforms + { + get => new global::Ayllu.Github.Client.Orgs.Item.Actions.HostedRunners.Platforms.PlatformsRequestBuilder(PathParameters, RequestAdapter); + } + /// Gets an item from the Ayllu.Github.Client.orgs.item.actions.hostedRunners.item collection + /// Unique identifier of the GitHub-hosted runner. + /// A + public global::Ayllu.Github.Client.Orgs.Item.Actions.HostedRunners.Item.WithHosted_runner_ItemRequestBuilder this[int position] + { + get + { + var urlTplParams = new Dictionary(PathParameters); + urlTplParams.Add("hosted_runner_id", position); + return new global::Ayllu.Github.Client.Orgs.Item.Actions.HostedRunners.Item.WithHosted_runner_ItemRequestBuilder(urlTplParams, RequestAdapter); + } + } + /// Gets an item from the Ayllu.Github.Client.orgs.item.actions.hostedRunners.item collection + /// Unique identifier of the GitHub-hosted runner. + /// A + [Obsolete("This indexer is deprecated and will be removed in the next major version. Use the one with the typed parameter instead.")] + public global::Ayllu.Github.Client.Orgs.Item.Actions.HostedRunners.Item.WithHosted_runner_ItemRequestBuilder this[string position] + { + get + { + var urlTplParams = new Dictionary(PathParameters); + if (!string.IsNullOrWhiteSpace(position)) urlTplParams.Add("hosted_runner_id", position); + return new global::Ayllu.Github.Client.Orgs.Item.Actions.HostedRunners.Item.WithHosted_runner_ItemRequestBuilder(urlTplParams, RequestAdapter); + } + } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public HostedRunnersRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/orgs/{org}/actions/hosted-runners{?page*,per_page*}", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public HostedRunnersRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/orgs/{org}/actions/hosted-runners{?page*,per_page*}", rawUrl) + { + } + /// + /// Lists all GitHub-hosted runners configured in an organization.OAuth app tokens and personal access tokens (classic) need the `manage_runner:org` scope to use this endpoint. + /// API method documentation + /// + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsHostedRunnersGetResponseAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task GetAsHostedRunnersGetResponseAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Orgs.Item.Actions.HostedRunners.HostedRunnersGetResponse.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false); + } + /// + /// Lists all GitHub-hosted runners configured in an organization.OAuth app tokens and personal access tokens (classic) need the `manage_runner:org` scope to use this endpoint. + /// API method documentation + /// + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + [Obsolete("This method is obsolete. Use GetAsHostedRunnersGetResponseAsync instead.")] +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Orgs.Item.Actions.HostedRunners.HostedRunnersResponse.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false); + } + /// + /// Creates a GitHub-hosted runner for an organization.OAuth tokens and personal access tokens (classic) need the `manage_runners:org` scope to use this endpoint. + /// API method documentation + /// + /// A + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PostAsync(global::Ayllu.Github.Client.Orgs.Item.Actions.HostedRunners.HostedRunnersPostRequestBody body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task PostAsync(global::Ayllu.Github.Client.Orgs.Item.Actions.HostedRunners.HostedRunnersPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPostRequestInformation(body, requestConfiguration); + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Models.ActionsHostedRunner.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false); + } + /// + /// Lists all GitHub-hosted runners configured in an organization.OAuth app tokens and personal access tokens (classic) need the `manage_runner:org` scope to use this endpoint. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Creates a GitHub-hosted runner for an organization.OAuth tokens and personal access tokens (classic) need the `manage_runners:org` scope to use this endpoint. + /// + /// A + /// The request body + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPostRequestInformation(global::Ayllu.Github.Client.Orgs.Item.Actions.HostedRunners.HostedRunnersPostRequestBody body, Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToPostRequestInformation(global::Ayllu.Github.Client.Orgs.Item.Actions.HostedRunners.HostedRunnersPostRequestBody body, Action> requestConfiguration = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.Orgs.Item.Actions.HostedRunners.HostedRunnersRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Orgs.Item.Actions.HostedRunners.HostedRunnersRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Lists all GitHub-hosted runners configured in an organization.OAuth app tokens and personal access tokens (classic) need the `manage_runner:org` scope to use this endpoint. + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class HostedRunnersRequestBuilderGetQueryParameters + { + /// The page number of the results to fetch. For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." + [QueryParameter("page")] + public int? Page { get; set; } + /// The number of results per page (max 100). For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." + [QueryParameter("per_page")] + public int? PerPage { get; set; } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class HostedRunnersRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class HostedRunnersRequestBuilderPostRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Actions/HostedRunners/HostedRunnersResponse.cs b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Actions/HostedRunners/HostedRunnersResponse.cs new file mode 100644 index 0000000..0c286a4 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Actions/HostedRunners/HostedRunnersResponse.cs @@ -0,0 +1,28 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Orgs.Item.Actions.HostedRunners +{ + [Obsolete("This class is obsolete. Use HostedRunnersGetResponse instead.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class HostedRunnersResponse : global::Ayllu.Github.Client.Orgs.Item.Actions.HostedRunners.HostedRunnersGetResponse, IParsable + #pragma warning restore CS1591 + { + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static new global::Ayllu.Github.Client.Orgs.Item.Actions.HostedRunners.HostedRunnersResponse CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Orgs.Item.Actions.HostedRunners.HostedRunnersResponse(); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Actions/HostedRunners/Images/GithubOwned/GithubOwnedGetResponse.cs b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Actions/HostedRunners/Images/GithubOwned/GithubOwnedGetResponse.cs new file mode 100644 index 0000000..dca1972 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Actions/HostedRunners/Images/GithubOwned/GithubOwnedGetResponse.cs @@ -0,0 +1,70 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Orgs.Item.Actions.HostedRunners.Images.GithubOwned +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class GithubOwnedGetResponse : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The images property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? Images { get; set; } +#nullable restore +#else + public List Images { get; set; } +#endif + /// The total_count property + public int? TotalCount { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public GithubOwnedGetResponse() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Orgs.Item.Actions.HostedRunners.Images.GithubOwned.GithubOwnedGetResponse CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Orgs.Item.Actions.HostedRunners.Images.GithubOwned.GithubOwnedGetResponse(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "images", n => { Images = n.GetCollectionOfObjectValues(global::Ayllu.Github.Client.Models.ActionsHostedRunnerImage.CreateFromDiscriminatorValue)?.AsList(); } }, + { "total_count", n => { TotalCount = n.GetIntValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteCollectionOfObjectValues("images", Images); + writer.WriteIntValue("total_count", TotalCount); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Actions/HostedRunners/Images/GithubOwned/GithubOwnedRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Actions/HostedRunners/Images/GithubOwned/GithubOwnedRequestBuilder.cs new file mode 100644 index 0000000..7e1d593 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Actions/HostedRunners/Images/GithubOwned/GithubOwnedRequestBuilder.cs @@ -0,0 +1,112 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Orgs.Item.Actions.HostedRunners.Images.GithubOwned +{ + /// + /// Builds and executes requests for operations under \orgs\{org}\actions\hosted-runners\images\github-owned + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class GithubOwnedRequestBuilder : BaseRequestBuilder + { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public GithubOwnedRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/orgs/{org}/actions/hosted-runners/images/github-owned", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public GithubOwnedRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/orgs/{org}/actions/hosted-runners/images/github-owned", rawUrl) + { + } + /// + /// Get the list of GitHub-owned images available for GitHub-hosted runners for an organization. + /// API method documentation + /// + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsGithubOwnedGetResponseAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task GetAsGithubOwnedGetResponseAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Orgs.Item.Actions.HostedRunners.Images.GithubOwned.GithubOwnedGetResponse.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false); + } + /// + /// Get the list of GitHub-owned images available for GitHub-hosted runners for an organization. + /// API method documentation + /// + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + [Obsolete("This method is obsolete. Use GetAsGithubOwnedGetResponseAsync instead.")] +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Orgs.Item.Actions.HostedRunners.Images.GithubOwned.GithubOwnedResponse.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false); + } + /// + /// Get the list of GitHub-owned images available for GitHub-hosted runners for an organization. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.Orgs.Item.Actions.HostedRunners.Images.GithubOwned.GithubOwnedRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Orgs.Item.Actions.HostedRunners.Images.GithubOwned.GithubOwnedRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class GithubOwnedRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Actions/HostedRunners/Images/GithubOwned/GithubOwnedResponse.cs b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Actions/HostedRunners/Images/GithubOwned/GithubOwnedResponse.cs new file mode 100644 index 0000000..ef7516c --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Actions/HostedRunners/Images/GithubOwned/GithubOwnedResponse.cs @@ -0,0 +1,28 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Orgs.Item.Actions.HostedRunners.Images.GithubOwned +{ + [Obsolete("This class is obsolete. Use GithubOwnedGetResponse instead.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class GithubOwnedResponse : global::Ayllu.Github.Client.Orgs.Item.Actions.HostedRunners.Images.GithubOwned.GithubOwnedGetResponse, IParsable + #pragma warning restore CS1591 + { + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static new global::Ayllu.Github.Client.Orgs.Item.Actions.HostedRunners.Images.GithubOwned.GithubOwnedResponse CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Orgs.Item.Actions.HostedRunners.Images.GithubOwned.GithubOwnedResponse(); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Actions/HostedRunners/Images/ImagesRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Actions/HostedRunners/Images/ImagesRequestBuilder.cs new file mode 100644 index 0000000..ede8d40 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Actions/HostedRunners/Images/ImagesRequestBuilder.cs @@ -0,0 +1,47 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Orgs.Item.Actions.HostedRunners.Images.GithubOwned; +using Ayllu.Github.Client.Orgs.Item.Actions.HostedRunners.Images.Partner; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System; +namespace Ayllu.Github.Client.Orgs.Item.Actions.HostedRunners.Images +{ + /// + /// Builds and executes requests for operations under \orgs\{org}\actions\hosted-runners\images + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class ImagesRequestBuilder : BaseRequestBuilder + { + /// The githubOwned property + public global::Ayllu.Github.Client.Orgs.Item.Actions.HostedRunners.Images.GithubOwned.GithubOwnedRequestBuilder GithubOwned + { + get => new global::Ayllu.Github.Client.Orgs.Item.Actions.HostedRunners.Images.GithubOwned.GithubOwnedRequestBuilder(PathParameters, RequestAdapter); + } + /// The partner property + public global::Ayllu.Github.Client.Orgs.Item.Actions.HostedRunners.Images.Partner.PartnerRequestBuilder Partner + { + get => new global::Ayllu.Github.Client.Orgs.Item.Actions.HostedRunners.Images.Partner.PartnerRequestBuilder(PathParameters, RequestAdapter); + } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public ImagesRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/orgs/{org}/actions/hosted-runners/images", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public ImagesRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/orgs/{org}/actions/hosted-runners/images", rawUrl) + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Actions/HostedRunners/Images/Partner/PartnerGetResponse.cs b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Actions/HostedRunners/Images/Partner/PartnerGetResponse.cs new file mode 100644 index 0000000..024cfbd --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Actions/HostedRunners/Images/Partner/PartnerGetResponse.cs @@ -0,0 +1,70 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Orgs.Item.Actions.HostedRunners.Images.Partner +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class PartnerGetResponse : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The images property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? Images { get; set; } +#nullable restore +#else + public List Images { get; set; } +#endif + /// The total_count property + public int? TotalCount { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public PartnerGetResponse() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Orgs.Item.Actions.HostedRunners.Images.Partner.PartnerGetResponse CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Orgs.Item.Actions.HostedRunners.Images.Partner.PartnerGetResponse(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "images", n => { Images = n.GetCollectionOfObjectValues(global::Ayllu.Github.Client.Models.ActionsHostedRunnerImage.CreateFromDiscriminatorValue)?.AsList(); } }, + { "total_count", n => { TotalCount = n.GetIntValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteCollectionOfObjectValues("images", Images); + writer.WriteIntValue("total_count", TotalCount); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Actions/HostedRunners/Images/Partner/PartnerRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Actions/HostedRunners/Images/Partner/PartnerRequestBuilder.cs new file mode 100644 index 0000000..71233bb --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Actions/HostedRunners/Images/Partner/PartnerRequestBuilder.cs @@ -0,0 +1,112 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Orgs.Item.Actions.HostedRunners.Images.Partner +{ + /// + /// Builds and executes requests for operations under \orgs\{org}\actions\hosted-runners\images\partner + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class PartnerRequestBuilder : BaseRequestBuilder + { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public PartnerRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/orgs/{org}/actions/hosted-runners/images/partner", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public PartnerRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/orgs/{org}/actions/hosted-runners/images/partner", rawUrl) + { + } + /// + /// Get the list of partner images available for GitHub-hosted runners for an organization. + /// API method documentation + /// + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsPartnerGetResponseAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task GetAsPartnerGetResponseAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Orgs.Item.Actions.HostedRunners.Images.Partner.PartnerGetResponse.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false); + } + /// + /// Get the list of partner images available for GitHub-hosted runners for an organization. + /// API method documentation + /// + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + [Obsolete("This method is obsolete. Use GetAsPartnerGetResponseAsync instead.")] +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Orgs.Item.Actions.HostedRunners.Images.Partner.PartnerResponse.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false); + } + /// + /// Get the list of partner images available for GitHub-hosted runners for an organization. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.Orgs.Item.Actions.HostedRunners.Images.Partner.PartnerRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Orgs.Item.Actions.HostedRunners.Images.Partner.PartnerRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class PartnerRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Actions/HostedRunners/Images/Partner/PartnerResponse.cs b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Actions/HostedRunners/Images/Partner/PartnerResponse.cs new file mode 100644 index 0000000..38e6f07 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Actions/HostedRunners/Images/Partner/PartnerResponse.cs @@ -0,0 +1,28 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Orgs.Item.Actions.HostedRunners.Images.Partner +{ + [Obsolete("This class is obsolete. Use PartnerGetResponse instead.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class PartnerResponse : global::Ayllu.Github.Client.Orgs.Item.Actions.HostedRunners.Images.Partner.PartnerGetResponse, IParsable + #pragma warning restore CS1591 + { + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static new global::Ayllu.Github.Client.Orgs.Item.Actions.HostedRunners.Images.Partner.PartnerResponse CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Orgs.Item.Actions.HostedRunners.Images.Partner.PartnerResponse(); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Actions/HostedRunners/Item/WithHosted_runner_ItemRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Actions/HostedRunners/Item/WithHosted_runner_ItemRequestBuilder.cs new file mode 100644 index 0000000..ea97cfe --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Actions/HostedRunners/Item/WithHosted_runner_ItemRequestBuilder.cs @@ -0,0 +1,190 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Orgs.Item.Actions.HostedRunners.Item +{ + /// + /// Builds and executes requests for operations under \orgs\{org}\actions\hosted-runners\{hosted_runner_id} + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithHosted_runner_ItemRequestBuilder : BaseRequestBuilder + { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public WithHosted_runner_ItemRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/orgs/{org}/actions/hosted-runners/{hosted_runner_id}", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public WithHosted_runner_ItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/orgs/{org}/actions/hosted-runners/{hosted_runner_id}", rawUrl) + { + } + /// + /// Deletes a GitHub-hosted runner for an organization. + /// API method documentation + /// + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task DeleteAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task DeleteAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToDeleteRequestInformation(requestConfiguration); + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Models.ActionsHostedRunner.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false); + } + /// + /// Gets a GitHub-hosted runner configured in an organization.OAuth app tokens and personal access tokens (classic) need the `manage_runners:org` scope to use this endpoint. + /// API method documentation + /// + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Models.ActionsHostedRunner.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false); + } + /// + /// Updates a GitHub-hosted runner for an organization.OAuth app tokens and personal access tokens (classic) need the `manage_runners:org` scope to use this endpoint. + /// API method documentation + /// + /// A + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PatchAsync(global::Ayllu.Github.Client.Orgs.Item.Actions.HostedRunners.Item.WithHosted_runner_PatchRequestBody body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task PatchAsync(global::Ayllu.Github.Client.Orgs.Item.Actions.HostedRunners.Item.WithHosted_runner_PatchRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPatchRequestInformation(body, requestConfiguration); + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Models.ActionsHostedRunner.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false); + } + /// + /// Deletes a GitHub-hosted runner for an organization. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToDeleteRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToDeleteRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.DELETE, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Gets a GitHub-hosted runner configured in an organization.OAuth app tokens and personal access tokens (classic) need the `manage_runners:org` scope to use this endpoint. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Updates a GitHub-hosted runner for an organization.OAuth app tokens and personal access tokens (classic) need the `manage_runners:org` scope to use this endpoint. + /// + /// A + /// The request body + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPatchRequestInformation(global::Ayllu.Github.Client.Orgs.Item.Actions.HostedRunners.Item.WithHosted_runner_PatchRequestBody body, Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToPatchRequestInformation(global::Ayllu.Github.Client.Orgs.Item.Actions.HostedRunners.Item.WithHosted_runner_PatchRequestBody body, Action> requestConfiguration = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.Orgs.Item.Actions.HostedRunners.Item.WithHosted_runner_ItemRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Orgs.Item.Actions.HostedRunners.Item.WithHosted_runner_ItemRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithHosted_runner_ItemRequestBuilderDeleteRequestConfiguration : RequestConfiguration + { + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithHosted_runner_ItemRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithHosted_runner_ItemRequestBuilderPatchRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Actions/HostedRunners/Item/WithHosted_runner_PatchRequestBody.cs b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Actions/HostedRunners/Item/WithHosted_runner_PatchRequestBody.cs new file mode 100644 index 0000000..114c52d --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Actions/HostedRunners/Item/WithHosted_runner_PatchRequestBody.cs @@ -0,0 +1,77 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Orgs.Item.Actions.HostedRunners.Item +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class WithHosted_runner_PatchRequestBody : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// Whether this runner should be updated with a static public IP. Note limit on account. To list limits on account, use `GET actions/hosted-runners/limits` + public bool? EnableStaticIp { get; set; } + /// The maximum amount of runners to scale up to. Runners will not auto-scale above this number. Use this setting to limit your cost. + public int? MaximumRunners { get; set; } + /// Name of the runner. Must be between 1 and 64 characters and may only contain upper and lowercase letters a-z, numbers 0-9, '.', '-', and '_'. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Name { get; set; } +#nullable restore +#else + public string Name { get; set; } +#endif + /// The existing runner group to add this runner to. + public int? RunnerGroupId { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public WithHosted_runner_PatchRequestBody() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Orgs.Item.Actions.HostedRunners.Item.WithHosted_runner_PatchRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Orgs.Item.Actions.HostedRunners.Item.WithHosted_runner_PatchRequestBody(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "enable_static_ip", n => { EnableStaticIp = n.GetBoolValue(); } }, + { "maximum_runners", n => { MaximumRunners = n.GetIntValue(); } }, + { "name", n => { Name = n.GetStringValue(); } }, + { "runner_group_id", n => { RunnerGroupId = n.GetIntValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteBoolValue("enable_static_ip", EnableStaticIp); + writer.WriteIntValue("maximum_runners", MaximumRunners); + writer.WriteStringValue("name", Name); + writer.WriteIntValue("runner_group_id", RunnerGroupId); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Actions/HostedRunners/Limits/LimitsRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Actions/HostedRunners/Limits/LimitsRequestBuilder.cs new file mode 100644 index 0000000..cae4a5f --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Actions/HostedRunners/Limits/LimitsRequestBuilder.cs @@ -0,0 +1,93 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Orgs.Item.Actions.HostedRunners.Limits +{ + /// + /// Builds and executes requests for operations under \orgs\{org}\actions\hosted-runners\limits + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class LimitsRequestBuilder : BaseRequestBuilder + { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public LimitsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/orgs/{org}/actions/hosted-runners/limits", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public LimitsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/orgs/{org}/actions/hosted-runners/limits", rawUrl) + { + } + /// + /// Get the GitHub-hosted runners limits for an organization. + /// API method documentation + /// + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Models.ActionsHostedRunnerLimits.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false); + } + /// + /// Get the GitHub-hosted runners limits for an organization. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.Orgs.Item.Actions.HostedRunners.Limits.LimitsRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Orgs.Item.Actions.HostedRunners.Limits.LimitsRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class LimitsRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Actions/HostedRunners/MachineSizes/MachineSizesGetResponse.cs b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Actions/HostedRunners/MachineSizes/MachineSizesGetResponse.cs new file mode 100644 index 0000000..55c394b --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Actions/HostedRunners/MachineSizes/MachineSizesGetResponse.cs @@ -0,0 +1,70 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Orgs.Item.Actions.HostedRunners.MachineSizes +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class MachineSizesGetResponse : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The machine_specs property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? MachineSpecs { get; set; } +#nullable restore +#else + public List MachineSpecs { get; set; } +#endif + /// The total_count property + public int? TotalCount { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public MachineSizesGetResponse() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Orgs.Item.Actions.HostedRunners.MachineSizes.MachineSizesGetResponse CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Orgs.Item.Actions.HostedRunners.MachineSizes.MachineSizesGetResponse(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "machine_specs", n => { MachineSpecs = n.GetCollectionOfObjectValues(global::Ayllu.Github.Client.Models.ActionsHostedRunnerMachineSpec.CreateFromDiscriminatorValue)?.AsList(); } }, + { "total_count", n => { TotalCount = n.GetIntValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteCollectionOfObjectValues("machine_specs", MachineSpecs); + writer.WriteIntValue("total_count", TotalCount); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Actions/HostedRunners/MachineSizes/MachineSizesRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Actions/HostedRunners/MachineSizes/MachineSizesRequestBuilder.cs new file mode 100644 index 0000000..f1feb12 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Actions/HostedRunners/MachineSizes/MachineSizesRequestBuilder.cs @@ -0,0 +1,112 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Orgs.Item.Actions.HostedRunners.MachineSizes +{ + /// + /// Builds and executes requests for operations under \orgs\{org}\actions\hosted-runners\machine-sizes + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class MachineSizesRequestBuilder : BaseRequestBuilder + { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public MachineSizesRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/orgs/{org}/actions/hosted-runners/machine-sizes", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public MachineSizesRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/orgs/{org}/actions/hosted-runners/machine-sizes", rawUrl) + { + } + /// + /// Get the list of machine specs available for GitHub-hosted runners for an organization. + /// API method documentation + /// + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsMachineSizesGetResponseAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task GetAsMachineSizesGetResponseAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Orgs.Item.Actions.HostedRunners.MachineSizes.MachineSizesGetResponse.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false); + } + /// + /// Get the list of machine specs available for GitHub-hosted runners for an organization. + /// API method documentation + /// + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + [Obsolete("This method is obsolete. Use GetAsMachineSizesGetResponseAsync instead.")] +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Orgs.Item.Actions.HostedRunners.MachineSizes.MachineSizesResponse.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false); + } + /// + /// Get the list of machine specs available for GitHub-hosted runners for an organization. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.Orgs.Item.Actions.HostedRunners.MachineSizes.MachineSizesRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Orgs.Item.Actions.HostedRunners.MachineSizes.MachineSizesRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class MachineSizesRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Actions/HostedRunners/MachineSizes/MachineSizesResponse.cs b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Actions/HostedRunners/MachineSizes/MachineSizesResponse.cs new file mode 100644 index 0000000..f8b1973 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Actions/HostedRunners/MachineSizes/MachineSizesResponse.cs @@ -0,0 +1,28 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Orgs.Item.Actions.HostedRunners.MachineSizes +{ + [Obsolete("This class is obsolete. Use MachineSizesGetResponse instead.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class MachineSizesResponse : global::Ayllu.Github.Client.Orgs.Item.Actions.HostedRunners.MachineSizes.MachineSizesGetResponse, IParsable + #pragma warning restore CS1591 + { + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static new global::Ayllu.Github.Client.Orgs.Item.Actions.HostedRunners.MachineSizes.MachineSizesResponse CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Orgs.Item.Actions.HostedRunners.MachineSizes.MachineSizesResponse(); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Actions/HostedRunners/Platforms/PlatformsGetResponse.cs b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Actions/HostedRunners/Platforms/PlatformsGetResponse.cs new file mode 100644 index 0000000..accbd99 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Actions/HostedRunners/Platforms/PlatformsGetResponse.cs @@ -0,0 +1,69 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Orgs.Item.Actions.HostedRunners.Platforms +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class PlatformsGetResponse : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The platforms property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? Platforms { get; set; } +#nullable restore +#else + public List Platforms { get; set; } +#endif + /// The total_count property + public int? TotalCount { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public PlatformsGetResponse() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Orgs.Item.Actions.HostedRunners.Platforms.PlatformsGetResponse CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Orgs.Item.Actions.HostedRunners.Platforms.PlatformsGetResponse(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "platforms", n => { Platforms = n.GetCollectionOfPrimitiveValues()?.AsList(); } }, + { "total_count", n => { TotalCount = n.GetIntValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteCollectionOfPrimitiveValues("platforms", Platforms); + writer.WriteIntValue("total_count", TotalCount); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Actions/HostedRunners/Platforms/PlatformsRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Actions/HostedRunners/Platforms/PlatformsRequestBuilder.cs new file mode 100644 index 0000000..b0c465f --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Actions/HostedRunners/Platforms/PlatformsRequestBuilder.cs @@ -0,0 +1,112 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Orgs.Item.Actions.HostedRunners.Platforms +{ + /// + /// Builds and executes requests for operations under \orgs\{org}\actions\hosted-runners\platforms + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class PlatformsRequestBuilder : BaseRequestBuilder + { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public PlatformsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/orgs/{org}/actions/hosted-runners/platforms", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public PlatformsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/orgs/{org}/actions/hosted-runners/platforms", rawUrl) + { + } + /// + /// Get the list of platforms available for GitHub-hosted runners for an organization. + /// API method documentation + /// + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsPlatformsGetResponseAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task GetAsPlatformsGetResponseAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Orgs.Item.Actions.HostedRunners.Platforms.PlatformsGetResponse.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false); + } + /// + /// Get the list of platforms available for GitHub-hosted runners for an organization. + /// API method documentation + /// + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + [Obsolete("This method is obsolete. Use GetAsPlatformsGetResponseAsync instead.")] +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Orgs.Item.Actions.HostedRunners.Platforms.PlatformsResponse.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false); + } + /// + /// Get the list of platforms available for GitHub-hosted runners for an organization. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.Orgs.Item.Actions.HostedRunners.Platforms.PlatformsRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Orgs.Item.Actions.HostedRunners.Platforms.PlatformsRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class PlatformsRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Actions/HostedRunners/Platforms/PlatformsResponse.cs b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Actions/HostedRunners/Platforms/PlatformsResponse.cs new file mode 100644 index 0000000..8a62854 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Actions/HostedRunners/Platforms/PlatformsResponse.cs @@ -0,0 +1,28 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Orgs.Item.Actions.HostedRunners.Platforms +{ + [Obsolete("This class is obsolete. Use PlatformsGetResponse instead.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class PlatformsResponse : global::Ayllu.Github.Client.Orgs.Item.Actions.HostedRunners.Platforms.PlatformsGetResponse, IParsable + #pragma warning restore CS1591 + { + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static new global::Ayllu.Github.Client.Orgs.Item.Actions.HostedRunners.Platforms.PlatformsResponse CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Orgs.Item.Actions.HostedRunners.Platforms.PlatformsResponse(); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Actions/Oidc/Customization/CustomizationRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Actions/Oidc/Customization/CustomizationRequestBuilder.cs new file mode 100644 index 0000000..4ab5589 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Actions/Oidc/Customization/CustomizationRequestBuilder.cs @@ -0,0 +1,41 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Orgs.Item.Actions.Oidc.Customization.Sub; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System; +namespace Ayllu.Github.Client.Orgs.Item.Actions.Oidc.Customization +{ + /// + /// Builds and executes requests for operations under \orgs\{org}\actions\oidc\customization + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class CustomizationRequestBuilder : BaseRequestBuilder + { + /// The sub property + public global::Ayllu.Github.Client.Orgs.Item.Actions.Oidc.Customization.Sub.SubRequestBuilder Sub + { + get => new global::Ayllu.Github.Client.Orgs.Item.Actions.Oidc.Customization.Sub.SubRequestBuilder(PathParameters, RequestAdapter); + } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public CustomizationRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/orgs/{org}/actions/oidc/customization", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public CustomizationRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/orgs/{org}/actions/oidc/customization", rawUrl) + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Actions/Oidc/Customization/Sub/SubRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Actions/Oidc/Customization/Sub/SubRequestBuilder.cs new file mode 100644 index 0000000..7d6c6d2 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Actions/Oidc/Customization/Sub/SubRequestBuilder.cs @@ -0,0 +1,151 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Orgs.Item.Actions.Oidc.Customization.Sub +{ + /// + /// Builds and executes requests for operations under \orgs\{org}\actions\oidc\customization\sub + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class SubRequestBuilder : BaseRequestBuilder + { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public SubRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/orgs/{org}/actions/oidc/customization/sub", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public SubRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/orgs/{org}/actions/oidc/customization/sub", rawUrl) + { + } + /// + /// 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. + /// API method documentation + /// + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Models.OidcCustomSub.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false); + } + /// + /// 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. + /// API method documentation + /// + /// A + /// Actions OIDC Subject customization + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 403 status code + /// When receiving a 404 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PutAsync(global::Ayllu.Github.Client.Models.OidcCustomSub body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task PutAsync(global::Ayllu.Github.Client.Models.OidcCustomSub body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPutRequestInformation(body, requestConfiguration); + var errorMapping = new Dictionary> + { + { "403", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "404", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Models.EmptyObject.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// 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. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// 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. + /// + /// A + /// Actions OIDC Subject customization + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPutRequestInformation(global::Ayllu.Github.Client.Models.OidcCustomSub body, Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToPutRequestInformation(global::Ayllu.Github.Client.Models.OidcCustomSub body, Action> requestConfiguration = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation(Method.PUT, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.Orgs.Item.Actions.Oidc.Customization.Sub.SubRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Orgs.Item.Actions.Oidc.Customization.Sub.SubRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class SubRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class SubRequestBuilderPutRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Actions/Oidc/OidcRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Actions/Oidc/OidcRequestBuilder.cs new file mode 100644 index 0000000..47636ec --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Actions/Oidc/OidcRequestBuilder.cs @@ -0,0 +1,41 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Orgs.Item.Actions.Oidc.Customization; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System; +namespace Ayllu.Github.Client.Orgs.Item.Actions.Oidc +{ + /// + /// Builds and executes requests for operations under \orgs\{org}\actions\oidc + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class OidcRequestBuilder : BaseRequestBuilder + { + /// The customization property + public global::Ayllu.Github.Client.Orgs.Item.Actions.Oidc.Customization.CustomizationRequestBuilder Customization + { + get => new global::Ayllu.Github.Client.Orgs.Item.Actions.Oidc.Customization.CustomizationRequestBuilder(PathParameters, RequestAdapter); + } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public OidcRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/orgs/{org}/actions/oidc", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public OidcRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/orgs/{org}/actions/oidc", rawUrl) + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Actions/Permissions/ArtifactAndLogRetention/ArtifactAndLogRetentionRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Actions/Permissions/ArtifactAndLogRetention/ArtifactAndLogRetentionRequestBuilder.cs new file mode 100644 index 0000000..9853c0e --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Actions/Permissions/ArtifactAndLogRetention/ArtifactAndLogRetentionRequestBuilder.cs @@ -0,0 +1,161 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Orgs.Item.Actions.Permissions.ArtifactAndLogRetention +{ + /// + /// Builds and executes requests for operations under \orgs\{org}\actions\permissions\artifact-and-log-retention + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class ArtifactAndLogRetentionRequestBuilder : BaseRequestBuilder + { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public ArtifactAndLogRetentionRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/orgs/{org}/actions/permissions/artifact-and-log-retention", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public ArtifactAndLogRetentionRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/orgs/{org}/actions/permissions/artifact-and-log-retention", rawUrl) + { + } + /// + /// Gets artifact and log retention settings for an organization.OAuth app tokens and personal access tokens (classic) need the `admin:org` scope or the "Actions policies" fine-grained permission to use this endpoint. + /// API method documentation + /// + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 403 status code + /// When receiving a 404 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "403", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "404", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Models.ActionsArtifactAndLogRetentionResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// Sets artifact and log retention settings for an organization.OAuth app tokens and personal access tokens (classic) need the `admin:org` scope or the "Actions policies" fine-grained permission to use this endpoint. + /// API method documentation + /// + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 403 status code + /// When receiving a 404 status code + /// When receiving a 409 status code + /// When receiving a 422 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PutAsync(global::Ayllu.Github.Client.Models.ActionsArtifactAndLogRetention body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task PutAsync(global::Ayllu.Github.Client.Models.ActionsArtifactAndLogRetention body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPutRequestInformation(body, requestConfiguration); + var errorMapping = new Dictionary> + { + { "403", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "404", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "409", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "422", global::Ayllu.Github.Client.Models.ValidationError.CreateFromDiscriminatorValue }, + }; + await RequestAdapter.SendNoContentAsync(requestInfo, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// Gets artifact and log retention settings for an organization.OAuth app tokens and personal access tokens (classic) need the `admin:org` scope or the "Actions policies" fine-grained permission to use this endpoint. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Sets artifact and log retention settings for an organization.OAuth app tokens and personal access tokens (classic) need the `admin:org` scope or the "Actions policies" fine-grained permission to use this endpoint. + /// + /// A + /// The request body + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPutRequestInformation(global::Ayllu.Github.Client.Models.ActionsArtifactAndLogRetention body, Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToPutRequestInformation(global::Ayllu.Github.Client.Models.ActionsArtifactAndLogRetention body, Action> requestConfiguration = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation(Method.PUT, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.Orgs.Item.Actions.Permissions.ArtifactAndLogRetention.ArtifactAndLogRetentionRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Orgs.Item.Actions.Permissions.ArtifactAndLogRetention.ArtifactAndLogRetentionRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class ArtifactAndLogRetentionRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class ArtifactAndLogRetentionRequestBuilderPutRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Actions/Permissions/ForkPrContributorApproval/ForkPrContributorApprovalRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Actions/Permissions/ForkPrContributorApproval/ForkPrContributorApprovalRequestBuilder.cs new file mode 100644 index 0000000..5835308 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Actions/Permissions/ForkPrContributorApproval/ForkPrContributorApprovalRequestBuilder.cs @@ -0,0 +1,155 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Orgs.Item.Actions.Permissions.ForkPrContributorApproval +{ + /// + /// Builds and executes requests for operations under \orgs\{org}\actions\permissions\fork-pr-contributor-approval + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class ForkPrContributorApprovalRequestBuilder : BaseRequestBuilder + { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public ForkPrContributorApprovalRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/orgs/{org}/actions/permissions/fork-pr-contributor-approval", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public ForkPrContributorApprovalRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/orgs/{org}/actions/permissions/fork-pr-contributor-approval", rawUrl) + { + } + /// + /// Gets the fork PR contributor approval policy for an organization.OAuth app tokens and personal access tokens (classic) need the `admin:org` scope or the "Actions policies" fine-grained permission to use this endpoint. + /// API method documentation + /// + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 404 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "404", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Models.ActionsForkPrContributorApproval.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// Sets the fork PR contributor approval policy for an organization.OAuth app tokens and personal access tokens (classic) need the `admin:org` scope to use this endpoint. + /// API method documentation + /// + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 404 status code + /// When receiving a 422 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PutAsync(global::Ayllu.Github.Client.Models.ActionsForkPrContributorApproval body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task PutAsync(global::Ayllu.Github.Client.Models.ActionsForkPrContributorApproval body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPutRequestInformation(body, requestConfiguration); + var errorMapping = new Dictionary> + { + { "404", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "422", global::Ayllu.Github.Client.Models.ValidationError.CreateFromDiscriminatorValue }, + }; + await RequestAdapter.SendNoContentAsync(requestInfo, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// Gets the fork PR contributor approval policy for an organization.OAuth app tokens and personal access tokens (classic) need the `admin:org` scope or the "Actions policies" fine-grained permission to use this endpoint. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Sets the fork PR contributor approval policy for an organization.OAuth app tokens and personal access tokens (classic) need the `admin:org` scope to use this endpoint. + /// + /// A + /// The request body + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPutRequestInformation(global::Ayllu.Github.Client.Models.ActionsForkPrContributorApproval body, Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToPutRequestInformation(global::Ayllu.Github.Client.Models.ActionsForkPrContributorApproval body, Action> requestConfiguration = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation(Method.PUT, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.Orgs.Item.Actions.Permissions.ForkPrContributorApproval.ForkPrContributorApprovalRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Orgs.Item.Actions.Permissions.ForkPrContributorApproval.ForkPrContributorApprovalRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class ForkPrContributorApprovalRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class ForkPrContributorApprovalRequestBuilderPutRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Actions/Permissions/ForkPrWorkflowsPrivateRepos/ForkPrWorkflowsPrivateReposRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Actions/Permissions/ForkPrWorkflowsPrivateRepos/ForkPrWorkflowsPrivateReposRequestBuilder.cs new file mode 100644 index 0000000..bdca340 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Actions/Permissions/ForkPrWorkflowsPrivateRepos/ForkPrWorkflowsPrivateReposRequestBuilder.cs @@ -0,0 +1,159 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Orgs.Item.Actions.Permissions.ForkPrWorkflowsPrivateRepos +{ + /// + /// Builds and executes requests for operations under \orgs\{org}\actions\permissions\fork-pr-workflows-private-repos + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class ForkPrWorkflowsPrivateReposRequestBuilder : BaseRequestBuilder + { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public ForkPrWorkflowsPrivateReposRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/orgs/{org}/actions/permissions/fork-pr-workflows-private-repos", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public ForkPrWorkflowsPrivateReposRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/orgs/{org}/actions/permissions/fork-pr-workflows-private-repos", rawUrl) + { + } + /// + /// Gets the settings for whether workflows from fork pull requests can run on private repositories in an organization. + /// API method documentation + /// + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 403 status code + /// When receiving a 404 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "403", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "404", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Models.ActionsForkPrWorkflowsPrivateRepos.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// Sets the settings for whether workflows from fork pull requests can run on private repositories in an organization. + /// API method documentation + /// + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 403 status code + /// When receiving a 404 status code + /// When receiving a 422 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PutAsync(global::Ayllu.Github.Client.Models.ActionsForkPrWorkflowsPrivateReposRequest body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task PutAsync(global::Ayllu.Github.Client.Models.ActionsForkPrWorkflowsPrivateReposRequest body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPutRequestInformation(body, requestConfiguration); + var errorMapping = new Dictionary> + { + { "403", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "404", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "422", global::Ayllu.Github.Client.Models.ValidationError.CreateFromDiscriminatorValue }, + }; + await RequestAdapter.SendNoContentAsync(requestInfo, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// Gets the settings for whether workflows from fork pull requests can run on private repositories in an organization. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Sets the settings for whether workflows from fork pull requests can run on private repositories in an organization. + /// + /// A + /// The request body + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPutRequestInformation(global::Ayllu.Github.Client.Models.ActionsForkPrWorkflowsPrivateReposRequest body, Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToPutRequestInformation(global::Ayllu.Github.Client.Models.ActionsForkPrWorkflowsPrivateReposRequest body, Action> requestConfiguration = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation(Method.PUT, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.Orgs.Item.Actions.Permissions.ForkPrWorkflowsPrivateRepos.ForkPrWorkflowsPrivateReposRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Orgs.Item.Actions.Permissions.ForkPrWorkflowsPrivateRepos.ForkPrWorkflowsPrivateReposRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class ForkPrWorkflowsPrivateReposRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class ForkPrWorkflowsPrivateReposRequestBuilderPutRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Actions/Permissions/PermissionsPutRequestBody.cs b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Actions/Permissions/PermissionsPutRequestBody.cs new file mode 100644 index 0000000..09926e1 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Actions/Permissions/PermissionsPutRequestBody.cs @@ -0,0 +1,68 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Orgs.Item.Actions.Permissions +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class PermissionsPutRequestBody : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The permissions policy that controls the actions and reusable workflows that are allowed to run. + public global::Ayllu.Github.Client.Models.AllowedActions? AllowedActions { get; set; } + /// The policy that controls the repositories in the organization that are allowed to run GitHub Actions. + public global::Ayllu.Github.Client.Models.EnabledRepositories? EnabledRepositories { get; set; } + /// Whether actions must be pinned to a full-length commit SHA. + public bool? ShaPinningRequired { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public PermissionsPutRequestBody() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Orgs.Item.Actions.Permissions.PermissionsPutRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Orgs.Item.Actions.Permissions.PermissionsPutRequestBody(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "allowed_actions", n => { AllowedActions = n.GetEnumValue(); } }, + { "enabled_repositories", n => { EnabledRepositories = n.GetEnumValue(); } }, + { "sha_pinning_required", n => { ShaPinningRequired = n.GetBoolValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteEnumValue("allowed_actions", AllowedActions); + writer.WriteEnumValue("enabled_repositories", EnabledRepositories); + writer.WriteBoolValue("sha_pinning_required", ShaPinningRequired); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Actions/Permissions/PermissionsRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Actions/Permissions/PermissionsRequestBuilder.cs new file mode 100644 index 0000000..3c3f279 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Actions/Permissions/PermissionsRequestBuilder.cs @@ -0,0 +1,184 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Ayllu.Github.Client.Orgs.Item.Actions.Permissions.ArtifactAndLogRetention; +using Ayllu.Github.Client.Orgs.Item.Actions.Permissions.ForkPrContributorApproval; +using Ayllu.Github.Client.Orgs.Item.Actions.Permissions.ForkPrWorkflowsPrivateRepos; +using Ayllu.Github.Client.Orgs.Item.Actions.Permissions.Repositories; +using Ayllu.Github.Client.Orgs.Item.Actions.Permissions.SelectedActions; +using Ayllu.Github.Client.Orgs.Item.Actions.Permissions.SelfHostedRunners; +using Ayllu.Github.Client.Orgs.Item.Actions.Permissions.Workflow; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Orgs.Item.Actions.Permissions +{ + /// + /// Builds and executes requests for operations under \orgs\{org}\actions\permissions + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class PermissionsRequestBuilder : BaseRequestBuilder + { + /// The artifactAndLogRetention property + public global::Ayllu.Github.Client.Orgs.Item.Actions.Permissions.ArtifactAndLogRetention.ArtifactAndLogRetentionRequestBuilder ArtifactAndLogRetention + { + get => new global::Ayllu.Github.Client.Orgs.Item.Actions.Permissions.ArtifactAndLogRetention.ArtifactAndLogRetentionRequestBuilder(PathParameters, RequestAdapter); + } + /// The forkPrContributorApproval property + public global::Ayllu.Github.Client.Orgs.Item.Actions.Permissions.ForkPrContributorApproval.ForkPrContributorApprovalRequestBuilder ForkPrContributorApproval + { + get => new global::Ayllu.Github.Client.Orgs.Item.Actions.Permissions.ForkPrContributorApproval.ForkPrContributorApprovalRequestBuilder(PathParameters, RequestAdapter); + } + /// The forkPrWorkflowsPrivateRepos property + public global::Ayllu.Github.Client.Orgs.Item.Actions.Permissions.ForkPrWorkflowsPrivateRepos.ForkPrWorkflowsPrivateReposRequestBuilder ForkPrWorkflowsPrivateRepos + { + get => new global::Ayllu.Github.Client.Orgs.Item.Actions.Permissions.ForkPrWorkflowsPrivateRepos.ForkPrWorkflowsPrivateReposRequestBuilder(PathParameters, RequestAdapter); + } + /// The repositories property + public global::Ayllu.Github.Client.Orgs.Item.Actions.Permissions.Repositories.RepositoriesRequestBuilder Repositories + { + get => new global::Ayllu.Github.Client.Orgs.Item.Actions.Permissions.Repositories.RepositoriesRequestBuilder(PathParameters, RequestAdapter); + } + /// The selectedActions property + public global::Ayllu.Github.Client.Orgs.Item.Actions.Permissions.SelectedActions.SelectedActionsRequestBuilder SelectedActions + { + get => new global::Ayllu.Github.Client.Orgs.Item.Actions.Permissions.SelectedActions.SelectedActionsRequestBuilder(PathParameters, RequestAdapter); + } + /// The selfHostedRunners property + public global::Ayllu.Github.Client.Orgs.Item.Actions.Permissions.SelfHostedRunners.SelfHostedRunnersRequestBuilder SelfHostedRunners + { + get => new global::Ayllu.Github.Client.Orgs.Item.Actions.Permissions.SelfHostedRunners.SelfHostedRunnersRequestBuilder(PathParameters, RequestAdapter); + } + /// The workflow property + public global::Ayllu.Github.Client.Orgs.Item.Actions.Permissions.Workflow.WorkflowRequestBuilder Workflow + { + get => new global::Ayllu.Github.Client.Orgs.Item.Actions.Permissions.Workflow.WorkflowRequestBuilder(PathParameters, RequestAdapter); + } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public PermissionsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/orgs/{org}/actions/permissions", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public PermissionsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/orgs/{org}/actions/permissions", rawUrl) + { + } + /// + /// 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. + /// API method documentation + /// + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Models.ActionsOrganizationPermissions.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false); + } + /// + /// Sets the GitHub Actions permissions policy for repositories and allowed actions and reusable workflows in an organization.OAuth app tokens and personal access tokens (classic) need the `admin:org` scope to use this endpoint. + /// API method documentation + /// + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PutAsync(global::Ayllu.Github.Client.Orgs.Item.Actions.Permissions.PermissionsPutRequestBody body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task PutAsync(global::Ayllu.Github.Client.Orgs.Item.Actions.Permissions.PermissionsPutRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPutRequestInformation(body, requestConfiguration); + await RequestAdapter.SendNoContentAsync(requestInfo, default, cancellationToken).ConfigureAwait(false); + } + /// + /// 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. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Sets the GitHub Actions permissions policy for repositories and allowed actions and reusable workflows in an organization.OAuth app tokens and personal access tokens (classic) need the `admin:org` scope to use this endpoint. + /// + /// A + /// The request body + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPutRequestInformation(global::Ayllu.Github.Client.Orgs.Item.Actions.Permissions.PermissionsPutRequestBody body, Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToPutRequestInformation(global::Ayllu.Github.Client.Orgs.Item.Actions.Permissions.PermissionsPutRequestBody body, Action> requestConfiguration = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation(Method.PUT, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.Orgs.Item.Actions.Permissions.PermissionsRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Orgs.Item.Actions.Permissions.PermissionsRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class PermissionsRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class PermissionsRequestBuilderPutRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Actions/Permissions/Repositories/Item/WithRepository_ItemRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Actions/Permissions/Repositories/Item/WithRepository_ItemRequestBuilder.cs new file mode 100644 index 0000000..1a8937c --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Actions/Permissions/Repositories/Item/WithRepository_ItemRequestBuilder.cs @@ -0,0 +1,134 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Orgs.Item.Actions.Permissions.Repositories.Item +{ + /// + /// Builds and executes requests for operations under \orgs\{org}\actions\permissions\repositories\{repository_id} + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithRepository_ItemRequestBuilder : BaseRequestBuilder + { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public WithRepository_ItemRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/orgs/{org}/actions/permissions/repositories/{repository_id}", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public WithRepository_ItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/orgs/{org}/actions/permissions/repositories/{repository_id}", rawUrl) + { + } + /// + /// 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 + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task DeleteAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task DeleteAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToDeleteRequestInformation(requestConfiguration); + await RequestAdapter.SendNoContentAsync(requestInfo, default, cancellationToken).ConfigureAwait(false); + } + /// + /// 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 + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PutAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task PutAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToPutRequestInformation(requestConfiguration); + await RequestAdapter.SendNoContentAsync(requestInfo, default, cancellationToken).ConfigureAwait(false); + } + /// + /// 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. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToDeleteRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToDeleteRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.DELETE, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + return requestInfo; + } + /// + /// 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. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPutRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToPutRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.PUT, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.Orgs.Item.Actions.Permissions.Repositories.Item.WithRepository_ItemRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Orgs.Item.Actions.Permissions.Repositories.Item.WithRepository_ItemRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithRepository_ItemRequestBuilderDeleteRequestConfiguration : RequestConfiguration + { + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithRepository_ItemRequestBuilderPutRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Actions/Permissions/Repositories/RepositoriesGetResponse.cs b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Actions/Permissions/Repositories/RepositoriesGetResponse.cs new file mode 100644 index 0000000..e7d2d37 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Actions/Permissions/Repositories/RepositoriesGetResponse.cs @@ -0,0 +1,70 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Orgs.Item.Actions.Permissions.Repositories +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class RepositoriesGetResponse : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The repositories property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? Repositories { get; set; } +#nullable restore +#else + public List Repositories { get; set; } +#endif + /// The total_count property + public double? TotalCount { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public RepositoriesGetResponse() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Orgs.Item.Actions.Permissions.Repositories.RepositoriesGetResponse CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Orgs.Item.Actions.Permissions.Repositories.RepositoriesGetResponse(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "repositories", n => { Repositories = n.GetCollectionOfObjectValues(global::Ayllu.Github.Client.Models.Repository.CreateFromDiscriminatorValue)?.AsList(); } }, + { "total_count", n => { TotalCount = n.GetDoubleValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteCollectionOfObjectValues("repositories", Repositories); + writer.WriteDoubleValue("total_count", TotalCount); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Actions/Permissions/Repositories/RepositoriesPutRequestBody.cs b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Actions/Permissions/Repositories/RepositoriesPutRequestBody.cs new file mode 100644 index 0000000..60e2980 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Actions/Permissions/Repositories/RepositoriesPutRequestBody.cs @@ -0,0 +1,65 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Orgs.Item.Actions.Permissions.Repositories +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class RepositoriesPutRequestBody : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// List of repository IDs to enable for GitHub Actions. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? SelectedRepositoryIds { get; set; } +#nullable restore +#else + public List SelectedRepositoryIds { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public RepositoriesPutRequestBody() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Orgs.Item.Actions.Permissions.Repositories.RepositoriesPutRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Orgs.Item.Actions.Permissions.Repositories.RepositoriesPutRequestBody(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "selected_repository_ids", n => { SelectedRepositoryIds = n.GetCollectionOfPrimitiveValues()?.AsList(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteCollectionOfPrimitiveValues("selected_repository_ids", SelectedRepositoryIds); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Actions/Permissions/Repositories/RepositoriesRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Actions/Permissions/Repositories/RepositoriesRequestBuilder.cs new file mode 100644 index 0000000..bcccdb0 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Actions/Permissions/Repositories/RepositoriesRequestBuilder.cs @@ -0,0 +1,200 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Orgs.Item.Actions.Permissions.Repositories.Item; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Orgs.Item.Actions.Permissions.Repositories +{ + /// + /// Builds and executes requests for operations under \orgs\{org}\actions\permissions\repositories + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class RepositoriesRequestBuilder : BaseRequestBuilder + { + /// Gets an item from the Ayllu.Github.Client.orgs.item.actions.permissions.repositories.item collection + /// The unique identifier of the repository. + /// A + public global::Ayllu.Github.Client.Orgs.Item.Actions.Permissions.Repositories.Item.WithRepository_ItemRequestBuilder this[int position] + { + get + { + var urlTplParams = new Dictionary(PathParameters); + urlTplParams.Add("repository_id", position); + return new global::Ayllu.Github.Client.Orgs.Item.Actions.Permissions.Repositories.Item.WithRepository_ItemRequestBuilder(urlTplParams, RequestAdapter); + } + } + /// Gets an item from the Ayllu.Github.Client.orgs.item.actions.permissions.repositories.item collection + /// The unique identifier of the repository. + /// A + [Obsolete("This indexer is deprecated and will be removed in the next major version. Use the one with the typed parameter instead.")] + public global::Ayllu.Github.Client.Orgs.Item.Actions.Permissions.Repositories.Item.WithRepository_ItemRequestBuilder this[string position] + { + get + { + var urlTplParams = new Dictionary(PathParameters); + if (!string.IsNullOrWhiteSpace(position)) urlTplParams.Add("repository_id", position); + return new global::Ayllu.Github.Client.Orgs.Item.Actions.Permissions.Repositories.Item.WithRepository_ItemRequestBuilder(urlTplParams, RequestAdapter); + } + } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public RepositoriesRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/orgs/{org}/actions/permissions/repositories{?page*,per_page*}", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public RepositoriesRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/orgs/{org}/actions/permissions/repositories{?page*,per_page*}", rawUrl) + { + } + /// + /// 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. + /// API method documentation + /// + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsRepositoriesGetResponseAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task GetAsRepositoriesGetResponseAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Orgs.Item.Actions.Permissions.Repositories.RepositoriesGetResponse.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false); + } + /// + /// 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. + /// API method documentation + /// + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + [Obsolete("This method is obsolete. Use GetAsRepositoriesGetResponseAsync instead.")] +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Orgs.Item.Actions.Permissions.Repositories.RepositoriesResponse.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false); + } + /// + /// 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 + /// + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PutAsync(global::Ayllu.Github.Client.Orgs.Item.Actions.Permissions.Repositories.RepositoriesPutRequestBody body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task PutAsync(global::Ayllu.Github.Client.Orgs.Item.Actions.Permissions.Repositories.RepositoriesPutRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPutRequestInformation(body, requestConfiguration); + await RequestAdapter.SendNoContentAsync(requestInfo, default, cancellationToken).ConfigureAwait(false); + } + /// + /// 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. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// 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. + /// + /// A + /// The request body + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPutRequestInformation(global::Ayllu.Github.Client.Orgs.Item.Actions.Permissions.Repositories.RepositoriesPutRequestBody body, Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToPutRequestInformation(global::Ayllu.Github.Client.Orgs.Item.Actions.Permissions.Repositories.RepositoriesPutRequestBody body, Action> requestConfiguration = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation(Method.PUT, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.Orgs.Item.Actions.Permissions.Repositories.RepositoriesRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Orgs.Item.Actions.Permissions.Repositories.RepositoriesRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// 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. + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class RepositoriesRequestBuilderGetQueryParameters + { + /// The page number of the results to fetch. For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." + [QueryParameter("page")] + public int? Page { get; set; } + /// The number of results per page (max 100). For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." + [QueryParameter("per_page")] + public int? PerPage { get; set; } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class RepositoriesRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class RepositoriesRequestBuilderPutRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Actions/Permissions/Repositories/RepositoriesResponse.cs b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Actions/Permissions/Repositories/RepositoriesResponse.cs new file mode 100644 index 0000000..136f0f2 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Actions/Permissions/Repositories/RepositoriesResponse.cs @@ -0,0 +1,28 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Orgs.Item.Actions.Permissions.Repositories +{ + [Obsolete("This class is obsolete. Use RepositoriesGetResponse instead.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class RepositoriesResponse : global::Ayllu.Github.Client.Orgs.Item.Actions.Permissions.Repositories.RepositoriesGetResponse, IParsable + #pragma warning restore CS1591 + { + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static new global::Ayllu.Github.Client.Orgs.Item.Actions.Permissions.Repositories.RepositoriesResponse CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Orgs.Item.Actions.Permissions.Repositories.RepositoriesResponse(); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Actions/Permissions/SelectedActions/SelectedActionsRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Actions/Permissions/SelectedActions/SelectedActionsRequestBuilder.cs new file mode 100644 index 0000000..ed6468d --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Actions/Permissions/SelectedActions/SelectedActionsRequestBuilder.cs @@ -0,0 +1,142 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Orgs.Item.Actions.Permissions.SelectedActions +{ + /// + /// Builds and executes requests for operations under \orgs\{org}\actions\permissions\selected-actions + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class SelectedActionsRequestBuilder : BaseRequestBuilder + { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public SelectedActionsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/orgs/{org}/actions/permissions/selected-actions", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public SelectedActionsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/orgs/{org}/actions/permissions/selected-actions", rawUrl) + { + } + /// + /// 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. + /// API method documentation + /// + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Models.SelectedActions.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false); + } + /// + /// Sets the 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 app tokens and personal access tokens (classic) need the `admin:org` scope to use this endpoint. + /// API method documentation + /// + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PutAsync(global::Ayllu.Github.Client.Models.SelectedActions body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task PutAsync(global::Ayllu.Github.Client.Models.SelectedActions body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPutRequestInformation(body, requestConfiguration); + await RequestAdapter.SendNoContentAsync(requestInfo, default, cancellationToken).ConfigureAwait(false); + } + /// + /// 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. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Sets the 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 app tokens and personal access tokens (classic) need the `admin:org` scope to use this endpoint. + /// + /// A + /// The request body + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPutRequestInformation(global::Ayllu.Github.Client.Models.SelectedActions body, Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToPutRequestInformation(global::Ayllu.Github.Client.Models.SelectedActions body, Action> requestConfiguration = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation(Method.PUT, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.Orgs.Item.Actions.Permissions.SelectedActions.SelectedActionsRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Orgs.Item.Actions.Permissions.SelectedActions.SelectedActionsRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class SelectedActionsRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class SelectedActionsRequestBuilderPutRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Actions/Permissions/SelfHostedRunners/Repositories/Item/WithRepository_ItemRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Actions/Permissions/SelfHostedRunners/Repositories/Item/WithRepository_ItemRequestBuilder.cs new file mode 100644 index 0000000..8fd6358 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Actions/Permissions/SelfHostedRunners/Repositories/Item/WithRepository_ItemRequestBuilder.cs @@ -0,0 +1,159 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Orgs.Item.Actions.Permissions.SelfHostedRunners.Repositories.Item +{ + /// + /// Builds and executes requests for operations under \orgs\{org}\actions\permissions\self-hosted-runners\repositories\{repository_id} + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithRepository_ItemRequestBuilder : BaseRequestBuilder + { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public WithRepository_ItemRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/orgs/{org}/actions/permissions/self-hosted-runners/repositories/{repository_id}", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public WithRepository_ItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/orgs/{org}/actions/permissions/self-hosted-runners/repositories/{repository_id}", rawUrl) + { + } + /// + /// Removes a repository from the list of repositories that are allowed to use self-hosted runners in an organization.OAuth app tokens and personal access tokens (classic) need the `admin:org` scope or the "Actions policies" fine-grained permission to use this endpoint. + /// API method documentation + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 403 status code + /// When receiving a 404 status code + /// When receiving a 409 status code + /// When receiving a 422 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task DeleteAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task DeleteAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToDeleteRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "403", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "404", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "409", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "422", global::Ayllu.Github.Client.Models.ValidationError.CreateFromDiscriminatorValue }, + }; + await RequestAdapter.SendNoContentAsync(requestInfo, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// Adds a repository to the list of repositories that are allowed to use self-hosted runners in an organization.OAuth app tokens and personal access tokens (classic) need the `admin:org` scope or the "Actions policies" fine-grained permission to use this endpoint. + /// API method documentation + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 403 status code + /// When receiving a 404 status code + /// When receiving a 409 status code + /// When receiving a 422 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PutAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task PutAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToPutRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "403", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "404", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "409", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "422", global::Ayllu.Github.Client.Models.ValidationError.CreateFromDiscriminatorValue }, + }; + await RequestAdapter.SendNoContentAsync(requestInfo, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// Removes a repository from the list of repositories that are allowed to use self-hosted runners in an organization.OAuth app tokens and personal access tokens (classic) need the `admin:org` scope or the "Actions policies" fine-grained permission to use this endpoint. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToDeleteRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToDeleteRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.DELETE, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Adds a repository to the list of repositories that are allowed to use self-hosted runners in an organization.OAuth app tokens and personal access tokens (classic) need the `admin:org` scope or the "Actions policies" fine-grained permission to use this endpoint. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPutRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToPutRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.PUT, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.Orgs.Item.Actions.Permissions.SelfHostedRunners.Repositories.Item.WithRepository_ItemRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Orgs.Item.Actions.Permissions.SelfHostedRunners.Repositories.Item.WithRepository_ItemRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithRepository_ItemRequestBuilderDeleteRequestConfiguration : RequestConfiguration + { + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithRepository_ItemRequestBuilderPutRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Actions/Permissions/SelfHostedRunners/Repositories/RepositoriesGetResponse.cs b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Actions/Permissions/SelfHostedRunners/Repositories/RepositoriesGetResponse.cs new file mode 100644 index 0000000..97c7e22 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Actions/Permissions/SelfHostedRunners/Repositories/RepositoriesGetResponse.cs @@ -0,0 +1,70 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Orgs.Item.Actions.Permissions.SelfHostedRunners.Repositories +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class RepositoriesGetResponse : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The repositories property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? Repositories { get; set; } +#nullable restore +#else + public List Repositories { get; set; } +#endif + /// The total_count property + public int? TotalCount { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public RepositoriesGetResponse() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Orgs.Item.Actions.Permissions.SelfHostedRunners.Repositories.RepositoriesGetResponse CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Orgs.Item.Actions.Permissions.SelfHostedRunners.Repositories.RepositoriesGetResponse(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "repositories", n => { Repositories = n.GetCollectionOfObjectValues(global::Ayllu.Github.Client.Models.Repository.CreateFromDiscriminatorValue)?.AsList(); } }, + { "total_count", n => { TotalCount = n.GetIntValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteCollectionOfObjectValues("repositories", Repositories); + writer.WriteIntValue("total_count", TotalCount); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Actions/Permissions/SelfHostedRunners/Repositories/RepositoriesPutRequestBody.cs b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Actions/Permissions/SelfHostedRunners/Repositories/RepositoriesPutRequestBody.cs new file mode 100644 index 0000000..3225fcf --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Actions/Permissions/SelfHostedRunners/Repositories/RepositoriesPutRequestBody.cs @@ -0,0 +1,65 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Orgs.Item.Actions.Permissions.SelfHostedRunners.Repositories +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class RepositoriesPutRequestBody : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// IDs of repositories that can use repository-level self-hosted runners +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? SelectedRepositoryIds { get; set; } +#nullable restore +#else + public List SelectedRepositoryIds { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public RepositoriesPutRequestBody() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Orgs.Item.Actions.Permissions.SelfHostedRunners.Repositories.RepositoriesPutRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Orgs.Item.Actions.Permissions.SelfHostedRunners.Repositories.RepositoriesPutRequestBody(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "selected_repository_ids", n => { SelectedRepositoryIds = n.GetCollectionOfPrimitiveValues()?.AsList(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteCollectionOfPrimitiveValues("selected_repository_ids", SelectedRepositoryIds); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Actions/Permissions/SelfHostedRunners/Repositories/RepositoriesRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Actions/Permissions/SelfHostedRunners/Repositories/RepositoriesRequestBuilder.cs new file mode 100644 index 0000000..0638f4d --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Actions/Permissions/SelfHostedRunners/Repositories/RepositoriesRequestBuilder.cs @@ -0,0 +1,225 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Ayllu.Github.Client.Orgs.Item.Actions.Permissions.SelfHostedRunners.Repositories.Item; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Orgs.Item.Actions.Permissions.SelfHostedRunners.Repositories +{ + /// + /// Builds and executes requests for operations under \orgs\{org}\actions\permissions\self-hosted-runners\repositories + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class RepositoriesRequestBuilder : BaseRequestBuilder + { + /// Gets an item from the Ayllu.Github.Client.orgs.item.actions.permissions.selfHostedRunners.repositories.item collection + /// The unique identifier of the repository. + /// A + public global::Ayllu.Github.Client.Orgs.Item.Actions.Permissions.SelfHostedRunners.Repositories.Item.WithRepository_ItemRequestBuilder this[int position] + { + get + { + var urlTplParams = new Dictionary(PathParameters); + urlTplParams.Add("repository_id", position); + return new global::Ayllu.Github.Client.Orgs.Item.Actions.Permissions.SelfHostedRunners.Repositories.Item.WithRepository_ItemRequestBuilder(urlTplParams, RequestAdapter); + } + } + /// Gets an item from the Ayllu.Github.Client.orgs.item.actions.permissions.selfHostedRunners.repositories.item collection + /// The unique identifier of the repository. + /// A + [Obsolete("This indexer is deprecated and will be removed in the next major version. Use the one with the typed parameter instead.")] + public global::Ayllu.Github.Client.Orgs.Item.Actions.Permissions.SelfHostedRunners.Repositories.Item.WithRepository_ItemRequestBuilder this[string position] + { + get + { + var urlTplParams = new Dictionary(PathParameters); + if (!string.IsNullOrWhiteSpace(position)) urlTplParams.Add("repository_id", position); + return new global::Ayllu.Github.Client.Orgs.Item.Actions.Permissions.SelfHostedRunners.Repositories.Item.WithRepository_ItemRequestBuilder(urlTplParams, RequestAdapter); + } + } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public RepositoriesRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/orgs/{org}/actions/permissions/self-hosted-runners/repositories{?page*,per_page*}", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public RepositoriesRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/orgs/{org}/actions/permissions/self-hosted-runners/repositories{?page*,per_page*}", rawUrl) + { + } + /// + /// Lists repositories that are allowed to use self-hosted runners in an organization.OAuth app tokens and personal access tokens (classic) need the `admin:org` scope or the "Actions policies" fine-grained permission to use this endpoint. + /// API method documentation + /// + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 403 status code + /// When receiving a 404 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsRepositoriesGetResponseAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task GetAsRepositoriesGetResponseAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "403", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "404", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Orgs.Item.Actions.Permissions.SelfHostedRunners.Repositories.RepositoriesGetResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// Lists repositories that are allowed to use self-hosted runners in an organization.OAuth app tokens and personal access tokens (classic) need the `admin:org` scope or the "Actions policies" fine-grained permission to use this endpoint. + /// API method documentation + /// + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 403 status code + /// When receiving a 404 status code + [Obsolete("This method is obsolete. Use GetAsRepositoriesGetResponseAsync instead.")] +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "403", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "404", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Orgs.Item.Actions.Permissions.SelfHostedRunners.Repositories.RepositoriesResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// Sets repositories that are allowed to use self-hosted runners in an organization.OAuth app tokens and personal access tokens (classic) need the `admin:org` scope or the "Actions policies" fine-grained permission to use this endpoint. + /// API method documentation + /// + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 403 status code + /// When receiving a 404 status code + /// When receiving a 422 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PutAsync(global::Ayllu.Github.Client.Orgs.Item.Actions.Permissions.SelfHostedRunners.Repositories.RepositoriesPutRequestBody body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task PutAsync(global::Ayllu.Github.Client.Orgs.Item.Actions.Permissions.SelfHostedRunners.Repositories.RepositoriesPutRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPutRequestInformation(body, requestConfiguration); + var errorMapping = new Dictionary> + { + { "403", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "404", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "422", global::Ayllu.Github.Client.Models.ValidationError.CreateFromDiscriminatorValue }, + }; + await RequestAdapter.SendNoContentAsync(requestInfo, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// Lists repositories that are allowed to use self-hosted runners in an organization.OAuth app tokens and personal access tokens (classic) need the `admin:org` scope or the "Actions policies" fine-grained permission to use this endpoint. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Sets repositories that are allowed to use self-hosted runners in an organization.OAuth app tokens and personal access tokens (classic) need the `admin:org` scope or the "Actions policies" fine-grained permission to use this endpoint. + /// + /// A + /// The request body + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPutRequestInformation(global::Ayllu.Github.Client.Orgs.Item.Actions.Permissions.SelfHostedRunners.Repositories.RepositoriesPutRequestBody body, Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToPutRequestInformation(global::Ayllu.Github.Client.Orgs.Item.Actions.Permissions.SelfHostedRunners.Repositories.RepositoriesPutRequestBody body, Action> requestConfiguration = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation(Method.PUT, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.Orgs.Item.Actions.Permissions.SelfHostedRunners.Repositories.RepositoriesRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Orgs.Item.Actions.Permissions.SelfHostedRunners.Repositories.RepositoriesRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Lists repositories that are allowed to use self-hosted runners in an organization.OAuth app tokens and personal access tokens (classic) need the `admin:org` scope or the "Actions policies" fine-grained permission to use this endpoint. + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class RepositoriesRequestBuilderGetQueryParameters + { + /// The page number of the results to fetch. For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." + [QueryParameter("page")] + public int? Page { get; set; } + /// The number of results per page (max 100). For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." + [QueryParameter("per_page")] + public int? PerPage { get; set; } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class RepositoriesRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class RepositoriesRequestBuilderPutRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Actions/Permissions/SelfHostedRunners/Repositories/RepositoriesResponse.cs b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Actions/Permissions/SelfHostedRunners/Repositories/RepositoriesResponse.cs new file mode 100644 index 0000000..2f0756a --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Actions/Permissions/SelfHostedRunners/Repositories/RepositoriesResponse.cs @@ -0,0 +1,28 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Orgs.Item.Actions.Permissions.SelfHostedRunners.Repositories +{ + [Obsolete("This class is obsolete. Use RepositoriesGetResponse instead.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class RepositoriesResponse : global::Ayllu.Github.Client.Orgs.Item.Actions.Permissions.SelfHostedRunners.Repositories.RepositoriesGetResponse, IParsable + #pragma warning restore CS1591 + { + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static new global::Ayllu.Github.Client.Orgs.Item.Actions.Permissions.SelfHostedRunners.Repositories.RepositoriesResponse CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Orgs.Item.Actions.Permissions.SelfHostedRunners.Repositories.RepositoriesResponse(); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Actions/Permissions/SelfHostedRunners/SelfHostedRunnersPutRequestBody.cs b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Actions/Permissions/SelfHostedRunners/SelfHostedRunnersPutRequestBody.cs new file mode 100644 index 0000000..0b2c874 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Actions/Permissions/SelfHostedRunners/SelfHostedRunnersPutRequestBody.cs @@ -0,0 +1,59 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Orgs.Item.Actions.Permissions.SelfHostedRunners +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class SelfHostedRunnersPutRequestBody : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The policy that controls whether self-hosted runners can be used in the organization + public global::Ayllu.Github.Client.Orgs.Item.Actions.Permissions.SelfHostedRunners.SelfHostedRunnersPutRequestBody_enabled_repositories? EnabledRepositories { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public SelfHostedRunnersPutRequestBody() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Orgs.Item.Actions.Permissions.SelfHostedRunners.SelfHostedRunnersPutRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Orgs.Item.Actions.Permissions.SelfHostedRunners.SelfHostedRunnersPutRequestBody(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "enabled_repositories", n => { EnabledRepositories = n.GetEnumValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteEnumValue("enabled_repositories", EnabledRepositories); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Actions/Permissions/SelfHostedRunners/SelfHostedRunnersPutRequestBody_enabled_repositories.cs b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Actions/Permissions/SelfHostedRunners/SelfHostedRunnersPutRequestBody_enabled_repositories.cs new file mode 100644 index 0000000..56b8d4e --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Actions/Permissions/SelfHostedRunners/SelfHostedRunnersPutRequestBody_enabled_repositories.cs @@ -0,0 +1,23 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Orgs.Item.Actions.Permissions.SelfHostedRunners +{ + /// The policy that controls whether self-hosted runners can be used in the organization + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public enum SelfHostedRunnersPutRequestBody_enabled_repositories + { + [EnumMember(Value = "all")] + #pragma warning disable CS1591 + All, + #pragma warning restore CS1591 + [EnumMember(Value = "selected")] + #pragma warning disable CS1591 + Selected, + #pragma warning restore CS1591 + [EnumMember(Value = "none")] + #pragma warning disable CS1591 + None, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Actions/Permissions/SelfHostedRunners/SelfHostedRunnersRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Actions/Permissions/SelfHostedRunners/SelfHostedRunnersRequestBuilder.cs new file mode 100644 index 0000000..5efc5a6 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Actions/Permissions/SelfHostedRunners/SelfHostedRunnersRequestBuilder.cs @@ -0,0 +1,167 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Ayllu.Github.Client.Orgs.Item.Actions.Permissions.SelfHostedRunners.Repositories; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Orgs.Item.Actions.Permissions.SelfHostedRunners +{ + /// + /// Builds and executes requests for operations under \orgs\{org}\actions\permissions\self-hosted-runners + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class SelfHostedRunnersRequestBuilder : BaseRequestBuilder + { + /// The repositories property + public global::Ayllu.Github.Client.Orgs.Item.Actions.Permissions.SelfHostedRunners.Repositories.RepositoriesRequestBuilder Repositories + { + get => new global::Ayllu.Github.Client.Orgs.Item.Actions.Permissions.SelfHostedRunners.Repositories.RepositoriesRequestBuilder(PathParameters, RequestAdapter); + } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public SelfHostedRunnersRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/orgs/{org}/actions/permissions/self-hosted-runners", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public SelfHostedRunnersRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/orgs/{org}/actions/permissions/self-hosted-runners", rawUrl) + { + } + /// + /// Gets the settings for self-hosted runners for an organization.OAuth app tokens and personal access tokens (classic) need the `admin:org` scope or the "Actions policies" fine-grained permission to use this endpoint. + /// API method documentation + /// + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 403 status code + /// When receiving a 404 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "403", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "404", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Models.SelfHostedRunnersSettings.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// Sets the settings for self-hosted runners for an organization.OAuth app tokens and personal access tokens (classic) need the `admin:org` scope or the "Actions policies" fine-grained permission to use this endpoint. + /// API method documentation + /// + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 403 status code + /// When receiving a 404 status code + /// When receiving a 409 status code + /// When receiving a 422 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PutAsync(global::Ayllu.Github.Client.Orgs.Item.Actions.Permissions.SelfHostedRunners.SelfHostedRunnersPutRequestBody body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task PutAsync(global::Ayllu.Github.Client.Orgs.Item.Actions.Permissions.SelfHostedRunners.SelfHostedRunnersPutRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPutRequestInformation(body, requestConfiguration); + var errorMapping = new Dictionary> + { + { "403", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "404", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "409", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "422", global::Ayllu.Github.Client.Models.ValidationError.CreateFromDiscriminatorValue }, + }; + await RequestAdapter.SendNoContentAsync(requestInfo, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// Gets the settings for self-hosted runners for an organization.OAuth app tokens and personal access tokens (classic) need the `admin:org` scope or the "Actions policies" fine-grained permission to use this endpoint. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Sets the settings for self-hosted runners for an organization.OAuth app tokens and personal access tokens (classic) need the `admin:org` scope or the "Actions policies" fine-grained permission to use this endpoint. + /// + /// A + /// The request body + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPutRequestInformation(global::Ayllu.Github.Client.Orgs.Item.Actions.Permissions.SelfHostedRunners.SelfHostedRunnersPutRequestBody body, Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToPutRequestInformation(global::Ayllu.Github.Client.Orgs.Item.Actions.Permissions.SelfHostedRunners.SelfHostedRunnersPutRequestBody body, Action> requestConfiguration = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation(Method.PUT, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.Orgs.Item.Actions.Permissions.SelfHostedRunners.SelfHostedRunnersRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Orgs.Item.Actions.Permissions.SelfHostedRunners.SelfHostedRunnersRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class SelfHostedRunnersRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class SelfHostedRunnersRequestBuilderPutRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Actions/Permissions/Workflow/WorkflowRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Actions/Permissions/Workflow/WorkflowRequestBuilder.cs new file mode 100644 index 0000000..6f9ffec --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Actions/Permissions/Workflow/WorkflowRequestBuilder.cs @@ -0,0 +1,142 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Orgs.Item.Actions.Permissions.Workflow +{ + /// + /// Builds and executes requests for operations under \orgs\{org}\actions\permissions\workflow + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WorkflowRequestBuilder : BaseRequestBuilder + { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public WorkflowRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/orgs/{org}/actions/permissions/workflow", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public WorkflowRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/orgs/{org}/actions/permissions/workflow", rawUrl) + { + } + /// + /// 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/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. + /// API method documentation + /// + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Models.ActionsGetDefaultWorkflowPermissions.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false); + } + /// + /// 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/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 + /// + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PutAsync(global::Ayllu.Github.Client.Models.ActionsSetDefaultWorkflowPermissions body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task PutAsync(global::Ayllu.Github.Client.Models.ActionsSetDefaultWorkflowPermissions body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPutRequestInformation(body, requestConfiguration); + await RequestAdapter.SendNoContentAsync(requestInfo, default, cancellationToken).ConfigureAwait(false); + } + /// + /// 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/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. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// 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/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. + /// + /// A + /// The request body + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPutRequestInformation(global::Ayllu.Github.Client.Models.ActionsSetDefaultWorkflowPermissions body, Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToPutRequestInformation(global::Ayllu.Github.Client.Models.ActionsSetDefaultWorkflowPermissions body, Action> requestConfiguration = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation(Method.PUT, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.Orgs.Item.Actions.Permissions.Workflow.WorkflowRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Orgs.Item.Actions.Permissions.Workflow.WorkflowRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WorkflowRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WorkflowRequestBuilderPutRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Actions/RunnerGroups/Item/HostedRunners/HostedRunnersGetResponse.cs b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Actions/RunnerGroups/Item/HostedRunners/HostedRunnersGetResponse.cs new file mode 100644 index 0000000..317df8f --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Actions/RunnerGroups/Item/HostedRunners/HostedRunnersGetResponse.cs @@ -0,0 +1,70 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Orgs.Item.Actions.RunnerGroups.Item.HostedRunners +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class HostedRunnersGetResponse : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The runners property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? Runners { get; set; } +#nullable restore +#else + public List Runners { get; set; } +#endif + /// The total_count property + public double? TotalCount { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public HostedRunnersGetResponse() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Orgs.Item.Actions.RunnerGroups.Item.HostedRunners.HostedRunnersGetResponse CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Orgs.Item.Actions.RunnerGroups.Item.HostedRunners.HostedRunnersGetResponse(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "runners", n => { Runners = n.GetCollectionOfObjectValues(global::Ayllu.Github.Client.Models.ActionsHostedRunner.CreateFromDiscriminatorValue)?.AsList(); } }, + { "total_count", n => { TotalCount = n.GetDoubleValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteCollectionOfObjectValues("runners", Runners); + writer.WriteDoubleValue("total_count", TotalCount); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Actions/RunnerGroups/Item/HostedRunners/HostedRunnersRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Actions/RunnerGroups/Item/HostedRunners/HostedRunnersRequestBuilder.cs new file mode 100644 index 0000000..197d13c --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Actions/RunnerGroups/Item/HostedRunners/HostedRunnersRequestBuilder.cs @@ -0,0 +1,125 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Orgs.Item.Actions.RunnerGroups.Item.HostedRunners +{ + /// + /// Builds and executes requests for operations under \orgs\{org}\actions\runner-groups\{runner_group_id}\hosted-runners + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class HostedRunnersRequestBuilder : BaseRequestBuilder + { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public HostedRunnersRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/orgs/{org}/actions/runner-groups/{runner_group_id}/hosted-runners{?page*,per_page*}", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public HostedRunnersRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/orgs/{org}/actions/runner-groups/{runner_group_id}/hosted-runners{?page*,per_page*}", rawUrl) + { + } + /// + /// Lists the GitHub-hosted runners in an organization group.OAuth app tokens and personal access tokens (classic) need the `admin:org` scope to use this endpoint. + /// API method documentation + /// + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsHostedRunnersGetResponseAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task GetAsHostedRunnersGetResponseAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Orgs.Item.Actions.RunnerGroups.Item.HostedRunners.HostedRunnersGetResponse.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false); + } + /// + /// Lists the GitHub-hosted runners in an organization group.OAuth app tokens and personal access tokens (classic) need the `admin:org` scope to use this endpoint. + /// API method documentation + /// + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + [Obsolete("This method is obsolete. Use GetAsHostedRunnersGetResponseAsync instead.")] +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Orgs.Item.Actions.RunnerGroups.Item.HostedRunners.HostedRunnersResponse.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false); + } + /// + /// Lists the GitHub-hosted runners in an organization group.OAuth app tokens and personal access tokens (classic) need the `admin:org` scope to use this endpoint. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.Orgs.Item.Actions.RunnerGroups.Item.HostedRunners.HostedRunnersRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Orgs.Item.Actions.RunnerGroups.Item.HostedRunners.HostedRunnersRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Lists the GitHub-hosted runners in an organization group.OAuth app tokens and personal access tokens (classic) need the `admin:org` scope to use this endpoint. + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class HostedRunnersRequestBuilderGetQueryParameters + { + /// The page number of the results to fetch. For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." + [QueryParameter("page")] + public int? Page { get; set; } + /// The number of results per page (max 100). For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." + [QueryParameter("per_page")] + public int? PerPage { get; set; } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class HostedRunnersRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Actions/RunnerGroups/Item/HostedRunners/HostedRunnersResponse.cs b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Actions/RunnerGroups/Item/HostedRunners/HostedRunnersResponse.cs new file mode 100644 index 0000000..0a65d76 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Actions/RunnerGroups/Item/HostedRunners/HostedRunnersResponse.cs @@ -0,0 +1,28 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Orgs.Item.Actions.RunnerGroups.Item.HostedRunners +{ + [Obsolete("This class is obsolete. Use HostedRunnersGetResponse instead.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class HostedRunnersResponse : global::Ayllu.Github.Client.Orgs.Item.Actions.RunnerGroups.Item.HostedRunners.HostedRunnersGetResponse, IParsable + #pragma warning restore CS1591 + { + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static new global::Ayllu.Github.Client.Orgs.Item.Actions.RunnerGroups.Item.HostedRunners.HostedRunnersResponse CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Orgs.Item.Actions.RunnerGroups.Item.HostedRunners.HostedRunnersResponse(); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Actions/RunnerGroups/Item/Repositories/Item/WithRepository_ItemRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Actions/RunnerGroups/Item/Repositories/Item/WithRepository_ItemRequestBuilder.cs new file mode 100644 index 0000000..0defd7d --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Actions/RunnerGroups/Item/Repositories/Item/WithRepository_ItemRequestBuilder.cs @@ -0,0 +1,134 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Orgs.Item.Actions.RunnerGroups.Item.Repositories.Item +{ + /// + /// Builds and executes requests for operations under \orgs\{org}\actions\runner-groups\{runner_group_id}\repositories\{repository_id} + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithRepository_ItemRequestBuilder : BaseRequestBuilder + { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public WithRepository_ItemRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/orgs/{org}/actions/runner-groups/{runner_group_id}/repositories/{repository_id}", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public WithRepository_ItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/orgs/{org}/actions/runner-groups/{runner_group_id}/repositories/{repository_id}", rawUrl) + { + } + /// + /// 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 + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task DeleteAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task DeleteAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToDeleteRequestInformation(requestConfiguration); + await RequestAdapter.SendNoContentAsync(requestInfo, default, cancellationToken).ConfigureAwait(false); + } + /// + /// 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 + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PutAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task PutAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToPutRequestInformation(requestConfiguration); + await RequestAdapter.SendNoContentAsync(requestInfo, default, cancellationToken).ConfigureAwait(false); + } + /// + /// 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. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToDeleteRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToDeleteRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.DELETE, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + return requestInfo; + } + /// + /// 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. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPutRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToPutRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.PUT, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.Orgs.Item.Actions.RunnerGroups.Item.Repositories.Item.WithRepository_ItemRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Orgs.Item.Actions.RunnerGroups.Item.Repositories.Item.WithRepository_ItemRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithRepository_ItemRequestBuilderDeleteRequestConfiguration : RequestConfiguration + { + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithRepository_ItemRequestBuilderPutRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Actions/RunnerGroups/Item/Repositories/RepositoriesGetResponse.cs b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Actions/RunnerGroups/Item/Repositories/RepositoriesGetResponse.cs new file mode 100644 index 0000000..8ad7bb6 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Actions/RunnerGroups/Item/Repositories/RepositoriesGetResponse.cs @@ -0,0 +1,70 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Orgs.Item.Actions.RunnerGroups.Item.Repositories +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class RepositoriesGetResponse : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The repositories property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? Repositories { get; set; } +#nullable restore +#else + public List Repositories { get; set; } +#endif + /// The total_count property + public double? TotalCount { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public RepositoriesGetResponse() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Orgs.Item.Actions.RunnerGroups.Item.Repositories.RepositoriesGetResponse CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Orgs.Item.Actions.RunnerGroups.Item.Repositories.RepositoriesGetResponse(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "repositories", n => { Repositories = n.GetCollectionOfObjectValues(global::Ayllu.Github.Client.Models.MinimalRepository.CreateFromDiscriminatorValue)?.AsList(); } }, + { "total_count", n => { TotalCount = n.GetDoubleValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteCollectionOfObjectValues("repositories", Repositories); + writer.WriteDoubleValue("total_count", TotalCount); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Actions/RunnerGroups/Item/Repositories/RepositoriesPutRequestBody.cs b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Actions/RunnerGroups/Item/Repositories/RepositoriesPutRequestBody.cs new file mode 100644 index 0000000..ff9d950 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Actions/RunnerGroups/Item/Repositories/RepositoriesPutRequestBody.cs @@ -0,0 +1,65 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Orgs.Item.Actions.RunnerGroups.Item.Repositories +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class RepositoriesPutRequestBody : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// List of repository IDs that can access the runner group. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? SelectedRepositoryIds { get; set; } +#nullable restore +#else + public List SelectedRepositoryIds { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public RepositoriesPutRequestBody() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Orgs.Item.Actions.RunnerGroups.Item.Repositories.RepositoriesPutRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Orgs.Item.Actions.RunnerGroups.Item.Repositories.RepositoriesPutRequestBody(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "selected_repository_ids", n => { SelectedRepositoryIds = n.GetCollectionOfPrimitiveValues()?.AsList(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteCollectionOfPrimitiveValues("selected_repository_ids", SelectedRepositoryIds); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Actions/RunnerGroups/Item/Repositories/RepositoriesRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Actions/RunnerGroups/Item/Repositories/RepositoriesRequestBuilder.cs new file mode 100644 index 0000000..490fdcc --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Actions/RunnerGroups/Item/Repositories/RepositoriesRequestBuilder.cs @@ -0,0 +1,200 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Orgs.Item.Actions.RunnerGroups.Item.Repositories.Item; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Orgs.Item.Actions.RunnerGroups.Item.Repositories +{ + /// + /// Builds and executes requests for operations under \orgs\{org}\actions\runner-groups\{runner_group_id}\repositories + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class RepositoriesRequestBuilder : BaseRequestBuilder + { + /// Gets an item from the Ayllu.Github.Client.orgs.item.actions.runnerGroups.item.repositories.item collection + /// The unique identifier of the repository. + /// A + public global::Ayllu.Github.Client.Orgs.Item.Actions.RunnerGroups.Item.Repositories.Item.WithRepository_ItemRequestBuilder this[int position] + { + get + { + var urlTplParams = new Dictionary(PathParameters); + urlTplParams.Add("repository_id", position); + return new global::Ayllu.Github.Client.Orgs.Item.Actions.RunnerGroups.Item.Repositories.Item.WithRepository_ItemRequestBuilder(urlTplParams, RequestAdapter); + } + } + /// Gets an item from the Ayllu.Github.Client.orgs.item.actions.runnerGroups.item.repositories.item collection + /// The unique identifier of the repository. + /// A + [Obsolete("This indexer is deprecated and will be removed in the next major version. Use the one with the typed parameter instead.")] + public global::Ayllu.Github.Client.Orgs.Item.Actions.RunnerGroups.Item.Repositories.Item.WithRepository_ItemRequestBuilder this[string position] + { + get + { + var urlTplParams = new Dictionary(PathParameters); + if (!string.IsNullOrWhiteSpace(position)) urlTplParams.Add("repository_id", position); + return new global::Ayllu.Github.Client.Orgs.Item.Actions.RunnerGroups.Item.Repositories.Item.WithRepository_ItemRequestBuilder(urlTplParams, RequestAdapter); + } + } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public RepositoriesRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/orgs/{org}/actions/runner-groups/{runner_group_id}/repositories{?page*,per_page*}", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public RepositoriesRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/orgs/{org}/actions/runner-groups/{runner_group_id}/repositories{?page*,per_page*}", rawUrl) + { + } + /// + /// 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. + /// API method documentation + /// + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsRepositoriesGetResponseAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task GetAsRepositoriesGetResponseAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Orgs.Item.Actions.RunnerGroups.Item.Repositories.RepositoriesGetResponse.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false); + } + /// + /// 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. + /// API method documentation + /// + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + [Obsolete("This method is obsolete. Use GetAsRepositoriesGetResponseAsync instead.")] +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Orgs.Item.Actions.RunnerGroups.Item.Repositories.RepositoriesResponse.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false); + } + /// + /// 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 + /// + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PutAsync(global::Ayllu.Github.Client.Orgs.Item.Actions.RunnerGroups.Item.Repositories.RepositoriesPutRequestBody body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task PutAsync(global::Ayllu.Github.Client.Orgs.Item.Actions.RunnerGroups.Item.Repositories.RepositoriesPutRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPutRequestInformation(body, requestConfiguration); + await RequestAdapter.SendNoContentAsync(requestInfo, default, cancellationToken).ConfigureAwait(false); + } + /// + /// 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. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// 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. + /// + /// A + /// The request body + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPutRequestInformation(global::Ayllu.Github.Client.Orgs.Item.Actions.RunnerGroups.Item.Repositories.RepositoriesPutRequestBody body, Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToPutRequestInformation(global::Ayllu.Github.Client.Orgs.Item.Actions.RunnerGroups.Item.Repositories.RepositoriesPutRequestBody body, Action> requestConfiguration = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation(Method.PUT, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.Orgs.Item.Actions.RunnerGroups.Item.Repositories.RepositoriesRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Orgs.Item.Actions.RunnerGroups.Item.Repositories.RepositoriesRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// 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. + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class RepositoriesRequestBuilderGetQueryParameters + { + /// The page number of the results to fetch. For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." + [QueryParameter("page")] + public int? Page { get; set; } + /// The number of results per page (max 100). For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." + [QueryParameter("per_page")] + public int? PerPage { get; set; } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class RepositoriesRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class RepositoriesRequestBuilderPutRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Actions/RunnerGroups/Item/Repositories/RepositoriesResponse.cs b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Actions/RunnerGroups/Item/Repositories/RepositoriesResponse.cs new file mode 100644 index 0000000..f067d96 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Actions/RunnerGroups/Item/Repositories/RepositoriesResponse.cs @@ -0,0 +1,28 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Orgs.Item.Actions.RunnerGroups.Item.Repositories +{ + [Obsolete("This class is obsolete. Use RepositoriesGetResponse instead.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class RepositoriesResponse : global::Ayllu.Github.Client.Orgs.Item.Actions.RunnerGroups.Item.Repositories.RepositoriesGetResponse, IParsable + #pragma warning restore CS1591 + { + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static new global::Ayllu.Github.Client.Orgs.Item.Actions.RunnerGroups.Item.Repositories.RepositoriesResponse CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Orgs.Item.Actions.RunnerGroups.Item.Repositories.RepositoriesResponse(); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Actions/RunnerGroups/Item/Runners/Item/WithRunner_ItemRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Actions/RunnerGroups/Item/Runners/Item/WithRunner_ItemRequestBuilder.cs new file mode 100644 index 0000000..607b186 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Actions/RunnerGroups/Item/Runners/Item/WithRunner_ItemRequestBuilder.cs @@ -0,0 +1,134 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Orgs.Item.Actions.RunnerGroups.Item.Runners.Item +{ + /// + /// Builds and executes requests for operations under \orgs\{org}\actions\runner-groups\{runner_group_id}\runners\{runner_id} + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithRunner_ItemRequestBuilder : BaseRequestBuilder + { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public WithRunner_ItemRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/orgs/{org}/actions/runner-groups/{runner_group_id}/runners/{runner_id}", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public WithRunner_ItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/orgs/{org}/actions/runner-groups/{runner_group_id}/runners/{runner_id}", rawUrl) + { + } + /// + /// 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 + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task DeleteAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task DeleteAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToDeleteRequestInformation(requestConfiguration); + await RequestAdapter.SendNoContentAsync(requestInfo, default, cancellationToken).ConfigureAwait(false); + } + /// + /// 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 + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PutAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task PutAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToPutRequestInformation(requestConfiguration); + await RequestAdapter.SendNoContentAsync(requestInfo, default, cancellationToken).ConfigureAwait(false); + } + /// + /// 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. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToDeleteRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToDeleteRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.DELETE, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + return requestInfo; + } + /// + /// 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. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPutRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToPutRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.PUT, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.Orgs.Item.Actions.RunnerGroups.Item.Runners.Item.WithRunner_ItemRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Orgs.Item.Actions.RunnerGroups.Item.Runners.Item.WithRunner_ItemRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithRunner_ItemRequestBuilderDeleteRequestConfiguration : RequestConfiguration + { + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithRunner_ItemRequestBuilderPutRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Actions/RunnerGroups/Item/Runners/RunnersGetResponse.cs b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Actions/RunnerGroups/Item/Runners/RunnersGetResponse.cs new file mode 100644 index 0000000..962a74f --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Actions/RunnerGroups/Item/Runners/RunnersGetResponse.cs @@ -0,0 +1,70 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Orgs.Item.Actions.RunnerGroups.Item.Runners +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class RunnersGetResponse : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The runners property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? Runners { get; set; } +#nullable restore +#else + public List Runners { get; set; } +#endif + /// The total_count property + public double? TotalCount { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public RunnersGetResponse() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Orgs.Item.Actions.RunnerGroups.Item.Runners.RunnersGetResponse CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Orgs.Item.Actions.RunnerGroups.Item.Runners.RunnersGetResponse(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "runners", n => { Runners = n.GetCollectionOfObjectValues(global::Ayllu.Github.Client.Models.Runner.CreateFromDiscriminatorValue)?.AsList(); } }, + { "total_count", n => { TotalCount = n.GetDoubleValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteCollectionOfObjectValues("runners", Runners); + writer.WriteDoubleValue("total_count", TotalCount); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Actions/RunnerGroups/Item/Runners/RunnersPutRequestBody.cs b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Actions/RunnerGroups/Item/Runners/RunnersPutRequestBody.cs new file mode 100644 index 0000000..6c5b28a --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Actions/RunnerGroups/Item/Runners/RunnersPutRequestBody.cs @@ -0,0 +1,65 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Orgs.Item.Actions.RunnerGroups.Item.Runners +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class RunnersPutRequestBody : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// List of runner IDs to add to the runner group. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? Runners { get; set; } +#nullable restore +#else + public List Runners { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public RunnersPutRequestBody() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Orgs.Item.Actions.RunnerGroups.Item.Runners.RunnersPutRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Orgs.Item.Actions.RunnerGroups.Item.Runners.RunnersPutRequestBody(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "runners", n => { Runners = n.GetCollectionOfPrimitiveValues()?.AsList(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteCollectionOfPrimitiveValues("runners", Runners); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Actions/RunnerGroups/Item/Runners/RunnersRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Actions/RunnerGroups/Item/Runners/RunnersRequestBuilder.cs new file mode 100644 index 0000000..36a2fdf --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Actions/RunnerGroups/Item/Runners/RunnersRequestBuilder.cs @@ -0,0 +1,200 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Orgs.Item.Actions.RunnerGroups.Item.Runners.Item; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Orgs.Item.Actions.RunnerGroups.Item.Runners +{ + /// + /// Builds and executes requests for operations under \orgs\{org}\actions\runner-groups\{runner_group_id}\runners + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class RunnersRequestBuilder : BaseRequestBuilder + { + /// Gets an item from the Ayllu.Github.Client.orgs.item.actions.runnerGroups.item.runners.item collection + /// Unique identifier of the self-hosted runner. + /// A + public global::Ayllu.Github.Client.Orgs.Item.Actions.RunnerGroups.Item.Runners.Item.WithRunner_ItemRequestBuilder this[int position] + { + get + { + var urlTplParams = new Dictionary(PathParameters); + urlTplParams.Add("runner_id", position); + return new global::Ayllu.Github.Client.Orgs.Item.Actions.RunnerGroups.Item.Runners.Item.WithRunner_ItemRequestBuilder(urlTplParams, RequestAdapter); + } + } + /// Gets an item from the Ayllu.Github.Client.orgs.item.actions.runnerGroups.item.runners.item collection + /// Unique identifier of the self-hosted runner. + /// A + [Obsolete("This indexer is deprecated and will be removed in the next major version. Use the one with the typed parameter instead.")] + public global::Ayllu.Github.Client.Orgs.Item.Actions.RunnerGroups.Item.Runners.Item.WithRunner_ItemRequestBuilder this[string position] + { + get + { + var urlTplParams = new Dictionary(PathParameters); + if (!string.IsNullOrWhiteSpace(position)) urlTplParams.Add("runner_id", position); + return new global::Ayllu.Github.Client.Orgs.Item.Actions.RunnerGroups.Item.Runners.Item.WithRunner_ItemRequestBuilder(urlTplParams, RequestAdapter); + } + } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public RunnersRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/orgs/{org}/actions/runner-groups/{runner_group_id}/runners{?page*,per_page*}", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public RunnersRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/orgs/{org}/actions/runner-groups/{runner_group_id}/runners{?page*,per_page*}", rawUrl) + { + } + /// + /// 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. + /// API method documentation + /// + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsRunnersGetResponseAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task GetAsRunnersGetResponseAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Orgs.Item.Actions.RunnerGroups.Item.Runners.RunnersGetResponse.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false); + } + /// + /// 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. + /// API method documentation + /// + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + [Obsolete("This method is obsolete. Use GetAsRunnersGetResponseAsync instead.")] +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Orgs.Item.Actions.RunnerGroups.Item.Runners.RunnersResponse.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false); + } + /// + /// 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 + /// + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PutAsync(global::Ayllu.Github.Client.Orgs.Item.Actions.RunnerGroups.Item.Runners.RunnersPutRequestBody body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task PutAsync(global::Ayllu.Github.Client.Orgs.Item.Actions.RunnerGroups.Item.Runners.RunnersPutRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPutRequestInformation(body, requestConfiguration); + await RequestAdapter.SendNoContentAsync(requestInfo, default, cancellationToken).ConfigureAwait(false); + } + /// + /// 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. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// 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. + /// + /// A + /// The request body + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPutRequestInformation(global::Ayllu.Github.Client.Orgs.Item.Actions.RunnerGroups.Item.Runners.RunnersPutRequestBody body, Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToPutRequestInformation(global::Ayllu.Github.Client.Orgs.Item.Actions.RunnerGroups.Item.Runners.RunnersPutRequestBody body, Action> requestConfiguration = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation(Method.PUT, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.Orgs.Item.Actions.RunnerGroups.Item.Runners.RunnersRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Orgs.Item.Actions.RunnerGroups.Item.Runners.RunnersRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// 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. + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class RunnersRequestBuilderGetQueryParameters + { + /// The page number of the results to fetch. For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." + [QueryParameter("page")] + public int? Page { get; set; } + /// The number of results per page (max 100). For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." + [QueryParameter("per_page")] + public int? PerPage { get; set; } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class RunnersRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class RunnersRequestBuilderPutRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Actions/RunnerGroups/Item/Runners/RunnersResponse.cs b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Actions/RunnerGroups/Item/Runners/RunnersResponse.cs new file mode 100644 index 0000000..e1e041d --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Actions/RunnerGroups/Item/Runners/RunnersResponse.cs @@ -0,0 +1,28 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Orgs.Item.Actions.RunnerGroups.Item.Runners +{ + [Obsolete("This class is obsolete. Use RunnersGetResponse instead.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class RunnersResponse : global::Ayllu.Github.Client.Orgs.Item.Actions.RunnerGroups.Item.Runners.RunnersGetResponse, IParsable + #pragma warning restore CS1591 + { + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static new global::Ayllu.Github.Client.Orgs.Item.Actions.RunnerGroups.Item.Runners.RunnersResponse CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Orgs.Item.Actions.RunnerGroups.Item.Runners.RunnersResponse(); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Actions/RunnerGroups/Item/WithRunner_group_ItemRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Actions/RunnerGroups/Item/WithRunner_group_ItemRequestBuilder.cs new file mode 100644 index 0000000..3b2a6ee --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Actions/RunnerGroups/Item/WithRunner_group_ItemRequestBuilder.cs @@ -0,0 +1,206 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Ayllu.Github.Client.Orgs.Item.Actions.RunnerGroups.Item.HostedRunners; +using Ayllu.Github.Client.Orgs.Item.Actions.RunnerGroups.Item.Repositories; +using Ayllu.Github.Client.Orgs.Item.Actions.RunnerGroups.Item.Runners; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Orgs.Item.Actions.RunnerGroups.Item +{ + /// + /// Builds and executes requests for operations under \orgs\{org}\actions\runner-groups\{runner_group_id} + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithRunner_group_ItemRequestBuilder : BaseRequestBuilder + { + /// The hostedRunners property + public global::Ayllu.Github.Client.Orgs.Item.Actions.RunnerGroups.Item.HostedRunners.HostedRunnersRequestBuilder HostedRunners + { + get => new global::Ayllu.Github.Client.Orgs.Item.Actions.RunnerGroups.Item.HostedRunners.HostedRunnersRequestBuilder(PathParameters, RequestAdapter); + } + /// The repositories property + public global::Ayllu.Github.Client.Orgs.Item.Actions.RunnerGroups.Item.Repositories.RepositoriesRequestBuilder Repositories + { + get => new global::Ayllu.Github.Client.Orgs.Item.Actions.RunnerGroups.Item.Repositories.RepositoriesRequestBuilder(PathParameters, RequestAdapter); + } + /// The runners property + public global::Ayllu.Github.Client.Orgs.Item.Actions.RunnerGroups.Item.Runners.RunnersRequestBuilder Runners + { + get => new global::Ayllu.Github.Client.Orgs.Item.Actions.RunnerGroups.Item.Runners.RunnersRequestBuilder(PathParameters, RequestAdapter); + } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public WithRunner_group_ItemRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/orgs/{org}/actions/runner-groups/{runner_group_id}", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public WithRunner_group_ItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/orgs/{org}/actions/runner-groups/{runner_group_id}", rawUrl) + { + } + /// + /// 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 + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task DeleteAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task DeleteAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToDeleteRequestInformation(requestConfiguration); + await RequestAdapter.SendNoContentAsync(requestInfo, default, cancellationToken).ConfigureAwait(false); + } + /// + /// 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. + /// API method documentation + /// + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Models.RunnerGroupsOrg.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false); + } + /// + /// 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. + /// API method documentation + /// + /// A + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PatchAsync(global::Ayllu.Github.Client.Orgs.Item.Actions.RunnerGroups.Item.WithRunner_group_PatchRequestBody body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task PatchAsync(global::Ayllu.Github.Client.Orgs.Item.Actions.RunnerGroups.Item.WithRunner_group_PatchRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPatchRequestInformation(body, requestConfiguration); + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Models.RunnerGroupsOrg.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false); + } + /// + /// 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. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToDeleteRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToDeleteRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.DELETE, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + return requestInfo; + } + /// + /// 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. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// 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. + /// + /// A + /// The request body + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPatchRequestInformation(global::Ayllu.Github.Client.Orgs.Item.Actions.RunnerGroups.Item.WithRunner_group_PatchRequestBody body, Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToPatchRequestInformation(global::Ayllu.Github.Client.Orgs.Item.Actions.RunnerGroups.Item.WithRunner_group_PatchRequestBody body, Action> requestConfiguration = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.Orgs.Item.Actions.RunnerGroups.Item.WithRunner_group_ItemRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Orgs.Item.Actions.RunnerGroups.Item.WithRunner_group_ItemRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithRunner_group_ItemRequestBuilderDeleteRequestConfiguration : RequestConfiguration + { + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithRunner_group_ItemRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithRunner_group_ItemRequestBuilderPatchRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Actions/RunnerGroups/Item/WithRunner_group_PatchRequestBody.cs b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Actions/RunnerGroups/Item/WithRunner_group_PatchRequestBody.cs new file mode 100644 index 0000000..dbf0032 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Actions/RunnerGroups/Item/WithRunner_group_PatchRequestBody.cs @@ -0,0 +1,97 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Orgs.Item.Actions.RunnerGroups.Item +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class WithRunner_group_PatchRequestBody : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// Whether the runner group can be used by `public` repositories. + public bool? AllowsPublicRepositories { get; set; } + /// Name of the runner group. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Name { get; set; } +#nullable restore +#else + public string Name { get; set; } +#endif + /// The identifier of a hosted compute network configuration. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? NetworkConfigurationId { get; set; } +#nullable restore +#else + public string NetworkConfigurationId { get; set; } +#endif + /// If `true`, the runner group will be restricted to running only the workflows specified in the `selected_workflows` array. + public bool? RestrictedToWorkflows { get; set; } + /// List of workflows the runner group should be allowed to run. This setting will be ignored unless `restricted_to_workflows` is set to `true`. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? SelectedWorkflows { get; set; } +#nullable restore +#else + public List SelectedWorkflows { get; set; } +#endif + /// Visibility of a runner group. You can select all repositories, select individual repositories, or all private repositories. + public global::Ayllu.Github.Client.Orgs.Item.Actions.RunnerGroups.Item.WithRunner_group_PatchRequestBody_visibility? Visibility { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public WithRunner_group_PatchRequestBody() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Orgs.Item.Actions.RunnerGroups.Item.WithRunner_group_PatchRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Orgs.Item.Actions.RunnerGroups.Item.WithRunner_group_PatchRequestBody(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "allows_public_repositories", n => { AllowsPublicRepositories = n.GetBoolValue(); } }, + { "name", n => { Name = n.GetStringValue(); } }, + { "network_configuration_id", n => { NetworkConfigurationId = n.GetStringValue(); } }, + { "restricted_to_workflows", n => { RestrictedToWorkflows = n.GetBoolValue(); } }, + { "selected_workflows", n => { SelectedWorkflows = n.GetCollectionOfPrimitiveValues()?.AsList(); } }, + { "visibility", n => { Visibility = n.GetEnumValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteBoolValue("allows_public_repositories", AllowsPublicRepositories); + writer.WriteStringValue("name", Name); + writer.WriteStringValue("network_configuration_id", NetworkConfigurationId); + writer.WriteBoolValue("restricted_to_workflows", RestrictedToWorkflows); + writer.WriteCollectionOfPrimitiveValues("selected_workflows", SelectedWorkflows); + writer.WriteEnumValue("visibility", Visibility); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Actions/RunnerGroups/Item/WithRunner_group_PatchRequestBody_visibility.cs b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Actions/RunnerGroups/Item/WithRunner_group_PatchRequestBody_visibility.cs new file mode 100644 index 0000000..299835f --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Actions/RunnerGroups/Item/WithRunner_group_PatchRequestBody_visibility.cs @@ -0,0 +1,23 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Orgs.Item.Actions.RunnerGroups.Item +{ + /// Visibility of a runner group. You can select all repositories, select individual repositories, or all private repositories. + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public enum WithRunner_group_PatchRequestBody_visibility + { + [EnumMember(Value = "selected")] + #pragma warning disable CS1591 + Selected, + #pragma warning restore CS1591 + [EnumMember(Value = "all")] + #pragma warning disable CS1591 + All, + #pragma warning restore CS1591 + [EnumMember(Value = "private")] + #pragma warning disable CS1591 + Private, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Actions/RunnerGroups/RunnerGroupsGetResponse.cs b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Actions/RunnerGroups/RunnerGroupsGetResponse.cs new file mode 100644 index 0000000..2d599e8 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Actions/RunnerGroups/RunnerGroupsGetResponse.cs @@ -0,0 +1,70 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Orgs.Item.Actions.RunnerGroups +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class RunnerGroupsGetResponse : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The runner_groups property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? RunnerGroups { get; set; } +#nullable restore +#else + public List RunnerGroups { get; set; } +#endif + /// The total_count property + public double? TotalCount { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public RunnerGroupsGetResponse() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Orgs.Item.Actions.RunnerGroups.RunnerGroupsGetResponse CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Orgs.Item.Actions.RunnerGroups.RunnerGroupsGetResponse(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "runner_groups", n => { RunnerGroups = n.GetCollectionOfObjectValues(global::Ayllu.Github.Client.Models.RunnerGroupsOrg.CreateFromDiscriminatorValue)?.AsList(); } }, + { "total_count", n => { TotalCount = n.GetDoubleValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteCollectionOfObjectValues("runner_groups", RunnerGroups); + writer.WriteDoubleValue("total_count", TotalCount); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Actions/RunnerGroups/RunnerGroupsPostRequestBody.cs b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Actions/RunnerGroups/RunnerGroupsPostRequestBody.cs new file mode 100644 index 0000000..6176653 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Actions/RunnerGroups/RunnerGroupsPostRequestBody.cs @@ -0,0 +1,118 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Orgs.Item.Actions.RunnerGroups +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class RunnerGroupsPostRequestBody : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// Whether the runner group can be used by `public` repositories. + public bool? AllowsPublicRepositories { get; set; } + /// Name of the runner group. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Name { get; set; } +#nullable restore +#else + public string Name { get; set; } +#endif + /// The identifier of a hosted compute network configuration. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? NetworkConfigurationId { get; set; } +#nullable restore +#else + public string NetworkConfigurationId { get; set; } +#endif + /// If `true`, the runner group will be restricted to running only the workflows specified in the `selected_workflows` array. + public bool? RestrictedToWorkflows { get; set; } + /// List of runner IDs to add to the runner group. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? Runners { get; set; } +#nullable restore +#else + public List Runners { get; set; } +#endif + /// List of repository IDs that can access the runner group. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? SelectedRepositoryIds { get; set; } +#nullable restore +#else + public List SelectedRepositoryIds { get; set; } +#endif + /// List of workflows the runner group should be allowed to run. This setting will be ignored unless `restricted_to_workflows` is set to `true`. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? SelectedWorkflows { get; set; } +#nullable restore +#else + public List SelectedWorkflows { get; set; } +#endif + /// Visibility of a runner group. You can select all repositories, select individual repositories, or limit access to private repositories. + public global::Ayllu.Github.Client.Orgs.Item.Actions.RunnerGroups.RunnerGroupsPostRequestBody_visibility? Visibility { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public RunnerGroupsPostRequestBody() + { + AdditionalData = new Dictionary(); + Visibility = global::Ayllu.Github.Client.Orgs.Item.Actions.RunnerGroups.RunnerGroupsPostRequestBody_visibility.All; + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Orgs.Item.Actions.RunnerGroups.RunnerGroupsPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Orgs.Item.Actions.RunnerGroups.RunnerGroupsPostRequestBody(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "allows_public_repositories", n => { AllowsPublicRepositories = n.GetBoolValue(); } }, + { "name", n => { Name = n.GetStringValue(); } }, + { "network_configuration_id", n => { NetworkConfigurationId = n.GetStringValue(); } }, + { "restricted_to_workflows", n => { RestrictedToWorkflows = n.GetBoolValue(); } }, + { "runners", n => { Runners = n.GetCollectionOfPrimitiveValues()?.AsList(); } }, + { "selected_repository_ids", n => { SelectedRepositoryIds = n.GetCollectionOfPrimitiveValues()?.AsList(); } }, + { "selected_workflows", n => { SelectedWorkflows = n.GetCollectionOfPrimitiveValues()?.AsList(); } }, + { "visibility", n => { Visibility = n.GetEnumValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteBoolValue("allows_public_repositories", AllowsPublicRepositories); + writer.WriteStringValue("name", Name); + writer.WriteStringValue("network_configuration_id", NetworkConfigurationId); + writer.WriteBoolValue("restricted_to_workflows", RestrictedToWorkflows); + writer.WriteCollectionOfPrimitiveValues("runners", Runners); + writer.WriteCollectionOfPrimitiveValues("selected_repository_ids", SelectedRepositoryIds); + writer.WriteCollectionOfPrimitiveValues("selected_workflows", SelectedWorkflows); + writer.WriteEnumValue("visibility", Visibility); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Actions/RunnerGroups/RunnerGroupsPostRequestBody_visibility.cs b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Actions/RunnerGroups/RunnerGroupsPostRequestBody_visibility.cs new file mode 100644 index 0000000..dc06c6c --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Actions/RunnerGroups/RunnerGroupsPostRequestBody_visibility.cs @@ -0,0 +1,23 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Orgs.Item.Actions.RunnerGroups +{ + /// Visibility of a runner group. You can select all repositories, select individual repositories, or limit access to private repositories. + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public enum RunnerGroupsPostRequestBody_visibility + { + [EnumMember(Value = "selected")] + #pragma warning disable CS1591 + Selected, + #pragma warning restore CS1591 + [EnumMember(Value = "all")] + #pragma warning disable CS1591 + All, + #pragma warning restore CS1591 + [EnumMember(Value = "private")] + #pragma warning disable CS1591 + Private, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Actions/RunnerGroups/RunnerGroupsRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Actions/RunnerGroups/RunnerGroupsRequestBuilder.cs new file mode 100644 index 0000000..91d381c --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Actions/RunnerGroups/RunnerGroupsRequestBuilder.cs @@ -0,0 +1,213 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Ayllu.Github.Client.Orgs.Item.Actions.RunnerGroups.Item; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Orgs.Item.Actions.RunnerGroups +{ + /// + /// Builds and executes requests for operations under \orgs\{org}\actions\runner-groups + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class RunnerGroupsRequestBuilder : BaseRequestBuilder + { + /// Gets an item from the Ayllu.Github.Client.orgs.item.actions.runnerGroups.item collection + /// Unique identifier of the self-hosted runner group. + /// A + public global::Ayllu.Github.Client.Orgs.Item.Actions.RunnerGroups.Item.WithRunner_group_ItemRequestBuilder this[int position] + { + get + { + var urlTplParams = new Dictionary(PathParameters); + urlTplParams.Add("runner_group_id", position); + return new global::Ayllu.Github.Client.Orgs.Item.Actions.RunnerGroups.Item.WithRunner_group_ItemRequestBuilder(urlTplParams, RequestAdapter); + } + } + /// Gets an item from the Ayllu.Github.Client.orgs.item.actions.runnerGroups.item collection + /// Unique identifier of the self-hosted runner group. + /// A + [Obsolete("This indexer is deprecated and will be removed in the next major version. Use the one with the typed parameter instead.")] + public global::Ayllu.Github.Client.Orgs.Item.Actions.RunnerGroups.Item.WithRunner_group_ItemRequestBuilder this[string position] + { + get + { + var urlTplParams = new Dictionary(PathParameters); + if (!string.IsNullOrWhiteSpace(position)) urlTplParams.Add("runner_group_id", position); + return new global::Ayllu.Github.Client.Orgs.Item.Actions.RunnerGroups.Item.WithRunner_group_ItemRequestBuilder(urlTplParams, RequestAdapter); + } + } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public RunnerGroupsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/orgs/{org}/actions/runner-groups{?page*,per_page*,visible_to_repository*}", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public RunnerGroupsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/orgs/{org}/actions/runner-groups{?page*,per_page*,visible_to_repository*}", rawUrl) + { + } + /// + /// 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. + /// API method documentation + /// + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsRunnerGroupsGetResponseAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task GetAsRunnerGroupsGetResponseAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Orgs.Item.Actions.RunnerGroups.RunnerGroupsGetResponse.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false); + } + /// + /// 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. + /// API method documentation + /// + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + [Obsolete("This method is obsolete. Use GetAsRunnerGroupsGetResponseAsync instead.")] +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Orgs.Item.Actions.RunnerGroups.RunnerGroupsResponse.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false); + } + /// + /// 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. + /// API method documentation + /// + /// A + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PostAsync(global::Ayllu.Github.Client.Orgs.Item.Actions.RunnerGroups.RunnerGroupsPostRequestBody body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task PostAsync(global::Ayllu.Github.Client.Orgs.Item.Actions.RunnerGroups.RunnerGroupsPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPostRequestInformation(body, requestConfiguration); + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Models.RunnerGroupsOrg.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false); + } + /// + /// 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. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// 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. + /// + /// A + /// The request body + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPostRequestInformation(global::Ayllu.Github.Client.Orgs.Item.Actions.RunnerGroups.RunnerGroupsPostRequestBody body, Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToPostRequestInformation(global::Ayllu.Github.Client.Orgs.Item.Actions.RunnerGroups.RunnerGroupsPostRequestBody body, Action> requestConfiguration = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.Orgs.Item.Actions.RunnerGroups.RunnerGroupsRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Orgs.Item.Actions.RunnerGroups.RunnerGroupsRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// 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. + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class RunnerGroupsRequestBuilderGetQueryParameters + { + /// The page number of the results to fetch. For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." + [QueryParameter("page")] + public int? Page { get; set; } + /// The number of results per page (max 100). For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." + [QueryParameter("per_page")] + public int? PerPage { get; set; } + /// Only return runner groups that are allowed to be used by this repository. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("visible_to_repository")] + public string? VisibleToRepository { get; set; } +#nullable restore +#else + [QueryParameter("visible_to_repository")] + public string VisibleToRepository { get; set; } +#endif + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class RunnerGroupsRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class RunnerGroupsRequestBuilderPostRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Actions/RunnerGroups/RunnerGroupsResponse.cs b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Actions/RunnerGroups/RunnerGroupsResponse.cs new file mode 100644 index 0000000..2494ad4 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Actions/RunnerGroups/RunnerGroupsResponse.cs @@ -0,0 +1,28 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Orgs.Item.Actions.RunnerGroups +{ + [Obsolete("This class is obsolete. Use RunnerGroupsGetResponse instead.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class RunnerGroupsResponse : global::Ayllu.Github.Client.Orgs.Item.Actions.RunnerGroups.RunnerGroupsGetResponse, IParsable + #pragma warning restore CS1591 + { + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static new global::Ayllu.Github.Client.Orgs.Item.Actions.RunnerGroups.RunnerGroupsResponse CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Orgs.Item.Actions.RunnerGroups.RunnerGroupsResponse(); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Actions/Runners/Downloads/DownloadsRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Actions/Runners/Downloads/DownloadsRequestBuilder.cs new file mode 100644 index 0000000..17ab2bb --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Actions/Runners/Downloads/DownloadsRequestBuilder.cs @@ -0,0 +1,94 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Orgs.Item.Actions.Runners.Downloads +{ + /// + /// Builds and executes requests for operations under \orgs\{org}\actions\runners\downloads + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class DownloadsRequestBuilder : BaseRequestBuilder + { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public DownloadsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/orgs/{org}/actions/runners/downloads", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public DownloadsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/orgs/{org}/actions/runners/downloads", rawUrl) + { + } + /// + /// 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. + /// API method documentation + /// + /// A List<global::Ayllu.Github.Client.Models.RunnerApplication> + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task?> GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task> GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var collectionResult = await RequestAdapter.SendCollectionAsync(requestInfo, global::Ayllu.Github.Client.Models.RunnerApplication.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false); + return collectionResult?.AsList(); + } + /// + /// 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. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.Orgs.Item.Actions.Runners.Downloads.DownloadsRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Orgs.Item.Actions.Runners.Downloads.DownloadsRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class DownloadsRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Actions/Runners/GenerateJitconfig/GenerateJitconfigPostRequestBody.cs b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Actions/Runners/GenerateJitconfig/GenerateJitconfigPostRequestBody.cs new file mode 100644 index 0000000..fe8a338 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Actions/Runners/GenerateJitconfig/GenerateJitconfigPostRequestBody.cs @@ -0,0 +1,90 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Orgs.Item.Actions.Runners.GenerateJitconfig +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class GenerateJitconfigPostRequestBody : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The names of the custom labels to add to the runner. **Minimum items**: 1. **Maximum items**: 100. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? Labels { get; set; } +#nullable restore +#else + public List Labels { get; set; } +#endif + /// The name of the new runner. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Name { get; set; } +#nullable restore +#else + public string Name { get; set; } +#endif + /// The ID of the runner group to register the runner to. + public int? RunnerGroupId { get; set; } + /// The working directory to be used for job execution, relative to the runner install directory. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? WorkFolder { get; set; } +#nullable restore +#else + public string WorkFolder { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public GenerateJitconfigPostRequestBody() + { + AdditionalData = new Dictionary(); + WorkFolder = "_work"; + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Orgs.Item.Actions.Runners.GenerateJitconfig.GenerateJitconfigPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Orgs.Item.Actions.Runners.GenerateJitconfig.GenerateJitconfigPostRequestBody(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "labels", n => { Labels = n.GetCollectionOfPrimitiveValues()?.AsList(); } }, + { "name", n => { Name = n.GetStringValue(); } }, + { "runner_group_id", n => { RunnerGroupId = n.GetIntValue(); } }, + { "work_folder", n => { WorkFolder = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteCollectionOfPrimitiveValues("labels", Labels); + writer.WriteStringValue("name", Name); + writer.WriteIntValue("runner_group_id", RunnerGroupId); + writer.WriteStringValue("work_folder", WorkFolder); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Actions/Runners/GenerateJitconfig/GenerateJitconfigPostResponse.cs b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Actions/Runners/GenerateJitconfig/GenerateJitconfigPostResponse.cs new file mode 100644 index 0000000..7e418c6 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Actions/Runners/GenerateJitconfig/GenerateJitconfigPostResponse.cs @@ -0,0 +1,76 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Orgs.Item.Actions.Runners.GenerateJitconfig +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class GenerateJitconfigPostResponse : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The base64 encoded runner configuration. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? EncodedJitConfig { get; set; } +#nullable restore +#else + public string EncodedJitConfig { get; set; } +#endif + /// A self hosted runner +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.Runner? Runner { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.Runner Runner { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public GenerateJitconfigPostResponse() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Orgs.Item.Actions.Runners.GenerateJitconfig.GenerateJitconfigPostResponse CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Orgs.Item.Actions.Runners.GenerateJitconfig.GenerateJitconfigPostResponse(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "encoded_jit_config", n => { EncodedJitConfig = n.GetStringValue(); } }, + { "runner", n => { Runner = n.GetObjectValue(global::Ayllu.Github.Client.Models.Runner.CreateFromDiscriminatorValue); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("encoded_jit_config", EncodedJitConfig); + writer.WriteObjectValue("runner", Runner); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Actions/Runners/GenerateJitconfig/GenerateJitconfigRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Actions/Runners/GenerateJitconfig/GenerateJitconfigRequestBuilder.cs new file mode 100644 index 0000000..bd3299e --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Actions/Runners/GenerateJitconfig/GenerateJitconfigRequestBuilder.cs @@ -0,0 +1,138 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Orgs.Item.Actions.Runners.GenerateJitconfig +{ + /// + /// Builds and executes requests for operations under \orgs\{org}\actions\runners\generate-jitconfig + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class GenerateJitconfigRequestBuilder : BaseRequestBuilder + { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public GenerateJitconfigRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/orgs/{org}/actions/runners/generate-jitconfig", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public GenerateJitconfigRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/orgs/{org}/actions/runners/generate-jitconfig", rawUrl) + { + } + /// + /// 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. + /// API method documentation + /// + /// A + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 404 status code + /// When receiving a 409 status code + /// When receiving a 422 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PostAsGenerateJitconfigPostResponseAsync(global::Ayllu.Github.Client.Orgs.Item.Actions.Runners.GenerateJitconfig.GenerateJitconfigPostRequestBody body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task PostAsGenerateJitconfigPostResponseAsync(global::Ayllu.Github.Client.Orgs.Item.Actions.Runners.GenerateJitconfig.GenerateJitconfigPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPostRequestInformation(body, requestConfiguration); + var errorMapping = new Dictionary> + { + { "404", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "409", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "422", global::Ayllu.Github.Client.Models.ValidationErrorSimple.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Orgs.Item.Actions.Runners.GenerateJitconfig.GenerateJitconfigPostResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// 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. + /// API method documentation + /// + /// A + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 404 status code + /// When receiving a 409 status code + /// When receiving a 422 status code + [Obsolete("This method is obsolete. Use PostAsGenerateJitconfigPostResponseAsync instead.")] +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PostAsync(global::Ayllu.Github.Client.Orgs.Item.Actions.Runners.GenerateJitconfig.GenerateJitconfigPostRequestBody body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task PostAsync(global::Ayllu.Github.Client.Orgs.Item.Actions.Runners.GenerateJitconfig.GenerateJitconfigPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPostRequestInformation(body, requestConfiguration); + var errorMapping = new Dictionary> + { + { "404", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "409", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "422", global::Ayllu.Github.Client.Models.ValidationErrorSimple.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Orgs.Item.Actions.Runners.GenerateJitconfig.GenerateJitconfigResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// 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. + /// + /// A + /// The request body + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPostRequestInformation(global::Ayllu.Github.Client.Orgs.Item.Actions.Runners.GenerateJitconfig.GenerateJitconfigPostRequestBody body, Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToPostRequestInformation(global::Ayllu.Github.Client.Orgs.Item.Actions.Runners.GenerateJitconfig.GenerateJitconfigPostRequestBody body, Action> requestConfiguration = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.Orgs.Item.Actions.Runners.GenerateJitconfig.GenerateJitconfigRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Orgs.Item.Actions.Runners.GenerateJitconfig.GenerateJitconfigRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class GenerateJitconfigRequestBuilderPostRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Actions/Runners/GenerateJitconfig/GenerateJitconfigResponse.cs b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Actions/Runners/GenerateJitconfig/GenerateJitconfigResponse.cs new file mode 100644 index 0000000..815d340 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Actions/Runners/GenerateJitconfig/GenerateJitconfigResponse.cs @@ -0,0 +1,28 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Orgs.Item.Actions.Runners.GenerateJitconfig +{ + [Obsolete("This class is obsolete. Use GenerateJitconfigPostResponse instead.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class GenerateJitconfigResponse : global::Ayllu.Github.Client.Orgs.Item.Actions.Runners.GenerateJitconfig.GenerateJitconfigPostResponse, IParsable + #pragma warning restore CS1591 + { + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static new global::Ayllu.Github.Client.Orgs.Item.Actions.Runners.GenerateJitconfig.GenerateJitconfigResponse CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Orgs.Item.Actions.Runners.GenerateJitconfig.GenerateJitconfigResponse(); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Actions/Runners/Item/Labels/Item/WithNameDeleteResponse.cs b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Actions/Runners/Item/Labels/Item/WithNameDeleteResponse.cs new file mode 100644 index 0000000..15ff56a --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Actions/Runners/Item/Labels/Item/WithNameDeleteResponse.cs @@ -0,0 +1,70 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Orgs.Item.Actions.Runners.Item.Labels.Item +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class WithNameDeleteResponse : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The labels property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? Labels { get; set; } +#nullable restore +#else + public List Labels { get; set; } +#endif + /// The total_count property + public int? TotalCount { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public WithNameDeleteResponse() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Orgs.Item.Actions.Runners.Item.Labels.Item.WithNameDeleteResponse CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Orgs.Item.Actions.Runners.Item.Labels.Item.WithNameDeleteResponse(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "labels", n => { Labels = n.GetCollectionOfObjectValues(global::Ayllu.Github.Client.Models.RunnerLabel.CreateFromDiscriminatorValue)?.AsList(); } }, + { "total_count", n => { TotalCount = n.GetIntValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteCollectionOfObjectValues("labels", Labels); + writer.WriteIntValue("total_count", TotalCount); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Actions/Runners/Item/Labels/Item/WithNameItemRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Actions/Runners/Item/Labels/Item/WithNameItemRequestBuilder.cs new file mode 100644 index 0000000..cfd8b63 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Actions/Runners/Item/Labels/Item/WithNameItemRequestBuilder.cs @@ -0,0 +1,127 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Orgs.Item.Actions.Runners.Item.Labels.Item +{ + /// + /// Builds and executes requests for operations under \orgs\{org}\actions\runners\{runner_id}\labels\{name} + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithNameItemRequestBuilder : BaseRequestBuilder + { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public WithNameItemRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/orgs/{org}/actions/runners/{runner_id}/labels/{name}", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public WithNameItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/orgs/{org}/actions/runners/{runner_id}/labels/{name}", rawUrl) + { + } + /// + /// 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. + /// API method documentation + /// + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 404 status code + /// When receiving a 422 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task DeleteAsWithNameDeleteResponseAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task DeleteAsWithNameDeleteResponseAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToDeleteRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "404", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "422", global::Ayllu.Github.Client.Models.ValidationErrorSimple.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Orgs.Item.Actions.Runners.Item.Labels.Item.WithNameDeleteResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// 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. + /// API method documentation + /// + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 404 status code + /// When receiving a 422 status code + [Obsolete("This method is obsolete. Use DeleteAsWithNameDeleteResponseAsync instead.")] +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task DeleteAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task DeleteAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToDeleteRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "404", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "422", global::Ayllu.Github.Client.Models.ValidationErrorSimple.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Orgs.Item.Actions.Runners.Item.Labels.Item.WithNameResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// 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. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToDeleteRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToDeleteRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.DELETE, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.Orgs.Item.Actions.Runners.Item.Labels.Item.WithNameItemRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Orgs.Item.Actions.Runners.Item.Labels.Item.WithNameItemRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithNameItemRequestBuilderDeleteRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Actions/Runners/Item/Labels/Item/WithNameResponse.cs b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Actions/Runners/Item/Labels/Item/WithNameResponse.cs new file mode 100644 index 0000000..382f199 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Actions/Runners/Item/Labels/Item/WithNameResponse.cs @@ -0,0 +1,28 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Orgs.Item.Actions.Runners.Item.Labels.Item +{ + [Obsolete("This class is obsolete. Use WithNameDeleteResponse instead.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class WithNameResponse : global::Ayllu.Github.Client.Orgs.Item.Actions.Runners.Item.Labels.Item.WithNameDeleteResponse, IParsable + #pragma warning restore CS1591 + { + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static new global::Ayllu.Github.Client.Orgs.Item.Actions.Runners.Item.Labels.Item.WithNameResponse CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Orgs.Item.Actions.Runners.Item.Labels.Item.WithNameResponse(); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Actions/Runners/Item/Labels/LabelsDeleteResponse.cs b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Actions/Runners/Item/Labels/LabelsDeleteResponse.cs new file mode 100644 index 0000000..3776184 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Actions/Runners/Item/Labels/LabelsDeleteResponse.cs @@ -0,0 +1,70 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Orgs.Item.Actions.Runners.Item.Labels +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class LabelsDeleteResponse : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The labels property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? Labels { get; set; } +#nullable restore +#else + public List Labels { get; set; } +#endif + /// The total_count property + public int? TotalCount { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public LabelsDeleteResponse() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Orgs.Item.Actions.Runners.Item.Labels.LabelsDeleteResponse CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Orgs.Item.Actions.Runners.Item.Labels.LabelsDeleteResponse(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "labels", n => { Labels = n.GetCollectionOfObjectValues(global::Ayllu.Github.Client.Models.RunnerLabel.CreateFromDiscriminatorValue)?.AsList(); } }, + { "total_count", n => { TotalCount = n.GetIntValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteCollectionOfObjectValues("labels", Labels); + writer.WriteIntValue("total_count", TotalCount); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Actions/Runners/Item/Labels/LabelsGetResponse.cs b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Actions/Runners/Item/Labels/LabelsGetResponse.cs new file mode 100644 index 0000000..b818bb8 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Actions/Runners/Item/Labels/LabelsGetResponse.cs @@ -0,0 +1,70 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Orgs.Item.Actions.Runners.Item.Labels +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class LabelsGetResponse : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The labels property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? Labels { get; set; } +#nullable restore +#else + public List Labels { get; set; } +#endif + /// The total_count property + public int? TotalCount { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public LabelsGetResponse() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Orgs.Item.Actions.Runners.Item.Labels.LabelsGetResponse CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Orgs.Item.Actions.Runners.Item.Labels.LabelsGetResponse(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "labels", n => { Labels = n.GetCollectionOfObjectValues(global::Ayllu.Github.Client.Models.RunnerLabel.CreateFromDiscriminatorValue)?.AsList(); } }, + { "total_count", n => { TotalCount = n.GetIntValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteCollectionOfObjectValues("labels", Labels); + writer.WriteIntValue("total_count", TotalCount); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Actions/Runners/Item/Labels/LabelsPostRequestBody.cs b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Actions/Runners/Item/Labels/LabelsPostRequestBody.cs new file mode 100644 index 0000000..0d4da5e --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Actions/Runners/Item/Labels/LabelsPostRequestBody.cs @@ -0,0 +1,65 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Orgs.Item.Actions.Runners.Item.Labels +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class LabelsPostRequestBody : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The names of the custom labels to add to the runner. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? Labels { get; set; } +#nullable restore +#else + public List Labels { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public LabelsPostRequestBody() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Orgs.Item.Actions.Runners.Item.Labels.LabelsPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Orgs.Item.Actions.Runners.Item.Labels.LabelsPostRequestBody(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "labels", n => { Labels = n.GetCollectionOfPrimitiveValues()?.AsList(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteCollectionOfPrimitiveValues("labels", Labels); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Actions/Runners/Item/Labels/LabelsPostResponse.cs b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Actions/Runners/Item/Labels/LabelsPostResponse.cs new file mode 100644 index 0000000..d9dbfd1 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Actions/Runners/Item/Labels/LabelsPostResponse.cs @@ -0,0 +1,70 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Orgs.Item.Actions.Runners.Item.Labels +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class LabelsPostResponse : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The labels property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? Labels { get; set; } +#nullable restore +#else + public List Labels { get; set; } +#endif + /// The total_count property + public int? TotalCount { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public LabelsPostResponse() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Orgs.Item.Actions.Runners.Item.Labels.LabelsPostResponse CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Orgs.Item.Actions.Runners.Item.Labels.LabelsPostResponse(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "labels", n => { Labels = n.GetCollectionOfObjectValues(global::Ayllu.Github.Client.Models.RunnerLabel.CreateFromDiscriminatorValue)?.AsList(); } }, + { "total_count", n => { TotalCount = n.GetIntValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteCollectionOfObjectValues("labels", Labels); + writer.WriteIntValue("total_count", TotalCount); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Actions/Runners/Item/Labels/LabelsPutRequestBody.cs b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Actions/Runners/Item/Labels/LabelsPutRequestBody.cs new file mode 100644 index 0000000..8dd0150 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Actions/Runners/Item/Labels/LabelsPutRequestBody.cs @@ -0,0 +1,65 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Orgs.Item.Actions.Runners.Item.Labels +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class LabelsPutRequestBody : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The names of the custom labels to set for the runner. You can pass an empty array to remove all custom labels. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? Labels { get; set; } +#nullable restore +#else + public List Labels { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public LabelsPutRequestBody() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Orgs.Item.Actions.Runners.Item.Labels.LabelsPutRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Orgs.Item.Actions.Runners.Item.Labels.LabelsPutRequestBody(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "labels", n => { Labels = n.GetCollectionOfPrimitiveValues()?.AsList(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteCollectionOfPrimitiveValues("labels", Labels); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Actions/Runners/Item/Labels/LabelsPutResponse.cs b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Actions/Runners/Item/Labels/LabelsPutResponse.cs new file mode 100644 index 0000000..47aadde --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Actions/Runners/Item/Labels/LabelsPutResponse.cs @@ -0,0 +1,70 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Orgs.Item.Actions.Runners.Item.Labels +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class LabelsPutResponse : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The labels property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? Labels { get; set; } +#nullable restore +#else + public List Labels { get; set; } +#endif + /// The total_count property + public int? TotalCount { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public LabelsPutResponse() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Orgs.Item.Actions.Runners.Item.Labels.LabelsPutResponse CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Orgs.Item.Actions.Runners.Item.Labels.LabelsPutResponse(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "labels", n => { Labels = n.GetCollectionOfObjectValues(global::Ayllu.Github.Client.Models.RunnerLabel.CreateFromDiscriminatorValue)?.AsList(); } }, + { "total_count", n => { TotalCount = n.GetIntValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteCollectionOfObjectValues("labels", Labels); + writer.WriteIntValue("total_count", TotalCount); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Actions/Runners/Item/Labels/LabelsRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Actions/Runners/Item/Labels/LabelsRequestBuilder.cs new file mode 100644 index 0000000..6dac164 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Actions/Runners/Item/Labels/LabelsRequestBuilder.cs @@ -0,0 +1,386 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Ayllu.Github.Client.Orgs.Item.Actions.Runners.Item.Labels.Item; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Orgs.Item.Actions.Runners.Item.Labels +{ + /// + /// Builds and executes requests for operations under \orgs\{org}\actions\runners\{runner_id}\labels + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class LabelsRequestBuilder : BaseRequestBuilder + { + /// Gets an item from the Ayllu.Github.Client.orgs.item.actions.runners.item.labels.item collection + /// The name of a self-hosted runner's custom label. + /// A + public global::Ayllu.Github.Client.Orgs.Item.Actions.Runners.Item.Labels.Item.WithNameItemRequestBuilder this[string position] + { + get + { + var urlTplParams = new Dictionary(PathParameters); + urlTplParams.Add("name", position); + return new global::Ayllu.Github.Client.Orgs.Item.Actions.Runners.Item.Labels.Item.WithNameItemRequestBuilder(urlTplParams, RequestAdapter); + } + } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public LabelsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/orgs/{org}/actions/runners/{runner_id}/labels", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public LabelsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/orgs/{org}/actions/runners/{runner_id}/labels", rawUrl) + { + } + /// + /// 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. + /// API method documentation + /// + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 404 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task DeleteAsLabelsDeleteResponseAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task DeleteAsLabelsDeleteResponseAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToDeleteRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "404", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Orgs.Item.Actions.Runners.Item.Labels.LabelsDeleteResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// 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. + /// API method documentation + /// + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 404 status code + [Obsolete("This method is obsolete. Use DeleteAsLabelsDeleteResponseAsync instead.")] +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task DeleteAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task DeleteAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToDeleteRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "404", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Orgs.Item.Actions.Runners.Item.Labels.LabelsResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// 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. + /// API method documentation + /// + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 404 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsLabelsGetResponseAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task GetAsLabelsGetResponseAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "404", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Orgs.Item.Actions.Runners.Item.Labels.LabelsGetResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// 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. + /// API method documentation + /// + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 404 status code + [Obsolete("This method is obsolete. Use GetAsLabelsGetResponseAsync instead.")] +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "404", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Orgs.Item.Actions.Runners.Item.Labels.LabelsResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// 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. + /// API method documentation + /// + /// A + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 404 status code + /// When receiving a 422 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PostAsLabelsPostResponseAsync(global::Ayllu.Github.Client.Orgs.Item.Actions.Runners.Item.Labels.LabelsPostRequestBody body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task PostAsLabelsPostResponseAsync(global::Ayllu.Github.Client.Orgs.Item.Actions.Runners.Item.Labels.LabelsPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPostRequestInformation(body, requestConfiguration); + var errorMapping = new Dictionary> + { + { "404", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "422", global::Ayllu.Github.Client.Models.ValidationErrorSimple.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Orgs.Item.Actions.Runners.Item.Labels.LabelsPostResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// 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. + /// API method documentation + /// + /// A + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 404 status code + /// When receiving a 422 status code + [Obsolete("This method is obsolete. Use PostAsLabelsPostResponseAsync instead.")] +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PostAsync(global::Ayllu.Github.Client.Orgs.Item.Actions.Runners.Item.Labels.LabelsPostRequestBody body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task PostAsync(global::Ayllu.Github.Client.Orgs.Item.Actions.Runners.Item.Labels.LabelsPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPostRequestInformation(body, requestConfiguration); + var errorMapping = new Dictionary> + { + { "404", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "422", global::Ayllu.Github.Client.Models.ValidationErrorSimple.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Orgs.Item.Actions.Runners.Item.Labels.LabelsResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// 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. + /// API method documentation + /// + /// A + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 404 status code + /// When receiving a 422 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PutAsLabelsPutResponseAsync(global::Ayllu.Github.Client.Orgs.Item.Actions.Runners.Item.Labels.LabelsPutRequestBody body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task PutAsLabelsPutResponseAsync(global::Ayllu.Github.Client.Orgs.Item.Actions.Runners.Item.Labels.LabelsPutRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPutRequestInformation(body, requestConfiguration); + var errorMapping = new Dictionary> + { + { "404", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "422", global::Ayllu.Github.Client.Models.ValidationErrorSimple.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Orgs.Item.Actions.Runners.Item.Labels.LabelsPutResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// 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. + /// API method documentation + /// + /// A + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 404 status code + /// When receiving a 422 status code + [Obsolete("This method is obsolete. Use PutAsLabelsPutResponseAsync instead.")] +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PutAsync(global::Ayllu.Github.Client.Orgs.Item.Actions.Runners.Item.Labels.LabelsPutRequestBody body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task PutAsync(global::Ayllu.Github.Client.Orgs.Item.Actions.Runners.Item.Labels.LabelsPutRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPutRequestInformation(body, requestConfiguration); + var errorMapping = new Dictionary> + { + { "404", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "422", global::Ayllu.Github.Client.Models.ValidationErrorSimple.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Orgs.Item.Actions.Runners.Item.Labels.LabelsResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// 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. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToDeleteRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToDeleteRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.DELETE, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// 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. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// 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. + /// + /// A + /// The request body + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPostRequestInformation(global::Ayllu.Github.Client.Orgs.Item.Actions.Runners.Item.Labels.LabelsPostRequestBody body, Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToPostRequestInformation(global::Ayllu.Github.Client.Orgs.Item.Actions.Runners.Item.Labels.LabelsPostRequestBody body, Action> requestConfiguration = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + return requestInfo; + } + /// + /// 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. + /// + /// A + /// The request body + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPutRequestInformation(global::Ayllu.Github.Client.Orgs.Item.Actions.Runners.Item.Labels.LabelsPutRequestBody body, Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToPutRequestInformation(global::Ayllu.Github.Client.Orgs.Item.Actions.Runners.Item.Labels.LabelsPutRequestBody body, Action> requestConfiguration = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation(Method.PUT, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.Orgs.Item.Actions.Runners.Item.Labels.LabelsRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Orgs.Item.Actions.Runners.Item.Labels.LabelsRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class LabelsRequestBuilderDeleteRequestConfiguration : RequestConfiguration + { + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class LabelsRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class LabelsRequestBuilderPostRequestConfiguration : RequestConfiguration + { + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class LabelsRequestBuilderPutRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Actions/Runners/Item/Labels/LabelsResponse.cs b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Actions/Runners/Item/Labels/LabelsResponse.cs new file mode 100644 index 0000000..bf8900a --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Actions/Runners/Item/Labels/LabelsResponse.cs @@ -0,0 +1,28 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Orgs.Item.Actions.Runners.Item.Labels +{ + [Obsolete("This class is obsolete. Use LabelsGetResponse instead.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class LabelsResponse : global::Ayllu.Github.Client.Orgs.Item.Actions.Runners.Item.Labels.LabelsGetResponse, IParsable + #pragma warning restore CS1591 + { + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static new global::Ayllu.Github.Client.Orgs.Item.Actions.Runners.Item.Labels.LabelsResponse CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Orgs.Item.Actions.Runners.Item.Labels.LabelsResponse(); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Actions/Runners/Item/WithRunner_ItemRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Actions/Runners/Item/WithRunner_ItemRequestBuilder.cs new file mode 100644 index 0000000..7b0cc60 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Actions/Runners/Item/WithRunner_ItemRequestBuilder.cs @@ -0,0 +1,149 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Ayllu.Github.Client.Orgs.Item.Actions.Runners.Item.Labels; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Orgs.Item.Actions.Runners.Item +{ + /// + /// Builds and executes requests for operations under \orgs\{org}\actions\runners\{runner_id} + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithRunner_ItemRequestBuilder : BaseRequestBuilder + { + /// The labels property + public global::Ayllu.Github.Client.Orgs.Item.Actions.Runners.Item.Labels.LabelsRequestBuilder Labels + { + get => new global::Ayllu.Github.Client.Orgs.Item.Actions.Runners.Item.Labels.LabelsRequestBuilder(PathParameters, RequestAdapter); + } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public WithRunner_ItemRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/orgs/{org}/actions/runners/{runner_id}", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public WithRunner_ItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/orgs/{org}/actions/runners/{runner_id}", rawUrl) + { + } + /// + /// 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 + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 422 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task DeleteAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task DeleteAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToDeleteRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "422", global::Ayllu.Github.Client.Models.ValidationErrorSimple.CreateFromDiscriminatorValue }, + }; + await RequestAdapter.SendNoContentAsync(requestInfo, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// 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. + /// API method documentation + /// + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Models.Runner.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false); + } + /// + /// 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. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToDeleteRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToDeleteRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.DELETE, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// 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. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.Orgs.Item.Actions.Runners.Item.WithRunner_ItemRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Orgs.Item.Actions.Runners.Item.WithRunner_ItemRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithRunner_ItemRequestBuilderDeleteRequestConfiguration : RequestConfiguration + { + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithRunner_ItemRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Actions/Runners/RegistrationToken/RegistrationTokenRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Actions/Runners/RegistrationToken/RegistrationTokenRequestBuilder.cs new file mode 100644 index 0000000..62d2b95 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Actions/Runners/RegistrationToken/RegistrationTokenRequestBuilder.cs @@ -0,0 +1,93 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Orgs.Item.Actions.Runners.RegistrationToken +{ + /// + /// Builds and executes requests for operations under \orgs\{org}\actions\runners\registration-token + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class RegistrationTokenRequestBuilder : BaseRequestBuilder + { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public RegistrationTokenRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/orgs/{org}/actions/runners/registration-token", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public RegistrationTokenRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/orgs/{org}/actions/runners/registration-token", rawUrl) + { + } + /// + /// 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. + /// API method documentation + /// + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PostAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task PostAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToPostRequestInformation(requestConfiguration); + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Models.AuthenticationToken.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false); + } + /// + /// 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. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPostRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToPostRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.Orgs.Item.Actions.Runners.RegistrationToken.RegistrationTokenRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Orgs.Item.Actions.Runners.RegistrationToken.RegistrationTokenRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class RegistrationTokenRequestBuilderPostRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Actions/Runners/RemoveToken/RemoveTokenRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Actions/Runners/RemoveToken/RemoveTokenRequestBuilder.cs new file mode 100644 index 0000000..1916a2b --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Actions/Runners/RemoveToken/RemoveTokenRequestBuilder.cs @@ -0,0 +1,93 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Orgs.Item.Actions.Runners.RemoveToken +{ + /// + /// Builds and executes requests for operations under \orgs\{org}\actions\runners\remove-token + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class RemoveTokenRequestBuilder : BaseRequestBuilder + { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public RemoveTokenRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/orgs/{org}/actions/runners/remove-token", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public RemoveTokenRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/orgs/{org}/actions/runners/remove-token", rawUrl) + { + } + /// + /// 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. + /// API method documentation + /// + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PostAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task PostAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToPostRequestInformation(requestConfiguration); + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Models.AuthenticationToken.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false); + } + /// + /// 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. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPostRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToPostRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.Orgs.Item.Actions.Runners.RemoveToken.RemoveTokenRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Orgs.Item.Actions.Runners.RemoveToken.RemoveTokenRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class RemoveTokenRequestBuilderPostRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Actions/Runners/RunnersGetResponse.cs b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Actions/Runners/RunnersGetResponse.cs new file mode 100644 index 0000000..e177495 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Actions/Runners/RunnersGetResponse.cs @@ -0,0 +1,70 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Orgs.Item.Actions.Runners +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class RunnersGetResponse : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The runners property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? Runners { get; set; } +#nullable restore +#else + public List Runners { get; set; } +#endif + /// The total_count property + public int? TotalCount { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public RunnersGetResponse() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Orgs.Item.Actions.Runners.RunnersGetResponse CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Orgs.Item.Actions.Runners.RunnersGetResponse(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "runners", n => { Runners = n.GetCollectionOfObjectValues(global::Ayllu.Github.Client.Models.Runner.CreateFromDiscriminatorValue)?.AsList(); } }, + { "total_count", n => { TotalCount = n.GetIntValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteCollectionOfObjectValues("runners", Runners); + writer.WriteIntValue("total_count", TotalCount); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Actions/Runners/RunnersRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Actions/Runners/RunnersRequestBuilder.cs new file mode 100644 index 0000000..1e58a24 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Actions/Runners/RunnersRequestBuilder.cs @@ -0,0 +1,185 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Orgs.Item.Actions.Runners.Downloads; +using Ayllu.Github.Client.Orgs.Item.Actions.Runners.GenerateJitconfig; +using Ayllu.Github.Client.Orgs.Item.Actions.Runners.Item; +using Ayllu.Github.Client.Orgs.Item.Actions.Runners.RegistrationToken; +using Ayllu.Github.Client.Orgs.Item.Actions.Runners.RemoveToken; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Orgs.Item.Actions.Runners +{ + /// + /// Builds and executes requests for operations under \orgs\{org}\actions\runners + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class RunnersRequestBuilder : BaseRequestBuilder + { + /// The downloads property + public global::Ayllu.Github.Client.Orgs.Item.Actions.Runners.Downloads.DownloadsRequestBuilder Downloads + { + get => new global::Ayllu.Github.Client.Orgs.Item.Actions.Runners.Downloads.DownloadsRequestBuilder(PathParameters, RequestAdapter); + } + /// The generateJitconfig property + public global::Ayllu.Github.Client.Orgs.Item.Actions.Runners.GenerateJitconfig.GenerateJitconfigRequestBuilder GenerateJitconfig + { + get => new global::Ayllu.Github.Client.Orgs.Item.Actions.Runners.GenerateJitconfig.GenerateJitconfigRequestBuilder(PathParameters, RequestAdapter); + } + /// The registrationToken property + public global::Ayllu.Github.Client.Orgs.Item.Actions.Runners.RegistrationToken.RegistrationTokenRequestBuilder RegistrationToken + { + get => new global::Ayllu.Github.Client.Orgs.Item.Actions.Runners.RegistrationToken.RegistrationTokenRequestBuilder(PathParameters, RequestAdapter); + } + /// The removeToken property + public global::Ayllu.Github.Client.Orgs.Item.Actions.Runners.RemoveToken.RemoveTokenRequestBuilder RemoveToken + { + get => new global::Ayllu.Github.Client.Orgs.Item.Actions.Runners.RemoveToken.RemoveTokenRequestBuilder(PathParameters, RequestAdapter); + } + /// Gets an item from the Ayllu.Github.Client.orgs.item.actions.runners.item collection + /// Unique identifier of the self-hosted runner. + /// A + public global::Ayllu.Github.Client.Orgs.Item.Actions.Runners.Item.WithRunner_ItemRequestBuilder this[int position] + { + get + { + var urlTplParams = new Dictionary(PathParameters); + urlTplParams.Add("runner_id", position); + return new global::Ayllu.Github.Client.Orgs.Item.Actions.Runners.Item.WithRunner_ItemRequestBuilder(urlTplParams, RequestAdapter); + } + } + /// Gets an item from the Ayllu.Github.Client.orgs.item.actions.runners.item collection + /// Unique identifier of the self-hosted runner. + /// A + [Obsolete("This indexer is deprecated and will be removed in the next major version. Use the one with the typed parameter instead.")] + public global::Ayllu.Github.Client.Orgs.Item.Actions.Runners.Item.WithRunner_ItemRequestBuilder this[string position] + { + get + { + var urlTplParams = new Dictionary(PathParameters); + if (!string.IsNullOrWhiteSpace(position)) urlTplParams.Add("runner_id", position); + return new global::Ayllu.Github.Client.Orgs.Item.Actions.Runners.Item.WithRunner_ItemRequestBuilder(urlTplParams, RequestAdapter); + } + } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public RunnersRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/orgs/{org}/actions/runners{?name*,page*,per_page*}", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public RunnersRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/orgs/{org}/actions/runners{?name*,page*,per_page*}", rawUrl) + { + } + /// + /// 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. + /// API method documentation + /// + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsRunnersGetResponseAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task GetAsRunnersGetResponseAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Orgs.Item.Actions.Runners.RunnersGetResponse.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false); + } + /// + /// 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. + /// API method documentation + /// + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + [Obsolete("This method is obsolete. Use GetAsRunnersGetResponseAsync instead.")] +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Orgs.Item.Actions.Runners.RunnersResponse.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false); + } + /// + /// 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. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.Orgs.Item.Actions.Runners.RunnersRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Orgs.Item.Actions.Runners.RunnersRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// 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. + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class RunnersRequestBuilderGetQueryParameters + { + /// The name of a self-hosted runner. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("name")] + public string? Name { get; set; } +#nullable restore +#else + [QueryParameter("name")] + public string Name { get; set; } +#endif + /// The page number of the results to fetch. For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." + [QueryParameter("page")] + public int? Page { get; set; } + /// The number of results per page (max 100). For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." + [QueryParameter("per_page")] + public int? PerPage { get; set; } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class RunnersRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Actions/Runners/RunnersResponse.cs b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Actions/Runners/RunnersResponse.cs new file mode 100644 index 0000000..aeda596 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Actions/Runners/RunnersResponse.cs @@ -0,0 +1,28 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Orgs.Item.Actions.Runners +{ + [Obsolete("This class is obsolete. Use RunnersGetResponse instead.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class RunnersResponse : global::Ayllu.Github.Client.Orgs.Item.Actions.Runners.RunnersGetResponse, IParsable + #pragma warning restore CS1591 + { + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static new global::Ayllu.Github.Client.Orgs.Item.Actions.Runners.RunnersResponse CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Orgs.Item.Actions.Runners.RunnersResponse(); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Actions/Secrets/Item/Repositories/Item/WithRepository_ItemRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Actions/Secrets/Item/Repositories/Item/WithRepository_ItemRequestBuilder.cs new file mode 100644 index 0000000..e496ae0 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Actions/Secrets/Item/Repositories/Item/WithRepository_ItemRequestBuilder.cs @@ -0,0 +1,134 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Orgs.Item.Actions.Secrets.Item.Repositories.Item +{ + /// + /// Builds and executes requests for operations under \orgs\{org}\actions\secrets\{secret_name}\repositories\{repository_id} + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithRepository_ItemRequestBuilder : BaseRequestBuilder + { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public WithRepository_ItemRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/orgs/{org}/actions/secrets/{secret_name}/repositories/{repository_id}", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public WithRepository_ItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/orgs/{org}/actions/secrets/{secret_name}/repositories/{repository_id}", rawUrl) + { + } + /// + /// 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/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 + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task DeleteAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task DeleteAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToDeleteRequestInformation(requestConfiguration); + await RequestAdapter.SendNoContentAsync(requestInfo, default, cancellationToken).ConfigureAwait(false); + } + /// + /// 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/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 + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PutAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task PutAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToPutRequestInformation(requestConfiguration); + await RequestAdapter.SendNoContentAsync(requestInfo, default, cancellationToken).ConfigureAwait(false); + } + /// + /// 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/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. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToDeleteRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToDeleteRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.DELETE, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + return requestInfo; + } + /// + /// 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/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. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPutRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToPutRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.PUT, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.Orgs.Item.Actions.Secrets.Item.Repositories.Item.WithRepository_ItemRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Orgs.Item.Actions.Secrets.Item.Repositories.Item.WithRepository_ItemRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithRepository_ItemRequestBuilderDeleteRequestConfiguration : RequestConfiguration + { + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithRepository_ItemRequestBuilderPutRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Actions/Secrets/Item/Repositories/RepositoriesGetResponse.cs b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Actions/Secrets/Item/Repositories/RepositoriesGetResponse.cs new file mode 100644 index 0000000..ab7ed45 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Actions/Secrets/Item/Repositories/RepositoriesGetResponse.cs @@ -0,0 +1,70 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Orgs.Item.Actions.Secrets.Item.Repositories +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class RepositoriesGetResponse : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The repositories property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? Repositories { get; set; } +#nullable restore +#else + public List Repositories { get; set; } +#endif + /// The total_count property + public int? TotalCount { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public RepositoriesGetResponse() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Orgs.Item.Actions.Secrets.Item.Repositories.RepositoriesGetResponse CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Orgs.Item.Actions.Secrets.Item.Repositories.RepositoriesGetResponse(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "repositories", n => { Repositories = n.GetCollectionOfObjectValues(global::Ayllu.Github.Client.Models.MinimalRepository.CreateFromDiscriminatorValue)?.AsList(); } }, + { "total_count", n => { TotalCount = n.GetIntValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteCollectionOfObjectValues("repositories", Repositories); + writer.WriteIntValue("total_count", TotalCount); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Actions/Secrets/Item/Repositories/RepositoriesPutRequestBody.cs b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Actions/Secrets/Item/Repositories/RepositoriesPutRequestBody.cs new file mode 100644 index 0000000..77855aa --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Actions/Secrets/Item/Repositories/RepositoriesPutRequestBody.cs @@ -0,0 +1,65 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Orgs.Item.Actions.Secrets.Item.Repositories +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class RepositoriesPutRequestBody : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// 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/rest/actions/secrets#add-selected-repository-to-an-organization-secret) and [Remove selected repository from an organization secret](https://docs.github.com/rest/actions/secrets#remove-selected-repository-from-an-organization-secret) endpoints. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? SelectedRepositoryIds { get; set; } +#nullable restore +#else + public List SelectedRepositoryIds { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public RepositoriesPutRequestBody() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Orgs.Item.Actions.Secrets.Item.Repositories.RepositoriesPutRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Orgs.Item.Actions.Secrets.Item.Repositories.RepositoriesPutRequestBody(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "selected_repository_ids", n => { SelectedRepositoryIds = n.GetCollectionOfPrimitiveValues()?.AsList(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteCollectionOfPrimitiveValues("selected_repository_ids", SelectedRepositoryIds); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Actions/Secrets/Item/Repositories/RepositoriesRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Actions/Secrets/Item/Repositories/RepositoriesRequestBuilder.cs new file mode 100644 index 0000000..5493507 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Actions/Secrets/Item/Repositories/RepositoriesRequestBuilder.cs @@ -0,0 +1,200 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Orgs.Item.Actions.Secrets.Item.Repositories.Item; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Orgs.Item.Actions.Secrets.Item.Repositories +{ + /// + /// Builds and executes requests for operations under \orgs\{org}\actions\secrets\{secret_name}\repositories + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class RepositoriesRequestBuilder : BaseRequestBuilder + { + /// Gets an item from the Ayllu.Github.Client.orgs.item.actions.secrets.item.repositories.item collection + /// Unique identifier of the item + /// A + public global::Ayllu.Github.Client.Orgs.Item.Actions.Secrets.Item.Repositories.Item.WithRepository_ItemRequestBuilder this[int position] + { + get + { + var urlTplParams = new Dictionary(PathParameters); + urlTplParams.Add("repository_id", position); + return new global::Ayllu.Github.Client.Orgs.Item.Actions.Secrets.Item.Repositories.Item.WithRepository_ItemRequestBuilder(urlTplParams, RequestAdapter); + } + } + /// Gets an item from the Ayllu.Github.Client.orgs.item.actions.secrets.item.repositories.item collection + /// Unique identifier of the item + /// A + [Obsolete("This indexer is deprecated and will be removed in the next major version. Use the one with the typed parameter instead.")] + public global::Ayllu.Github.Client.Orgs.Item.Actions.Secrets.Item.Repositories.Item.WithRepository_ItemRequestBuilder this[string position] + { + get + { + var urlTplParams = new Dictionary(PathParameters); + if (!string.IsNullOrWhiteSpace(position)) urlTplParams.Add("repository_id", position); + return new global::Ayllu.Github.Client.Orgs.Item.Actions.Secrets.Item.Repositories.Item.WithRepository_ItemRequestBuilder(urlTplParams, RequestAdapter); + } + } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public RepositoriesRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/orgs/{org}/actions/secrets/{secret_name}/repositories{?page*,per_page*}", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public RepositoriesRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/orgs/{org}/actions/secrets/{secret_name}/repositories{?page*,per_page*}", rawUrl) + { + } + /// + /// 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. + /// API method documentation + /// + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsRepositoriesGetResponseAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task GetAsRepositoriesGetResponseAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Orgs.Item.Actions.Secrets.Item.Repositories.RepositoriesGetResponse.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false); + } + /// + /// 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. + /// API method documentation + /// + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + [Obsolete("This method is obsolete. Use GetAsRepositoriesGetResponseAsync instead.")] +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Orgs.Item.Actions.Secrets.Item.Repositories.RepositoriesResponse.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false); + } + /// + /// 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/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 + /// + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PutAsync(global::Ayllu.Github.Client.Orgs.Item.Actions.Secrets.Item.Repositories.RepositoriesPutRequestBody body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task PutAsync(global::Ayllu.Github.Client.Orgs.Item.Actions.Secrets.Item.Repositories.RepositoriesPutRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPutRequestInformation(body, requestConfiguration); + await RequestAdapter.SendNoContentAsync(requestInfo, default, cancellationToken).ConfigureAwait(false); + } + /// + /// 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. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// 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/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. + /// + /// A + /// The request body + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPutRequestInformation(global::Ayllu.Github.Client.Orgs.Item.Actions.Secrets.Item.Repositories.RepositoriesPutRequestBody body, Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToPutRequestInformation(global::Ayllu.Github.Client.Orgs.Item.Actions.Secrets.Item.Repositories.RepositoriesPutRequestBody body, Action> requestConfiguration = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation(Method.PUT, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.Orgs.Item.Actions.Secrets.Item.Repositories.RepositoriesRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Orgs.Item.Actions.Secrets.Item.Repositories.RepositoriesRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// 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. + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class RepositoriesRequestBuilderGetQueryParameters + { + /// The page number of the results to fetch. For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." + [QueryParameter("page")] + public int? Page { get; set; } + /// The number of results per page (max 100). For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." + [QueryParameter("per_page")] + public int? PerPage { get; set; } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class RepositoriesRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class RepositoriesRequestBuilderPutRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Actions/Secrets/Item/Repositories/RepositoriesResponse.cs b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Actions/Secrets/Item/Repositories/RepositoriesResponse.cs new file mode 100644 index 0000000..bb0d6df --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Actions/Secrets/Item/Repositories/RepositoriesResponse.cs @@ -0,0 +1,28 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Orgs.Item.Actions.Secrets.Item.Repositories +{ + [Obsolete("This class is obsolete. Use RepositoriesGetResponse instead.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class RepositoriesResponse : global::Ayllu.Github.Client.Orgs.Item.Actions.Secrets.Item.Repositories.RepositoriesGetResponse, IParsable + #pragma warning restore CS1591 + { + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static new global::Ayllu.Github.Client.Orgs.Item.Actions.Secrets.Item.Repositories.RepositoriesResponse CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Orgs.Item.Actions.Secrets.Item.Repositories.RepositoriesResponse(); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Actions/Secrets/Item/WithSecret_nameItemRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Actions/Secrets/Item/WithSecret_nameItemRequestBuilder.cs new file mode 100644 index 0000000..b3336b0 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Actions/Secrets/Item/WithSecret_nameItemRequestBuilder.cs @@ -0,0 +1,194 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Ayllu.Github.Client.Orgs.Item.Actions.Secrets.Item.Repositories; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Orgs.Item.Actions.Secrets.Item +{ + /// + /// Builds and executes requests for operations under \orgs\{org}\actions\secrets\{secret_name} + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithSecret_nameItemRequestBuilder : BaseRequestBuilder + { + /// The repositories property + public global::Ayllu.Github.Client.Orgs.Item.Actions.Secrets.Item.Repositories.RepositoriesRequestBuilder Repositories + { + get => new global::Ayllu.Github.Client.Orgs.Item.Actions.Secrets.Item.Repositories.RepositoriesRequestBuilder(PathParameters, RequestAdapter); + } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public WithSecret_nameItemRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/orgs/{org}/actions/secrets/{secret_name}", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public WithSecret_nameItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/orgs/{org}/actions/secrets/{secret_name}", rawUrl) + { + } + /// + /// 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 + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task DeleteAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task DeleteAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToDeleteRequestInformation(requestConfiguration); + await RequestAdapter.SendNoContentAsync(requestInfo, default, cancellationToken).ConfigureAwait(false); + } + /// + /// 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. + /// API method documentation + /// + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Models.OrganizationActionsSecret.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false); + } + /// + /// 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/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. + /// API method documentation + /// + /// A + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PutAsync(global::Ayllu.Github.Client.Orgs.Item.Actions.Secrets.Item.WithSecret_namePutRequestBody body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task PutAsync(global::Ayllu.Github.Client.Orgs.Item.Actions.Secrets.Item.WithSecret_namePutRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPutRequestInformation(body, requestConfiguration); + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Models.EmptyObject.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false); + } + /// + /// 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. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToDeleteRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToDeleteRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.DELETE, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + return requestInfo; + } + /// + /// 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. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// 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/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. + /// + /// A + /// The request body + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPutRequestInformation(global::Ayllu.Github.Client.Orgs.Item.Actions.Secrets.Item.WithSecret_namePutRequestBody body, Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToPutRequestInformation(global::Ayllu.Github.Client.Orgs.Item.Actions.Secrets.Item.WithSecret_namePutRequestBody body, Action> requestConfiguration = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation(Method.PUT, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.Orgs.Item.Actions.Secrets.Item.WithSecret_nameItemRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Orgs.Item.Actions.Secrets.Item.WithSecret_nameItemRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithSecret_nameItemRequestBuilderDeleteRequestConfiguration : RequestConfiguration + { + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithSecret_nameItemRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithSecret_nameItemRequestBuilderPutRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Actions/Secrets/Item/WithSecret_namePutRequestBody.cs b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Actions/Secrets/Item/WithSecret_namePutRequestBody.cs new file mode 100644 index 0000000..014c8f6 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Actions/Secrets/Item/WithSecret_namePutRequestBody.cs @@ -0,0 +1,89 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Orgs.Item.Actions.Secrets.Item +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class WithSecret_namePutRequestBody : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// 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/rest/actions/secrets#get-an-organization-public-key) endpoint. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? EncryptedValue { get; set; } +#nullable restore +#else + public string EncryptedValue { get; set; } +#endif + /// ID of the key you used to encrypt the secret. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? KeyId { get; set; } +#nullable restore +#else + public string KeyId { get; set; } +#endif + /// 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/rest/actions/secrets#list-selected-repositories-for-an-organization-secret), [Set selected repositories for an organization secret](https://docs.github.com/rest/actions/secrets#set-selected-repositories-for-an-organization-secret), and [Remove selected repository from an organization secret](https://docs.github.com/rest/actions/secrets#remove-selected-repository-from-an-organization-secret) endpoints. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? SelectedRepositoryIds { get; set; } +#nullable restore +#else + public List SelectedRepositoryIds { get; set; } +#endif + /// 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. + public global::Ayllu.Github.Client.Orgs.Item.Actions.Secrets.Item.WithSecret_namePutRequestBody_visibility? Visibility { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public WithSecret_namePutRequestBody() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Orgs.Item.Actions.Secrets.Item.WithSecret_namePutRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Orgs.Item.Actions.Secrets.Item.WithSecret_namePutRequestBody(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "encrypted_value", n => { EncryptedValue = n.GetStringValue(); } }, + { "key_id", n => { KeyId = n.GetStringValue(); } }, + { "selected_repository_ids", n => { SelectedRepositoryIds = n.GetCollectionOfPrimitiveValues()?.AsList(); } }, + { "visibility", n => { Visibility = n.GetEnumValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("encrypted_value", EncryptedValue); + writer.WriteStringValue("key_id", KeyId); + writer.WriteCollectionOfPrimitiveValues("selected_repository_ids", SelectedRepositoryIds); + writer.WriteEnumValue("visibility", Visibility); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Actions/Secrets/Item/WithSecret_namePutRequestBody_visibility.cs b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Actions/Secrets/Item/WithSecret_namePutRequestBody_visibility.cs new file mode 100644 index 0000000..b6ed2c2 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Actions/Secrets/Item/WithSecret_namePutRequestBody_visibility.cs @@ -0,0 +1,23 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Orgs.Item.Actions.Secrets.Item +{ + /// 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. + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public enum WithSecret_namePutRequestBody_visibility + { + [EnumMember(Value = "all")] + #pragma warning disable CS1591 + All, + #pragma warning restore CS1591 + [EnumMember(Value = "private")] + #pragma warning disable CS1591 + Private, + #pragma warning restore CS1591 + [EnumMember(Value = "selected")] + #pragma warning disable CS1591 + Selected, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Actions/Secrets/PublicKey/PublicKeyRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Actions/Secrets/PublicKey/PublicKeyRequestBuilder.cs new file mode 100644 index 0000000..92914f0 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Actions/Secrets/PublicKey/PublicKeyRequestBuilder.cs @@ -0,0 +1,93 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Orgs.Item.Actions.Secrets.PublicKey +{ + /// + /// Builds and executes requests for operations under \orgs\{org}\actions\secrets\public-key + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class PublicKeyRequestBuilder : BaseRequestBuilder + { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public PublicKeyRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/orgs/{org}/actions/secrets/public-key", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public PublicKeyRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/orgs/{org}/actions/secrets/public-key", rawUrl) + { + } + /// + /// 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. + /// API method documentation + /// + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Models.ActionsPublicKey.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false); + } + /// + /// 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. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.Orgs.Item.Actions.Secrets.PublicKey.PublicKeyRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Orgs.Item.Actions.Secrets.PublicKey.PublicKeyRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class PublicKeyRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Actions/Secrets/SecretsGetResponse.cs b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Actions/Secrets/SecretsGetResponse.cs new file mode 100644 index 0000000..c32f248 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Actions/Secrets/SecretsGetResponse.cs @@ -0,0 +1,70 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Orgs.Item.Actions.Secrets +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class SecretsGetResponse : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The secrets property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? Secrets { get; set; } +#nullable restore +#else + public List Secrets { get; set; } +#endif + /// The total_count property + public int? TotalCount { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public SecretsGetResponse() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Orgs.Item.Actions.Secrets.SecretsGetResponse CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Orgs.Item.Actions.Secrets.SecretsGetResponse(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "secrets", n => { Secrets = n.GetCollectionOfObjectValues(global::Ayllu.Github.Client.Models.OrganizationActionsSecret.CreateFromDiscriminatorValue)?.AsList(); } }, + { "total_count", n => { TotalCount = n.GetIntValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteCollectionOfObjectValues("secrets", Secrets); + writer.WriteIntValue("total_count", TotalCount); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Actions/Secrets/SecretsRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Actions/Secrets/SecretsRequestBuilder.cs new file mode 100644 index 0000000..1f84a8f --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Actions/Secrets/SecretsRequestBuilder.cs @@ -0,0 +1,144 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Orgs.Item.Actions.Secrets.Item; +using Ayllu.Github.Client.Orgs.Item.Actions.Secrets.PublicKey; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Orgs.Item.Actions.Secrets +{ + /// + /// Builds and executes requests for operations under \orgs\{org}\actions\secrets + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class SecretsRequestBuilder : BaseRequestBuilder + { + /// The publicKey property + public global::Ayllu.Github.Client.Orgs.Item.Actions.Secrets.PublicKey.PublicKeyRequestBuilder PublicKey + { + get => new global::Ayllu.Github.Client.Orgs.Item.Actions.Secrets.PublicKey.PublicKeyRequestBuilder(PathParameters, RequestAdapter); + } + /// Gets an item from the Ayllu.Github.Client.orgs.item.actions.secrets.item collection + /// The name of the secret. + /// A + public global::Ayllu.Github.Client.Orgs.Item.Actions.Secrets.Item.WithSecret_nameItemRequestBuilder this[string position] + { + get + { + var urlTplParams = new Dictionary(PathParameters); + urlTplParams.Add("secret_name", position); + return new global::Ayllu.Github.Client.Orgs.Item.Actions.Secrets.Item.WithSecret_nameItemRequestBuilder(urlTplParams, RequestAdapter); + } + } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public SecretsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/orgs/{org}/actions/secrets{?page*,per_page*}", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public SecretsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/orgs/{org}/actions/secrets{?page*,per_page*}", rawUrl) + { + } + /// + /// 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. + /// API method documentation + /// + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsSecretsGetResponseAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task GetAsSecretsGetResponseAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Orgs.Item.Actions.Secrets.SecretsGetResponse.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false); + } + /// + /// 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. + /// API method documentation + /// + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + [Obsolete("This method is obsolete. Use GetAsSecretsGetResponseAsync instead.")] +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Orgs.Item.Actions.Secrets.SecretsResponse.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false); + } + /// + /// 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. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.Orgs.Item.Actions.Secrets.SecretsRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Orgs.Item.Actions.Secrets.SecretsRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// 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. + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class SecretsRequestBuilderGetQueryParameters + { + /// The page number of the results to fetch. For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." + [QueryParameter("page")] + public int? Page { get; set; } + /// The number of results per page (max 100). For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." + [QueryParameter("per_page")] + public int? PerPage { get; set; } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class SecretsRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Actions/Secrets/SecretsResponse.cs b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Actions/Secrets/SecretsResponse.cs new file mode 100644 index 0000000..f3dff7f --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Actions/Secrets/SecretsResponse.cs @@ -0,0 +1,28 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Orgs.Item.Actions.Secrets +{ + [Obsolete("This class is obsolete. Use SecretsGetResponse instead.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class SecretsResponse : global::Ayllu.Github.Client.Orgs.Item.Actions.Secrets.SecretsGetResponse, IParsable + #pragma warning restore CS1591 + { + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static new global::Ayllu.Github.Client.Orgs.Item.Actions.Secrets.SecretsResponse CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Orgs.Item.Actions.Secrets.SecretsResponse(); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Actions/Variables/Item/Repositories/Item/WithRepository_ItemRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Actions/Variables/Item/Repositories/Item/WithRepository_ItemRequestBuilder.cs new file mode 100644 index 0000000..2da8e9e --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Actions/Variables/Item/Repositories/Item/WithRepository_ItemRequestBuilder.cs @@ -0,0 +1,134 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Orgs.Item.Actions.Variables.Item.Repositories.Item +{ + /// + /// Builds and executes requests for operations under \orgs\{org}\actions\variables\{name}\repositories\{repository_id} + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithRepository_ItemRequestBuilder : BaseRequestBuilder + { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public WithRepository_ItemRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/orgs/{org}/actions/variables/{name}/repositories/{repository_id}", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public WithRepository_ItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/orgs/{org}/actions/variables/{name}/repositories/{repository_id}", rawUrl) + { + } + /// + /// 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 + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task DeleteAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task DeleteAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToDeleteRequestInformation(requestConfiguration); + await RequestAdapter.SendNoContentAsync(requestInfo, default, cancellationToken).ConfigureAwait(false); + } + /// + /// 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 + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PutAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task PutAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToPutRequestInformation(requestConfiguration); + await RequestAdapter.SendNoContentAsync(requestInfo, default, cancellationToken).ConfigureAwait(false); + } + /// + /// 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. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToDeleteRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToDeleteRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.DELETE, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + return requestInfo; + } + /// + /// 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. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPutRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToPutRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.PUT, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.Orgs.Item.Actions.Variables.Item.Repositories.Item.WithRepository_ItemRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Orgs.Item.Actions.Variables.Item.Repositories.Item.WithRepository_ItemRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithRepository_ItemRequestBuilderDeleteRequestConfiguration : RequestConfiguration + { + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithRepository_ItemRequestBuilderPutRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Actions/Variables/Item/Repositories/RepositoriesGetResponse.cs b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Actions/Variables/Item/Repositories/RepositoriesGetResponse.cs new file mode 100644 index 0000000..c3e1777 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Actions/Variables/Item/Repositories/RepositoriesGetResponse.cs @@ -0,0 +1,70 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Orgs.Item.Actions.Variables.Item.Repositories +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class RepositoriesGetResponse : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The repositories property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? Repositories { get; set; } +#nullable restore +#else + public List Repositories { get; set; } +#endif + /// The total_count property + public int? TotalCount { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public RepositoriesGetResponse() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Orgs.Item.Actions.Variables.Item.Repositories.RepositoriesGetResponse CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Orgs.Item.Actions.Variables.Item.Repositories.RepositoriesGetResponse(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "repositories", n => { Repositories = n.GetCollectionOfObjectValues(global::Ayllu.Github.Client.Models.MinimalRepository.CreateFromDiscriminatorValue)?.AsList(); } }, + { "total_count", n => { TotalCount = n.GetIntValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteCollectionOfObjectValues("repositories", Repositories); + writer.WriteIntValue("total_count", TotalCount); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Actions/Variables/Item/Repositories/RepositoriesPutRequestBody.cs b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Actions/Variables/Item/Repositories/RepositoriesPutRequestBody.cs new file mode 100644 index 0000000..34c003c --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Actions/Variables/Item/Repositories/RepositoriesPutRequestBody.cs @@ -0,0 +1,65 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Orgs.Item.Actions.Variables.Item.Repositories +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class RepositoriesPutRequestBody : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The IDs of the repositories that can access the organization variable. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? SelectedRepositoryIds { get; set; } +#nullable restore +#else + public List SelectedRepositoryIds { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public RepositoriesPutRequestBody() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Orgs.Item.Actions.Variables.Item.Repositories.RepositoriesPutRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Orgs.Item.Actions.Variables.Item.Repositories.RepositoriesPutRequestBody(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "selected_repository_ids", n => { SelectedRepositoryIds = n.GetCollectionOfPrimitiveValues()?.AsList(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteCollectionOfPrimitiveValues("selected_repository_ids", SelectedRepositoryIds); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Actions/Variables/Item/Repositories/RepositoriesRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Actions/Variables/Item/Repositories/RepositoriesRequestBuilder.cs new file mode 100644 index 0000000..59a2958 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Actions/Variables/Item/Repositories/RepositoriesRequestBuilder.cs @@ -0,0 +1,200 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Orgs.Item.Actions.Variables.Item.Repositories.Item; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Orgs.Item.Actions.Variables.Item.Repositories +{ + /// + /// Builds and executes requests for operations under \orgs\{org}\actions\variables\{name}\repositories + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class RepositoriesRequestBuilder : BaseRequestBuilder + { + /// Gets an item from the Ayllu.Github.Client.orgs.item.actions.variables.item.repositories.item collection + /// Unique identifier of the item + /// A + public global::Ayllu.Github.Client.Orgs.Item.Actions.Variables.Item.Repositories.Item.WithRepository_ItemRequestBuilder this[int position] + { + get + { + var urlTplParams = new Dictionary(PathParameters); + urlTplParams.Add("repository_id", position); + return new global::Ayllu.Github.Client.Orgs.Item.Actions.Variables.Item.Repositories.Item.WithRepository_ItemRequestBuilder(urlTplParams, RequestAdapter); + } + } + /// Gets an item from the Ayllu.Github.Client.orgs.item.actions.variables.item.repositories.item collection + /// Unique identifier of the item + /// A + [Obsolete("This indexer is deprecated and will be removed in the next major version. Use the one with the typed parameter instead.")] + public global::Ayllu.Github.Client.Orgs.Item.Actions.Variables.Item.Repositories.Item.WithRepository_ItemRequestBuilder this[string position] + { + get + { + var urlTplParams = new Dictionary(PathParameters); + if (!string.IsNullOrWhiteSpace(position)) urlTplParams.Add("repository_id", position); + return new global::Ayllu.Github.Client.Orgs.Item.Actions.Variables.Item.Repositories.Item.WithRepository_ItemRequestBuilder(urlTplParams, RequestAdapter); + } + } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public RepositoriesRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/orgs/{org}/actions/variables/{name}/repositories{?page*,per_page*}", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public RepositoriesRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/orgs/{org}/actions/variables/{name}/repositories{?page*,per_page*}", rawUrl) + { + } + /// + /// 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. + /// API method documentation + /// + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsRepositoriesGetResponseAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task GetAsRepositoriesGetResponseAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Orgs.Item.Actions.Variables.Item.Repositories.RepositoriesGetResponse.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false); + } + /// + /// 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. + /// API method documentation + /// + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + [Obsolete("This method is obsolete. Use GetAsRepositoriesGetResponseAsync instead.")] +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Orgs.Item.Actions.Variables.Item.Repositories.RepositoriesResponse.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false); + } + /// + /// 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 + /// + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PutAsync(global::Ayllu.Github.Client.Orgs.Item.Actions.Variables.Item.Repositories.RepositoriesPutRequestBody body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task PutAsync(global::Ayllu.Github.Client.Orgs.Item.Actions.Variables.Item.Repositories.RepositoriesPutRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPutRequestInformation(body, requestConfiguration); + await RequestAdapter.SendNoContentAsync(requestInfo, default, cancellationToken).ConfigureAwait(false); + } + /// + /// 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. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// 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. + /// + /// A + /// The request body + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPutRequestInformation(global::Ayllu.Github.Client.Orgs.Item.Actions.Variables.Item.Repositories.RepositoriesPutRequestBody body, Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToPutRequestInformation(global::Ayllu.Github.Client.Orgs.Item.Actions.Variables.Item.Repositories.RepositoriesPutRequestBody body, Action> requestConfiguration = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation(Method.PUT, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.Orgs.Item.Actions.Variables.Item.Repositories.RepositoriesRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Orgs.Item.Actions.Variables.Item.Repositories.RepositoriesRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// 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. + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class RepositoriesRequestBuilderGetQueryParameters + { + /// The page number of the results to fetch. For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." + [QueryParameter("page")] + public int? Page { get; set; } + /// The number of results per page (max 100). For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." + [QueryParameter("per_page")] + public int? PerPage { get; set; } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class RepositoriesRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class RepositoriesRequestBuilderPutRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Actions/Variables/Item/Repositories/RepositoriesResponse.cs b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Actions/Variables/Item/Repositories/RepositoriesResponse.cs new file mode 100644 index 0000000..c8d2a47 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Actions/Variables/Item/Repositories/RepositoriesResponse.cs @@ -0,0 +1,28 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Orgs.Item.Actions.Variables.Item.Repositories +{ + [Obsolete("This class is obsolete. Use RepositoriesGetResponse instead.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class RepositoriesResponse : global::Ayllu.Github.Client.Orgs.Item.Actions.Variables.Item.Repositories.RepositoriesGetResponse, IParsable + #pragma warning restore CS1591 + { + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static new global::Ayllu.Github.Client.Orgs.Item.Actions.Variables.Item.Repositories.RepositoriesResponse CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Orgs.Item.Actions.Variables.Item.Repositories.RepositoriesResponse(); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Actions/Variables/Item/WithNameItemRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Actions/Variables/Item/WithNameItemRequestBuilder.cs new file mode 100644 index 0000000..72e50a6 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Actions/Variables/Item/WithNameItemRequestBuilder.cs @@ -0,0 +1,192 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Ayllu.Github.Client.Orgs.Item.Actions.Variables.Item.Repositories; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Orgs.Item.Actions.Variables.Item +{ + /// + /// Builds and executes requests for operations under \orgs\{org}\actions\variables\{name} + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithNameItemRequestBuilder : BaseRequestBuilder + { + /// The repositories property + public global::Ayllu.Github.Client.Orgs.Item.Actions.Variables.Item.Repositories.RepositoriesRequestBuilder Repositories + { + get => new global::Ayllu.Github.Client.Orgs.Item.Actions.Variables.Item.Repositories.RepositoriesRequestBuilder(PathParameters, RequestAdapter); + } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public WithNameItemRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/orgs/{org}/actions/variables/{name}", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public WithNameItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/orgs/{org}/actions/variables/{name}", rawUrl) + { + } + /// + /// 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 + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task DeleteAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task DeleteAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToDeleteRequestInformation(requestConfiguration); + await RequestAdapter.SendNoContentAsync(requestInfo, default, cancellationToken).ConfigureAwait(false); + } + /// + /// 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. + /// API method documentation + /// + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Models.OrganizationActionsVariable.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false); + } + /// + /// 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 + /// + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PatchAsync(global::Ayllu.Github.Client.Orgs.Item.Actions.Variables.Item.WithNamePatchRequestBody body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task PatchAsync(global::Ayllu.Github.Client.Orgs.Item.Actions.Variables.Item.WithNamePatchRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPatchRequestInformation(body, requestConfiguration); + await RequestAdapter.SendNoContentAsync(requestInfo, default, cancellationToken).ConfigureAwait(false); + } + /// + /// 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. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToDeleteRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToDeleteRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.DELETE, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + return requestInfo; + } + /// + /// 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. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// 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. + /// + /// A + /// The request body + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPatchRequestInformation(global::Ayllu.Github.Client.Orgs.Item.Actions.Variables.Item.WithNamePatchRequestBody body, Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToPatchRequestInformation(global::Ayllu.Github.Client.Orgs.Item.Actions.Variables.Item.WithNamePatchRequestBody body, Action> requestConfiguration = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.Orgs.Item.Actions.Variables.Item.WithNameItemRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Orgs.Item.Actions.Variables.Item.WithNameItemRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithNameItemRequestBuilderDeleteRequestConfiguration : RequestConfiguration + { + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithNameItemRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithNameItemRequestBuilderPatchRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Actions/Variables/Item/WithNamePatchRequestBody.cs b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Actions/Variables/Item/WithNamePatchRequestBody.cs new file mode 100644 index 0000000..38d83f9 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Actions/Variables/Item/WithNamePatchRequestBody.cs @@ -0,0 +1,89 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Orgs.Item.Actions.Variables.Item +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class WithNamePatchRequestBody : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The name of the variable. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Name { get; set; } +#nullable restore +#else + public string Name { get; set; } +#endif + /// 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`. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? SelectedRepositoryIds { get; set; } +#nullable restore +#else + public List SelectedRepositoryIds { get; set; } +#endif + /// The value of the variable. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Value { get; set; } +#nullable restore +#else + public string Value { get; set; } +#endif + /// 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. + public global::Ayllu.Github.Client.Orgs.Item.Actions.Variables.Item.WithNamePatchRequestBody_visibility? Visibility { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public WithNamePatchRequestBody() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Orgs.Item.Actions.Variables.Item.WithNamePatchRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Orgs.Item.Actions.Variables.Item.WithNamePatchRequestBody(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "name", n => { Name = n.GetStringValue(); } }, + { "selected_repository_ids", n => { SelectedRepositoryIds = n.GetCollectionOfPrimitiveValues()?.AsList(); } }, + { "value", n => { Value = n.GetStringValue(); } }, + { "visibility", n => { Visibility = n.GetEnumValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("name", Name); + writer.WriteCollectionOfPrimitiveValues("selected_repository_ids", SelectedRepositoryIds); + writer.WriteStringValue("value", Value); + writer.WriteEnumValue("visibility", Visibility); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Actions/Variables/Item/WithNamePatchRequestBody_visibility.cs b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Actions/Variables/Item/WithNamePatchRequestBody_visibility.cs new file mode 100644 index 0000000..e01ba94 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Actions/Variables/Item/WithNamePatchRequestBody_visibility.cs @@ -0,0 +1,23 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Orgs.Item.Actions.Variables.Item +{ + /// 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. + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public enum WithNamePatchRequestBody_visibility + { + [EnumMember(Value = "all")] + #pragma warning disable CS1591 + All, + #pragma warning restore CS1591 + [EnumMember(Value = "private")] + #pragma warning disable CS1591 + Private, + #pragma warning restore CS1591 + [EnumMember(Value = "selected")] + #pragma warning disable CS1591 + Selected, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Actions/Variables/VariablesGetResponse.cs b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Actions/Variables/VariablesGetResponse.cs new file mode 100644 index 0000000..5745881 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Actions/Variables/VariablesGetResponse.cs @@ -0,0 +1,70 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Orgs.Item.Actions.Variables +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class VariablesGetResponse : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The total_count property + public int? TotalCount { get; set; } + /// The variables property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? Variables { get; set; } +#nullable restore +#else + public List Variables { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public VariablesGetResponse() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Orgs.Item.Actions.Variables.VariablesGetResponse CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Orgs.Item.Actions.Variables.VariablesGetResponse(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "total_count", n => { TotalCount = n.GetIntValue(); } }, + { "variables", n => { Variables = n.GetCollectionOfObjectValues(global::Ayllu.Github.Client.Models.OrganizationActionsVariable.CreateFromDiscriminatorValue)?.AsList(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteIntValue("total_count", TotalCount); + writer.WriteCollectionOfObjectValues("variables", Variables); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Actions/Variables/VariablesPostRequestBody.cs b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Actions/Variables/VariablesPostRequestBody.cs new file mode 100644 index 0000000..1c94e8c --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Actions/Variables/VariablesPostRequestBody.cs @@ -0,0 +1,89 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Orgs.Item.Actions.Variables +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class VariablesPostRequestBody : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The name of the variable. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Name { get; set; } +#nullable restore +#else + public string Name { get; set; } +#endif + /// 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`. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? SelectedRepositoryIds { get; set; } +#nullable restore +#else + public List SelectedRepositoryIds { get; set; } +#endif + /// The value of the variable. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Value { get; set; } +#nullable restore +#else + public string Value { get; set; } +#endif + /// 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. + public global::Ayllu.Github.Client.Orgs.Item.Actions.Variables.VariablesPostRequestBody_visibility? Visibility { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public VariablesPostRequestBody() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Orgs.Item.Actions.Variables.VariablesPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Orgs.Item.Actions.Variables.VariablesPostRequestBody(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "name", n => { Name = n.GetStringValue(); } }, + { "selected_repository_ids", n => { SelectedRepositoryIds = n.GetCollectionOfPrimitiveValues()?.AsList(); } }, + { "value", n => { Value = n.GetStringValue(); } }, + { "visibility", n => { Visibility = n.GetEnumValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("name", Name); + writer.WriteCollectionOfPrimitiveValues("selected_repository_ids", SelectedRepositoryIds); + writer.WriteStringValue("value", Value); + writer.WriteEnumValue("visibility", Visibility); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Actions/Variables/VariablesPostRequestBody_visibility.cs b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Actions/Variables/VariablesPostRequestBody_visibility.cs new file mode 100644 index 0000000..14744e1 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Actions/Variables/VariablesPostRequestBody_visibility.cs @@ -0,0 +1,23 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Orgs.Item.Actions.Variables +{ + /// 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. + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public enum VariablesPostRequestBody_visibility + { + [EnumMember(Value = "all")] + #pragma warning disable CS1591 + All, + #pragma warning restore CS1591 + [EnumMember(Value = "private")] + #pragma warning disable CS1591 + Private, + #pragma warning restore CS1591 + [EnumMember(Value = "selected")] + #pragma warning disable CS1591 + Selected, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Actions/Variables/VariablesRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Actions/Variables/VariablesRequestBuilder.cs new file mode 100644 index 0000000..ad62cf9 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Actions/Variables/VariablesRequestBuilder.cs @@ -0,0 +1,190 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Ayllu.Github.Client.Orgs.Item.Actions.Variables.Item; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Orgs.Item.Actions.Variables +{ + /// + /// Builds and executes requests for operations under \orgs\{org}\actions\variables + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class VariablesRequestBuilder : BaseRequestBuilder + { + /// Gets an item from the Ayllu.Github.Client.orgs.item.actions.variables.item collection + /// The name of the variable. + /// A + public global::Ayllu.Github.Client.Orgs.Item.Actions.Variables.Item.WithNameItemRequestBuilder this[string position] + { + get + { + var urlTplParams = new Dictionary(PathParameters); + urlTplParams.Add("name", position); + return new global::Ayllu.Github.Client.Orgs.Item.Actions.Variables.Item.WithNameItemRequestBuilder(urlTplParams, RequestAdapter); + } + } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public VariablesRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/orgs/{org}/actions/variables{?page*,per_page*}", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public VariablesRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/orgs/{org}/actions/variables{?page*,per_page*}", rawUrl) + { + } + /// + /// 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. + /// API method documentation + /// + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsVariablesGetResponseAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task GetAsVariablesGetResponseAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Orgs.Item.Actions.Variables.VariablesGetResponse.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false); + } + /// + /// 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. + /// API method documentation + /// + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + [Obsolete("This method is obsolete. Use GetAsVariablesGetResponseAsync instead.")] +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Orgs.Item.Actions.Variables.VariablesResponse.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false); + } + /// + /// 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. + /// API method documentation + /// + /// A + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PostAsync(global::Ayllu.Github.Client.Orgs.Item.Actions.Variables.VariablesPostRequestBody body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task PostAsync(global::Ayllu.Github.Client.Orgs.Item.Actions.Variables.VariablesPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPostRequestInformation(body, requestConfiguration); + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Models.EmptyObject.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false); + } + /// + /// 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. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// 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. + /// + /// A + /// The request body + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPostRequestInformation(global::Ayllu.Github.Client.Orgs.Item.Actions.Variables.VariablesPostRequestBody body, Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToPostRequestInformation(global::Ayllu.Github.Client.Orgs.Item.Actions.Variables.VariablesPostRequestBody body, Action> requestConfiguration = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.Orgs.Item.Actions.Variables.VariablesRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Orgs.Item.Actions.Variables.VariablesRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// 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. + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class VariablesRequestBuilderGetQueryParameters + { + /// The page number of the results to fetch. For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." + [QueryParameter("page")] + public int? Page { get; set; } + /// The number of results per page (max 30). For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." + [QueryParameter("per_page")] + public int? PerPage { get; set; } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class VariablesRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class VariablesRequestBuilderPostRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Actions/Variables/VariablesResponse.cs b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Actions/Variables/VariablesResponse.cs new file mode 100644 index 0000000..0541c69 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Actions/Variables/VariablesResponse.cs @@ -0,0 +1,28 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Orgs.Item.Actions.Variables +{ + [Obsolete("This class is obsolete. Use VariablesGetResponse instead.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class VariablesResponse : global::Ayllu.Github.Client.Orgs.Item.Actions.Variables.VariablesGetResponse, IParsable + #pragma warning restore CS1591 + { + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static new global::Ayllu.Github.Client.Orgs.Item.Actions.Variables.VariablesResponse CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Orgs.Item.Actions.Variables.VariablesResponse(); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Attestations/AttestationsRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Attestations/AttestationsRequestBuilder.cs new file mode 100644 index 0000000..53258e7 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Attestations/AttestationsRequestBuilder.cs @@ -0,0 +1,79 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Orgs.Item.Attestations.BulkList; +using Ayllu.Github.Client.Orgs.Item.Attestations.DeleteRequest; +using Ayllu.Github.Client.Orgs.Item.Attestations.Digest; +using Ayllu.Github.Client.Orgs.Item.Attestations.Item; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System; +namespace Ayllu.Github.Client.Orgs.Item.Attestations +{ + /// + /// Builds and executes requests for operations under \orgs\{org}\attestations + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class AttestationsRequestBuilder : BaseRequestBuilder + { + /// The bulkList property + public global::Ayllu.Github.Client.Orgs.Item.Attestations.BulkList.BulkListRequestBuilder BulkList + { + get => new global::Ayllu.Github.Client.Orgs.Item.Attestations.BulkList.BulkListRequestBuilder(PathParameters, RequestAdapter); + } + /// The deleteRequest property + public global::Ayllu.Github.Client.Orgs.Item.Attestations.DeleteRequest.DeleteRequestRequestBuilder DeleteRequest + { + get => new global::Ayllu.Github.Client.Orgs.Item.Attestations.DeleteRequest.DeleteRequestRequestBuilder(PathParameters, RequestAdapter); + } + /// The digest property + public global::Ayllu.Github.Client.Orgs.Item.Attestations.Digest.DigestRequestBuilder Digest + { + get => new global::Ayllu.Github.Client.Orgs.Item.Attestations.Digest.DigestRequestBuilder(PathParameters, RequestAdapter); + } + /// Gets an item from the Ayllu.Github.Client.orgs.item.attestations.item collection + /// Attestation ID + /// A + public global::Ayllu.Github.Client.Orgs.Item.Attestations.Item.Attestation_ItemRequestBuilder this[int position] + { + get + { + var urlTplParams = new Dictionary(PathParameters); + urlTplParams.Add("attestation_%2Did", position); + return new global::Ayllu.Github.Client.Orgs.Item.Attestations.Item.Attestation_ItemRequestBuilder(urlTplParams, RequestAdapter); + } + } + /// Gets an item from the Ayllu.Github.Client.orgs.item.attestations.item collection + /// Attestation ID + /// A + [Obsolete("This indexer is deprecated and will be removed in the next major version. Use the one with the typed parameter instead.")] + public global::Ayllu.Github.Client.Orgs.Item.Attestations.Item.Attestation_ItemRequestBuilder this[string position] + { + get + { + var urlTplParams = new Dictionary(PathParameters); + if (!string.IsNullOrWhiteSpace(position)) urlTplParams.Add("attestation_%2Did", position); + return new global::Ayllu.Github.Client.Orgs.Item.Attestations.Item.Attestation_ItemRequestBuilder(urlTplParams, RequestAdapter); + } + } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public AttestationsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/orgs/{org}/attestations", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public AttestationsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/orgs/{org}/attestations", rawUrl) + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Attestations/BulkList/BulkListPostRequestBody.cs b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Attestations/BulkList/BulkListPostRequestBody.cs new file mode 100644 index 0000000..fb18e4c --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Attestations/BulkList/BulkListPostRequestBody.cs @@ -0,0 +1,75 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Orgs.Item.Attestations.BulkList +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class BulkListPostRequestBody : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// Optional filter for fetching attestations with a given predicate type.This option accepts `provenance`, `sbom`, or freeform text for custom predicate types. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? PredicateType { get; set; } +#nullable restore +#else + public string PredicateType { get; set; } +#endif + /// List of subject digests to fetch attestations for. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? SubjectDigests { get; set; } +#nullable restore +#else + public List SubjectDigests { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public BulkListPostRequestBody() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Orgs.Item.Attestations.BulkList.BulkListPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Orgs.Item.Attestations.BulkList.BulkListPostRequestBody(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "predicate_type", n => { PredicateType = n.GetStringValue(); } }, + { "subject_digests", n => { SubjectDigests = n.GetCollectionOfPrimitiveValues()?.AsList(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("predicate_type", PredicateType); + writer.WriteCollectionOfPrimitiveValues("subject_digests", SubjectDigests); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Attestations/BulkList/BulkListPostResponse.cs b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Attestations/BulkList/BulkListPostResponse.cs new file mode 100644 index 0000000..fb60592 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Attestations/BulkList/BulkListPostResponse.cs @@ -0,0 +1,75 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Orgs.Item.Attestations.BulkList +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class BulkListPostResponse : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// Mapping of subject digest to bundles. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Orgs.Item.Attestations.BulkList.BulkListPostResponse_attestations_subject_digests? AttestationsSubjectDigests { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Orgs.Item.Attestations.BulkList.BulkListPostResponse_attestations_subject_digests AttestationsSubjectDigests { get; set; } +#endif + /// Information about the current page. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Orgs.Item.Attestations.BulkList.BulkListPostResponse_page_info? PageInfo { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Orgs.Item.Attestations.BulkList.BulkListPostResponse_page_info PageInfo { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public BulkListPostResponse() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Orgs.Item.Attestations.BulkList.BulkListPostResponse CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Orgs.Item.Attestations.BulkList.BulkListPostResponse(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "attestations_subject_digests", n => { AttestationsSubjectDigests = n.GetObjectValue(global::Ayllu.Github.Client.Orgs.Item.Attestations.BulkList.BulkListPostResponse_attestations_subject_digests.CreateFromDiscriminatorValue); } }, + { "page_info", n => { PageInfo = n.GetObjectValue(global::Ayllu.Github.Client.Orgs.Item.Attestations.BulkList.BulkListPostResponse_page_info.CreateFromDiscriminatorValue); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteObjectValue("attestations_subject_digests", AttestationsSubjectDigests); + writer.WriteObjectValue("page_info", PageInfo); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Attestations/BulkList/BulkListPostResponse_attestations_subject_digests.cs b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Attestations/BulkList/BulkListPostResponse_attestations_subject_digests.cs new file mode 100644 index 0000000..f1712c1 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Attestations/BulkList/BulkListPostResponse_attestations_subject_digests.cs @@ -0,0 +1,56 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Orgs.Item.Attestations.BulkList +{ + /// + /// Mapping of subject digest to bundles. + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class BulkListPostResponse_attestations_subject_digests : IAdditionalDataHolder, IParsable + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public BulkListPostResponse_attestations_subject_digests() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Orgs.Item.Attestations.BulkList.BulkListPostResponse_attestations_subject_digests CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Orgs.Item.Attestations.BulkList.BulkListPostResponse_attestations_subject_digests(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Attestations/BulkList/BulkListPostResponse_page_info.cs b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Attestations/BulkList/BulkListPostResponse_page_info.cs new file mode 100644 index 0000000..a17780a --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Attestations/BulkList/BulkListPostResponse_page_info.cs @@ -0,0 +1,84 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Orgs.Item.Attestations.BulkList +{ + /// + /// Information about the current page. + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class BulkListPostResponse_page_info : IAdditionalDataHolder, IParsable + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// Indicates whether there is a next page. + public bool? HasNext { get; set; } + /// Indicates whether there is a previous page. + public bool? HasPrevious { get; set; } + /// The cursor to the next page. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Next { get; set; } +#nullable restore +#else + public string Next { get; set; } +#endif + /// The cursor to the previous page. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Previous { get; set; } +#nullable restore +#else + public string Previous { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public BulkListPostResponse_page_info() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Orgs.Item.Attestations.BulkList.BulkListPostResponse_page_info CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Orgs.Item.Attestations.BulkList.BulkListPostResponse_page_info(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "has_next", n => { HasNext = n.GetBoolValue(); } }, + { "has_previous", n => { HasPrevious = n.GetBoolValue(); } }, + { "next", n => { Next = n.GetStringValue(); } }, + { "previous", n => { Previous = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteBoolValue("has_next", HasNext); + writer.WriteBoolValue("has_previous", HasPrevious); + writer.WriteStringValue("next", Next); + writer.WriteStringValue("previous", Previous); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Attestations/BulkList/BulkListRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Attestations/BulkList/BulkListRequestBuilder.cs new file mode 100644 index 0000000..fd52ab8 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Attestations/BulkList/BulkListRequestBuilder.cs @@ -0,0 +1,149 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Orgs.Item.Attestations.BulkList +{ + /// + /// Builds and executes requests for operations under \orgs\{org}\attestations\bulk-list + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class BulkListRequestBuilder : BaseRequestBuilder + { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public BulkListRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/orgs/{org}/attestations/bulk-list{?after*,before*,per_page*}", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public BulkListRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/orgs/{org}/attestations/bulk-list{?after*,before*,per_page*}", rawUrl) + { + } + /// + /// List a collection of artifact attestations associated with any entry in a list of subject digests 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/actions/security-guides/using-artifact-attestations-to-establish-provenance-for-builds). + /// API method documentation + /// + /// A + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PostAsBulkListPostResponseAsync(global::Ayllu.Github.Client.Orgs.Item.Attestations.BulkList.BulkListPostRequestBody body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task PostAsBulkListPostResponseAsync(global::Ayllu.Github.Client.Orgs.Item.Attestations.BulkList.BulkListPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPostRequestInformation(body, requestConfiguration); + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Orgs.Item.Attestations.BulkList.BulkListPostResponse.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false); + } + /// + /// List a collection of artifact attestations associated with any entry in a list of subject digests 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/actions/security-guides/using-artifact-attestations-to-establish-provenance-for-builds). + /// API method documentation + /// + /// A + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + [Obsolete("This method is obsolete. Use PostAsBulkListPostResponseAsync instead.")] +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PostAsync(global::Ayllu.Github.Client.Orgs.Item.Attestations.BulkList.BulkListPostRequestBody body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task PostAsync(global::Ayllu.Github.Client.Orgs.Item.Attestations.BulkList.BulkListPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPostRequestInformation(body, requestConfiguration); + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Orgs.Item.Attestations.BulkList.BulkListResponse.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false); + } + /// + /// List a collection of artifact attestations associated with any entry in a list of subject digests 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/actions/security-guides/using-artifact-attestations-to-establish-provenance-for-builds). + /// + /// A + /// The request body + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPostRequestInformation(global::Ayllu.Github.Client.Orgs.Item.Attestations.BulkList.BulkListPostRequestBody body, Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToPostRequestInformation(global::Ayllu.Github.Client.Orgs.Item.Attestations.BulkList.BulkListPostRequestBody body, Action> requestConfiguration = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.Orgs.Item.Attestations.BulkList.BulkListRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Orgs.Item.Attestations.BulkList.BulkListRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// List a collection of artifact attestations associated with any entry in a list of subject digests 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/actions/security-guides/using-artifact-attestations-to-establish-provenance-for-builds). + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class BulkListRequestBuilderPostQueryParameters + { + /// A cursor, as given in the [Link header](https://docs.github.com/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/rest/using-the-rest-api/using-pagination-in-the-rest-api)." +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("after")] + public string? After { get; set; } +#nullable restore +#else + [QueryParameter("after")] + public string After { get; set; } +#endif + /// A cursor, as given in the [Link header](https://docs.github.com/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/rest/using-the-rest-api/using-pagination-in-the-rest-api)." +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("before")] + public string? Before { get; set; } +#nullable restore +#else + [QueryParameter("before")] + public string Before { get; set; } +#endif + /// The number of results per page (max 100). For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." + [QueryParameter("per_page")] + public int? PerPage { get; set; } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class BulkListRequestBuilderPostRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Attestations/BulkList/BulkListResponse.cs b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Attestations/BulkList/BulkListResponse.cs new file mode 100644 index 0000000..82f09dd --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Attestations/BulkList/BulkListResponse.cs @@ -0,0 +1,28 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Orgs.Item.Attestations.BulkList +{ + [Obsolete("This class is obsolete. Use BulkListPostResponse instead.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class BulkListResponse : global::Ayllu.Github.Client.Orgs.Item.Attestations.BulkList.BulkListPostResponse, IParsable + #pragma warning restore CS1591 + { + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static new global::Ayllu.Github.Client.Orgs.Item.Attestations.BulkList.BulkListResponse CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Orgs.Item.Attestations.BulkList.BulkListResponse(); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Attestations/DeleteRequest/DeleteRequestPostRequestBodyMember1.cs b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Attestations/DeleteRequest/DeleteRequestPostRequestBodyMember1.cs new file mode 100644 index 0000000..1f69050 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Attestations/DeleteRequest/DeleteRequestPostRequestBodyMember1.cs @@ -0,0 +1,65 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Orgs.Item.Attestations.DeleteRequest +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class DeleteRequestPostRequestBodyMember1 : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// List of subject digests associated with the artifact attestations to delete. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? SubjectDigests { get; set; } +#nullable restore +#else + public List SubjectDigests { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public DeleteRequestPostRequestBodyMember1() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Orgs.Item.Attestations.DeleteRequest.DeleteRequestPostRequestBodyMember1 CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Orgs.Item.Attestations.DeleteRequest.DeleteRequestPostRequestBodyMember1(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "subject_digests", n => { SubjectDigests = n.GetCollectionOfPrimitiveValues()?.AsList(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteCollectionOfPrimitiveValues("subject_digests", SubjectDigests); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Attestations/DeleteRequest/DeleteRequestPostRequestBodyMember2.cs b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Attestations/DeleteRequest/DeleteRequestPostRequestBodyMember2.cs new file mode 100644 index 0000000..7644890 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Attestations/DeleteRequest/DeleteRequestPostRequestBodyMember2.cs @@ -0,0 +1,65 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Orgs.Item.Attestations.DeleteRequest +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class DeleteRequestPostRequestBodyMember2 : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// List of unique IDs associated with the artifact attestations to delete. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? AttestationIds { get; set; } +#nullable restore +#else + public List AttestationIds { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public DeleteRequestPostRequestBodyMember2() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Orgs.Item.Attestations.DeleteRequest.DeleteRequestPostRequestBodyMember2 CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Orgs.Item.Attestations.DeleteRequest.DeleteRequestPostRequestBodyMember2(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "attestation_ids", n => { AttestationIds = n.GetCollectionOfPrimitiveValues()?.AsList(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteCollectionOfPrimitiveValues("attestation_ids", AttestationIds); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Attestations/DeleteRequest/DeleteRequestRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Attestations/DeleteRequest/DeleteRequestRequestBuilder.cs new file mode 100644 index 0000000..c7fcb91 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Attestations/DeleteRequest/DeleteRequestRequestBuilder.cs @@ -0,0 +1,178 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Orgs.Item.Attestations.DeleteRequest +{ + /// + /// Builds and executes requests for operations under \orgs\{org}\attestations\delete-request + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class DeleteRequestRequestBuilder : BaseRequestBuilder + { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public DeleteRequestRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/orgs/{org}/attestations/delete-request", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public DeleteRequestRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/orgs/{org}/attestations/delete-request", rawUrl) + { + } + /// + /// Delete artifact attestations in bulk by either subject digests or unique ID. + /// API method documentation + /// + /// A + /// The request body must include either `subject_digests` or `attestation_ids`, but not both. + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 404 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PostAsync(global::Ayllu.Github.Client.Orgs.Item.Attestations.DeleteRequest.DeleteRequestRequestBuilder.DeleteRequestPostRequestBody body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task PostAsync(global::Ayllu.Github.Client.Orgs.Item.Attestations.DeleteRequest.DeleteRequestRequestBuilder.DeleteRequestPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPostRequestInformation(body, requestConfiguration); + var errorMapping = new Dictionary> + { + { "404", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendPrimitiveAsync(requestInfo, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// Delete artifact attestations in bulk by either subject digests or unique ID. + /// + /// A + /// The request body must include either `subject_digests` or `attestation_ids`, but not both. + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPostRequestInformation(global::Ayllu.Github.Client.Orgs.Item.Attestations.DeleteRequest.DeleteRequestRequestBuilder.DeleteRequestPostRequestBody body, Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToPostRequestInformation(global::Ayllu.Github.Client.Orgs.Item.Attestations.DeleteRequest.DeleteRequestRequestBuilder.DeleteRequestPostRequestBody body, Action> requestConfiguration = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.Orgs.Item.Attestations.DeleteRequest.DeleteRequestRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Orgs.Item.Attestations.DeleteRequest.DeleteRequestRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Composed type wrapper for classes , + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class DeleteRequestPostRequestBody : IComposedTypeWrapper, IParsable + { + /// Composed type representation for type +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Orgs.Item.Attestations.DeleteRequest.DeleteRequestPostRequestBodyMember1? DeleteRequestPostRequestBodyMember1 { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Orgs.Item.Attestations.DeleteRequest.DeleteRequestPostRequestBodyMember1 DeleteRequestPostRequestBodyMember1 { get; set; } +#endif + /// Composed type representation for type +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Orgs.Item.Attestations.DeleteRequest.DeleteRequestPostRequestBodyMember2? DeleteRequestPostRequestBodyMember2 { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Orgs.Item.Attestations.DeleteRequest.DeleteRequestPostRequestBodyMember2 DeleteRequestPostRequestBodyMember2 { get; set; } +#endif + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Orgs.Item.Attestations.DeleteRequest.DeleteRequestRequestBuilder.DeleteRequestPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + var mappingValue = parseNode.GetChildNode("")?.GetStringValue(); + var result = new global::Ayllu.Github.Client.Orgs.Item.Attestations.DeleteRequest.DeleteRequestRequestBuilder.DeleteRequestPostRequestBody(); + if("".Equals(mappingValue, StringComparison.OrdinalIgnoreCase)) + { + result.DeleteRequestPostRequestBodyMember1 = new global::Ayllu.Github.Client.Orgs.Item.Attestations.DeleteRequest.DeleteRequestPostRequestBodyMember1(); + } + else if("".Equals(mappingValue, StringComparison.OrdinalIgnoreCase)) + { + result.DeleteRequestPostRequestBodyMember2 = new global::Ayllu.Github.Client.Orgs.Item.Attestations.DeleteRequest.DeleteRequestPostRequestBodyMember2(); + } + return result; + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + if(DeleteRequestPostRequestBodyMember1 != null) + { + return DeleteRequestPostRequestBodyMember1.GetFieldDeserializers(); + } + else if(DeleteRequestPostRequestBodyMember2 != null) + { + return DeleteRequestPostRequestBodyMember2.GetFieldDeserializers(); + } + return new Dictionary>(); + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(DeleteRequestPostRequestBodyMember1 != null) + { + writer.WriteObjectValue(null, DeleteRequestPostRequestBodyMember1); + } + else if(DeleteRequestPostRequestBodyMember2 != null) + { + writer.WriteObjectValue(null, DeleteRequestPostRequestBodyMember2); + } + } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class DeleteRequestRequestBuilderPostRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Attestations/Digest/DigestRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Attestations/Digest/DigestRequestBuilder.cs new file mode 100644 index 0000000..f5c33e7 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Attestations/Digest/DigestRequestBuilder.cs @@ -0,0 +1,48 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Orgs.Item.Attestations.Digest.Item; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System; +namespace Ayllu.Github.Client.Orgs.Item.Attestations.Digest +{ + /// + /// Builds and executes requests for operations under \orgs\{org}\attestations\digest + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class DigestRequestBuilder : BaseRequestBuilder + { + /// Gets an item from the Ayllu.Github.Client.orgs.item.attestations.digest.item collection + /// Subject Digest + /// A + public global::Ayllu.Github.Client.Orgs.Item.Attestations.Digest.Item.WithSubject_digestItemRequestBuilder this[string position] + { + get + { + var urlTplParams = new Dictionary(PathParameters); + urlTplParams.Add("subject_digest", position); + return new global::Ayllu.Github.Client.Orgs.Item.Attestations.Digest.Item.WithSubject_digestItemRequestBuilder(urlTplParams, RequestAdapter); + } + } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public DigestRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/orgs/{org}/attestations/digest", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public DigestRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/orgs/{org}/attestations/digest", rawUrl) + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Attestations/Digest/Item/WithSubject_digestItemRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Attestations/Digest/Item/WithSubject_digestItemRequestBuilder.cs new file mode 100644 index 0000000..e04f02b --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Attestations/Digest/Item/WithSubject_digestItemRequestBuilder.cs @@ -0,0 +1,97 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Orgs.Item.Attestations.Digest.Item +{ + /// + /// Builds and executes requests for operations under \orgs\{org}\attestations\digest\{subject_digest} + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithSubject_digestItemRequestBuilder : BaseRequestBuilder + { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public WithSubject_digestItemRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/orgs/{org}/attestations/digest/{subject_digest}", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public WithSubject_digestItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/orgs/{org}/attestations/digest/{subject_digest}", rawUrl) + { + } + /// + /// Delete an artifact attestation by subject digest. + /// API method documentation + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 404 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task DeleteAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task DeleteAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToDeleteRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "404", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + }; + await RequestAdapter.SendNoContentAsync(requestInfo, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// Delete an artifact attestation by subject digest. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToDeleteRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToDeleteRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.DELETE, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.Orgs.Item.Attestations.Digest.Item.WithSubject_digestItemRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Orgs.Item.Attestations.Digest.Item.WithSubject_digestItemRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithSubject_digestItemRequestBuilderDeleteRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Attestations/Item/Attestation_GetResponse.cs b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Attestations/Item/Attestation_GetResponse.cs new file mode 100644 index 0000000..ebb8458 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Attestations/Item/Attestation_GetResponse.cs @@ -0,0 +1,65 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Orgs.Item.Attestations.Item +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class Attestation_GetResponse : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The attestations property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? Attestations { get; set; } +#nullable restore +#else + public List Attestations { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public Attestation_GetResponse() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Orgs.Item.Attestations.Item.Attestation_GetResponse CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Orgs.Item.Attestations.Item.Attestation_GetResponse(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "attestations", n => { Attestations = n.GetCollectionOfObjectValues(global::Ayllu.Github.Client.Orgs.Item.Attestations.Item.Attestation_GetResponse_attestations.CreateFromDiscriminatorValue)?.AsList(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteCollectionOfObjectValues("attestations", Attestations); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Attestations/Item/Attestation_GetResponse_attestations.cs b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Attestations/Item/Attestation_GetResponse_attestations.cs new file mode 100644 index 0000000..3ac75da --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Attestations/Item/Attestation_GetResponse_attestations.cs @@ -0,0 +1,79 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Orgs.Item.Attestations.Item +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class Attestation_GetResponse_attestations : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// 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. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Orgs.Item.Attestations.Item.Attestation_GetResponse_attestations_bundle? Bundle { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Orgs.Item.Attestations.Item.Attestation_GetResponse_attestations_bundle Bundle { get; set; } +#endif + /// The bundle_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? BundleUrl { get; set; } +#nullable restore +#else + public string BundleUrl { get; set; } +#endif + /// The repository_id property + public int? RepositoryId { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public Attestation_GetResponse_attestations() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Orgs.Item.Attestations.Item.Attestation_GetResponse_attestations CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Orgs.Item.Attestations.Item.Attestation_GetResponse_attestations(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "bundle", n => { Bundle = n.GetObjectValue(global::Ayllu.Github.Client.Orgs.Item.Attestations.Item.Attestation_GetResponse_attestations_bundle.CreateFromDiscriminatorValue); } }, + { "bundle_url", n => { BundleUrl = n.GetStringValue(); } }, + { "repository_id", n => { RepositoryId = n.GetIntValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteObjectValue("bundle", Bundle); + writer.WriteStringValue("bundle_url", BundleUrl); + writer.WriteIntValue("repository_id", RepositoryId); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Attestations/Item/Attestation_GetResponse_attestations_bundle.cs b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Attestations/Item/Attestation_GetResponse_attestations_bundle.cs new file mode 100644 index 0000000..d73cdf7 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Attestations/Item/Attestation_GetResponse_attestations_bundle.cs @@ -0,0 +1,86 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Orgs.Item.Attestations.Item +{ + /// + /// 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. + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class Attestation_GetResponse_attestations_bundle : IAdditionalDataHolder, IParsable + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The dsseEnvelope property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Orgs.Item.Attestations.Item.Attestation_GetResponse_attestations_bundle_dsseEnvelope? DsseEnvelope { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Orgs.Item.Attestations.Item.Attestation_GetResponse_attestations_bundle_dsseEnvelope DsseEnvelope { get; set; } +#endif + /// The mediaType property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? MediaType { get; set; } +#nullable restore +#else + public string MediaType { get; set; } +#endif + /// The verificationMaterial property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Orgs.Item.Attestations.Item.Attestation_GetResponse_attestations_bundle_verificationMaterial? VerificationMaterial { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Orgs.Item.Attestations.Item.Attestation_GetResponse_attestations_bundle_verificationMaterial VerificationMaterial { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public Attestation_GetResponse_attestations_bundle() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Orgs.Item.Attestations.Item.Attestation_GetResponse_attestations_bundle CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Orgs.Item.Attestations.Item.Attestation_GetResponse_attestations_bundle(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "dsseEnvelope", n => { DsseEnvelope = n.GetObjectValue(global::Ayllu.Github.Client.Orgs.Item.Attestations.Item.Attestation_GetResponse_attestations_bundle_dsseEnvelope.CreateFromDiscriminatorValue); } }, + { "mediaType", n => { MediaType = n.GetStringValue(); } }, + { "verificationMaterial", n => { VerificationMaterial = n.GetObjectValue(global::Ayllu.Github.Client.Orgs.Item.Attestations.Item.Attestation_GetResponse_attestations_bundle_verificationMaterial.CreateFromDiscriminatorValue); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteObjectValue("dsseEnvelope", DsseEnvelope); + writer.WriteStringValue("mediaType", MediaType); + writer.WriteObjectValue("verificationMaterial", VerificationMaterial); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Attestations/Item/Attestation_GetResponse_attestations_bundle_dsseEnvelope.cs b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Attestations/Item/Attestation_GetResponse_attestations_bundle_dsseEnvelope.cs new file mode 100644 index 0000000..5a82097 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Attestations/Item/Attestation_GetResponse_attestations_bundle_dsseEnvelope.cs @@ -0,0 +1,55 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Orgs.Item.Attestations.Item +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class Attestation_GetResponse_attestations_bundle_dsseEnvelope : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public Attestation_GetResponse_attestations_bundle_dsseEnvelope() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Orgs.Item.Attestations.Item.Attestation_GetResponse_attestations_bundle_dsseEnvelope CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Orgs.Item.Attestations.Item.Attestation_GetResponse_attestations_bundle_dsseEnvelope(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Attestations/Item/Attestation_GetResponse_attestations_bundle_verificationMaterial.cs b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Attestations/Item/Attestation_GetResponse_attestations_bundle_verificationMaterial.cs new file mode 100644 index 0000000..6aedffa --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Attestations/Item/Attestation_GetResponse_attestations_bundle_verificationMaterial.cs @@ -0,0 +1,55 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Orgs.Item.Attestations.Item +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class Attestation_GetResponse_attestations_bundle_verificationMaterial : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public Attestation_GetResponse_attestations_bundle_verificationMaterial() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Orgs.Item.Attestations.Item.Attestation_GetResponse_attestations_bundle_verificationMaterial CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Orgs.Item.Attestations.Item.Attestation_GetResponse_attestations_bundle_verificationMaterial(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Attestations/Item/Attestation_ItemRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Attestations/Item/Attestation_ItemRequestBuilder.cs new file mode 100644 index 0000000..0763dbd --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Attestations/Item/Attestation_ItemRequestBuilder.cs @@ -0,0 +1,205 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Orgs.Item.Attestations.Item +{ + /// + /// Builds and executes requests for operations under \orgs\{org}\attestations\{attestation_-id} + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class Attestation_ItemRequestBuilder : BaseRequestBuilder + { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public Attestation_ItemRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/orgs/{org}/attestations/{attestation_%2Did}{?after*,before*,per_page*,predicate_type*}", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public Attestation_ItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/orgs/{org}/attestations/{attestation_%2Did}{?after*,before*,per_page*,predicate_type*}", rawUrl) + { + } + /// + /// Delete an artifact attestation by unique ID that is associated with a repository owned by an org. + /// API method documentation + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 403 status code + /// When receiving a 404 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task DeleteAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task DeleteAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToDeleteRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "403", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "404", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + }; + await RequestAdapter.SendNoContentAsync(requestInfo, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// 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/actions/security-guides/using-artifact-attestations-to-establish-provenance-for-builds). + /// API method documentation + /// + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsAttestation_GetResponseAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task GetAsAttestation_GetResponseAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Orgs.Item.Attestations.Item.Attestation_GetResponse.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false); + } + /// + /// 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/actions/security-guides/using-artifact-attestations-to-establish-provenance-for-builds). + /// API method documentation + /// + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + [Obsolete("This method is obsolete. Use GetAsAttestation_GetResponseAsync instead.")] +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Orgs.Item.Attestations.Item.Attestation_Response.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false); + } + /// + /// Delete an artifact attestation by unique ID that is associated with a repository owned by an org. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToDeleteRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToDeleteRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.DELETE, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// 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/actions/security-guides/using-artifact-attestations-to-establish-provenance-for-builds). + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.Orgs.Item.Attestations.Item.Attestation_ItemRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Orgs.Item.Attestations.Item.Attestation_ItemRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class Attestation_ItemRequestBuilderDeleteRequestConfiguration : RequestConfiguration + { + } + /// + /// 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/actions/security-guides/using-artifact-attestations-to-establish-provenance-for-builds). + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class Attestation_ItemRequestBuilderGetQueryParameters + { + /// A cursor, as given in the [Link header](https://docs.github.com/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/rest/using-the-rest-api/using-pagination-in-the-rest-api)." +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("after")] + public string? After { get; set; } +#nullable restore +#else + [QueryParameter("after")] + public string After { get; set; } +#endif + /// A cursor, as given in the [Link header](https://docs.github.com/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/rest/using-the-rest-api/using-pagination-in-the-rest-api)." +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("before")] + public string? Before { get; set; } +#nullable restore +#else + [QueryParameter("before")] + public string Before { get; set; } +#endif + /// The number of results per page (max 100). For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." + [QueryParameter("per_page")] + public int? PerPage { get; set; } + /// Optional filter for fetching attestations with a given predicate type.This option accepts `provenance`, `sbom`, or freeform text for custom predicate types. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("predicate_type")] + public string? PredicateType { get; set; } +#nullable restore +#else + [QueryParameter("predicate_type")] + public string PredicateType { get; set; } +#endif + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class Attestation_ItemRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Attestations/Item/Attestation_Response.cs b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Attestations/Item/Attestation_Response.cs new file mode 100644 index 0000000..4bbff93 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Attestations/Item/Attestation_Response.cs @@ -0,0 +1,28 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Orgs.Item.Attestations.Item +{ + [Obsolete("This class is obsolete. Use Attestation_GetResponse instead.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class Attestation_Response : global::Ayllu.Github.Client.Orgs.Item.Attestations.Item.Attestation_GetResponse, IParsable + #pragma warning restore CS1591 + { + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static new global::Ayllu.Github.Client.Orgs.Item.Attestations.Item.Attestation_Response CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Orgs.Item.Attestations.Item.Attestation_Response(); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Blocks/BlocksRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Blocks/BlocksRequestBuilder.cs new file mode 100644 index 0000000..6669c0b --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Blocks/BlocksRequestBuilder.cs @@ -0,0 +1,120 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Ayllu.Github.Client.Orgs.Item.Blocks.Item; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Orgs.Item.Blocks +{ + /// + /// Builds and executes requests for operations under \orgs\{org}\blocks + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class BlocksRequestBuilder : BaseRequestBuilder + { + /// Gets an item from the Ayllu.Github.Client.orgs.item.blocks.item collection + /// The handle for the GitHub user account. + /// A + public global::Ayllu.Github.Client.Orgs.Item.Blocks.Item.WithUsernameItemRequestBuilder this[string position] + { + get + { + var urlTplParams = new Dictionary(PathParameters); + urlTplParams.Add("username", position); + return new global::Ayllu.Github.Client.Orgs.Item.Blocks.Item.WithUsernameItemRequestBuilder(urlTplParams, RequestAdapter); + } + } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public BlocksRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/orgs/{org}/blocks{?page*,per_page*}", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public BlocksRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/orgs/{org}/blocks{?page*,per_page*}", rawUrl) + { + } + /// + /// List the users blocked by an organization. + /// API method documentation + /// + /// A List<global::Ayllu.Github.Client.Models.SimpleUser> + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task?> GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task> GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var collectionResult = await RequestAdapter.SendCollectionAsync(requestInfo, global::Ayllu.Github.Client.Models.SimpleUser.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false); + return collectionResult?.AsList(); + } + /// + /// List the users blocked by an organization. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.Orgs.Item.Blocks.BlocksRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Orgs.Item.Blocks.BlocksRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// List the users blocked by an organization. + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class BlocksRequestBuilderGetQueryParameters + { + /// The page number of the results to fetch. For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." + [QueryParameter("page")] + public int? Page { get; set; } + /// The number of results per page (max 100). For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." + [QueryParameter("per_page")] + public int? PerPage { get; set; } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class BlocksRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Blocks/Item/WithUsernameItemRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Blocks/Item/WithUsernameItemRequestBuilder.cs new file mode 100644 index 0000000..6880dee --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Blocks/Item/WithUsernameItemRequestBuilder.cs @@ -0,0 +1,191 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Orgs.Item.Blocks.Item +{ + /// + /// Builds and executes requests for operations under \orgs\{org}\blocks\{username} + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithUsernameItemRequestBuilder : BaseRequestBuilder + { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public WithUsernameItemRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/orgs/{org}/blocks/{username}", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public WithUsernameItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/orgs/{org}/blocks/{username}", rawUrl) + { + } + /// + /// Unblocks the given user on behalf of the specified organization. + /// API method documentation + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task DeleteAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task DeleteAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToDeleteRequestInformation(requestConfiguration); + await RequestAdapter.SendNoContentAsync(requestInfo, default, cancellationToken).ConfigureAwait(false); + } + /// + /// 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. + /// API method documentation + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 404 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "404", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + }; + await RequestAdapter.SendNoContentAsync(requestInfo, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// 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. + /// API method documentation + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 422 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PutAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task PutAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToPutRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "422", global::Ayllu.Github.Client.Models.ValidationError.CreateFromDiscriminatorValue }, + }; + await RequestAdapter.SendNoContentAsync(requestInfo, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// Unblocks the given user on behalf of the specified organization. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToDeleteRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToDeleteRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.DELETE, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + return requestInfo; + } + /// + /// 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. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// 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. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPutRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToPutRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.PUT, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.Orgs.Item.Blocks.Item.WithUsernameItemRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Orgs.Item.Blocks.Item.WithUsernameItemRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithUsernameItemRequestBuilderDeleteRequestConfiguration : RequestConfiguration + { + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithUsernameItemRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithUsernameItemRequestBuilderPutRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Campaigns/CampaignsPostRequestBody.cs b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Campaigns/CampaignsPostRequestBody.cs new file mode 100644 index 0000000..9955f9b --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Campaigns/CampaignsPostRequestBody.cs @@ -0,0 +1,113 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Orgs.Item.Campaigns +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class CampaignsPostRequestBody : IParsable + #pragma warning restore CS1591 + { + /// The code scanning alerts to include in this campaign +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? CodeScanningAlerts { get; set; } +#nullable restore +#else + public List CodeScanningAlerts { get; set; } +#endif + /// The contact link of the campaign. Must be a URI. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? ContactLink { get; set; } +#nullable restore +#else + public string ContactLink { get; set; } +#endif + /// A description for the campaign +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Description { get; set; } +#nullable restore +#else + public string Description { get; set; } +#endif + /// The end date and time of the campaign. The date must be in the future. + public DateTimeOffset? EndsAt { get; set; } + /// If true, will automatically generate issues for the campaign. The default is false. + public bool? GenerateIssues { get; set; } + /// The logins of the users to set as the campaign managers. At this time, only a single manager can be supplied. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? Managers { get; set; } +#nullable restore +#else + public List Managers { get; set; } +#endif + /// The name of the campaign +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Name { get; set; } +#nullable restore +#else + public string Name { get; set; } +#endif + /// The slugs of the teams to set as the campaign managers. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? TeamManagers { get; set; } +#nullable restore +#else + public List TeamManagers { get; set; } +#endif + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Orgs.Item.Campaigns.CampaignsPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Orgs.Item.Campaigns.CampaignsPostRequestBody(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "code_scanning_alerts", n => { CodeScanningAlerts = n.GetCollectionOfObjectValues(global::Ayllu.Github.Client.Orgs.Item.Campaigns.CampaignsPostRequestBody_code_scanning_alerts.CreateFromDiscriminatorValue)?.AsList(); } }, + { "contact_link", n => { ContactLink = n.GetStringValue(); } }, + { "description", n => { Description = n.GetStringValue(); } }, + { "ends_at", n => { EndsAt = n.GetDateTimeOffsetValue(); } }, + { "generate_issues", n => { GenerateIssues = n.GetBoolValue(); } }, + { "managers", n => { Managers = n.GetCollectionOfPrimitiveValues()?.AsList(); } }, + { "name", n => { Name = n.GetStringValue(); } }, + { "team_managers", n => { TeamManagers = n.GetCollectionOfPrimitiveValues()?.AsList(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteCollectionOfObjectValues("code_scanning_alerts", CodeScanningAlerts); + writer.WriteStringValue("contact_link", ContactLink); + writer.WriteStringValue("description", Description); + writer.WriteDateTimeOffsetValue("ends_at", EndsAt); + writer.WriteBoolValue("generate_issues", GenerateIssues); + writer.WriteCollectionOfPrimitiveValues("managers", Managers); + writer.WriteStringValue("name", Name); + writer.WriteCollectionOfPrimitiveValues("team_managers", TeamManagers); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Campaigns/CampaignsPostRequestBody_code_scanning_alerts.cs b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Campaigns/CampaignsPostRequestBody_code_scanning_alerts.cs new file mode 100644 index 0000000..8b002bb --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Campaigns/CampaignsPostRequestBody_code_scanning_alerts.cs @@ -0,0 +1,59 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Orgs.Item.Campaigns +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class CampaignsPostRequestBody_code_scanning_alerts : IParsable + #pragma warning restore CS1591 + { + /// The alert numbers +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? AlertNumbers { get; set; } +#nullable restore +#else + public List AlertNumbers { get; set; } +#endif + /// The repository id + public int? RepositoryId { get; set; } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Orgs.Item.Campaigns.CampaignsPostRequestBody_code_scanning_alerts CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Orgs.Item.Campaigns.CampaignsPostRequestBody_code_scanning_alerts(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "alert_numbers", n => { AlertNumbers = n.GetCollectionOfPrimitiveValues()?.AsList(); } }, + { "repository_id", n => { RepositoryId = n.GetIntValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteCollectionOfPrimitiveValues("alert_numbers", AlertNumbers); + writer.WriteIntValue("repository_id", RepositoryId); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Campaigns/CampaignsRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Campaigns/CampaignsRequestBuilder.cs new file mode 100644 index 0000000..711de55 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Campaigns/CampaignsRequestBuilder.cs @@ -0,0 +1,244 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Ayllu.Github.Client.Orgs.Item.Campaigns.Item; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Orgs.Item.Campaigns +{ + /// + /// Builds and executes requests for operations under \orgs\{org}\campaigns + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class CampaignsRequestBuilder : BaseRequestBuilder + { + /// Gets an item from the Ayllu.Github.Client.orgs.item.campaigns.item collection + /// The campaign number. + /// A + public global::Ayllu.Github.Client.Orgs.Item.Campaigns.Item.WithCampaign_numberItemRequestBuilder this[int position] + { + get + { + var urlTplParams = new Dictionary(PathParameters); + urlTplParams.Add("campaign_number", position); + return new global::Ayllu.Github.Client.Orgs.Item.Campaigns.Item.WithCampaign_numberItemRequestBuilder(urlTplParams, RequestAdapter); + } + } + /// Gets an item from the Ayllu.Github.Client.orgs.item.campaigns.item collection + /// The campaign number. + /// A + [Obsolete("This indexer is deprecated and will be removed in the next major version. Use the one with the typed parameter instead.")] + public global::Ayllu.Github.Client.Orgs.Item.Campaigns.Item.WithCampaign_numberItemRequestBuilder this[string position] + { + get + { + var urlTplParams = new Dictionary(PathParameters); + if (!string.IsNullOrWhiteSpace(position)) urlTplParams.Add("campaign_number", position); + return new global::Ayllu.Github.Client.Orgs.Item.Campaigns.Item.WithCampaign_numberItemRequestBuilder(urlTplParams, RequestAdapter); + } + } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public CampaignsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/orgs/{org}/campaigns{?direction*,page*,per_page*,sort*,state*}", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public CampaignsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/orgs/{org}/campaigns{?direction*,page*,per_page*,sort*,state*}", rawUrl) + { + } + /// + /// Lists campaigns in 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. + /// API method documentation + /// + /// A List<global::Ayllu.Github.Client.Models.CampaignSummary> + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 404 status code + /// When receiving a 503 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task?> GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task> GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "404", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "503", global::Ayllu.Github.Client.Models.Campaigns503Error.CreateFromDiscriminatorValue }, + }; + var collectionResult = await RequestAdapter.SendCollectionAsync(requestInfo, global::Ayllu.Github.Client.Models.CampaignSummary.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + return collectionResult?.AsList(); + } + /// + /// Create a campaign 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.Fine-grained tokens must have the "Code scanning alerts" repository permissions (read) on all repositories includedin the campaign. + /// API method documentation + /// + /// A + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 400 status code + /// When receiving a 404 status code + /// When receiving a 422 status code + /// When receiving a 503 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PostAsync(global::Ayllu.Github.Client.Orgs.Item.Campaigns.CampaignsPostRequestBody body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task PostAsync(global::Ayllu.Github.Client.Orgs.Item.Campaigns.CampaignsPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPostRequestInformation(body, requestConfiguration); + var errorMapping = new Dictionary> + { + { "400", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "404", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "422", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "503", global::Ayllu.Github.Client.Models.CampaignSummary503Error.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Models.CampaignSummary.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// Lists campaigns in 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. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Create a campaign 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.Fine-grained tokens must have the "Code scanning alerts" repository permissions (read) on all repositories includedin the campaign. + /// + /// A + /// The request body + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPostRequestInformation(global::Ayllu.Github.Client.Orgs.Item.Campaigns.CampaignsPostRequestBody body, Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToPostRequestInformation(global::Ayllu.Github.Client.Orgs.Item.Campaigns.CampaignsPostRequestBody body, Action> requestConfiguration = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.Orgs.Item.Campaigns.CampaignsRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Orgs.Item.Campaigns.CampaignsRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Lists campaigns in 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. + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class CampaignsRequestBuilderGetQueryParameters + { + /// The direction to sort the results by. + [Obsolete("This property is deprecated, use DirectionAsGetDirectionQueryParameterType instead")] +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("direction")] + public string? Direction { get; set; } +#nullable restore +#else + [QueryParameter("direction")] + public string Direction { get; set; } +#endif + /// The direction to sort the results by. + [QueryParameter("direction")] + public global::Ayllu.Github.Client.Orgs.Item.Campaigns.GetDirectionQueryParameterType? DirectionAsGetDirectionQueryParameterType { get; set; } + /// The page number of the results to fetch. For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." + [QueryParameter("page")] + public int? Page { get; set; } + /// The number of results per page (max 100). For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." + [QueryParameter("per_page")] + public int? PerPage { get; set; } + /// The property by which to sort the results. + [Obsolete("This property is deprecated, use SortAsGetSortQueryParameterType instead")] +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("sort")] + public string? Sort { get; set; } +#nullable restore +#else + [QueryParameter("sort")] + public string Sort { get; set; } +#endif + /// The property by which to sort the results. + [QueryParameter("sort")] + public global::Ayllu.Github.Client.Orgs.Item.Campaigns.GetSortQueryParameterType? SortAsGetSortQueryParameterType { get; set; } + /// If specified, only campaigns with this state will be returned. + [Obsolete("This property is deprecated, use StateAsCampaignState instead")] +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("state")] + public string? State { get; set; } +#nullable restore +#else + [QueryParameter("state")] + public string State { get; set; } +#endif + /// If specified, only campaigns with this state will be returned. + [QueryParameter("state")] + public global::Ayllu.Github.Client.Models.CampaignState? StateAsCampaignState { get; set; } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class CampaignsRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class CampaignsRequestBuilderPostRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Campaigns/GetDirectionQueryParameterType.cs b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Campaigns/GetDirectionQueryParameterType.cs new file mode 100644 index 0000000..faf358f --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Campaigns/GetDirectionQueryParameterType.cs @@ -0,0 +1,20 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Orgs.Item.Campaigns +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public enum GetDirectionQueryParameterType + #pragma warning restore CS1591 + { + [EnumMember(Value = "asc")] + #pragma warning disable CS1591 + Asc, + #pragma warning restore CS1591 + [EnumMember(Value = "desc")] + #pragma warning disable CS1591 + Desc, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Campaigns/GetSortQueryParameterType.cs b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Campaigns/GetSortQueryParameterType.cs new file mode 100644 index 0000000..8d8aab5 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Campaigns/GetSortQueryParameterType.cs @@ -0,0 +1,28 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Orgs.Item.Campaigns +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public enum GetSortQueryParameterType + #pragma warning restore CS1591 + { + [EnumMember(Value = "created")] + #pragma warning disable CS1591 + Created, + #pragma warning restore CS1591 + [EnumMember(Value = "updated")] + #pragma warning disable CS1591 + Updated, + #pragma warning restore CS1591 + [EnumMember(Value = "ends_at")] + #pragma warning disable CS1591 + Ends_at, + #pragma warning restore CS1591 + [EnumMember(Value = "published")] + #pragma warning disable CS1591 + Published, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Campaigns/Item/WithCampaign_numberItemRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Campaigns/Item/WithCampaign_numberItemRequestBuilder.cs new file mode 100644 index 0000000..3a9aa26 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Campaigns/Item/WithCampaign_numberItemRequestBuilder.cs @@ -0,0 +1,216 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Orgs.Item.Campaigns.Item +{ + /// + /// Builds and executes requests for operations under \orgs\{org}\campaigns\{campaign_number} + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithCampaign_numberItemRequestBuilder : BaseRequestBuilder + { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public WithCampaign_numberItemRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/orgs/{org}/campaigns/{campaign_number}", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public WithCampaign_numberItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/orgs/{org}/campaigns/{campaign_number}", rawUrl) + { + } + /// + /// Deletes a campaign in 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. + /// API method documentation + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 404 status code + /// When receiving a 503 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task DeleteAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task DeleteAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToDeleteRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "404", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "503", global::Ayllu.Github.Client.Models.WithCampaign_number503Error.CreateFromDiscriminatorValue }, + }; + await RequestAdapter.SendNoContentAsync(requestInfo, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// Gets a campaign 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. + /// API method documentation + /// + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 404 status code + /// When receiving a 422 status code + /// When receiving a 503 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "404", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "422", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "503", global::Ayllu.Github.Client.Models.CampaignSummary503Error.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Models.CampaignSummary.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// Updates a campaign in 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. + /// API method documentation + /// + /// A + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 400 status code + /// When receiving a 404 status code + /// When receiving a 422 status code + /// When receiving a 503 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PatchAsync(global::Ayllu.Github.Client.Orgs.Item.Campaigns.Item.WithCampaign_numberPatchRequestBody body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task PatchAsync(global::Ayllu.Github.Client.Orgs.Item.Campaigns.Item.WithCampaign_numberPatchRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPatchRequestInformation(body, requestConfiguration); + var errorMapping = new Dictionary> + { + { "400", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "404", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "422", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "503", global::Ayllu.Github.Client.Models.CampaignSummary503Error.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Models.CampaignSummary.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// Deletes a campaign in 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. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToDeleteRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToDeleteRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.DELETE, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Gets a campaign 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. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Updates a campaign in 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. + /// + /// A + /// The request body + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPatchRequestInformation(global::Ayllu.Github.Client.Orgs.Item.Campaigns.Item.WithCampaign_numberPatchRequestBody body, Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToPatchRequestInformation(global::Ayllu.Github.Client.Orgs.Item.Campaigns.Item.WithCampaign_numberPatchRequestBody body, Action> requestConfiguration = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.Orgs.Item.Campaigns.Item.WithCampaign_numberItemRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Orgs.Item.Campaigns.Item.WithCampaign_numberItemRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithCampaign_numberItemRequestBuilderDeleteRequestConfiguration : RequestConfiguration + { + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithCampaign_numberItemRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithCampaign_numberItemRequestBuilderPatchRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Campaigns/Item/WithCampaign_numberPatchRequestBody.cs b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Campaigns/Item/WithCampaign_numberPatchRequestBody.cs new file mode 100644 index 0000000..7725567 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Campaigns/Item/WithCampaign_numberPatchRequestBody.cs @@ -0,0 +1,104 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Orgs.Item.Campaigns.Item +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class WithCampaign_numberPatchRequestBody : IParsable + #pragma warning restore CS1591 + { + /// The contact link of the campaign. Must be a URI. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? ContactLink { get; set; } +#nullable restore +#else + public string ContactLink { get; set; } +#endif + /// A description for the campaign +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Description { get; set; } +#nullable restore +#else + public string Description { get; set; } +#endif + /// The end date and time of the campaign, in ISO 8601 format':' YYYY-MM-DDTHH:MM:SSZ. + public DateTimeOffset? EndsAt { get; set; } + /// The logins of the users to set as the campaign managers. At this time, only a single manager can be supplied. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? Managers { get; set; } +#nullable restore +#else + public List Managers { get; set; } +#endif + /// The name of the campaign +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Name { get; set; } +#nullable restore +#else + public string Name { get; set; } +#endif + /// Indicates whether a campaign is open or closed + public global::Ayllu.Github.Client.Models.CampaignState? State { get; set; } + /// The slugs of the teams to set as the campaign managers. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? TeamManagers { get; set; } +#nullable restore +#else + public List TeamManagers { get; set; } +#endif + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Orgs.Item.Campaigns.Item.WithCampaign_numberPatchRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Orgs.Item.Campaigns.Item.WithCampaign_numberPatchRequestBody(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "contact_link", n => { ContactLink = n.GetStringValue(); } }, + { "description", n => { Description = n.GetStringValue(); } }, + { "ends_at", n => { EndsAt = n.GetDateTimeOffsetValue(); } }, + { "managers", n => { Managers = n.GetCollectionOfPrimitiveValues()?.AsList(); } }, + { "name", n => { Name = n.GetStringValue(); } }, + { "state", n => { State = n.GetEnumValue(); } }, + { "team_managers", n => { TeamManagers = n.GetCollectionOfPrimitiveValues()?.AsList(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("contact_link", ContactLink); + writer.WriteStringValue("description", Description); + writer.WriteDateTimeOffsetValue("ends_at", EndsAt); + writer.WriteCollectionOfPrimitiveValues("managers", Managers); + writer.WriteStringValue("name", Name); + writer.WriteEnumValue("state", State); + writer.WriteCollectionOfPrimitiveValues("team_managers", TeamManagers); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Orgs/Item/CodeScanning/Alerts/AlertsRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/CodeScanning/Alerts/AlertsRequestBuilder.cs new file mode 100644 index 0000000..9bfafe9 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/CodeScanning/Alerts/AlertsRequestBuilder.cs @@ -0,0 +1,210 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Orgs.Item.CodeScanning.Alerts +{ + /// + /// Builds and executes requests for operations under \orgs\{org}\code-scanning\alerts + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class AlertsRequestBuilder : BaseRequestBuilder + { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public AlertsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/orgs/{org}/code-scanning/alerts{?after*,before*,direction*,page*,per_page*,severity*,sort*,state*,tool_guid*,tool_name*}", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public AlertsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/orgs/{org}/code-scanning/alerts{?after*,before*,direction*,page*,per_page*,severity*,sort*,state*,tool_guid*,tool_name*}", rawUrl) + { + } + /// + /// 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/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. + /// API method documentation + /// + /// A List<global::Ayllu.Github.Client.Models.CodeScanningOrganizationAlertItems> + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 404 status code + /// When receiving a 503 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task?> GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task> GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "404", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "503", global::Ayllu.Github.Client.Models.Alerts503Error.CreateFromDiscriminatorValue }, + }; + var collectionResult = await RequestAdapter.SendCollectionAsync(requestInfo, global::Ayllu.Github.Client.Models.CodeScanningOrganizationAlertItems.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + return collectionResult?.AsList(); + } + /// + /// 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/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. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.Orgs.Item.CodeScanning.Alerts.AlertsRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Orgs.Item.CodeScanning.Alerts.AlertsRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// 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/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. + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class AlertsRequestBuilderGetQueryParameters + { + /// A cursor, as given in the [Link header](https://docs.github.com/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/rest/using-the-rest-api/using-pagination-in-the-rest-api)." +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("after")] + public string? After { get; set; } +#nullable restore +#else + [QueryParameter("after")] + public string After { get; set; } +#endif + /// A cursor, as given in the [Link header](https://docs.github.com/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/rest/using-the-rest-api/using-pagination-in-the-rest-api)." +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("before")] + public string? Before { get; set; } +#nullable restore +#else + [QueryParameter("before")] + public string Before { get; set; } +#endif + /// The direction to sort the results by. + [Obsolete("This property is deprecated, use DirectionAsGetDirectionQueryParameterType instead")] +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("direction")] + public string? Direction { get; set; } +#nullable restore +#else + [QueryParameter("direction")] + public string Direction { get; set; } +#endif + /// The direction to sort the results by. + [QueryParameter("direction")] + public global::Ayllu.Github.Client.Orgs.Item.CodeScanning.Alerts.GetDirectionQueryParameterType? DirectionAsGetDirectionQueryParameterType { get; set; } + /// The page number of the results to fetch. For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." + [QueryParameter("page")] + public int? Page { get; set; } + /// The number of results per page (max 100). For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." + [QueryParameter("per_page")] + public int? PerPage { get; set; } + /// If specified, only code scanning alerts with this severity will be returned. + [Obsolete("This property is deprecated, use SeverityAsCodeScanningAlertSeverity instead")] +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("severity")] + public string? Severity { get; set; } +#nullable restore +#else + [QueryParameter("severity")] + public string Severity { get; set; } +#endif + /// If specified, only code scanning alerts with this severity will be returned. + [QueryParameter("severity")] + public global::Ayllu.Github.Client.Models.CodeScanningAlertSeverity? SeverityAsCodeScanningAlertSeverity { get; set; } + /// The property by which to sort the results. + [Obsolete("This property is deprecated, use SortAsGetSortQueryParameterType instead")] +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("sort")] + public string? Sort { get; set; } +#nullable restore +#else + [QueryParameter("sort")] + public string Sort { get; set; } +#endif + /// The property by which to sort the results. + [QueryParameter("sort")] + public global::Ayllu.Github.Client.Orgs.Item.CodeScanning.Alerts.GetSortQueryParameterType? SortAsGetSortQueryParameterType { get; set; } + /// If specified, only code scanning alerts with this state will be returned. + [Obsolete("This property is deprecated, use StateAsCodeScanningAlertStateQuery instead")] +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("state")] + public string? State { get; set; } +#nullable restore +#else + [QueryParameter("state")] + public string State { get; set; } +#endif + /// If specified, only code scanning alerts with this state will be returned. + [QueryParameter("state")] + public global::Ayllu.Github.Client.Models.CodeScanningAlertStateQuery? StateAsCodeScanningAlertStateQuery { get; set; } + /// 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. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("tool_guid")] + public string? ToolGuid { get; set; } +#nullable restore +#else + [QueryParameter("tool_guid")] + public string ToolGuid { get; set; } +#endif + /// 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. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("tool_name")] + public string? ToolName { get; set; } +#nullable restore +#else + [QueryParameter("tool_name")] + public string ToolName { get; set; } +#endif + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class AlertsRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Orgs/Item/CodeScanning/Alerts/GetDirectionQueryParameterType.cs b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/CodeScanning/Alerts/GetDirectionQueryParameterType.cs new file mode 100644 index 0000000..d5e4cda --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/CodeScanning/Alerts/GetDirectionQueryParameterType.cs @@ -0,0 +1,20 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Orgs.Item.CodeScanning.Alerts +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public enum GetDirectionQueryParameterType + #pragma warning restore CS1591 + { + [EnumMember(Value = "asc")] + #pragma warning disable CS1591 + Asc, + #pragma warning restore CS1591 + [EnumMember(Value = "desc")] + #pragma warning disable CS1591 + Desc, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Orgs/Item/CodeScanning/Alerts/GetSortQueryParameterType.cs b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/CodeScanning/Alerts/GetSortQueryParameterType.cs new file mode 100644 index 0000000..a73664e --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/CodeScanning/Alerts/GetSortQueryParameterType.cs @@ -0,0 +1,20 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Orgs.Item.CodeScanning.Alerts +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public enum GetSortQueryParameterType + #pragma warning restore CS1591 + { + [EnumMember(Value = "created")] + #pragma warning disable CS1591 + Created, + #pragma warning restore CS1591 + [EnumMember(Value = "updated")] + #pragma warning disable CS1591 + Updated, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Orgs/Item/CodeScanning/CodeScanningRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/CodeScanning/CodeScanningRequestBuilder.cs new file mode 100644 index 0000000..6a4431f --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/CodeScanning/CodeScanningRequestBuilder.cs @@ -0,0 +1,41 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Orgs.Item.CodeScanning.Alerts; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System; +namespace Ayllu.Github.Client.Orgs.Item.CodeScanning +{ + /// + /// Builds and executes requests for operations under \orgs\{org}\code-scanning + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class CodeScanningRequestBuilder : BaseRequestBuilder + { + /// The alerts property + public global::Ayllu.Github.Client.Orgs.Item.CodeScanning.Alerts.AlertsRequestBuilder Alerts + { + get => new global::Ayllu.Github.Client.Orgs.Item.CodeScanning.Alerts.AlertsRequestBuilder(PathParameters, RequestAdapter); + } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public CodeScanningRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/orgs/{org}/code-scanning", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public CodeScanningRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/orgs/{org}/code-scanning", rawUrl) + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Orgs/Item/CodeSecurity/CodeSecurityRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/CodeSecurity/CodeSecurityRequestBuilder.cs new file mode 100644 index 0000000..b18207c --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/CodeSecurity/CodeSecurityRequestBuilder.cs @@ -0,0 +1,41 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Orgs.Item.CodeSecurity.Configurations; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System; +namespace Ayllu.Github.Client.Orgs.Item.CodeSecurity +{ + /// + /// Builds and executes requests for operations under \orgs\{org}\code-security + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class CodeSecurityRequestBuilder : BaseRequestBuilder + { + /// The configurations property + public global::Ayllu.Github.Client.Orgs.Item.CodeSecurity.Configurations.ConfigurationsRequestBuilder Configurations + { + get => new global::Ayllu.Github.Client.Orgs.Item.CodeSecurity.Configurations.ConfigurationsRequestBuilder(PathParameters, RequestAdapter); + } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public CodeSecurityRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/orgs/{org}/code-security", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public CodeSecurityRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/orgs/{org}/code-security", rawUrl) + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Orgs/Item/CodeSecurity/Configurations/ConfigurationsPostRequestBody.cs b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/CodeSecurity/Configurations/ConfigurationsPostRequestBody.cs new file mode 100644 index 0000000..2582504 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/CodeSecurity/Configurations/ConfigurationsPostRequestBody.cs @@ -0,0 +1,199 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Orgs.Item.CodeSecurity.Configurations +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class ConfigurationsPostRequestBody : IParsable + #pragma warning restore CS1591 + { + /// The enablement status of GitHub Advanced Security features. `enabled` will enable both Code Security and Secret Protection features.> [!WARNING]> `code_security` and `secret_protection` are deprecated values for this field. Prefer the individual `code_security` and `secret_protection` fields to set the status of these features. + public global::Ayllu.Github.Client.Orgs.Item.CodeSecurity.Configurations.ConfigurationsPostRequestBody_advanced_security? AdvancedSecurity { get; set; } + /// The enablement status of code scanning default setup + public global::Ayllu.Github.Client.Orgs.Item.CodeSecurity.Configurations.ConfigurationsPostRequestBody_code_scanning_default_setup? CodeScanningDefaultSetup { get; set; } + /// Feature options for code scanning default setup +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.CodeScanningDefaultSetupOptions? CodeScanningDefaultSetupOptions { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.CodeScanningDefaultSetupOptions CodeScanningDefaultSetupOptions { get; set; } +#endif + /// The enablement status of code scanning delegated alert dismissal + public global::Ayllu.Github.Client.Orgs.Item.CodeSecurity.Configurations.ConfigurationsPostRequestBody_code_scanning_delegated_alert_dismissal? CodeScanningDelegatedAlertDismissal { get; set; } + /// Security Configuration feature options for code scanning +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.CodeScanningOptions? CodeScanningOptions { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.CodeScanningOptions CodeScanningOptions { get; set; } +#endif + /// The enablement status of GitHub Code Security features. + public global::Ayllu.Github.Client.Orgs.Item.CodeSecurity.Configurations.ConfigurationsPostRequestBody_code_security? CodeSecurity { get; set; } + /// The enablement status of Dependabot alerts + public global::Ayllu.Github.Client.Orgs.Item.CodeSecurity.Configurations.ConfigurationsPostRequestBody_dependabot_alerts? DependabotAlerts { get; set; } + /// The enablement status of Dependabot security updates + public global::Ayllu.Github.Client.Orgs.Item.CodeSecurity.Configurations.ConfigurationsPostRequestBody_dependabot_security_updates? DependabotSecurityUpdates { get; set; } + /// The enablement status of Dependency Graph + public global::Ayllu.Github.Client.Orgs.Item.CodeSecurity.Configurations.ConfigurationsPostRequestBody_dependency_graph? DependencyGraph { get; set; } + /// The enablement status of Automatic dependency submission + public global::Ayllu.Github.Client.Orgs.Item.CodeSecurity.Configurations.ConfigurationsPostRequestBody_dependency_graph_autosubmit_action? DependencyGraphAutosubmitAction { get; set; } + /// Feature options for Automatic dependency submission +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Orgs.Item.CodeSecurity.Configurations.ConfigurationsPostRequestBody_dependency_graph_autosubmit_action_options? DependencyGraphAutosubmitActionOptions { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Orgs.Item.CodeSecurity.Configurations.ConfigurationsPostRequestBody_dependency_graph_autosubmit_action_options DependencyGraphAutosubmitActionOptions { get; set; } +#endif + /// A description of the code security configuration +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Description { get; set; } +#nullable restore +#else + public string Description { get; set; } +#endif + /// The enforcement status for a security configuration + public global::Ayllu.Github.Client.Orgs.Item.CodeSecurity.Configurations.ConfigurationsPostRequestBody_enforcement? Enforcement { get; set; } + /// The name of the code security configuration. Must be unique within the organization. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Name { get; set; } +#nullable restore +#else + public string Name { get; set; } +#endif + /// The enablement status of private vulnerability reporting + public global::Ayllu.Github.Client.Orgs.Item.CodeSecurity.Configurations.ConfigurationsPostRequestBody_private_vulnerability_reporting? PrivateVulnerabilityReporting { get; set; } + /// The enablement status of GitHub Secret Protection features. + public global::Ayllu.Github.Client.Orgs.Item.CodeSecurity.Configurations.ConfigurationsPostRequestBody_secret_protection? SecretProtection { get; set; } + /// The enablement status of secret scanning + public global::Ayllu.Github.Client.Orgs.Item.CodeSecurity.Configurations.ConfigurationsPostRequestBody_secret_scanning? SecretScanning { get; set; } + /// The enablement status of secret scanning delegated alert dismissal + public global::Ayllu.Github.Client.Orgs.Item.CodeSecurity.Configurations.ConfigurationsPostRequestBody_secret_scanning_delegated_alert_dismissal? SecretScanningDelegatedAlertDismissal { get; set; } + /// The enablement status of secret scanning delegated bypass + public global::Ayllu.Github.Client.Orgs.Item.CodeSecurity.Configurations.ConfigurationsPostRequestBody_secret_scanning_delegated_bypass? SecretScanningDelegatedBypass { get; set; } + /// Feature options for secret scanning delegated bypass +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Orgs.Item.CodeSecurity.Configurations.ConfigurationsPostRequestBody_secret_scanning_delegated_bypass_options? SecretScanningDelegatedBypassOptions { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Orgs.Item.CodeSecurity.Configurations.ConfigurationsPostRequestBody_secret_scanning_delegated_bypass_options SecretScanningDelegatedBypassOptions { get; set; } +#endif + /// The enablement status of Copilot secret scanning + public global::Ayllu.Github.Client.Orgs.Item.CodeSecurity.Configurations.ConfigurationsPostRequestBody_secret_scanning_generic_secrets? SecretScanningGenericSecrets { get; set; } + /// The enablement status of secret scanning non provider patterns + public global::Ayllu.Github.Client.Orgs.Item.CodeSecurity.Configurations.ConfigurationsPostRequestBody_secret_scanning_non_provider_patterns? SecretScanningNonProviderPatterns { get; set; } + /// The enablement status of secret scanning push protection + public global::Ayllu.Github.Client.Orgs.Item.CodeSecurity.Configurations.ConfigurationsPostRequestBody_secret_scanning_push_protection? SecretScanningPushProtection { get; set; } + /// The enablement status of secret scanning validity checks + public global::Ayllu.Github.Client.Orgs.Item.CodeSecurity.Configurations.ConfigurationsPostRequestBody_secret_scanning_validity_checks? SecretScanningValidityChecks { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public ConfigurationsPostRequestBody() + { + AdvancedSecurity = global::Ayllu.Github.Client.Orgs.Item.CodeSecurity.Configurations.ConfigurationsPostRequestBody_advanced_security.Disabled; + CodeScanningDefaultSetup = global::Ayllu.Github.Client.Orgs.Item.CodeSecurity.Configurations.ConfigurationsPostRequestBody_code_scanning_default_setup.Disabled; + CodeScanningDelegatedAlertDismissal = global::Ayllu.Github.Client.Orgs.Item.CodeSecurity.Configurations.ConfigurationsPostRequestBody_code_scanning_delegated_alert_dismissal.Not_set; + DependabotAlerts = global::Ayllu.Github.Client.Orgs.Item.CodeSecurity.Configurations.ConfigurationsPostRequestBody_dependabot_alerts.Disabled; + DependabotSecurityUpdates = global::Ayllu.Github.Client.Orgs.Item.CodeSecurity.Configurations.ConfigurationsPostRequestBody_dependabot_security_updates.Disabled; + DependencyGraph = global::Ayllu.Github.Client.Orgs.Item.CodeSecurity.Configurations.ConfigurationsPostRequestBody_dependency_graph.Enabled; + DependencyGraphAutosubmitAction = global::Ayllu.Github.Client.Orgs.Item.CodeSecurity.Configurations.ConfigurationsPostRequestBody_dependency_graph_autosubmit_action.Disabled; + Enforcement = global::Ayllu.Github.Client.Orgs.Item.CodeSecurity.Configurations.ConfigurationsPostRequestBody_enforcement.Enforced; + PrivateVulnerabilityReporting = global::Ayllu.Github.Client.Orgs.Item.CodeSecurity.Configurations.ConfigurationsPostRequestBody_private_vulnerability_reporting.Disabled; + SecretScanning = global::Ayllu.Github.Client.Orgs.Item.CodeSecurity.Configurations.ConfigurationsPostRequestBody_secret_scanning.Disabled; + SecretScanningDelegatedBypass = global::Ayllu.Github.Client.Orgs.Item.CodeSecurity.Configurations.ConfigurationsPostRequestBody_secret_scanning_delegated_bypass.Disabled; + SecretScanningGenericSecrets = global::Ayllu.Github.Client.Orgs.Item.CodeSecurity.Configurations.ConfigurationsPostRequestBody_secret_scanning_generic_secrets.Disabled; + SecretScanningNonProviderPatterns = global::Ayllu.Github.Client.Orgs.Item.CodeSecurity.Configurations.ConfigurationsPostRequestBody_secret_scanning_non_provider_patterns.Disabled; + SecretScanningPushProtection = global::Ayllu.Github.Client.Orgs.Item.CodeSecurity.Configurations.ConfigurationsPostRequestBody_secret_scanning_push_protection.Disabled; + SecretScanningValidityChecks = global::Ayllu.Github.Client.Orgs.Item.CodeSecurity.Configurations.ConfigurationsPostRequestBody_secret_scanning_validity_checks.Disabled; + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Orgs.Item.CodeSecurity.Configurations.ConfigurationsPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Orgs.Item.CodeSecurity.Configurations.ConfigurationsPostRequestBody(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "advanced_security", n => { AdvancedSecurity = n.GetEnumValue(); } }, + { "code_scanning_default_setup", n => { CodeScanningDefaultSetup = n.GetEnumValue(); } }, + { "code_scanning_default_setup_options", n => { CodeScanningDefaultSetupOptions = n.GetObjectValue(global::Ayllu.Github.Client.Models.CodeScanningDefaultSetupOptions.CreateFromDiscriminatorValue); } }, + { "code_scanning_delegated_alert_dismissal", n => { CodeScanningDelegatedAlertDismissal = n.GetEnumValue(); } }, + { "code_scanning_options", n => { CodeScanningOptions = n.GetObjectValue(global::Ayllu.Github.Client.Models.CodeScanningOptions.CreateFromDiscriminatorValue); } }, + { "code_security", n => { CodeSecurity = n.GetEnumValue(); } }, + { "dependabot_alerts", n => { DependabotAlerts = n.GetEnumValue(); } }, + { "dependabot_security_updates", n => { DependabotSecurityUpdates = n.GetEnumValue(); } }, + { "dependency_graph", n => { DependencyGraph = n.GetEnumValue(); } }, + { "dependency_graph_autosubmit_action", n => { DependencyGraphAutosubmitAction = n.GetEnumValue(); } }, + { "dependency_graph_autosubmit_action_options", n => { DependencyGraphAutosubmitActionOptions = n.GetObjectValue(global::Ayllu.Github.Client.Orgs.Item.CodeSecurity.Configurations.ConfigurationsPostRequestBody_dependency_graph_autosubmit_action_options.CreateFromDiscriminatorValue); } }, + { "description", n => { Description = n.GetStringValue(); } }, + { "enforcement", n => { Enforcement = n.GetEnumValue(); } }, + { "name", n => { Name = n.GetStringValue(); } }, + { "private_vulnerability_reporting", n => { PrivateVulnerabilityReporting = n.GetEnumValue(); } }, + { "secret_protection", n => { SecretProtection = n.GetEnumValue(); } }, + { "secret_scanning", n => { SecretScanning = n.GetEnumValue(); } }, + { "secret_scanning_delegated_alert_dismissal", n => { SecretScanningDelegatedAlertDismissal = n.GetEnumValue(); } }, + { "secret_scanning_delegated_bypass", n => { SecretScanningDelegatedBypass = n.GetEnumValue(); } }, + { "secret_scanning_delegated_bypass_options", n => { SecretScanningDelegatedBypassOptions = n.GetObjectValue(global::Ayllu.Github.Client.Orgs.Item.CodeSecurity.Configurations.ConfigurationsPostRequestBody_secret_scanning_delegated_bypass_options.CreateFromDiscriminatorValue); } }, + { "secret_scanning_generic_secrets", n => { SecretScanningGenericSecrets = n.GetEnumValue(); } }, + { "secret_scanning_non_provider_patterns", n => { SecretScanningNonProviderPatterns = n.GetEnumValue(); } }, + { "secret_scanning_push_protection", n => { SecretScanningPushProtection = n.GetEnumValue(); } }, + { "secret_scanning_validity_checks", n => { SecretScanningValidityChecks = n.GetEnumValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteEnumValue("advanced_security", AdvancedSecurity); + writer.WriteEnumValue("code_scanning_default_setup", CodeScanningDefaultSetup); + writer.WriteObjectValue("code_scanning_default_setup_options", CodeScanningDefaultSetupOptions); + writer.WriteEnumValue("code_scanning_delegated_alert_dismissal", CodeScanningDelegatedAlertDismissal); + writer.WriteObjectValue("code_scanning_options", CodeScanningOptions); + writer.WriteEnumValue("code_security", CodeSecurity); + writer.WriteEnumValue("dependabot_alerts", DependabotAlerts); + writer.WriteEnumValue("dependabot_security_updates", DependabotSecurityUpdates); + writer.WriteEnumValue("dependency_graph", DependencyGraph); + writer.WriteEnumValue("dependency_graph_autosubmit_action", DependencyGraphAutosubmitAction); + writer.WriteObjectValue("dependency_graph_autosubmit_action_options", DependencyGraphAutosubmitActionOptions); + writer.WriteStringValue("description", Description); + writer.WriteEnumValue("enforcement", Enforcement); + writer.WriteStringValue("name", Name); + writer.WriteEnumValue("private_vulnerability_reporting", PrivateVulnerabilityReporting); + writer.WriteEnumValue("secret_protection", SecretProtection); + writer.WriteEnumValue("secret_scanning", SecretScanning); + writer.WriteEnumValue("secret_scanning_delegated_alert_dismissal", SecretScanningDelegatedAlertDismissal); + writer.WriteEnumValue("secret_scanning_delegated_bypass", SecretScanningDelegatedBypass); + writer.WriteObjectValue("secret_scanning_delegated_bypass_options", SecretScanningDelegatedBypassOptions); + writer.WriteEnumValue("secret_scanning_generic_secrets", SecretScanningGenericSecrets); + writer.WriteEnumValue("secret_scanning_non_provider_patterns", SecretScanningNonProviderPatterns); + writer.WriteEnumValue("secret_scanning_push_protection", SecretScanningPushProtection); + writer.WriteEnumValue("secret_scanning_validity_checks", SecretScanningValidityChecks); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Orgs/Item/CodeSecurity/Configurations/ConfigurationsPostRequestBody_advanced_security.cs b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/CodeSecurity/Configurations/ConfigurationsPostRequestBody_advanced_security.cs new file mode 100644 index 0000000..f0dc91a --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/CodeSecurity/Configurations/ConfigurationsPostRequestBody_advanced_security.cs @@ -0,0 +1,27 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Orgs.Item.CodeSecurity.Configurations +{ + /// The enablement status of GitHub Advanced Security features. `enabled` will enable both Code Security and Secret Protection features.> [!WARNING]> `code_security` and `secret_protection` are deprecated values for this field. Prefer the individual `code_security` and `secret_protection` fields to set the status of these features. + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public enum ConfigurationsPostRequestBody_advanced_security + { + [EnumMember(Value = "enabled")] + #pragma warning disable CS1591 + Enabled, + #pragma warning restore CS1591 + [EnumMember(Value = "disabled")] + #pragma warning disable CS1591 + Disabled, + #pragma warning restore CS1591 + [EnumMember(Value = "code_security")] + #pragma warning disable CS1591 + Code_security, + #pragma warning restore CS1591 + [EnumMember(Value = "secret_protection")] + #pragma warning disable CS1591 + Secret_protection, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Orgs/Item/CodeSecurity/Configurations/ConfigurationsPostRequestBody_code_scanning_default_setup.cs b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/CodeSecurity/Configurations/ConfigurationsPostRequestBody_code_scanning_default_setup.cs new file mode 100644 index 0000000..3ccae93 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/CodeSecurity/Configurations/ConfigurationsPostRequestBody_code_scanning_default_setup.cs @@ -0,0 +1,23 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Orgs.Item.CodeSecurity.Configurations +{ + /// The enablement status of code scanning default setup + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public enum ConfigurationsPostRequestBody_code_scanning_default_setup + { + [EnumMember(Value = "enabled")] + #pragma warning disable CS1591 + Enabled, + #pragma warning restore CS1591 + [EnumMember(Value = "disabled")] + #pragma warning disable CS1591 + Disabled, + #pragma warning restore CS1591 + [EnumMember(Value = "not_set")] + #pragma warning disable CS1591 + Not_set, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Orgs/Item/CodeSecurity/Configurations/ConfigurationsPostRequestBody_code_scanning_delegated_alert_dismissal.cs b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/CodeSecurity/Configurations/ConfigurationsPostRequestBody_code_scanning_delegated_alert_dismissal.cs new file mode 100644 index 0000000..d5327a2 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/CodeSecurity/Configurations/ConfigurationsPostRequestBody_code_scanning_delegated_alert_dismissal.cs @@ -0,0 +1,23 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Orgs.Item.CodeSecurity.Configurations +{ + /// The enablement status of code scanning delegated alert dismissal + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public enum ConfigurationsPostRequestBody_code_scanning_delegated_alert_dismissal + { + [EnumMember(Value = "enabled")] + #pragma warning disable CS1591 + Enabled, + #pragma warning restore CS1591 + [EnumMember(Value = "disabled")] + #pragma warning disable CS1591 + Disabled, + #pragma warning restore CS1591 + [EnumMember(Value = "not_set")] + #pragma warning disable CS1591 + Not_set, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Orgs/Item/CodeSecurity/Configurations/ConfigurationsPostRequestBody_code_security.cs b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/CodeSecurity/Configurations/ConfigurationsPostRequestBody_code_security.cs new file mode 100644 index 0000000..e232c88 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/CodeSecurity/Configurations/ConfigurationsPostRequestBody_code_security.cs @@ -0,0 +1,23 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Orgs.Item.CodeSecurity.Configurations +{ + /// The enablement status of GitHub Code Security features. + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public enum ConfigurationsPostRequestBody_code_security + { + [EnumMember(Value = "enabled")] + #pragma warning disable CS1591 + Enabled, + #pragma warning restore CS1591 + [EnumMember(Value = "disabled")] + #pragma warning disable CS1591 + Disabled, + #pragma warning restore CS1591 + [EnumMember(Value = "not_set")] + #pragma warning disable CS1591 + Not_set, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Orgs/Item/CodeSecurity/Configurations/ConfigurationsPostRequestBody_dependabot_alerts.cs b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/CodeSecurity/Configurations/ConfigurationsPostRequestBody_dependabot_alerts.cs new file mode 100644 index 0000000..b55c459 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/CodeSecurity/Configurations/ConfigurationsPostRequestBody_dependabot_alerts.cs @@ -0,0 +1,23 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Orgs.Item.CodeSecurity.Configurations +{ + /// The enablement status of Dependabot alerts + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public enum ConfigurationsPostRequestBody_dependabot_alerts + { + [EnumMember(Value = "enabled")] + #pragma warning disable CS1591 + Enabled, + #pragma warning restore CS1591 + [EnumMember(Value = "disabled")] + #pragma warning disable CS1591 + Disabled, + #pragma warning restore CS1591 + [EnumMember(Value = "not_set")] + #pragma warning disable CS1591 + Not_set, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Orgs/Item/CodeSecurity/Configurations/ConfigurationsPostRequestBody_dependabot_security_updates.cs b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/CodeSecurity/Configurations/ConfigurationsPostRequestBody_dependabot_security_updates.cs new file mode 100644 index 0000000..c1e3568 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/CodeSecurity/Configurations/ConfigurationsPostRequestBody_dependabot_security_updates.cs @@ -0,0 +1,23 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Orgs.Item.CodeSecurity.Configurations +{ + /// The enablement status of Dependabot security updates + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public enum ConfigurationsPostRequestBody_dependabot_security_updates + { + [EnumMember(Value = "enabled")] + #pragma warning disable CS1591 + Enabled, + #pragma warning restore CS1591 + [EnumMember(Value = "disabled")] + #pragma warning disable CS1591 + Disabled, + #pragma warning restore CS1591 + [EnumMember(Value = "not_set")] + #pragma warning disable CS1591 + Not_set, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Orgs/Item/CodeSecurity/Configurations/ConfigurationsPostRequestBody_dependency_graph.cs b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/CodeSecurity/Configurations/ConfigurationsPostRequestBody_dependency_graph.cs new file mode 100644 index 0000000..cd1d030 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/CodeSecurity/Configurations/ConfigurationsPostRequestBody_dependency_graph.cs @@ -0,0 +1,23 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Orgs.Item.CodeSecurity.Configurations +{ + /// The enablement status of Dependency Graph + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public enum ConfigurationsPostRequestBody_dependency_graph + { + [EnumMember(Value = "enabled")] + #pragma warning disable CS1591 + Enabled, + #pragma warning restore CS1591 + [EnumMember(Value = "disabled")] + #pragma warning disable CS1591 + Disabled, + #pragma warning restore CS1591 + [EnumMember(Value = "not_set")] + #pragma warning disable CS1591 + Not_set, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Orgs/Item/CodeSecurity/Configurations/ConfigurationsPostRequestBody_dependency_graph_autosubmit_action.cs b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/CodeSecurity/Configurations/ConfigurationsPostRequestBody_dependency_graph_autosubmit_action.cs new file mode 100644 index 0000000..3a41899 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/CodeSecurity/Configurations/ConfigurationsPostRequestBody_dependency_graph_autosubmit_action.cs @@ -0,0 +1,23 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Orgs.Item.CodeSecurity.Configurations +{ + /// The enablement status of Automatic dependency submission + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public enum ConfigurationsPostRequestBody_dependency_graph_autosubmit_action + { + [EnumMember(Value = "enabled")] + #pragma warning disable CS1591 + Enabled, + #pragma warning restore CS1591 + [EnumMember(Value = "disabled")] + #pragma warning disable CS1591 + Disabled, + #pragma warning restore CS1591 + [EnumMember(Value = "not_set")] + #pragma warning disable CS1591 + Not_set, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Orgs/Item/CodeSecurity/Configurations/ConfigurationsPostRequestBody_dependency_graph_autosubmit_action_options.cs b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/CodeSecurity/Configurations/ConfigurationsPostRequestBody_dependency_graph_autosubmit_action_options.cs new file mode 100644 index 0000000..7b29cd8 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/CodeSecurity/Configurations/ConfigurationsPostRequestBody_dependency_graph_autosubmit_action_options.cs @@ -0,0 +1,60 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Orgs.Item.CodeSecurity.Configurations +{ + /// + /// Feature options for Automatic dependency submission + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class ConfigurationsPostRequestBody_dependency_graph_autosubmit_action_options : IAdditionalDataHolder, IParsable + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// Whether to use runners labeled with 'dependency-submission' or standard GitHub runners. + public bool? LabeledRunners { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public ConfigurationsPostRequestBody_dependency_graph_autosubmit_action_options() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Orgs.Item.CodeSecurity.Configurations.ConfigurationsPostRequestBody_dependency_graph_autosubmit_action_options CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Orgs.Item.CodeSecurity.Configurations.ConfigurationsPostRequestBody_dependency_graph_autosubmit_action_options(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "labeled_runners", n => { LabeledRunners = n.GetBoolValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteBoolValue("labeled_runners", LabeledRunners); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Orgs/Item/CodeSecurity/Configurations/ConfigurationsPostRequestBody_enforcement.cs b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/CodeSecurity/Configurations/ConfigurationsPostRequestBody_enforcement.cs new file mode 100644 index 0000000..5b17b52 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/CodeSecurity/Configurations/ConfigurationsPostRequestBody_enforcement.cs @@ -0,0 +1,19 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Orgs.Item.CodeSecurity.Configurations +{ + /// The enforcement status for a security configuration + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public enum ConfigurationsPostRequestBody_enforcement + { + [EnumMember(Value = "enforced")] + #pragma warning disable CS1591 + Enforced, + #pragma warning restore CS1591 + [EnumMember(Value = "unenforced")] + #pragma warning disable CS1591 + Unenforced, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Orgs/Item/CodeSecurity/Configurations/ConfigurationsPostRequestBody_private_vulnerability_reporting.cs b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/CodeSecurity/Configurations/ConfigurationsPostRequestBody_private_vulnerability_reporting.cs new file mode 100644 index 0000000..c6bbf7c --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/CodeSecurity/Configurations/ConfigurationsPostRequestBody_private_vulnerability_reporting.cs @@ -0,0 +1,23 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Orgs.Item.CodeSecurity.Configurations +{ + /// The enablement status of private vulnerability reporting + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public enum ConfigurationsPostRequestBody_private_vulnerability_reporting + { + [EnumMember(Value = "enabled")] + #pragma warning disable CS1591 + Enabled, + #pragma warning restore CS1591 + [EnumMember(Value = "disabled")] + #pragma warning disable CS1591 + Disabled, + #pragma warning restore CS1591 + [EnumMember(Value = "not_set")] + #pragma warning disable CS1591 + Not_set, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Orgs/Item/CodeSecurity/Configurations/ConfigurationsPostRequestBody_secret_protection.cs b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/CodeSecurity/Configurations/ConfigurationsPostRequestBody_secret_protection.cs new file mode 100644 index 0000000..be3a5e8 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/CodeSecurity/Configurations/ConfigurationsPostRequestBody_secret_protection.cs @@ -0,0 +1,23 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Orgs.Item.CodeSecurity.Configurations +{ + /// The enablement status of GitHub Secret Protection features. + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public enum ConfigurationsPostRequestBody_secret_protection + { + [EnumMember(Value = "enabled")] + #pragma warning disable CS1591 + Enabled, + #pragma warning restore CS1591 + [EnumMember(Value = "disabled")] + #pragma warning disable CS1591 + Disabled, + #pragma warning restore CS1591 + [EnumMember(Value = "not_set")] + #pragma warning disable CS1591 + Not_set, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Orgs/Item/CodeSecurity/Configurations/ConfigurationsPostRequestBody_secret_scanning.cs b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/CodeSecurity/Configurations/ConfigurationsPostRequestBody_secret_scanning.cs new file mode 100644 index 0000000..79d0141 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/CodeSecurity/Configurations/ConfigurationsPostRequestBody_secret_scanning.cs @@ -0,0 +1,23 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Orgs.Item.CodeSecurity.Configurations +{ + /// The enablement status of secret scanning + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public enum ConfigurationsPostRequestBody_secret_scanning + { + [EnumMember(Value = "enabled")] + #pragma warning disable CS1591 + Enabled, + #pragma warning restore CS1591 + [EnumMember(Value = "disabled")] + #pragma warning disable CS1591 + Disabled, + #pragma warning restore CS1591 + [EnumMember(Value = "not_set")] + #pragma warning disable CS1591 + Not_set, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Orgs/Item/CodeSecurity/Configurations/ConfigurationsPostRequestBody_secret_scanning_delegated_alert_dismissal.cs b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/CodeSecurity/Configurations/ConfigurationsPostRequestBody_secret_scanning_delegated_alert_dismissal.cs new file mode 100644 index 0000000..87369fe --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/CodeSecurity/Configurations/ConfigurationsPostRequestBody_secret_scanning_delegated_alert_dismissal.cs @@ -0,0 +1,23 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Orgs.Item.CodeSecurity.Configurations +{ + /// The enablement status of secret scanning delegated alert dismissal + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public enum ConfigurationsPostRequestBody_secret_scanning_delegated_alert_dismissal + { + [EnumMember(Value = "enabled")] + #pragma warning disable CS1591 + Enabled, + #pragma warning restore CS1591 + [EnumMember(Value = "disabled")] + #pragma warning disable CS1591 + Disabled, + #pragma warning restore CS1591 + [EnumMember(Value = "not_set")] + #pragma warning disable CS1591 + Not_set, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Orgs/Item/CodeSecurity/Configurations/ConfigurationsPostRequestBody_secret_scanning_delegated_bypass.cs b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/CodeSecurity/Configurations/ConfigurationsPostRequestBody_secret_scanning_delegated_bypass.cs new file mode 100644 index 0000000..1119fd5 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/CodeSecurity/Configurations/ConfigurationsPostRequestBody_secret_scanning_delegated_bypass.cs @@ -0,0 +1,23 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Orgs.Item.CodeSecurity.Configurations +{ + /// The enablement status of secret scanning delegated bypass + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public enum ConfigurationsPostRequestBody_secret_scanning_delegated_bypass + { + [EnumMember(Value = "enabled")] + #pragma warning disable CS1591 + Enabled, + #pragma warning restore CS1591 + [EnumMember(Value = "disabled")] + #pragma warning disable CS1591 + Disabled, + #pragma warning restore CS1591 + [EnumMember(Value = "not_set")] + #pragma warning disable CS1591 + Not_set, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Orgs/Item/CodeSecurity/Configurations/ConfigurationsPostRequestBody_secret_scanning_delegated_bypass_options.cs b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/CodeSecurity/Configurations/ConfigurationsPostRequestBody_secret_scanning_delegated_bypass_options.cs new file mode 100644 index 0000000..c256553 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/CodeSecurity/Configurations/ConfigurationsPostRequestBody_secret_scanning_delegated_bypass_options.cs @@ -0,0 +1,66 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Orgs.Item.CodeSecurity.Configurations +{ + /// + /// Feature options for secret scanning delegated bypass + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class ConfigurationsPostRequestBody_secret_scanning_delegated_bypass_options : IAdditionalDataHolder, IParsable + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The bypass reviewers for secret scanning delegated bypass +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? Reviewers { get; set; } +#nullable restore +#else + public List Reviewers { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public ConfigurationsPostRequestBody_secret_scanning_delegated_bypass_options() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Orgs.Item.CodeSecurity.Configurations.ConfigurationsPostRequestBody_secret_scanning_delegated_bypass_options CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Orgs.Item.CodeSecurity.Configurations.ConfigurationsPostRequestBody_secret_scanning_delegated_bypass_options(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "reviewers", n => { Reviewers = n.GetCollectionOfObjectValues(global::Ayllu.Github.Client.Orgs.Item.CodeSecurity.Configurations.ConfigurationsPostRequestBody_secret_scanning_delegated_bypass_options_reviewers.CreateFromDiscriminatorValue)?.AsList(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteCollectionOfObjectValues("reviewers", Reviewers); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Orgs/Item/CodeSecurity/Configurations/ConfigurationsPostRequestBody_secret_scanning_delegated_bypass_options_reviewers.cs b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/CodeSecurity/Configurations/ConfigurationsPostRequestBody_secret_scanning_delegated_bypass_options_reviewers.cs new file mode 100644 index 0000000..4de17e1 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/CodeSecurity/Configurations/ConfigurationsPostRequestBody_secret_scanning_delegated_bypass_options_reviewers.cs @@ -0,0 +1,63 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Orgs.Item.CodeSecurity.Configurations +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class ConfigurationsPostRequestBody_secret_scanning_delegated_bypass_options_reviewers : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The ID of the team or role selected as a bypass reviewer + public int? ReviewerId { get; set; } + /// The type of the bypass reviewer + public global::Ayllu.Github.Client.Orgs.Item.CodeSecurity.Configurations.ConfigurationsPostRequestBody_secret_scanning_delegated_bypass_options_reviewers_reviewer_type? ReviewerType { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public ConfigurationsPostRequestBody_secret_scanning_delegated_bypass_options_reviewers() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Orgs.Item.CodeSecurity.Configurations.ConfigurationsPostRequestBody_secret_scanning_delegated_bypass_options_reviewers CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Orgs.Item.CodeSecurity.Configurations.ConfigurationsPostRequestBody_secret_scanning_delegated_bypass_options_reviewers(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "reviewer_id", n => { ReviewerId = n.GetIntValue(); } }, + { "reviewer_type", n => { ReviewerType = n.GetEnumValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteIntValue("reviewer_id", ReviewerId); + writer.WriteEnumValue("reviewer_type", ReviewerType); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Orgs/Item/CodeSecurity/Configurations/ConfigurationsPostRequestBody_secret_scanning_delegated_bypass_options_reviewers_reviewer_type.cs b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/CodeSecurity/Configurations/ConfigurationsPostRequestBody_secret_scanning_delegated_bypass_options_reviewers_reviewer_type.cs new file mode 100644 index 0000000..929685c --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/CodeSecurity/Configurations/ConfigurationsPostRequestBody_secret_scanning_delegated_bypass_options_reviewers_reviewer_type.cs @@ -0,0 +1,19 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Orgs.Item.CodeSecurity.Configurations +{ + /// The type of the bypass reviewer + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public enum ConfigurationsPostRequestBody_secret_scanning_delegated_bypass_options_reviewers_reviewer_type + { + [EnumMember(Value = "TEAM")] + #pragma warning disable CS1591 + TEAM, + #pragma warning restore CS1591 + [EnumMember(Value = "ROLE")] + #pragma warning disable CS1591 + ROLE, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Orgs/Item/CodeSecurity/Configurations/ConfigurationsPostRequestBody_secret_scanning_generic_secrets.cs b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/CodeSecurity/Configurations/ConfigurationsPostRequestBody_secret_scanning_generic_secrets.cs new file mode 100644 index 0000000..12881ff --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/CodeSecurity/Configurations/ConfigurationsPostRequestBody_secret_scanning_generic_secrets.cs @@ -0,0 +1,23 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Orgs.Item.CodeSecurity.Configurations +{ + /// The enablement status of Copilot secret scanning + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public enum ConfigurationsPostRequestBody_secret_scanning_generic_secrets + { + [EnumMember(Value = "enabled")] + #pragma warning disable CS1591 + Enabled, + #pragma warning restore CS1591 + [EnumMember(Value = "disabled")] + #pragma warning disable CS1591 + Disabled, + #pragma warning restore CS1591 + [EnumMember(Value = "not_set")] + #pragma warning disable CS1591 + Not_set, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Orgs/Item/CodeSecurity/Configurations/ConfigurationsPostRequestBody_secret_scanning_non_provider_patterns.cs b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/CodeSecurity/Configurations/ConfigurationsPostRequestBody_secret_scanning_non_provider_patterns.cs new file mode 100644 index 0000000..47077c4 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/CodeSecurity/Configurations/ConfigurationsPostRequestBody_secret_scanning_non_provider_patterns.cs @@ -0,0 +1,23 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Orgs.Item.CodeSecurity.Configurations +{ + /// The enablement status of secret scanning non provider patterns + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public enum ConfigurationsPostRequestBody_secret_scanning_non_provider_patterns + { + [EnumMember(Value = "enabled")] + #pragma warning disable CS1591 + Enabled, + #pragma warning restore CS1591 + [EnumMember(Value = "disabled")] + #pragma warning disable CS1591 + Disabled, + #pragma warning restore CS1591 + [EnumMember(Value = "not_set")] + #pragma warning disable CS1591 + Not_set, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Orgs/Item/CodeSecurity/Configurations/ConfigurationsPostRequestBody_secret_scanning_push_protection.cs b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/CodeSecurity/Configurations/ConfigurationsPostRequestBody_secret_scanning_push_protection.cs new file mode 100644 index 0000000..fa78c4e --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/CodeSecurity/Configurations/ConfigurationsPostRequestBody_secret_scanning_push_protection.cs @@ -0,0 +1,23 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Orgs.Item.CodeSecurity.Configurations +{ + /// The enablement status of secret scanning push protection + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public enum ConfigurationsPostRequestBody_secret_scanning_push_protection + { + [EnumMember(Value = "enabled")] + #pragma warning disable CS1591 + Enabled, + #pragma warning restore CS1591 + [EnumMember(Value = "disabled")] + #pragma warning disable CS1591 + Disabled, + #pragma warning restore CS1591 + [EnumMember(Value = "not_set")] + #pragma warning disable CS1591 + Not_set, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Orgs/Item/CodeSecurity/Configurations/ConfigurationsPostRequestBody_secret_scanning_validity_checks.cs b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/CodeSecurity/Configurations/ConfigurationsPostRequestBody_secret_scanning_validity_checks.cs new file mode 100644 index 0000000..d62161d --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/CodeSecurity/Configurations/ConfigurationsPostRequestBody_secret_scanning_validity_checks.cs @@ -0,0 +1,23 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Orgs.Item.CodeSecurity.Configurations +{ + /// The enablement status of secret scanning validity checks + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public enum ConfigurationsPostRequestBody_secret_scanning_validity_checks + { + [EnumMember(Value = "enabled")] + #pragma warning disable CS1591 + Enabled, + #pragma warning restore CS1591 + [EnumMember(Value = "disabled")] + #pragma warning disable CS1591 + Disabled, + #pragma warning restore CS1591 + [EnumMember(Value = "not_set")] + #pragma warning disable CS1591 + Not_set, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Orgs/Item/CodeSecurity/Configurations/ConfigurationsRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/CodeSecurity/Configurations/ConfigurationsRequestBuilder.cs new file mode 100644 index 0000000..f3df590 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/CodeSecurity/Configurations/ConfigurationsRequestBuilder.cs @@ -0,0 +1,234 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Ayllu.Github.Client.Orgs.Item.CodeSecurity.Configurations.Defaults; +using Ayllu.Github.Client.Orgs.Item.CodeSecurity.Configurations.Detach; +using Ayllu.Github.Client.Orgs.Item.CodeSecurity.Configurations.Item; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Orgs.Item.CodeSecurity.Configurations +{ + /// + /// Builds and executes requests for operations under \orgs\{org}\code-security\configurations + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class ConfigurationsRequestBuilder : BaseRequestBuilder + { + /// The defaults property + public global::Ayllu.Github.Client.Orgs.Item.CodeSecurity.Configurations.Defaults.DefaultsRequestBuilder Defaults + { + get => new global::Ayllu.Github.Client.Orgs.Item.CodeSecurity.Configurations.Defaults.DefaultsRequestBuilder(PathParameters, RequestAdapter); + } + /// The detach property + public global::Ayllu.Github.Client.Orgs.Item.CodeSecurity.Configurations.Detach.DetachRequestBuilder Detach + { + get => new global::Ayllu.Github.Client.Orgs.Item.CodeSecurity.Configurations.Detach.DetachRequestBuilder(PathParameters, RequestAdapter); + } + /// Gets an item from the Ayllu.Github.Client.orgs.item.codeSecurity.configurations.item collection + /// The unique identifier of the code security configuration. + /// A + public global::Ayllu.Github.Client.Orgs.Item.CodeSecurity.Configurations.Item.WithConfiguration_ItemRequestBuilder this[int position] + { + get + { + var urlTplParams = new Dictionary(PathParameters); + urlTplParams.Add("configuration_id", position); + return new global::Ayllu.Github.Client.Orgs.Item.CodeSecurity.Configurations.Item.WithConfiguration_ItemRequestBuilder(urlTplParams, RequestAdapter); + } + } + /// Gets an item from the Ayllu.Github.Client.orgs.item.codeSecurity.configurations.item collection + /// The unique identifier of the code security configuration. + /// A + [Obsolete("This indexer is deprecated and will be removed in the next major version. Use the one with the typed parameter instead.")] + public global::Ayllu.Github.Client.Orgs.Item.CodeSecurity.Configurations.Item.WithConfiguration_ItemRequestBuilder this[string position] + { + get + { + var urlTplParams = new Dictionary(PathParameters); + if (!string.IsNullOrWhiteSpace(position)) urlTplParams.Add("configuration_id", position); + return new global::Ayllu.Github.Client.Orgs.Item.CodeSecurity.Configurations.Item.WithConfiguration_ItemRequestBuilder(urlTplParams, RequestAdapter); + } + } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public ConfigurationsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/orgs/{org}/code-security/configurations{?after*,before*,per_page*,target_type*}", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public ConfigurationsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/orgs/{org}/code-security/configurations{?after*,before*,per_page*,target_type*}", rawUrl) + { + } + /// + /// 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 `read:org` scope to use this endpoint. + /// API method documentation + /// + /// A List<global::Ayllu.Github.Client.Models.CodeSecurityConfiguration> + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 403 status code + /// When receiving a 404 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task?> GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task> GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "403", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "404", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + }; + var collectionResult = await RequestAdapter.SendCollectionAsync(requestInfo, global::Ayllu.Github.Client.Models.CodeSecurityConfiguration.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + return collectionResult?.AsList(); + } + /// + /// 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. + /// API method documentation + /// + /// A + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PostAsync(global::Ayllu.Github.Client.Orgs.Item.CodeSecurity.Configurations.ConfigurationsPostRequestBody body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task PostAsync(global::Ayllu.Github.Client.Orgs.Item.CodeSecurity.Configurations.ConfigurationsPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPostRequestInformation(body, requestConfiguration); + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Models.CodeSecurityConfiguration.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false); + } + /// + /// 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 `read:org` scope to use this endpoint. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// 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. + /// + /// A + /// The request body + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPostRequestInformation(global::Ayllu.Github.Client.Orgs.Item.CodeSecurity.Configurations.ConfigurationsPostRequestBody body, Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToPostRequestInformation(global::Ayllu.Github.Client.Orgs.Item.CodeSecurity.Configurations.ConfigurationsPostRequestBody body, Action> requestConfiguration = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.Orgs.Item.CodeSecurity.Configurations.ConfigurationsRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Orgs.Item.CodeSecurity.Configurations.ConfigurationsRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// 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 `read:org` scope to use this endpoint. + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class ConfigurationsRequestBuilderGetQueryParameters + { + /// A cursor, as given in the [Link header](https://docs.github.com/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/rest/using-the-rest-api/using-pagination-in-the-rest-api)." +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("after")] + public string? After { get; set; } +#nullable restore +#else + [QueryParameter("after")] + public string After { get; set; } +#endif + /// A cursor, as given in the [Link header](https://docs.github.com/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/rest/using-the-rest-api/using-pagination-in-the-rest-api)." +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("before")] + public string? Before { get; set; } +#nullable restore +#else + [QueryParameter("before")] + public string Before { get; set; } +#endif + /// The number of results per page (max 100). For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." + [QueryParameter("per_page")] + public int? PerPage { get; set; } + /// The target type of the code security configuration + [Obsolete("This property is deprecated, use TargetTypeAsGetTargetTypeQueryParameterType instead")] +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("target_type")] + public string? TargetType { get; set; } +#nullable restore +#else + [QueryParameter("target_type")] + public string TargetType { get; set; } +#endif + /// The target type of the code security configuration + [QueryParameter("target_type")] + public global::Ayllu.Github.Client.Orgs.Item.CodeSecurity.Configurations.GetTarget_typeQueryParameterType? TargetTypeAsGetTargetTypeQueryParameterType { get; set; } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class ConfigurationsRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class ConfigurationsRequestBuilderPostRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Orgs/Item/CodeSecurity/Configurations/Defaults/DefaultsRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/CodeSecurity/Configurations/Defaults/DefaultsRequestBuilder.cs new file mode 100644 index 0000000..f95a796 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/CodeSecurity/Configurations/Defaults/DefaultsRequestBuilder.cs @@ -0,0 +1,101 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Orgs.Item.CodeSecurity.Configurations.Defaults +{ + /// + /// Builds and executes requests for operations under \orgs\{org}\code-security\configurations\defaults + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class DefaultsRequestBuilder : BaseRequestBuilder + { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public DefaultsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/orgs/{org}/code-security/configurations/defaults", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public DefaultsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/orgs/{org}/code-security/configurations/defaults", rawUrl) + { + } + /// + /// 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 `read:org` scope to use this endpoint. + /// API method documentation + /// + /// A List<global::Ayllu.Github.Client.Models.CodeSecurityDefaultConfigurations> + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 403 status code + /// When receiving a 404 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task?> GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task> GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "403", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "404", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + }; + var collectionResult = await RequestAdapter.SendCollectionAsync(requestInfo, global::Ayllu.Github.Client.Models.CodeSecurityDefaultConfigurations.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + return collectionResult?.AsList(); + } + /// + /// 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 `read:org` scope to use this endpoint. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.Orgs.Item.CodeSecurity.Configurations.Defaults.DefaultsRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Orgs.Item.CodeSecurity.Configurations.Defaults.DefaultsRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class DefaultsRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Orgs/Item/CodeSecurity/Configurations/Detach/DetachDeleteRequestBody.cs b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/CodeSecurity/Configurations/Detach/DetachDeleteRequestBody.cs new file mode 100644 index 0000000..96475c7 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/CodeSecurity/Configurations/Detach/DetachDeleteRequestBody.cs @@ -0,0 +1,55 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Orgs.Item.CodeSecurity.Configurations.Detach +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class DetachDeleteRequestBody : IParsable + #pragma warning restore CS1591 + { + /// An array of repository IDs to detach from configurations. Up to 250 IDs can be provided. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? SelectedRepositoryIds { get; set; } +#nullable restore +#else + public List SelectedRepositoryIds { get; set; } +#endif + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Orgs.Item.CodeSecurity.Configurations.Detach.DetachDeleteRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Orgs.Item.CodeSecurity.Configurations.Detach.DetachDeleteRequestBody(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "selected_repository_ids", n => { SelectedRepositoryIds = n.GetCollectionOfPrimitiveValues()?.AsList(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteCollectionOfPrimitiveValues("selected_repository_ids", SelectedRepositoryIds); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Orgs/Item/CodeSecurity/Configurations/Detach/DetachRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/CodeSecurity/Configurations/Detach/DetachRequestBuilder.cs new file mode 100644 index 0000000..ea9e431 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/CodeSecurity/Configurations/Detach/DetachRequestBuilder.cs @@ -0,0 +1,108 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Orgs.Item.CodeSecurity.Configurations.Detach +{ + /// + /// Builds and executes requests for operations under \orgs\{org}\code-security\configurations\detach + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class DetachRequestBuilder : BaseRequestBuilder + { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public DetachRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/orgs/{org}/code-security/configurations/detach", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public DetachRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/orgs/{org}/code-security/configurations/detach", rawUrl) + { + } + /// + /// Detach code security configuration(s) from a set of repositories.Repositories will retain their settings but will no longer be associated with the 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. + /// API method documentation + /// + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 400 status code + /// When receiving a 403 status code + /// When receiving a 404 status code + /// When receiving a 409 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task DeleteAsync(global::Ayllu.Github.Client.Orgs.Item.CodeSecurity.Configurations.Detach.DetachDeleteRequestBody body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task DeleteAsync(global::Ayllu.Github.Client.Orgs.Item.CodeSecurity.Configurations.Detach.DetachDeleteRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = ToDeleteRequestInformation(body, requestConfiguration); + var errorMapping = new Dictionary> + { + { "400", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "403", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "404", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "409", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + }; + await RequestAdapter.SendNoContentAsync(requestInfo, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// Detach code security configuration(s) from a set of repositories.Repositories will retain their settings but will no longer be associated with the 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. + /// + /// A + /// The request body + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToDeleteRequestInformation(global::Ayllu.Github.Client.Orgs.Item.CodeSecurity.Configurations.Detach.DetachDeleteRequestBody body, Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToDeleteRequestInformation(global::Ayllu.Github.Client.Orgs.Item.CodeSecurity.Configurations.Detach.DetachDeleteRequestBody body, Action> requestConfiguration = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation(Method.DELETE, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json, application/scim+json"); + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.Orgs.Item.CodeSecurity.Configurations.Detach.DetachRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Orgs.Item.CodeSecurity.Configurations.Detach.DetachRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class DetachRequestBuilderDeleteRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Orgs/Item/CodeSecurity/Configurations/GetTarget_typeQueryParameterType.cs b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/CodeSecurity/Configurations/GetTarget_typeQueryParameterType.cs new file mode 100644 index 0000000..098b0fc --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/CodeSecurity/Configurations/GetTarget_typeQueryParameterType.cs @@ -0,0 +1,20 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Orgs.Item.CodeSecurity.Configurations +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public enum GetTarget_typeQueryParameterType + #pragma warning restore CS1591 + { + [EnumMember(Value = "global")] + #pragma warning disable CS1591 + Global, + #pragma warning restore CS1591 + [EnumMember(Value = "all")] + #pragma warning disable CS1591 + All, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Orgs/Item/CodeSecurity/Configurations/Item/Attach/AttachPostRequestBody.cs b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/CodeSecurity/Configurations/Item/Attach/AttachPostRequestBody.cs new file mode 100644 index 0000000..15ae125 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/CodeSecurity/Configurations/Item/Attach/AttachPostRequestBody.cs @@ -0,0 +1,59 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Orgs.Item.CodeSecurity.Configurations.Item.Attach +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class AttachPostRequestBody : IParsable + #pragma warning restore CS1591 + { + /// 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` + public global::Ayllu.Github.Client.Orgs.Item.CodeSecurity.Configurations.Item.Attach.AttachPostRequestBody_scope? Scope { get; set; } + /// 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`. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? SelectedRepositoryIds { get; set; } +#nullable restore +#else + public List SelectedRepositoryIds { get; set; } +#endif + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Orgs.Item.CodeSecurity.Configurations.Item.Attach.AttachPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Orgs.Item.CodeSecurity.Configurations.Item.Attach.AttachPostRequestBody(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "scope", n => { Scope = n.GetEnumValue(); } }, + { "selected_repository_ids", n => { SelectedRepositoryIds = n.GetCollectionOfPrimitiveValues()?.AsList(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteEnumValue("scope", Scope); + writer.WriteCollectionOfPrimitiveValues("selected_repository_ids", SelectedRepositoryIds); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Orgs/Item/CodeSecurity/Configurations/Item/Attach/AttachPostRequestBody_scope.cs b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/CodeSecurity/Configurations/Item/Attach/AttachPostRequestBody_scope.cs new file mode 100644 index 0000000..eaf317a --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/CodeSecurity/Configurations/Item/Attach/AttachPostRequestBody_scope.cs @@ -0,0 +1,31 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Orgs.Item.CodeSecurity.Configurations.Item.Attach +{ + /// 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` + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public enum AttachPostRequestBody_scope + { + [EnumMember(Value = "all")] + #pragma warning disable CS1591 + All, + #pragma warning restore CS1591 + [EnumMember(Value = "all_without_configurations")] + #pragma warning disable CS1591 + All_without_configurations, + #pragma warning restore CS1591 + [EnumMember(Value = "public")] + #pragma warning disable CS1591 + Public, + #pragma warning restore CS1591 + [EnumMember(Value = "private_or_internal")] + #pragma warning disable CS1591 + Private_or_internal, + #pragma warning restore CS1591 + [EnumMember(Value = "selected")] + #pragma warning disable CS1591 + Selected, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Orgs/Item/CodeSecurity/Configurations/Item/Attach/AttachPostResponse.cs b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/CodeSecurity/Configurations/Item/Attach/AttachPostResponse.cs new file mode 100644 index 0000000..d28ea6d --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/CodeSecurity/Configurations/Item/Attach/AttachPostResponse.cs @@ -0,0 +1,55 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Orgs.Item.CodeSecurity.Configurations.Item.Attach +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class AttachPostResponse : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public AttachPostResponse() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Orgs.Item.CodeSecurity.Configurations.Item.Attach.AttachPostResponse CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Orgs.Item.CodeSecurity.Configurations.Item.Attach.AttachPostResponse(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Orgs/Item/CodeSecurity/Configurations/Item/Attach/AttachRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/CodeSecurity/Configurations/Item/Attach/AttachRequestBuilder.cs new file mode 100644 index 0000000..3997797 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/CodeSecurity/Configurations/Item/Attach/AttachRequestBuilder.cs @@ -0,0 +1,119 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Orgs.Item.CodeSecurity.Configurations.Item.Attach +{ + /// + /// Builds and executes requests for operations under \orgs\{org}\code-security\configurations\{configuration_id}\attach + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class AttachRequestBuilder : BaseRequestBuilder + { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public AttachRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/orgs/{org}/code-security/configurations/{configuration_id}/attach", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public AttachRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/orgs/{org}/code-security/configurations/{configuration_id}/attach", rawUrl) + { + } + /// + /// 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. + /// API method documentation + /// + /// A + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PostAsAttachPostResponseAsync(global::Ayllu.Github.Client.Orgs.Item.CodeSecurity.Configurations.Item.Attach.AttachPostRequestBody body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task PostAsAttachPostResponseAsync(global::Ayllu.Github.Client.Orgs.Item.CodeSecurity.Configurations.Item.Attach.AttachPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPostRequestInformation(body, requestConfiguration); + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Orgs.Item.CodeSecurity.Configurations.Item.Attach.AttachPostResponse.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false); + } + /// + /// 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. + /// API method documentation + /// + /// A + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + [Obsolete("This method is obsolete. Use PostAsAttachPostResponseAsync instead.")] +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PostAsync(global::Ayllu.Github.Client.Orgs.Item.CodeSecurity.Configurations.Item.Attach.AttachPostRequestBody body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task PostAsync(global::Ayllu.Github.Client.Orgs.Item.CodeSecurity.Configurations.Item.Attach.AttachPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPostRequestInformation(body, requestConfiguration); + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Orgs.Item.CodeSecurity.Configurations.Item.Attach.AttachResponse.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false); + } + /// + /// 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. + /// + /// A + /// The request body + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPostRequestInformation(global::Ayllu.Github.Client.Orgs.Item.CodeSecurity.Configurations.Item.Attach.AttachPostRequestBody body, Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToPostRequestInformation(global::Ayllu.Github.Client.Orgs.Item.CodeSecurity.Configurations.Item.Attach.AttachPostRequestBody body, Action> requestConfiguration = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.Orgs.Item.CodeSecurity.Configurations.Item.Attach.AttachRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Orgs.Item.CodeSecurity.Configurations.Item.Attach.AttachRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class AttachRequestBuilderPostRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Orgs/Item/CodeSecurity/Configurations/Item/Attach/AttachResponse.cs b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/CodeSecurity/Configurations/Item/Attach/AttachResponse.cs new file mode 100644 index 0000000..4a89c18 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/CodeSecurity/Configurations/Item/Attach/AttachResponse.cs @@ -0,0 +1,28 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Orgs.Item.CodeSecurity.Configurations.Item.Attach +{ + [Obsolete("This class is obsolete. Use AttachPostResponse instead.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class AttachResponse : global::Ayllu.Github.Client.Orgs.Item.CodeSecurity.Configurations.Item.Attach.AttachPostResponse, IParsable + #pragma warning restore CS1591 + { + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static new global::Ayllu.Github.Client.Orgs.Item.CodeSecurity.Configurations.Item.Attach.AttachResponse CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Orgs.Item.CodeSecurity.Configurations.Item.Attach.AttachResponse(); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Orgs/Item/CodeSecurity/Configurations/Item/Defaults/DefaultsPutRequestBody.cs b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/CodeSecurity/Configurations/Item/Defaults/DefaultsPutRequestBody.cs new file mode 100644 index 0000000..8e1f047 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/CodeSecurity/Configurations/Item/Defaults/DefaultsPutRequestBody.cs @@ -0,0 +1,59 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Orgs.Item.CodeSecurity.Configurations.Item.Defaults +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class DefaultsPutRequestBody : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// Specify which types of repository this security configuration should be applied to by default. + public global::Ayllu.Github.Client.Orgs.Item.CodeSecurity.Configurations.Item.Defaults.DefaultsPutRequestBody_default_for_new_repos? DefaultForNewRepos { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public DefaultsPutRequestBody() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Orgs.Item.CodeSecurity.Configurations.Item.Defaults.DefaultsPutRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Orgs.Item.CodeSecurity.Configurations.Item.Defaults.DefaultsPutRequestBody(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "default_for_new_repos", n => { DefaultForNewRepos = n.GetEnumValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteEnumValue("default_for_new_repos", DefaultForNewRepos); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Orgs/Item/CodeSecurity/Configurations/Item/Defaults/DefaultsPutRequestBody_default_for_new_repos.cs b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/CodeSecurity/Configurations/Item/Defaults/DefaultsPutRequestBody_default_for_new_repos.cs new file mode 100644 index 0000000..c84332a --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/CodeSecurity/Configurations/Item/Defaults/DefaultsPutRequestBody_default_for_new_repos.cs @@ -0,0 +1,27 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Orgs.Item.CodeSecurity.Configurations.Item.Defaults +{ + /// Specify which types of repository this security configuration should be applied to by default. + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public enum DefaultsPutRequestBody_default_for_new_repos + { + [EnumMember(Value = "all")] + #pragma warning disable CS1591 + All, + #pragma warning restore CS1591 + [EnumMember(Value = "none")] + #pragma warning disable CS1591 + None, + #pragma warning restore CS1591 + [EnumMember(Value = "private_and_internal")] + #pragma warning disable CS1591 + Private_and_internal, + #pragma warning restore CS1591 + [EnumMember(Value = "public")] + #pragma warning disable CS1591 + Public, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Orgs/Item/CodeSecurity/Configurations/Item/Defaults/DefaultsPutResponse.cs b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/CodeSecurity/Configurations/Item/Defaults/DefaultsPutResponse.cs new file mode 100644 index 0000000..7919f0b --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/CodeSecurity/Configurations/Item/Defaults/DefaultsPutResponse.cs @@ -0,0 +1,70 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Orgs.Item.CodeSecurity.Configurations.Item.Defaults +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class DefaultsPutResponse : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// A code security configuration +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.CodeSecurityConfiguration? Configuration { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.CodeSecurityConfiguration Configuration { get; set; } +#endif + /// Specifies which types of repository this security configuration is applied to by default. + public global::Ayllu.Github.Client.Orgs.Item.CodeSecurity.Configurations.Item.Defaults.DefaultsPutResponse_default_for_new_repos? DefaultForNewRepos { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public DefaultsPutResponse() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Orgs.Item.CodeSecurity.Configurations.Item.Defaults.DefaultsPutResponse CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Orgs.Item.CodeSecurity.Configurations.Item.Defaults.DefaultsPutResponse(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "configuration", n => { Configuration = n.GetObjectValue(global::Ayllu.Github.Client.Models.CodeSecurityConfiguration.CreateFromDiscriminatorValue); } }, + { "default_for_new_repos", n => { DefaultForNewRepos = n.GetEnumValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteObjectValue("configuration", Configuration); + writer.WriteEnumValue("default_for_new_repos", DefaultForNewRepos); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Orgs/Item/CodeSecurity/Configurations/Item/Defaults/DefaultsPutResponse_default_for_new_repos.cs b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/CodeSecurity/Configurations/Item/Defaults/DefaultsPutResponse_default_for_new_repos.cs new file mode 100644 index 0000000..d1cee36 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/CodeSecurity/Configurations/Item/Defaults/DefaultsPutResponse_default_for_new_repos.cs @@ -0,0 +1,27 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Orgs.Item.CodeSecurity.Configurations.Item.Defaults +{ + /// Specifies which types of repository this security configuration is applied to by default. + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public enum DefaultsPutResponse_default_for_new_repos + { + [EnumMember(Value = "all")] + #pragma warning disable CS1591 + All, + #pragma warning restore CS1591 + [EnumMember(Value = "none")] + #pragma warning disable CS1591 + None, + #pragma warning restore CS1591 + [EnumMember(Value = "private_and_internal")] + #pragma warning disable CS1591 + Private_and_internal, + #pragma warning restore CS1591 + [EnumMember(Value = "public")] + #pragma warning disable CS1591 + Public, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Orgs/Item/CodeSecurity/Configurations/Item/Defaults/DefaultsRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/CodeSecurity/Configurations/Item/Defaults/DefaultsRequestBuilder.cs new file mode 100644 index 0000000..cc0da35 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/CodeSecurity/Configurations/Item/Defaults/DefaultsRequestBuilder.cs @@ -0,0 +1,134 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Orgs.Item.CodeSecurity.Configurations.Item.Defaults +{ + /// + /// Builds and executes requests for operations under \orgs\{org}\code-security\configurations\{configuration_id}\defaults + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class DefaultsRequestBuilder : BaseRequestBuilder + { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public DefaultsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/orgs/{org}/code-security/configurations/{configuration_id}/defaults", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public DefaultsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/orgs/{org}/code-security/configurations/{configuration_id}/defaults", rawUrl) + { + } + /// + /// 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. + /// API method documentation + /// + /// A + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 403 status code + /// When receiving a 404 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PutAsDefaultsPutResponseAsync(global::Ayllu.Github.Client.Orgs.Item.CodeSecurity.Configurations.Item.Defaults.DefaultsPutRequestBody body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task PutAsDefaultsPutResponseAsync(global::Ayllu.Github.Client.Orgs.Item.CodeSecurity.Configurations.Item.Defaults.DefaultsPutRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPutRequestInformation(body, requestConfiguration); + var errorMapping = new Dictionary> + { + { "403", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "404", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Orgs.Item.CodeSecurity.Configurations.Item.Defaults.DefaultsPutResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// 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. + /// API method documentation + /// + /// A + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 403 status code + /// When receiving a 404 status code + [Obsolete("This method is obsolete. Use PutAsDefaultsPutResponseAsync instead.")] +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PutAsync(global::Ayllu.Github.Client.Orgs.Item.CodeSecurity.Configurations.Item.Defaults.DefaultsPutRequestBody body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task PutAsync(global::Ayllu.Github.Client.Orgs.Item.CodeSecurity.Configurations.Item.Defaults.DefaultsPutRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPutRequestInformation(body, requestConfiguration); + var errorMapping = new Dictionary> + { + { "403", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "404", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Orgs.Item.CodeSecurity.Configurations.Item.Defaults.DefaultsResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// 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. + /// + /// A + /// The request body + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPutRequestInformation(global::Ayllu.Github.Client.Orgs.Item.CodeSecurity.Configurations.Item.Defaults.DefaultsPutRequestBody body, Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToPutRequestInformation(global::Ayllu.Github.Client.Orgs.Item.CodeSecurity.Configurations.Item.Defaults.DefaultsPutRequestBody body, Action> requestConfiguration = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation(Method.PUT, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.Orgs.Item.CodeSecurity.Configurations.Item.Defaults.DefaultsRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Orgs.Item.CodeSecurity.Configurations.Item.Defaults.DefaultsRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class DefaultsRequestBuilderPutRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Orgs/Item/CodeSecurity/Configurations/Item/Defaults/DefaultsResponse.cs b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/CodeSecurity/Configurations/Item/Defaults/DefaultsResponse.cs new file mode 100644 index 0000000..bf5a5f3 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/CodeSecurity/Configurations/Item/Defaults/DefaultsResponse.cs @@ -0,0 +1,28 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Orgs.Item.CodeSecurity.Configurations.Item.Defaults +{ + [Obsolete("This class is obsolete. Use DefaultsPutResponse instead.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class DefaultsResponse : global::Ayllu.Github.Client.Orgs.Item.CodeSecurity.Configurations.Item.Defaults.DefaultsPutResponse, IParsable + #pragma warning restore CS1591 + { + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static new global::Ayllu.Github.Client.Orgs.Item.CodeSecurity.Configurations.Item.Defaults.DefaultsResponse CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Orgs.Item.CodeSecurity.Configurations.Item.Defaults.DefaultsResponse(); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Orgs/Item/CodeSecurity/Configurations/Item/Repositories/RepositoriesRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/CodeSecurity/Configurations/Item/Repositories/RepositoriesRequestBuilder.cs new file mode 100644 index 0000000..60de514 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/CodeSecurity/Configurations/Item/Repositories/RepositoriesRequestBuilder.cs @@ -0,0 +1,141 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Orgs.Item.CodeSecurity.Configurations.Item.Repositories +{ + /// + /// Builds and executes requests for operations under \orgs\{org}\code-security\configurations\{configuration_id}\repositories + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class RepositoriesRequestBuilder : BaseRequestBuilder + { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public RepositoriesRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/orgs/{org}/code-security/configurations/{configuration_id}/repositories{?after*,before*,per_page*,status*}", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public RepositoriesRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/orgs/{org}/code-security/configurations/{configuration_id}/repositories{?after*,before*,per_page*,status*}", rawUrl) + { + } + /// + /// 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 `read:org` scope to use this endpoint. + /// API method documentation + /// + /// A List<global::Ayllu.Github.Client.Models.CodeSecurityConfigurationRepositories> + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 403 status code + /// When receiving a 404 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task?> GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task> GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "403", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "404", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + }; + var collectionResult = await RequestAdapter.SendCollectionAsync(requestInfo, global::Ayllu.Github.Client.Models.CodeSecurityConfigurationRepositories.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + return collectionResult?.AsList(); + } + /// + /// 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 `read:org` scope to use this endpoint. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.Orgs.Item.CodeSecurity.Configurations.Item.Repositories.RepositoriesRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Orgs.Item.CodeSecurity.Configurations.Item.Repositories.RepositoriesRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// 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 `read:org` scope to use this endpoint. + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class RepositoriesRequestBuilderGetQueryParameters + { + /// A cursor, as given in the [Link header](https://docs.github.com/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/rest/using-the-rest-api/using-pagination-in-the-rest-api)." +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("after")] + public string? After { get; set; } +#nullable restore +#else + [QueryParameter("after")] + public string After { get; set; } +#endif + /// A cursor, as given in the [Link header](https://docs.github.com/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/rest/using-the-rest-api/using-pagination-in-the-rest-api)." +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("before")] + public string? Before { get; set; } +#nullable restore +#else + [QueryParameter("before")] + public string Before { get; set; } +#endif + /// The number of results per page (max 100). For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." + [QueryParameter("per_page")] + public int? PerPage { get; set; } + /// A comma-separated list of statuses. If specified, only repositories with these attachment statuses will be returned.Can be: `all`, `attached`, `attaching`, `detached`, `removed`, `enforced`, `failed`, `updating`, `removed_by_enterprise` +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("status")] + public string? Status { get; set; } +#nullable restore +#else + [QueryParameter("status")] + public string Status { get; set; } +#endif + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class RepositoriesRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Orgs/Item/CodeSecurity/Configurations/Item/WithConfiguration_ItemRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/CodeSecurity/Configurations/Item/WithConfiguration_ItemRequestBuilder.cs new file mode 100644 index 0000000..f673f47 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/CodeSecurity/Configurations/Item/WithConfiguration_ItemRequestBuilder.cs @@ -0,0 +1,225 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Ayllu.Github.Client.Orgs.Item.CodeSecurity.Configurations.Item.Attach; +using Ayllu.Github.Client.Orgs.Item.CodeSecurity.Configurations.Item.Defaults; +using Ayllu.Github.Client.Orgs.Item.CodeSecurity.Configurations.Item.Repositories; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Orgs.Item.CodeSecurity.Configurations.Item +{ + /// + /// Builds and executes requests for operations under \orgs\{org}\code-security\configurations\{configuration_id} + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithConfiguration_ItemRequestBuilder : BaseRequestBuilder + { + /// The attach property + public global::Ayllu.Github.Client.Orgs.Item.CodeSecurity.Configurations.Item.Attach.AttachRequestBuilder Attach + { + get => new global::Ayllu.Github.Client.Orgs.Item.CodeSecurity.Configurations.Item.Attach.AttachRequestBuilder(PathParameters, RequestAdapter); + } + /// The defaults property + public global::Ayllu.Github.Client.Orgs.Item.CodeSecurity.Configurations.Item.Defaults.DefaultsRequestBuilder Defaults + { + get => new global::Ayllu.Github.Client.Orgs.Item.CodeSecurity.Configurations.Item.Defaults.DefaultsRequestBuilder(PathParameters, RequestAdapter); + } + /// The repositories property + public global::Ayllu.Github.Client.Orgs.Item.CodeSecurity.Configurations.Item.Repositories.RepositoriesRequestBuilder Repositories + { + get => new global::Ayllu.Github.Client.Orgs.Item.CodeSecurity.Configurations.Item.Repositories.RepositoriesRequestBuilder(PathParameters, RequestAdapter); + } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public WithConfiguration_ItemRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/orgs/{org}/code-security/configurations/{configuration_id}", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public WithConfiguration_ItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/orgs/{org}/code-security/configurations/{configuration_id}", rawUrl) + { + } + /// + /// 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. + /// API method documentation + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 400 status code + /// When receiving a 403 status code + /// When receiving a 404 status code + /// When receiving a 409 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task DeleteAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task DeleteAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToDeleteRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "400", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "403", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "404", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "409", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + }; + await RequestAdapter.SendNoContentAsync(requestInfo, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// 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. + /// API method documentation + /// + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 403 status code + /// When receiving a 404 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "403", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "404", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Models.CodeSecurityConfiguration.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// 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. + /// API method documentation + /// + /// A + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PatchAsync(global::Ayllu.Github.Client.Orgs.Item.CodeSecurity.Configurations.Item.WithConfiguration_PatchRequestBody body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task PatchAsync(global::Ayllu.Github.Client.Orgs.Item.CodeSecurity.Configurations.Item.WithConfiguration_PatchRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPatchRequestInformation(body, requestConfiguration); + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Models.CodeSecurityConfiguration.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false); + } + /// + /// 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. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToDeleteRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToDeleteRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.DELETE, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json, application/scim+json"); + return requestInfo; + } + /// + /// 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. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// 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. + /// + /// A + /// The request body + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPatchRequestInformation(global::Ayllu.Github.Client.Orgs.Item.CodeSecurity.Configurations.Item.WithConfiguration_PatchRequestBody body, Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToPatchRequestInformation(global::Ayllu.Github.Client.Orgs.Item.CodeSecurity.Configurations.Item.WithConfiguration_PatchRequestBody body, Action> requestConfiguration = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.Orgs.Item.CodeSecurity.Configurations.Item.WithConfiguration_ItemRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Orgs.Item.CodeSecurity.Configurations.Item.WithConfiguration_ItemRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithConfiguration_ItemRequestBuilderDeleteRequestConfiguration : RequestConfiguration + { + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithConfiguration_ItemRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithConfiguration_ItemRequestBuilderPatchRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Orgs/Item/CodeSecurity/Configurations/Item/WithConfiguration_PatchRequestBody.cs b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/CodeSecurity/Configurations/Item/WithConfiguration_PatchRequestBody.cs new file mode 100644 index 0000000..1212028 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/CodeSecurity/Configurations/Item/WithConfiguration_PatchRequestBody.cs @@ -0,0 +1,175 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Orgs.Item.CodeSecurity.Configurations.Item +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class WithConfiguration_PatchRequestBody : IParsable + #pragma warning restore CS1591 + { + /// The enablement status of GitHub Advanced Security features. `enabled` will enable both Code Security and Secret Protection features.> [!WARNING]> `code_security` and `secret_protection` are deprecated values for this field. Prefer the individual `code_security` and `secret_protection` fields to set the status of these features. + public global::Ayllu.Github.Client.Orgs.Item.CodeSecurity.Configurations.Item.WithConfiguration_PatchRequestBody_advanced_security? AdvancedSecurity { get; set; } + /// The enablement status of code scanning default setup + public global::Ayllu.Github.Client.Orgs.Item.CodeSecurity.Configurations.Item.WithConfiguration_PatchRequestBody_code_scanning_default_setup? CodeScanningDefaultSetup { get; set; } + /// Feature options for code scanning default setup +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.CodeScanningDefaultSetupOptions? CodeScanningDefaultSetupOptions { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.CodeScanningDefaultSetupOptions CodeScanningDefaultSetupOptions { get; set; } +#endif + /// The enablement status of code scanning delegated alert dismissal + public global::Ayllu.Github.Client.Orgs.Item.CodeSecurity.Configurations.Item.WithConfiguration_PatchRequestBody_code_scanning_delegated_alert_dismissal? CodeScanningDelegatedAlertDismissal { get; set; } + /// The enablement status of GitHub Code Security features. + public global::Ayllu.Github.Client.Orgs.Item.CodeSecurity.Configurations.Item.WithConfiguration_PatchRequestBody_code_security? CodeSecurity { get; set; } + /// The enablement status of Dependabot alerts + public global::Ayllu.Github.Client.Orgs.Item.CodeSecurity.Configurations.Item.WithConfiguration_PatchRequestBody_dependabot_alerts? DependabotAlerts { get; set; } + /// The enablement status of Dependabot security updates + public global::Ayllu.Github.Client.Orgs.Item.CodeSecurity.Configurations.Item.WithConfiguration_PatchRequestBody_dependabot_security_updates? DependabotSecurityUpdates { get; set; } + /// The enablement status of Dependency Graph + public global::Ayllu.Github.Client.Orgs.Item.CodeSecurity.Configurations.Item.WithConfiguration_PatchRequestBody_dependency_graph? DependencyGraph { get; set; } + /// The enablement status of Automatic dependency submission + public global::Ayllu.Github.Client.Orgs.Item.CodeSecurity.Configurations.Item.WithConfiguration_PatchRequestBody_dependency_graph_autosubmit_action? DependencyGraphAutosubmitAction { get; set; } + /// Feature options for Automatic dependency submission +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Orgs.Item.CodeSecurity.Configurations.Item.WithConfiguration_PatchRequestBody_dependency_graph_autosubmit_action_options? DependencyGraphAutosubmitActionOptions { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Orgs.Item.CodeSecurity.Configurations.Item.WithConfiguration_PatchRequestBody_dependency_graph_autosubmit_action_options DependencyGraphAutosubmitActionOptions { get; set; } +#endif + /// A description of the code security configuration +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Description { get; set; } +#nullable restore +#else + public string Description { get; set; } +#endif + /// The enforcement status for a security configuration + public global::Ayllu.Github.Client.Orgs.Item.CodeSecurity.Configurations.Item.WithConfiguration_PatchRequestBody_enforcement? Enforcement { get; set; } + /// The name of the code security configuration. Must be unique within the organization. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Name { get; set; } +#nullable restore +#else + public string Name { get; set; } +#endif + /// The enablement status of private vulnerability reporting + public global::Ayllu.Github.Client.Orgs.Item.CodeSecurity.Configurations.Item.WithConfiguration_PatchRequestBody_private_vulnerability_reporting? PrivateVulnerabilityReporting { get; set; } + /// The enablement status of GitHub Secret Protection features. + public global::Ayllu.Github.Client.Orgs.Item.CodeSecurity.Configurations.Item.WithConfiguration_PatchRequestBody_secret_protection? SecretProtection { get; set; } + /// The enablement status of secret scanning + public global::Ayllu.Github.Client.Orgs.Item.CodeSecurity.Configurations.Item.WithConfiguration_PatchRequestBody_secret_scanning? SecretScanning { get; set; } + /// The enablement status of secret scanning delegated alert dismissal + public global::Ayllu.Github.Client.Orgs.Item.CodeSecurity.Configurations.Item.WithConfiguration_PatchRequestBody_secret_scanning_delegated_alert_dismissal? SecretScanningDelegatedAlertDismissal { get; set; } + /// The enablement status of secret scanning delegated bypass + public global::Ayllu.Github.Client.Orgs.Item.CodeSecurity.Configurations.Item.WithConfiguration_PatchRequestBody_secret_scanning_delegated_bypass? SecretScanningDelegatedBypass { get; set; } + /// Feature options for secret scanning delegated bypass +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Orgs.Item.CodeSecurity.Configurations.Item.WithConfiguration_PatchRequestBody_secret_scanning_delegated_bypass_options? SecretScanningDelegatedBypassOptions { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Orgs.Item.CodeSecurity.Configurations.Item.WithConfiguration_PatchRequestBody_secret_scanning_delegated_bypass_options SecretScanningDelegatedBypassOptions { get; set; } +#endif + /// The enablement status of Copilot secret scanning + public global::Ayllu.Github.Client.Orgs.Item.CodeSecurity.Configurations.Item.WithConfiguration_PatchRequestBody_secret_scanning_generic_secrets? SecretScanningGenericSecrets { get; set; } + /// The enablement status of secret scanning non-provider patterns + public global::Ayllu.Github.Client.Orgs.Item.CodeSecurity.Configurations.Item.WithConfiguration_PatchRequestBody_secret_scanning_non_provider_patterns? SecretScanningNonProviderPatterns { get; set; } + /// The enablement status of secret scanning push protection + public global::Ayllu.Github.Client.Orgs.Item.CodeSecurity.Configurations.Item.WithConfiguration_PatchRequestBody_secret_scanning_push_protection? SecretScanningPushProtection { get; set; } + /// The enablement status of secret scanning validity checks + public global::Ayllu.Github.Client.Orgs.Item.CodeSecurity.Configurations.Item.WithConfiguration_PatchRequestBody_secret_scanning_validity_checks? SecretScanningValidityChecks { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public WithConfiguration_PatchRequestBody() + { + CodeScanningDelegatedAlertDismissal = global::Ayllu.Github.Client.Orgs.Item.CodeSecurity.Configurations.Item.WithConfiguration_PatchRequestBody_code_scanning_delegated_alert_dismissal.Disabled; + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Orgs.Item.CodeSecurity.Configurations.Item.WithConfiguration_PatchRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Orgs.Item.CodeSecurity.Configurations.Item.WithConfiguration_PatchRequestBody(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "advanced_security", n => { AdvancedSecurity = n.GetEnumValue(); } }, + { "code_scanning_default_setup", n => { CodeScanningDefaultSetup = n.GetEnumValue(); } }, + { "code_scanning_default_setup_options", n => { CodeScanningDefaultSetupOptions = n.GetObjectValue(global::Ayllu.Github.Client.Models.CodeScanningDefaultSetupOptions.CreateFromDiscriminatorValue); } }, + { "code_scanning_delegated_alert_dismissal", n => { CodeScanningDelegatedAlertDismissal = n.GetEnumValue(); } }, + { "code_security", n => { CodeSecurity = n.GetEnumValue(); } }, + { "dependabot_alerts", n => { DependabotAlerts = n.GetEnumValue(); } }, + { "dependabot_security_updates", n => { DependabotSecurityUpdates = n.GetEnumValue(); } }, + { "dependency_graph", n => { DependencyGraph = n.GetEnumValue(); } }, + { "dependency_graph_autosubmit_action", n => { DependencyGraphAutosubmitAction = n.GetEnumValue(); } }, + { "dependency_graph_autosubmit_action_options", n => { DependencyGraphAutosubmitActionOptions = n.GetObjectValue(global::Ayllu.Github.Client.Orgs.Item.CodeSecurity.Configurations.Item.WithConfiguration_PatchRequestBody_dependency_graph_autosubmit_action_options.CreateFromDiscriminatorValue); } }, + { "description", n => { Description = n.GetStringValue(); } }, + { "enforcement", n => { Enforcement = n.GetEnumValue(); } }, + { "name", n => { Name = n.GetStringValue(); } }, + { "private_vulnerability_reporting", n => { PrivateVulnerabilityReporting = n.GetEnumValue(); } }, + { "secret_protection", n => { SecretProtection = n.GetEnumValue(); } }, + { "secret_scanning", n => { SecretScanning = n.GetEnumValue(); } }, + { "secret_scanning_delegated_alert_dismissal", n => { SecretScanningDelegatedAlertDismissal = n.GetEnumValue(); } }, + { "secret_scanning_delegated_bypass", n => { SecretScanningDelegatedBypass = n.GetEnumValue(); } }, + { "secret_scanning_delegated_bypass_options", n => { SecretScanningDelegatedBypassOptions = n.GetObjectValue(global::Ayllu.Github.Client.Orgs.Item.CodeSecurity.Configurations.Item.WithConfiguration_PatchRequestBody_secret_scanning_delegated_bypass_options.CreateFromDiscriminatorValue); } }, + { "secret_scanning_generic_secrets", n => { SecretScanningGenericSecrets = n.GetEnumValue(); } }, + { "secret_scanning_non_provider_patterns", n => { SecretScanningNonProviderPatterns = n.GetEnumValue(); } }, + { "secret_scanning_push_protection", n => { SecretScanningPushProtection = n.GetEnumValue(); } }, + { "secret_scanning_validity_checks", n => { SecretScanningValidityChecks = n.GetEnumValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteEnumValue("advanced_security", AdvancedSecurity); + writer.WriteEnumValue("code_scanning_default_setup", CodeScanningDefaultSetup); + writer.WriteObjectValue("code_scanning_default_setup_options", CodeScanningDefaultSetupOptions); + writer.WriteEnumValue("code_scanning_delegated_alert_dismissal", CodeScanningDelegatedAlertDismissal); + writer.WriteEnumValue("code_security", CodeSecurity); + writer.WriteEnumValue("dependabot_alerts", DependabotAlerts); + writer.WriteEnumValue("dependabot_security_updates", DependabotSecurityUpdates); + writer.WriteEnumValue("dependency_graph", DependencyGraph); + writer.WriteEnumValue("dependency_graph_autosubmit_action", DependencyGraphAutosubmitAction); + writer.WriteObjectValue("dependency_graph_autosubmit_action_options", DependencyGraphAutosubmitActionOptions); + writer.WriteStringValue("description", Description); + writer.WriteEnumValue("enforcement", Enforcement); + writer.WriteStringValue("name", Name); + writer.WriteEnumValue("private_vulnerability_reporting", PrivateVulnerabilityReporting); + writer.WriteEnumValue("secret_protection", SecretProtection); + writer.WriteEnumValue("secret_scanning", SecretScanning); + writer.WriteEnumValue("secret_scanning_delegated_alert_dismissal", SecretScanningDelegatedAlertDismissal); + writer.WriteEnumValue("secret_scanning_delegated_bypass", SecretScanningDelegatedBypass); + writer.WriteObjectValue("secret_scanning_delegated_bypass_options", SecretScanningDelegatedBypassOptions); + writer.WriteEnumValue("secret_scanning_generic_secrets", SecretScanningGenericSecrets); + writer.WriteEnumValue("secret_scanning_non_provider_patterns", SecretScanningNonProviderPatterns); + writer.WriteEnumValue("secret_scanning_push_protection", SecretScanningPushProtection); + writer.WriteEnumValue("secret_scanning_validity_checks", SecretScanningValidityChecks); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Orgs/Item/CodeSecurity/Configurations/Item/WithConfiguration_PatchRequestBody_advanced_security.cs b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/CodeSecurity/Configurations/Item/WithConfiguration_PatchRequestBody_advanced_security.cs new file mode 100644 index 0000000..82578f3 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/CodeSecurity/Configurations/Item/WithConfiguration_PatchRequestBody_advanced_security.cs @@ -0,0 +1,27 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Orgs.Item.CodeSecurity.Configurations.Item +{ + /// The enablement status of GitHub Advanced Security features. `enabled` will enable both Code Security and Secret Protection features.> [!WARNING]> `code_security` and `secret_protection` are deprecated values for this field. Prefer the individual `code_security` and `secret_protection` fields to set the status of these features. + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public enum WithConfiguration_PatchRequestBody_advanced_security + { + [EnumMember(Value = "enabled")] + #pragma warning disable CS1591 + Enabled, + #pragma warning restore CS1591 + [EnumMember(Value = "disabled")] + #pragma warning disable CS1591 + Disabled, + #pragma warning restore CS1591 + [EnumMember(Value = "code_security")] + #pragma warning disable CS1591 + Code_security, + #pragma warning restore CS1591 + [EnumMember(Value = "secret_protection")] + #pragma warning disable CS1591 + Secret_protection, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Orgs/Item/CodeSecurity/Configurations/Item/WithConfiguration_PatchRequestBody_code_scanning_default_setup.cs b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/CodeSecurity/Configurations/Item/WithConfiguration_PatchRequestBody_code_scanning_default_setup.cs new file mode 100644 index 0000000..3de242b --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/CodeSecurity/Configurations/Item/WithConfiguration_PatchRequestBody_code_scanning_default_setup.cs @@ -0,0 +1,23 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Orgs.Item.CodeSecurity.Configurations.Item +{ + /// The enablement status of code scanning default setup + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public enum WithConfiguration_PatchRequestBody_code_scanning_default_setup + { + [EnumMember(Value = "enabled")] + #pragma warning disable CS1591 + Enabled, + #pragma warning restore CS1591 + [EnumMember(Value = "disabled")] + #pragma warning disable CS1591 + Disabled, + #pragma warning restore CS1591 + [EnumMember(Value = "not_set")] + #pragma warning disable CS1591 + Not_set, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Orgs/Item/CodeSecurity/Configurations/Item/WithConfiguration_PatchRequestBody_code_scanning_delegated_alert_dismissal.cs b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/CodeSecurity/Configurations/Item/WithConfiguration_PatchRequestBody_code_scanning_delegated_alert_dismissal.cs new file mode 100644 index 0000000..6b4f1af --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/CodeSecurity/Configurations/Item/WithConfiguration_PatchRequestBody_code_scanning_delegated_alert_dismissal.cs @@ -0,0 +1,23 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Orgs.Item.CodeSecurity.Configurations.Item +{ + /// The enablement status of code scanning delegated alert dismissal + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public enum WithConfiguration_PatchRequestBody_code_scanning_delegated_alert_dismissal + { + [EnumMember(Value = "enabled")] + #pragma warning disable CS1591 + Enabled, + #pragma warning restore CS1591 + [EnumMember(Value = "disabled")] + #pragma warning disable CS1591 + Disabled, + #pragma warning restore CS1591 + [EnumMember(Value = "not_set")] + #pragma warning disable CS1591 + Not_set, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Orgs/Item/CodeSecurity/Configurations/Item/WithConfiguration_PatchRequestBody_code_security.cs b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/CodeSecurity/Configurations/Item/WithConfiguration_PatchRequestBody_code_security.cs new file mode 100644 index 0000000..dc4941d --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/CodeSecurity/Configurations/Item/WithConfiguration_PatchRequestBody_code_security.cs @@ -0,0 +1,23 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Orgs.Item.CodeSecurity.Configurations.Item +{ + /// The enablement status of GitHub Code Security features. + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public enum WithConfiguration_PatchRequestBody_code_security + { + [EnumMember(Value = "enabled")] + #pragma warning disable CS1591 + Enabled, + #pragma warning restore CS1591 + [EnumMember(Value = "disabled")] + #pragma warning disable CS1591 + Disabled, + #pragma warning restore CS1591 + [EnumMember(Value = "not_set")] + #pragma warning disable CS1591 + Not_set, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Orgs/Item/CodeSecurity/Configurations/Item/WithConfiguration_PatchRequestBody_dependabot_alerts.cs b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/CodeSecurity/Configurations/Item/WithConfiguration_PatchRequestBody_dependabot_alerts.cs new file mode 100644 index 0000000..3ba319c --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/CodeSecurity/Configurations/Item/WithConfiguration_PatchRequestBody_dependabot_alerts.cs @@ -0,0 +1,23 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Orgs.Item.CodeSecurity.Configurations.Item +{ + /// The enablement status of Dependabot alerts + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public enum WithConfiguration_PatchRequestBody_dependabot_alerts + { + [EnumMember(Value = "enabled")] + #pragma warning disable CS1591 + Enabled, + #pragma warning restore CS1591 + [EnumMember(Value = "disabled")] + #pragma warning disable CS1591 + Disabled, + #pragma warning restore CS1591 + [EnumMember(Value = "not_set")] + #pragma warning disable CS1591 + Not_set, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Orgs/Item/CodeSecurity/Configurations/Item/WithConfiguration_PatchRequestBody_dependabot_security_updates.cs b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/CodeSecurity/Configurations/Item/WithConfiguration_PatchRequestBody_dependabot_security_updates.cs new file mode 100644 index 0000000..fa011a1 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/CodeSecurity/Configurations/Item/WithConfiguration_PatchRequestBody_dependabot_security_updates.cs @@ -0,0 +1,23 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Orgs.Item.CodeSecurity.Configurations.Item +{ + /// The enablement status of Dependabot security updates + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public enum WithConfiguration_PatchRequestBody_dependabot_security_updates + { + [EnumMember(Value = "enabled")] + #pragma warning disable CS1591 + Enabled, + #pragma warning restore CS1591 + [EnumMember(Value = "disabled")] + #pragma warning disable CS1591 + Disabled, + #pragma warning restore CS1591 + [EnumMember(Value = "not_set")] + #pragma warning disable CS1591 + Not_set, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Orgs/Item/CodeSecurity/Configurations/Item/WithConfiguration_PatchRequestBody_dependency_graph.cs b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/CodeSecurity/Configurations/Item/WithConfiguration_PatchRequestBody_dependency_graph.cs new file mode 100644 index 0000000..4dd19a8 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/CodeSecurity/Configurations/Item/WithConfiguration_PatchRequestBody_dependency_graph.cs @@ -0,0 +1,23 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Orgs.Item.CodeSecurity.Configurations.Item +{ + /// The enablement status of Dependency Graph + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public enum WithConfiguration_PatchRequestBody_dependency_graph + { + [EnumMember(Value = "enabled")] + #pragma warning disable CS1591 + Enabled, + #pragma warning restore CS1591 + [EnumMember(Value = "disabled")] + #pragma warning disable CS1591 + Disabled, + #pragma warning restore CS1591 + [EnumMember(Value = "not_set")] + #pragma warning disable CS1591 + Not_set, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Orgs/Item/CodeSecurity/Configurations/Item/WithConfiguration_PatchRequestBody_dependency_graph_autosubmit_action.cs b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/CodeSecurity/Configurations/Item/WithConfiguration_PatchRequestBody_dependency_graph_autosubmit_action.cs new file mode 100644 index 0000000..8b38e2b --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/CodeSecurity/Configurations/Item/WithConfiguration_PatchRequestBody_dependency_graph_autosubmit_action.cs @@ -0,0 +1,23 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Orgs.Item.CodeSecurity.Configurations.Item +{ + /// The enablement status of Automatic dependency submission + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public enum WithConfiguration_PatchRequestBody_dependency_graph_autosubmit_action + { + [EnumMember(Value = "enabled")] + #pragma warning disable CS1591 + Enabled, + #pragma warning restore CS1591 + [EnumMember(Value = "disabled")] + #pragma warning disable CS1591 + Disabled, + #pragma warning restore CS1591 + [EnumMember(Value = "not_set")] + #pragma warning disable CS1591 + Not_set, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Orgs/Item/CodeSecurity/Configurations/Item/WithConfiguration_PatchRequestBody_dependency_graph_autosubmit_action_options.cs b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/CodeSecurity/Configurations/Item/WithConfiguration_PatchRequestBody_dependency_graph_autosubmit_action_options.cs new file mode 100644 index 0000000..3ca6863 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/CodeSecurity/Configurations/Item/WithConfiguration_PatchRequestBody_dependency_graph_autosubmit_action_options.cs @@ -0,0 +1,60 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Orgs.Item.CodeSecurity.Configurations.Item +{ + /// + /// Feature options for Automatic dependency submission + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithConfiguration_PatchRequestBody_dependency_graph_autosubmit_action_options : IAdditionalDataHolder, IParsable + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// Whether to use runners labeled with 'dependency-submission' or standard GitHub runners. + public bool? LabeledRunners { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public WithConfiguration_PatchRequestBody_dependency_graph_autosubmit_action_options() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Orgs.Item.CodeSecurity.Configurations.Item.WithConfiguration_PatchRequestBody_dependency_graph_autosubmit_action_options CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Orgs.Item.CodeSecurity.Configurations.Item.WithConfiguration_PatchRequestBody_dependency_graph_autosubmit_action_options(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "labeled_runners", n => { LabeledRunners = n.GetBoolValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteBoolValue("labeled_runners", LabeledRunners); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Orgs/Item/CodeSecurity/Configurations/Item/WithConfiguration_PatchRequestBody_enforcement.cs b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/CodeSecurity/Configurations/Item/WithConfiguration_PatchRequestBody_enforcement.cs new file mode 100644 index 0000000..650c98e --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/CodeSecurity/Configurations/Item/WithConfiguration_PatchRequestBody_enforcement.cs @@ -0,0 +1,19 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Orgs.Item.CodeSecurity.Configurations.Item +{ + /// The enforcement status for a security configuration + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public enum WithConfiguration_PatchRequestBody_enforcement + { + [EnumMember(Value = "enforced")] + #pragma warning disable CS1591 + Enforced, + #pragma warning restore CS1591 + [EnumMember(Value = "unenforced")] + #pragma warning disable CS1591 + Unenforced, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Orgs/Item/CodeSecurity/Configurations/Item/WithConfiguration_PatchRequestBody_private_vulnerability_reporting.cs b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/CodeSecurity/Configurations/Item/WithConfiguration_PatchRequestBody_private_vulnerability_reporting.cs new file mode 100644 index 0000000..0466c75 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/CodeSecurity/Configurations/Item/WithConfiguration_PatchRequestBody_private_vulnerability_reporting.cs @@ -0,0 +1,23 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Orgs.Item.CodeSecurity.Configurations.Item +{ + /// The enablement status of private vulnerability reporting + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public enum WithConfiguration_PatchRequestBody_private_vulnerability_reporting + { + [EnumMember(Value = "enabled")] + #pragma warning disable CS1591 + Enabled, + #pragma warning restore CS1591 + [EnumMember(Value = "disabled")] + #pragma warning disable CS1591 + Disabled, + #pragma warning restore CS1591 + [EnumMember(Value = "not_set")] + #pragma warning disable CS1591 + Not_set, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Orgs/Item/CodeSecurity/Configurations/Item/WithConfiguration_PatchRequestBody_secret_protection.cs b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/CodeSecurity/Configurations/Item/WithConfiguration_PatchRequestBody_secret_protection.cs new file mode 100644 index 0000000..90ef0ec --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/CodeSecurity/Configurations/Item/WithConfiguration_PatchRequestBody_secret_protection.cs @@ -0,0 +1,23 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Orgs.Item.CodeSecurity.Configurations.Item +{ + /// The enablement status of GitHub Secret Protection features. + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public enum WithConfiguration_PatchRequestBody_secret_protection + { + [EnumMember(Value = "enabled")] + #pragma warning disable CS1591 + Enabled, + #pragma warning restore CS1591 + [EnumMember(Value = "disabled")] + #pragma warning disable CS1591 + Disabled, + #pragma warning restore CS1591 + [EnumMember(Value = "not_set")] + #pragma warning disable CS1591 + Not_set, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Orgs/Item/CodeSecurity/Configurations/Item/WithConfiguration_PatchRequestBody_secret_scanning.cs b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/CodeSecurity/Configurations/Item/WithConfiguration_PatchRequestBody_secret_scanning.cs new file mode 100644 index 0000000..c9f3786 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/CodeSecurity/Configurations/Item/WithConfiguration_PatchRequestBody_secret_scanning.cs @@ -0,0 +1,23 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Orgs.Item.CodeSecurity.Configurations.Item +{ + /// The enablement status of secret scanning + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public enum WithConfiguration_PatchRequestBody_secret_scanning + { + [EnumMember(Value = "enabled")] + #pragma warning disable CS1591 + Enabled, + #pragma warning restore CS1591 + [EnumMember(Value = "disabled")] + #pragma warning disable CS1591 + Disabled, + #pragma warning restore CS1591 + [EnumMember(Value = "not_set")] + #pragma warning disable CS1591 + Not_set, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Orgs/Item/CodeSecurity/Configurations/Item/WithConfiguration_PatchRequestBody_secret_scanning_delegated_alert_dismissal.cs b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/CodeSecurity/Configurations/Item/WithConfiguration_PatchRequestBody_secret_scanning_delegated_alert_dismissal.cs new file mode 100644 index 0000000..5325ea2 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/CodeSecurity/Configurations/Item/WithConfiguration_PatchRequestBody_secret_scanning_delegated_alert_dismissal.cs @@ -0,0 +1,23 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Orgs.Item.CodeSecurity.Configurations.Item +{ + /// The enablement status of secret scanning delegated alert dismissal + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public enum WithConfiguration_PatchRequestBody_secret_scanning_delegated_alert_dismissal + { + [EnumMember(Value = "enabled")] + #pragma warning disable CS1591 + Enabled, + #pragma warning restore CS1591 + [EnumMember(Value = "disabled")] + #pragma warning disable CS1591 + Disabled, + #pragma warning restore CS1591 + [EnumMember(Value = "not_set")] + #pragma warning disable CS1591 + Not_set, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Orgs/Item/CodeSecurity/Configurations/Item/WithConfiguration_PatchRequestBody_secret_scanning_delegated_bypass.cs b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/CodeSecurity/Configurations/Item/WithConfiguration_PatchRequestBody_secret_scanning_delegated_bypass.cs new file mode 100644 index 0000000..af29e95 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/CodeSecurity/Configurations/Item/WithConfiguration_PatchRequestBody_secret_scanning_delegated_bypass.cs @@ -0,0 +1,23 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Orgs.Item.CodeSecurity.Configurations.Item +{ + /// The enablement status of secret scanning delegated bypass + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public enum WithConfiguration_PatchRequestBody_secret_scanning_delegated_bypass + { + [EnumMember(Value = "enabled")] + #pragma warning disable CS1591 + Enabled, + #pragma warning restore CS1591 + [EnumMember(Value = "disabled")] + #pragma warning disable CS1591 + Disabled, + #pragma warning restore CS1591 + [EnumMember(Value = "not_set")] + #pragma warning disable CS1591 + Not_set, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Orgs/Item/CodeSecurity/Configurations/Item/WithConfiguration_PatchRequestBody_secret_scanning_delegated_bypass_options.cs b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/CodeSecurity/Configurations/Item/WithConfiguration_PatchRequestBody_secret_scanning_delegated_bypass_options.cs new file mode 100644 index 0000000..c9e33df --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/CodeSecurity/Configurations/Item/WithConfiguration_PatchRequestBody_secret_scanning_delegated_bypass_options.cs @@ -0,0 +1,66 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Orgs.Item.CodeSecurity.Configurations.Item +{ + /// + /// Feature options for secret scanning delegated bypass + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithConfiguration_PatchRequestBody_secret_scanning_delegated_bypass_options : IAdditionalDataHolder, IParsable + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The bypass reviewers for secret scanning delegated bypass +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? Reviewers { get; set; } +#nullable restore +#else + public List Reviewers { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public WithConfiguration_PatchRequestBody_secret_scanning_delegated_bypass_options() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Orgs.Item.CodeSecurity.Configurations.Item.WithConfiguration_PatchRequestBody_secret_scanning_delegated_bypass_options CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Orgs.Item.CodeSecurity.Configurations.Item.WithConfiguration_PatchRequestBody_secret_scanning_delegated_bypass_options(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "reviewers", n => { Reviewers = n.GetCollectionOfObjectValues(global::Ayllu.Github.Client.Orgs.Item.CodeSecurity.Configurations.Item.WithConfiguration_PatchRequestBody_secret_scanning_delegated_bypass_options_reviewers.CreateFromDiscriminatorValue)?.AsList(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteCollectionOfObjectValues("reviewers", Reviewers); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Orgs/Item/CodeSecurity/Configurations/Item/WithConfiguration_PatchRequestBody_secret_scanning_delegated_bypass_options_reviewers.cs b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/CodeSecurity/Configurations/Item/WithConfiguration_PatchRequestBody_secret_scanning_delegated_bypass_options_reviewers.cs new file mode 100644 index 0000000..d1f27ac --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/CodeSecurity/Configurations/Item/WithConfiguration_PatchRequestBody_secret_scanning_delegated_bypass_options_reviewers.cs @@ -0,0 +1,63 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Orgs.Item.CodeSecurity.Configurations.Item +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class WithConfiguration_PatchRequestBody_secret_scanning_delegated_bypass_options_reviewers : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The ID of the team or role selected as a bypass reviewer + public int? ReviewerId { get; set; } + /// The type of the bypass reviewer + public global::Ayllu.Github.Client.Orgs.Item.CodeSecurity.Configurations.Item.WithConfiguration_PatchRequestBody_secret_scanning_delegated_bypass_options_reviewers_reviewer_type? ReviewerType { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public WithConfiguration_PatchRequestBody_secret_scanning_delegated_bypass_options_reviewers() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Orgs.Item.CodeSecurity.Configurations.Item.WithConfiguration_PatchRequestBody_secret_scanning_delegated_bypass_options_reviewers CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Orgs.Item.CodeSecurity.Configurations.Item.WithConfiguration_PatchRequestBody_secret_scanning_delegated_bypass_options_reviewers(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "reviewer_id", n => { ReviewerId = n.GetIntValue(); } }, + { "reviewer_type", n => { ReviewerType = n.GetEnumValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteIntValue("reviewer_id", ReviewerId); + writer.WriteEnumValue("reviewer_type", ReviewerType); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Orgs/Item/CodeSecurity/Configurations/Item/WithConfiguration_PatchRequestBody_secret_scanning_delegated_bypass_options_reviewers_reviewer_type.cs b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/CodeSecurity/Configurations/Item/WithConfiguration_PatchRequestBody_secret_scanning_delegated_bypass_options_reviewers_reviewer_type.cs new file mode 100644 index 0000000..a070e79 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/CodeSecurity/Configurations/Item/WithConfiguration_PatchRequestBody_secret_scanning_delegated_bypass_options_reviewers_reviewer_type.cs @@ -0,0 +1,19 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Orgs.Item.CodeSecurity.Configurations.Item +{ + /// The type of the bypass reviewer + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public enum WithConfiguration_PatchRequestBody_secret_scanning_delegated_bypass_options_reviewers_reviewer_type + { + [EnumMember(Value = "TEAM")] + #pragma warning disable CS1591 + TEAM, + #pragma warning restore CS1591 + [EnumMember(Value = "ROLE")] + #pragma warning disable CS1591 + ROLE, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Orgs/Item/CodeSecurity/Configurations/Item/WithConfiguration_PatchRequestBody_secret_scanning_generic_secrets.cs b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/CodeSecurity/Configurations/Item/WithConfiguration_PatchRequestBody_secret_scanning_generic_secrets.cs new file mode 100644 index 0000000..10e2b2d --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/CodeSecurity/Configurations/Item/WithConfiguration_PatchRequestBody_secret_scanning_generic_secrets.cs @@ -0,0 +1,23 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Orgs.Item.CodeSecurity.Configurations.Item +{ + /// The enablement status of Copilot secret scanning + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public enum WithConfiguration_PatchRequestBody_secret_scanning_generic_secrets + { + [EnumMember(Value = "enabled")] + #pragma warning disable CS1591 + Enabled, + #pragma warning restore CS1591 + [EnumMember(Value = "disabled")] + #pragma warning disable CS1591 + Disabled, + #pragma warning restore CS1591 + [EnumMember(Value = "not_set")] + #pragma warning disable CS1591 + Not_set, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Orgs/Item/CodeSecurity/Configurations/Item/WithConfiguration_PatchRequestBody_secret_scanning_non_provider_patterns.cs b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/CodeSecurity/Configurations/Item/WithConfiguration_PatchRequestBody_secret_scanning_non_provider_patterns.cs new file mode 100644 index 0000000..027ee57 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/CodeSecurity/Configurations/Item/WithConfiguration_PatchRequestBody_secret_scanning_non_provider_patterns.cs @@ -0,0 +1,23 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Orgs.Item.CodeSecurity.Configurations.Item +{ + /// The enablement status of secret scanning non-provider patterns + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public enum WithConfiguration_PatchRequestBody_secret_scanning_non_provider_patterns + { + [EnumMember(Value = "enabled")] + #pragma warning disable CS1591 + Enabled, + #pragma warning restore CS1591 + [EnumMember(Value = "disabled")] + #pragma warning disable CS1591 + Disabled, + #pragma warning restore CS1591 + [EnumMember(Value = "not_set")] + #pragma warning disable CS1591 + Not_set, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Orgs/Item/CodeSecurity/Configurations/Item/WithConfiguration_PatchRequestBody_secret_scanning_push_protection.cs b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/CodeSecurity/Configurations/Item/WithConfiguration_PatchRequestBody_secret_scanning_push_protection.cs new file mode 100644 index 0000000..9501ec9 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/CodeSecurity/Configurations/Item/WithConfiguration_PatchRequestBody_secret_scanning_push_protection.cs @@ -0,0 +1,23 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Orgs.Item.CodeSecurity.Configurations.Item +{ + /// The enablement status of secret scanning push protection + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public enum WithConfiguration_PatchRequestBody_secret_scanning_push_protection + { + [EnumMember(Value = "enabled")] + #pragma warning disable CS1591 + Enabled, + #pragma warning restore CS1591 + [EnumMember(Value = "disabled")] + #pragma warning disable CS1591 + Disabled, + #pragma warning restore CS1591 + [EnumMember(Value = "not_set")] + #pragma warning disable CS1591 + Not_set, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Orgs/Item/CodeSecurity/Configurations/Item/WithConfiguration_PatchRequestBody_secret_scanning_validity_checks.cs b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/CodeSecurity/Configurations/Item/WithConfiguration_PatchRequestBody_secret_scanning_validity_checks.cs new file mode 100644 index 0000000..4082cb7 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/CodeSecurity/Configurations/Item/WithConfiguration_PatchRequestBody_secret_scanning_validity_checks.cs @@ -0,0 +1,23 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Orgs.Item.CodeSecurity.Configurations.Item +{ + /// The enablement status of secret scanning validity checks + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public enum WithConfiguration_PatchRequestBody_secret_scanning_validity_checks + { + [EnumMember(Value = "enabled")] + #pragma warning disable CS1591 + Enabled, + #pragma warning restore CS1591 + [EnumMember(Value = "disabled")] + #pragma warning disable CS1591 + Disabled, + #pragma warning restore CS1591 + [EnumMember(Value = "not_set")] + #pragma warning disable CS1591 + Not_set, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Codespaces/Access/AccessPutRequestBody.cs b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Codespaces/Access/AccessPutRequestBody.cs new file mode 100644 index 0000000..1c73633 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Codespaces/Access/AccessPutRequestBody.cs @@ -0,0 +1,69 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Orgs.Item.Codespaces.Access +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class AccessPutRequestBody : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// 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. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? SelectedUsernames { get; set; } +#nullable restore +#else + public List SelectedUsernames { get; set; } +#endif + /// Which users can access codespaces in the organization. `disabled` means that no users can access codespaces in the organization. + public global::Ayllu.Github.Client.Orgs.Item.Codespaces.Access.AccessPutRequestBody_visibility? Visibility { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public AccessPutRequestBody() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Orgs.Item.Codespaces.Access.AccessPutRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Orgs.Item.Codespaces.Access.AccessPutRequestBody(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "selected_usernames", n => { SelectedUsernames = n.GetCollectionOfPrimitiveValues()?.AsList(); } }, + { "visibility", n => { Visibility = n.GetEnumValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteCollectionOfPrimitiveValues("selected_usernames", SelectedUsernames); + writer.WriteEnumValue("visibility", Visibility); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Codespaces/Access/AccessPutRequestBody_visibility.cs b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Codespaces/Access/AccessPutRequestBody_visibility.cs new file mode 100644 index 0000000..2af08e5 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Codespaces/Access/AccessPutRequestBody_visibility.cs @@ -0,0 +1,27 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Orgs.Item.Codespaces.Access +{ + /// Which users can access codespaces in the organization. `disabled` means that no users can access codespaces in the organization. + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public enum AccessPutRequestBody_visibility + { + [EnumMember(Value = "disabled")] + #pragma warning disable CS1591 + Disabled, + #pragma warning restore CS1591 + [EnumMember(Value = "selected_members")] + #pragma warning disable CS1591 + Selected_members, + #pragma warning restore CS1591 + [EnumMember(Value = "all_members")] + #pragma warning disable CS1591 + All_members, + #pragma warning restore CS1591 + [EnumMember(Value = "all_members_and_outside_collaborators")] + #pragma warning disable CS1591 + All_members_and_outside_collaborators, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Codespaces/Access/AccessRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Codespaces/Access/AccessRequestBuilder.cs new file mode 100644 index 0000000..f1279f3 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Codespaces/Access/AccessRequestBuilder.cs @@ -0,0 +1,116 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Ayllu.Github.Client.Orgs.Item.Codespaces.Access.Selected_users; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Orgs.Item.Codespaces.Access +{ + /// + /// Builds and executes requests for operations under \orgs\{org}\codespaces\access + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class AccessRequestBuilder : BaseRequestBuilder + { + /// The selected_users property + [Obsolete("")] + public global::Ayllu.Github.Client.Orgs.Item.Codespaces.Access.Selected_users.Selected_usersRequestBuilder Selected_users + { + get => new global::Ayllu.Github.Client.Orgs.Item.Codespaces.Access.Selected_users.Selected_usersRequestBuilder(PathParameters, RequestAdapter); + } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public AccessRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/orgs/{org}/codespaces/access", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public AccessRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/orgs/{org}/codespaces/access", rawUrl) + { + } + /// + /// 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. + /// API method documentation + /// + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 404 status code + /// When receiving a 422 status code + /// When receiving a 500 status code + [Obsolete("")] +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PutAsync(global::Ayllu.Github.Client.Orgs.Item.Codespaces.Access.AccessPutRequestBody body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task PutAsync(global::Ayllu.Github.Client.Orgs.Item.Codespaces.Access.AccessPutRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPutRequestInformation(body, requestConfiguration); + var errorMapping = new Dictionary> + { + { "404", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "422", global::Ayllu.Github.Client.Models.ValidationError.CreateFromDiscriminatorValue }, + { "500", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + }; + await RequestAdapter.SendNoContentAsync(requestInfo, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// 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. + /// + /// A + /// The request body + /// Configuration for the request such as headers, query parameters, and middleware options. + [Obsolete("")] +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPutRequestInformation(global::Ayllu.Github.Client.Orgs.Item.Codespaces.Access.AccessPutRequestBody body, Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToPutRequestInformation(global::Ayllu.Github.Client.Orgs.Item.Codespaces.Access.AccessPutRequestBody body, Action> requestConfiguration = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation(Method.PUT, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + [Obsolete("")] + public global::Ayllu.Github.Client.Orgs.Item.Codespaces.Access.AccessRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Orgs.Item.Codespaces.Access.AccessRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class AccessRequestBuilderPutRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Codespaces/Access/Selected_users/Selected_usersDeleteRequestBody.cs b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Codespaces/Access/Selected_users/Selected_usersDeleteRequestBody.cs new file mode 100644 index 0000000..8cde8ed --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Codespaces/Access/Selected_users/Selected_usersDeleteRequestBody.cs @@ -0,0 +1,65 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Orgs.Item.Codespaces.Access.Selected_users +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class Selected_usersDeleteRequestBody : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The usernames of the organization members whose codespaces should not be billed to the organization. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? SelectedUsernames { get; set; } +#nullable restore +#else + public List SelectedUsernames { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public Selected_usersDeleteRequestBody() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Orgs.Item.Codespaces.Access.Selected_users.Selected_usersDeleteRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Orgs.Item.Codespaces.Access.Selected_users.Selected_usersDeleteRequestBody(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "selected_usernames", n => { SelectedUsernames = n.GetCollectionOfPrimitiveValues()?.AsList(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteCollectionOfPrimitiveValues("selected_usernames", SelectedUsernames); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Codespaces/Access/Selected_users/Selected_usersPostRequestBody.cs b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Codespaces/Access/Selected_users/Selected_usersPostRequestBody.cs new file mode 100644 index 0000000..bcba050 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Codespaces/Access/Selected_users/Selected_usersPostRequestBody.cs @@ -0,0 +1,65 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Orgs.Item.Codespaces.Access.Selected_users +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class Selected_usersPostRequestBody : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The usernames of the organization members whose codespaces be billed to the organization. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? SelectedUsernames { get; set; } +#nullable restore +#else + public List SelectedUsernames { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public Selected_usersPostRequestBody() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Orgs.Item.Codespaces.Access.Selected_users.Selected_usersPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Orgs.Item.Codespaces.Access.Selected_users.Selected_usersPostRequestBody(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "selected_usernames", n => { SelectedUsernames = n.GetCollectionOfPrimitiveValues()?.AsList(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteCollectionOfPrimitiveValues("selected_usernames", SelectedUsernames); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Codespaces/Access/Selected_users/Selected_usersRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Codespaces/Access/Selected_users/Selected_usersRequestBuilder.cs new file mode 100644 index 0000000..d0f530f --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Codespaces/Access/Selected_users/Selected_usersRequestBuilder.cs @@ -0,0 +1,170 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Orgs.Item.Codespaces.Access.Selected_users +{ + /// + /// Builds and executes requests for operations under \orgs\{org}\codespaces\access\selected_users + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class Selected_usersRequestBuilder : BaseRequestBuilder + { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public Selected_usersRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/orgs/{org}/codespaces/access/selected_users", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public Selected_usersRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/orgs/{org}/codespaces/access/selected_users", rawUrl) + { + } + /// + /// 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/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. + /// API method documentation + /// + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 404 status code + /// When receiving a 422 status code + /// When receiving a 500 status code + [Obsolete("")] +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task DeleteAsync(global::Ayllu.Github.Client.Orgs.Item.Codespaces.Access.Selected_users.Selected_usersDeleteRequestBody body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task DeleteAsync(global::Ayllu.Github.Client.Orgs.Item.Codespaces.Access.Selected_users.Selected_usersDeleteRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = ToDeleteRequestInformation(body, requestConfiguration); + var errorMapping = new Dictionary> + { + { "404", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "422", global::Ayllu.Github.Client.Models.ValidationError.CreateFromDiscriminatorValue }, + { "500", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + }; + await RequestAdapter.SendNoContentAsync(requestInfo, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// 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/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. + /// API method documentation + /// + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 404 status code + /// When receiving a 422 status code + /// When receiving a 500 status code + [Obsolete("")] +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PostAsync(global::Ayllu.Github.Client.Orgs.Item.Codespaces.Access.Selected_users.Selected_usersPostRequestBody body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task PostAsync(global::Ayllu.Github.Client.Orgs.Item.Codespaces.Access.Selected_users.Selected_usersPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPostRequestInformation(body, requestConfiguration); + var errorMapping = new Dictionary> + { + { "404", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "422", global::Ayllu.Github.Client.Models.ValidationError.CreateFromDiscriminatorValue }, + { "500", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + }; + await RequestAdapter.SendNoContentAsync(requestInfo, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// 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/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. + /// + /// A + /// The request body + /// Configuration for the request such as headers, query parameters, and middleware options. + [Obsolete("")] +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToDeleteRequestInformation(global::Ayllu.Github.Client.Orgs.Item.Codespaces.Access.Selected_users.Selected_usersDeleteRequestBody body, Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToDeleteRequestInformation(global::Ayllu.Github.Client.Orgs.Item.Codespaces.Access.Selected_users.Selected_usersDeleteRequestBody body, Action> requestConfiguration = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation(Method.DELETE, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + return requestInfo; + } + /// + /// 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/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. + /// + /// A + /// The request body + /// Configuration for the request such as headers, query parameters, and middleware options. + [Obsolete("")] +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPostRequestInformation(global::Ayllu.Github.Client.Orgs.Item.Codespaces.Access.Selected_users.Selected_usersPostRequestBody body, Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToPostRequestInformation(global::Ayllu.Github.Client.Orgs.Item.Codespaces.Access.Selected_users.Selected_usersPostRequestBody body, Action> requestConfiguration = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + [Obsolete("")] + public global::Ayllu.Github.Client.Orgs.Item.Codespaces.Access.Selected_users.Selected_usersRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Orgs.Item.Codespaces.Access.Selected_users.Selected_usersRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class Selected_usersRequestBuilderDeleteRequestConfiguration : RequestConfiguration + { + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class Selected_usersRequestBuilderPostRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Codespaces/CodespacesGetResponse.cs b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Codespaces/CodespacesGetResponse.cs new file mode 100644 index 0000000..e848fb7 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Codespaces/CodespacesGetResponse.cs @@ -0,0 +1,70 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Orgs.Item.Codespaces +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class CodespacesGetResponse : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The codespaces property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? Codespaces { get; set; } +#nullable restore +#else + public List Codespaces { get; set; } +#endif + /// The total_count property + public int? TotalCount { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public CodespacesGetResponse() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Orgs.Item.Codespaces.CodespacesGetResponse CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Orgs.Item.Codespaces.CodespacesGetResponse(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "codespaces", n => { Codespaces = n.GetCollectionOfObjectValues(global::Ayllu.Github.Client.Models.Codespace.CreateFromDiscriminatorValue)?.AsList(); } }, + { "total_count", n => { TotalCount = n.GetIntValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteCollectionOfObjectValues("codespaces", Codespaces); + writer.WriteIntValue("total_count", TotalCount); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Codespaces/CodespacesRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Codespaces/CodespacesRequestBuilder.cs new file mode 100644 index 0000000..4c812e5 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Codespaces/CodespacesRequestBuilder.cs @@ -0,0 +1,160 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Ayllu.Github.Client.Orgs.Item.Codespaces.Access; +using Ayllu.Github.Client.Orgs.Item.Codespaces.Secrets; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Orgs.Item.Codespaces +{ + /// + /// Builds and executes requests for operations under \orgs\{org}\codespaces + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class CodespacesRequestBuilder : BaseRequestBuilder + { + /// The access property + public global::Ayllu.Github.Client.Orgs.Item.Codespaces.Access.AccessRequestBuilder Access + { + get => new global::Ayllu.Github.Client.Orgs.Item.Codespaces.Access.AccessRequestBuilder(PathParameters, RequestAdapter); + } + /// The secrets property + public global::Ayllu.Github.Client.Orgs.Item.Codespaces.Secrets.SecretsRequestBuilder Secrets + { + get => new global::Ayllu.Github.Client.Orgs.Item.Codespaces.Secrets.SecretsRequestBuilder(PathParameters, RequestAdapter); + } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public CodespacesRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/orgs/{org}/codespaces{?page*,per_page*}", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public CodespacesRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/orgs/{org}/codespaces{?page*,per_page*}", rawUrl) + { + } + /// + /// 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. + /// API method documentation + /// + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 401 status code + /// When receiving a 403 status code + /// When receiving a 404 status code + /// When receiving a 500 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsCodespacesGetResponseAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task GetAsCodespacesGetResponseAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "401", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "403", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "404", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "500", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Orgs.Item.Codespaces.CodespacesGetResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// 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. + /// API method documentation + /// + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 401 status code + /// When receiving a 403 status code + /// When receiving a 404 status code + /// When receiving a 500 status code + [Obsolete("This method is obsolete. Use GetAsCodespacesGetResponseAsync instead.")] +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "401", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "403", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "404", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "500", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Orgs.Item.Codespaces.CodespacesResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// 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. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.Orgs.Item.Codespaces.CodespacesRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Orgs.Item.Codespaces.CodespacesRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// 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. + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class CodespacesRequestBuilderGetQueryParameters + { + /// The page number of the results to fetch. For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." + [QueryParameter("page")] + public int? Page { get; set; } + /// The number of results per page (max 100). For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." + [QueryParameter("per_page")] + public int? PerPage { get; set; } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class CodespacesRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Codespaces/CodespacesResponse.cs b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Codespaces/CodespacesResponse.cs new file mode 100644 index 0000000..527d7c1 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Codespaces/CodespacesResponse.cs @@ -0,0 +1,28 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Orgs.Item.Codespaces +{ + [Obsolete("This class is obsolete. Use CodespacesGetResponse instead.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class CodespacesResponse : global::Ayllu.Github.Client.Orgs.Item.Codespaces.CodespacesGetResponse, IParsable + #pragma warning restore CS1591 + { + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static new global::Ayllu.Github.Client.Orgs.Item.Codespaces.CodespacesResponse CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Orgs.Item.Codespaces.CodespacesResponse(); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Codespaces/Secrets/Item/Repositories/Item/WithRepository_ItemRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Codespaces/Secrets/Item/Repositories/Item/WithRepository_ItemRequestBuilder.cs new file mode 100644 index 0000000..02ec060 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Codespaces/Secrets/Item/Repositories/Item/WithRepository_ItemRequestBuilder.cs @@ -0,0 +1,151 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Orgs.Item.Codespaces.Secrets.Item.Repositories.Item +{ + /// + /// Builds and executes requests for operations under \orgs\{org}\codespaces\secrets\{secret_name}\repositories\{repository_id} + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithRepository_ItemRequestBuilder : BaseRequestBuilder + { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public WithRepository_ItemRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/orgs/{org}/codespaces/secrets/{secret_name}/repositories/{repository_id}", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public WithRepository_ItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/orgs/{org}/codespaces/secrets/{secret_name}/repositories/{repository_id}", rawUrl) + { + } + /// + /// 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/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. + /// API method documentation + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 404 status code + /// When receiving a 422 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task DeleteAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task DeleteAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToDeleteRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "404", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "422", global::Ayllu.Github.Client.Models.ValidationError.CreateFromDiscriminatorValue }, + }; + await RequestAdapter.SendNoContentAsync(requestInfo, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// 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/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. + /// API method documentation + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 404 status code + /// When receiving a 422 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PutAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task PutAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToPutRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "404", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "422", global::Ayllu.Github.Client.Models.ValidationError.CreateFromDiscriminatorValue }, + }; + await RequestAdapter.SendNoContentAsync(requestInfo, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// 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/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. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToDeleteRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToDeleteRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.DELETE, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// 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/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. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPutRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToPutRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.PUT, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.Orgs.Item.Codespaces.Secrets.Item.Repositories.Item.WithRepository_ItemRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Orgs.Item.Codespaces.Secrets.Item.Repositories.Item.WithRepository_ItemRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithRepository_ItemRequestBuilderDeleteRequestConfiguration : RequestConfiguration + { + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithRepository_ItemRequestBuilderPutRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Codespaces/Secrets/Item/Repositories/RepositoriesGetResponse.cs b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Codespaces/Secrets/Item/Repositories/RepositoriesGetResponse.cs new file mode 100644 index 0000000..2ef753d --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Codespaces/Secrets/Item/Repositories/RepositoriesGetResponse.cs @@ -0,0 +1,70 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Orgs.Item.Codespaces.Secrets.Item.Repositories +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class RepositoriesGetResponse : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The repositories property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? Repositories { get; set; } +#nullable restore +#else + public List Repositories { get; set; } +#endif + /// The total_count property + public int? TotalCount { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public RepositoriesGetResponse() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Orgs.Item.Codespaces.Secrets.Item.Repositories.RepositoriesGetResponse CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Orgs.Item.Codespaces.Secrets.Item.Repositories.RepositoriesGetResponse(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "repositories", n => { Repositories = n.GetCollectionOfObjectValues(global::Ayllu.Github.Client.Models.MinimalRepository.CreateFromDiscriminatorValue)?.AsList(); } }, + { "total_count", n => { TotalCount = n.GetIntValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteCollectionOfObjectValues("repositories", Repositories); + writer.WriteIntValue("total_count", TotalCount); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Codespaces/Secrets/Item/Repositories/RepositoriesPutRequestBody.cs b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Codespaces/Secrets/Item/Repositories/RepositoriesPutRequestBody.cs new file mode 100644 index 0000000..f2c067c --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Codespaces/Secrets/Item/Repositories/RepositoriesPutRequestBody.cs @@ -0,0 +1,65 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Orgs.Item.Codespaces.Secrets.Item.Repositories +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class RepositoriesPutRequestBody : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// 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/rest/codespaces/organization-secrets#set-selected-repositories-for-an-organization-secret) and [Remove selected repository from an organization secret](https://docs.github.com/rest/codespaces/organization-secrets#remove-selected-repository-from-an-organization-secret) endpoints. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? SelectedRepositoryIds { get; set; } +#nullable restore +#else + public List SelectedRepositoryIds { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public RepositoriesPutRequestBody() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Orgs.Item.Codespaces.Secrets.Item.Repositories.RepositoriesPutRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Orgs.Item.Codespaces.Secrets.Item.Repositories.RepositoriesPutRequestBody(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "selected_repository_ids", n => { SelectedRepositoryIds = n.GetCollectionOfPrimitiveValues()?.AsList(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteCollectionOfPrimitiveValues("selected_repository_ids", SelectedRepositoryIds); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Codespaces/Secrets/Item/Repositories/RepositoriesRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Codespaces/Secrets/Item/Repositories/RepositoriesRequestBuilder.cs new file mode 100644 index 0000000..6f58c8d --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Codespaces/Secrets/Item/Repositories/RepositoriesRequestBuilder.cs @@ -0,0 +1,217 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Ayllu.Github.Client.Orgs.Item.Codespaces.Secrets.Item.Repositories.Item; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Orgs.Item.Codespaces.Secrets.Item.Repositories +{ + /// + /// Builds and executes requests for operations under \orgs\{org}\codespaces\secrets\{secret_name}\repositories + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class RepositoriesRequestBuilder : BaseRequestBuilder + { + /// Gets an item from the Ayllu.Github.Client.orgs.item.codespaces.secrets.item.repositories.item collection + /// Unique identifier of the item + /// A + public global::Ayllu.Github.Client.Orgs.Item.Codespaces.Secrets.Item.Repositories.Item.WithRepository_ItemRequestBuilder this[int position] + { + get + { + var urlTplParams = new Dictionary(PathParameters); + urlTplParams.Add("repository_id", position); + return new global::Ayllu.Github.Client.Orgs.Item.Codespaces.Secrets.Item.Repositories.Item.WithRepository_ItemRequestBuilder(urlTplParams, RequestAdapter); + } + } + /// Gets an item from the Ayllu.Github.Client.orgs.item.codespaces.secrets.item.repositories.item collection + /// Unique identifier of the item + /// A + [Obsolete("This indexer is deprecated and will be removed in the next major version. Use the one with the typed parameter instead.")] + public global::Ayllu.Github.Client.Orgs.Item.Codespaces.Secrets.Item.Repositories.Item.WithRepository_ItemRequestBuilder this[string position] + { + get + { + var urlTplParams = new Dictionary(PathParameters); + if (!string.IsNullOrWhiteSpace(position)) urlTplParams.Add("repository_id", position); + return new global::Ayllu.Github.Client.Orgs.Item.Codespaces.Secrets.Item.Repositories.Item.WithRepository_ItemRequestBuilder(urlTplParams, RequestAdapter); + } + } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public RepositoriesRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/orgs/{org}/codespaces/secrets/{secret_name}/repositories{?page*,per_page*}", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public RepositoriesRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/orgs/{org}/codespaces/secrets/{secret_name}/repositories{?page*,per_page*}", rawUrl) + { + } + /// + /// 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. + /// API method documentation + /// + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 404 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsRepositoriesGetResponseAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task GetAsRepositoriesGetResponseAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "404", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Orgs.Item.Codespaces.Secrets.Item.Repositories.RepositoriesGetResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// 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. + /// API method documentation + /// + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 404 status code + [Obsolete("This method is obsolete. Use GetAsRepositoriesGetResponseAsync instead.")] +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "404", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Orgs.Item.Codespaces.Secrets.Item.Repositories.RepositoriesResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// 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/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. + /// API method documentation + /// + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 404 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PutAsync(global::Ayllu.Github.Client.Orgs.Item.Codespaces.Secrets.Item.Repositories.RepositoriesPutRequestBody body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task PutAsync(global::Ayllu.Github.Client.Orgs.Item.Codespaces.Secrets.Item.Repositories.RepositoriesPutRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPutRequestInformation(body, requestConfiguration); + var errorMapping = new Dictionary> + { + { "404", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + }; + await RequestAdapter.SendNoContentAsync(requestInfo, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// 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. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// 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/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. + /// + /// A + /// The request body + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPutRequestInformation(global::Ayllu.Github.Client.Orgs.Item.Codespaces.Secrets.Item.Repositories.RepositoriesPutRequestBody body, Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToPutRequestInformation(global::Ayllu.Github.Client.Orgs.Item.Codespaces.Secrets.Item.Repositories.RepositoriesPutRequestBody body, Action> requestConfiguration = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation(Method.PUT, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.Orgs.Item.Codespaces.Secrets.Item.Repositories.RepositoriesRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Orgs.Item.Codespaces.Secrets.Item.Repositories.RepositoriesRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// 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. + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class RepositoriesRequestBuilderGetQueryParameters + { + /// The page number of the results to fetch. For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." + [QueryParameter("page")] + public int? Page { get; set; } + /// The number of results per page (max 100). For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." + [QueryParameter("per_page")] + public int? PerPage { get; set; } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class RepositoriesRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class RepositoriesRequestBuilderPutRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Codespaces/Secrets/Item/Repositories/RepositoriesResponse.cs b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Codespaces/Secrets/Item/Repositories/RepositoriesResponse.cs new file mode 100644 index 0000000..75206aa --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Codespaces/Secrets/Item/Repositories/RepositoriesResponse.cs @@ -0,0 +1,28 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Orgs.Item.Codespaces.Secrets.Item.Repositories +{ + [Obsolete("This class is obsolete. Use RepositoriesGetResponse instead.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class RepositoriesResponse : global::Ayllu.Github.Client.Orgs.Item.Codespaces.Secrets.Item.Repositories.RepositoriesGetResponse, IParsable + #pragma warning restore CS1591 + { + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static new global::Ayllu.Github.Client.Orgs.Item.Codespaces.Secrets.Item.Repositories.RepositoriesResponse CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Orgs.Item.Codespaces.Secrets.Item.Repositories.RepositoriesResponse(); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Codespaces/Secrets/Item/WithSecret_nameItemRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Codespaces/Secrets/Item/WithSecret_nameItemRequestBuilder.cs new file mode 100644 index 0000000..adaf937 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Codespaces/Secrets/Item/WithSecret_nameItemRequestBuilder.cs @@ -0,0 +1,207 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Ayllu.Github.Client.Orgs.Item.Codespaces.Secrets.Item.Repositories; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Orgs.Item.Codespaces.Secrets.Item +{ + /// + /// Builds and executes requests for operations under \orgs\{org}\codespaces\secrets\{secret_name} + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithSecret_nameItemRequestBuilder : BaseRequestBuilder + { + /// The repositories property + public global::Ayllu.Github.Client.Orgs.Item.Codespaces.Secrets.Item.Repositories.RepositoriesRequestBuilder Repositories + { + get => new global::Ayllu.Github.Client.Orgs.Item.Codespaces.Secrets.Item.Repositories.RepositoriesRequestBuilder(PathParameters, RequestAdapter); + } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public WithSecret_nameItemRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/orgs/{org}/codespaces/secrets/{secret_name}", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public WithSecret_nameItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/orgs/{org}/codespaces/secrets/{secret_name}", rawUrl) + { + } + /// + /// 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. + /// API method documentation + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 404 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task DeleteAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task DeleteAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToDeleteRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "404", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + }; + await RequestAdapter.SendNoContentAsync(requestInfo, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// 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. + /// API method documentation + /// + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Models.CodespacesOrgSecret.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false); + } + /// + /// 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/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. + /// API method documentation + /// + /// A + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 404 status code + /// When receiving a 422 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PutAsync(global::Ayllu.Github.Client.Orgs.Item.Codespaces.Secrets.Item.WithSecret_namePutRequestBody body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task PutAsync(global::Ayllu.Github.Client.Orgs.Item.Codespaces.Secrets.Item.WithSecret_namePutRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPutRequestInformation(body, requestConfiguration); + var errorMapping = new Dictionary> + { + { "404", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "422", global::Ayllu.Github.Client.Models.ValidationError.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Models.EmptyObject.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// 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. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToDeleteRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToDeleteRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.DELETE, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// 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. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// 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/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. + /// + /// A + /// The request body + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPutRequestInformation(global::Ayllu.Github.Client.Orgs.Item.Codespaces.Secrets.Item.WithSecret_namePutRequestBody body, Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToPutRequestInformation(global::Ayllu.Github.Client.Orgs.Item.Codespaces.Secrets.Item.WithSecret_namePutRequestBody body, Action> requestConfiguration = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation(Method.PUT, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.Orgs.Item.Codespaces.Secrets.Item.WithSecret_nameItemRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Orgs.Item.Codespaces.Secrets.Item.WithSecret_nameItemRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithSecret_nameItemRequestBuilderDeleteRequestConfiguration : RequestConfiguration + { + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithSecret_nameItemRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithSecret_nameItemRequestBuilderPutRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Codespaces/Secrets/Item/WithSecret_namePutRequestBody.cs b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Codespaces/Secrets/Item/WithSecret_namePutRequestBody.cs new file mode 100644 index 0000000..fc2b95c --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Codespaces/Secrets/Item/WithSecret_namePutRequestBody.cs @@ -0,0 +1,89 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Orgs.Item.Codespaces.Secrets.Item +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class WithSecret_namePutRequestBody : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// 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/rest/codespaces/organization-secrets#get-an-organization-public-key) endpoint. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? EncryptedValue { get; set; } +#nullable restore +#else + public string EncryptedValue { get; set; } +#endif + /// The ID of the key you used to encrypt the secret. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? KeyId { get; set; } +#nullable restore +#else + public string KeyId { get; set; } +#endif + /// 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/rest/codespaces/organization-secrets#list-selected-repositories-for-an-organization-secret), [Set selected repositories for an organization secret](https://docs.github.com/rest/codespaces/organization-secrets#set-selected-repositories-for-an-organization-secret), and [Remove selected repository from an organization secret](https://docs.github.com/rest/codespaces/organization-secrets#remove-selected-repository-from-an-organization-secret) endpoints. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? SelectedRepositoryIds { get; set; } +#nullable restore +#else + public List SelectedRepositoryIds { get; set; } +#endif + /// 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. + public global::Ayllu.Github.Client.Orgs.Item.Codespaces.Secrets.Item.WithSecret_namePutRequestBody_visibility? Visibility { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public WithSecret_namePutRequestBody() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Orgs.Item.Codespaces.Secrets.Item.WithSecret_namePutRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Orgs.Item.Codespaces.Secrets.Item.WithSecret_namePutRequestBody(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "encrypted_value", n => { EncryptedValue = n.GetStringValue(); } }, + { "key_id", n => { KeyId = n.GetStringValue(); } }, + { "selected_repository_ids", n => { SelectedRepositoryIds = n.GetCollectionOfPrimitiveValues()?.AsList(); } }, + { "visibility", n => { Visibility = n.GetEnumValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("encrypted_value", EncryptedValue); + writer.WriteStringValue("key_id", KeyId); + writer.WriteCollectionOfPrimitiveValues("selected_repository_ids", SelectedRepositoryIds); + writer.WriteEnumValue("visibility", Visibility); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Codespaces/Secrets/Item/WithSecret_namePutRequestBody_visibility.cs b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Codespaces/Secrets/Item/WithSecret_namePutRequestBody_visibility.cs new file mode 100644 index 0000000..bc15d7d --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Codespaces/Secrets/Item/WithSecret_namePutRequestBody_visibility.cs @@ -0,0 +1,23 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Orgs.Item.Codespaces.Secrets.Item +{ + /// 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. + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public enum WithSecret_namePutRequestBody_visibility + { + [EnumMember(Value = "all")] + #pragma warning disable CS1591 + All, + #pragma warning restore CS1591 + [EnumMember(Value = "private")] + #pragma warning disable CS1591 + Private, + #pragma warning restore CS1591 + [EnumMember(Value = "selected")] + #pragma warning disable CS1591 + Selected, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Codespaces/Secrets/PublicKey/PublicKeyRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Codespaces/Secrets/PublicKey/PublicKeyRequestBuilder.cs new file mode 100644 index 0000000..27adebb --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Codespaces/Secrets/PublicKey/PublicKeyRequestBuilder.cs @@ -0,0 +1,93 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Orgs.Item.Codespaces.Secrets.PublicKey +{ + /// + /// Builds and executes requests for operations under \orgs\{org}\codespaces\secrets\public-key + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class PublicKeyRequestBuilder : BaseRequestBuilder + { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public PublicKeyRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/orgs/{org}/codespaces/secrets/public-key", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public PublicKeyRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/orgs/{org}/codespaces/secrets/public-key", rawUrl) + { + } + /// + /// 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. + /// API method documentation + /// + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Models.CodespacesPublicKey.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false); + } + /// + /// 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. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.Orgs.Item.Codespaces.Secrets.PublicKey.PublicKeyRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Orgs.Item.Codespaces.Secrets.PublicKey.PublicKeyRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class PublicKeyRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Codespaces/Secrets/SecretsGetResponse.cs b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Codespaces/Secrets/SecretsGetResponse.cs new file mode 100644 index 0000000..b11781a --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Codespaces/Secrets/SecretsGetResponse.cs @@ -0,0 +1,70 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Orgs.Item.Codespaces.Secrets +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class SecretsGetResponse : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The secrets property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? Secrets { get; set; } +#nullable restore +#else + public List Secrets { get; set; } +#endif + /// The total_count property + public int? TotalCount { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public SecretsGetResponse() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Orgs.Item.Codespaces.Secrets.SecretsGetResponse CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Orgs.Item.Codespaces.Secrets.SecretsGetResponse(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "secrets", n => { Secrets = n.GetCollectionOfObjectValues(global::Ayllu.Github.Client.Models.CodespacesOrgSecret.CreateFromDiscriminatorValue)?.AsList(); } }, + { "total_count", n => { TotalCount = n.GetIntValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteCollectionOfObjectValues("secrets", Secrets); + writer.WriteIntValue("total_count", TotalCount); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Codespaces/Secrets/SecretsRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Codespaces/Secrets/SecretsRequestBuilder.cs new file mode 100644 index 0000000..3ae8568 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Codespaces/Secrets/SecretsRequestBuilder.cs @@ -0,0 +1,144 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Orgs.Item.Codespaces.Secrets.Item; +using Ayllu.Github.Client.Orgs.Item.Codespaces.Secrets.PublicKey; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Orgs.Item.Codespaces.Secrets +{ + /// + /// Builds and executes requests for operations under \orgs\{org}\codespaces\secrets + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class SecretsRequestBuilder : BaseRequestBuilder + { + /// The publicKey property + public global::Ayllu.Github.Client.Orgs.Item.Codespaces.Secrets.PublicKey.PublicKeyRequestBuilder PublicKey + { + get => new global::Ayllu.Github.Client.Orgs.Item.Codespaces.Secrets.PublicKey.PublicKeyRequestBuilder(PathParameters, RequestAdapter); + } + /// Gets an item from the Ayllu.Github.Client.orgs.item.codespaces.secrets.item collection + /// The name of the secret. + /// A + public global::Ayllu.Github.Client.Orgs.Item.Codespaces.Secrets.Item.WithSecret_nameItemRequestBuilder this[string position] + { + get + { + var urlTplParams = new Dictionary(PathParameters); + urlTplParams.Add("secret_name", position); + return new global::Ayllu.Github.Client.Orgs.Item.Codespaces.Secrets.Item.WithSecret_nameItemRequestBuilder(urlTplParams, RequestAdapter); + } + } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public SecretsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/orgs/{org}/codespaces/secrets{?page*,per_page*}", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public SecretsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/orgs/{org}/codespaces/secrets{?page*,per_page*}", rawUrl) + { + } + /// + /// 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. + /// API method documentation + /// + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsSecretsGetResponseAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task GetAsSecretsGetResponseAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Orgs.Item.Codespaces.Secrets.SecretsGetResponse.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false); + } + /// + /// 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. + /// API method documentation + /// + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + [Obsolete("This method is obsolete. Use GetAsSecretsGetResponseAsync instead.")] +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Orgs.Item.Codespaces.Secrets.SecretsResponse.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false); + } + /// + /// 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. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.Orgs.Item.Codespaces.Secrets.SecretsRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Orgs.Item.Codespaces.Secrets.SecretsRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// 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. + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class SecretsRequestBuilderGetQueryParameters + { + /// The page number of the results to fetch. For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." + [QueryParameter("page")] + public int? Page { get; set; } + /// The number of results per page (max 100). For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." + [QueryParameter("per_page")] + public int? PerPage { get; set; } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class SecretsRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Codespaces/Secrets/SecretsResponse.cs b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Codespaces/Secrets/SecretsResponse.cs new file mode 100644 index 0000000..8288f21 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Codespaces/Secrets/SecretsResponse.cs @@ -0,0 +1,28 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Orgs.Item.Codespaces.Secrets +{ + [Obsolete("This class is obsolete. Use SecretsGetResponse instead.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class SecretsResponse : global::Ayllu.Github.Client.Orgs.Item.Codespaces.Secrets.SecretsGetResponse, IParsable + #pragma warning restore CS1591 + { + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static new global::Ayllu.Github.Client.Orgs.Item.Codespaces.Secrets.SecretsResponse CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Orgs.Item.Codespaces.Secrets.SecretsResponse(); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Copilot/Billing/BillingRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Copilot/Billing/BillingRequestBuilder.cs new file mode 100644 index 0000000..4d5f8a6 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Copilot/Billing/BillingRequestBuilder.cs @@ -0,0 +1,122 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Ayllu.Github.Client.Orgs.Item.Copilot.Billing.Seats; +using Ayllu.Github.Client.Orgs.Item.Copilot.Billing.Selected_teams; +using Ayllu.Github.Client.Orgs.Item.Copilot.Billing.Selected_users; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Orgs.Item.Copilot.Billing +{ + /// + /// Builds and executes requests for operations under \orgs\{org}\copilot\billing + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class BillingRequestBuilder : BaseRequestBuilder + { + /// The seats property + public global::Ayllu.Github.Client.Orgs.Item.Copilot.Billing.Seats.SeatsRequestBuilder Seats + { + get => new global::Ayllu.Github.Client.Orgs.Item.Copilot.Billing.Seats.SeatsRequestBuilder(PathParameters, RequestAdapter); + } + /// The selected_teams property + public global::Ayllu.Github.Client.Orgs.Item.Copilot.Billing.Selected_teams.Selected_teamsRequestBuilder Selected_teams + { + get => new global::Ayllu.Github.Client.Orgs.Item.Copilot.Billing.Selected_teams.Selected_teamsRequestBuilder(PathParameters, RequestAdapter); + } + /// The selected_users property + public global::Ayllu.Github.Client.Orgs.Item.Copilot.Billing.Selected_users.Selected_usersRequestBuilder Selected_users + { + get => new global::Ayllu.Github.Client.Orgs.Item.Copilot.Billing.Selected_users.Selected_usersRequestBuilder(PathParameters, RequestAdapter); + } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public BillingRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/orgs/{org}/copilot/billing", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public BillingRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/orgs/{org}/copilot/billing", rawUrl) + { + } + /// + /// > [!NOTE]> This endpoint is in public preview 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/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. + /// API method documentation + /// + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 401 status code + /// When receiving a 403 status code + /// When receiving a 404 status code + /// When receiving a 500 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "401", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "403", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "404", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "500", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Models.CopilotOrganizationDetails.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// > [!NOTE]> This endpoint is in public preview 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/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. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.Orgs.Item.Copilot.Billing.BillingRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Orgs.Item.Copilot.Billing.BillingRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class BillingRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Copilot/Billing/Seats/SeatsGetResponse.cs b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Copilot/Billing/Seats/SeatsGetResponse.cs new file mode 100644 index 0000000..7f7e1d9 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Copilot/Billing/Seats/SeatsGetResponse.cs @@ -0,0 +1,70 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Orgs.Item.Copilot.Billing.Seats +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class SeatsGetResponse : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The seats property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? Seats { get; set; } +#nullable restore +#else + public List Seats { get; set; } +#endif + /// Total number of Copilot seats for the organization currently being billed. + public int? TotalSeats { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public SeatsGetResponse() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Orgs.Item.Copilot.Billing.Seats.SeatsGetResponse CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Orgs.Item.Copilot.Billing.Seats.SeatsGetResponse(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "seats", n => { Seats = n.GetCollectionOfObjectValues(global::Ayllu.Github.Client.Models.CopilotSeatDetails.CreateFromDiscriminatorValue)?.AsList(); } }, + { "total_seats", n => { TotalSeats = n.GetIntValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteCollectionOfObjectValues("seats", Seats); + writer.WriteIntValue("total_seats", TotalSeats); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Copilot/Billing/Seats/SeatsRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Copilot/Billing/Seats/SeatsRequestBuilder.cs new file mode 100644 index 0000000..b4c6e6e --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Copilot/Billing/Seats/SeatsRequestBuilder.cs @@ -0,0 +1,148 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Orgs.Item.Copilot.Billing.Seats +{ + /// + /// Builds and executes requests for operations under \orgs\{org}\copilot\billing\seats + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class SeatsRequestBuilder : BaseRequestBuilder + { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public SeatsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/orgs/{org}/copilot/billing/seats{?page*,per_page*}", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public SeatsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/orgs/{org}/copilot/billing/seats{?page*,per_page*}", rawUrl) + { + } + /// + /// > [!NOTE]> This endpoint is in public preview and is subject to change.Lists all Copilot seats for which an organization with a Copilot Business or Copilot Enterprise subscription is currently being billed.Only organization owners can view assigned seats.Each seat object contains information about the assigned user's most recent Copilot activity. Users must have telemetry enabled in their IDE for Copilot in the IDE activity to be reflected in `last_activity_at`.For more information about activity data, see [Metrics data properties for GitHub Copilot](https://docs.github.com/copilot/reference/metrics-data).OAuth app tokens and personal access tokens (classic) need either the `manage_billing:copilot` or `read:org` scopes to use this endpoint. + /// API method documentation + /// + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 401 status code + /// When receiving a 403 status code + /// When receiving a 404 status code + /// When receiving a 500 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsSeatsGetResponseAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task GetAsSeatsGetResponseAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "401", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "403", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "404", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "500", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Orgs.Item.Copilot.Billing.Seats.SeatsGetResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// > [!NOTE]> This endpoint is in public preview and is subject to change.Lists all Copilot seats for which an organization with a Copilot Business or Copilot Enterprise subscription is currently being billed.Only organization owners can view assigned seats.Each seat object contains information about the assigned user's most recent Copilot activity. Users must have telemetry enabled in their IDE for Copilot in the IDE activity to be reflected in `last_activity_at`.For more information about activity data, see [Metrics data properties for GitHub Copilot](https://docs.github.com/copilot/reference/metrics-data).OAuth app tokens and personal access tokens (classic) need either the `manage_billing:copilot` or `read:org` scopes to use this endpoint. + /// API method documentation + /// + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 401 status code + /// When receiving a 403 status code + /// When receiving a 404 status code + /// When receiving a 500 status code + [Obsolete("This method is obsolete. Use GetAsSeatsGetResponseAsync instead.")] +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "401", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "403", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "404", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "500", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Orgs.Item.Copilot.Billing.Seats.SeatsResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// > [!NOTE]> This endpoint is in public preview and is subject to change.Lists all Copilot seats for which an organization with a Copilot Business or Copilot Enterprise subscription is currently being billed.Only organization owners can view assigned seats.Each seat object contains information about the assigned user's most recent Copilot activity. Users must have telemetry enabled in their IDE for Copilot in the IDE activity to be reflected in `last_activity_at`.For more information about activity data, see [Metrics data properties for GitHub Copilot](https://docs.github.com/copilot/reference/metrics-data).OAuth app tokens and personal access tokens (classic) need either the `manage_billing:copilot` or `read:org` scopes to use this endpoint. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.Orgs.Item.Copilot.Billing.Seats.SeatsRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Orgs.Item.Copilot.Billing.Seats.SeatsRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// > [!NOTE]> This endpoint is in public preview and is subject to change.Lists all Copilot seats for which an organization with a Copilot Business or Copilot Enterprise subscription is currently being billed.Only organization owners can view assigned seats.Each seat object contains information about the assigned user's most recent Copilot activity. Users must have telemetry enabled in their IDE for Copilot in the IDE activity to be reflected in `last_activity_at`.For more information about activity data, see [Metrics data properties for GitHub Copilot](https://docs.github.com/copilot/reference/metrics-data).OAuth app tokens and personal access tokens (classic) need either the `manage_billing:copilot` or `read:org` scopes to use this endpoint. + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class SeatsRequestBuilderGetQueryParameters + { + /// The page number of the results to fetch. For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." + [QueryParameter("page")] + public int? Page { get; set; } + /// The number of results per page (max 100). For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." + [QueryParameter("per_page")] + public int? PerPage { get; set; } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class SeatsRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Copilot/Billing/Seats/SeatsResponse.cs b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Copilot/Billing/Seats/SeatsResponse.cs new file mode 100644 index 0000000..20cd852 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Copilot/Billing/Seats/SeatsResponse.cs @@ -0,0 +1,28 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Orgs.Item.Copilot.Billing.Seats +{ + [Obsolete("This class is obsolete. Use SeatsGetResponse instead.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class SeatsResponse : global::Ayllu.Github.Client.Orgs.Item.Copilot.Billing.Seats.SeatsGetResponse, IParsable + #pragma warning restore CS1591 + { + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static new global::Ayllu.Github.Client.Orgs.Item.Copilot.Billing.Seats.SeatsResponse CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Orgs.Item.Copilot.Billing.Seats.SeatsResponse(); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Copilot/Billing/Selected_teams/Selected_teamsDeleteRequestBody.cs b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Copilot/Billing/Selected_teams/Selected_teamsDeleteRequestBody.cs new file mode 100644 index 0000000..3ff9ab9 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Copilot/Billing/Selected_teams/Selected_teamsDeleteRequestBody.cs @@ -0,0 +1,65 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Orgs.Item.Copilot.Billing.Selected_teams +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class Selected_teamsDeleteRequestBody : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The names of teams from which to revoke access to GitHub Copilot. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? SelectedTeams { get; set; } +#nullable restore +#else + public List SelectedTeams { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public Selected_teamsDeleteRequestBody() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Orgs.Item.Copilot.Billing.Selected_teams.Selected_teamsDeleteRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Orgs.Item.Copilot.Billing.Selected_teams.Selected_teamsDeleteRequestBody(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "selected_teams", n => { SelectedTeams = n.GetCollectionOfPrimitiveValues()?.AsList(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteCollectionOfPrimitiveValues("selected_teams", SelectedTeams); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Copilot/Billing/Selected_teams/Selected_teamsDeleteResponse.cs b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Copilot/Billing/Selected_teams/Selected_teamsDeleteResponse.cs new file mode 100644 index 0000000..b15219f --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Copilot/Billing/Selected_teams/Selected_teamsDeleteResponse.cs @@ -0,0 +1,60 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Orgs.Item.Copilot.Billing.Selected_teams +{ + /// + /// The total number of seats set to "pending cancellation" for members of the specified team(s). + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class Selected_teamsDeleteResponse : IAdditionalDataHolder, IParsable + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The seats_cancelled property + public int? SeatsCancelled { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public Selected_teamsDeleteResponse() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Orgs.Item.Copilot.Billing.Selected_teams.Selected_teamsDeleteResponse CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Orgs.Item.Copilot.Billing.Selected_teams.Selected_teamsDeleteResponse(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "seats_cancelled", n => { SeatsCancelled = n.GetIntValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteIntValue("seats_cancelled", SeatsCancelled); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Copilot/Billing/Selected_teams/Selected_teamsPostRequestBody.cs b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Copilot/Billing/Selected_teams/Selected_teamsPostRequestBody.cs new file mode 100644 index 0000000..2914410 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Copilot/Billing/Selected_teams/Selected_teamsPostRequestBody.cs @@ -0,0 +1,65 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Orgs.Item.Copilot.Billing.Selected_teams +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class Selected_teamsPostRequestBody : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// List of team names within the organization to which to grant access to GitHub Copilot. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? SelectedTeams { get; set; } +#nullable restore +#else + public List SelectedTeams { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public Selected_teamsPostRequestBody() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Orgs.Item.Copilot.Billing.Selected_teams.Selected_teamsPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Orgs.Item.Copilot.Billing.Selected_teams.Selected_teamsPostRequestBody(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "selected_teams", n => { SelectedTeams = n.GetCollectionOfPrimitiveValues()?.AsList(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteCollectionOfPrimitiveValues("selected_teams", SelectedTeams); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Copilot/Billing/Selected_teams/Selected_teamsPostResponse.cs b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Copilot/Billing/Selected_teams/Selected_teamsPostResponse.cs new file mode 100644 index 0000000..7ec1839 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Copilot/Billing/Selected_teams/Selected_teamsPostResponse.cs @@ -0,0 +1,60 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Orgs.Item.Copilot.Billing.Selected_teams +{ + /// + /// The total number of seats created for members of the specified team(s). + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class Selected_teamsPostResponse : IAdditionalDataHolder, IParsable + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The seats_created property + public int? SeatsCreated { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public Selected_teamsPostResponse() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Orgs.Item.Copilot.Billing.Selected_teams.Selected_teamsPostResponse CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Orgs.Item.Copilot.Billing.Selected_teams.Selected_teamsPostResponse(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "seats_created", n => { SeatsCreated = n.GetIntValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteIntValue("seats_created", SeatsCreated); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Copilot/Billing/Selected_teams/Selected_teamsRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Copilot/Billing/Selected_teams/Selected_teamsRequestBuilder.cs new file mode 100644 index 0000000..7e5229c --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Copilot/Billing/Selected_teams/Selected_teamsRequestBuilder.cs @@ -0,0 +1,237 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Orgs.Item.Copilot.Billing.Selected_teams +{ + /// + /// Builds and executes requests for operations under \orgs\{org}\copilot\billing\selected_teams + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class Selected_teamsRequestBuilder : BaseRequestBuilder + { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public Selected_teamsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/orgs/{org}/copilot/billing/selected_teams", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public Selected_teamsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/orgs/{org}/copilot/billing/selected_teams", rawUrl) + { + } + /// + /// > [!NOTE]> This endpoint is in public preview and is subject to change.Sets seats for all members of each team specified to "pending cancellation".This will cause the members of the specified team(s) to lose access to GitHub Copilot at the end of the current billing cycle unless they retain access through another team.For more information about disabling access to Copilot, see "[Revoking access to Copilot for members of your organization](https://docs.github.com/copilot/managing-copilot/managing-github-copilot-in-your-organization/managing-access-to-github-copilot-in-your-organization/revoking-access-to-copilot-for-members-of-your-organization)."Only organization owners can cancel Copilot seats for their organization members.The response contains the total number of seats set to "pending cancellation".OAuth app tokens and personal access tokens (classic) need either the `manage_billing:copilot` or `admin:org` scopes to use this endpoint. + /// API method documentation + /// + /// A + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 401 status code + /// When receiving a 403 status code + /// When receiving a 404 status code + /// When receiving a 500 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task DeleteAsSelected_teamsDeleteResponseAsync(global::Ayllu.Github.Client.Orgs.Item.Copilot.Billing.Selected_teams.Selected_teamsDeleteRequestBody body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task DeleteAsSelected_teamsDeleteResponseAsync(global::Ayllu.Github.Client.Orgs.Item.Copilot.Billing.Selected_teams.Selected_teamsDeleteRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = ToDeleteRequestInformation(body, requestConfiguration); + var errorMapping = new Dictionary> + { + { "401", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "403", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "404", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "500", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Orgs.Item.Copilot.Billing.Selected_teams.Selected_teamsDeleteResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// > [!NOTE]> This endpoint is in public preview and is subject to change.Sets seats for all members of each team specified to "pending cancellation".This will cause the members of the specified team(s) to lose access to GitHub Copilot at the end of the current billing cycle unless they retain access through another team.For more information about disabling access to Copilot, see "[Revoking access to Copilot for members of your organization](https://docs.github.com/copilot/managing-copilot/managing-github-copilot-in-your-organization/managing-access-to-github-copilot-in-your-organization/revoking-access-to-copilot-for-members-of-your-organization)."Only organization owners can cancel Copilot seats for their organization members.The response contains the total number of seats set to "pending cancellation".OAuth app tokens and personal access tokens (classic) need either the `manage_billing:copilot` or `admin:org` scopes to use this endpoint. + /// API method documentation + /// + /// A + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 401 status code + /// When receiving a 403 status code + /// When receiving a 404 status code + /// When receiving a 500 status code + [Obsolete("This method is obsolete. Use DeleteAsSelected_teamsDeleteResponseAsync instead.")] +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task DeleteAsync(global::Ayllu.Github.Client.Orgs.Item.Copilot.Billing.Selected_teams.Selected_teamsDeleteRequestBody body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task DeleteAsync(global::Ayllu.Github.Client.Orgs.Item.Copilot.Billing.Selected_teams.Selected_teamsDeleteRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = ToDeleteRequestInformation(body, requestConfiguration); + var errorMapping = new Dictionary> + { + { "401", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "403", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "404", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "500", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Orgs.Item.Copilot.Billing.Selected_teams.Selected_teamsResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// > [!NOTE]> This endpoint is in public preview and is subject to change.Purchases a GitHub Copilot seat for all users within each specified team.The organization will be billed for each seat based on the organization's Copilot plan. For more information about Copilot pricing, see "[About billing for GitHub Copilot in your organization](https://docs.github.com/copilot/managing-copilot/managing-github-copilot-in-your-organization/managing-the-copilot-subscription-for-your-organization/about-billing-for-github-copilot-in-your-organization)."Only organization owners can purchase Copilot seats for their organization members. The organization must have a Copilot Business or Copilot Enterprise subscription and a configured suggestion matching policy.For more information about setting up a Copilot subscription, see "[Subscribing to Copilot for your organization](https://docs.github.com/copilot/managing-copilot/managing-github-copilot-in-your-organization/managing-the-copilot-subscription-for-your-organization/subscribing-to-copilot-for-your-organization)."For more information about setting a suggestion matching policy, see "[Managing policies for Copilot in your organization](https://docs.github.com/copilot/managing-copilot/managing-github-copilot-in-your-organization/setting-policies-for-copilot-in-your-organization/managing-policies-for-copilot-in-your-organization#policies-for-suggestion-matching)."The response contains 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. + /// API method documentation + /// + /// A + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 401 status code + /// When receiving a 403 status code + /// When receiving a 404 status code + /// When receiving a 500 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PostAsSelected_teamsPostResponseAsync(global::Ayllu.Github.Client.Orgs.Item.Copilot.Billing.Selected_teams.Selected_teamsPostRequestBody body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task PostAsSelected_teamsPostResponseAsync(global::Ayllu.Github.Client.Orgs.Item.Copilot.Billing.Selected_teams.Selected_teamsPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPostRequestInformation(body, requestConfiguration); + var errorMapping = new Dictionary> + { + { "401", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "403", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "404", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "500", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Orgs.Item.Copilot.Billing.Selected_teams.Selected_teamsPostResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// > [!NOTE]> This endpoint is in public preview and is subject to change.Purchases a GitHub Copilot seat for all users within each specified team.The organization will be billed for each seat based on the organization's Copilot plan. For more information about Copilot pricing, see "[About billing for GitHub Copilot in your organization](https://docs.github.com/copilot/managing-copilot/managing-github-copilot-in-your-organization/managing-the-copilot-subscription-for-your-organization/about-billing-for-github-copilot-in-your-organization)."Only organization owners can purchase Copilot seats for their organization members. The organization must have a Copilot Business or Copilot Enterprise subscription and a configured suggestion matching policy.For more information about setting up a Copilot subscription, see "[Subscribing to Copilot for your organization](https://docs.github.com/copilot/managing-copilot/managing-github-copilot-in-your-organization/managing-the-copilot-subscription-for-your-organization/subscribing-to-copilot-for-your-organization)."For more information about setting a suggestion matching policy, see "[Managing policies for Copilot in your organization](https://docs.github.com/copilot/managing-copilot/managing-github-copilot-in-your-organization/setting-policies-for-copilot-in-your-organization/managing-policies-for-copilot-in-your-organization#policies-for-suggestion-matching)."The response contains 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. + /// API method documentation + /// + /// A + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 401 status code + /// When receiving a 403 status code + /// When receiving a 404 status code + /// When receiving a 500 status code + [Obsolete("This method is obsolete. Use PostAsSelected_teamsPostResponseAsync instead.")] +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PostAsync(global::Ayllu.Github.Client.Orgs.Item.Copilot.Billing.Selected_teams.Selected_teamsPostRequestBody body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task PostAsync(global::Ayllu.Github.Client.Orgs.Item.Copilot.Billing.Selected_teams.Selected_teamsPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPostRequestInformation(body, requestConfiguration); + var errorMapping = new Dictionary> + { + { "401", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "403", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "404", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "500", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Orgs.Item.Copilot.Billing.Selected_teams.Selected_teamsResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// > [!NOTE]> This endpoint is in public preview and is subject to change.Sets seats for all members of each team specified to "pending cancellation".This will cause the members of the specified team(s) to lose access to GitHub Copilot at the end of the current billing cycle unless they retain access through another team.For more information about disabling access to Copilot, see "[Revoking access to Copilot for members of your organization](https://docs.github.com/copilot/managing-copilot/managing-github-copilot-in-your-organization/managing-access-to-github-copilot-in-your-organization/revoking-access-to-copilot-for-members-of-your-organization)."Only organization owners can cancel Copilot seats for their organization members.The response contains the total number of seats set to "pending cancellation".OAuth app tokens and personal access tokens (classic) need either the `manage_billing:copilot` or `admin:org` scopes to use this endpoint. + /// + /// A + /// The request body + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToDeleteRequestInformation(global::Ayllu.Github.Client.Orgs.Item.Copilot.Billing.Selected_teams.Selected_teamsDeleteRequestBody body, Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToDeleteRequestInformation(global::Ayllu.Github.Client.Orgs.Item.Copilot.Billing.Selected_teams.Selected_teamsDeleteRequestBody body, Action> requestConfiguration = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation(Method.DELETE, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + return requestInfo; + } + /// + /// > [!NOTE]> This endpoint is in public preview and is subject to change.Purchases a GitHub Copilot seat for all users within each specified team.The organization will be billed for each seat based on the organization's Copilot plan. For more information about Copilot pricing, see "[About billing for GitHub Copilot in your organization](https://docs.github.com/copilot/managing-copilot/managing-github-copilot-in-your-organization/managing-the-copilot-subscription-for-your-organization/about-billing-for-github-copilot-in-your-organization)."Only organization owners can purchase Copilot seats for their organization members. The organization must have a Copilot Business or Copilot Enterprise subscription and a configured suggestion matching policy.For more information about setting up a Copilot subscription, see "[Subscribing to Copilot for your organization](https://docs.github.com/copilot/managing-copilot/managing-github-copilot-in-your-organization/managing-the-copilot-subscription-for-your-organization/subscribing-to-copilot-for-your-organization)."For more information about setting a suggestion matching policy, see "[Managing policies for Copilot in your organization](https://docs.github.com/copilot/managing-copilot/managing-github-copilot-in-your-organization/setting-policies-for-copilot-in-your-organization/managing-policies-for-copilot-in-your-organization#policies-for-suggestion-matching)."The response contains 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. + /// + /// A + /// The request body + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPostRequestInformation(global::Ayllu.Github.Client.Orgs.Item.Copilot.Billing.Selected_teams.Selected_teamsPostRequestBody body, Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToPostRequestInformation(global::Ayllu.Github.Client.Orgs.Item.Copilot.Billing.Selected_teams.Selected_teamsPostRequestBody body, Action> requestConfiguration = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.Orgs.Item.Copilot.Billing.Selected_teams.Selected_teamsRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Orgs.Item.Copilot.Billing.Selected_teams.Selected_teamsRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class Selected_teamsRequestBuilderDeleteRequestConfiguration : RequestConfiguration + { + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class Selected_teamsRequestBuilderPostRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Copilot/Billing/Selected_teams/Selected_teamsResponse.cs b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Copilot/Billing/Selected_teams/Selected_teamsResponse.cs new file mode 100644 index 0000000..8e39615 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Copilot/Billing/Selected_teams/Selected_teamsResponse.cs @@ -0,0 +1,29 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Orgs.Item.Copilot.Billing.Selected_teams +{ + /// + /// The total number of seats created for members of the specified team(s). + /// + [Obsolete("This class is obsolete. Use Selected_teamsPostResponse instead.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class Selected_teamsResponse : global::Ayllu.Github.Client.Orgs.Item.Copilot.Billing.Selected_teams.Selected_teamsPostResponse, IParsable + { + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static new global::Ayllu.Github.Client.Orgs.Item.Copilot.Billing.Selected_teams.Selected_teamsResponse CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Orgs.Item.Copilot.Billing.Selected_teams.Selected_teamsResponse(); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Copilot/Billing/Selected_users/Selected_usersDeleteRequestBody.cs b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Copilot/Billing/Selected_users/Selected_usersDeleteRequestBody.cs new file mode 100644 index 0000000..d523a1a --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Copilot/Billing/Selected_users/Selected_usersDeleteRequestBody.cs @@ -0,0 +1,65 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Orgs.Item.Copilot.Billing.Selected_users +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class Selected_usersDeleteRequestBody : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The usernames of the organization members for which to revoke access to GitHub Copilot. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? SelectedUsernames { get; set; } +#nullable restore +#else + public List SelectedUsernames { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public Selected_usersDeleteRequestBody() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Orgs.Item.Copilot.Billing.Selected_users.Selected_usersDeleteRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Orgs.Item.Copilot.Billing.Selected_users.Selected_usersDeleteRequestBody(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "selected_usernames", n => { SelectedUsernames = n.GetCollectionOfPrimitiveValues()?.AsList(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteCollectionOfPrimitiveValues("selected_usernames", SelectedUsernames); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Copilot/Billing/Selected_users/Selected_usersDeleteResponse.cs b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Copilot/Billing/Selected_users/Selected_usersDeleteResponse.cs new file mode 100644 index 0000000..8c55355 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Copilot/Billing/Selected_users/Selected_usersDeleteResponse.cs @@ -0,0 +1,60 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Orgs.Item.Copilot.Billing.Selected_users +{ + /// + /// The total number of seats set to "pending cancellation" for the specified users. + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class Selected_usersDeleteResponse : IAdditionalDataHolder, IParsable + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The seats_cancelled property + public int? SeatsCancelled { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public Selected_usersDeleteResponse() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Orgs.Item.Copilot.Billing.Selected_users.Selected_usersDeleteResponse CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Orgs.Item.Copilot.Billing.Selected_users.Selected_usersDeleteResponse(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "seats_cancelled", n => { SeatsCancelled = n.GetIntValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteIntValue("seats_cancelled", SeatsCancelled); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Copilot/Billing/Selected_users/Selected_usersPostRequestBody.cs b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Copilot/Billing/Selected_users/Selected_usersPostRequestBody.cs new file mode 100644 index 0000000..cb9a58e --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Copilot/Billing/Selected_users/Selected_usersPostRequestBody.cs @@ -0,0 +1,65 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Orgs.Item.Copilot.Billing.Selected_users +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class Selected_usersPostRequestBody : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The usernames of the organization members to be granted access to GitHub Copilot. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? SelectedUsernames { get; set; } +#nullable restore +#else + public List SelectedUsernames { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public Selected_usersPostRequestBody() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Orgs.Item.Copilot.Billing.Selected_users.Selected_usersPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Orgs.Item.Copilot.Billing.Selected_users.Selected_usersPostRequestBody(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "selected_usernames", n => { SelectedUsernames = n.GetCollectionOfPrimitiveValues()?.AsList(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteCollectionOfPrimitiveValues("selected_usernames", SelectedUsernames); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Copilot/Billing/Selected_users/Selected_usersPostResponse.cs b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Copilot/Billing/Selected_users/Selected_usersPostResponse.cs new file mode 100644 index 0000000..239492b --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Copilot/Billing/Selected_users/Selected_usersPostResponse.cs @@ -0,0 +1,60 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Orgs.Item.Copilot.Billing.Selected_users +{ + /// + /// The total number of seats created for the specified user(s). + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class Selected_usersPostResponse : IAdditionalDataHolder, IParsable + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The seats_created property + public int? SeatsCreated { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public Selected_usersPostResponse() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Orgs.Item.Copilot.Billing.Selected_users.Selected_usersPostResponse CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Orgs.Item.Copilot.Billing.Selected_users.Selected_usersPostResponse(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "seats_created", n => { SeatsCreated = n.GetIntValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteIntValue("seats_created", SeatsCreated); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Copilot/Billing/Selected_users/Selected_usersRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Copilot/Billing/Selected_users/Selected_usersRequestBuilder.cs new file mode 100644 index 0000000..597f2ce --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Copilot/Billing/Selected_users/Selected_usersRequestBuilder.cs @@ -0,0 +1,237 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Orgs.Item.Copilot.Billing.Selected_users +{ + /// + /// Builds and executes requests for operations under \orgs\{org}\copilot\billing\selected_users + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class Selected_usersRequestBuilder : BaseRequestBuilder + { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public Selected_usersRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/orgs/{org}/copilot/billing/selected_users", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public Selected_usersRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/orgs/{org}/copilot/billing/selected_users", rawUrl) + { + } + /// + /// > [!NOTE]> This endpoint is in public preview and is subject to change.Sets seats for all users specified to "pending cancellation".This will cause the specified users to lose access to GitHub Copilot at the end of the current billing cycle unless they retain access through team membership.For more information about disabling access to Copilot, see "[Revoking access to Copilot for members of your organization](https://docs.github.com/copilot/managing-copilot/managing-github-copilot-in-your-organization/managing-access-to-github-copilot-in-your-organization/revoking-access-to-copilot-for-members-of-your-organization)."Only organization owners can cancel Copilot seats for their organization members.The response contains the total number of seats set to "pending cancellation".OAuth app tokens and personal access tokens (classic) need either the `manage_billing:copilot` or `admin:org` scopes to use this endpoint. + /// API method documentation + /// + /// A + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 401 status code + /// When receiving a 403 status code + /// When receiving a 404 status code + /// When receiving a 500 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task DeleteAsSelected_usersDeleteResponseAsync(global::Ayllu.Github.Client.Orgs.Item.Copilot.Billing.Selected_users.Selected_usersDeleteRequestBody body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task DeleteAsSelected_usersDeleteResponseAsync(global::Ayllu.Github.Client.Orgs.Item.Copilot.Billing.Selected_users.Selected_usersDeleteRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = ToDeleteRequestInformation(body, requestConfiguration); + var errorMapping = new Dictionary> + { + { "401", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "403", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "404", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "500", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Orgs.Item.Copilot.Billing.Selected_users.Selected_usersDeleteResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// > [!NOTE]> This endpoint is in public preview and is subject to change.Sets seats for all users specified to "pending cancellation".This will cause the specified users to lose access to GitHub Copilot at the end of the current billing cycle unless they retain access through team membership.For more information about disabling access to Copilot, see "[Revoking access to Copilot for members of your organization](https://docs.github.com/copilot/managing-copilot/managing-github-copilot-in-your-organization/managing-access-to-github-copilot-in-your-organization/revoking-access-to-copilot-for-members-of-your-organization)."Only organization owners can cancel Copilot seats for their organization members.The response contains the total number of seats set to "pending cancellation".OAuth app tokens and personal access tokens (classic) need either the `manage_billing:copilot` or `admin:org` scopes to use this endpoint. + /// API method documentation + /// + /// A + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 401 status code + /// When receiving a 403 status code + /// When receiving a 404 status code + /// When receiving a 500 status code + [Obsolete("This method is obsolete. Use DeleteAsSelected_usersDeleteResponseAsync instead.")] +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task DeleteAsync(global::Ayllu.Github.Client.Orgs.Item.Copilot.Billing.Selected_users.Selected_usersDeleteRequestBody body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task DeleteAsync(global::Ayllu.Github.Client.Orgs.Item.Copilot.Billing.Selected_users.Selected_usersDeleteRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = ToDeleteRequestInformation(body, requestConfiguration); + var errorMapping = new Dictionary> + { + { "401", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "403", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "404", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "500", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Orgs.Item.Copilot.Billing.Selected_users.Selected_usersResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// > [!NOTE]> This endpoint is in public preview and is subject to change.Purchases a GitHub Copilot seat for each user specified.The organization will be billed for each seat based on the organization's Copilot plan. For more information about Copilot pricing, see "[About billing for GitHub Copilot in your organization](https://docs.github.com/copilot/managing-copilot/managing-github-copilot-in-your-organization/managing-the-copilot-subscription-for-your-organization/about-billing-for-github-copilot-in-your-organization)."Only organization owners can purchase Copilot seats for their organization members. The organization must have a Copilot Business or Copilot Enterprise subscription and a configured suggestion matching policy.For more information about setting up a Copilot subscription, see "[Subscribing to Copilot for your organization](https://docs.github.com/copilot/managing-copilot/managing-github-copilot-in-your-organization/managing-the-copilot-subscription-for-your-organization/subscribing-to-copilot-for-your-organization)."For more information about setting a suggestion matching policy, see "[Managing policies for Copilot in your organization](https://docs.github.com/copilot/managing-copilot/managing-github-copilot-in-your-organization/setting-policies-for-copilot-in-your-organization/managing-policies-for-copilot-in-your-organization#policies-for-suggestion-matching)."The response contains 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. + /// API method documentation + /// + /// A + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 401 status code + /// When receiving a 403 status code + /// When receiving a 404 status code + /// When receiving a 500 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PostAsSelected_usersPostResponseAsync(global::Ayllu.Github.Client.Orgs.Item.Copilot.Billing.Selected_users.Selected_usersPostRequestBody body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task PostAsSelected_usersPostResponseAsync(global::Ayllu.Github.Client.Orgs.Item.Copilot.Billing.Selected_users.Selected_usersPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPostRequestInformation(body, requestConfiguration); + var errorMapping = new Dictionary> + { + { "401", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "403", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "404", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "500", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Orgs.Item.Copilot.Billing.Selected_users.Selected_usersPostResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// > [!NOTE]> This endpoint is in public preview and is subject to change.Purchases a GitHub Copilot seat for each user specified.The organization will be billed for each seat based on the organization's Copilot plan. For more information about Copilot pricing, see "[About billing for GitHub Copilot in your organization](https://docs.github.com/copilot/managing-copilot/managing-github-copilot-in-your-organization/managing-the-copilot-subscription-for-your-organization/about-billing-for-github-copilot-in-your-organization)."Only organization owners can purchase Copilot seats for their organization members. The organization must have a Copilot Business or Copilot Enterprise subscription and a configured suggestion matching policy.For more information about setting up a Copilot subscription, see "[Subscribing to Copilot for your organization](https://docs.github.com/copilot/managing-copilot/managing-github-copilot-in-your-organization/managing-the-copilot-subscription-for-your-organization/subscribing-to-copilot-for-your-organization)."For more information about setting a suggestion matching policy, see "[Managing policies for Copilot in your organization](https://docs.github.com/copilot/managing-copilot/managing-github-copilot-in-your-organization/setting-policies-for-copilot-in-your-organization/managing-policies-for-copilot-in-your-organization#policies-for-suggestion-matching)."The response contains 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. + /// API method documentation + /// + /// A + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 401 status code + /// When receiving a 403 status code + /// When receiving a 404 status code + /// When receiving a 500 status code + [Obsolete("This method is obsolete. Use PostAsSelected_usersPostResponseAsync instead.")] +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PostAsync(global::Ayllu.Github.Client.Orgs.Item.Copilot.Billing.Selected_users.Selected_usersPostRequestBody body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task PostAsync(global::Ayllu.Github.Client.Orgs.Item.Copilot.Billing.Selected_users.Selected_usersPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPostRequestInformation(body, requestConfiguration); + var errorMapping = new Dictionary> + { + { "401", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "403", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "404", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "500", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Orgs.Item.Copilot.Billing.Selected_users.Selected_usersResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// > [!NOTE]> This endpoint is in public preview and is subject to change.Sets seats for all users specified to "pending cancellation".This will cause the specified users to lose access to GitHub Copilot at the end of the current billing cycle unless they retain access through team membership.For more information about disabling access to Copilot, see "[Revoking access to Copilot for members of your organization](https://docs.github.com/copilot/managing-copilot/managing-github-copilot-in-your-organization/managing-access-to-github-copilot-in-your-organization/revoking-access-to-copilot-for-members-of-your-organization)."Only organization owners can cancel Copilot seats for their organization members.The response contains the total number of seats set to "pending cancellation".OAuth app tokens and personal access tokens (classic) need either the `manage_billing:copilot` or `admin:org` scopes to use this endpoint. + /// + /// A + /// The request body + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToDeleteRequestInformation(global::Ayllu.Github.Client.Orgs.Item.Copilot.Billing.Selected_users.Selected_usersDeleteRequestBody body, Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToDeleteRequestInformation(global::Ayllu.Github.Client.Orgs.Item.Copilot.Billing.Selected_users.Selected_usersDeleteRequestBody body, Action> requestConfiguration = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation(Method.DELETE, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + return requestInfo; + } + /// + /// > [!NOTE]> This endpoint is in public preview and is subject to change.Purchases a GitHub Copilot seat for each user specified.The organization will be billed for each seat based on the organization's Copilot plan. For more information about Copilot pricing, see "[About billing for GitHub Copilot in your organization](https://docs.github.com/copilot/managing-copilot/managing-github-copilot-in-your-organization/managing-the-copilot-subscription-for-your-organization/about-billing-for-github-copilot-in-your-organization)."Only organization owners can purchase Copilot seats for their organization members. The organization must have a Copilot Business or Copilot Enterprise subscription and a configured suggestion matching policy.For more information about setting up a Copilot subscription, see "[Subscribing to Copilot for your organization](https://docs.github.com/copilot/managing-copilot/managing-github-copilot-in-your-organization/managing-the-copilot-subscription-for-your-organization/subscribing-to-copilot-for-your-organization)."For more information about setting a suggestion matching policy, see "[Managing policies for Copilot in your organization](https://docs.github.com/copilot/managing-copilot/managing-github-copilot-in-your-organization/setting-policies-for-copilot-in-your-organization/managing-policies-for-copilot-in-your-organization#policies-for-suggestion-matching)."The response contains 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. + /// + /// A + /// The request body + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPostRequestInformation(global::Ayllu.Github.Client.Orgs.Item.Copilot.Billing.Selected_users.Selected_usersPostRequestBody body, Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToPostRequestInformation(global::Ayllu.Github.Client.Orgs.Item.Copilot.Billing.Selected_users.Selected_usersPostRequestBody body, Action> requestConfiguration = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.Orgs.Item.Copilot.Billing.Selected_users.Selected_usersRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Orgs.Item.Copilot.Billing.Selected_users.Selected_usersRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class Selected_usersRequestBuilderDeleteRequestConfiguration : RequestConfiguration + { + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class Selected_usersRequestBuilderPostRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Copilot/Billing/Selected_users/Selected_usersResponse.cs b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Copilot/Billing/Selected_users/Selected_usersResponse.cs new file mode 100644 index 0000000..d8330d7 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Copilot/Billing/Selected_users/Selected_usersResponse.cs @@ -0,0 +1,29 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Orgs.Item.Copilot.Billing.Selected_users +{ + /// + /// The total number of seats created for the specified user(s). + /// + [Obsolete("This class is obsolete. Use Selected_usersPostResponse instead.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class Selected_usersResponse : global::Ayllu.Github.Client.Orgs.Item.Copilot.Billing.Selected_users.Selected_usersPostResponse, IParsable + { + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static new global::Ayllu.Github.Client.Orgs.Item.Copilot.Billing.Selected_users.Selected_usersResponse CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Orgs.Item.Copilot.Billing.Selected_users.Selected_usersResponse(); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Copilot/CopilotRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Copilot/CopilotRequestBuilder.cs new file mode 100644 index 0000000..9d0bf86 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Copilot/CopilotRequestBuilder.cs @@ -0,0 +1,47 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Orgs.Item.Copilot.Billing; +using Ayllu.Github.Client.Orgs.Item.Copilot.Metrics; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System; +namespace Ayllu.Github.Client.Orgs.Item.Copilot +{ + /// + /// Builds and executes requests for operations under \orgs\{org}\copilot + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class CopilotRequestBuilder : BaseRequestBuilder + { + /// The billing property + public global::Ayllu.Github.Client.Orgs.Item.Copilot.Billing.BillingRequestBuilder Billing + { + get => new global::Ayllu.Github.Client.Orgs.Item.Copilot.Billing.BillingRequestBuilder(PathParameters, RequestAdapter); + } + /// The metrics property + public global::Ayllu.Github.Client.Orgs.Item.Copilot.Metrics.MetricsRequestBuilder Metrics + { + get => new global::Ayllu.Github.Client.Orgs.Item.Copilot.Metrics.MetricsRequestBuilder(PathParameters, RequestAdapter); + } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public CopilotRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/orgs/{org}/copilot", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public CopilotRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/orgs/{org}/copilot", rawUrl) + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Copilot/Metrics/MetricsRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Copilot/Metrics/MetricsRequestBuilder.cs new file mode 100644 index 0000000..4ee9562 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Copilot/Metrics/MetricsRequestBuilder.cs @@ -0,0 +1,138 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Orgs.Item.Copilot.Metrics +{ + /// + /// Builds and executes requests for operations under \orgs\{org}\copilot\metrics + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class MetricsRequestBuilder : BaseRequestBuilder + { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public MetricsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/orgs/{org}/copilot/metrics{?page*,per_page*,since*,until*}", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public MetricsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/orgs/{org}/copilot/metrics{?page*,per_page*,since*,until*}", rawUrl) + { + } + /// + /// Use this endpoint to see a breakdown of aggregated metrics for various GitHub Copilot features. See the response schema tab for detailed metrics definitions.> [!NOTE]> This endpoint will only return results for a given day if the organization contained **five or more members with active Copilot licenses** on that day, as evaluated at the end of that day.The response contains metrics for up to 28 days prior. Metrics are processed once per day for the previous day,and the response will only include data up until yesterday. In order for an end user to be counted towards these metrics,they must have telemetry enabled in their IDE.To access this endpoint, the Copilot Metrics API access policy must be enabled for the organization.Only organization owners and owners and billing managers of the parent enterprise can view Copilot metrics.OAuth app tokens and personal access tokens (classic) need either the `manage_billing:copilot`, `read:org`, or `read:enterprise` scopes to use this endpoint. + /// API method documentation + /// + /// A List<global::Ayllu.Github.Client.Models.CopilotUsageMetricsDay> + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 403 status code + /// When receiving a 404 status code + /// When receiving a 422 status code + /// When receiving a 500 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task?> GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task> GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "403", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "404", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "422", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "500", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + }; + var collectionResult = await RequestAdapter.SendCollectionAsync(requestInfo, global::Ayllu.Github.Client.Models.CopilotUsageMetricsDay.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + return collectionResult?.AsList(); + } + /// + /// Use this endpoint to see a breakdown of aggregated metrics for various GitHub Copilot features. See the response schema tab for detailed metrics definitions.> [!NOTE]> This endpoint will only return results for a given day if the organization contained **five or more members with active Copilot licenses** on that day, as evaluated at the end of that day.The response contains metrics for up to 28 days prior. Metrics are processed once per day for the previous day,and the response will only include data up until yesterday. In order for an end user to be counted towards these metrics,they must have telemetry enabled in their IDE.To access this endpoint, the Copilot Metrics API access policy must be enabled for the organization.Only organization owners and owners and billing managers of the parent enterprise can view Copilot metrics.OAuth app tokens and personal access tokens (classic) need either the `manage_billing:copilot`, `read:org`, or `read:enterprise` scopes to use this endpoint. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.Orgs.Item.Copilot.Metrics.MetricsRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Orgs.Item.Copilot.Metrics.MetricsRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Use this endpoint to see a breakdown of aggregated metrics for various GitHub Copilot features. See the response schema tab for detailed metrics definitions.> [!NOTE]> This endpoint will only return results for a given day if the organization contained **five or more members with active Copilot licenses** on that day, as evaluated at the end of that day.The response contains metrics for up to 28 days prior. Metrics are processed once per day for the previous day,and the response will only include data up until yesterday. In order for an end user to be counted towards these metrics,they must have telemetry enabled in their IDE.To access this endpoint, the Copilot Metrics API access policy must be enabled for the organization.Only organization owners and owners and billing managers of the parent enterprise can view Copilot metrics.OAuth app tokens and personal access tokens (classic) need either the `manage_billing:copilot`, `read:org`, or `read:enterprise` scopes to use this endpoint. + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class MetricsRequestBuilderGetQueryParameters + { + /// The page number of the results to fetch. For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." + [QueryParameter("page")] + public int? Page { get; set; } + /// The number of days of metrics to display per page (max 28). For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." + [QueryParameter("per_page")] + public int? PerPage { get; set; } + /// 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. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("since")] + public string? Since { get; set; } +#nullable restore +#else + [QueryParameter("since")] + public string Since { get; set; } +#endif + /// 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. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("until")] + public string? Until { get; set; } +#nullable restore +#else + [QueryParameter("until")] + public string Until { get; set; } +#endif + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class MetricsRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Dependabot/Alerts/AlertsRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Dependabot/Alerts/AlertsRequestBuilder.cs new file mode 100644 index 0000000..56f0203 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Dependabot/Alerts/AlertsRequestBuilder.cs @@ -0,0 +1,263 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Orgs.Item.Dependabot.Alerts +{ + /// + /// Builds and executes requests for operations under \orgs\{org}\dependabot\alerts + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class AlertsRequestBuilder : BaseRequestBuilder + { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public AlertsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/orgs/{org}/dependabot/alerts{?after*,before*,direction*,ecosystem*,epss_percentage*,first*,has*,last*,package*,package_registry*,package_registry_url*,per_page*,scope*,severity*,sort*,state*}", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public AlertsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/orgs/{org}/dependabot/alerts{?after*,before*,direction*,ecosystem*,epss_percentage*,first*,has*,last*,package*,package_registry*,package_registry_url*,per_page*,scope*,severity*,sort*,state*}", rawUrl) + { + } + /// + /// 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. + /// API method documentation + /// + /// A List<global::Ayllu.Github.Client.Models.DependabotAlertWithRepository> + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 400 status code + /// When receiving a 403 status code + /// When receiving a 404 status code + /// When receiving a 422 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task?> GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task> GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "400", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "403", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "404", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "422", global::Ayllu.Github.Client.Models.ValidationErrorSimple.CreateFromDiscriminatorValue }, + }; + var collectionResult = await RequestAdapter.SendCollectionAsync(requestInfo, global::Ayllu.Github.Client.Models.DependabotAlertWithRepository.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + return collectionResult?.AsList(); + } + /// + /// 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. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.Orgs.Item.Dependabot.Alerts.AlertsRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Orgs.Item.Dependabot.Alerts.AlertsRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// 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. + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class AlertsRequestBuilderGetQueryParameters + { + /// A cursor, as given in the [Link header](https://docs.github.com/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/rest/using-the-rest-api/using-pagination-in-the-rest-api)." +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("after")] + public string? After { get; set; } +#nullable restore +#else + [QueryParameter("after")] + public string After { get; set; } +#endif + /// A cursor, as given in the [Link header](https://docs.github.com/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/rest/using-the-rest-api/using-pagination-in-the-rest-api)." +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("before")] + public string? Before { get; set; } +#nullable restore +#else + [QueryParameter("before")] + public string Before { get; set; } +#endif + /// The direction to sort the results by. + [Obsolete("This property is deprecated, use DirectionAsGetDirectionQueryParameterType instead")] +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("direction")] + public string? Direction { get; set; } +#nullable restore +#else + [QueryParameter("direction")] + public string Direction { get; set; } +#endif + /// The direction to sort the results by. + [QueryParameter("direction")] + public global::Ayllu.Github.Client.Orgs.Item.Dependabot.Alerts.GetDirectionQueryParameterType? DirectionAsGetDirectionQueryParameterType { get; set; } + /// 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` +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("ecosystem")] + public string? Ecosystem { get; set; } +#nullable restore +#else + [QueryParameter("ecosystem")] + public string Ecosystem { get; set; } +#endif + /// CVE Exploit Prediction Scoring System (EPSS) percentage. Can be specified as:- An exact number (`n`)- Comparators such as `>n`, `<n`, `>=n`, `<=n`- A range like `n..n`, where `n` is a number from 0.0 to 1.0Filters the list of alerts based on EPSS percentages. If specified, only alerts with the provided EPSS percentages will be returned. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("epss_percentage")] + public string? EpssPercentage { get; set; } +#nullable restore +#else + [QueryParameter("epss_percentage")] + public string EpssPercentage { get; set; } +#endif + /// **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. + [QueryParameter("first")] + public int? First { get; set; } + /// Filters the list of alerts based on whether the alert has the given value. If specified, only alerts meeting this criterion will be returned.Multiple `has` filters can be passed to filter for alerts that have all of the values. Currently, only `patch` is supported. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("has")] + public string? Has { get; set; } +#nullable restore +#else + [QueryParameter("has")] + public string Has { get; set; } +#endif + /// **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. + [QueryParameter("last")] + public int? Last { get; set; } + /// A comma-separated list of package names. If specified, only alerts for these packages will be returned. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("package")] + public string? Package { get; set; } +#nullable restore +#else + [QueryParameter("package")] + public string Package { get; set; } +#endif + /// A comma-separated list of Package Registry name strings. If specified, only alerts for repositories with storage records matching these registries will be returned.Can be: `jfrog-artifactory` +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("package_registry")] + public string? PackageRegistry { get; set; } +#nullable restore +#else + [QueryParameter("package_registry")] + public string PackageRegistry { get; set; } +#endif + /// A comma-separated list of package registry URLs. If specified, only alerts for repositories with storage records matching these URLs will be returned. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("package_registry_url")] + public string? PackageRegistryUrl { get; set; } +#nullable restore +#else + [QueryParameter("package_registry_url")] + public string PackageRegistryUrl { get; set; } +#endif + /// The number of results per page (max 100). For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." + [QueryParameter("per_page")] + public int? PerPage { get; set; } + /// The scope of the vulnerable dependency. If specified, only alerts with this scope will be returned. + [Obsolete("This property is deprecated, use ScopeAsGetScopeQueryParameterType instead")] +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("scope")] + public string? Scope { get; set; } +#nullable restore +#else + [QueryParameter("scope")] + public string Scope { get; set; } +#endif + /// The scope of the vulnerable dependency. If specified, only alerts with this scope will be returned. + [QueryParameter("scope")] + public global::Ayllu.Github.Client.Orgs.Item.Dependabot.Alerts.GetScopeQueryParameterType? ScopeAsGetScopeQueryParameterType { get; set; } + /// A comma-separated list of severities. If specified, only alerts with these severities will be returned.Can be: `low`, `medium`, `high`, `critical` +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("severity")] + public string? Severity { get; set; } +#nullable restore +#else + [QueryParameter("severity")] + public string Severity { get; set; } +#endif + /// The property by which to sort the results.`created` means when the alert was created.`updated` means when the alert's state last changed.`epss_percentage` sorts alerts by the Exploit Prediction Scoring System (EPSS) percentage. + [Obsolete("This property is deprecated, use SortAsGetSortQueryParameterType instead")] +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("sort")] + public string? Sort { get; set; } +#nullable restore +#else + [QueryParameter("sort")] + public string Sort { get; set; } +#endif + /// The property by which to sort the results.`created` means when the alert was created.`updated` means when the alert's state last changed.`epss_percentage` sorts alerts by the Exploit Prediction Scoring System (EPSS) percentage. + [QueryParameter("sort")] + public global::Ayllu.Github.Client.Orgs.Item.Dependabot.Alerts.GetSortQueryParameterType? SortAsGetSortQueryParameterType { get; set; } + /// A comma-separated list of states. If specified, only alerts with these states will be returned.Can be: `auto_dismissed`, `dismissed`, `fixed`, `open` +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("state")] + public string? State { get; set; } +#nullable restore +#else + [QueryParameter("state")] + public string State { get; set; } +#endif + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class AlertsRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Dependabot/Alerts/GetDirectionQueryParameterType.cs b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Dependabot/Alerts/GetDirectionQueryParameterType.cs new file mode 100644 index 0000000..0f60700 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Dependabot/Alerts/GetDirectionQueryParameterType.cs @@ -0,0 +1,20 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Orgs.Item.Dependabot.Alerts +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public enum GetDirectionQueryParameterType + #pragma warning restore CS1591 + { + [EnumMember(Value = "asc")] + #pragma warning disable CS1591 + Asc, + #pragma warning restore CS1591 + [EnumMember(Value = "desc")] + #pragma warning disable CS1591 + Desc, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Dependabot/Alerts/GetScopeQueryParameterType.cs b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Dependabot/Alerts/GetScopeQueryParameterType.cs new file mode 100644 index 0000000..c7becb9 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Dependabot/Alerts/GetScopeQueryParameterType.cs @@ -0,0 +1,20 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Orgs.Item.Dependabot.Alerts +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public enum GetScopeQueryParameterType + #pragma warning restore CS1591 + { + [EnumMember(Value = "development")] + #pragma warning disable CS1591 + Development, + #pragma warning restore CS1591 + [EnumMember(Value = "runtime")] + #pragma warning disable CS1591 + Runtime, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Dependabot/Alerts/GetSortQueryParameterType.cs b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Dependabot/Alerts/GetSortQueryParameterType.cs new file mode 100644 index 0000000..b788f6b --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Dependabot/Alerts/GetSortQueryParameterType.cs @@ -0,0 +1,24 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Orgs.Item.Dependabot.Alerts +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public enum GetSortQueryParameterType + #pragma warning restore CS1591 + { + [EnumMember(Value = "created")] + #pragma warning disable CS1591 + Created, + #pragma warning restore CS1591 + [EnumMember(Value = "updated")] + #pragma warning disable CS1591 + Updated, + #pragma warning restore CS1591 + [EnumMember(Value = "epss_percentage")] + #pragma warning disable CS1591 + Epss_percentage, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Dependabot/DependabotRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Dependabot/DependabotRequestBuilder.cs new file mode 100644 index 0000000..6e12fe6 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Dependabot/DependabotRequestBuilder.cs @@ -0,0 +1,47 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Orgs.Item.Dependabot.Alerts; +using Ayllu.Github.Client.Orgs.Item.Dependabot.Secrets; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System; +namespace Ayllu.Github.Client.Orgs.Item.Dependabot +{ + /// + /// Builds and executes requests for operations under \orgs\{org}\dependabot + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class DependabotRequestBuilder : BaseRequestBuilder + { + /// The alerts property + public global::Ayllu.Github.Client.Orgs.Item.Dependabot.Alerts.AlertsRequestBuilder Alerts + { + get => new global::Ayllu.Github.Client.Orgs.Item.Dependabot.Alerts.AlertsRequestBuilder(PathParameters, RequestAdapter); + } + /// The secrets property + public global::Ayllu.Github.Client.Orgs.Item.Dependabot.Secrets.SecretsRequestBuilder Secrets + { + get => new global::Ayllu.Github.Client.Orgs.Item.Dependabot.Secrets.SecretsRequestBuilder(PathParameters, RequestAdapter); + } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public DependabotRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/orgs/{org}/dependabot", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public DependabotRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/orgs/{org}/dependabot", rawUrl) + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Dependabot/Secrets/Item/Repositories/Item/WithRepository_ItemRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Dependabot/Secrets/Item/Repositories/Item/WithRepository_ItemRequestBuilder.cs new file mode 100644 index 0000000..0666fc9 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Dependabot/Secrets/Item/Repositories/Item/WithRepository_ItemRequestBuilder.cs @@ -0,0 +1,134 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Orgs.Item.Dependabot.Secrets.Item.Repositories.Item +{ + /// + /// Builds and executes requests for operations under \orgs\{org}\dependabot\secrets\{secret_name}\repositories\{repository_id} + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithRepository_ItemRequestBuilder : BaseRequestBuilder + { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public WithRepository_ItemRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/orgs/{org}/dependabot/secrets/{secret_name}/repositories/{repository_id}", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public WithRepository_ItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/orgs/{org}/dependabot/secrets/{secret_name}/repositories/{repository_id}", rawUrl) + { + } + /// + /// 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/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 + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task DeleteAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task DeleteAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToDeleteRequestInformation(requestConfiguration); + await RequestAdapter.SendNoContentAsync(requestInfo, default, cancellationToken).ConfigureAwait(false); + } + /// + /// 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/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 + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PutAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task PutAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToPutRequestInformation(requestConfiguration); + await RequestAdapter.SendNoContentAsync(requestInfo, default, cancellationToken).ConfigureAwait(false); + } + /// + /// 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/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. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToDeleteRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToDeleteRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.DELETE, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + return requestInfo; + } + /// + /// 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/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. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPutRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToPutRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.PUT, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.Orgs.Item.Dependabot.Secrets.Item.Repositories.Item.WithRepository_ItemRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Orgs.Item.Dependabot.Secrets.Item.Repositories.Item.WithRepository_ItemRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithRepository_ItemRequestBuilderDeleteRequestConfiguration : RequestConfiguration + { + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithRepository_ItemRequestBuilderPutRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Dependabot/Secrets/Item/Repositories/RepositoriesGetResponse.cs b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Dependabot/Secrets/Item/Repositories/RepositoriesGetResponse.cs new file mode 100644 index 0000000..718340b --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Dependabot/Secrets/Item/Repositories/RepositoriesGetResponse.cs @@ -0,0 +1,70 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Orgs.Item.Dependabot.Secrets.Item.Repositories +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class RepositoriesGetResponse : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The repositories property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? Repositories { get; set; } +#nullable restore +#else + public List Repositories { get; set; } +#endif + /// The total_count property + public int? TotalCount { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public RepositoriesGetResponse() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Orgs.Item.Dependabot.Secrets.Item.Repositories.RepositoriesGetResponse CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Orgs.Item.Dependabot.Secrets.Item.Repositories.RepositoriesGetResponse(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "repositories", n => { Repositories = n.GetCollectionOfObjectValues(global::Ayllu.Github.Client.Models.MinimalRepository.CreateFromDiscriminatorValue)?.AsList(); } }, + { "total_count", n => { TotalCount = n.GetIntValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteCollectionOfObjectValues("repositories", Repositories); + writer.WriteIntValue("total_count", TotalCount); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Dependabot/Secrets/Item/Repositories/RepositoriesPutRequestBody.cs b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Dependabot/Secrets/Item/Repositories/RepositoriesPutRequestBody.cs new file mode 100644 index 0000000..a03edcf --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Dependabot/Secrets/Item/Repositories/RepositoriesPutRequestBody.cs @@ -0,0 +1,65 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Orgs.Item.Dependabot.Secrets.Item.Repositories +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class RepositoriesPutRequestBody : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// 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/rest/dependabot/secrets#set-selected-repositories-for-an-organization-secret) and [Remove selected repository from an organization secret](https://docs.github.com/rest/dependabot/secrets#remove-selected-repository-from-an-organization-secret) endpoints. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? SelectedRepositoryIds { get; set; } +#nullable restore +#else + public List SelectedRepositoryIds { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public RepositoriesPutRequestBody() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Orgs.Item.Dependabot.Secrets.Item.Repositories.RepositoriesPutRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Orgs.Item.Dependabot.Secrets.Item.Repositories.RepositoriesPutRequestBody(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "selected_repository_ids", n => { SelectedRepositoryIds = n.GetCollectionOfPrimitiveValues()?.AsList(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteCollectionOfPrimitiveValues("selected_repository_ids", SelectedRepositoryIds); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Dependabot/Secrets/Item/Repositories/RepositoriesRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Dependabot/Secrets/Item/Repositories/RepositoriesRequestBuilder.cs new file mode 100644 index 0000000..9ea8bb0 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Dependabot/Secrets/Item/Repositories/RepositoriesRequestBuilder.cs @@ -0,0 +1,200 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Orgs.Item.Dependabot.Secrets.Item.Repositories.Item; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Orgs.Item.Dependabot.Secrets.Item.Repositories +{ + /// + /// Builds and executes requests for operations under \orgs\{org}\dependabot\secrets\{secret_name}\repositories + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class RepositoriesRequestBuilder : BaseRequestBuilder + { + /// Gets an item from the Ayllu.Github.Client.orgs.item.dependabot.secrets.item.repositories.item collection + /// Unique identifier of the item + /// A + public global::Ayllu.Github.Client.Orgs.Item.Dependabot.Secrets.Item.Repositories.Item.WithRepository_ItemRequestBuilder this[int position] + { + get + { + var urlTplParams = new Dictionary(PathParameters); + urlTplParams.Add("repository_id", position); + return new global::Ayllu.Github.Client.Orgs.Item.Dependabot.Secrets.Item.Repositories.Item.WithRepository_ItemRequestBuilder(urlTplParams, RequestAdapter); + } + } + /// Gets an item from the Ayllu.Github.Client.orgs.item.dependabot.secrets.item.repositories.item collection + /// Unique identifier of the item + /// A + [Obsolete("This indexer is deprecated and will be removed in the next major version. Use the one with the typed parameter instead.")] + public global::Ayllu.Github.Client.Orgs.Item.Dependabot.Secrets.Item.Repositories.Item.WithRepository_ItemRequestBuilder this[string position] + { + get + { + var urlTplParams = new Dictionary(PathParameters); + if (!string.IsNullOrWhiteSpace(position)) urlTplParams.Add("repository_id", position); + return new global::Ayllu.Github.Client.Orgs.Item.Dependabot.Secrets.Item.Repositories.Item.WithRepository_ItemRequestBuilder(urlTplParams, RequestAdapter); + } + } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public RepositoriesRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/orgs/{org}/dependabot/secrets/{secret_name}/repositories{?page*,per_page*}", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public RepositoriesRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/orgs/{org}/dependabot/secrets/{secret_name}/repositories{?page*,per_page*}", rawUrl) + { + } + /// + /// 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. + /// API method documentation + /// + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsRepositoriesGetResponseAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task GetAsRepositoriesGetResponseAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Orgs.Item.Dependabot.Secrets.Item.Repositories.RepositoriesGetResponse.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false); + } + /// + /// 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. + /// API method documentation + /// + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + [Obsolete("This method is obsolete. Use GetAsRepositoriesGetResponseAsync instead.")] +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Orgs.Item.Dependabot.Secrets.Item.Repositories.RepositoriesResponse.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false); + } + /// + /// 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/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 + /// + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PutAsync(global::Ayllu.Github.Client.Orgs.Item.Dependabot.Secrets.Item.Repositories.RepositoriesPutRequestBody body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task PutAsync(global::Ayllu.Github.Client.Orgs.Item.Dependabot.Secrets.Item.Repositories.RepositoriesPutRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPutRequestInformation(body, requestConfiguration); + await RequestAdapter.SendNoContentAsync(requestInfo, default, cancellationToken).ConfigureAwait(false); + } + /// + /// 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. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// 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/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. + /// + /// A + /// The request body + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPutRequestInformation(global::Ayllu.Github.Client.Orgs.Item.Dependabot.Secrets.Item.Repositories.RepositoriesPutRequestBody body, Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToPutRequestInformation(global::Ayllu.Github.Client.Orgs.Item.Dependabot.Secrets.Item.Repositories.RepositoriesPutRequestBody body, Action> requestConfiguration = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation(Method.PUT, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.Orgs.Item.Dependabot.Secrets.Item.Repositories.RepositoriesRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Orgs.Item.Dependabot.Secrets.Item.Repositories.RepositoriesRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// 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. + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class RepositoriesRequestBuilderGetQueryParameters + { + /// The page number of the results to fetch. For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." + [QueryParameter("page")] + public int? Page { get; set; } + /// The number of results per page (max 100). For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." + [QueryParameter("per_page")] + public int? PerPage { get; set; } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class RepositoriesRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class RepositoriesRequestBuilderPutRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Dependabot/Secrets/Item/Repositories/RepositoriesResponse.cs b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Dependabot/Secrets/Item/Repositories/RepositoriesResponse.cs new file mode 100644 index 0000000..1ba1d22 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Dependabot/Secrets/Item/Repositories/RepositoriesResponse.cs @@ -0,0 +1,28 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Orgs.Item.Dependabot.Secrets.Item.Repositories +{ + [Obsolete("This class is obsolete. Use RepositoriesGetResponse instead.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class RepositoriesResponse : global::Ayllu.Github.Client.Orgs.Item.Dependabot.Secrets.Item.Repositories.RepositoriesGetResponse, IParsable + #pragma warning restore CS1591 + { + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static new global::Ayllu.Github.Client.Orgs.Item.Dependabot.Secrets.Item.Repositories.RepositoriesResponse CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Orgs.Item.Dependabot.Secrets.Item.Repositories.RepositoriesResponse(); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Dependabot/Secrets/Item/WithSecret_nameItemRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Dependabot/Secrets/Item/WithSecret_nameItemRequestBuilder.cs new file mode 100644 index 0000000..2bda8e6 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Dependabot/Secrets/Item/WithSecret_nameItemRequestBuilder.cs @@ -0,0 +1,194 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Ayllu.Github.Client.Orgs.Item.Dependabot.Secrets.Item.Repositories; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Orgs.Item.Dependabot.Secrets.Item +{ + /// + /// Builds and executes requests for operations under \orgs\{org}\dependabot\secrets\{secret_name} + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithSecret_nameItemRequestBuilder : BaseRequestBuilder + { + /// The repositories property + public global::Ayllu.Github.Client.Orgs.Item.Dependabot.Secrets.Item.Repositories.RepositoriesRequestBuilder Repositories + { + get => new global::Ayllu.Github.Client.Orgs.Item.Dependabot.Secrets.Item.Repositories.RepositoriesRequestBuilder(PathParameters, RequestAdapter); + } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public WithSecret_nameItemRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/orgs/{org}/dependabot/secrets/{secret_name}", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public WithSecret_nameItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/orgs/{org}/dependabot/secrets/{secret_name}", rawUrl) + { + } + /// + /// 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 + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task DeleteAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task DeleteAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToDeleteRequestInformation(requestConfiguration); + await RequestAdapter.SendNoContentAsync(requestInfo, default, cancellationToken).ConfigureAwait(false); + } + /// + /// 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. + /// API method documentation + /// + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Models.OrganizationDependabotSecret.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false); + } + /// + /// 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/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. + /// API method documentation + /// + /// A + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PutAsync(global::Ayllu.Github.Client.Orgs.Item.Dependabot.Secrets.Item.WithSecret_namePutRequestBody body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task PutAsync(global::Ayllu.Github.Client.Orgs.Item.Dependabot.Secrets.Item.WithSecret_namePutRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPutRequestInformation(body, requestConfiguration); + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Models.EmptyObject.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false); + } + /// + /// 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. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToDeleteRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToDeleteRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.DELETE, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + return requestInfo; + } + /// + /// 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. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// 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/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. + /// + /// A + /// The request body + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPutRequestInformation(global::Ayllu.Github.Client.Orgs.Item.Dependabot.Secrets.Item.WithSecret_namePutRequestBody body, Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToPutRequestInformation(global::Ayllu.Github.Client.Orgs.Item.Dependabot.Secrets.Item.WithSecret_namePutRequestBody body, Action> requestConfiguration = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation(Method.PUT, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.Orgs.Item.Dependabot.Secrets.Item.WithSecret_nameItemRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Orgs.Item.Dependabot.Secrets.Item.WithSecret_nameItemRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithSecret_nameItemRequestBuilderDeleteRequestConfiguration : RequestConfiguration + { + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithSecret_nameItemRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithSecret_nameItemRequestBuilderPutRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Dependabot/Secrets/Item/WithSecret_namePutRequestBody.cs b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Dependabot/Secrets/Item/WithSecret_namePutRequestBody.cs new file mode 100644 index 0000000..a6422eb --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Dependabot/Secrets/Item/WithSecret_namePutRequestBody.cs @@ -0,0 +1,89 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Orgs.Item.Dependabot.Secrets.Item +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class WithSecret_namePutRequestBody : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// 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/rest/dependabot/secrets#get-an-organization-public-key) endpoint. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? EncryptedValue { get; set; } +#nullable restore +#else + public string EncryptedValue { get; set; } +#endif + /// ID of the key you used to encrypt the secret. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? KeyId { get; set; } +#nullable restore +#else + public string KeyId { get; set; } +#endif + /// 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/rest/dependabot/secrets#list-selected-repositories-for-an-organization-secret), [Set selected repositories for an organization secret](https://docs.github.com/rest/dependabot/secrets#set-selected-repositories-for-an-organization-secret), and [Remove selected repository from an organization secret](https://docs.github.com/rest/dependabot/secrets#remove-selected-repository-from-an-organization-secret) endpoints. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? SelectedRepositoryIds { get; set; } +#nullable restore +#else + public List SelectedRepositoryIds { get; set; } +#endif + /// 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. + public global::Ayllu.Github.Client.Orgs.Item.Dependabot.Secrets.Item.WithSecret_namePutRequestBody_visibility? Visibility { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public WithSecret_namePutRequestBody() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Orgs.Item.Dependabot.Secrets.Item.WithSecret_namePutRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Orgs.Item.Dependabot.Secrets.Item.WithSecret_namePutRequestBody(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "encrypted_value", n => { EncryptedValue = n.GetStringValue(); } }, + { "key_id", n => { KeyId = n.GetStringValue(); } }, + { "selected_repository_ids", n => { SelectedRepositoryIds = n.GetCollectionOfPrimitiveValues()?.AsList(); } }, + { "visibility", n => { Visibility = n.GetEnumValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("encrypted_value", EncryptedValue); + writer.WriteStringValue("key_id", KeyId); + writer.WriteCollectionOfPrimitiveValues("selected_repository_ids", SelectedRepositoryIds); + writer.WriteEnumValue("visibility", Visibility); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Dependabot/Secrets/Item/WithSecret_namePutRequestBody_visibility.cs b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Dependabot/Secrets/Item/WithSecret_namePutRequestBody_visibility.cs new file mode 100644 index 0000000..5186cd4 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Dependabot/Secrets/Item/WithSecret_namePutRequestBody_visibility.cs @@ -0,0 +1,23 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Orgs.Item.Dependabot.Secrets.Item +{ + /// 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. + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public enum WithSecret_namePutRequestBody_visibility + { + [EnumMember(Value = "all")] + #pragma warning disable CS1591 + All, + #pragma warning restore CS1591 + [EnumMember(Value = "private")] + #pragma warning disable CS1591 + Private, + #pragma warning restore CS1591 + [EnumMember(Value = "selected")] + #pragma warning disable CS1591 + Selected, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Dependabot/Secrets/PublicKey/PublicKeyRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Dependabot/Secrets/PublicKey/PublicKeyRequestBuilder.cs new file mode 100644 index 0000000..bcfa28d --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Dependabot/Secrets/PublicKey/PublicKeyRequestBuilder.cs @@ -0,0 +1,93 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Orgs.Item.Dependabot.Secrets.PublicKey +{ + /// + /// Builds and executes requests for operations under \orgs\{org}\dependabot\secrets\public-key + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class PublicKeyRequestBuilder : BaseRequestBuilder + { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public PublicKeyRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/orgs/{org}/dependabot/secrets/public-key", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public PublicKeyRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/orgs/{org}/dependabot/secrets/public-key", rawUrl) + { + } + /// + /// 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. + /// API method documentation + /// + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Models.DependabotPublicKey.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false); + } + /// + /// 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. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.Orgs.Item.Dependabot.Secrets.PublicKey.PublicKeyRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Orgs.Item.Dependabot.Secrets.PublicKey.PublicKeyRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class PublicKeyRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Dependabot/Secrets/SecretsGetResponse.cs b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Dependabot/Secrets/SecretsGetResponse.cs new file mode 100644 index 0000000..7801b58 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Dependabot/Secrets/SecretsGetResponse.cs @@ -0,0 +1,70 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Orgs.Item.Dependabot.Secrets +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class SecretsGetResponse : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The secrets property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? Secrets { get; set; } +#nullable restore +#else + public List Secrets { get; set; } +#endif + /// The total_count property + public int? TotalCount { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public SecretsGetResponse() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Orgs.Item.Dependabot.Secrets.SecretsGetResponse CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Orgs.Item.Dependabot.Secrets.SecretsGetResponse(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "secrets", n => { Secrets = n.GetCollectionOfObjectValues(global::Ayllu.Github.Client.Models.OrganizationDependabotSecret.CreateFromDiscriminatorValue)?.AsList(); } }, + { "total_count", n => { TotalCount = n.GetIntValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteCollectionOfObjectValues("secrets", Secrets); + writer.WriteIntValue("total_count", TotalCount); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Dependabot/Secrets/SecretsRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Dependabot/Secrets/SecretsRequestBuilder.cs new file mode 100644 index 0000000..5336fed --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Dependabot/Secrets/SecretsRequestBuilder.cs @@ -0,0 +1,144 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Orgs.Item.Dependabot.Secrets.Item; +using Ayllu.Github.Client.Orgs.Item.Dependabot.Secrets.PublicKey; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Orgs.Item.Dependabot.Secrets +{ + /// + /// Builds and executes requests for operations under \orgs\{org}\dependabot\secrets + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class SecretsRequestBuilder : BaseRequestBuilder + { + /// The publicKey property + public global::Ayllu.Github.Client.Orgs.Item.Dependabot.Secrets.PublicKey.PublicKeyRequestBuilder PublicKey + { + get => new global::Ayllu.Github.Client.Orgs.Item.Dependabot.Secrets.PublicKey.PublicKeyRequestBuilder(PathParameters, RequestAdapter); + } + /// Gets an item from the Ayllu.Github.Client.orgs.item.dependabot.secrets.item collection + /// The name of the secret. + /// A + public global::Ayllu.Github.Client.Orgs.Item.Dependabot.Secrets.Item.WithSecret_nameItemRequestBuilder this[string position] + { + get + { + var urlTplParams = new Dictionary(PathParameters); + urlTplParams.Add("secret_name", position); + return new global::Ayllu.Github.Client.Orgs.Item.Dependabot.Secrets.Item.WithSecret_nameItemRequestBuilder(urlTplParams, RequestAdapter); + } + } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public SecretsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/orgs/{org}/dependabot/secrets{?page*,per_page*}", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public SecretsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/orgs/{org}/dependabot/secrets{?page*,per_page*}", rawUrl) + { + } + /// + /// 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. + /// API method documentation + /// + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsSecretsGetResponseAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task GetAsSecretsGetResponseAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Orgs.Item.Dependabot.Secrets.SecretsGetResponse.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false); + } + /// + /// 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. + /// API method documentation + /// + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + [Obsolete("This method is obsolete. Use GetAsSecretsGetResponseAsync instead.")] +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Orgs.Item.Dependabot.Secrets.SecretsResponse.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false); + } + /// + /// 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. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.Orgs.Item.Dependabot.Secrets.SecretsRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Orgs.Item.Dependabot.Secrets.SecretsRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// 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. + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class SecretsRequestBuilderGetQueryParameters + { + /// The page number of the results to fetch. For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." + [QueryParameter("page")] + public int? Page { get; set; } + /// The number of results per page (max 100). For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." + [QueryParameter("per_page")] + public int? PerPage { get; set; } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class SecretsRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Dependabot/Secrets/SecretsResponse.cs b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Dependabot/Secrets/SecretsResponse.cs new file mode 100644 index 0000000..ebbfcc5 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Dependabot/Secrets/SecretsResponse.cs @@ -0,0 +1,28 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Orgs.Item.Dependabot.Secrets +{ + [Obsolete("This class is obsolete. Use SecretsGetResponse instead.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class SecretsResponse : global::Ayllu.Github.Client.Orgs.Item.Dependabot.Secrets.SecretsGetResponse, IParsable + #pragma warning restore CS1591 + { + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static new global::Ayllu.Github.Client.Orgs.Item.Dependabot.Secrets.SecretsResponse CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Orgs.Item.Dependabot.Secrets.SecretsResponse(); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Docker/Conflicts/ConflictsRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Docker/Conflicts/ConflictsRequestBuilder.cs new file mode 100644 index 0000000..df352f6 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Docker/Conflicts/ConflictsRequestBuilder.cs @@ -0,0 +1,101 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Orgs.Item.Docker.Conflicts +{ + /// + /// Builds and executes requests for operations under \orgs\{org}\docker\conflicts + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class ConflictsRequestBuilder : BaseRequestBuilder + { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public ConflictsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/orgs/{org}/docker/conflicts", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public ConflictsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/orgs/{org}/docker/conflicts", rawUrl) + { + } + /// + /// 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. + /// API method documentation + /// + /// A List<global::Ayllu.Github.Client.Models.Package> + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 401 status code + /// When receiving a 403 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task?> GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task> GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "401", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "403", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + }; + var collectionResult = await RequestAdapter.SendCollectionAsync(requestInfo, global::Ayllu.Github.Client.Models.Package.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + return collectionResult?.AsList(); + } + /// + /// 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. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.Orgs.Item.Docker.Conflicts.ConflictsRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Orgs.Item.Docker.Conflicts.ConflictsRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class ConflictsRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Docker/DockerRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Docker/DockerRequestBuilder.cs new file mode 100644 index 0000000..4d23821 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Docker/DockerRequestBuilder.cs @@ -0,0 +1,41 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Orgs.Item.Docker.Conflicts; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System; +namespace Ayllu.Github.Client.Orgs.Item.Docker +{ + /// + /// Builds and executes requests for operations under \orgs\{org}\docker + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class DockerRequestBuilder : BaseRequestBuilder + { + /// The conflicts property + public global::Ayllu.Github.Client.Orgs.Item.Docker.Conflicts.ConflictsRequestBuilder Conflicts + { + get => new global::Ayllu.Github.Client.Orgs.Item.Docker.Conflicts.ConflictsRequestBuilder(PathParameters, RequestAdapter); + } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public DockerRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/orgs/{org}/docker", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public DockerRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/orgs/{org}/docker", rawUrl) + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Events/EventsRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Events/EventsRequestBuilder.cs new file mode 100644 index 0000000..70ad9af --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Events/EventsRequestBuilder.cs @@ -0,0 +1,107 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Orgs.Item.Events +{ + /// + /// Builds and executes requests for operations under \orgs\{org}\events + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class EventsRequestBuilder : BaseRequestBuilder + { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public EventsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/orgs/{org}/events{?page*,per_page*}", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public EventsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/orgs/{org}/events{?page*,per_page*}", rawUrl) + { + } + /// + /// > [!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. + /// API method documentation + /// + /// A List<global::Ayllu.Github.Client.Models.Event> + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task?> GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task> GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var collectionResult = await RequestAdapter.SendCollectionAsync(requestInfo, global::Ayllu.Github.Client.Models.Event.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false); + return collectionResult?.AsList(); + } + /// + /// > [!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. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.Orgs.Item.Events.EventsRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Orgs.Item.Events.EventsRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// > [!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. + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class EventsRequestBuilderGetQueryParameters + { + /// The page number of the results to fetch. For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." + [QueryParameter("page")] + public int? Page { get; set; } + /// The number of results per page (max 100). For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." + [QueryParameter("per_page")] + public int? PerPage { get; set; } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class EventsRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Failed_invitations/Failed_invitationsRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Failed_invitations/Failed_invitationsRequestBuilder.cs new file mode 100644 index 0000000..187f48c --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Failed_invitations/Failed_invitationsRequestBuilder.cs @@ -0,0 +1,112 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Orgs.Item.Failed_invitations +{ + /// + /// Builds and executes requests for operations under \orgs\{org}\failed_invitations + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class Failed_invitationsRequestBuilder : BaseRequestBuilder + { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public Failed_invitationsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/orgs/{org}/failed_invitations{?page*,per_page*}", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public Failed_invitationsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/orgs/{org}/failed_invitations{?page*,per_page*}", rawUrl) + { + } + /// + /// 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. + /// API method documentation + /// + /// A List<global::Ayllu.Github.Client.Models.OrganizationInvitation> + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 404 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task?> GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task> GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "404", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + }; + var collectionResult = await RequestAdapter.SendCollectionAsync(requestInfo, global::Ayllu.Github.Client.Models.OrganizationInvitation.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + return collectionResult?.AsList(); + } + /// + /// 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. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.Orgs.Item.Failed_invitations.Failed_invitationsRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Orgs.Item.Failed_invitations.Failed_invitationsRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// 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. + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class Failed_invitationsRequestBuilderGetQueryParameters + { + /// The page number of the results to fetch. For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." + [QueryParameter("page")] + public int? Page { get; set; } + /// The number of results per page (max 100). For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." + [QueryParameter("per_page")] + public int? PerPage { get; set; } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class Failed_invitationsRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Hooks/HooksPostRequestBody.cs b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Hooks/HooksPostRequestBody.cs new file mode 100644 index 0000000..748b6d2 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Hooks/HooksPostRequestBody.cs @@ -0,0 +1,89 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Orgs.Item.Hooks +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class HooksPostRequestBody : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Determines if notifications are sent when the webhook is triggered. Set to `true` to send notifications. + public bool? Active { get; set; } + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// Key/value pairs to provide settings for this webhook. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Orgs.Item.Hooks.HooksPostRequestBody_config? Config { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Orgs.Item.Hooks.HooksPostRequestBody_config Config { get; set; } +#endif + /// Determines what [events](https://docs.github.com/webhooks/event-payloads) the hook is triggered for. Set to `["*"]` to receive all possible events. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? Events { get; set; } +#nullable restore +#else + public List Events { get; set; } +#endif + /// Must be passed as "web". +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Name { get; set; } +#nullable restore +#else + public string Name { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public HooksPostRequestBody() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Orgs.Item.Hooks.HooksPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Orgs.Item.Hooks.HooksPostRequestBody(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "active", n => { Active = n.GetBoolValue(); } }, + { "config", n => { Config = n.GetObjectValue(global::Ayllu.Github.Client.Orgs.Item.Hooks.HooksPostRequestBody_config.CreateFromDiscriminatorValue); } }, + { "events", n => { Events = n.GetCollectionOfPrimitiveValues()?.AsList(); } }, + { "name", n => { Name = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteBoolValue("active", Active); + writer.WriteObjectValue("config", Config); + writer.WriteCollectionOfPrimitiveValues("events", Events); + writer.WriteStringValue("name", Name); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Hooks/HooksPostRequestBody_config.cs b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Hooks/HooksPostRequestBody_config.cs new file mode 100644 index 0000000..30217c0 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Hooks/HooksPostRequestBody_config.cs @@ -0,0 +1,117 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Orgs.Item.Hooks +{ + /// + /// Key/value pairs to provide settings for this webhook. + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class HooksPostRequestBody_config : IAdditionalDataHolder, IParsable + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The media type used to serialize the payloads. Supported values include `json` and `form`. The default is `form`. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? ContentType { get; set; } +#nullable restore +#else + public string ContentType { get; set; } +#endif + /// The insecure_ssl property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.WebhookConfigInsecureSsl? InsecureSsl { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.WebhookConfigInsecureSsl InsecureSsl { get; set; } +#endif + /// The password property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Password { get; set; } +#nullable restore +#else + public string Password { get; set; } +#endif + /// 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/webhooks/event-payloads/#delivery-headers). +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Secret { get; set; } +#nullable restore +#else + public string Secret { get; set; } +#endif + /// The URL to which the payloads will be delivered. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Url { get; set; } +#nullable restore +#else + public string Url { get; set; } +#endif + /// The username property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Username { get; set; } +#nullable restore +#else + public string Username { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public HooksPostRequestBody_config() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Orgs.Item.Hooks.HooksPostRequestBody_config CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Orgs.Item.Hooks.HooksPostRequestBody_config(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "content_type", n => { ContentType = n.GetStringValue(); } }, + { "insecure_ssl", n => { InsecureSsl = n.GetObjectValue(global::Ayllu.Github.Client.Models.WebhookConfigInsecureSsl.CreateFromDiscriminatorValue); } }, + { "password", n => { Password = n.GetStringValue(); } }, + { "secret", n => { Secret = n.GetStringValue(); } }, + { "url", n => { Url = n.GetStringValue(); } }, + { "username", n => { Username = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("content_type", ContentType); + writer.WriteObjectValue("insecure_ssl", InsecureSsl); + writer.WriteStringValue("password", Password); + writer.WriteStringValue("secret", Secret); + writer.WriteStringValue("url", Url); + writer.WriteStringValue("username", Username); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Hooks/HooksRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Hooks/HooksRequestBuilder.cs new file mode 100644 index 0000000..f356d10 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Hooks/HooksRequestBuilder.cs @@ -0,0 +1,196 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Ayllu.Github.Client.Orgs.Item.Hooks.Item; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Orgs.Item.Hooks +{ + /// + /// Builds and executes requests for operations under \orgs\{org}\hooks + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class HooksRequestBuilder : BaseRequestBuilder + { + /// Gets an item from the Ayllu.Github.Client.orgs.item.hooks.item collection + /// The unique identifier of the hook. You can find this value in the `X-GitHub-Hook-ID` header of a webhook delivery. + /// A + public global::Ayllu.Github.Client.Orgs.Item.Hooks.Item.WithHook_ItemRequestBuilder this[int position] + { + get + { + var urlTplParams = new Dictionary(PathParameters); + urlTplParams.Add("hook_id", position); + return new global::Ayllu.Github.Client.Orgs.Item.Hooks.Item.WithHook_ItemRequestBuilder(urlTplParams, RequestAdapter); + } + } + /// Gets an item from the Ayllu.Github.Client.orgs.item.hooks.item collection + /// The unique identifier of the hook. You can find this value in the `X-GitHub-Hook-ID` header of a webhook delivery. + /// A + [Obsolete("This indexer is deprecated and will be removed in the next major version. Use the one with the typed parameter instead.")] + public global::Ayllu.Github.Client.Orgs.Item.Hooks.Item.WithHook_ItemRequestBuilder this[string position] + { + get + { + var urlTplParams = new Dictionary(PathParameters); + if (!string.IsNullOrWhiteSpace(position)) urlTplParams.Add("hook_id", position); + return new global::Ayllu.Github.Client.Orgs.Item.Hooks.Item.WithHook_ItemRequestBuilder(urlTplParams, RequestAdapter); + } + } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public HooksRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/orgs/{org}/hooks{?page*,per_page*}", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public HooksRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/orgs/{org}/hooks{?page*,per_page*}", rawUrl) + { + } + /// + /// List webhooks for an organization.The authenticated user must be an organization owner to use this endpoint.OAuth app tokens and personal access tokens (classic) need `admin:org_hook` scope. OAuth apps cannot list, view, or editwebhooks that they did not create and users cannot list, view, or edit webhooks that were created by OAuth apps. + /// API method documentation + /// + /// A List<global::Ayllu.Github.Client.Models.OrgHook> + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 404 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task?> GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task> GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "404", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + }; + var collectionResult = await RequestAdapter.SendCollectionAsync(requestInfo, global::Ayllu.Github.Client.Models.OrgHook.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + return collectionResult?.AsList(); + } + /// + /// Create a hook that posts payloads in JSON format.You must be an organization owner to use this endpoint.OAuth app tokens and personal access tokens (classic) need `admin:org_hook` scope. OAuth apps cannot list, view, oredit webhooks that they did not create and users cannot list, view, or edit webhooks that were created by OAuth apps. + /// API method documentation + /// + /// A + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 404 status code + /// When receiving a 422 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PostAsync(global::Ayllu.Github.Client.Orgs.Item.Hooks.HooksPostRequestBody body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task PostAsync(global::Ayllu.Github.Client.Orgs.Item.Hooks.HooksPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPostRequestInformation(body, requestConfiguration); + var errorMapping = new Dictionary> + { + { "404", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "422", global::Ayllu.Github.Client.Models.ValidationError.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Models.OrgHook.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// List webhooks for an organization.The authenticated user must be an organization owner to use this endpoint.OAuth app tokens and personal access tokens (classic) need `admin:org_hook` scope. OAuth apps cannot list, view, or editwebhooks that they did not create and users cannot list, view, or edit webhooks that were created by OAuth apps. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Create a hook that posts payloads in JSON format.You must be an organization owner to use this endpoint.OAuth app tokens and personal access tokens (classic) need `admin:org_hook` scope. OAuth apps cannot list, view, oredit webhooks that they did not create and users cannot list, view, or edit webhooks that were created by OAuth apps. + /// + /// A + /// The request body + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPostRequestInformation(global::Ayllu.Github.Client.Orgs.Item.Hooks.HooksPostRequestBody body, Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToPostRequestInformation(global::Ayllu.Github.Client.Orgs.Item.Hooks.HooksPostRequestBody body, Action> requestConfiguration = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.Orgs.Item.Hooks.HooksRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Orgs.Item.Hooks.HooksRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// List webhooks for an organization.The authenticated user must be an organization owner to use this endpoint.OAuth app tokens and personal access tokens (classic) need `admin:org_hook` scope. OAuth apps cannot list, view, or editwebhooks that they did not create and users cannot list, view, or edit webhooks that were created by OAuth apps. + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class HooksRequestBuilderGetQueryParameters + { + /// The page number of the results to fetch. For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." + [QueryParameter("page")] + public int? Page { get; set; } + /// The number of results per page (max 100). For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." + [QueryParameter("per_page")] + public int? PerPage { get; set; } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class HooksRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class HooksRequestBuilderPostRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Hooks/Item/Config/ConfigPatchRequestBody.cs b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Hooks/Item/Config/ConfigPatchRequestBody.cs new file mode 100644 index 0000000..671e626 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Hooks/Item/Config/ConfigPatchRequestBody.cs @@ -0,0 +1,96 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Orgs.Item.Hooks.Item.Config +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class ConfigPatchRequestBody : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The media type used to serialize the payloads. Supported values include `json` and `form`. The default is `form`. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? ContentType { get; set; } +#nullable restore +#else + public string ContentType { get; set; } +#endif + /// The insecure_ssl property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.WebhookConfigInsecureSsl? InsecureSsl { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.WebhookConfigInsecureSsl InsecureSsl { get; set; } +#endif + /// 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/webhooks/event-payloads/#delivery-headers). +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Secret { get; set; } +#nullable restore +#else + public string Secret { get; set; } +#endif + /// The URL to which the payloads will be delivered. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Url { get; set; } +#nullable restore +#else + public string Url { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public ConfigPatchRequestBody() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Orgs.Item.Hooks.Item.Config.ConfigPatchRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Orgs.Item.Hooks.Item.Config.ConfigPatchRequestBody(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "content_type", n => { ContentType = n.GetStringValue(); } }, + { "insecure_ssl", n => { InsecureSsl = n.GetObjectValue(global::Ayllu.Github.Client.Models.WebhookConfigInsecureSsl.CreateFromDiscriminatorValue); } }, + { "secret", n => { Secret = n.GetStringValue(); } }, + { "url", n => { Url = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("content_type", ContentType); + writer.WriteObjectValue("insecure_ssl", InsecureSsl); + writer.WriteStringValue("secret", Secret); + writer.WriteStringValue("url", Url); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Hooks/Item/Config/ConfigRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Hooks/Item/Config/ConfigRequestBuilder.cs new file mode 100644 index 0000000..de54172 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Hooks/Item/Config/ConfigRequestBuilder.cs @@ -0,0 +1,144 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Orgs.Item.Hooks.Item.Config +{ + /// + /// Builds and executes requests for operations under \orgs\{org}\hooks\{hook_id}\config + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class ConfigRequestBuilder : BaseRequestBuilder + { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public ConfigRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/orgs/{org}/hooks/{hook_id}/config", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public ConfigRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/orgs/{org}/hooks/{hook_id}/config", rawUrl) + { + } + /// + /// Returns the webhook configuration for an organization. To get more information about the webhook, including the `active` state and `events`, use "[Get an organization webhook ](/rest/orgs/webhooks#get-an-organization-webhook)."You must be an organization owner to use this endpoint.OAuth app tokens and personal access tokens (classic) need `admin:org_hook` scope. OAuth apps cannot list, view, or editwebhooks that they did not create and users cannot list, view, or edit webhooks that were created by OAuth apps. + /// API method documentation + /// + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Models.WebhookConfig.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false); + } + /// + /// Updates the webhook configuration for an organization. To update more information about the webhook, including the `active` state and `events`, use "[Update an organization webhook ](/rest/orgs/webhooks#update-an-organization-webhook)."You must be an organization owner to use this endpoint.OAuth app tokens and personal access tokens (classic) need `admin:org_hook` scope. OAuth apps cannot list, view, or editwebhooks that they did not create and users cannot list, view, or edit webhooks that were created by OAuth apps. + /// API method documentation + /// + /// A + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PatchAsync(global::Ayllu.Github.Client.Orgs.Item.Hooks.Item.Config.ConfigPatchRequestBody body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task PatchAsync(global::Ayllu.Github.Client.Orgs.Item.Hooks.Item.Config.ConfigPatchRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPatchRequestInformation(body, requestConfiguration); + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Models.WebhookConfig.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false); + } + /// + /// Returns the webhook configuration for an organization. To get more information about the webhook, including the `active` state and `events`, use "[Get an organization webhook ](/rest/orgs/webhooks#get-an-organization-webhook)."You must be an organization owner to use this endpoint.OAuth app tokens and personal access tokens (classic) need `admin:org_hook` scope. OAuth apps cannot list, view, or editwebhooks that they did not create and users cannot list, view, or edit webhooks that were created by OAuth apps. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Updates the webhook configuration for an organization. To update more information about the webhook, including the `active` state and `events`, use "[Update an organization webhook ](/rest/orgs/webhooks#update-an-organization-webhook)."You must be an organization owner to use this endpoint.OAuth app tokens and personal access tokens (classic) need `admin:org_hook` scope. OAuth apps cannot list, view, or editwebhooks that they did not create and users cannot list, view, or edit webhooks that were created by OAuth apps. + /// + /// A + /// The request body + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPatchRequestInformation(global::Ayllu.Github.Client.Orgs.Item.Hooks.Item.Config.ConfigPatchRequestBody body, Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToPatchRequestInformation(global::Ayllu.Github.Client.Orgs.Item.Hooks.Item.Config.ConfigPatchRequestBody body, Action> requestConfiguration = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.Orgs.Item.Hooks.Item.Config.ConfigRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Orgs.Item.Hooks.Item.Config.ConfigRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class ConfigRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class ConfigRequestBuilderPatchRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Hooks/Item/Deliveries/DeliveriesRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Hooks/Item/Deliveries/DeliveriesRequestBuilder.cs new file mode 100644 index 0000000..bc110b2 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Hooks/Item/Deliveries/DeliveriesRequestBuilder.cs @@ -0,0 +1,147 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Ayllu.Github.Client.Orgs.Item.Hooks.Item.Deliveries.Item; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Orgs.Item.Hooks.Item.Deliveries +{ + /// + /// Builds and executes requests for operations under \orgs\{org}\hooks\{hook_id}\deliveries + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class DeliveriesRequestBuilder : BaseRequestBuilder + { + /// Gets an item from the Ayllu.Github.Client.orgs.item.hooks.item.deliveries.item collection + /// Unique identifier of the item + /// A + public global::Ayllu.Github.Client.Orgs.Item.Hooks.Item.Deliveries.Item.WithDelivery_ItemRequestBuilder this[int position] + { + get + { + var urlTplParams = new Dictionary(PathParameters); + urlTplParams.Add("delivery_id", position); + return new global::Ayllu.Github.Client.Orgs.Item.Hooks.Item.Deliveries.Item.WithDelivery_ItemRequestBuilder(urlTplParams, RequestAdapter); + } + } + /// Gets an item from the Ayllu.Github.Client.orgs.item.hooks.item.deliveries.item collection + /// Unique identifier of the item + /// A + [Obsolete("This indexer is deprecated and will be removed in the next major version. Use the one with the typed parameter instead.")] + public global::Ayllu.Github.Client.Orgs.Item.Hooks.Item.Deliveries.Item.WithDelivery_ItemRequestBuilder this[string position] + { + get + { + var urlTplParams = new Dictionary(PathParameters); + if (!string.IsNullOrWhiteSpace(position)) urlTplParams.Add("delivery_id", position); + return new global::Ayllu.Github.Client.Orgs.Item.Hooks.Item.Deliveries.Item.WithDelivery_ItemRequestBuilder(urlTplParams, RequestAdapter); + } + } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public DeliveriesRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/orgs/{org}/hooks/{hook_id}/deliveries{?cursor*,per_page*}", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public DeliveriesRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/orgs/{org}/hooks/{hook_id}/deliveries{?cursor*,per_page*}", rawUrl) + { + } + /// + /// Returns a list of webhook deliveries for a webhook configured in an organization.You must be an organization owner to use this endpoint.OAuth app tokens and personal access tokens (classic) need `admin:org_hook` scope. OAuth apps cannot list, view, or editwebhooks that they did not create and users cannot list, view, or edit webhooks that were created by OAuth apps. + /// API method documentation + /// + /// A List<global::Ayllu.Github.Client.Models.HookDeliveryItem> + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 400 status code + /// When receiving a 422 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task?> GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task> GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "400", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "422", global::Ayllu.Github.Client.Models.ValidationError.CreateFromDiscriminatorValue }, + }; + var collectionResult = await RequestAdapter.SendCollectionAsync(requestInfo, global::Ayllu.Github.Client.Models.HookDeliveryItem.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + return collectionResult?.AsList(); + } + /// + /// Returns a list of webhook deliveries for a webhook configured in an organization.You must be an organization owner to use this endpoint.OAuth app tokens and personal access tokens (classic) need `admin:org_hook` scope. OAuth apps cannot list, view, or editwebhooks that they did not create and users cannot list, view, or edit webhooks that were created by OAuth apps. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.Orgs.Item.Hooks.Item.Deliveries.DeliveriesRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Orgs.Item.Hooks.Item.Deliveries.DeliveriesRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Returns a list of webhook deliveries for a webhook configured in an organization.You must be an organization owner to use this endpoint.OAuth app tokens and personal access tokens (classic) need `admin:org_hook` scope. OAuth apps cannot list, view, or editwebhooks that they did not create and users cannot list, view, or edit webhooks that were created by OAuth apps. + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class DeliveriesRequestBuilderGetQueryParameters + { + /// 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. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("cursor")] + public string? Cursor { get; set; } +#nullable restore +#else + [QueryParameter("cursor")] + public string Cursor { get; set; } +#endif + /// The number of results per page (max 100). For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." + [QueryParameter("per_page")] + public int? PerPage { get; set; } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class DeliveriesRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Hooks/Item/Deliveries/Item/Attempts/AttemptsPostResponse.cs b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Hooks/Item/Deliveries/Item/Attempts/AttemptsPostResponse.cs new file mode 100644 index 0000000..3c81395 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Hooks/Item/Deliveries/Item/Attempts/AttemptsPostResponse.cs @@ -0,0 +1,55 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Orgs.Item.Hooks.Item.Deliveries.Item.Attempts +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class AttemptsPostResponse : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public AttemptsPostResponse() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Orgs.Item.Hooks.Item.Deliveries.Item.Attempts.AttemptsPostResponse CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Orgs.Item.Hooks.Item.Deliveries.Item.Attempts.AttemptsPostResponse(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Hooks/Item/Deliveries/Item/Attempts/AttemptsRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Hooks/Item/Deliveries/Item/Attempts/AttemptsRequestBuilder.cs new file mode 100644 index 0000000..0a4ded0 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Hooks/Item/Deliveries/Item/Attempts/AttemptsRequestBuilder.cs @@ -0,0 +1,127 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Orgs.Item.Hooks.Item.Deliveries.Item.Attempts +{ + /// + /// Builds and executes requests for operations under \orgs\{org}\hooks\{hook_id}\deliveries\{delivery_id}\attempts + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class AttemptsRequestBuilder : BaseRequestBuilder + { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public AttemptsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/orgs/{org}/hooks/{hook_id}/deliveries/{delivery_id}/attempts", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public AttemptsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/orgs/{org}/hooks/{hook_id}/deliveries/{delivery_id}/attempts", rawUrl) + { + } + /// + /// Redeliver a delivery for a webhook configured in an organization.You must be an organization owner to use this endpoint.OAuth app tokens and personal access tokens (classic) need `admin:org_hook` scope. OAuth apps cannot list, view, or editwebhooks that they did not create and users cannot list, view, or edit webhooks that were created by OAuth apps. + /// API method documentation + /// + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 400 status code + /// When receiving a 422 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PostAsAttemptsPostResponseAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task PostAsAttemptsPostResponseAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToPostRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "400", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "422", global::Ayllu.Github.Client.Models.ValidationError.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Orgs.Item.Hooks.Item.Deliveries.Item.Attempts.AttemptsPostResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// Redeliver a delivery for a webhook configured in an organization.You must be an organization owner to use this endpoint.OAuth app tokens and personal access tokens (classic) need `admin:org_hook` scope. OAuth apps cannot list, view, or editwebhooks that they did not create and users cannot list, view, or edit webhooks that were created by OAuth apps. + /// API method documentation + /// + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 400 status code + /// When receiving a 422 status code + [Obsolete("This method is obsolete. Use PostAsAttemptsPostResponseAsync instead.")] +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PostAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task PostAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToPostRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "400", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "422", global::Ayllu.Github.Client.Models.ValidationError.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Orgs.Item.Hooks.Item.Deliveries.Item.Attempts.AttemptsResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// Redeliver a delivery for a webhook configured in an organization.You must be an organization owner to use this endpoint.OAuth app tokens and personal access tokens (classic) need `admin:org_hook` scope. OAuth apps cannot list, view, or editwebhooks that they did not create and users cannot list, view, or edit webhooks that were created by OAuth apps. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPostRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToPostRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.Orgs.Item.Hooks.Item.Deliveries.Item.Attempts.AttemptsRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Orgs.Item.Hooks.Item.Deliveries.Item.Attempts.AttemptsRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class AttemptsRequestBuilderPostRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Hooks/Item/Deliveries/Item/Attempts/AttemptsResponse.cs b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Hooks/Item/Deliveries/Item/Attempts/AttemptsResponse.cs new file mode 100644 index 0000000..8578d92 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Hooks/Item/Deliveries/Item/Attempts/AttemptsResponse.cs @@ -0,0 +1,28 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Orgs.Item.Hooks.Item.Deliveries.Item.Attempts +{ + [Obsolete("This class is obsolete. Use AttemptsPostResponse instead.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class AttemptsResponse : global::Ayllu.Github.Client.Orgs.Item.Hooks.Item.Deliveries.Item.Attempts.AttemptsPostResponse, IParsable + #pragma warning restore CS1591 + { + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static new global::Ayllu.Github.Client.Orgs.Item.Hooks.Item.Deliveries.Item.Attempts.AttemptsResponse CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Orgs.Item.Hooks.Item.Deliveries.Item.Attempts.AttemptsResponse(); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Hooks/Item/Deliveries/Item/WithDelivery_ItemRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Hooks/Item/Deliveries/Item/WithDelivery_ItemRequestBuilder.cs new file mode 100644 index 0000000..ed488d7 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Hooks/Item/Deliveries/Item/WithDelivery_ItemRequestBuilder.cs @@ -0,0 +1,106 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Ayllu.Github.Client.Orgs.Item.Hooks.Item.Deliveries.Item.Attempts; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Orgs.Item.Hooks.Item.Deliveries.Item +{ + /// + /// Builds and executes requests for operations under \orgs\{org}\hooks\{hook_id}\deliveries\{delivery_id} + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithDelivery_ItemRequestBuilder : BaseRequestBuilder + { + /// The attempts property + public global::Ayllu.Github.Client.Orgs.Item.Hooks.Item.Deliveries.Item.Attempts.AttemptsRequestBuilder Attempts + { + get => new global::Ayllu.Github.Client.Orgs.Item.Hooks.Item.Deliveries.Item.Attempts.AttemptsRequestBuilder(PathParameters, RequestAdapter); + } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public WithDelivery_ItemRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/orgs/{org}/hooks/{hook_id}/deliveries/{delivery_id}", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public WithDelivery_ItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/orgs/{org}/hooks/{hook_id}/deliveries/{delivery_id}", rawUrl) + { + } + /// + /// Returns a delivery for a webhook configured in an organization.You must be an organization owner to use this endpoint.OAuth app tokens and personal access tokens (classic) need `admin:org_hook` scope. OAuth apps cannot list, view, or editwebhooks that they did not create and users cannot list, view, or edit webhooks that were created by OAuth apps. + /// API method documentation + /// + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 400 status code + /// When receiving a 422 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "400", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "422", global::Ayllu.Github.Client.Models.ValidationError.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Models.HookDelivery.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// Returns a delivery for a webhook configured in an organization.You must be an organization owner to use this endpoint.OAuth app tokens and personal access tokens (classic) need `admin:org_hook` scope. OAuth apps cannot list, view, or editwebhooks that they did not create and users cannot list, view, or edit webhooks that were created by OAuth apps. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.Orgs.Item.Hooks.Item.Deliveries.Item.WithDelivery_ItemRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Orgs.Item.Hooks.Item.Deliveries.Item.WithDelivery_ItemRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithDelivery_ItemRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Hooks/Item/Pings/PingsRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Hooks/Item/Pings/PingsRequestBuilder.cs new file mode 100644 index 0000000..9127a21 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Hooks/Item/Pings/PingsRequestBuilder.cs @@ -0,0 +1,97 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Orgs.Item.Hooks.Item.Pings +{ + /// + /// Builds and executes requests for operations under \orgs\{org}\hooks\{hook_id}\pings + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class PingsRequestBuilder : BaseRequestBuilder + { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public PingsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/orgs/{org}/hooks/{hook_id}/pings", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public PingsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/orgs/{org}/hooks/{hook_id}/pings", rawUrl) + { + } + /// + /// This will trigger a [ping event](https://docs.github.com/webhooks/#ping-event)to be sent to the hook.You must be an organization owner to use this endpoint.OAuth app tokens and personal access tokens (classic) need `admin:org_hook` scope. OAuth apps cannot list, view, or editwebhooks that they did not create and users cannot list, view, or edit webhooks that were created by OAuth apps. + /// API method documentation + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 404 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PostAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task PostAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToPostRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "404", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + }; + await RequestAdapter.SendNoContentAsync(requestInfo, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// This will trigger a [ping event](https://docs.github.com/webhooks/#ping-event)to be sent to the hook.You must be an organization owner to use this endpoint.OAuth app tokens and personal access tokens (classic) need `admin:org_hook` scope. OAuth apps cannot list, view, or editwebhooks that they did not create and users cannot list, view, or edit webhooks that were created by OAuth apps. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPostRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToPostRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.Orgs.Item.Hooks.Item.Pings.PingsRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Orgs.Item.Hooks.Item.Pings.PingsRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class PingsRequestBuilderPostRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Hooks/Item/WithHook_ItemRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Hooks/Item/WithHook_ItemRequestBuilder.cs new file mode 100644 index 0000000..55efa5c --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Hooks/Item/WithHook_ItemRequestBuilder.cs @@ -0,0 +1,224 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Ayllu.Github.Client.Orgs.Item.Hooks.Item.Config; +using Ayllu.Github.Client.Orgs.Item.Hooks.Item.Deliveries; +using Ayllu.Github.Client.Orgs.Item.Hooks.Item.Pings; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Orgs.Item.Hooks.Item +{ + /// + /// Builds and executes requests for operations under \orgs\{org}\hooks\{hook_id} + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithHook_ItemRequestBuilder : BaseRequestBuilder + { + /// The config property + public global::Ayllu.Github.Client.Orgs.Item.Hooks.Item.Config.ConfigRequestBuilder Config + { + get => new global::Ayllu.Github.Client.Orgs.Item.Hooks.Item.Config.ConfigRequestBuilder(PathParameters, RequestAdapter); + } + /// The deliveries property + public global::Ayllu.Github.Client.Orgs.Item.Hooks.Item.Deliveries.DeliveriesRequestBuilder Deliveries + { + get => new global::Ayllu.Github.Client.Orgs.Item.Hooks.Item.Deliveries.DeliveriesRequestBuilder(PathParameters, RequestAdapter); + } + /// The pings property + public global::Ayllu.Github.Client.Orgs.Item.Hooks.Item.Pings.PingsRequestBuilder Pings + { + get => new global::Ayllu.Github.Client.Orgs.Item.Hooks.Item.Pings.PingsRequestBuilder(PathParameters, RequestAdapter); + } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public WithHook_ItemRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/orgs/{org}/hooks/{hook_id}", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public WithHook_ItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/orgs/{org}/hooks/{hook_id}", rawUrl) + { + } + /// + /// Delete a webhook for an organization.The authenticated user must be an organization owner to use this endpoint.OAuth app tokens and personal access tokens (classic) need `admin:org_hook` scope. OAuth apps cannot list, view, or editwebhooks that they did not create and users cannot list, view, or edit webhooks that were created by OAuth apps. + /// API method documentation + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 404 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task DeleteAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task DeleteAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToDeleteRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "404", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + }; + await RequestAdapter.SendNoContentAsync(requestInfo, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// Returns a webhook configured in an organization. To get only the webhook`config` properties, see "[Get a webhook configuration for an organization](/rest/orgs/webhooks#get-a-webhook-configuration-for-an-organization).You must be an organization owner to use this endpoint.OAuth app tokens and personal access tokens (classic) need `admin:org_hook` scope. OAuth apps cannot list, view, or editwebhooks that they did not create and users cannot list, view, or edit webhooks that were created by OAuth apps. + /// API method documentation + /// + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 404 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "404", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Models.OrgHook.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// Updates a webhook configured in an organization. When you update a webhook,the `secret` will be overwritten. If you previously had a `secret` set, you mustprovide the same `secret` or set a new `secret` or the secret will be removed. Ifyou are only updating individual webhook `config` properties, use "[Update a webhookconfiguration for an organization](/rest/orgs/webhooks#update-a-webhook-configuration-for-an-organization)".You must be an organization owner to use this endpoint.OAuth app tokens and personal access tokens (classic) need `admin:org_hook` scope. OAuth apps cannot list, view, or editwebhooks that they did not create and users cannot list, view, or edit webhooks that were created by OAuth apps. + /// API method documentation + /// + /// A + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 404 status code + /// When receiving a 422 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PatchAsync(global::Ayllu.Github.Client.Orgs.Item.Hooks.Item.WithHook_PatchRequestBody body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task PatchAsync(global::Ayllu.Github.Client.Orgs.Item.Hooks.Item.WithHook_PatchRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPatchRequestInformation(body, requestConfiguration); + var errorMapping = new Dictionary> + { + { "404", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "422", global::Ayllu.Github.Client.Models.ValidationError.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Models.OrgHook.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// Delete a webhook for an organization.The authenticated user must be an organization owner to use this endpoint.OAuth app tokens and personal access tokens (classic) need `admin:org_hook` scope. OAuth apps cannot list, view, or editwebhooks that they did not create and users cannot list, view, or edit webhooks that were created by OAuth apps. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToDeleteRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToDeleteRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.DELETE, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Returns a webhook configured in an organization. To get only the webhook`config` properties, see "[Get a webhook configuration for an organization](/rest/orgs/webhooks#get-a-webhook-configuration-for-an-organization).You must be an organization owner to use this endpoint.OAuth app tokens and personal access tokens (classic) need `admin:org_hook` scope. OAuth apps cannot list, view, or editwebhooks that they did not create and users cannot list, view, or edit webhooks that were created by OAuth apps. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Updates a webhook configured in an organization. When you update a webhook,the `secret` will be overwritten. If you previously had a `secret` set, you mustprovide the same `secret` or set a new `secret` or the secret will be removed. Ifyou are only updating individual webhook `config` properties, use "[Update a webhookconfiguration for an organization](/rest/orgs/webhooks#update-a-webhook-configuration-for-an-organization)".You must be an organization owner to use this endpoint.OAuth app tokens and personal access tokens (classic) need `admin:org_hook` scope. OAuth apps cannot list, view, or editwebhooks that they did not create and users cannot list, view, or edit webhooks that were created by OAuth apps. + /// + /// A + /// The request body + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPatchRequestInformation(global::Ayllu.Github.Client.Orgs.Item.Hooks.Item.WithHook_PatchRequestBody body, Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToPatchRequestInformation(global::Ayllu.Github.Client.Orgs.Item.Hooks.Item.WithHook_PatchRequestBody body, Action> requestConfiguration = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.Orgs.Item.Hooks.Item.WithHook_ItemRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Orgs.Item.Hooks.Item.WithHook_ItemRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithHook_ItemRequestBuilderDeleteRequestConfiguration : RequestConfiguration + { + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithHook_ItemRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithHook_ItemRequestBuilderPatchRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Hooks/Item/WithHook_PatchRequestBody.cs b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Hooks/Item/WithHook_PatchRequestBody.cs new file mode 100644 index 0000000..fd9d309 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Hooks/Item/WithHook_PatchRequestBody.cs @@ -0,0 +1,89 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Orgs.Item.Hooks.Item +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class WithHook_PatchRequestBody : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Determines if notifications are sent when the webhook is triggered. Set to `true` to send notifications. + public bool? Active { get; set; } + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// Key/value pairs to provide settings for this webhook. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Orgs.Item.Hooks.Item.WithHook_PatchRequestBody_config? Config { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Orgs.Item.Hooks.Item.WithHook_PatchRequestBody_config Config { get; set; } +#endif + /// Determines what [events](https://docs.github.com/webhooks/event-payloads) the hook is triggered for. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? Events { get; set; } +#nullable restore +#else + public List Events { get; set; } +#endif + /// The name property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Name { get; set; } +#nullable restore +#else + public string Name { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public WithHook_PatchRequestBody() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Orgs.Item.Hooks.Item.WithHook_PatchRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Orgs.Item.Hooks.Item.WithHook_PatchRequestBody(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "active", n => { Active = n.GetBoolValue(); } }, + { "config", n => { Config = n.GetObjectValue(global::Ayllu.Github.Client.Orgs.Item.Hooks.Item.WithHook_PatchRequestBody_config.CreateFromDiscriminatorValue); } }, + { "events", n => { Events = n.GetCollectionOfPrimitiveValues()?.AsList(); } }, + { "name", n => { Name = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteBoolValue("active", Active); + writer.WriteObjectValue("config", Config); + writer.WriteCollectionOfPrimitiveValues("events", Events); + writer.WriteStringValue("name", Name); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Hooks/Item/WithHook_PatchRequestBody_config.cs b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Hooks/Item/WithHook_PatchRequestBody_config.cs new file mode 100644 index 0000000..c1b9423 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Hooks/Item/WithHook_PatchRequestBody_config.cs @@ -0,0 +1,97 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Orgs.Item.Hooks.Item +{ + /// + /// Key/value pairs to provide settings for this webhook. + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithHook_PatchRequestBody_config : IAdditionalDataHolder, IParsable + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The media type used to serialize the payloads. Supported values include `json` and `form`. The default is `form`. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? ContentType { get; set; } +#nullable restore +#else + public string ContentType { get; set; } +#endif + /// The insecure_ssl property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.WebhookConfigInsecureSsl? InsecureSsl { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.WebhookConfigInsecureSsl InsecureSsl { get; set; } +#endif + /// 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/webhooks/event-payloads/#delivery-headers). +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Secret { get; set; } +#nullable restore +#else + public string Secret { get; set; } +#endif + /// The URL to which the payloads will be delivered. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Url { get; set; } +#nullable restore +#else + public string Url { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public WithHook_PatchRequestBody_config() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Orgs.Item.Hooks.Item.WithHook_PatchRequestBody_config CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Orgs.Item.Hooks.Item.WithHook_PatchRequestBody_config(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "content_type", n => { ContentType = n.GetStringValue(); } }, + { "insecure_ssl", n => { InsecureSsl = n.GetObjectValue(global::Ayllu.Github.Client.Models.WebhookConfigInsecureSsl.CreateFromDiscriminatorValue); } }, + { "secret", n => { Secret = n.GetStringValue(); } }, + { "url", n => { Url = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("content_type", ContentType); + writer.WriteObjectValue("insecure_ssl", InsecureSsl); + writer.WriteStringValue("secret", Secret); + writer.WriteStringValue("url", Url); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Insights/Api/ApiRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Insights/Api/ApiRequestBuilder.cs new file mode 100644 index 0000000..9fe281d --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Insights/Api/ApiRequestBuilder.cs @@ -0,0 +1,65 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Orgs.Item.Insights.Api.RouteStats; +using Ayllu.Github.Client.Orgs.Item.Insights.Api.SubjectStats; +using Ayllu.Github.Client.Orgs.Item.Insights.Api.SummaryStats; +using Ayllu.Github.Client.Orgs.Item.Insights.Api.TimeStats; +using Ayllu.Github.Client.Orgs.Item.Insights.Api.UserStats; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System; +namespace Ayllu.Github.Client.Orgs.Item.Insights.Api +{ + /// + /// Builds and executes requests for operations under \orgs\{org}\insights\api + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class ApiRequestBuilder : BaseRequestBuilder + { + /// The routeStats property + public global::Ayllu.Github.Client.Orgs.Item.Insights.Api.RouteStats.RouteStatsRequestBuilder RouteStats + { + get => new global::Ayllu.Github.Client.Orgs.Item.Insights.Api.RouteStats.RouteStatsRequestBuilder(PathParameters, RequestAdapter); + } + /// The subjectStats property + public global::Ayllu.Github.Client.Orgs.Item.Insights.Api.SubjectStats.SubjectStatsRequestBuilder SubjectStats + { + get => new global::Ayllu.Github.Client.Orgs.Item.Insights.Api.SubjectStats.SubjectStatsRequestBuilder(PathParameters, RequestAdapter); + } + /// The summaryStats property + public global::Ayllu.Github.Client.Orgs.Item.Insights.Api.SummaryStats.SummaryStatsRequestBuilder SummaryStats + { + get => new global::Ayllu.Github.Client.Orgs.Item.Insights.Api.SummaryStats.SummaryStatsRequestBuilder(PathParameters, RequestAdapter); + } + /// The timeStats property + public global::Ayllu.Github.Client.Orgs.Item.Insights.Api.TimeStats.TimeStatsRequestBuilder TimeStats + { + get => new global::Ayllu.Github.Client.Orgs.Item.Insights.Api.TimeStats.TimeStatsRequestBuilder(PathParameters, RequestAdapter); + } + /// The userStats property + public global::Ayllu.Github.Client.Orgs.Item.Insights.Api.UserStats.UserStatsRequestBuilder UserStats + { + get => new global::Ayllu.Github.Client.Orgs.Item.Insights.Api.UserStats.UserStatsRequestBuilder(PathParameters, RequestAdapter); + } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public ApiRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/orgs/{org}/insights/api", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public ApiRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/orgs/{org}/insights/api", rawUrl) + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Insights/Api/RouteStats/Item/Item/GetDirectionQueryParameterType.cs b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Insights/Api/RouteStats/Item/Item/GetDirectionQueryParameterType.cs new file mode 100644 index 0000000..b8cb478 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Insights/Api/RouteStats/Item/Item/GetDirectionQueryParameterType.cs @@ -0,0 +1,20 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Orgs.Item.Insights.Api.RouteStats.Item.Item +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public enum GetDirectionQueryParameterType + #pragma warning restore CS1591 + { + [EnumMember(Value = "asc")] + #pragma warning disable CS1591 + Asc, + #pragma warning restore CS1591 + [EnumMember(Value = "desc")] + #pragma warning disable CS1591 + Desc, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Insights/Api/RouteStats/Item/Item/GetSortQueryParameterType.cs b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Insights/Api/RouteStats/Item/Item/GetSortQueryParameterType.cs new file mode 100644 index 0000000..d6c3594 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Insights/Api/RouteStats/Item/Item/GetSortQueryParameterType.cs @@ -0,0 +1,36 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Orgs.Item.Insights.Api.RouteStats.Item.Item +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public enum GetSortQueryParameterType + #pragma warning restore CS1591 + { + [EnumMember(Value = "last_rate_limited_timestamp")] + #pragma warning disable CS1591 + Last_rate_limited_timestamp, + #pragma warning restore CS1591 + [EnumMember(Value = "last_request_timestamp")] + #pragma warning disable CS1591 + Last_request_timestamp, + #pragma warning restore CS1591 + [EnumMember(Value = "rate_limited_request_count")] + #pragma warning disable CS1591 + Rate_limited_request_count, + #pragma warning restore CS1591 + [EnumMember(Value = "http_method")] + #pragma warning disable CS1591 + Http_method, + #pragma warning restore CS1591 + [EnumMember(Value = "api_route")] + #pragma warning disable CS1591 + Api_route, + #pragma warning restore CS1591 + [EnumMember(Value = "total_request_count")] + #pragma warning disable CS1591 + Total_request_count, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Insights/Api/RouteStats/Item/Item/WithActor_ItemRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Insights/Api/RouteStats/Item/Item/WithActor_ItemRequestBuilder.cs new file mode 100644 index 0000000..6a8f12a --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Insights/Api/RouteStats/Item/Item/WithActor_ItemRequestBuilder.cs @@ -0,0 +1,172 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Orgs.Item.Insights.Api.RouteStats.Item.Item +{ + /// + /// Builds and executes requests for operations under \orgs\{org}\insights\api\route-stats\{actor_type}\{actor_id} + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithActor_ItemRequestBuilder : BaseRequestBuilder + { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public WithActor_ItemRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/orgs/{org}/insights/api/route-stats/{actor_type}/{actor_id}?min_timestamp={min_timestamp}{&api_route_substring*,direction*,max_timestamp*,page*,per_page*,sort*}", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public WithActor_ItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/orgs/{org}/insights/api/route-stats/{actor_type}/{actor_id}?min_timestamp={min_timestamp}{&api_route_substring*,direction*,max_timestamp*,page*,per_page*,sort*}", rawUrl) + { + } + /// + /// Get API request count statistics for an actor broken down by route within a specified time frame. + /// API method documentation + /// + /// A List<global::Ayllu.Github.Client.Models.ApiInsightsRouteStats> + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task?> GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task> GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var collectionResult = await RequestAdapter.SendCollectionAsync(requestInfo, global::Ayllu.Github.Client.Models.ApiInsightsRouteStats.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false); + return collectionResult?.AsList(); + } + /// + /// Get API request count statistics for an actor broken down by route within a specified time frame. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.Orgs.Item.Insights.Api.RouteStats.Item.Item.WithActor_ItemRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Orgs.Item.Insights.Api.RouteStats.Item.Item.WithActor_ItemRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Get API request count statistics for an actor broken down by route within a specified time frame. + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithActor_ItemRequestBuilderGetQueryParameters + { + /// Providing a substring will filter results where the API route contains the substring. This is a case-insensitive search. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("api_route_substring")] + public string? ApiRouteSubstring { get; set; } +#nullable restore +#else + [QueryParameter("api_route_substring")] + public string ApiRouteSubstring { get; set; } +#endif + /// The direction to sort the results by. + [Obsolete("This property is deprecated, use DirectionAsGetDirectionQueryParameterType instead")] +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("direction")] + public string? Direction { get; set; } +#nullable restore +#else + [QueryParameter("direction")] + public string Direction { get; set; } +#endif + /// The direction to sort the results by. + [QueryParameter("direction")] + public global::Ayllu.Github.Client.Orgs.Item.Insights.Api.RouteStats.Item.Item.GetDirectionQueryParameterType? DirectionAsGetDirectionQueryParameterType { get; set; } + /// The maximum timestamp to query for stats. Defaults to the time 30 days ago. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("max_timestamp")] + public string? MaxTimestamp { get; set; } +#nullable restore +#else + [QueryParameter("max_timestamp")] + public string MaxTimestamp { get; set; } +#endif + /// The minimum timestamp to query for stats. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("min_timestamp")] + public string? MinTimestamp { get; set; } +#nullable restore +#else + [QueryParameter("min_timestamp")] + public string MinTimestamp { get; set; } +#endif + /// The page number of the results to fetch. For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." + [QueryParameter("page")] + public int? Page { get; set; } + /// The number of results per page (max 100). For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." + [QueryParameter("per_page")] + public int? PerPage { get; set; } + /// The property to sort the results by. + [Obsolete("This property is deprecated, use SortAsGetSortQueryParameterType instead")] +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("sort")] + public string[]? Sort { get; set; } +#nullable restore +#else + [QueryParameter("sort")] + public string[] Sort { get; set; } +#endif + /// The property to sort the results by. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("sort")] + public global::Ayllu.Github.Client.Orgs.Item.Insights.Api.RouteStats.Item.Item.GetSortQueryParameterType[]? SortAsGetSortQueryParameterType { get; set; } +#nullable restore +#else + [QueryParameter("sort")] + public global::Ayllu.Github.Client.Orgs.Item.Insights.Api.RouteStats.Item.Item.GetSortQueryParameterType[] SortAsGetSortQueryParameterType { get; set; } +#endif + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithActor_ItemRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Insights/Api/RouteStats/Item/WithActor_typeItemRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Insights/Api/RouteStats/Item/WithActor_typeItemRequestBuilder.cs new file mode 100644 index 0000000..0842948 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Insights/Api/RouteStats/Item/WithActor_typeItemRequestBuilder.cs @@ -0,0 +1,61 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Orgs.Item.Insights.Api.RouteStats.Item.Item; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System; +namespace Ayllu.Github.Client.Orgs.Item.Insights.Api.RouteStats.Item +{ + /// + /// Builds and executes requests for operations under \orgs\{org}\insights\api\route-stats\{actor_type} + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithActor_typeItemRequestBuilder : BaseRequestBuilder + { + /// Gets an item from the Ayllu.Github.Client.orgs.item.insights.api.routeStats.item.item collection + /// The ID of the actor + /// A + public global::Ayllu.Github.Client.Orgs.Item.Insights.Api.RouteStats.Item.Item.WithActor_ItemRequestBuilder this[int position] + { + get + { + var urlTplParams = new Dictionary(PathParameters); + urlTplParams.Add("actor_id", position); + return new global::Ayllu.Github.Client.Orgs.Item.Insights.Api.RouteStats.Item.Item.WithActor_ItemRequestBuilder(urlTplParams, RequestAdapter); + } + } + /// Gets an item from the Ayllu.Github.Client.orgs.item.insights.api.routeStats.item.item collection + /// The ID of the actor + /// A + [Obsolete("This indexer is deprecated and will be removed in the next major version. Use the one with the typed parameter instead.")] + public global::Ayllu.Github.Client.Orgs.Item.Insights.Api.RouteStats.Item.Item.WithActor_ItemRequestBuilder this[string position] + { + get + { + var urlTplParams = new Dictionary(PathParameters); + if (!string.IsNullOrWhiteSpace(position)) urlTplParams.Add("actor_id", position); + return new global::Ayllu.Github.Client.Orgs.Item.Insights.Api.RouteStats.Item.Item.WithActor_ItemRequestBuilder(urlTplParams, RequestAdapter); + } + } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public WithActor_typeItemRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/orgs/{org}/insights/api/route-stats/{actor_type}", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public WithActor_typeItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/orgs/{org}/insights/api/route-stats/{actor_type}", rawUrl) + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Insights/Api/RouteStats/RouteStatsRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Insights/Api/RouteStats/RouteStatsRequestBuilder.cs new file mode 100644 index 0000000..cb0e3f7 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Insights/Api/RouteStats/RouteStatsRequestBuilder.cs @@ -0,0 +1,48 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Orgs.Item.Insights.Api.RouteStats.Item; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System; +namespace Ayllu.Github.Client.Orgs.Item.Insights.Api.RouteStats +{ + /// + /// Builds and executes requests for operations under \orgs\{org}\insights\api\route-stats + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class RouteStatsRequestBuilder : BaseRequestBuilder + { + /// Gets an item from the Ayllu.Github.Client.orgs.item.insights.api.routeStats.item collection + /// The type of the actor + /// A + public global::Ayllu.Github.Client.Orgs.Item.Insights.Api.RouteStats.Item.WithActor_typeItemRequestBuilder this[string position] + { + get + { + var urlTplParams = new Dictionary(PathParameters); + urlTplParams.Add("actor_type", position); + return new global::Ayllu.Github.Client.Orgs.Item.Insights.Api.RouteStats.Item.WithActor_typeItemRequestBuilder(urlTplParams, RequestAdapter); + } + } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public RouteStatsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/orgs/{org}/insights/api/route-stats", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public RouteStatsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/orgs/{org}/insights/api/route-stats", rawUrl) + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Insights/Api/SubjectStats/GetDirectionQueryParameterType.cs b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Insights/Api/SubjectStats/GetDirectionQueryParameterType.cs new file mode 100644 index 0000000..1d6a24c --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Insights/Api/SubjectStats/GetDirectionQueryParameterType.cs @@ -0,0 +1,20 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Orgs.Item.Insights.Api.SubjectStats +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public enum GetDirectionQueryParameterType + #pragma warning restore CS1591 + { + [EnumMember(Value = "asc")] + #pragma warning disable CS1591 + Asc, + #pragma warning restore CS1591 + [EnumMember(Value = "desc")] + #pragma warning disable CS1591 + Desc, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Insights/Api/SubjectStats/GetSortQueryParameterType.cs b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Insights/Api/SubjectStats/GetSortQueryParameterType.cs new file mode 100644 index 0000000..8ef49f0 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Insights/Api/SubjectStats/GetSortQueryParameterType.cs @@ -0,0 +1,32 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Orgs.Item.Insights.Api.SubjectStats +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public enum GetSortQueryParameterType + #pragma warning restore CS1591 + { + [EnumMember(Value = "last_rate_limited_timestamp")] + #pragma warning disable CS1591 + Last_rate_limited_timestamp, + #pragma warning restore CS1591 + [EnumMember(Value = "last_request_timestamp")] + #pragma warning disable CS1591 + Last_request_timestamp, + #pragma warning restore CS1591 + [EnumMember(Value = "rate_limited_request_count")] + #pragma warning disable CS1591 + Rate_limited_request_count, + #pragma warning restore CS1591 + [EnumMember(Value = "subject_name")] + #pragma warning disable CS1591 + Subject_name, + #pragma warning restore CS1591 + [EnumMember(Value = "total_request_count")] + #pragma warning disable CS1591 + Total_request_count, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Insights/Api/SubjectStats/SubjectStatsRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Insights/Api/SubjectStats/SubjectStatsRequestBuilder.cs new file mode 100644 index 0000000..e5c2279 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Insights/Api/SubjectStats/SubjectStatsRequestBuilder.cs @@ -0,0 +1,172 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Orgs.Item.Insights.Api.SubjectStats +{ + /// + /// Builds and executes requests for operations under \orgs\{org}\insights\api\subject-stats + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class SubjectStatsRequestBuilder : BaseRequestBuilder + { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public SubjectStatsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/orgs/{org}/insights/api/subject-stats?min_timestamp={min_timestamp}{&direction*,max_timestamp*,page*,per_page*,sort*,subject_name_substring*}", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public SubjectStatsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/orgs/{org}/insights/api/subject-stats?min_timestamp={min_timestamp}{&direction*,max_timestamp*,page*,per_page*,sort*,subject_name_substring*}", rawUrl) + { + } + /// + /// Get API request statistics for all subjects within an organization within a specified time frame. Subjects can be users or GitHub Apps. + /// API method documentation + /// + /// A List<global::Ayllu.Github.Client.Models.ApiInsightsSubjectStats> + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task?> GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task> GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var collectionResult = await RequestAdapter.SendCollectionAsync(requestInfo, global::Ayllu.Github.Client.Models.ApiInsightsSubjectStats.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false); + return collectionResult?.AsList(); + } + /// + /// Get API request statistics for all subjects within an organization within a specified time frame. Subjects can be users or GitHub Apps. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.Orgs.Item.Insights.Api.SubjectStats.SubjectStatsRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Orgs.Item.Insights.Api.SubjectStats.SubjectStatsRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Get API request statistics for all subjects within an organization within a specified time frame. Subjects can be users or GitHub Apps. + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class SubjectStatsRequestBuilderGetQueryParameters + { + /// The direction to sort the results by. + [Obsolete("This property is deprecated, use DirectionAsGetDirectionQueryParameterType instead")] +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("direction")] + public string? Direction { get; set; } +#nullable restore +#else + [QueryParameter("direction")] + public string Direction { get; set; } +#endif + /// The direction to sort the results by. + [QueryParameter("direction")] + public global::Ayllu.Github.Client.Orgs.Item.Insights.Api.SubjectStats.GetDirectionQueryParameterType? DirectionAsGetDirectionQueryParameterType { get; set; } + /// The maximum timestamp to query for stats. Defaults to the time 30 days ago. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("max_timestamp")] + public string? MaxTimestamp { get; set; } +#nullable restore +#else + [QueryParameter("max_timestamp")] + public string MaxTimestamp { get; set; } +#endif + /// The minimum timestamp to query for stats. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("min_timestamp")] + public string? MinTimestamp { get; set; } +#nullable restore +#else + [QueryParameter("min_timestamp")] + public string MinTimestamp { get; set; } +#endif + /// The page number of the results to fetch. For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." + [QueryParameter("page")] + public int? Page { get; set; } + /// The number of results per page (max 100). For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." + [QueryParameter("per_page")] + public int? PerPage { get; set; } + /// The property to sort the results by. + [Obsolete("This property is deprecated, use SortAsGetSortQueryParameterType instead")] +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("sort")] + public string[]? Sort { get; set; } +#nullable restore +#else + [QueryParameter("sort")] + public string[] Sort { get; set; } +#endif + /// The property to sort the results by. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("sort")] + public global::Ayllu.Github.Client.Orgs.Item.Insights.Api.SubjectStats.GetSortQueryParameterType[]? SortAsGetSortQueryParameterType { get; set; } +#nullable restore +#else + [QueryParameter("sort")] + public global::Ayllu.Github.Client.Orgs.Item.Insights.Api.SubjectStats.GetSortQueryParameterType[] SortAsGetSortQueryParameterType { get; set; } +#endif + /// Providing a substring will filter results where the subject name contains the substring. This is a case-insensitive search. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("subject_name_substring")] + public string? SubjectNameSubstring { get; set; } +#nullable restore +#else + [QueryParameter("subject_name_substring")] + public string SubjectNameSubstring { get; set; } +#endif + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class SubjectStatsRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Insights/Api/SummaryStats/Item/Item/WithActor_ItemRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Insights/Api/SummaryStats/Item/Item/WithActor_ItemRequestBuilder.cs new file mode 100644 index 0000000..b406a4d --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Insights/Api/SummaryStats/Item/Item/WithActor_ItemRequestBuilder.cs @@ -0,0 +1,120 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Orgs.Item.Insights.Api.SummaryStats.Item.Item +{ + /// + /// Builds and executes requests for operations under \orgs\{org}\insights\api\summary-stats\{actor_type}\{actor_id} + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithActor_ItemRequestBuilder : BaseRequestBuilder + { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public WithActor_ItemRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/orgs/{org}/insights/api/summary-stats/{actor_type}/{actor_id}?min_timestamp={min_timestamp}{&max_timestamp*}", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public WithActor_ItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/orgs/{org}/insights/api/summary-stats/{actor_type}/{actor_id}?min_timestamp={min_timestamp}{&max_timestamp*}", rawUrl) + { + } + /// + /// Get overall statistics of API requests within the organization made by a specific actor. Actors can be GitHub App installations, OAuth apps or other tokens on behalf of a user. + /// API method documentation + /// + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Models.ApiInsightsSummaryStats.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false); + } + /// + /// Get overall statistics of API requests within the organization made by a specific actor. Actors can be GitHub App installations, OAuth apps or other tokens on behalf of a user. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.Orgs.Item.Insights.Api.SummaryStats.Item.Item.WithActor_ItemRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Orgs.Item.Insights.Api.SummaryStats.Item.Item.WithActor_ItemRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Get overall statistics of API requests within the organization made by a specific actor. Actors can be GitHub App installations, OAuth apps or other tokens on behalf of a user. + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithActor_ItemRequestBuilderGetQueryParameters + { + /// The maximum timestamp to query for stats. Defaults to the time 30 days ago. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("max_timestamp")] + public string? MaxTimestamp { get; set; } +#nullable restore +#else + [QueryParameter("max_timestamp")] + public string MaxTimestamp { get; set; } +#endif + /// The minimum timestamp to query for stats. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("min_timestamp")] + public string? MinTimestamp { get; set; } +#nullable restore +#else + [QueryParameter("min_timestamp")] + public string MinTimestamp { get; set; } +#endif + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithActor_ItemRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Insights/Api/SummaryStats/Item/WithActor_typeItemRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Insights/Api/SummaryStats/Item/WithActor_typeItemRequestBuilder.cs new file mode 100644 index 0000000..38d131d --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Insights/Api/SummaryStats/Item/WithActor_typeItemRequestBuilder.cs @@ -0,0 +1,61 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Orgs.Item.Insights.Api.SummaryStats.Item.Item; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System; +namespace Ayllu.Github.Client.Orgs.Item.Insights.Api.SummaryStats.Item +{ + /// + /// Builds and executes requests for operations under \orgs\{org}\insights\api\summary-stats\{actor_type} + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithActor_typeItemRequestBuilder : BaseRequestBuilder + { + /// Gets an item from the Ayllu.Github.Client.orgs.item.insights.api.summaryStats.item.item collection + /// The ID of the actor + /// A + public global::Ayllu.Github.Client.Orgs.Item.Insights.Api.SummaryStats.Item.Item.WithActor_ItemRequestBuilder this[int position] + { + get + { + var urlTplParams = new Dictionary(PathParameters); + urlTplParams.Add("actor_id", position); + return new global::Ayllu.Github.Client.Orgs.Item.Insights.Api.SummaryStats.Item.Item.WithActor_ItemRequestBuilder(urlTplParams, RequestAdapter); + } + } + /// Gets an item from the Ayllu.Github.Client.orgs.item.insights.api.summaryStats.item.item collection + /// The ID of the actor + /// A + [Obsolete("This indexer is deprecated and will be removed in the next major version. Use the one with the typed parameter instead.")] + public global::Ayllu.Github.Client.Orgs.Item.Insights.Api.SummaryStats.Item.Item.WithActor_ItemRequestBuilder this[string position] + { + get + { + var urlTplParams = new Dictionary(PathParameters); + if (!string.IsNullOrWhiteSpace(position)) urlTplParams.Add("actor_id", position); + return new global::Ayllu.Github.Client.Orgs.Item.Insights.Api.SummaryStats.Item.Item.WithActor_ItemRequestBuilder(urlTplParams, RequestAdapter); + } + } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public WithActor_typeItemRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/orgs/{org}/insights/api/summary-stats/{actor_type}", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public WithActor_typeItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/orgs/{org}/insights/api/summary-stats/{actor_type}", rawUrl) + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Insights/Api/SummaryStats/SummaryStatsRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Insights/Api/SummaryStats/SummaryStatsRequestBuilder.cs new file mode 100644 index 0000000..dd860d0 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Insights/Api/SummaryStats/SummaryStatsRequestBuilder.cs @@ -0,0 +1,139 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Ayllu.Github.Client.Orgs.Item.Insights.Api.SummaryStats.Item; +using Ayllu.Github.Client.Orgs.Item.Insights.Api.SummaryStats.Users; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Orgs.Item.Insights.Api.SummaryStats +{ + /// + /// Builds and executes requests for operations under \orgs\{org}\insights\api\summary-stats + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class SummaryStatsRequestBuilder : BaseRequestBuilder + { + /// The users property + public global::Ayllu.Github.Client.Orgs.Item.Insights.Api.SummaryStats.Users.UsersRequestBuilder Users + { + get => new global::Ayllu.Github.Client.Orgs.Item.Insights.Api.SummaryStats.Users.UsersRequestBuilder(PathParameters, RequestAdapter); + } + /// Gets an item from the Ayllu.Github.Client.orgs.item.insights.api.summaryStats.item collection + /// The type of the actor + /// A + public global::Ayllu.Github.Client.Orgs.Item.Insights.Api.SummaryStats.Item.WithActor_typeItemRequestBuilder this[string position] + { + get + { + var urlTplParams = new Dictionary(PathParameters); + urlTplParams.Add("actor_type", position); + return new global::Ayllu.Github.Client.Orgs.Item.Insights.Api.SummaryStats.Item.WithActor_typeItemRequestBuilder(urlTplParams, RequestAdapter); + } + } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public SummaryStatsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/orgs/{org}/insights/api/summary-stats?min_timestamp={min_timestamp}{&max_timestamp*}", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public SummaryStatsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/orgs/{org}/insights/api/summary-stats?min_timestamp={min_timestamp}{&max_timestamp*}", rawUrl) + { + } + /// + /// Get overall statistics of API requests made within an organization by all users and apps within a specified time frame. + /// API method documentation + /// + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Models.ApiInsightsSummaryStats.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false); + } + /// + /// Get overall statistics of API requests made within an organization by all users and apps within a specified time frame. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.Orgs.Item.Insights.Api.SummaryStats.SummaryStatsRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Orgs.Item.Insights.Api.SummaryStats.SummaryStatsRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Get overall statistics of API requests made within an organization by all users and apps within a specified time frame. + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class SummaryStatsRequestBuilderGetQueryParameters + { + /// The maximum timestamp to query for stats. Defaults to the time 30 days ago. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("max_timestamp")] + public string? MaxTimestamp { get; set; } +#nullable restore +#else + [QueryParameter("max_timestamp")] + public string MaxTimestamp { get; set; } +#endif + /// The minimum timestamp to query for stats. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("min_timestamp")] + public string? MinTimestamp { get; set; } +#nullable restore +#else + [QueryParameter("min_timestamp")] + public string MinTimestamp { get; set; } +#endif + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class SummaryStatsRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Insights/Api/SummaryStats/Users/Item/WithUser_ItemRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Insights/Api/SummaryStats/Users/Item/WithUser_ItemRequestBuilder.cs new file mode 100644 index 0000000..d69ae0a --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Insights/Api/SummaryStats/Users/Item/WithUser_ItemRequestBuilder.cs @@ -0,0 +1,120 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Orgs.Item.Insights.Api.SummaryStats.Users.Item +{ + /// + /// Builds and executes requests for operations under \orgs\{org}\insights\api\summary-stats\users\{user_id} + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithUser_ItemRequestBuilder : BaseRequestBuilder + { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public WithUser_ItemRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/orgs/{org}/insights/api/summary-stats/users/{user_id}?min_timestamp={min_timestamp}{&max_timestamp*}", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public WithUser_ItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/orgs/{org}/insights/api/summary-stats/users/{user_id}?min_timestamp={min_timestamp}{&max_timestamp*}", rawUrl) + { + } + /// + /// Get overall statistics of API requests within the organization for a user. + /// API method documentation + /// + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Models.ApiInsightsSummaryStats.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false); + } + /// + /// Get overall statistics of API requests within the organization for a user. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.Orgs.Item.Insights.Api.SummaryStats.Users.Item.WithUser_ItemRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Orgs.Item.Insights.Api.SummaryStats.Users.Item.WithUser_ItemRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Get overall statistics of API requests within the organization for a user. + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithUser_ItemRequestBuilderGetQueryParameters + { + /// The maximum timestamp to query for stats. Defaults to the time 30 days ago. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("max_timestamp")] + public string? MaxTimestamp { get; set; } +#nullable restore +#else + [QueryParameter("max_timestamp")] + public string MaxTimestamp { get; set; } +#endif + /// The minimum timestamp to query for stats. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("min_timestamp")] + public string? MinTimestamp { get; set; } +#nullable restore +#else + [QueryParameter("min_timestamp")] + public string MinTimestamp { get; set; } +#endif + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithUser_ItemRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Insights/Api/SummaryStats/Users/UsersRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Insights/Api/SummaryStats/Users/UsersRequestBuilder.cs new file mode 100644 index 0000000..c298e06 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Insights/Api/SummaryStats/Users/UsersRequestBuilder.cs @@ -0,0 +1,48 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Orgs.Item.Insights.Api.SummaryStats.Users.Item; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System; +namespace Ayllu.Github.Client.Orgs.Item.Insights.Api.SummaryStats.Users +{ + /// + /// Builds and executes requests for operations under \orgs\{org}\insights\api\summary-stats\users + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class UsersRequestBuilder : BaseRequestBuilder + { + /// Gets an item from the Ayllu.Github.Client.orgs.item.insights.api.summaryStats.users.item collection + /// The ID of the user to query for stats + /// A + public global::Ayllu.Github.Client.Orgs.Item.Insights.Api.SummaryStats.Users.Item.WithUser_ItemRequestBuilder this[string position] + { + get + { + var urlTplParams = new Dictionary(PathParameters); + urlTplParams.Add("user_id", position); + return new global::Ayllu.Github.Client.Orgs.Item.Insights.Api.SummaryStats.Users.Item.WithUser_ItemRequestBuilder(urlTplParams, RequestAdapter); + } + } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public UsersRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/orgs/{org}/insights/api/summary-stats/users", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public UsersRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/orgs/{org}/insights/api/summary-stats/users", rawUrl) + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Insights/Api/TimeStats/Item/Item/WithActor_ItemRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Insights/Api/TimeStats/Item/Item/WithActor_ItemRequestBuilder.cs new file mode 100644 index 0000000..bf7580c --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Insights/Api/TimeStats/Item/Item/WithActor_ItemRequestBuilder.cs @@ -0,0 +1,131 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Orgs.Item.Insights.Api.TimeStats.Item.Item +{ + /// + /// Builds and executes requests for operations under \orgs\{org}\insights\api\time-stats\{actor_type}\{actor_id} + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithActor_ItemRequestBuilder : BaseRequestBuilder + { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public WithActor_ItemRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/orgs/{org}/insights/api/time-stats/{actor_type}/{actor_id}?min_timestamp={min_timestamp}×tamp_increment={timestamp_increment}{&max_timestamp*}", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public WithActor_ItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/orgs/{org}/insights/api/time-stats/{actor_type}/{actor_id}?min_timestamp={min_timestamp}×tamp_increment={timestamp_increment}{&max_timestamp*}", rawUrl) + { + } + /// + /// Get the number of API requests and rate-limited requests made within an organization by a specific actor within a specified time period. + /// API method documentation + /// + /// A List<global::Ayllu.Github.Client.Models.ApiInsightsTimeStats> + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task?> GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task> GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var collectionResult = await RequestAdapter.SendCollectionAsync(requestInfo, global::Ayllu.Github.Client.Models.ApiInsightsTimeStats.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false); + return collectionResult?.AsList(); + } + /// + /// Get the number of API requests and rate-limited requests made within an organization by a specific actor within a specified time period. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.Orgs.Item.Insights.Api.TimeStats.Item.Item.WithActor_ItemRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Orgs.Item.Insights.Api.TimeStats.Item.Item.WithActor_ItemRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Get the number of API requests and rate-limited requests made within an organization by a specific actor within a specified time period. + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithActor_ItemRequestBuilderGetQueryParameters + { + /// The maximum timestamp to query for stats. Defaults to the time 30 days ago. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("max_timestamp")] + public string? MaxTimestamp { get; set; } +#nullable restore +#else + [QueryParameter("max_timestamp")] + public string MaxTimestamp { get; set; } +#endif + /// The minimum timestamp to query for stats. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("min_timestamp")] + public string? MinTimestamp { get; set; } +#nullable restore +#else + [QueryParameter("min_timestamp")] + public string MinTimestamp { get; set; } +#endif + /// The increment of time used to breakdown the query results (5m, 10m, 1h, etc.) +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("timestamp_increment")] + public string? TimestampIncrement { get; set; } +#nullable restore +#else + [QueryParameter("timestamp_increment")] + public string TimestampIncrement { get; set; } +#endif + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithActor_ItemRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Insights/Api/TimeStats/Item/WithActor_typeItemRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Insights/Api/TimeStats/Item/WithActor_typeItemRequestBuilder.cs new file mode 100644 index 0000000..20e0ff9 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Insights/Api/TimeStats/Item/WithActor_typeItemRequestBuilder.cs @@ -0,0 +1,61 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Orgs.Item.Insights.Api.TimeStats.Item.Item; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System; +namespace Ayllu.Github.Client.Orgs.Item.Insights.Api.TimeStats.Item +{ + /// + /// Builds and executes requests for operations under \orgs\{org}\insights\api\time-stats\{actor_type} + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithActor_typeItemRequestBuilder : BaseRequestBuilder + { + /// Gets an item from the Ayllu.Github.Client.orgs.item.insights.api.timeStats.item.item collection + /// The ID of the actor + /// A + public global::Ayllu.Github.Client.Orgs.Item.Insights.Api.TimeStats.Item.Item.WithActor_ItemRequestBuilder this[int position] + { + get + { + var urlTplParams = new Dictionary(PathParameters); + urlTplParams.Add("actor_id", position); + return new global::Ayllu.Github.Client.Orgs.Item.Insights.Api.TimeStats.Item.Item.WithActor_ItemRequestBuilder(urlTplParams, RequestAdapter); + } + } + /// Gets an item from the Ayllu.Github.Client.orgs.item.insights.api.timeStats.item.item collection + /// The ID of the actor + /// A + [Obsolete("This indexer is deprecated and will be removed in the next major version. Use the one with the typed parameter instead.")] + public global::Ayllu.Github.Client.Orgs.Item.Insights.Api.TimeStats.Item.Item.WithActor_ItemRequestBuilder this[string position] + { + get + { + var urlTplParams = new Dictionary(PathParameters); + if (!string.IsNullOrWhiteSpace(position)) urlTplParams.Add("actor_id", position); + return new global::Ayllu.Github.Client.Orgs.Item.Insights.Api.TimeStats.Item.Item.WithActor_ItemRequestBuilder(urlTplParams, RequestAdapter); + } + } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public WithActor_typeItemRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/orgs/{org}/insights/api/time-stats/{actor_type}", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public WithActor_typeItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/orgs/{org}/insights/api/time-stats/{actor_type}", rawUrl) + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Insights/Api/TimeStats/TimeStatsRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Insights/Api/TimeStats/TimeStatsRequestBuilder.cs new file mode 100644 index 0000000..4be66d6 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Insights/Api/TimeStats/TimeStatsRequestBuilder.cs @@ -0,0 +1,150 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Ayllu.Github.Client.Orgs.Item.Insights.Api.TimeStats.Item; +using Ayllu.Github.Client.Orgs.Item.Insights.Api.TimeStats.Users; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Orgs.Item.Insights.Api.TimeStats +{ + /// + /// Builds and executes requests for operations under \orgs\{org}\insights\api\time-stats + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class TimeStatsRequestBuilder : BaseRequestBuilder + { + /// The users property + public global::Ayllu.Github.Client.Orgs.Item.Insights.Api.TimeStats.Users.UsersRequestBuilder Users + { + get => new global::Ayllu.Github.Client.Orgs.Item.Insights.Api.TimeStats.Users.UsersRequestBuilder(PathParameters, RequestAdapter); + } + /// Gets an item from the Ayllu.Github.Client.orgs.item.insights.api.timeStats.item collection + /// The type of the actor + /// A + public global::Ayllu.Github.Client.Orgs.Item.Insights.Api.TimeStats.Item.WithActor_typeItemRequestBuilder this[string position] + { + get + { + var urlTplParams = new Dictionary(PathParameters); + urlTplParams.Add("actor_type", position); + return new global::Ayllu.Github.Client.Orgs.Item.Insights.Api.TimeStats.Item.WithActor_typeItemRequestBuilder(urlTplParams, RequestAdapter); + } + } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public TimeStatsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/orgs/{org}/insights/api/time-stats?min_timestamp={min_timestamp}×tamp_increment={timestamp_increment}{&max_timestamp*}", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public TimeStatsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/orgs/{org}/insights/api/time-stats?min_timestamp={min_timestamp}×tamp_increment={timestamp_increment}{&max_timestamp*}", rawUrl) + { + } + /// + /// Get the number of API requests and rate-limited requests made within an organization over a specified time period. + /// API method documentation + /// + /// A List<global::Ayllu.Github.Client.Models.ApiInsightsTimeStats> + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task?> GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task> GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var collectionResult = await RequestAdapter.SendCollectionAsync(requestInfo, global::Ayllu.Github.Client.Models.ApiInsightsTimeStats.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false); + return collectionResult?.AsList(); + } + /// + /// Get the number of API requests and rate-limited requests made within an organization over a specified time period. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.Orgs.Item.Insights.Api.TimeStats.TimeStatsRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Orgs.Item.Insights.Api.TimeStats.TimeStatsRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Get the number of API requests and rate-limited requests made within an organization over a specified time period. + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class TimeStatsRequestBuilderGetQueryParameters + { + /// The maximum timestamp to query for stats. Defaults to the time 30 days ago. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("max_timestamp")] + public string? MaxTimestamp { get; set; } +#nullable restore +#else + [QueryParameter("max_timestamp")] + public string MaxTimestamp { get; set; } +#endif + /// The minimum timestamp to query for stats. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("min_timestamp")] + public string? MinTimestamp { get; set; } +#nullable restore +#else + [QueryParameter("min_timestamp")] + public string MinTimestamp { get; set; } +#endif + /// The increment of time used to breakdown the query results (5m, 10m, 1h, etc.) +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("timestamp_increment")] + public string? TimestampIncrement { get; set; } +#nullable restore +#else + [QueryParameter("timestamp_increment")] + public string TimestampIncrement { get; set; } +#endif + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class TimeStatsRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Insights/Api/TimeStats/Users/Item/WithUser_ItemRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Insights/Api/TimeStats/Users/Item/WithUser_ItemRequestBuilder.cs new file mode 100644 index 0000000..c80ed29 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Insights/Api/TimeStats/Users/Item/WithUser_ItemRequestBuilder.cs @@ -0,0 +1,131 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Orgs.Item.Insights.Api.TimeStats.Users.Item +{ + /// + /// Builds and executes requests for operations under \orgs\{org}\insights\api\time-stats\users\{user_id} + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithUser_ItemRequestBuilder : BaseRequestBuilder + { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public WithUser_ItemRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/orgs/{org}/insights/api/time-stats/users/{user_id}?min_timestamp={min_timestamp}×tamp_increment={timestamp_increment}{&max_timestamp*}", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public WithUser_ItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/orgs/{org}/insights/api/time-stats/users/{user_id}?min_timestamp={min_timestamp}×tamp_increment={timestamp_increment}{&max_timestamp*}", rawUrl) + { + } + /// + /// Get the number of API requests and rate-limited requests made within an organization by a specific user over a specified time period. + /// API method documentation + /// + /// A List<global::Ayllu.Github.Client.Models.ApiInsightsTimeStats> + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task?> GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task> GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var collectionResult = await RequestAdapter.SendCollectionAsync(requestInfo, global::Ayllu.Github.Client.Models.ApiInsightsTimeStats.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false); + return collectionResult?.AsList(); + } + /// + /// Get the number of API requests and rate-limited requests made within an organization by a specific user over a specified time period. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.Orgs.Item.Insights.Api.TimeStats.Users.Item.WithUser_ItemRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Orgs.Item.Insights.Api.TimeStats.Users.Item.WithUser_ItemRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Get the number of API requests and rate-limited requests made within an organization by a specific user over a specified time period. + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithUser_ItemRequestBuilderGetQueryParameters + { + /// The maximum timestamp to query for stats. Defaults to the time 30 days ago. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("max_timestamp")] + public string? MaxTimestamp { get; set; } +#nullable restore +#else + [QueryParameter("max_timestamp")] + public string MaxTimestamp { get; set; } +#endif + /// The minimum timestamp to query for stats. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("min_timestamp")] + public string? MinTimestamp { get; set; } +#nullable restore +#else + [QueryParameter("min_timestamp")] + public string MinTimestamp { get; set; } +#endif + /// The increment of time used to breakdown the query results (5m, 10m, 1h, etc.) +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("timestamp_increment")] + public string? TimestampIncrement { get; set; } +#nullable restore +#else + [QueryParameter("timestamp_increment")] + public string TimestampIncrement { get; set; } +#endif + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithUser_ItemRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Insights/Api/TimeStats/Users/UsersRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Insights/Api/TimeStats/Users/UsersRequestBuilder.cs new file mode 100644 index 0000000..0ebafbd --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Insights/Api/TimeStats/Users/UsersRequestBuilder.cs @@ -0,0 +1,48 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Orgs.Item.Insights.Api.TimeStats.Users.Item; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System; +namespace Ayllu.Github.Client.Orgs.Item.Insights.Api.TimeStats.Users +{ + /// + /// Builds and executes requests for operations under \orgs\{org}\insights\api\time-stats\users + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class UsersRequestBuilder : BaseRequestBuilder + { + /// Gets an item from the Ayllu.Github.Client.orgs.item.insights.api.timeStats.users.item collection + /// The ID of the user to query for stats + /// A + public global::Ayllu.Github.Client.Orgs.Item.Insights.Api.TimeStats.Users.Item.WithUser_ItemRequestBuilder this[string position] + { + get + { + var urlTplParams = new Dictionary(PathParameters); + urlTplParams.Add("user_id", position); + return new global::Ayllu.Github.Client.Orgs.Item.Insights.Api.TimeStats.Users.Item.WithUser_ItemRequestBuilder(urlTplParams, RequestAdapter); + } + } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public UsersRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/orgs/{org}/insights/api/time-stats/users", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public UsersRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/orgs/{org}/insights/api/time-stats/users", rawUrl) + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Insights/Api/UserStats/Item/GetDirectionQueryParameterType.cs b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Insights/Api/UserStats/Item/GetDirectionQueryParameterType.cs new file mode 100644 index 0000000..4111ce4 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Insights/Api/UserStats/Item/GetDirectionQueryParameterType.cs @@ -0,0 +1,20 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Orgs.Item.Insights.Api.UserStats.Item +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public enum GetDirectionQueryParameterType + #pragma warning restore CS1591 + { + [EnumMember(Value = "asc")] + #pragma warning disable CS1591 + Asc, + #pragma warning restore CS1591 + [EnumMember(Value = "desc")] + #pragma warning disable CS1591 + Desc, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Insights/Api/UserStats/Item/GetSortQueryParameterType.cs b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Insights/Api/UserStats/Item/GetSortQueryParameterType.cs new file mode 100644 index 0000000..758b7a1 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Insights/Api/UserStats/Item/GetSortQueryParameterType.cs @@ -0,0 +1,32 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Orgs.Item.Insights.Api.UserStats.Item +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public enum GetSortQueryParameterType + #pragma warning restore CS1591 + { + [EnumMember(Value = "last_rate_limited_timestamp")] + #pragma warning disable CS1591 + Last_rate_limited_timestamp, + #pragma warning restore CS1591 + [EnumMember(Value = "last_request_timestamp")] + #pragma warning disable CS1591 + Last_request_timestamp, + #pragma warning restore CS1591 + [EnumMember(Value = "rate_limited_request_count")] + #pragma warning disable CS1591 + Rate_limited_request_count, + #pragma warning restore CS1591 + [EnumMember(Value = "subject_name")] + #pragma warning disable CS1591 + Subject_name, + #pragma warning restore CS1591 + [EnumMember(Value = "total_request_count")] + #pragma warning disable CS1591 + Total_request_count, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Insights/Api/UserStats/Item/WithUser_ItemRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Insights/Api/UserStats/Item/WithUser_ItemRequestBuilder.cs new file mode 100644 index 0000000..8536052 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Insights/Api/UserStats/Item/WithUser_ItemRequestBuilder.cs @@ -0,0 +1,172 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Orgs.Item.Insights.Api.UserStats.Item +{ + /// + /// Builds and executes requests for operations under \orgs\{org}\insights\api\user-stats\{user_id} + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithUser_ItemRequestBuilder : BaseRequestBuilder + { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public WithUser_ItemRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/orgs/{org}/insights/api/user-stats/{user_id}?min_timestamp={min_timestamp}{&actor_name_substring*,direction*,max_timestamp*,page*,per_page*,sort*}", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public WithUser_ItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/orgs/{org}/insights/api/user-stats/{user_id}?min_timestamp={min_timestamp}{&actor_name_substring*,direction*,max_timestamp*,page*,per_page*,sort*}", rawUrl) + { + } + /// + /// Get API usage statistics within an organization for a user broken down by the type of access. + /// API method documentation + /// + /// A List<global::Ayllu.Github.Client.Models.ApiInsightsUserStats> + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task?> GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task> GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var collectionResult = await RequestAdapter.SendCollectionAsync(requestInfo, global::Ayllu.Github.Client.Models.ApiInsightsUserStats.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false); + return collectionResult?.AsList(); + } + /// + /// Get API usage statistics within an organization for a user broken down by the type of access. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.Orgs.Item.Insights.Api.UserStats.Item.WithUser_ItemRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Orgs.Item.Insights.Api.UserStats.Item.WithUser_ItemRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Get API usage statistics within an organization for a user broken down by the type of access. + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithUser_ItemRequestBuilderGetQueryParameters + { + /// Providing a substring will filter results where the actor name contains the substring. This is a case-insensitive search. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("actor_name_substring")] + public string? ActorNameSubstring { get; set; } +#nullable restore +#else + [QueryParameter("actor_name_substring")] + public string ActorNameSubstring { get; set; } +#endif + /// The direction to sort the results by. + [Obsolete("This property is deprecated, use DirectionAsGetDirectionQueryParameterType instead")] +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("direction")] + public string? Direction { get; set; } +#nullable restore +#else + [QueryParameter("direction")] + public string Direction { get; set; } +#endif + /// The direction to sort the results by. + [QueryParameter("direction")] + public global::Ayllu.Github.Client.Orgs.Item.Insights.Api.UserStats.Item.GetDirectionQueryParameterType? DirectionAsGetDirectionQueryParameterType { get; set; } + /// The maximum timestamp to query for stats. Defaults to the time 30 days ago. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("max_timestamp")] + public string? MaxTimestamp { get; set; } +#nullable restore +#else + [QueryParameter("max_timestamp")] + public string MaxTimestamp { get; set; } +#endif + /// The minimum timestamp to query for stats. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("min_timestamp")] + public string? MinTimestamp { get; set; } +#nullable restore +#else + [QueryParameter("min_timestamp")] + public string MinTimestamp { get; set; } +#endif + /// The page number of the results to fetch. For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." + [QueryParameter("page")] + public int? Page { get; set; } + /// The number of results per page (max 100). For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." + [QueryParameter("per_page")] + public int? PerPage { get; set; } + /// The property to sort the results by. + [Obsolete("This property is deprecated, use SortAsGetSortQueryParameterType instead")] +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("sort")] + public string[]? Sort { get; set; } +#nullable restore +#else + [QueryParameter("sort")] + public string[] Sort { get; set; } +#endif + /// The property to sort the results by. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("sort")] + public global::Ayllu.Github.Client.Orgs.Item.Insights.Api.UserStats.Item.GetSortQueryParameterType[]? SortAsGetSortQueryParameterType { get; set; } +#nullable restore +#else + [QueryParameter("sort")] + public global::Ayllu.Github.Client.Orgs.Item.Insights.Api.UserStats.Item.GetSortQueryParameterType[] SortAsGetSortQueryParameterType { get; set; } +#endif + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithUser_ItemRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Insights/Api/UserStats/UserStatsRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Insights/Api/UserStats/UserStatsRequestBuilder.cs new file mode 100644 index 0000000..7475a0c --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Insights/Api/UserStats/UserStatsRequestBuilder.cs @@ -0,0 +1,48 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Orgs.Item.Insights.Api.UserStats.Item; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System; +namespace Ayllu.Github.Client.Orgs.Item.Insights.Api.UserStats +{ + /// + /// Builds and executes requests for operations under \orgs\{org}\insights\api\user-stats + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class UserStatsRequestBuilder : BaseRequestBuilder + { + /// Gets an item from the Ayllu.Github.Client.orgs.item.insights.api.userStats.item collection + /// The ID of the user to query for stats + /// A + public global::Ayllu.Github.Client.Orgs.Item.Insights.Api.UserStats.Item.WithUser_ItemRequestBuilder this[string position] + { + get + { + var urlTplParams = new Dictionary(PathParameters); + urlTplParams.Add("user_id", position); + return new global::Ayllu.Github.Client.Orgs.Item.Insights.Api.UserStats.Item.WithUser_ItemRequestBuilder(urlTplParams, RequestAdapter); + } + } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public UserStatsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/orgs/{org}/insights/api/user-stats", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public UserStatsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/orgs/{org}/insights/api/user-stats", rawUrl) + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Insights/InsightsRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Insights/InsightsRequestBuilder.cs new file mode 100644 index 0000000..40679e5 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Insights/InsightsRequestBuilder.cs @@ -0,0 +1,41 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Orgs.Item.Insights.Api; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System; +namespace Ayllu.Github.Client.Orgs.Item.Insights +{ + /// + /// Builds and executes requests for operations under \orgs\{org}\insights + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class InsightsRequestBuilder : BaseRequestBuilder + { + /// The api property + public global::Ayllu.Github.Client.Orgs.Item.Insights.Api.ApiRequestBuilder Api + { + get => new global::Ayllu.Github.Client.Orgs.Item.Insights.Api.ApiRequestBuilder(PathParameters, RequestAdapter); + } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public InsightsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/orgs/{org}/insights", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public InsightsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/orgs/{org}/insights", rawUrl) + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Installation/InstallationRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Installation/InstallationRequestBuilder.cs new file mode 100644 index 0000000..d533f4c --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Installation/InstallationRequestBuilder.cs @@ -0,0 +1,93 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Orgs.Item.Installation +{ + /// + /// Builds and executes requests for operations under \orgs\{org}\installation + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class InstallationRequestBuilder : BaseRequestBuilder + { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public InstallationRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/orgs/{org}/installation", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public InstallationRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/orgs/{org}/installation", rawUrl) + { + } + /// + /// Enables an authenticated GitHub App to find the organization's installation information.You must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. + /// API method documentation + /// + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Models.Installation.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false); + } + /// + /// Enables an authenticated GitHub App to find the organization's installation information.You must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.Orgs.Item.Installation.InstallationRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Orgs.Item.Installation.InstallationRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class InstallationRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Installations/InstallationsGetResponse.cs b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Installations/InstallationsGetResponse.cs new file mode 100644 index 0000000..a1dcb72 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Installations/InstallationsGetResponse.cs @@ -0,0 +1,70 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Orgs.Item.Installations +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class InstallationsGetResponse : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The installations property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? Installations { get; set; } +#nullable restore +#else + public List Installations { get; set; } +#endif + /// The total_count property + public int? TotalCount { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public InstallationsGetResponse() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Orgs.Item.Installations.InstallationsGetResponse CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Orgs.Item.Installations.InstallationsGetResponse(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "installations", n => { Installations = n.GetCollectionOfObjectValues(global::Ayllu.Github.Client.Models.Installation.CreateFromDiscriminatorValue)?.AsList(); } }, + { "total_count", n => { TotalCount = n.GetIntValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteCollectionOfObjectValues("installations", Installations); + writer.WriteIntValue("total_count", TotalCount); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Installations/InstallationsRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Installations/InstallationsRequestBuilder.cs new file mode 100644 index 0000000..2f4333c --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Installations/InstallationsRequestBuilder.cs @@ -0,0 +1,125 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Orgs.Item.Installations +{ + /// + /// Builds and executes requests for operations under \orgs\{org}\installations + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class InstallationsRequestBuilder : BaseRequestBuilder + { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public InstallationsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/orgs/{org}/installations{?page*,per_page*}", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public InstallationsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/orgs/{org}/installations{?page*,per_page*}", rawUrl) + { + } + /// + /// 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. + /// API method documentation + /// + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsInstallationsGetResponseAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task GetAsInstallationsGetResponseAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Orgs.Item.Installations.InstallationsGetResponse.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false); + } + /// + /// 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. + /// API method documentation + /// + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + [Obsolete("This method is obsolete. Use GetAsInstallationsGetResponseAsync instead.")] +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Orgs.Item.Installations.InstallationsResponse.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false); + } + /// + /// 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. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.Orgs.Item.Installations.InstallationsRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Orgs.Item.Installations.InstallationsRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// 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. + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class InstallationsRequestBuilderGetQueryParameters + { + /// The page number of the results to fetch. For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." + [QueryParameter("page")] + public int? Page { get; set; } + /// The number of results per page (max 100). For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." + [QueryParameter("per_page")] + public int? PerPage { get; set; } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class InstallationsRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Installations/InstallationsResponse.cs b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Installations/InstallationsResponse.cs new file mode 100644 index 0000000..53b838b --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Installations/InstallationsResponse.cs @@ -0,0 +1,28 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Orgs.Item.Installations +{ + [Obsolete("This class is obsolete. Use InstallationsGetResponse instead.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class InstallationsResponse : global::Ayllu.Github.Client.Orgs.Item.Installations.InstallationsGetResponse, IParsable + #pragma warning restore CS1591 + { + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static new global::Ayllu.Github.Client.Orgs.Item.Installations.InstallationsResponse CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Orgs.Item.Installations.InstallationsResponse(); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Orgs/Item/InteractionLimits/InteractionLimitsRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/InteractionLimits/InteractionLimitsRequestBuilder.cs new file mode 100644 index 0000000..a4c9457 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/InteractionLimits/InteractionLimitsRequestBuilder.cs @@ -0,0 +1,193 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Orgs.Item.InteractionLimits +{ + /// + /// Builds and executes requests for operations under \orgs\{org}\interaction-limits + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class InteractionLimitsRequestBuilder : BaseRequestBuilder + { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public InteractionLimitsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/orgs/{org}/interaction-limits", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public InteractionLimitsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/orgs/{org}/interaction-limits", rawUrl) + { + } + /// + /// Removes all interaction restrictions from public repositories in the given organization. You must be an organization owner to remove restrictions. + /// API method documentation + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task DeleteAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task DeleteAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToDeleteRequestInformation(requestConfiguration); + await RequestAdapter.SendNoContentAsync(requestInfo, default, cancellationToken).ConfigureAwait(false); + } + /// + /// 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. + /// API method documentation + /// + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Models.InteractionLimitResponse.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false); + } + /// + /// 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. + /// API method documentation + /// + /// A + /// Limit interactions to a specific type of user for a specified duration + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 422 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PutAsync(global::Ayllu.Github.Client.Models.InteractionLimit body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task PutAsync(global::Ayllu.Github.Client.Models.InteractionLimit body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPutRequestInformation(body, requestConfiguration); + var errorMapping = new Dictionary> + { + { "422", global::Ayllu.Github.Client.Models.ValidationError.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Models.InteractionLimitResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// Removes all interaction restrictions from public repositories in the given organization. You must be an organization owner to remove restrictions. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToDeleteRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToDeleteRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.DELETE, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + return requestInfo; + } + /// + /// 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. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// 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. + /// + /// A + /// Limit interactions to a specific type of user for a specified duration + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPutRequestInformation(global::Ayllu.Github.Client.Models.InteractionLimit body, Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToPutRequestInformation(global::Ayllu.Github.Client.Models.InteractionLimit body, Action> requestConfiguration = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation(Method.PUT, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.Orgs.Item.InteractionLimits.InteractionLimitsRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Orgs.Item.InteractionLimits.InteractionLimitsRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class InteractionLimitsRequestBuilderDeleteRequestConfiguration : RequestConfiguration + { + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class InteractionLimitsRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class InteractionLimitsRequestBuilderPutRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Invitations/GetInvitation_sourceQueryParameterType.cs b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Invitations/GetInvitation_sourceQueryParameterType.cs new file mode 100644 index 0000000..b42dea1 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Invitations/GetInvitation_sourceQueryParameterType.cs @@ -0,0 +1,24 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Orgs.Item.Invitations +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public enum GetInvitation_sourceQueryParameterType + #pragma warning restore CS1591 + { + [EnumMember(Value = "all")] + #pragma warning disable CS1591 + All, + #pragma warning restore CS1591 + [EnumMember(Value = "member")] + #pragma warning disable CS1591 + Member, + #pragma warning restore CS1591 + [EnumMember(Value = "scim")] + #pragma warning disable CS1591 + Scim, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Invitations/GetRoleQueryParameterType.cs b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Invitations/GetRoleQueryParameterType.cs new file mode 100644 index 0000000..4c728dd --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Invitations/GetRoleQueryParameterType.cs @@ -0,0 +1,32 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Orgs.Item.Invitations +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public enum GetRoleQueryParameterType + #pragma warning restore CS1591 + { + [EnumMember(Value = "all")] + #pragma warning disable CS1591 + All, + #pragma warning restore CS1591 + [EnumMember(Value = "admin")] + #pragma warning disable CS1591 + Admin, + #pragma warning restore CS1591 + [EnumMember(Value = "direct_member")] + #pragma warning disable CS1591 + Direct_member, + #pragma warning restore CS1591 + [EnumMember(Value = "billing_manager")] + #pragma warning disable CS1591 + Billing_manager, + #pragma warning restore CS1591 + [EnumMember(Value = "hiring_manager")] + #pragma warning disable CS1591 + Hiring_manager, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Invitations/InvitationsPostRequestBody.cs b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Invitations/InvitationsPostRequestBody.cs new file mode 100644 index 0000000..26d72c9 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Invitations/InvitationsPostRequestBody.cs @@ -0,0 +1,84 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Orgs.Item.Invitations +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class InvitationsPostRequestBody : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// **Required unless you provide `invitee_id`**. Email address of the person you are inviting, which can be an existing GitHub user. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Email { get; set; } +#nullable restore +#else + public string Email { get; set; } +#endif + /// **Required unless you provide `email`**. GitHub user ID for the person you are inviting. + public int? InviteeId { get; set; } + /// 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. + public global::Ayllu.Github.Client.Orgs.Item.Invitations.InvitationsPostRequestBody_role? Role { get; set; } + /// Specify IDs for the teams you want to invite new members to. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? TeamIds { get; set; } +#nullable restore +#else + public List TeamIds { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public InvitationsPostRequestBody() + { + AdditionalData = new Dictionary(); + Role = global::Ayllu.Github.Client.Orgs.Item.Invitations.InvitationsPostRequestBody_role.Direct_member; + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Orgs.Item.Invitations.InvitationsPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Orgs.Item.Invitations.InvitationsPostRequestBody(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "email", n => { Email = n.GetStringValue(); } }, + { "invitee_id", n => { InviteeId = n.GetIntValue(); } }, + { "role", n => { Role = n.GetEnumValue(); } }, + { "team_ids", n => { TeamIds = n.GetCollectionOfPrimitiveValues()?.AsList(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("email", Email); + writer.WriteIntValue("invitee_id", InviteeId); + writer.WriteEnumValue("role", Role); + writer.WriteCollectionOfPrimitiveValues("team_ids", TeamIds); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Invitations/InvitationsPostRequestBody_role.cs b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Invitations/InvitationsPostRequestBody_role.cs new file mode 100644 index 0000000..5e48f93 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Invitations/InvitationsPostRequestBody_role.cs @@ -0,0 +1,27 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Orgs.Item.Invitations +{ + /// 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. + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public enum InvitationsPostRequestBody_role + { + [EnumMember(Value = "admin")] + #pragma warning disable CS1591 + Admin, + #pragma warning restore CS1591 + [EnumMember(Value = "direct_member")] + #pragma warning disable CS1591 + Direct_member, + #pragma warning restore CS1591 + [EnumMember(Value = "billing_manager")] + #pragma warning disable CS1591 + Billing_manager, + #pragma warning restore CS1591 + [EnumMember(Value = "reinstate")] + #pragma warning disable CS1591 + Reinstate, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Invitations/InvitationsRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Invitations/InvitationsRequestBuilder.cs new file mode 100644 index 0000000..eb6d3e0 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Invitations/InvitationsRequestBuilder.cs @@ -0,0 +1,224 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Ayllu.Github.Client.Orgs.Item.Invitations.Item; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Orgs.Item.Invitations +{ + /// + /// Builds and executes requests for operations under \orgs\{org}\invitations + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class InvitationsRequestBuilder : BaseRequestBuilder + { + /// Gets an item from the Ayllu.Github.Client.orgs.item.invitations.item collection + /// The unique identifier of the invitation. + /// A + public global::Ayllu.Github.Client.Orgs.Item.Invitations.Item.WithInvitation_ItemRequestBuilder this[int position] + { + get + { + var urlTplParams = new Dictionary(PathParameters); + urlTplParams.Add("invitation_id", position); + return new global::Ayllu.Github.Client.Orgs.Item.Invitations.Item.WithInvitation_ItemRequestBuilder(urlTplParams, RequestAdapter); + } + } + /// Gets an item from the Ayllu.Github.Client.orgs.item.invitations.item collection + /// The unique identifier of the invitation. + /// A + [Obsolete("This indexer is deprecated and will be removed in the next major version. Use the one with the typed parameter instead.")] + public global::Ayllu.Github.Client.Orgs.Item.Invitations.Item.WithInvitation_ItemRequestBuilder this[string position] + { + get + { + var urlTplParams = new Dictionary(PathParameters); + if (!string.IsNullOrWhiteSpace(position)) urlTplParams.Add("invitation_id", position); + return new global::Ayllu.Github.Client.Orgs.Item.Invitations.Item.WithInvitation_ItemRequestBuilder(urlTplParams, RequestAdapter); + } + } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public InvitationsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/orgs/{org}/invitations{?invitation_source*,page*,per_page*,role*}", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public InvitationsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/orgs/{org}/invitations{?invitation_source*,page*,per_page*,role*}", rawUrl) + { + } + /// + /// The return hash contains a `role` field which refers to the OrganizationInvitation role and will be one of the following values: `direct_member`, `admin`,`billing_manager`, or `hiring_manager`. If the invitee is not a GitHubmember, the `login` field in the return hash will be `null`. + /// API method documentation + /// + /// A List<global::Ayllu.Github.Client.Models.OrganizationInvitation> + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 404 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task?> GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task> GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "404", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + }; + var collectionResult = await RequestAdapter.SendCollectionAsync(requestInfo, global::Ayllu.Github.Client.Models.OrganizationInvitation.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + return collectionResult?.AsList(); + } + /// + /// Invite people to an organization by using their GitHub user ID or their email address. In order to create invitations in an organization, the authenticated user must be an organization owner.This endpoint triggers [notifications](https://docs.github.com/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. For more information, see "[Rate limits for the API](https://docs.github.com/rest/using-the-rest-api/rate-limits-for-the-rest-api#about-secondary-rate-limits)"and "[Best practices for using the REST API](https://docs.github.com/rest/guides/best-practices-for-using-the-rest-api)." + /// API method documentation + /// + /// A + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 404 status code + /// When receiving a 422 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PostAsync(global::Ayllu.Github.Client.Orgs.Item.Invitations.InvitationsPostRequestBody body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task PostAsync(global::Ayllu.Github.Client.Orgs.Item.Invitations.InvitationsPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPostRequestInformation(body, requestConfiguration); + var errorMapping = new Dictionary> + { + { "404", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "422", global::Ayllu.Github.Client.Models.ValidationError.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Models.OrganizationInvitation.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// The return hash contains a `role` field which refers to the OrganizationInvitation role and will be one of the following values: `direct_member`, `admin`,`billing_manager`, or `hiring_manager`. If the invitee is not a GitHubmember, the `login` field in the return hash will be `null`. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Invite people to an organization by using their GitHub user ID or their email address. In order to create invitations in an organization, the authenticated user must be an organization owner.This endpoint triggers [notifications](https://docs.github.com/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. For more information, see "[Rate limits for the API](https://docs.github.com/rest/using-the-rest-api/rate-limits-for-the-rest-api#about-secondary-rate-limits)"and "[Best practices for using the REST API](https://docs.github.com/rest/guides/best-practices-for-using-the-rest-api)." + /// + /// A + /// The request body + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPostRequestInformation(global::Ayllu.Github.Client.Orgs.Item.Invitations.InvitationsPostRequestBody body, Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToPostRequestInformation(global::Ayllu.Github.Client.Orgs.Item.Invitations.InvitationsPostRequestBody body, Action> requestConfiguration = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.Orgs.Item.Invitations.InvitationsRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Orgs.Item.Invitations.InvitationsRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// The return hash contains a `role` field which refers to the OrganizationInvitation role and will be one of the following values: `direct_member`, `admin`,`billing_manager`, or `hiring_manager`. If the invitee is not a GitHubmember, the `login` field in the return hash will be `null`. + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class InvitationsRequestBuilderGetQueryParameters + { + /// Filter invitations by their invitation source. + [Obsolete("This property is deprecated, use InvitationSourceAsGetInvitationSourceQueryParameterType instead")] +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("invitation_source")] + public string? InvitationSource { get; set; } +#nullable restore +#else + [QueryParameter("invitation_source")] + public string InvitationSource { get; set; } +#endif + /// Filter invitations by their invitation source. + [QueryParameter("invitation_source")] + public global::Ayllu.Github.Client.Orgs.Item.Invitations.GetInvitation_sourceQueryParameterType? InvitationSourceAsGetInvitationSourceQueryParameterType { get; set; } + /// The page number of the results to fetch. For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." + [QueryParameter("page")] + public int? Page { get; set; } + /// The number of results per page (max 100). For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." + [QueryParameter("per_page")] + public int? PerPage { get; set; } + /// Filter invitations by their member role. + [Obsolete("This property is deprecated, use RoleAsGetRoleQueryParameterType instead")] +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("role")] + public string? Role { get; set; } +#nullable restore +#else + [QueryParameter("role")] + public string Role { get; set; } +#endif + /// Filter invitations by their member role. + [QueryParameter("role")] + public global::Ayllu.Github.Client.Orgs.Item.Invitations.GetRoleQueryParameterType? RoleAsGetRoleQueryParameterType { get; set; } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class InvitationsRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class InvitationsRequestBuilderPostRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Invitations/Item/Teams/TeamsRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Invitations/Item/Teams/TeamsRequestBuilder.cs new file mode 100644 index 0000000..3674587 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Invitations/Item/Teams/TeamsRequestBuilder.cs @@ -0,0 +1,112 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Orgs.Item.Invitations.Item.Teams +{ + /// + /// Builds and executes requests for operations under \orgs\{org}\invitations\{invitation_id}\teams + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class TeamsRequestBuilder : BaseRequestBuilder + { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public TeamsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/orgs/{org}/invitations/{invitation_id}/teams{?page*,per_page*}", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public TeamsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/orgs/{org}/invitations/{invitation_id}/teams{?page*,per_page*}", rawUrl) + { + } + /// + /// List all teams associated with an invitation. In order to see invitations in an organization, the authenticated user must be an organization owner. + /// API method documentation + /// + /// A List<global::Ayllu.Github.Client.Models.Team> + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 404 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task?> GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task> GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "404", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + }; + var collectionResult = await RequestAdapter.SendCollectionAsync(requestInfo, global::Ayllu.Github.Client.Models.Team.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + return collectionResult?.AsList(); + } + /// + /// List all teams associated with an invitation. In order to see invitations in an organization, the authenticated user must be an organization owner. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.Orgs.Item.Invitations.Item.Teams.TeamsRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Orgs.Item.Invitations.Item.Teams.TeamsRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// List all teams associated with an invitation. In order to see invitations in an organization, the authenticated user must be an organization owner. + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class TeamsRequestBuilderGetQueryParameters + { + /// The page number of the results to fetch. For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." + [QueryParameter("page")] + public int? Page { get; set; } + /// The number of results per page (max 100). For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." + [QueryParameter("per_page")] + public int? PerPage { get; set; } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class TeamsRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Invitations/Item/WithInvitation_ItemRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Invitations/Item/WithInvitation_ItemRequestBuilder.cs new file mode 100644 index 0000000..5d6da60 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Invitations/Item/WithInvitation_ItemRequestBuilder.cs @@ -0,0 +1,105 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Ayllu.Github.Client.Orgs.Item.Invitations.Item.Teams; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Orgs.Item.Invitations.Item +{ + /// + /// Builds and executes requests for operations under \orgs\{org}\invitations\{invitation_id} + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithInvitation_ItemRequestBuilder : BaseRequestBuilder + { + /// The teams property + public global::Ayllu.Github.Client.Orgs.Item.Invitations.Item.Teams.TeamsRequestBuilder Teams + { + get => new global::Ayllu.Github.Client.Orgs.Item.Invitations.Item.Teams.TeamsRequestBuilder(PathParameters, RequestAdapter); + } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public WithInvitation_ItemRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/orgs/{org}/invitations/{invitation_id}", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public WithInvitation_ItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/orgs/{org}/invitations/{invitation_id}", rawUrl) + { + } + /// + /// Cancel an organization invitation. In order to cancel an organization invitation, the authenticated user must be an organization owner.This endpoint triggers [notifications](https://docs.github.com/github/managing-subscriptions-and-notifications-on-github/about-notifications). + /// API method documentation + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 404 status code + /// When receiving a 422 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task DeleteAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task DeleteAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToDeleteRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "404", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "422", global::Ayllu.Github.Client.Models.ValidationError.CreateFromDiscriminatorValue }, + }; + await RequestAdapter.SendNoContentAsync(requestInfo, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// Cancel an organization invitation. In order to cancel an organization invitation, the authenticated user must be an organization owner.This endpoint triggers [notifications](https://docs.github.com/github/managing-subscriptions-and-notifications-on-github/about-notifications). + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToDeleteRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToDeleteRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.DELETE, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.Orgs.Item.Invitations.Item.WithInvitation_ItemRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Orgs.Item.Invitations.Item.WithInvitation_ItemRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithInvitation_ItemRequestBuilderDeleteRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Orgs/Item/IssueTypes/IssueTypesRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/IssueTypes/IssueTypesRequestBuilder.cs new file mode 100644 index 0000000..34f03a3 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/IssueTypes/IssueTypesRequestBuilder.cs @@ -0,0 +1,183 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Ayllu.Github.Client.Orgs.Item.IssueTypes.Item; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Orgs.Item.IssueTypes +{ + /// + /// Builds and executes requests for operations under \orgs\{org}\issue-types + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class IssueTypesRequestBuilder : BaseRequestBuilder + { + /// Gets an item from the Ayllu.Github.Client.orgs.item.issueTypes.item collection + /// The unique identifier of the issue type. + /// A + public global::Ayllu.Github.Client.Orgs.Item.IssueTypes.Item.WithIssue_type_ItemRequestBuilder this[int position] + { + get + { + var urlTplParams = new Dictionary(PathParameters); + urlTplParams.Add("issue_type_id", position); + return new global::Ayllu.Github.Client.Orgs.Item.IssueTypes.Item.WithIssue_type_ItemRequestBuilder(urlTplParams, RequestAdapter); + } + } + /// Gets an item from the Ayllu.Github.Client.orgs.item.issueTypes.item collection + /// The unique identifier of the issue type. + /// A + [Obsolete("This indexer is deprecated and will be removed in the next major version. Use the one with the typed parameter instead.")] + public global::Ayllu.Github.Client.Orgs.Item.IssueTypes.Item.WithIssue_type_ItemRequestBuilder this[string position] + { + get + { + var urlTplParams = new Dictionary(PathParameters); + if (!string.IsNullOrWhiteSpace(position)) urlTplParams.Add("issue_type_id", position); + return new global::Ayllu.Github.Client.Orgs.Item.IssueTypes.Item.WithIssue_type_ItemRequestBuilder(urlTplParams, RequestAdapter); + } + } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public IssueTypesRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/orgs/{org}/issue-types", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public IssueTypesRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/orgs/{org}/issue-types", rawUrl) + { + } + /// + /// Lists all issue types for an organization. OAuth app tokens and personal access tokens (classic) need the read:org scope to use this endpoint. + /// API method documentation + /// + /// A List<global::Ayllu.Github.Client.Models.IssueType> + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 404 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task?> GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task> GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "404", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + }; + var collectionResult = await RequestAdapter.SendCollectionAsync(requestInfo, global::Ayllu.Github.Client.Models.IssueType.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + return collectionResult?.AsList(); + } + /// + /// Create a new issue type for an organization.You can find out more about issue types in [Managing issue types in an organization](https://docs.github.com/issues/tracking-your-work-with-issues/configuring-issues/managing-issue-types-in-an-organization).To use this endpoint, the authenticated user must be an administrator for the organization. OAuth app tokens andpersonal access tokens (classic) need the `admin:org` scope to use this endpoint. + /// API method documentation + /// + /// A + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 404 status code + /// When receiving a 422 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PostAsync(global::Ayllu.Github.Client.Models.OrganizationCreateIssueType body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task PostAsync(global::Ayllu.Github.Client.Models.OrganizationCreateIssueType body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPostRequestInformation(body, requestConfiguration); + var errorMapping = new Dictionary> + { + { "404", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "422", global::Ayllu.Github.Client.Models.ValidationErrorSimple.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Models.IssueType.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// Lists all issue types for an organization. OAuth app tokens and personal access tokens (classic) need the read:org scope to use this endpoint. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Create a new issue type for an organization.You can find out more about issue types in [Managing issue types in an organization](https://docs.github.com/issues/tracking-your-work-with-issues/configuring-issues/managing-issue-types-in-an-organization).To use this endpoint, the authenticated user must be an administrator for the organization. OAuth app tokens andpersonal access tokens (classic) need the `admin:org` scope to use this endpoint. + /// + /// A + /// The request body + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPostRequestInformation(global::Ayllu.Github.Client.Models.OrganizationCreateIssueType body, Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToPostRequestInformation(global::Ayllu.Github.Client.Models.OrganizationCreateIssueType body, Action> requestConfiguration = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.Orgs.Item.IssueTypes.IssueTypesRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Orgs.Item.IssueTypes.IssueTypesRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class IssueTypesRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class IssueTypesRequestBuilderPostRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Orgs/Item/IssueTypes/Item/WithIssue_type_ItemRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/IssueTypes/Item/WithIssue_type_ItemRequestBuilder.cs new file mode 100644 index 0000000..fe77826 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/IssueTypes/Item/WithIssue_type_ItemRequestBuilder.cs @@ -0,0 +1,157 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Orgs.Item.IssueTypes.Item +{ + /// + /// Builds and executes requests for operations under \orgs\{org}\issue-types\{issue_type_id} + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithIssue_type_ItemRequestBuilder : BaseRequestBuilder + { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public WithIssue_type_ItemRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/orgs/{org}/issue-types/{issue_type_id}", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public WithIssue_type_ItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/orgs/{org}/issue-types/{issue_type_id}", rawUrl) + { + } + /// + /// Deletes an issue type for an organization.You can find out more about issue types in [Managing issue types in an organization](https://docs.github.com/issues/tracking-your-work-with-issues/configuring-issues/managing-issue-types-in-an-organization).To use this endpoint, the authenticated user must be an administrator for the organization. OAuth app tokens andpersonal access tokens (classic) need the `admin:org` scope to use this endpoint. + /// API method documentation + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 404 status code + /// When receiving a 422 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task DeleteAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task DeleteAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToDeleteRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "404", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "422", global::Ayllu.Github.Client.Models.ValidationErrorSimple.CreateFromDiscriminatorValue }, + }; + await RequestAdapter.SendNoContentAsync(requestInfo, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// Updates an issue type for an organization.You can find out more about issue types in [Managing issue types in an organization](https://docs.github.com/issues/tracking-your-work-with-issues/configuring-issues/managing-issue-types-in-an-organization).To use this endpoint, the authenticated user must be an administrator for the organization. OAuth app tokens andpersonal access tokens (classic) need the `admin:org` scope to use this endpoint. + /// API method documentation + /// + /// A + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 404 status code + /// When receiving a 422 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PutAsync(global::Ayllu.Github.Client.Models.OrganizationUpdateIssueType body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task PutAsync(global::Ayllu.Github.Client.Models.OrganizationUpdateIssueType body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPutRequestInformation(body, requestConfiguration); + var errorMapping = new Dictionary> + { + { "404", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "422", global::Ayllu.Github.Client.Models.ValidationErrorSimple.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Models.IssueType.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// Deletes an issue type for an organization.You can find out more about issue types in [Managing issue types in an organization](https://docs.github.com/issues/tracking-your-work-with-issues/configuring-issues/managing-issue-types-in-an-organization).To use this endpoint, the authenticated user must be an administrator for the organization. OAuth app tokens andpersonal access tokens (classic) need the `admin:org` scope to use this endpoint. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToDeleteRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToDeleteRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.DELETE, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Updates an issue type for an organization.You can find out more about issue types in [Managing issue types in an organization](https://docs.github.com/issues/tracking-your-work-with-issues/configuring-issues/managing-issue-types-in-an-organization).To use this endpoint, the authenticated user must be an administrator for the organization. OAuth app tokens andpersonal access tokens (classic) need the `admin:org` scope to use this endpoint. + /// + /// A + /// The request body + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPutRequestInformation(global::Ayllu.Github.Client.Models.OrganizationUpdateIssueType body, Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToPutRequestInformation(global::Ayllu.Github.Client.Models.OrganizationUpdateIssueType body, Action> requestConfiguration = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation(Method.PUT, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.Orgs.Item.IssueTypes.Item.WithIssue_type_ItemRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Orgs.Item.IssueTypes.Item.WithIssue_type_ItemRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithIssue_type_ItemRequestBuilderDeleteRequestConfiguration : RequestConfiguration + { + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithIssue_type_ItemRequestBuilderPutRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Issues/GetDirectionQueryParameterType.cs b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Issues/GetDirectionQueryParameterType.cs new file mode 100644 index 0000000..9bf3e50 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Issues/GetDirectionQueryParameterType.cs @@ -0,0 +1,20 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Orgs.Item.Issues +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public enum GetDirectionQueryParameterType + #pragma warning restore CS1591 + { + [EnumMember(Value = "asc")] + #pragma warning disable CS1591 + Asc, + #pragma warning restore CS1591 + [EnumMember(Value = "desc")] + #pragma warning disable CS1591 + Desc, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Issues/GetFilterQueryParameterType.cs b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Issues/GetFilterQueryParameterType.cs new file mode 100644 index 0000000..0735e91 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Issues/GetFilterQueryParameterType.cs @@ -0,0 +1,36 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Orgs.Item.Issues +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public enum GetFilterQueryParameterType + #pragma warning restore CS1591 + { + [EnumMember(Value = "assigned")] + #pragma warning disable CS1591 + Assigned, + #pragma warning restore CS1591 + [EnumMember(Value = "created")] + #pragma warning disable CS1591 + Created, + #pragma warning restore CS1591 + [EnumMember(Value = "mentioned")] + #pragma warning disable CS1591 + Mentioned, + #pragma warning restore CS1591 + [EnumMember(Value = "subscribed")] + #pragma warning disable CS1591 + Subscribed, + #pragma warning restore CS1591 + [EnumMember(Value = "repos")] + #pragma warning disable CS1591 + Repos, + #pragma warning restore CS1591 + [EnumMember(Value = "all")] + #pragma warning disable CS1591 + All, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Issues/GetSortQueryParameterType.cs b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Issues/GetSortQueryParameterType.cs new file mode 100644 index 0000000..55b8fa4 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Issues/GetSortQueryParameterType.cs @@ -0,0 +1,24 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Orgs.Item.Issues +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public enum GetSortQueryParameterType + #pragma warning restore CS1591 + { + [EnumMember(Value = "created")] + #pragma warning disable CS1591 + Created, + #pragma warning restore CS1591 + [EnumMember(Value = "updated")] + #pragma warning disable CS1591 + Updated, + #pragma warning restore CS1591 + [EnumMember(Value = "comments")] + #pragma warning disable CS1591 + Comments, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Issues/GetStateQueryParameterType.cs b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Issues/GetStateQueryParameterType.cs new file mode 100644 index 0000000..b4ddae3 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Issues/GetStateQueryParameterType.cs @@ -0,0 +1,24 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Orgs.Item.Issues +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public enum GetStateQueryParameterType + #pragma warning restore CS1591 + { + [EnumMember(Value = "open")] + #pragma warning disable CS1591 + Open, + #pragma warning restore CS1591 + [EnumMember(Value = "closed")] + #pragma warning disable CS1591 + Closed, + #pragma warning restore CS1591 + [EnumMember(Value = "all")] + #pragma warning disable CS1591 + All, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Issues/IssuesRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Issues/IssuesRequestBuilder.cs new file mode 100644 index 0000000..ac7683e --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Issues/IssuesRequestBuilder.cs @@ -0,0 +1,191 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Orgs.Item.Issues +{ + /// + /// Builds and executes requests for operations under \orgs\{org}\issues + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class IssuesRequestBuilder : BaseRequestBuilder + { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public IssuesRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/orgs/{org}/issues{?direction*,filter*,labels*,page*,per_page*,since*,sort*,state*,type*}", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public IssuesRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/orgs/{org}/issues{?direction*,filter*,labels*,page*,per_page*,since*,sort*,state*,type*}", rawUrl) + { + } + /// + /// 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 this reason, "Issues" endpoints may return both issues and pull requests in the response. You can identify pull requests by the `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 pull request id, use the "[List pull requests](https://docs.github.com/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/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`. + /// API method documentation + /// + /// A List<global::Ayllu.Github.Client.Models.Issue> + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 404 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task?> GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task> GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "404", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + }; + var collectionResult = await RequestAdapter.SendCollectionAsync(requestInfo, global::Ayllu.Github.Client.Models.Issue.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + return collectionResult?.AsList(); + } + /// + /// 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 this reason, "Issues" endpoints may return both issues and pull requests in the response. You can identify pull requests by the `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 pull request id, use the "[List pull requests](https://docs.github.com/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/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`. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.Orgs.Item.Issues.IssuesRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Orgs.Item.Issues.IssuesRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// 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 this reason, "Issues" endpoints may return both issues and pull requests in the response. You can identify pull requests by the `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 pull request id, use the "[List pull requests](https://docs.github.com/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/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`. + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class IssuesRequestBuilderGetQueryParameters + { + /// The direction to sort the results by. + [Obsolete("This property is deprecated, use DirectionAsGetDirectionQueryParameterType instead")] +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("direction")] + public string? Direction { get; set; } +#nullable restore +#else + [QueryParameter("direction")] + public string Direction { get; set; } +#endif + /// The direction to sort the results by. + [QueryParameter("direction")] + public global::Ayllu.Github.Client.Orgs.Item.Issues.GetDirectionQueryParameterType? DirectionAsGetDirectionQueryParameterType { get; set; } + /// 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. + [Obsolete("This property is deprecated, use FilterAsGetFilterQueryParameterType instead")] +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("filter")] + public string? Filter { get; set; } +#nullable restore +#else + [QueryParameter("filter")] + public string Filter { get; set; } +#endif + /// 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. + [QueryParameter("filter")] + public global::Ayllu.Github.Client.Orgs.Item.Issues.GetFilterQueryParameterType? FilterAsGetFilterQueryParameterType { get; set; } + /// A list of comma separated label names. Example: `bug,ui,@high` +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("labels")] + public string? Labels { get; set; } +#nullable restore +#else + [QueryParameter("labels")] + public string Labels { get; set; } +#endif + /// The page number of the results to fetch. For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." + [QueryParameter("page")] + public int? Page { get; set; } + /// The number of results per page (max 100). For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." + [QueryParameter("per_page")] + public int? PerPage { get; set; } + /// 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`. + [QueryParameter("since")] + public DateTimeOffset? Since { get; set; } + /// What to sort results by. + [Obsolete("This property is deprecated, use SortAsGetSortQueryParameterType instead")] +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("sort")] + public string? Sort { get; set; } +#nullable restore +#else + [QueryParameter("sort")] + public string Sort { get; set; } +#endif + /// What to sort results by. + [QueryParameter("sort")] + public global::Ayllu.Github.Client.Orgs.Item.Issues.GetSortQueryParameterType? SortAsGetSortQueryParameterType { get; set; } + /// Indicates the state of the issues to return. + [Obsolete("This property is deprecated, use StateAsGetStateQueryParameterType instead")] +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("state")] + public string? State { get; set; } +#nullable restore +#else + [QueryParameter("state")] + public string State { get; set; } +#endif + /// Indicates the state of the issues to return. + [QueryParameter("state")] + public global::Ayllu.Github.Client.Orgs.Item.Issues.GetStateQueryParameterType? StateAsGetStateQueryParameterType { get; set; } + /// Can be the name of an issue type. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("type")] + public string? Type { get; set; } +#nullable restore +#else + [QueryParameter("type")] + public string Type { get; set; } +#endif + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class IssuesRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Item/Item/WithEnablementItemRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Item/Item/WithEnablementItemRequestBuilder.cs new file mode 100644 index 0000000..33e03f7 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Item/Item/WithEnablementItemRequestBuilder.cs @@ -0,0 +1,98 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Orgs.Item.Item.Item +{ + /// + /// Builds and executes requests for operations under \orgs\{org}\{security_product}\{enablement} + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithEnablementItemRequestBuilder : BaseRequestBuilder + { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public WithEnablementItemRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/orgs/{org}/{security_product}/{enablement}", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public WithEnablementItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/orgs/{org}/{security_product}/{enablement}", rawUrl) + { + } + /// + /// > [!WARNING]> **Closing down notice:** The ability to enable or disable a security feature for all eligible repositories in an organization is closing down. Please use [code security configurations](https://docs.github.com/rest/code-security/configurations) instead. For more information, see the [changelog](https://github.blog/changelog/2024-07-22-deprecation-of-api-endpoint-to-enable-or-disable-a-security-feature-for-an-organization/).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/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 `admin:org`, `write:org`, or `repo` scopes to use this endpoint. + /// API method documentation + /// + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + [Obsolete("")] +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PostAsync(global::Ayllu.Github.Client.Orgs.Item.Item.Item.WithEnablementPostRequestBody body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task PostAsync(global::Ayllu.Github.Client.Orgs.Item.Item.Item.WithEnablementPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPostRequestInformation(body, requestConfiguration); + await RequestAdapter.SendNoContentAsync(requestInfo, default, cancellationToken).ConfigureAwait(false); + } + /// + /// > [!WARNING]> **Closing down notice:** The ability to enable or disable a security feature for all eligible repositories in an organization is closing down. Please use [code security configurations](https://docs.github.com/rest/code-security/configurations) instead. For more information, see the [changelog](https://github.blog/changelog/2024-07-22-deprecation-of-api-endpoint-to-enable-or-disable-a-security-feature-for-an-organization/).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/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 `admin:org`, `write:org`, or `repo` scopes to use this endpoint. + /// + /// A + /// The request body + /// Configuration for the request such as headers, query parameters, and middleware options. + [Obsolete("")] +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPostRequestInformation(global::Ayllu.Github.Client.Orgs.Item.Item.Item.WithEnablementPostRequestBody body, Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToPostRequestInformation(global::Ayllu.Github.Client.Orgs.Item.Item.Item.WithEnablementPostRequestBody body, Action> requestConfiguration = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + [Obsolete("")] + public global::Ayllu.Github.Client.Orgs.Item.Item.Item.WithEnablementItemRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Orgs.Item.Item.Item.WithEnablementItemRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithEnablementItemRequestBuilderPostRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Item/Item/WithEnablementPostRequestBody.cs b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Item/Item/WithEnablementPostRequestBody.cs new file mode 100644 index 0000000..9f98288 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Item/Item/WithEnablementPostRequestBody.cs @@ -0,0 +1,59 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Orgs.Item.Item.Item +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class WithEnablementPostRequestBody : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// 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. + public global::Ayllu.Github.Client.Orgs.Item.Item.Item.WithEnablementPostRequestBody_query_suite? QuerySuite { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public WithEnablementPostRequestBody() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Orgs.Item.Item.Item.WithEnablementPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Orgs.Item.Item.Item.WithEnablementPostRequestBody(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "query_suite", n => { QuerySuite = n.GetEnumValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteEnumValue("query_suite", QuerySuite); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Item/Item/WithEnablementPostRequestBody_query_suite.cs b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Item/Item/WithEnablementPostRequestBody_query_suite.cs new file mode 100644 index 0000000..3c82182 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Item/Item/WithEnablementPostRequestBody_query_suite.cs @@ -0,0 +1,19 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Orgs.Item.Item.Item +{ + /// 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. + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public enum WithEnablementPostRequestBody_query_suite + { + [EnumMember(Value = "default")] + #pragma warning disable CS1591 + Default, + #pragma warning restore CS1591 + [EnumMember(Value = "extended")] + #pragma warning disable CS1591 + Extended, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Item/WithSecurity_productItemRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Item/WithSecurity_productItemRequestBuilder.cs new file mode 100644 index 0000000..73a6299 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Item/WithSecurity_productItemRequestBuilder.cs @@ -0,0 +1,49 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Orgs.Item.Item.Item; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System; +namespace Ayllu.Github.Client.Orgs.Item.Item +{ + /// + /// Builds and executes requests for operations under \orgs\{org}\{security_product} + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithSecurity_productItemRequestBuilder : BaseRequestBuilder + { + /// Gets an item from the Ayllu.Github.Client.orgs.item.item.item collection + /// The action to take.`enable_all` means to enable the specified security feature for all repositories in the organization.`disable_all` means to disable the specified security feature for all repositories in the organization. + /// A + [Obsolete("")] + public global::Ayllu.Github.Client.Orgs.Item.Item.Item.WithEnablementItemRequestBuilder this[string position] + { + get + { + var urlTplParams = new Dictionary(PathParameters); + urlTplParams.Add("enablement", position); + return new global::Ayllu.Github.Client.Orgs.Item.Item.Item.WithEnablementItemRequestBuilder(urlTplParams, RequestAdapter); + } + } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public WithSecurity_productItemRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/orgs/{org}/{security_product}", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public WithSecurity_productItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/orgs/{org}/{security_product}", rawUrl) + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Members/GetFilterQueryParameterType.cs b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Members/GetFilterQueryParameterType.cs new file mode 100644 index 0000000..593b202 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Members/GetFilterQueryParameterType.cs @@ -0,0 +1,24 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Orgs.Item.Members +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public enum GetFilterQueryParameterType + #pragma warning restore CS1591 + { + [EnumMember(Value = "2fa_disabled")] + #pragma warning disable CS1591 + Twofa_disabled, + #pragma warning restore CS1591 + [EnumMember(Value = "2fa_insecure")] + #pragma warning disable CS1591 + Twofa_insecure, + #pragma warning restore CS1591 + [EnumMember(Value = "all")] + #pragma warning disable CS1591 + All, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Members/GetRoleQueryParameterType.cs b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Members/GetRoleQueryParameterType.cs new file mode 100644 index 0000000..40ae77b --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Members/GetRoleQueryParameterType.cs @@ -0,0 +1,24 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Orgs.Item.Members +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public enum GetRoleQueryParameterType + #pragma warning restore CS1591 + { + [EnumMember(Value = "all")] + #pragma warning disable CS1591 + All, + #pragma warning restore CS1591 + [EnumMember(Value = "admin")] + #pragma warning disable CS1591 + Admin, + #pragma warning restore CS1591 + [EnumMember(Value = "member")] + #pragma warning disable CS1591 + Member, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Members/Item/Codespaces/CodespacesGetResponse.cs b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Members/Item/Codespaces/CodespacesGetResponse.cs new file mode 100644 index 0000000..b503f26 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Members/Item/Codespaces/CodespacesGetResponse.cs @@ -0,0 +1,70 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Orgs.Item.Members.Item.Codespaces +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class CodespacesGetResponse : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The codespaces property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? Codespaces { get; set; } +#nullable restore +#else + public List Codespaces { get; set; } +#endif + /// The total_count property + public int? TotalCount { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public CodespacesGetResponse() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Orgs.Item.Members.Item.Codespaces.CodespacesGetResponse CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Orgs.Item.Members.Item.Codespaces.CodespacesGetResponse(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "codespaces", n => { Codespaces = n.GetCollectionOfObjectValues(global::Ayllu.Github.Client.Models.Codespace.CreateFromDiscriminatorValue)?.AsList(); } }, + { "total_count", n => { TotalCount = n.GetIntValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteCollectionOfObjectValues("codespaces", Codespaces); + writer.WriteIntValue("total_count", TotalCount); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Members/Item/Codespaces/CodespacesRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Members/Item/Codespaces/CodespacesRequestBuilder.cs new file mode 100644 index 0000000..8b89134 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Members/Item/Codespaces/CodespacesRequestBuilder.cs @@ -0,0 +1,161 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Ayllu.Github.Client.Orgs.Item.Members.Item.Codespaces.Item; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Orgs.Item.Members.Item.Codespaces +{ + /// + /// Builds and executes requests for operations under \orgs\{org}\members\{username}\codespaces + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class CodespacesRequestBuilder : BaseRequestBuilder + { + /// Gets an item from the Ayllu.Github.Client.orgs.item.members.item.codespaces.item collection + /// The name of the codespace. + /// A + public global::Ayllu.Github.Client.Orgs.Item.Members.Item.Codespaces.Item.WithCodespace_nameItemRequestBuilder this[string position] + { + get + { + var urlTplParams = new Dictionary(PathParameters); + urlTplParams.Add("codespace_name", position); + return new global::Ayllu.Github.Client.Orgs.Item.Members.Item.Codespaces.Item.WithCodespace_nameItemRequestBuilder(urlTplParams, RequestAdapter); + } + } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public CodespacesRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/orgs/{org}/members/{username}/codespaces{?page*,per_page*}", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public CodespacesRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/orgs/{org}/members/{username}/codespaces{?page*,per_page*}", rawUrl) + { + } + /// + /// 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. + /// API method documentation + /// + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 401 status code + /// When receiving a 403 status code + /// When receiving a 404 status code + /// When receiving a 500 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsCodespacesGetResponseAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task GetAsCodespacesGetResponseAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "401", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "403", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "404", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "500", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Orgs.Item.Members.Item.Codespaces.CodespacesGetResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// 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. + /// API method documentation + /// + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 401 status code + /// When receiving a 403 status code + /// When receiving a 404 status code + /// When receiving a 500 status code + [Obsolete("This method is obsolete. Use GetAsCodespacesGetResponseAsync instead.")] +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "401", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "403", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "404", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "500", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Orgs.Item.Members.Item.Codespaces.CodespacesResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// 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. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.Orgs.Item.Members.Item.Codespaces.CodespacesRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Orgs.Item.Members.Item.Codespaces.CodespacesRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// 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. + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class CodespacesRequestBuilderGetQueryParameters + { + /// The page number of the results to fetch. For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." + [QueryParameter("page")] + public int? Page { get; set; } + /// The number of results per page (max 100). For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." + [QueryParameter("per_page")] + public int? PerPage { get; set; } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class CodespacesRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Members/Item/Codespaces/CodespacesResponse.cs b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Members/Item/Codespaces/CodespacesResponse.cs new file mode 100644 index 0000000..8d2cf42 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Members/Item/Codespaces/CodespacesResponse.cs @@ -0,0 +1,28 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Orgs.Item.Members.Item.Codespaces +{ + [Obsolete("This class is obsolete. Use CodespacesGetResponse instead.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class CodespacesResponse : global::Ayllu.Github.Client.Orgs.Item.Members.Item.Codespaces.CodespacesGetResponse, IParsable + #pragma warning restore CS1591 + { + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static new global::Ayllu.Github.Client.Orgs.Item.Members.Item.Codespaces.CodespacesResponse CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Orgs.Item.Members.Item.Codespaces.CodespacesResponse(); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Members/Item/Codespaces/Item/Stop/StopRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Members/Item/Codespaces/Item/Stop/StopRequestBuilder.cs new file mode 100644 index 0000000..13dd122 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Members/Item/Codespaces/Item/Stop/StopRequestBuilder.cs @@ -0,0 +1,104 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Orgs.Item.Members.Item.Codespaces.Item.Stop +{ + /// + /// Builds and executes requests for operations under \orgs\{org}\members\{username}\codespaces\{codespace_name}\stop + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class StopRequestBuilder : BaseRequestBuilder + { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public StopRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/orgs/{org}/members/{username}/codespaces/{codespace_name}/stop", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public StopRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/orgs/{org}/members/{username}/codespaces/{codespace_name}/stop", rawUrl) + { + } + /// + /// Stops a user's codespace.OAuth app tokens and personal access tokens (classic) need the `admin:org` scope to use this endpoint. + /// API method documentation + /// + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 401 status code + /// When receiving a 403 status code + /// When receiving a 404 status code + /// When receiving a 500 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PostAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task PostAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToPostRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "401", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "403", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "404", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "500", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Models.Codespace.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// Stops a user's codespace.OAuth app tokens and personal access tokens (classic) need the `admin:org` scope to use this endpoint. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPostRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToPostRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.Orgs.Item.Members.Item.Codespaces.Item.Stop.StopRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Orgs.Item.Members.Item.Codespaces.Item.Stop.StopRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class StopRequestBuilderPostRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Members/Item/Codespaces/Item/WithCodespace_nameDeleteResponse.cs b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Members/Item/Codespaces/Item/WithCodespace_nameDeleteResponse.cs new file mode 100644 index 0000000..00e08d2 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Members/Item/Codespaces/Item/WithCodespace_nameDeleteResponse.cs @@ -0,0 +1,55 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Orgs.Item.Members.Item.Codespaces.Item +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class WithCodespace_nameDeleteResponse : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public WithCodespace_nameDeleteResponse() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Orgs.Item.Members.Item.Codespaces.Item.WithCodespace_nameDeleteResponse CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Orgs.Item.Members.Item.Codespaces.Item.WithCodespace_nameDeleteResponse(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Members/Item/Codespaces/Item/WithCodespace_nameItemRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Members/Item/Codespaces/Item/WithCodespace_nameItemRequestBuilder.cs new file mode 100644 index 0000000..5a579bd --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Members/Item/Codespaces/Item/WithCodespace_nameItemRequestBuilder.cs @@ -0,0 +1,141 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Ayllu.Github.Client.Orgs.Item.Members.Item.Codespaces.Item.Stop; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Orgs.Item.Members.Item.Codespaces.Item +{ + /// + /// Builds and executes requests for operations under \orgs\{org}\members\{username}\codespaces\{codespace_name} + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithCodespace_nameItemRequestBuilder : BaseRequestBuilder + { + /// The stop property + public global::Ayllu.Github.Client.Orgs.Item.Members.Item.Codespaces.Item.Stop.StopRequestBuilder Stop + { + get => new global::Ayllu.Github.Client.Orgs.Item.Members.Item.Codespaces.Item.Stop.StopRequestBuilder(PathParameters, RequestAdapter); + } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public WithCodespace_nameItemRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/orgs/{org}/members/{username}/codespaces/{codespace_name}", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public WithCodespace_nameItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/orgs/{org}/members/{username}/codespaces/{codespace_name}", rawUrl) + { + } + /// + /// Deletes a user's codespace.OAuth app tokens and personal access tokens (classic) need the `admin:org` scope to use this endpoint. + /// API method documentation + /// + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 401 status code + /// When receiving a 403 status code + /// When receiving a 404 status code + /// When receiving a 500 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task DeleteAsWithCodespace_nameDeleteResponseAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task DeleteAsWithCodespace_nameDeleteResponseAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToDeleteRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "401", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "403", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "404", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "500", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Orgs.Item.Members.Item.Codespaces.Item.WithCodespace_nameDeleteResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// Deletes a user's codespace.OAuth app tokens and personal access tokens (classic) need the `admin:org` scope to use this endpoint. + /// API method documentation + /// + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 401 status code + /// When receiving a 403 status code + /// When receiving a 404 status code + /// When receiving a 500 status code + [Obsolete("This method is obsolete. Use DeleteAsWithCodespace_nameDeleteResponseAsync instead.")] +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task DeleteAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task DeleteAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToDeleteRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "401", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "403", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "404", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "500", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Orgs.Item.Members.Item.Codespaces.Item.WithCodespace_nameResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// Deletes a user's codespace.OAuth app tokens and personal access tokens (classic) need the `admin:org` scope to use this endpoint. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToDeleteRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToDeleteRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.DELETE, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.Orgs.Item.Members.Item.Codespaces.Item.WithCodespace_nameItemRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Orgs.Item.Members.Item.Codespaces.Item.WithCodespace_nameItemRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithCodespace_nameItemRequestBuilderDeleteRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Members/Item/Codespaces/Item/WithCodespace_nameResponse.cs b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Members/Item/Codespaces/Item/WithCodespace_nameResponse.cs new file mode 100644 index 0000000..c6b9cf2 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Members/Item/Codespaces/Item/WithCodespace_nameResponse.cs @@ -0,0 +1,28 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Orgs.Item.Members.Item.Codespaces.Item +{ + [Obsolete("This class is obsolete. Use WithCodespace_nameDeleteResponse instead.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class WithCodespace_nameResponse : global::Ayllu.Github.Client.Orgs.Item.Members.Item.Codespaces.Item.WithCodespace_nameDeleteResponse, IParsable + #pragma warning restore CS1591 + { + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static new global::Ayllu.Github.Client.Orgs.Item.Members.Item.Codespaces.Item.WithCodespace_nameResponse CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Orgs.Item.Members.Item.Codespaces.Item.WithCodespace_nameResponse(); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Members/Item/Copilot/CopilotRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Members/Item/Copilot/CopilotRequestBuilder.cs new file mode 100644 index 0000000..e2d8207 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Members/Item/Copilot/CopilotRequestBuilder.cs @@ -0,0 +1,104 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Orgs.Item.Members.Item.Copilot +{ + /// + /// Builds and executes requests for operations under \orgs\{org}\members\{username}\copilot + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class CopilotRequestBuilder : BaseRequestBuilder + { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public CopilotRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/orgs/{org}/members/{username}/copilot", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public CopilotRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/orgs/{org}/members/{username}/copilot", rawUrl) + { + } + /// + /// > [!NOTE]> This endpoint is in public preview and is subject to change.Gets the GitHub Copilot seat details for a member of an organization who currently has access to GitHub Copilot.The seat object contains information about the user's most recent Copilot activity. Users must have telemetry enabled in their IDE for Copilot in the IDE activity to be reflected in `last_activity_at`.For more information about activity data, see [Metrics data properties for GitHub Copilot](https://docs.github.com/copilot/reference/metrics-data).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. + /// API method documentation + /// + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 401 status code + /// When receiving a 403 status code + /// When receiving a 404 status code + /// When receiving a 500 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "401", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "403", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "404", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "500", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Models.CopilotSeatDetails.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// > [!NOTE]> This endpoint is in public preview and is subject to change.Gets the GitHub Copilot seat details for a member of an organization who currently has access to GitHub Copilot.The seat object contains information about the user's most recent Copilot activity. Users must have telemetry enabled in their IDE for Copilot in the IDE activity to be reflected in `last_activity_at`.For more information about activity data, see [Metrics data properties for GitHub Copilot](https://docs.github.com/copilot/reference/metrics-data).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. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.Orgs.Item.Members.Item.Copilot.CopilotRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Orgs.Item.Members.Item.Copilot.CopilotRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class CopilotRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Members/Item/WithUsernameItemRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Members/Item/WithUsernameItemRequestBuilder.cs new file mode 100644 index 0000000..fe70dbe --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Members/Item/WithUsernameItemRequestBuilder.cs @@ -0,0 +1,153 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Ayllu.Github.Client.Orgs.Item.Members.Item.Codespaces; +using Ayllu.Github.Client.Orgs.Item.Members.Item.Copilot; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Orgs.Item.Members.Item +{ + /// + /// Builds and executes requests for operations under \orgs\{org}\members\{username} + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithUsernameItemRequestBuilder : BaseRequestBuilder + { + /// The codespaces property + public global::Ayllu.Github.Client.Orgs.Item.Members.Item.Codespaces.CodespacesRequestBuilder Codespaces + { + get => new global::Ayllu.Github.Client.Orgs.Item.Members.Item.Codespaces.CodespacesRequestBuilder(PathParameters, RequestAdapter); + } + /// The copilot property + public global::Ayllu.Github.Client.Orgs.Item.Members.Item.Copilot.CopilotRequestBuilder Copilot + { + get => new global::Ayllu.Github.Client.Orgs.Item.Members.Item.Copilot.CopilotRequestBuilder(PathParameters, RequestAdapter); + } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public WithUsernameItemRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/orgs/{org}/members/{username}", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public WithUsernameItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/orgs/{org}/members/{username}", rawUrl) + { + } + /// + /// 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.> [!NOTE]> If a user has both direct membership in the organization as well as indirect membership via an enterprise team, only their direct membership will be removed. Their indirect membership via an enterprise team remains until the user is removed from the enterprise team. + /// API method documentation + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 403 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task DeleteAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task DeleteAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToDeleteRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "403", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + }; + await RequestAdapter.SendNoContentAsync(requestInfo, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// Check if a user is, publicly or privately, a member of the organization. + /// API method documentation + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + await RequestAdapter.SendNoContentAsync(requestInfo, default, cancellationToken).ConfigureAwait(false); + } + /// + /// 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.> [!NOTE]> If a user has both direct membership in the organization as well as indirect membership via an enterprise team, only their direct membership will be removed. Their indirect membership via an enterprise team remains until the user is removed from the enterprise team. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToDeleteRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToDeleteRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.DELETE, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Check if a user is, publicly or privately, a member of the organization. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.Orgs.Item.Members.Item.WithUsernameItemRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Orgs.Item.Members.Item.WithUsernameItemRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithUsernameItemRequestBuilderDeleteRequestConfiguration : RequestConfiguration + { + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithUsernameItemRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Members/MembersRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Members/MembersRequestBuilder.cs new file mode 100644 index 0000000..f3de696 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Members/MembersRequestBuilder.cs @@ -0,0 +1,153 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Ayllu.Github.Client.Orgs.Item.Members.Item; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Orgs.Item.Members +{ + /// + /// Builds and executes requests for operations under \orgs\{org}\members + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class MembersRequestBuilder : BaseRequestBuilder + { + /// Gets an item from the Ayllu.Github.Client.orgs.item.members.item collection + /// The handle for the GitHub user account. + /// A + public global::Ayllu.Github.Client.Orgs.Item.Members.Item.WithUsernameItemRequestBuilder this[string position] + { + get + { + var urlTplParams = new Dictionary(PathParameters); + urlTplParams.Add("username", position); + return new global::Ayllu.Github.Client.Orgs.Item.Members.Item.WithUsernameItemRequestBuilder(urlTplParams, RequestAdapter); + } + } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public MembersRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/orgs/{org}/members{?filter*,page*,per_page*,role*}", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public MembersRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/orgs/{org}/members{?filter*,page*,per_page*,role*}", rawUrl) + { + } + /// + /// 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. + /// API method documentation + /// + /// A List<global::Ayllu.Github.Client.Models.SimpleUser> + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 422 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task?> GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task> GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "422", global::Ayllu.Github.Client.Models.ValidationError.CreateFromDiscriminatorValue }, + }; + var collectionResult = await RequestAdapter.SendCollectionAsync(requestInfo, global::Ayllu.Github.Client.Models.SimpleUser.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + return collectionResult?.AsList(); + } + /// + /// 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. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.Orgs.Item.Members.MembersRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Orgs.Item.Members.MembersRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// 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. + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class MembersRequestBuilderGetQueryParameters + { + /// 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. `2fa_insecure` means that only members with [insecure 2FA methods](https://docs.github.com/organizations/keeping-your-organization-secure/managing-two-factor-authentication-for-your-organization/requiring-two-factor-authentication-in-your-organization#requiring-secure-methods-of-two-factor-authentication-in-your-organization) will be returned. These options are only available for organization owners. + [Obsolete("This property is deprecated, use FilterAsGetFilterQueryParameterType instead")] +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("filter")] + public string? Filter { get; set; } +#nullable restore +#else + [QueryParameter("filter")] + public string Filter { get; set; } +#endif + /// 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. `2fa_insecure` means that only members with [insecure 2FA methods](https://docs.github.com/organizations/keeping-your-organization-secure/managing-two-factor-authentication-for-your-organization/requiring-two-factor-authentication-in-your-organization#requiring-secure-methods-of-two-factor-authentication-in-your-organization) will be returned. These options are only available for organization owners. + [QueryParameter("filter")] + public global::Ayllu.Github.Client.Orgs.Item.Members.GetFilterQueryParameterType? FilterAsGetFilterQueryParameterType { get; set; } + /// The page number of the results to fetch. For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." + [QueryParameter("page")] + public int? Page { get; set; } + /// The number of results per page (max 100). For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." + [QueryParameter("per_page")] + public int? PerPage { get; set; } + /// Filter members returned by their role. + [Obsolete("This property is deprecated, use RoleAsGetRoleQueryParameterType instead")] +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("role")] + public string? Role { get; set; } +#nullable restore +#else + [QueryParameter("role")] + public string Role { get; set; } +#endif + /// Filter members returned by their role. + [QueryParameter("role")] + public global::Ayllu.Github.Client.Orgs.Item.Members.GetRoleQueryParameterType? RoleAsGetRoleQueryParameterType { get; set; } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class MembersRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Memberships/Item/WithUsernameItemRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Memberships/Item/WithUsernameItemRequestBuilder.cs new file mode 100644 index 0000000..02777ca --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Memberships/Item/WithUsernameItemRequestBuilder.cs @@ -0,0 +1,210 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Orgs.Item.Memberships.Item +{ + /// + /// Builds and executes requests for operations under \orgs\{org}\memberships\{username} + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithUsernameItemRequestBuilder : BaseRequestBuilder + { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public WithUsernameItemRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/orgs/{org}/memberships/{username}", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public WithUsernameItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/orgs/{org}/memberships/{username}", rawUrl) + { + } + /// + /// 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.> [!NOTE]> If a user has both direct membership in the organization as well as indirect membership via an enterprise team, only their direct membership will be removed. Their indirect membership via an enterprise team remains until the user is removed from the enterprise team. + /// API method documentation + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 403 status code + /// When receiving a 404 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task DeleteAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task DeleteAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToDeleteRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "403", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "404", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + }; + await RequestAdapter.SendNoContentAsync(requestInfo, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// 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. + /// API method documentation + /// + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 403 status code + /// When receiving a 404 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "403", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "404", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Models.OrgMembership.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// 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/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. + /// API method documentation + /// + /// A + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 403 status code + /// When receiving a 422 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PutAsync(global::Ayllu.Github.Client.Orgs.Item.Memberships.Item.WithUsernamePutRequestBody body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task PutAsync(global::Ayllu.Github.Client.Orgs.Item.Memberships.Item.WithUsernamePutRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPutRequestInformation(body, requestConfiguration); + var errorMapping = new Dictionary> + { + { "403", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "422", global::Ayllu.Github.Client.Models.ValidationError.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Models.OrgMembership.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// 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.> [!NOTE]> If a user has both direct membership in the organization as well as indirect membership via an enterprise team, only their direct membership will be removed. Their indirect membership via an enterprise team remains until the user is removed from the enterprise team. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToDeleteRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToDeleteRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.DELETE, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// 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. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// 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/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. + /// + /// A + /// The request body + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPutRequestInformation(global::Ayllu.Github.Client.Orgs.Item.Memberships.Item.WithUsernamePutRequestBody body, Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToPutRequestInformation(global::Ayllu.Github.Client.Orgs.Item.Memberships.Item.WithUsernamePutRequestBody body, Action> requestConfiguration = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation(Method.PUT, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.Orgs.Item.Memberships.Item.WithUsernameItemRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Orgs.Item.Memberships.Item.WithUsernameItemRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithUsernameItemRequestBuilderDeleteRequestConfiguration : RequestConfiguration + { + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithUsernameItemRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithUsernameItemRequestBuilderPutRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Memberships/Item/WithUsernamePutRequestBody.cs b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Memberships/Item/WithUsernamePutRequestBody.cs new file mode 100644 index 0000000..c14bd78 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Memberships/Item/WithUsernamePutRequestBody.cs @@ -0,0 +1,60 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Orgs.Item.Memberships.Item +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class WithUsernamePutRequestBody : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// 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. + public global::Ayllu.Github.Client.Orgs.Item.Memberships.Item.WithUsernamePutRequestBody_role? Role { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public WithUsernamePutRequestBody() + { + AdditionalData = new Dictionary(); + Role = global::Ayllu.Github.Client.Orgs.Item.Memberships.Item.WithUsernamePutRequestBody_role.Member; + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Orgs.Item.Memberships.Item.WithUsernamePutRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Orgs.Item.Memberships.Item.WithUsernamePutRequestBody(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "role", n => { Role = n.GetEnumValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteEnumValue("role", Role); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Memberships/Item/WithUsernamePutRequestBody_role.cs b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Memberships/Item/WithUsernamePutRequestBody_role.cs new file mode 100644 index 0000000..3e3a059 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Memberships/Item/WithUsernamePutRequestBody_role.cs @@ -0,0 +1,19 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Orgs.Item.Memberships.Item +{ + /// 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. + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public enum WithUsernamePutRequestBody_role + { + [EnumMember(Value = "admin")] + #pragma warning disable CS1591 + Admin, + #pragma warning restore CS1591 + [EnumMember(Value = "member")] + #pragma warning disable CS1591 + Member, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Memberships/MembershipsRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Memberships/MembershipsRequestBuilder.cs new file mode 100644 index 0000000..a048bf2 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Memberships/MembershipsRequestBuilder.cs @@ -0,0 +1,48 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Orgs.Item.Memberships.Item; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System; +namespace Ayllu.Github.Client.Orgs.Item.Memberships +{ + /// + /// Builds and executes requests for operations under \orgs\{org}\memberships + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class MembershipsRequestBuilder : BaseRequestBuilder + { + /// Gets an item from the Ayllu.Github.Client.orgs.item.memberships.item collection + /// The handle for the GitHub user account. + /// A + public global::Ayllu.Github.Client.Orgs.Item.Memberships.Item.WithUsernameItemRequestBuilder this[string position] + { + get + { + var urlTplParams = new Dictionary(PathParameters); + urlTplParams.Add("username", position); + return new global::Ayllu.Github.Client.Orgs.Item.Memberships.Item.WithUsernameItemRequestBuilder(urlTplParams, RequestAdapter); + } + } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public MembershipsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/orgs/{org}/memberships", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public MembershipsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/orgs/{org}/memberships", rawUrl) + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Migrations/GetExcludeQueryParameterType.cs b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Migrations/GetExcludeQueryParameterType.cs new file mode 100644 index 0000000..0a28efe --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Migrations/GetExcludeQueryParameterType.cs @@ -0,0 +1,15 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Orgs.Item.Migrations +{ + /// Allowed values that can be passed to the exclude param. + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public enum GetExcludeQueryParameterType + { + [EnumMember(Value = "repositories")] + #pragma warning disable CS1591 + Repositories, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Migrations/Item/Archive/ArchiveRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Migrations/Item/Archive/ArchiveRequestBuilder.cs new file mode 100644 index 0000000..ee6cfb7 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Migrations/Item/Archive/ArchiveRequestBuilder.cs @@ -0,0 +1,147 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Orgs.Item.Migrations.Item.Archive +{ + /// + /// Builds and executes requests for operations under \orgs\{org}\migrations\{migration_id}\archive + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class ArchiveRequestBuilder : BaseRequestBuilder + { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public ArchiveRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/orgs/{org}/migrations/{migration_id}/archive", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public ArchiveRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/orgs/{org}/migrations/{migration_id}/archive", rawUrl) + { + } + /// + /// Deletes a previous migration archive. Migration archives are automatically deleted after seven days. + /// API method documentation + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 404 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task DeleteAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task DeleteAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToDeleteRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "404", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + }; + await RequestAdapter.SendNoContentAsync(requestInfo, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// Fetches the URL to a migration archive. + /// API method documentation + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 404 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "404", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + }; + await RequestAdapter.SendNoContentAsync(requestInfo, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// Deletes a previous migration archive. Migration archives are automatically deleted after seven days. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToDeleteRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToDeleteRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.DELETE, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Fetches the URL to a migration archive. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.Orgs.Item.Migrations.Item.Archive.ArchiveRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Orgs.Item.Migrations.Item.Archive.ArchiveRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class ArchiveRequestBuilderDeleteRequestConfiguration : RequestConfiguration + { + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class ArchiveRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Migrations/Item/GetExcludeQueryParameterType.cs b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Migrations/Item/GetExcludeQueryParameterType.cs new file mode 100644 index 0000000..2de3efd --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Migrations/Item/GetExcludeQueryParameterType.cs @@ -0,0 +1,15 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Orgs.Item.Migrations.Item +{ + /// Allowed values that can be passed to the exclude param. + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public enum GetExcludeQueryParameterType + { + [EnumMember(Value = "repositories")] + #pragma warning disable CS1591 + Repositories, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Migrations/Item/Repos/Item/Lock/LockRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Migrations/Item/Repos/Item/Lock/LockRequestBuilder.cs new file mode 100644 index 0000000..430b8e9 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Migrations/Item/Repos/Item/Lock/LockRequestBuilder.cs @@ -0,0 +1,97 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Orgs.Item.Migrations.Item.Repos.Item.Lock +{ + /// + /// Builds and executes requests for operations under \orgs\{org}\migrations\{migration_id}\repos\{repo_name}\lock + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class LockRequestBuilder : BaseRequestBuilder + { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public LockRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/orgs/{org}/migrations/{migration_id}/repos/{repo_name}/lock", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public LockRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/orgs/{org}/migrations/{migration_id}/repos/{repo_name}/lock", rawUrl) + { + } + /// + /// Unlocks a repository that was locked for migration. You should unlock each migrated repository and [delete them](https://docs.github.com/rest/repos/repos#delete-a-repository) when the migration is complete and you no longer need the source data. + /// API method documentation + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 404 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task DeleteAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task DeleteAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToDeleteRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "404", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + }; + await RequestAdapter.SendNoContentAsync(requestInfo, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// Unlocks a repository that was locked for migration. You should unlock each migrated repository and [delete them](https://docs.github.com/rest/repos/repos#delete-a-repository) when the migration is complete and you no longer need the source data. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToDeleteRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToDeleteRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.DELETE, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.Orgs.Item.Migrations.Item.Repos.Item.Lock.LockRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Orgs.Item.Migrations.Item.Repos.Item.Lock.LockRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class LockRequestBuilderDeleteRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Migrations/Item/Repos/Item/WithRepo_nameItemRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Migrations/Item/Repos/Item/WithRepo_nameItemRequestBuilder.cs new file mode 100644 index 0000000..aa59f6f --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Migrations/Item/Repos/Item/WithRepo_nameItemRequestBuilder.cs @@ -0,0 +1,41 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Orgs.Item.Migrations.Item.Repos.Item.Lock; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System; +namespace Ayllu.Github.Client.Orgs.Item.Migrations.Item.Repos.Item +{ + /// + /// Builds and executes requests for operations under \orgs\{org}\migrations\{migration_id}\repos\{repo_name} + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithRepo_nameItemRequestBuilder : BaseRequestBuilder + { + /// The lock property + public global::Ayllu.Github.Client.Orgs.Item.Migrations.Item.Repos.Item.Lock.LockRequestBuilder Lock + { + get => new global::Ayllu.Github.Client.Orgs.Item.Migrations.Item.Repos.Item.Lock.LockRequestBuilder(PathParameters, RequestAdapter); + } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public WithRepo_nameItemRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/orgs/{org}/migrations/{migration_id}/repos/{repo_name}", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public WithRepo_nameItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/orgs/{org}/migrations/{migration_id}/repos/{repo_name}", rawUrl) + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Migrations/Item/Repos/ReposRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Migrations/Item/Repos/ReposRequestBuilder.cs new file mode 100644 index 0000000..e2c73a8 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Migrations/Item/Repos/ReposRequestBuilder.cs @@ -0,0 +1,48 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Orgs.Item.Migrations.Item.Repos.Item; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System; +namespace Ayllu.Github.Client.Orgs.Item.Migrations.Item.Repos +{ + /// + /// Builds and executes requests for operations under \orgs\{org}\migrations\{migration_id}\repos + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class ReposRequestBuilder : BaseRequestBuilder + { + /// Gets an item from the Ayllu.Github.Client.orgs.item.migrations.item.repos.item collection + /// repo_name parameter + /// A + public global::Ayllu.Github.Client.Orgs.Item.Migrations.Item.Repos.Item.WithRepo_nameItemRequestBuilder this[string position] + { + get + { + var urlTplParams = new Dictionary(PathParameters); + urlTplParams.Add("repo_name", position); + return new global::Ayllu.Github.Client.Orgs.Item.Migrations.Item.Repos.Item.WithRepo_nameItemRequestBuilder(urlTplParams, RequestAdapter); + } + } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public ReposRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/orgs/{org}/migrations/{migration_id}/repos", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public ReposRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/orgs/{org}/migrations/{migration_id}/repos", rawUrl) + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Migrations/Item/Repositories/RepositoriesRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Migrations/Item/Repositories/RepositoriesRequestBuilder.cs new file mode 100644 index 0000000..80e14c6 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Migrations/Item/Repositories/RepositoriesRequestBuilder.cs @@ -0,0 +1,112 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Orgs.Item.Migrations.Item.Repositories +{ + /// + /// Builds and executes requests for operations under \orgs\{org}\migrations\{migration_id}\repositories + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class RepositoriesRequestBuilder : BaseRequestBuilder + { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public RepositoriesRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/orgs/{org}/migrations/{migration_id}/repositories{?page*,per_page*}", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public RepositoriesRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/orgs/{org}/migrations/{migration_id}/repositories{?page*,per_page*}", rawUrl) + { + } + /// + /// List all the repositories for this organization migration. + /// API method documentation + /// + /// A List<global::Ayllu.Github.Client.Models.MinimalRepository> + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 404 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task?> GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task> GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "404", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + }; + var collectionResult = await RequestAdapter.SendCollectionAsync(requestInfo, global::Ayllu.Github.Client.Models.MinimalRepository.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + return collectionResult?.AsList(); + } + /// + /// List all the repositories for this organization migration. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.Orgs.Item.Migrations.Item.Repositories.RepositoriesRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Orgs.Item.Migrations.Item.Repositories.RepositoriesRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// List all the repositories for this organization migration. + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class RepositoriesRequestBuilderGetQueryParameters + { + /// The page number of the results to fetch. For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." + [QueryParameter("page")] + public int? Page { get; set; } + /// The number of results per page (max 100). For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." + [QueryParameter("per_page")] + public int? PerPage { get; set; } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class RepositoriesRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Migrations/Item/WithMigration_ItemRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Migrations/Item/WithMigration_ItemRequestBuilder.cs new file mode 100644 index 0000000..19daed7 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Migrations/Item/WithMigration_ItemRequestBuilder.cs @@ -0,0 +1,144 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Ayllu.Github.Client.Orgs.Item.Migrations.Item.Archive; +using Ayllu.Github.Client.Orgs.Item.Migrations.Item.Repos; +using Ayllu.Github.Client.Orgs.Item.Migrations.Item.Repositories; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Orgs.Item.Migrations.Item +{ + /// + /// Builds and executes requests for operations under \orgs\{org}\migrations\{migration_id} + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithMigration_ItemRequestBuilder : BaseRequestBuilder + { + /// The archive property + public global::Ayllu.Github.Client.Orgs.Item.Migrations.Item.Archive.ArchiveRequestBuilder Archive + { + get => new global::Ayllu.Github.Client.Orgs.Item.Migrations.Item.Archive.ArchiveRequestBuilder(PathParameters, RequestAdapter); + } + /// The repos property + public global::Ayllu.Github.Client.Orgs.Item.Migrations.Item.Repos.ReposRequestBuilder Repos + { + get => new global::Ayllu.Github.Client.Orgs.Item.Migrations.Item.Repos.ReposRequestBuilder(PathParameters, RequestAdapter); + } + /// The repositories property + public global::Ayllu.Github.Client.Orgs.Item.Migrations.Item.Repositories.RepositoriesRequestBuilder Repositories + { + get => new global::Ayllu.Github.Client.Orgs.Item.Migrations.Item.Repositories.RepositoriesRequestBuilder(PathParameters, RequestAdapter); + } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public WithMigration_ItemRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/orgs/{org}/migrations/{migration_id}{?exclude*}", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public WithMigration_ItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/orgs/{org}/migrations/{migration_id}{?exclude*}", rawUrl) + { + } + /// + /// 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. + /// API method documentation + /// + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 404 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "404", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Models.Migration.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// 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. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.Orgs.Item.Migrations.Item.WithMigration_ItemRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Orgs.Item.Migrations.Item.WithMigration_ItemRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// 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. + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithMigration_ItemRequestBuilderGetQueryParameters + { + /// Exclude attributes from the API response to improve performance + [Obsolete("This property is deprecated, use ExcludeAsGetExcludeQueryParameterType instead")] +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("exclude")] + public string[]? Exclude { get; set; } +#nullable restore +#else + [QueryParameter("exclude")] + public string[] Exclude { get; set; } +#endif + /// Exclude attributes from the API response to improve performance +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("exclude")] + public global::Ayllu.Github.Client.Orgs.Item.Migrations.Item.GetExcludeQueryParameterType[]? ExcludeAsGetExcludeQueryParameterType { get; set; } +#nullable restore +#else + [QueryParameter("exclude")] + public global::Ayllu.Github.Client.Orgs.Item.Migrations.Item.GetExcludeQueryParameterType[] ExcludeAsGetExcludeQueryParameterType { get; set; } +#endif + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithMigration_ItemRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Migrations/MigrationsPostRequestBody.cs b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Migrations/MigrationsPostRequestBody.cs new file mode 100644 index 0000000..3d97fab --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Migrations/MigrationsPostRequestBody.cs @@ -0,0 +1,103 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Orgs.Item.Migrations +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class MigrationsPostRequestBody : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// Exclude related items from being returned in the response in order to improve performance of the request. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? Exclude { get; set; } +#nullable restore +#else + public List Exclude { get; set; } +#endif + /// Indicates whether attachments should be excluded from the migration (to reduce migration archive file size). + public bool? ExcludeAttachments { get; set; } + /// Indicates whether the repository git data should be excluded from the migration. + public bool? ExcludeGitData { get; set; } + /// Indicates whether metadata should be excluded and only git source should be included for the migration. + public bool? ExcludeMetadata { get; set; } + /// Indicates whether projects owned by the organization or users should be excluded. from the migration. + public bool? ExcludeOwnerProjects { get; set; } + /// Indicates whether releases should be excluded from the migration (to reduce migration archive file size). + public bool? ExcludeReleases { get; set; } + /// Indicates whether repositories should be locked (to prevent manipulation) while migrating data. + public bool? LockRepositories { get; set; } + /// Indicates whether this should only include organization metadata (repositories array should be empty and will ignore other flags). + public bool? OrgMetadataOnly { get; set; } + /// A list of arrays indicating which repositories should be migrated. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? Repositories { get; set; } +#nullable restore +#else + public List Repositories { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public MigrationsPostRequestBody() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Orgs.Item.Migrations.MigrationsPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Orgs.Item.Migrations.MigrationsPostRequestBody(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "exclude", n => { Exclude = n.GetCollectionOfEnumValues()?.AsList(); } }, + { "exclude_attachments", n => { ExcludeAttachments = n.GetBoolValue(); } }, + { "exclude_git_data", n => { ExcludeGitData = n.GetBoolValue(); } }, + { "exclude_metadata", n => { ExcludeMetadata = n.GetBoolValue(); } }, + { "exclude_owner_projects", n => { ExcludeOwnerProjects = n.GetBoolValue(); } }, + { "exclude_releases", n => { ExcludeReleases = n.GetBoolValue(); } }, + { "lock_repositories", n => { LockRepositories = n.GetBoolValue(); } }, + { "org_metadata_only", n => { OrgMetadataOnly = n.GetBoolValue(); } }, + { "repositories", n => { Repositories = n.GetCollectionOfPrimitiveValues()?.AsList(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteCollectionOfEnumValues("exclude", Exclude); + writer.WriteBoolValue("exclude_attachments", ExcludeAttachments); + writer.WriteBoolValue("exclude_git_data", ExcludeGitData); + writer.WriteBoolValue("exclude_metadata", ExcludeMetadata); + writer.WriteBoolValue("exclude_owner_projects", ExcludeOwnerProjects); + writer.WriteBoolValue("exclude_releases", ExcludeReleases); + writer.WriteBoolValue("lock_repositories", LockRepositories); + writer.WriteBoolValue("org_metadata_only", OrgMetadataOnly); + writer.WriteCollectionOfPrimitiveValues("repositories", Repositories); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Migrations/MigrationsPostRequestBody_exclude.cs b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Migrations/MigrationsPostRequestBody_exclude.cs new file mode 100644 index 0000000..71a00bf --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Migrations/MigrationsPostRequestBody_exclude.cs @@ -0,0 +1,16 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Orgs.Item.Migrations +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public enum MigrationsPostRequestBody_exclude + #pragma warning restore CS1591 + { + [EnumMember(Value = "repositories")] + #pragma warning disable CS1591 + Repositories, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Migrations/MigrationsRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Migrations/MigrationsRequestBuilder.cs new file mode 100644 index 0000000..005b96f --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Migrations/MigrationsRequestBuilder.cs @@ -0,0 +1,212 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Ayllu.Github.Client.Orgs.Item.Migrations.Item; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Orgs.Item.Migrations +{ + /// + /// Builds and executes requests for operations under \orgs\{org}\migrations + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class MigrationsRequestBuilder : BaseRequestBuilder + { + /// Gets an item from the Ayllu.Github.Client.orgs.item.migrations.item collection + /// The unique identifier of the migration. + /// A + public global::Ayllu.Github.Client.Orgs.Item.Migrations.Item.WithMigration_ItemRequestBuilder this[int position] + { + get + { + var urlTplParams = new Dictionary(PathParameters); + urlTplParams.Add("migration_id", position); + return new global::Ayllu.Github.Client.Orgs.Item.Migrations.Item.WithMigration_ItemRequestBuilder(urlTplParams, RequestAdapter); + } + } + /// Gets an item from the Ayllu.Github.Client.orgs.item.migrations.item collection + /// The unique identifier of the migration. + /// A + [Obsolete("This indexer is deprecated and will be removed in the next major version. Use the one with the typed parameter instead.")] + public global::Ayllu.Github.Client.Orgs.Item.Migrations.Item.WithMigration_ItemRequestBuilder this[string position] + { + get + { + var urlTplParams = new Dictionary(PathParameters); + if (!string.IsNullOrWhiteSpace(position)) urlTplParams.Add("migration_id", position); + return new global::Ayllu.Github.Client.Orgs.Item.Migrations.Item.WithMigration_ItemRequestBuilder(urlTplParams, RequestAdapter); + } + } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public MigrationsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/orgs/{org}/migrations{?exclude*,page*,per_page*}", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public MigrationsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/orgs/{org}/migrations{?exclude*,page*,per_page*}", rawUrl) + { + } + /// + /// 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. + /// API method documentation + /// + /// A List<global::Ayllu.Github.Client.Models.Migration> + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task?> GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task> GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var collectionResult = await RequestAdapter.SendCollectionAsync(requestInfo, global::Ayllu.Github.Client.Models.Migration.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false); + return collectionResult?.AsList(); + } + /// + /// Initiates the generation of a migration archive. + /// API method documentation + /// + /// A + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 404 status code + /// When receiving a 422 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PostAsync(global::Ayllu.Github.Client.Orgs.Item.Migrations.MigrationsPostRequestBody body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task PostAsync(global::Ayllu.Github.Client.Orgs.Item.Migrations.MigrationsPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPostRequestInformation(body, requestConfiguration); + var errorMapping = new Dictionary> + { + { "404", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "422", global::Ayllu.Github.Client.Models.ValidationError.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Models.Migration.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// 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. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Initiates the generation of a migration archive. + /// + /// A + /// The request body + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPostRequestInformation(global::Ayllu.Github.Client.Orgs.Item.Migrations.MigrationsPostRequestBody body, Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToPostRequestInformation(global::Ayllu.Github.Client.Orgs.Item.Migrations.MigrationsPostRequestBody body, Action> requestConfiguration = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.Orgs.Item.Migrations.MigrationsRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Orgs.Item.Migrations.MigrationsRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// 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. + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class MigrationsRequestBuilderGetQueryParameters + { + /// Exclude attributes from the API response to improve performance + [Obsolete("This property is deprecated, use ExcludeAsGetExcludeQueryParameterType instead")] +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("exclude")] + public string[]? Exclude { get; set; } +#nullable restore +#else + [QueryParameter("exclude")] + public string[] Exclude { get; set; } +#endif + /// Exclude attributes from the API response to improve performance +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("exclude")] + public global::Ayllu.Github.Client.Orgs.Item.Migrations.GetExcludeQueryParameterType[]? ExcludeAsGetExcludeQueryParameterType { get; set; } +#nullable restore +#else + [QueryParameter("exclude")] + public global::Ayllu.Github.Client.Orgs.Item.Migrations.GetExcludeQueryParameterType[] ExcludeAsGetExcludeQueryParameterType { get; set; } +#endif + /// The page number of the results to fetch. For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." + [QueryParameter("page")] + public int? Page { get; set; } + /// The number of results per page (max 100). For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." + [QueryParameter("per_page")] + public int? PerPage { get; set; } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class MigrationsRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class MigrationsRequestBuilderPostRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Orgs/Item/OrganizationRoles/Item/Teams/TeamsRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/OrganizationRoles/Item/Teams/TeamsRequestBuilder.cs new file mode 100644 index 0000000..57d09bb --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/OrganizationRoles/Item/Teams/TeamsRequestBuilder.cs @@ -0,0 +1,107 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Orgs.Item.OrganizationRoles.Item.Teams +{ + /// + /// Builds and executes requests for operations under \orgs\{org}\organization-roles\{role_id}\teams + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class TeamsRequestBuilder : BaseRequestBuilder + { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public TeamsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/orgs/{org}/organization-roles/{role_id}/teams{?page*,per_page*}", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public TeamsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/orgs/{org}/organization-roles/{role_id}/teams{?page*,per_page*}", rawUrl) + { + } + /// + /// Lists the teams that are assigned to an organization role. For more information on organization roles, see "[Using organization roles](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/using-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. + /// API method documentation + /// + /// A List<global::Ayllu.Github.Client.Models.TeamRoleAssignment> + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task?> GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task> GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var collectionResult = await RequestAdapter.SendCollectionAsync(requestInfo, global::Ayllu.Github.Client.Models.TeamRoleAssignment.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false); + return collectionResult?.AsList(); + } + /// + /// Lists the teams that are assigned to an organization role. For more information on organization roles, see "[Using organization roles](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/using-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. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.Orgs.Item.OrganizationRoles.Item.Teams.TeamsRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Orgs.Item.OrganizationRoles.Item.Teams.TeamsRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Lists the teams that are assigned to an organization role. For more information on organization roles, see "[Using organization roles](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/using-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. + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class TeamsRequestBuilderGetQueryParameters + { + /// The page number of the results to fetch. For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." + [QueryParameter("page")] + public int? Page { get; set; } + /// The number of results per page (max 100). For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." + [QueryParameter("per_page")] + public int? PerPage { get; set; } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class TeamsRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Orgs/Item/OrganizationRoles/Item/Users/UsersRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/OrganizationRoles/Item/Users/UsersRequestBuilder.cs new file mode 100644 index 0000000..b56a37a --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/OrganizationRoles/Item/Users/UsersRequestBuilder.cs @@ -0,0 +1,107 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Orgs.Item.OrganizationRoles.Item.Users +{ + /// + /// Builds and executes requests for operations under \orgs\{org}\organization-roles\{role_id}\users + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class UsersRequestBuilder : BaseRequestBuilder + { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public UsersRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/orgs/{org}/organization-roles/{role_id}/users{?page*,per_page*}", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public UsersRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/orgs/{org}/organization-roles/{role_id}/users{?page*,per_page*}", rawUrl) + { + } + /// + /// Lists organization members that are assigned to an organization role. For more information on organization roles, see "[Using organization roles](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/using-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. + /// API method documentation + /// + /// A List<global::Ayllu.Github.Client.Models.UserRoleAssignment> + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task?> GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task> GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var collectionResult = await RequestAdapter.SendCollectionAsync(requestInfo, global::Ayllu.Github.Client.Models.UserRoleAssignment.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false); + return collectionResult?.AsList(); + } + /// + /// Lists organization members that are assigned to an organization role. For more information on organization roles, see "[Using organization roles](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/using-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. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.Orgs.Item.OrganizationRoles.Item.Users.UsersRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Orgs.Item.OrganizationRoles.Item.Users.UsersRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Lists organization members that are assigned to an organization role. For more information on organization roles, see "[Using organization roles](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/using-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. + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class UsersRequestBuilderGetQueryParameters + { + /// The page number of the results to fetch. For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." + [QueryParameter("page")] + public int? Page { get; set; } + /// The number of results per page (max 100). For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." + [QueryParameter("per_page")] + public int? PerPage { get; set; } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class UsersRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Orgs/Item/OrganizationRoles/Item/WithRole_ItemRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/OrganizationRoles/Item/WithRole_ItemRequestBuilder.cs new file mode 100644 index 0000000..225a823 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/OrganizationRoles/Item/WithRole_ItemRequestBuilder.cs @@ -0,0 +1,112 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Ayllu.Github.Client.Orgs.Item.OrganizationRoles.Item.Teams; +using Ayllu.Github.Client.Orgs.Item.OrganizationRoles.Item.Users; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Orgs.Item.OrganizationRoles.Item +{ + /// + /// Builds and executes requests for operations under \orgs\{org}\organization-roles\{role_id} + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithRole_ItemRequestBuilder : BaseRequestBuilder + { + /// The teams property + public global::Ayllu.Github.Client.Orgs.Item.OrganizationRoles.Item.Teams.TeamsRequestBuilder Teams + { + get => new global::Ayllu.Github.Client.Orgs.Item.OrganizationRoles.Item.Teams.TeamsRequestBuilder(PathParameters, RequestAdapter); + } + /// The users property + public global::Ayllu.Github.Client.Orgs.Item.OrganizationRoles.Item.Users.UsersRequestBuilder Users + { + get => new global::Ayllu.Github.Client.Orgs.Item.OrganizationRoles.Item.Users.UsersRequestBuilder(PathParameters, RequestAdapter); + } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public WithRole_ItemRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/orgs/{org}/organization-roles/{role_id}", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public WithRole_ItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/orgs/{org}/organization-roles/{role_id}", rawUrl) + { + } + /// + /// Gets an organization role that is available to this organization. For more information on organization roles, see "[Using organization roles](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/using-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. + /// API method documentation + /// + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 404 status code + /// When receiving a 422 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "404", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "422", global::Ayllu.Github.Client.Models.ValidationError.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Models.OrganizationRole.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// Gets an organization role that is available to this organization. For more information on organization roles, see "[Using organization roles](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/using-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. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.Orgs.Item.OrganizationRoles.Item.WithRole_ItemRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Orgs.Item.OrganizationRoles.Item.WithRole_ItemRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithRole_ItemRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Orgs/Item/OrganizationRoles/OrganizationRolesGetResponse.cs b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/OrganizationRoles/OrganizationRolesGetResponse.cs new file mode 100644 index 0000000..266f470 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/OrganizationRoles/OrganizationRolesGetResponse.cs @@ -0,0 +1,70 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Orgs.Item.OrganizationRoles +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class OrganizationRolesGetResponse : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The list of organization roles available to the organization. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? Roles { get; set; } +#nullable restore +#else + public List Roles { get; set; } +#endif + /// The total number of organization roles available to the organization. + public int? TotalCount { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public OrganizationRolesGetResponse() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Orgs.Item.OrganizationRoles.OrganizationRolesGetResponse CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Orgs.Item.OrganizationRoles.OrganizationRolesGetResponse(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "roles", n => { Roles = n.GetCollectionOfObjectValues(global::Ayllu.Github.Client.Models.OrganizationRole.CreateFromDiscriminatorValue)?.AsList(); } }, + { "total_count", n => { TotalCount = n.GetIntValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteCollectionOfObjectValues("roles", Roles); + writer.WriteIntValue("total_count", TotalCount); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Orgs/Item/OrganizationRoles/OrganizationRolesRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/OrganizationRoles/OrganizationRolesRequestBuilder.cs new file mode 100644 index 0000000..9223787 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/OrganizationRoles/OrganizationRolesRequestBuilder.cs @@ -0,0 +1,165 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Ayllu.Github.Client.Orgs.Item.OrganizationRoles.Item; +using Ayllu.Github.Client.Orgs.Item.OrganizationRoles.Teams; +using Ayllu.Github.Client.Orgs.Item.OrganizationRoles.Users; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Orgs.Item.OrganizationRoles +{ + /// + /// Builds and executes requests for operations under \orgs\{org}\organization-roles + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class OrganizationRolesRequestBuilder : BaseRequestBuilder + { + /// The teams property + public global::Ayllu.Github.Client.Orgs.Item.OrganizationRoles.Teams.TeamsRequestBuilder Teams + { + get => new global::Ayllu.Github.Client.Orgs.Item.OrganizationRoles.Teams.TeamsRequestBuilder(PathParameters, RequestAdapter); + } + /// The users property + public global::Ayllu.Github.Client.Orgs.Item.OrganizationRoles.Users.UsersRequestBuilder Users + { + get => new global::Ayllu.Github.Client.Orgs.Item.OrganizationRoles.Users.UsersRequestBuilder(PathParameters, RequestAdapter); + } + /// Gets an item from the Ayllu.Github.Client.orgs.item.organizationRoles.item collection + /// The unique identifier of the role. + /// A + public global::Ayllu.Github.Client.Orgs.Item.OrganizationRoles.Item.WithRole_ItemRequestBuilder this[int position] + { + get + { + var urlTplParams = new Dictionary(PathParameters); + urlTplParams.Add("role_id", position); + return new global::Ayllu.Github.Client.Orgs.Item.OrganizationRoles.Item.WithRole_ItemRequestBuilder(urlTplParams, RequestAdapter); + } + } + /// Gets an item from the Ayllu.Github.Client.orgs.item.organizationRoles.item collection + /// The unique identifier of the role. + /// A + [Obsolete("This indexer is deprecated and will be removed in the next major version. Use the one with the typed parameter instead.")] + public global::Ayllu.Github.Client.Orgs.Item.OrganizationRoles.Item.WithRole_ItemRequestBuilder this[string position] + { + get + { + var urlTplParams = new Dictionary(PathParameters); + if (!string.IsNullOrWhiteSpace(position)) urlTplParams.Add("role_id", position); + return new global::Ayllu.Github.Client.Orgs.Item.OrganizationRoles.Item.WithRole_ItemRequestBuilder(urlTplParams, RequestAdapter); + } + } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public OrganizationRolesRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/orgs/{org}/organization-roles", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public OrganizationRolesRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/orgs/{org}/organization-roles", rawUrl) + { + } + /// + /// Lists the organization roles available in this organization. For more information on organization roles, see "[Using organization roles](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/using-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. + /// API method documentation + /// + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 404 status code + /// When receiving a 422 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsOrganizationRolesGetResponseAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task GetAsOrganizationRolesGetResponseAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "404", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "422", global::Ayllu.Github.Client.Models.ValidationError.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Orgs.Item.OrganizationRoles.OrganizationRolesGetResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// Lists the organization roles available in this organization. For more information on organization roles, see "[Using organization roles](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/using-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. + /// API method documentation + /// + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 404 status code + /// When receiving a 422 status code + [Obsolete("This method is obsolete. Use GetAsOrganizationRolesGetResponseAsync instead.")] +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "404", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "422", global::Ayllu.Github.Client.Models.ValidationError.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Orgs.Item.OrganizationRoles.OrganizationRolesResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// Lists the organization roles available in this organization. For more information on organization roles, see "[Using organization roles](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/using-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. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.Orgs.Item.OrganizationRoles.OrganizationRolesRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Orgs.Item.OrganizationRoles.OrganizationRolesRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class OrganizationRolesRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Orgs/Item/OrganizationRoles/OrganizationRolesResponse.cs b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/OrganizationRoles/OrganizationRolesResponse.cs new file mode 100644 index 0000000..c801e5d --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/OrganizationRoles/OrganizationRolesResponse.cs @@ -0,0 +1,28 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Orgs.Item.OrganizationRoles +{ + [Obsolete("This class is obsolete. Use OrganizationRolesGetResponse instead.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class OrganizationRolesResponse : global::Ayllu.Github.Client.Orgs.Item.OrganizationRoles.OrganizationRolesGetResponse, IParsable + #pragma warning restore CS1591 + { + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static new global::Ayllu.Github.Client.Orgs.Item.OrganizationRoles.OrganizationRolesResponse CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Orgs.Item.OrganizationRoles.OrganizationRolesResponse(); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Orgs/Item/OrganizationRoles/Teams/Item/Item/WithRole_ItemRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/OrganizationRoles/Teams/Item/Item/WithRole_ItemRequestBuilder.cs new file mode 100644 index 0000000..478f339 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/OrganizationRoles/Teams/Item/Item/WithRole_ItemRequestBuilder.cs @@ -0,0 +1,134 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Orgs.Item.OrganizationRoles.Teams.Item.Item +{ + /// + /// Builds and executes requests for operations under \orgs\{org}\organization-roles\teams\{team_slug}\{role_id} + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithRole_ItemRequestBuilder : BaseRequestBuilder + { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public WithRole_ItemRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/orgs/{org}/organization-roles/teams/{team_slug}/{role_id}", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public WithRole_ItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/orgs/{org}/organization-roles/teams/{team_slug}/{role_id}", rawUrl) + { + } + /// + /// Removes an organization role from a team. For more information on organization roles, see "[Using organization roles](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/using-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 + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task DeleteAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task DeleteAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToDeleteRequestInformation(requestConfiguration); + await RequestAdapter.SendNoContentAsync(requestInfo, default, cancellationToken).ConfigureAwait(false); + } + /// + /// Assigns an organization role to a team in an organization. For more information on organization roles, see "[Using organization roles](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/using-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 + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PutAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task PutAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToPutRequestInformation(requestConfiguration); + await RequestAdapter.SendNoContentAsync(requestInfo, default, cancellationToken).ConfigureAwait(false); + } + /// + /// Removes an organization role from a team. For more information on organization roles, see "[Using organization roles](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/using-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. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToDeleteRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToDeleteRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.DELETE, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + return requestInfo; + } + /// + /// Assigns an organization role to a team in an organization. For more information on organization roles, see "[Using organization roles](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/using-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. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPutRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToPutRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.PUT, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.Orgs.Item.OrganizationRoles.Teams.Item.Item.WithRole_ItemRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Orgs.Item.OrganizationRoles.Teams.Item.Item.WithRole_ItemRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithRole_ItemRequestBuilderDeleteRequestConfiguration : RequestConfiguration + { + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithRole_ItemRequestBuilderPutRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Orgs/Item/OrganizationRoles/Teams/Item/WithTeam_slugItemRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/OrganizationRoles/Teams/Item/WithTeam_slugItemRequestBuilder.cs new file mode 100644 index 0000000..0492af7 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/OrganizationRoles/Teams/Item/WithTeam_slugItemRequestBuilder.cs @@ -0,0 +1,116 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Orgs.Item.OrganizationRoles.Teams.Item.Item; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Orgs.Item.OrganizationRoles.Teams.Item +{ + /// + /// Builds and executes requests for operations under \orgs\{org}\organization-roles\teams\{team_slug} + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithTeam_slugItemRequestBuilder : BaseRequestBuilder + { + /// Gets an item from the Ayllu.Github.Client.orgs.item.organizationRoles.teams.item.item collection + /// The unique identifier of the role. + /// A + public global::Ayllu.Github.Client.Orgs.Item.OrganizationRoles.Teams.Item.Item.WithRole_ItemRequestBuilder this[int position] + { + get + { + var urlTplParams = new Dictionary(PathParameters); + urlTplParams.Add("role_id", position); + return new global::Ayllu.Github.Client.Orgs.Item.OrganizationRoles.Teams.Item.Item.WithRole_ItemRequestBuilder(urlTplParams, RequestAdapter); + } + } + /// Gets an item from the Ayllu.Github.Client.orgs.item.organizationRoles.teams.item.item collection + /// The unique identifier of the role. + /// A + [Obsolete("This indexer is deprecated and will be removed in the next major version. Use the one with the typed parameter instead.")] + public global::Ayllu.Github.Client.Orgs.Item.OrganizationRoles.Teams.Item.Item.WithRole_ItemRequestBuilder this[string position] + { + get + { + var urlTplParams = new Dictionary(PathParameters); + if (!string.IsNullOrWhiteSpace(position)) urlTplParams.Add("role_id", position); + return new global::Ayllu.Github.Client.Orgs.Item.OrganizationRoles.Teams.Item.Item.WithRole_ItemRequestBuilder(urlTplParams, RequestAdapter); + } + } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public WithTeam_slugItemRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/orgs/{org}/organization-roles/teams/{team_slug}", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public WithTeam_slugItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/orgs/{org}/organization-roles/teams/{team_slug}", rawUrl) + { + } + /// + /// Removes all assigned organization roles from a team. For more information on organization roles, see "[Using organization roles](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/using-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 + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task DeleteAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task DeleteAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToDeleteRequestInformation(requestConfiguration); + await RequestAdapter.SendNoContentAsync(requestInfo, default, cancellationToken).ConfigureAwait(false); + } + /// + /// Removes all assigned organization roles from a team. For more information on organization roles, see "[Using organization roles](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/using-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. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToDeleteRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToDeleteRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.DELETE, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.Orgs.Item.OrganizationRoles.Teams.Item.WithTeam_slugItemRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Orgs.Item.OrganizationRoles.Teams.Item.WithTeam_slugItemRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithTeam_slugItemRequestBuilderDeleteRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Orgs/Item/OrganizationRoles/Teams/TeamsRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/OrganizationRoles/Teams/TeamsRequestBuilder.cs new file mode 100644 index 0000000..4489d03 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/OrganizationRoles/Teams/TeamsRequestBuilder.cs @@ -0,0 +1,48 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Orgs.Item.OrganizationRoles.Teams.Item; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System; +namespace Ayllu.Github.Client.Orgs.Item.OrganizationRoles.Teams +{ + /// + /// Builds and executes requests for operations under \orgs\{org}\organization-roles\teams + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class TeamsRequestBuilder : BaseRequestBuilder + { + /// Gets an item from the Ayllu.Github.Client.orgs.item.organizationRoles.teams.item collection + /// The slug of the team name. + /// A + public global::Ayllu.Github.Client.Orgs.Item.OrganizationRoles.Teams.Item.WithTeam_slugItemRequestBuilder this[string position] + { + get + { + var urlTplParams = new Dictionary(PathParameters); + urlTplParams.Add("team_slug", position); + return new global::Ayllu.Github.Client.Orgs.Item.OrganizationRoles.Teams.Item.WithTeam_slugItemRequestBuilder(urlTplParams, RequestAdapter); + } + } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public TeamsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/orgs/{org}/organization-roles/teams", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public TeamsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/orgs/{org}/organization-roles/teams", rawUrl) + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Orgs/Item/OrganizationRoles/Users/Item/Item/WithRole_ItemRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/OrganizationRoles/Users/Item/Item/WithRole_ItemRequestBuilder.cs new file mode 100644 index 0000000..1be93e5 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/OrganizationRoles/Users/Item/Item/WithRole_ItemRequestBuilder.cs @@ -0,0 +1,134 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Orgs.Item.OrganizationRoles.Users.Item.Item +{ + /// + /// Builds and executes requests for operations under \orgs\{org}\organization-roles\users\{username}\{role_id} + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithRole_ItemRequestBuilder : BaseRequestBuilder + { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public WithRole_ItemRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/orgs/{org}/organization-roles/users/{username}/{role_id}", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public WithRole_ItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/orgs/{org}/organization-roles/users/{username}/{role_id}", rawUrl) + { + } + /// + /// Remove an organization role from a user. For more information on organization roles, see "[Using organization roles](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/using-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 + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task DeleteAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task DeleteAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToDeleteRequestInformation(requestConfiguration); + await RequestAdapter.SendNoContentAsync(requestInfo, default, cancellationToken).ConfigureAwait(false); + } + /// + /// Assigns an organization role to a member of an organization. For more information on organization roles, see "[Using organization roles](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/using-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 + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PutAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task PutAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToPutRequestInformation(requestConfiguration); + await RequestAdapter.SendNoContentAsync(requestInfo, default, cancellationToken).ConfigureAwait(false); + } + /// + /// Remove an organization role from a user. For more information on organization roles, see "[Using organization roles](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/using-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. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToDeleteRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToDeleteRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.DELETE, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + return requestInfo; + } + /// + /// Assigns an organization role to a member of an organization. For more information on organization roles, see "[Using organization roles](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/using-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. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPutRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToPutRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.PUT, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.Orgs.Item.OrganizationRoles.Users.Item.Item.WithRole_ItemRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Orgs.Item.OrganizationRoles.Users.Item.Item.WithRole_ItemRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithRole_ItemRequestBuilderDeleteRequestConfiguration : RequestConfiguration + { + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithRole_ItemRequestBuilderPutRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Orgs/Item/OrganizationRoles/Users/Item/WithUsernameItemRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/OrganizationRoles/Users/Item/WithUsernameItemRequestBuilder.cs new file mode 100644 index 0000000..21bfcc2 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/OrganizationRoles/Users/Item/WithUsernameItemRequestBuilder.cs @@ -0,0 +1,116 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Orgs.Item.OrganizationRoles.Users.Item.Item; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Orgs.Item.OrganizationRoles.Users.Item +{ + /// + /// Builds and executes requests for operations under \orgs\{org}\organization-roles\users\{username} + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithUsernameItemRequestBuilder : BaseRequestBuilder + { + /// Gets an item from the Ayllu.Github.Client.orgs.item.organizationRoles.users.item.item collection + /// The unique identifier of the role. + /// A + public global::Ayllu.Github.Client.Orgs.Item.OrganizationRoles.Users.Item.Item.WithRole_ItemRequestBuilder this[int position] + { + get + { + var urlTplParams = new Dictionary(PathParameters); + urlTplParams.Add("role_id", position); + return new global::Ayllu.Github.Client.Orgs.Item.OrganizationRoles.Users.Item.Item.WithRole_ItemRequestBuilder(urlTplParams, RequestAdapter); + } + } + /// Gets an item from the Ayllu.Github.Client.orgs.item.organizationRoles.users.item.item collection + /// The unique identifier of the role. + /// A + [Obsolete("This indexer is deprecated and will be removed in the next major version. Use the one with the typed parameter instead.")] + public global::Ayllu.Github.Client.Orgs.Item.OrganizationRoles.Users.Item.Item.WithRole_ItemRequestBuilder this[string position] + { + get + { + var urlTplParams = new Dictionary(PathParameters); + if (!string.IsNullOrWhiteSpace(position)) urlTplParams.Add("role_id", position); + return new global::Ayllu.Github.Client.Orgs.Item.OrganizationRoles.Users.Item.Item.WithRole_ItemRequestBuilder(urlTplParams, RequestAdapter); + } + } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public WithUsernameItemRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/orgs/{org}/organization-roles/users/{username}", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public WithUsernameItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/orgs/{org}/organization-roles/users/{username}", rawUrl) + { + } + /// + /// Revokes all assigned organization roles from a user. For more information on organization roles, see "[Using organization roles](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/using-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 + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task DeleteAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task DeleteAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToDeleteRequestInformation(requestConfiguration); + await RequestAdapter.SendNoContentAsync(requestInfo, default, cancellationToken).ConfigureAwait(false); + } + /// + /// Revokes all assigned organization roles from a user. For more information on organization roles, see "[Using organization roles](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/using-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. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToDeleteRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToDeleteRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.DELETE, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.Orgs.Item.OrganizationRoles.Users.Item.WithUsernameItemRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Orgs.Item.OrganizationRoles.Users.Item.WithUsernameItemRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithUsernameItemRequestBuilderDeleteRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Orgs/Item/OrganizationRoles/Users/UsersRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/OrganizationRoles/Users/UsersRequestBuilder.cs new file mode 100644 index 0000000..36ba6eb --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/OrganizationRoles/Users/UsersRequestBuilder.cs @@ -0,0 +1,48 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Orgs.Item.OrganizationRoles.Users.Item; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System; +namespace Ayllu.Github.Client.Orgs.Item.OrganizationRoles.Users +{ + /// + /// Builds and executes requests for operations under \orgs\{org}\organization-roles\users + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class UsersRequestBuilder : BaseRequestBuilder + { + /// Gets an item from the Ayllu.Github.Client.orgs.item.organizationRoles.users.item collection + /// The handle for the GitHub user account. + /// A + public global::Ayllu.Github.Client.Orgs.Item.OrganizationRoles.Users.Item.WithUsernameItemRequestBuilder this[string position] + { + get + { + var urlTplParams = new Dictionary(PathParameters); + urlTplParams.Add("username", position); + return new global::Ayllu.Github.Client.Orgs.Item.OrganizationRoles.Users.Item.WithUsernameItemRequestBuilder(urlTplParams, RequestAdapter); + } + } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public UsersRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/orgs/{org}/organization-roles/users", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public UsersRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/orgs/{org}/organization-roles/users", rawUrl) + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Outside_collaborators/GetFilterQueryParameterType.cs b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Outside_collaborators/GetFilterQueryParameterType.cs new file mode 100644 index 0000000..703c88f --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Outside_collaborators/GetFilterQueryParameterType.cs @@ -0,0 +1,24 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Orgs.Item.Outside_collaborators +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public enum GetFilterQueryParameterType + #pragma warning restore CS1591 + { + [EnumMember(Value = "2fa_disabled")] + #pragma warning disable CS1591 + Twofa_disabled, + #pragma warning restore CS1591 + [EnumMember(Value = "2fa_insecure")] + #pragma warning disable CS1591 + Twofa_insecure, + #pragma warning restore CS1591 + [EnumMember(Value = "all")] + #pragma warning disable CS1591 + All, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Outside_collaborators/Item/WithUsername422Error.cs b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Outside_collaborators/Item/WithUsername422Error.cs new file mode 100644 index 0000000..8fc68e7 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Outside_collaborators/Item/WithUsername422Error.cs @@ -0,0 +1,78 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Orgs.Item.Outside_collaborators.Item +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class WithUsername422Error : ApiException, IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The documentation_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? DocumentationUrl { get; set; } +#nullable restore +#else + public string DocumentationUrl { get; set; } +#endif + /// The primary error message. + public override string Message { get => MessageEscaped ?? string.Empty; } + /// The message property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? MessageEscaped { get; set; } +#nullable restore +#else + public string MessageEscaped { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public WithUsername422Error() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Orgs.Item.Outside_collaborators.Item.WithUsername422Error CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Orgs.Item.Outside_collaborators.Item.WithUsername422Error(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "documentation_url", n => { DocumentationUrl = n.GetStringValue(); } }, + { "message", n => { MessageEscaped = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("documentation_url", DocumentationUrl); + writer.WriteStringValue("message", MessageEscaped); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Outside_collaborators/Item/WithUsernameItemRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Outside_collaborators/Item/WithUsernameItemRequestBuilder.cs new file mode 100644 index 0000000..413290b --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Outside_collaborators/Item/WithUsernameItemRequestBuilder.cs @@ -0,0 +1,180 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Orgs.Item.Outside_collaborators.Item +{ + /// + /// Builds and executes requests for operations under \orgs\{org}\outside_collaborators\{username} + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithUsernameItemRequestBuilder : BaseRequestBuilder + { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public WithUsernameItemRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/orgs/{org}/outside_collaborators/{username}", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public WithUsernameItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/orgs/{org}/outside_collaborators/{username}", rawUrl) + { + } + /// + /// Removing a user from this list will remove them from all the organization's repositories. + /// API method documentation + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 422 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task DeleteAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task DeleteAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToDeleteRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "422", global::Ayllu.Github.Client.Orgs.Item.Outside_collaborators.Item.WithUsername422Error.CreateFromDiscriminatorValue }, + }; + await RequestAdapter.SendNoContentAsync(requestInfo, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// 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/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/admin/policies/enforcing-policies-for-your-enterprise/enforcing-repository-management-policies-in-your-enterprise#enforcing-a-policy-for-inviting-outside-collaborators-to-repositories)." + /// API method documentation + /// + /// A + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 404 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PutAsWithUsernamePutResponseAsync(global::Ayllu.Github.Client.Orgs.Item.Outside_collaborators.Item.WithUsernamePutRequestBody body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task PutAsWithUsernamePutResponseAsync(global::Ayllu.Github.Client.Orgs.Item.Outside_collaborators.Item.WithUsernamePutRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPutRequestInformation(body, requestConfiguration); + var errorMapping = new Dictionary> + { + { "404", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Orgs.Item.Outside_collaborators.Item.WithUsernamePutResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// 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/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/admin/policies/enforcing-policies-for-your-enterprise/enforcing-repository-management-policies-in-your-enterprise#enforcing-a-policy-for-inviting-outside-collaborators-to-repositories)." + /// API method documentation + /// + /// A + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 404 status code + [Obsolete("This method is obsolete. Use PutAsWithUsernamePutResponseAsync instead.")] +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PutAsync(global::Ayllu.Github.Client.Orgs.Item.Outside_collaborators.Item.WithUsernamePutRequestBody body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task PutAsync(global::Ayllu.Github.Client.Orgs.Item.Outside_collaborators.Item.WithUsernamePutRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPutRequestInformation(body, requestConfiguration); + var errorMapping = new Dictionary> + { + { "404", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Orgs.Item.Outside_collaborators.Item.WithUsernameResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// Removing a user from this list will remove them from all the organization's repositories. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToDeleteRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToDeleteRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.DELETE, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// 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/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/admin/policies/enforcing-policies-for-your-enterprise/enforcing-repository-management-policies-in-your-enterprise#enforcing-a-policy-for-inviting-outside-collaborators-to-repositories)." + /// + /// A + /// The request body + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPutRequestInformation(global::Ayllu.Github.Client.Orgs.Item.Outside_collaborators.Item.WithUsernamePutRequestBody body, Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToPutRequestInformation(global::Ayllu.Github.Client.Orgs.Item.Outside_collaborators.Item.WithUsernamePutRequestBody body, Action> requestConfiguration = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation(Method.PUT, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.Orgs.Item.Outside_collaborators.Item.WithUsernameItemRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Orgs.Item.Outside_collaborators.Item.WithUsernameItemRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithUsernameItemRequestBuilderDeleteRequestConfiguration : RequestConfiguration + { + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithUsernameItemRequestBuilderPutRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Outside_collaborators/Item/WithUsernamePutRequestBody.cs b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Outside_collaborators/Item/WithUsernamePutRequestBody.cs new file mode 100644 index 0000000..38f3b54 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Outside_collaborators/Item/WithUsernamePutRequestBody.cs @@ -0,0 +1,59 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Orgs.Item.Outside_collaborators.Item +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class WithUsernamePutRequestBody : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// When set to `true`, the request will be performed asynchronously. Returns a 202 status code when the job is successfully queued. + public bool? Async { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public WithUsernamePutRequestBody() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Orgs.Item.Outside_collaborators.Item.WithUsernamePutRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Orgs.Item.Outside_collaborators.Item.WithUsernamePutRequestBody(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "async", n => { Async = n.GetBoolValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteBoolValue("async", Async); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Outside_collaborators/Item/WithUsernamePutResponse.cs b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Outside_collaborators/Item/WithUsernamePutResponse.cs new file mode 100644 index 0000000..b3bfd0a --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Outside_collaborators/Item/WithUsernamePutResponse.cs @@ -0,0 +1,45 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Orgs.Item.Outside_collaborators.Item +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class WithUsernamePutResponse : IParsable + #pragma warning restore CS1591 + { + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Orgs.Item.Outside_collaborators.Item.WithUsernamePutResponse CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Orgs.Item.Outside_collaborators.Item.WithUsernamePutResponse(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Outside_collaborators/Item/WithUsernameResponse.cs b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Outside_collaborators/Item/WithUsernameResponse.cs new file mode 100644 index 0000000..0e7e864 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Outside_collaborators/Item/WithUsernameResponse.cs @@ -0,0 +1,28 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Orgs.Item.Outside_collaborators.Item +{ + [Obsolete("This class is obsolete. Use WithUsernamePutResponse instead.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class WithUsernameResponse : global::Ayllu.Github.Client.Orgs.Item.Outside_collaborators.Item.WithUsernamePutResponse, IParsable + #pragma warning restore CS1591 + { + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static new global::Ayllu.Github.Client.Orgs.Item.Outside_collaborators.Item.WithUsernameResponse CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Orgs.Item.Outside_collaborators.Item.WithUsernameResponse(); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Outside_collaborators/Outside_collaboratorsRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Outside_collaborators/Outside_collaboratorsRequestBuilder.cs new file mode 100644 index 0000000..b01216f --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Outside_collaborators/Outside_collaboratorsRequestBuilder.cs @@ -0,0 +1,134 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Ayllu.Github.Client.Orgs.Item.Outside_collaborators.Item; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Orgs.Item.Outside_collaborators +{ + /// + /// Builds and executes requests for operations under \orgs\{org}\outside_collaborators + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class Outside_collaboratorsRequestBuilder : BaseRequestBuilder + { + /// Gets an item from the Ayllu.Github.Client.orgs.item.outside_collaborators.item collection + /// The handle for the GitHub user account. + /// A + public global::Ayllu.Github.Client.Orgs.Item.Outside_collaborators.Item.WithUsernameItemRequestBuilder this[string position] + { + get + { + var urlTplParams = new Dictionary(PathParameters); + urlTplParams.Add("username", position); + return new global::Ayllu.Github.Client.Orgs.Item.Outside_collaborators.Item.WithUsernameItemRequestBuilder(urlTplParams, RequestAdapter); + } + } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public Outside_collaboratorsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/orgs/{org}/outside_collaborators{?filter*,page*,per_page*}", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public Outside_collaboratorsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/orgs/{org}/outside_collaborators{?filter*,page*,per_page*}", rawUrl) + { + } + /// + /// List all users who are outside collaborators of an organization. + /// API method documentation + /// + /// A List<global::Ayllu.Github.Client.Models.SimpleUser> + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task?> GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task> GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var collectionResult = await RequestAdapter.SendCollectionAsync(requestInfo, global::Ayllu.Github.Client.Models.SimpleUser.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false); + return collectionResult?.AsList(); + } + /// + /// List all users who are outside collaborators of an organization. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.Orgs.Item.Outside_collaborators.Outside_collaboratorsRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Orgs.Item.Outside_collaborators.Outside_collaboratorsRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// List all users who are outside collaborators of an organization. + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class Outside_collaboratorsRequestBuilderGetQueryParameters + { + /// 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. `2fa_insecure` means that only outside collaborators with [insecure 2FA methods](https://docs.github.com/organizations/keeping-your-organization-secure/managing-two-factor-authentication-for-your-organization/requiring-two-factor-authentication-in-your-organization#requiring-secure-methods-of-two-factor-authentication-in-your-organization) will be returned. + [Obsolete("This property is deprecated, use FilterAsGetFilterQueryParameterType instead")] +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("filter")] + public string? Filter { get; set; } +#nullable restore +#else + [QueryParameter("filter")] + public string Filter { get; set; } +#endif + /// 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. `2fa_insecure` means that only outside collaborators with [insecure 2FA methods](https://docs.github.com/organizations/keeping-your-organization-secure/managing-two-factor-authentication-for-your-organization/requiring-two-factor-authentication-in-your-organization#requiring-secure-methods-of-two-factor-authentication-in-your-organization) will be returned. + [QueryParameter("filter")] + public global::Ayllu.Github.Client.Orgs.Item.Outside_collaborators.GetFilterQueryParameterType? FilterAsGetFilterQueryParameterType { get; set; } + /// The page number of the results to fetch. For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." + [QueryParameter("page")] + public int? Page { get; set; } + /// The number of results per page (max 100). For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." + [QueryParameter("per_page")] + public int? PerPage { get; set; } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class Outside_collaboratorsRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Packages/GetPackage_typeQueryParameterType.cs b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Packages/GetPackage_typeQueryParameterType.cs new file mode 100644 index 0000000..5b1cf5f --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Packages/GetPackage_typeQueryParameterType.cs @@ -0,0 +1,36 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Orgs.Item.Packages +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public enum GetPackage_typeQueryParameterType + #pragma warning restore CS1591 + { + [EnumMember(Value = "npm")] + #pragma warning disable CS1591 + Npm, + #pragma warning restore CS1591 + [EnumMember(Value = "maven")] + #pragma warning disable CS1591 + Maven, + #pragma warning restore CS1591 + [EnumMember(Value = "rubygems")] + #pragma warning disable CS1591 + Rubygems, + #pragma warning restore CS1591 + [EnumMember(Value = "docker")] + #pragma warning disable CS1591 + Docker, + #pragma warning restore CS1591 + [EnumMember(Value = "nuget")] + #pragma warning disable CS1591 + Nuget, + #pragma warning restore CS1591 + [EnumMember(Value = "container")] + #pragma warning disable CS1591 + Container, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Packages/GetVisibilityQueryParameterType.cs b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Packages/GetVisibilityQueryParameterType.cs new file mode 100644 index 0000000..fbfe6cc --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Packages/GetVisibilityQueryParameterType.cs @@ -0,0 +1,24 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Orgs.Item.Packages +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public enum GetVisibilityQueryParameterType + #pragma warning restore CS1591 + { + [EnumMember(Value = "public")] + #pragma warning disable CS1591 + Public, + #pragma warning restore CS1591 + [EnumMember(Value = "private")] + #pragma warning disable CS1591 + Private, + #pragma warning restore CS1591 + [EnumMember(Value = "internal")] + #pragma warning disable CS1591 + Internal, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Packages/Item/Item/Restore/RestoreRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Packages/Item/Item/Restore/RestoreRequestBuilder.cs new file mode 100644 index 0000000..389405d --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Packages/Item/Item/Restore/RestoreRequestBuilder.cs @@ -0,0 +1,118 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Orgs.Item.Packages.Item.Item.Restore +{ + /// + /// Builds and executes requests for operations under \orgs\{org}\packages\{package_type}\{package_name}\restore + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class RestoreRequestBuilder : BaseRequestBuilder + { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public RestoreRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/orgs/{org}/packages/{package_type}/{package_name}/restore{?token*}", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public RestoreRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/orgs/{org}/packages/{package_type}/{package_name}/restore{?token*}", rawUrl) + { + } + /// + /// 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/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. For more information, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." + /// API method documentation + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 401 status code + /// When receiving a 403 status code + /// When receiving a 404 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PostAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task PostAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToPostRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "401", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "403", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "404", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + }; + await RequestAdapter.SendNoContentAsync(requestInfo, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// 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/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. For more information, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPostRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToPostRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.Orgs.Item.Packages.Item.Item.Restore.RestoreRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Orgs.Item.Packages.Item.Item.Restore.RestoreRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// 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/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. For more information, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class RestoreRequestBuilderPostQueryParameters + { + /// package token +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("token")] + public string? Token { get; set; } +#nullable restore +#else + [QueryParameter("token")] + public string Token { get; set; } +#endif + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class RestoreRequestBuilderPostRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Packages/Item/Item/Versions/GetStateQueryParameterType.cs b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Packages/Item/Item/Versions/GetStateQueryParameterType.cs new file mode 100644 index 0000000..b429dfd --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Packages/Item/Item/Versions/GetStateQueryParameterType.cs @@ -0,0 +1,20 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Orgs.Item.Packages.Item.Item.Versions +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public enum GetStateQueryParameterType + #pragma warning restore CS1591 + { + [EnumMember(Value = "active")] + #pragma warning disable CS1591 + Active, + #pragma warning restore CS1591 + [EnumMember(Value = "deleted")] + #pragma warning disable CS1591 + Deleted, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Packages/Item/Item/Versions/Item/Restore/RestoreRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Packages/Item/Item/Versions/Item/Restore/RestoreRequestBuilder.cs new file mode 100644 index 0000000..13e265b --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Packages/Item/Item/Versions/Item/Restore/RestoreRequestBuilder.cs @@ -0,0 +1,101 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Orgs.Item.Packages.Item.Item.Versions.Item.Restore +{ + /// + /// Builds and executes requests for operations under \orgs\{org}\packages\{package_type}\{package_name}\versions\{package_version_id}\restore + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class RestoreRequestBuilder : BaseRequestBuilder + { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public RestoreRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/orgs/{org}/packages/{package_type}/{package_name}/versions/{package_version_id}/restore", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public RestoreRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/orgs/{org}/packages/{package_type}/{package_name}/versions/{package_version_id}/restore", rawUrl) + { + } + /// + /// 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/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. For more information, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." + /// API method documentation + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 401 status code + /// When receiving a 403 status code + /// When receiving a 404 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PostAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task PostAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToPostRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "401", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "403", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "404", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + }; + await RequestAdapter.SendNoContentAsync(requestInfo, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// 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/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. For more information, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPostRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToPostRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.Orgs.Item.Packages.Item.Item.Versions.Item.Restore.RestoreRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Orgs.Item.Packages.Item.Item.Versions.Item.Restore.RestoreRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class RestoreRequestBuilderPostRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Packages/Item/Item/Versions/Item/WithPackage_version_ItemRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Packages/Item/Item/Versions/Item/WithPackage_version_ItemRequestBuilder.cs new file mode 100644 index 0000000..632e2a9 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Packages/Item/Item/Versions/Item/WithPackage_version_ItemRequestBuilder.cs @@ -0,0 +1,153 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Ayllu.Github.Client.Orgs.Item.Packages.Item.Item.Versions.Item.Restore; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Orgs.Item.Packages.Item.Item.Versions.Item +{ + /// + /// Builds and executes requests for operations under \orgs\{org}\packages\{package_type}\{package_name}\versions\{package_version_id} + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithPackage_version_ItemRequestBuilder : BaseRequestBuilder + { + /// The restore property + public global::Ayllu.Github.Client.Orgs.Item.Packages.Item.Item.Versions.Item.Restore.RestoreRequestBuilder Restore + { + get => new global::Ayllu.Github.Client.Orgs.Item.Packages.Item.Item.Versions.Item.Restore.RestoreRequestBuilder(PathParameters, RequestAdapter); + } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public WithPackage_version_ItemRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/orgs/{org}/packages/{package_type}/{package_name}/versions/{package_version_id}", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public WithPackage_version_ItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/orgs/{org}/packages/{package_type}/{package_name}/versions/{package_version_id}", rawUrl) + { + } + /// + /// 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/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. For more information, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." + /// API method documentation + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 401 status code + /// When receiving a 403 status code + /// When receiving a 404 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task DeleteAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task DeleteAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToDeleteRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "401", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "403", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "404", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + }; + await RequestAdapter.SendNoContentAsync(requestInfo, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// 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. For more information, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." + /// API method documentation + /// + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Models.PackageVersion.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false); + } + /// + /// 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/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. For more information, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToDeleteRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToDeleteRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.DELETE, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// 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. For more information, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.Orgs.Item.Packages.Item.Item.Versions.Item.WithPackage_version_ItemRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Orgs.Item.Packages.Item.Item.Versions.Item.WithPackage_version_ItemRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithPackage_version_ItemRequestBuilderDeleteRequestConfiguration : RequestConfiguration + { + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithPackage_version_ItemRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Packages/Item/Item/Versions/VersionsRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Packages/Item/Item/Versions/VersionsRequestBuilder.cs new file mode 100644 index 0000000..c140604 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Packages/Item/Item/Versions/VersionsRequestBuilder.cs @@ -0,0 +1,156 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Ayllu.Github.Client.Orgs.Item.Packages.Item.Item.Versions.Item; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Orgs.Item.Packages.Item.Item.Versions +{ + /// + /// Builds and executes requests for operations under \orgs\{org}\packages\{package_type}\{package_name}\versions + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class VersionsRequestBuilder : BaseRequestBuilder + { + /// Gets an item from the Ayllu.Github.Client.orgs.item.packages.item.item.versions.item collection + /// Unique identifier of the package version. + /// A + public global::Ayllu.Github.Client.Orgs.Item.Packages.Item.Item.Versions.Item.WithPackage_version_ItemRequestBuilder this[int position] + { + get + { + var urlTplParams = new Dictionary(PathParameters); + urlTplParams.Add("package_version_id", position); + return new global::Ayllu.Github.Client.Orgs.Item.Packages.Item.Item.Versions.Item.WithPackage_version_ItemRequestBuilder(urlTplParams, RequestAdapter); + } + } + /// Gets an item from the Ayllu.Github.Client.orgs.item.packages.item.item.versions.item collection + /// Unique identifier of the package version. + /// A + [Obsolete("This indexer is deprecated and will be removed in the next major version. Use the one with the typed parameter instead.")] + public global::Ayllu.Github.Client.Orgs.Item.Packages.Item.Item.Versions.Item.WithPackage_version_ItemRequestBuilder this[string position] + { + get + { + var urlTplParams = new Dictionary(PathParameters); + if (!string.IsNullOrWhiteSpace(position)) urlTplParams.Add("package_version_id", position); + return new global::Ayllu.Github.Client.Orgs.Item.Packages.Item.Item.Versions.Item.WithPackage_version_ItemRequestBuilder(urlTplParams, RequestAdapter); + } + } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public VersionsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/orgs/{org}/packages/{package_type}/{package_name}/versions{?page*,per_page*,state*}", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public VersionsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/orgs/{org}/packages/{package_type}/{package_name}/versions{?page*,per_page*,state*}", rawUrl) + { + } + /// + /// Lists package versions for a package owned by an organization.OAuth app tokens and personal access tokens (classic) need the `read:packages` scope to use this endpoint. For more information, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." + /// API method documentation + /// + /// A List<global::Ayllu.Github.Client.Models.PackageVersion> + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 401 status code + /// When receiving a 403 status code + /// When receiving a 404 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task?> GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task> GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "401", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "403", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "404", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + }; + var collectionResult = await RequestAdapter.SendCollectionAsync(requestInfo, global::Ayllu.Github.Client.Models.PackageVersion.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + return collectionResult?.AsList(); + } + /// + /// Lists package versions for a package owned by an organization.OAuth app tokens and personal access tokens (classic) need the `read:packages` scope to use this endpoint. For more information, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.Orgs.Item.Packages.Item.Item.Versions.VersionsRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Orgs.Item.Packages.Item.Item.Versions.VersionsRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Lists package versions for a package owned by an organization.OAuth app tokens and personal access tokens (classic) need the `read:packages` scope to use this endpoint. For more information, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class VersionsRequestBuilderGetQueryParameters + { + /// The page number of the results to fetch. For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." + [QueryParameter("page")] + public int? Page { get; set; } + /// The number of results per page (max 100). For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." + [QueryParameter("per_page")] + public int? PerPage { get; set; } + /// The state of the package, either active or deleted. + [Obsolete("This property is deprecated, use StateAsGetStateQueryParameterType instead")] +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("state")] + public string? State { get; set; } +#nullable restore +#else + [QueryParameter("state")] + public string State { get; set; } +#endif + /// The state of the package, either active or deleted. + [QueryParameter("state")] + public global::Ayllu.Github.Client.Orgs.Item.Packages.Item.Item.Versions.GetStateQueryParameterType? StateAsGetStateQueryParameterType { get; set; } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class VersionsRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Packages/Item/Item/WithPackage_nameItemRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Packages/Item/Item/WithPackage_nameItemRequestBuilder.cs new file mode 100644 index 0000000..c9317dc --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Packages/Item/Item/WithPackage_nameItemRequestBuilder.cs @@ -0,0 +1,159 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Ayllu.Github.Client.Orgs.Item.Packages.Item.Item.Restore; +using Ayllu.Github.Client.Orgs.Item.Packages.Item.Item.Versions; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Orgs.Item.Packages.Item.Item +{ + /// + /// Builds and executes requests for operations under \orgs\{org}\packages\{package_type}\{package_name} + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithPackage_nameItemRequestBuilder : BaseRequestBuilder + { + /// The restore property + public global::Ayllu.Github.Client.Orgs.Item.Packages.Item.Item.Restore.RestoreRequestBuilder Restore + { + get => new global::Ayllu.Github.Client.Orgs.Item.Packages.Item.Item.Restore.RestoreRequestBuilder(PathParameters, RequestAdapter); + } + /// The versions property + public global::Ayllu.Github.Client.Orgs.Item.Packages.Item.Item.Versions.VersionsRequestBuilder Versions + { + get => new global::Ayllu.Github.Client.Orgs.Item.Packages.Item.Item.Versions.VersionsRequestBuilder(PathParameters, RequestAdapter); + } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public WithPackage_nameItemRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/orgs/{org}/packages/{package_type}/{package_name}", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public WithPackage_nameItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/orgs/{org}/packages/{package_type}/{package_name}", rawUrl) + { + } + /// + /// 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/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. For more information, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." + /// API method documentation + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 401 status code + /// When receiving a 403 status code + /// When receiving a 404 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task DeleteAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task DeleteAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToDeleteRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "401", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "403", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "404", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + }; + await RequestAdapter.SendNoContentAsync(requestInfo, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// Gets a specific package in an organization.OAuth app tokens and personal access tokens (classic) need the `read:packages` scope to use this endpoint. For more information, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." + /// API method documentation + /// + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Models.Package.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false); + } + /// + /// 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/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. For more information, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToDeleteRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToDeleteRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.DELETE, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Gets a specific package in an organization.OAuth app tokens and personal access tokens (classic) need the `read:packages` scope to use this endpoint. For more information, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.Orgs.Item.Packages.Item.Item.WithPackage_nameItemRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Orgs.Item.Packages.Item.Item.WithPackage_nameItemRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithPackage_nameItemRequestBuilderDeleteRequestConfiguration : RequestConfiguration + { + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithPackage_nameItemRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Packages/Item/WithPackage_typeItemRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Packages/Item/WithPackage_typeItemRequestBuilder.cs new file mode 100644 index 0000000..2ad0e4a --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Packages/Item/WithPackage_typeItemRequestBuilder.cs @@ -0,0 +1,48 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Orgs.Item.Packages.Item.Item; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System; +namespace Ayllu.Github.Client.Orgs.Item.Packages.Item +{ + /// + /// Builds and executes requests for operations under \orgs\{org}\packages\{package_type} + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithPackage_typeItemRequestBuilder : BaseRequestBuilder + { + /// Gets an item from the Ayllu.Github.Client.orgs.item.packages.item.item collection + /// The name of the package. + /// A + public global::Ayllu.Github.Client.Orgs.Item.Packages.Item.Item.WithPackage_nameItemRequestBuilder this[string position] + { + get + { + var urlTplParams = new Dictionary(PathParameters); + urlTplParams.Add("package_name", position); + return new global::Ayllu.Github.Client.Orgs.Item.Packages.Item.Item.WithPackage_nameItemRequestBuilder(urlTplParams, RequestAdapter); + } + } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public WithPackage_typeItemRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/orgs/{org}/packages/{package_type}", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public WithPackage_typeItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/orgs/{org}/packages/{package_type}", rawUrl) + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Packages/PackagesRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Packages/PackagesRequestBuilder.cs new file mode 100644 index 0000000..1f7ad1f --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Packages/PackagesRequestBuilder.cs @@ -0,0 +1,155 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Ayllu.Github.Client.Orgs.Item.Packages.Item; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Orgs.Item.Packages +{ + /// + /// Builds and executes requests for operations under \orgs\{org}\packages + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class PackagesRequestBuilder : BaseRequestBuilder + { + /// Gets an item from the Ayllu.Github.Client.orgs.item.packages.item collection + /// 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. + /// A + public global::Ayllu.Github.Client.Orgs.Item.Packages.Item.WithPackage_typeItemRequestBuilder this[string position] + { + get + { + var urlTplParams = new Dictionary(PathParameters); + urlTplParams.Add("package_type", position); + return new global::Ayllu.Github.Client.Orgs.Item.Packages.Item.WithPackage_typeItemRequestBuilder(urlTplParams, RequestAdapter); + } + } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public PackagesRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/orgs/{org}/packages?package_type={package_type}{&page*,per_page*,visibility*}", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public PackagesRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/orgs/{org}/packages?package_type={package_type}{&page*,per_page*,visibility*}", rawUrl) + { + } + /// + /// 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. For more information, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." + /// API method documentation + /// + /// A List<global::Ayllu.Github.Client.Models.Package> + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 401 status code + /// When receiving a 403 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task?> GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task> GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "401", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "403", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + }; + var collectionResult = await RequestAdapter.SendCollectionAsync(requestInfo, global::Ayllu.Github.Client.Models.Package.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + return collectionResult?.AsList(); + } + /// + /// 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. For more information, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.Orgs.Item.Packages.PackagesRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Orgs.Item.Packages.PackagesRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// 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. For more information, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class PackagesRequestBuilderGetQueryParameters + { + /// 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. + [Obsolete("This property is deprecated, use PackageTypeAsGetPackageTypeQueryParameterType instead")] +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("package_type")] + public string? PackageType { get; set; } +#nullable restore +#else + [QueryParameter("package_type")] + public string PackageType { get; set; } +#endif + /// 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. + [QueryParameter("package_type")] + public global::Ayllu.Github.Client.Orgs.Item.Packages.GetPackage_typeQueryParameterType? PackageTypeAsGetPackageTypeQueryParameterType { get; set; } + /// The page number of the results to fetch. For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." + [QueryParameter("page")] + public int? Page { get; set; } + /// The number of results per page (max 100). For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." + [QueryParameter("per_page")] + public int? PerPage { get; set; } + /// 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/packages/learn-github-packages/about-permissions-for-github-packages#granular-permissions-for-userorganization-scoped-packages)." + [Obsolete("This property is deprecated, use VisibilityAsGetVisibilityQueryParameterType instead")] +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("visibility")] + public string? Visibility { get; set; } +#nullable restore +#else + [QueryParameter("visibility")] + public string Visibility { get; set; } +#endif + /// 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/packages/learn-github-packages/about-permissions-for-github-packages#granular-permissions-for-userorganization-scoped-packages)." + [QueryParameter("visibility")] + public global::Ayllu.Github.Client.Orgs.Item.Packages.GetVisibilityQueryParameterType? VisibilityAsGetVisibilityQueryParameterType { get; set; } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class PackagesRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Orgs/Item/PersonalAccessTokenRequests/GetDirectionQueryParameterType.cs b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/PersonalAccessTokenRequests/GetDirectionQueryParameterType.cs new file mode 100644 index 0000000..e2e2b1f --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/PersonalAccessTokenRequests/GetDirectionQueryParameterType.cs @@ -0,0 +1,20 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Orgs.Item.PersonalAccessTokenRequests +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public enum GetDirectionQueryParameterType + #pragma warning restore CS1591 + { + [EnumMember(Value = "asc")] + #pragma warning disable CS1591 + Asc, + #pragma warning restore CS1591 + [EnumMember(Value = "desc")] + #pragma warning disable CS1591 + Desc, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Orgs/Item/PersonalAccessTokenRequests/GetSortQueryParameterType.cs b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/PersonalAccessTokenRequests/GetSortQueryParameterType.cs new file mode 100644 index 0000000..54cefc5 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/PersonalAccessTokenRequests/GetSortQueryParameterType.cs @@ -0,0 +1,16 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Orgs.Item.PersonalAccessTokenRequests +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public enum GetSortQueryParameterType + #pragma warning restore CS1591 + { + [EnumMember(Value = "created_at")] + #pragma warning disable CS1591 + Created_at, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Orgs/Item/PersonalAccessTokenRequests/Item/Repositories/RepositoriesRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/PersonalAccessTokenRequests/Item/Repositories/RepositoriesRequestBuilder.cs new file mode 100644 index 0000000..42f4571 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/PersonalAccessTokenRequests/Item/Repositories/RepositoriesRequestBuilder.cs @@ -0,0 +1,116 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Orgs.Item.PersonalAccessTokenRequests.Item.Repositories +{ + /// + /// Builds and executes requests for operations under \orgs\{org}\personal-access-token-requests\{pat_request_id}\repositories + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class RepositoriesRequestBuilder : BaseRequestBuilder + { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public RepositoriesRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/orgs/{org}/personal-access-token-requests/{pat_request_id}/repositories{?page*,per_page*}", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public RepositoriesRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/orgs/{org}/personal-access-token-requests/{pat_request_id}/repositories{?page*,per_page*}", rawUrl) + { + } + /// + /// Lists the repositories a fine-grained personal access token request is requesting access to.Only GitHub Apps can use this endpoint. + /// API method documentation + /// + /// A List<global::Ayllu.Github.Client.Models.MinimalRepository> + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 403 status code + /// When receiving a 404 status code + /// When receiving a 500 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task?> GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task> GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "403", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "404", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "500", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + }; + var collectionResult = await RequestAdapter.SendCollectionAsync(requestInfo, global::Ayllu.Github.Client.Models.MinimalRepository.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + return collectionResult?.AsList(); + } + /// + /// Lists the repositories a fine-grained personal access token request is requesting access to.Only GitHub Apps can use this endpoint. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.Orgs.Item.PersonalAccessTokenRequests.Item.Repositories.RepositoriesRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Orgs.Item.PersonalAccessTokenRequests.Item.Repositories.RepositoriesRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Lists the repositories a fine-grained personal access token request is requesting access to.Only GitHub Apps can use this endpoint. + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class RepositoriesRequestBuilderGetQueryParameters + { + /// The page number of the results to fetch. For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." + [QueryParameter("page")] + public int? Page { get; set; } + /// The number of results per page (max 100). For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." + [QueryParameter("per_page")] + public int? PerPage { get; set; } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class RepositoriesRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Orgs/Item/PersonalAccessTokenRequests/Item/WithPat_request_ItemRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/PersonalAccessTokenRequests/Item/WithPat_request_ItemRequestBuilder.cs new file mode 100644 index 0000000..11631c2 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/PersonalAccessTokenRequests/Item/WithPat_request_ItemRequestBuilder.cs @@ -0,0 +1,114 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Ayllu.Github.Client.Orgs.Item.PersonalAccessTokenRequests.Item.Repositories; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Orgs.Item.PersonalAccessTokenRequests.Item +{ + /// + /// Builds and executes requests for operations under \orgs\{org}\personal-access-token-requests\{pat_request_id} + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithPat_request_ItemRequestBuilder : BaseRequestBuilder + { + /// The repositories property + public global::Ayllu.Github.Client.Orgs.Item.PersonalAccessTokenRequests.Item.Repositories.RepositoriesRequestBuilder Repositories + { + get => new global::Ayllu.Github.Client.Orgs.Item.PersonalAccessTokenRequests.Item.Repositories.RepositoriesRequestBuilder(PathParameters, RequestAdapter); + } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public WithPat_request_ItemRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/orgs/{org}/personal-access-token-requests/{pat_request_id}", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public WithPat_request_ItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/orgs/{org}/personal-access-token-requests/{pat_request_id}", rawUrl) + { + } + /// + /// Approves or denies a pending request to access organization resources via a fine-grained personal access token.Only GitHub Apps can use this endpoint. + /// API method documentation + /// + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 403 status code + /// When receiving a 404 status code + /// When receiving a 422 status code + /// When receiving a 500 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PostAsync(global::Ayllu.Github.Client.Orgs.Item.PersonalAccessTokenRequests.Item.WithPat_request_PostRequestBody body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task PostAsync(global::Ayllu.Github.Client.Orgs.Item.PersonalAccessTokenRequests.Item.WithPat_request_PostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPostRequestInformation(body, requestConfiguration); + var errorMapping = new Dictionary> + { + { "403", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "404", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "422", global::Ayllu.Github.Client.Models.ValidationError.CreateFromDiscriminatorValue }, + { "500", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + }; + await RequestAdapter.SendNoContentAsync(requestInfo, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// Approves or denies a pending request to access organization resources via a fine-grained personal access token.Only GitHub Apps can use this endpoint. + /// + /// A + /// The request body + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPostRequestInformation(global::Ayllu.Github.Client.Orgs.Item.PersonalAccessTokenRequests.Item.WithPat_request_PostRequestBody body, Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToPostRequestInformation(global::Ayllu.Github.Client.Orgs.Item.PersonalAccessTokenRequests.Item.WithPat_request_PostRequestBody body, Action> requestConfiguration = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.Orgs.Item.PersonalAccessTokenRequests.Item.WithPat_request_ItemRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Orgs.Item.PersonalAccessTokenRequests.Item.WithPat_request_ItemRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithPat_request_ItemRequestBuilderPostRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Orgs/Item/PersonalAccessTokenRequests/Item/WithPat_request_PostRequestBody.cs b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/PersonalAccessTokenRequests/Item/WithPat_request_PostRequestBody.cs new file mode 100644 index 0000000..ff560de --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/PersonalAccessTokenRequests/Item/WithPat_request_PostRequestBody.cs @@ -0,0 +1,69 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Orgs.Item.PersonalAccessTokenRequests.Item +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class WithPat_request_PostRequestBody : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Action to apply to the request. + public global::Ayllu.Github.Client.Orgs.Item.PersonalAccessTokenRequests.Item.WithPat_request_PostRequestBody_action? Action { get; set; } + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// Reason for approving or denying the request. Max 1024 characters. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Reason { get; set; } +#nullable restore +#else + public string Reason { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public WithPat_request_PostRequestBody() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Orgs.Item.PersonalAccessTokenRequests.Item.WithPat_request_PostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Orgs.Item.PersonalAccessTokenRequests.Item.WithPat_request_PostRequestBody(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "action", n => { Action = n.GetEnumValue(); } }, + { "reason", n => { Reason = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteEnumValue("action", Action); + writer.WriteStringValue("reason", Reason); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Orgs/Item/PersonalAccessTokenRequests/Item/WithPat_request_PostRequestBody_action.cs b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/PersonalAccessTokenRequests/Item/WithPat_request_PostRequestBody_action.cs new file mode 100644 index 0000000..a4b67b1 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/PersonalAccessTokenRequests/Item/WithPat_request_PostRequestBody_action.cs @@ -0,0 +1,19 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Orgs.Item.PersonalAccessTokenRequests.Item +{ + /// Action to apply to the request. + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public enum WithPat_request_PostRequestBody_action + { + [EnumMember(Value = "approve")] + #pragma warning disable CS1591 + Approve, + #pragma warning restore CS1591 + [EnumMember(Value = "deny")] + #pragma warning disable CS1591 + Deny, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Orgs/Item/PersonalAccessTokenRequests/PersonalAccessTokenRequestsPostRequestBody.cs b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/PersonalAccessTokenRequests/PersonalAccessTokenRequestsPostRequestBody.cs new file mode 100644 index 0000000..513e044 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/PersonalAccessTokenRequests/PersonalAccessTokenRequestsPostRequestBody.cs @@ -0,0 +1,79 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Orgs.Item.PersonalAccessTokenRequests +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class PersonalAccessTokenRequestsPostRequestBody : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Action to apply to the requests. + public global::Ayllu.Github.Client.Orgs.Item.PersonalAccessTokenRequests.PersonalAccessTokenRequestsPostRequestBody_action? Action { get; set; } + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// 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. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? PatRequestIds { get; set; } +#nullable restore +#else + public List PatRequestIds { get; set; } +#endif + /// Reason for approving or denying the requests. Max 1024 characters. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Reason { get; set; } +#nullable restore +#else + public string Reason { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public PersonalAccessTokenRequestsPostRequestBody() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Orgs.Item.PersonalAccessTokenRequests.PersonalAccessTokenRequestsPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Orgs.Item.PersonalAccessTokenRequests.PersonalAccessTokenRequestsPostRequestBody(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "action", n => { Action = n.GetEnumValue(); } }, + { "pat_request_ids", n => { PatRequestIds = n.GetCollectionOfPrimitiveValues()?.AsList(); } }, + { "reason", n => { Reason = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteEnumValue("action", Action); + writer.WriteCollectionOfPrimitiveValues("pat_request_ids", PatRequestIds); + writer.WriteStringValue("reason", Reason); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Orgs/Item/PersonalAccessTokenRequests/PersonalAccessTokenRequestsPostRequestBody_action.cs b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/PersonalAccessTokenRequests/PersonalAccessTokenRequestsPostRequestBody_action.cs new file mode 100644 index 0000000..390dd44 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/PersonalAccessTokenRequests/PersonalAccessTokenRequestsPostRequestBody_action.cs @@ -0,0 +1,19 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Orgs.Item.PersonalAccessTokenRequests +{ + /// Action to apply to the requests. + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public enum PersonalAccessTokenRequestsPostRequestBody_action + { + [EnumMember(Value = "approve")] + #pragma warning disable CS1591 + Approve, + #pragma warning restore CS1591 + [EnumMember(Value = "deny")] + #pragma warning disable CS1591 + Deny, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Orgs/Item/PersonalAccessTokenRequests/PersonalAccessTokenRequestsPostResponse.cs b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/PersonalAccessTokenRequests/PersonalAccessTokenRequestsPostResponse.cs new file mode 100644 index 0000000..d18e850 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/PersonalAccessTokenRequests/PersonalAccessTokenRequestsPostResponse.cs @@ -0,0 +1,55 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Orgs.Item.PersonalAccessTokenRequests +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class PersonalAccessTokenRequestsPostResponse : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public PersonalAccessTokenRequestsPostResponse() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Orgs.Item.PersonalAccessTokenRequests.PersonalAccessTokenRequestsPostResponse CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Orgs.Item.PersonalAccessTokenRequests.PersonalAccessTokenRequestsPostResponse(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Orgs/Item/PersonalAccessTokenRequests/PersonalAccessTokenRequestsRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/PersonalAccessTokenRequests/PersonalAccessTokenRequestsRequestBuilder.cs new file mode 100644 index 0000000..3365106 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/PersonalAccessTokenRequests/PersonalAccessTokenRequestsRequestBuilder.cs @@ -0,0 +1,313 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Ayllu.Github.Client.Orgs.Item.PersonalAccessTokenRequests.Item; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Orgs.Item.PersonalAccessTokenRequests +{ + /// + /// Builds and executes requests for operations under \orgs\{org}\personal-access-token-requests + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class PersonalAccessTokenRequestsRequestBuilder : BaseRequestBuilder + { + /// Gets an item from the Ayllu.Github.Client.orgs.item.personalAccessTokenRequests.item collection + /// Unique identifier of the request for access via fine-grained personal access token. + /// A + public global::Ayllu.Github.Client.Orgs.Item.PersonalAccessTokenRequests.Item.WithPat_request_ItemRequestBuilder this[int position] + { + get + { + var urlTplParams = new Dictionary(PathParameters); + urlTplParams.Add("pat_request_id", position); + return new global::Ayllu.Github.Client.Orgs.Item.PersonalAccessTokenRequests.Item.WithPat_request_ItemRequestBuilder(urlTplParams, RequestAdapter); + } + } + /// Gets an item from the Ayllu.Github.Client.orgs.item.personalAccessTokenRequests.item collection + /// Unique identifier of the request for access via fine-grained personal access token. + /// A + [Obsolete("This indexer is deprecated and will be removed in the next major version. Use the one with the typed parameter instead.")] + public global::Ayllu.Github.Client.Orgs.Item.PersonalAccessTokenRequests.Item.WithPat_request_ItemRequestBuilder this[string position] + { + get + { + var urlTplParams = new Dictionary(PathParameters); + if (!string.IsNullOrWhiteSpace(position)) urlTplParams.Add("pat_request_id", position); + return new global::Ayllu.Github.Client.Orgs.Item.PersonalAccessTokenRequests.Item.WithPat_request_ItemRequestBuilder(urlTplParams, RequestAdapter); + } + } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public PersonalAccessTokenRequestsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/orgs/{org}/personal-access-token-requests{?direction*,last_used_after*,last_used_before*,owner*,page*,per_page*,permission*,repository*,sort*,token_id*}", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public PersonalAccessTokenRequestsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/orgs/{org}/personal-access-token-requests{?direction*,last_used_after*,last_used_before*,owner*,page*,per_page*,permission*,repository*,sort*,token_id*}", rawUrl) + { + } + /// + /// Lists requests from organization members to access organization resources with a fine-grained personal access token.Only GitHub Apps can use this endpoint. + /// API method documentation + /// + /// A List<global::Ayllu.Github.Client.Models.OrganizationProgrammaticAccessGrantRequest> + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 403 status code + /// When receiving a 404 status code + /// When receiving a 422 status code + /// When receiving a 500 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task?> GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task> GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "403", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "404", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "422", global::Ayllu.Github.Client.Models.ValidationError.CreateFromDiscriminatorValue }, + { "500", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + }; + var collectionResult = await RequestAdapter.SendCollectionAsync(requestInfo, global::Ayllu.Github.Client.Models.OrganizationProgrammaticAccessGrantRequest.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + return collectionResult?.AsList(); + } + /// + /// Approves or denies multiple pending requests to access organization resources via a fine-grained personal access token.Only GitHub Apps can use this endpoint. + /// API method documentation + /// + /// A + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 403 status code + /// When receiving a 404 status code + /// When receiving a 422 status code + /// When receiving a 500 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PostAsPersonalAccessTokenRequestsPostResponseAsync(global::Ayllu.Github.Client.Orgs.Item.PersonalAccessTokenRequests.PersonalAccessTokenRequestsPostRequestBody body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task PostAsPersonalAccessTokenRequestsPostResponseAsync(global::Ayllu.Github.Client.Orgs.Item.PersonalAccessTokenRequests.PersonalAccessTokenRequestsPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPostRequestInformation(body, requestConfiguration); + var errorMapping = new Dictionary> + { + { "403", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "404", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "422", global::Ayllu.Github.Client.Models.ValidationError.CreateFromDiscriminatorValue }, + { "500", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Orgs.Item.PersonalAccessTokenRequests.PersonalAccessTokenRequestsPostResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// Approves or denies multiple pending requests to access organization resources via a fine-grained personal access token.Only GitHub Apps can use this endpoint. + /// API method documentation + /// + /// A + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 403 status code + /// When receiving a 404 status code + /// When receiving a 422 status code + /// When receiving a 500 status code + [Obsolete("This method is obsolete. Use PostAsPersonalAccessTokenRequestsPostResponseAsync instead.")] +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PostAsync(global::Ayllu.Github.Client.Orgs.Item.PersonalAccessTokenRequests.PersonalAccessTokenRequestsPostRequestBody body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task PostAsync(global::Ayllu.Github.Client.Orgs.Item.PersonalAccessTokenRequests.PersonalAccessTokenRequestsPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPostRequestInformation(body, requestConfiguration); + var errorMapping = new Dictionary> + { + { "403", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "404", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "422", global::Ayllu.Github.Client.Models.ValidationError.CreateFromDiscriminatorValue }, + { "500", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Orgs.Item.PersonalAccessTokenRequests.PersonalAccessTokenRequestsResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// Lists requests from organization members to access organization resources with a fine-grained personal access token.Only GitHub Apps can use this endpoint. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Approves or denies multiple pending requests to access organization resources via a fine-grained personal access token.Only GitHub Apps can use this endpoint. + /// + /// A + /// The request body + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPostRequestInformation(global::Ayllu.Github.Client.Orgs.Item.PersonalAccessTokenRequests.PersonalAccessTokenRequestsPostRequestBody body, Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToPostRequestInformation(global::Ayllu.Github.Client.Orgs.Item.PersonalAccessTokenRequests.PersonalAccessTokenRequestsPostRequestBody body, Action> requestConfiguration = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.Orgs.Item.PersonalAccessTokenRequests.PersonalAccessTokenRequestsRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Orgs.Item.PersonalAccessTokenRequests.PersonalAccessTokenRequestsRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Lists requests from organization members to access organization resources with a fine-grained personal access token.Only GitHub Apps can use this endpoint. + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class PersonalAccessTokenRequestsRequestBuilderGetQueryParameters + { + /// The direction to sort the results by. + [Obsolete("This property is deprecated, use DirectionAsGetDirectionQueryParameterType instead")] +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("direction")] + public string? Direction { get; set; } +#nullable restore +#else + [QueryParameter("direction")] + public string Direction { get; set; } +#endif + /// The direction to sort the results by. + [QueryParameter("direction")] + public global::Ayllu.Github.Client.Orgs.Item.PersonalAccessTokenRequests.GetDirectionQueryParameterType? DirectionAsGetDirectionQueryParameterType { get; set; } + /// 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`. + [QueryParameter("last_used_after")] + public DateTimeOffset? LastUsedAfter { get; set; } + /// 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`. + [QueryParameter("last_used_before")] + public DateTimeOffset? LastUsedBefore { get; set; } + /// A list of owner usernames to use to filter the results. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("owner")] + public string[]? Owner { get; set; } +#nullable restore +#else + [QueryParameter("owner")] + public string[] Owner { get; set; } +#endif + /// The page number of the results to fetch. For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." + [QueryParameter("page")] + public int? Page { get; set; } + /// The permission to use to filter the results. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("permission")] + public string? Permission { get; set; } +#nullable restore +#else + [QueryParameter("permission")] + public string Permission { get; set; } +#endif + /// The number of results per page (max 100). For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." + [QueryParameter("per_page")] + public int? PerPage { get; set; } + /// The name of the repository to use to filter the results. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("repository")] + public string? Repository { get; set; } +#nullable restore +#else + [QueryParameter("repository")] + public string Repository { get; set; } +#endif + /// The property by which to sort the results. + [Obsolete("This property is deprecated, use SortAsGetSortQueryParameterType instead")] +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("sort")] + public string? Sort { get; set; } +#nullable restore +#else + [QueryParameter("sort")] + public string Sort { get; set; } +#endif + /// The property by which to sort the results. + [QueryParameter("sort")] + public global::Ayllu.Github.Client.Orgs.Item.PersonalAccessTokenRequests.GetSortQueryParameterType? SortAsGetSortQueryParameterType { get; set; } + /// The ID of the token +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("token_id")] + public string[]? TokenId { get; set; } +#nullable restore +#else + [QueryParameter("token_id")] + public string[] TokenId { get; set; } +#endif + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class PersonalAccessTokenRequestsRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class PersonalAccessTokenRequestsRequestBuilderPostRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Orgs/Item/PersonalAccessTokenRequests/PersonalAccessTokenRequestsResponse.cs b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/PersonalAccessTokenRequests/PersonalAccessTokenRequestsResponse.cs new file mode 100644 index 0000000..bf0f9c2 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/PersonalAccessTokenRequests/PersonalAccessTokenRequestsResponse.cs @@ -0,0 +1,28 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Orgs.Item.PersonalAccessTokenRequests +{ + [Obsolete("This class is obsolete. Use PersonalAccessTokenRequestsPostResponse instead.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class PersonalAccessTokenRequestsResponse : global::Ayllu.Github.Client.Orgs.Item.PersonalAccessTokenRequests.PersonalAccessTokenRequestsPostResponse, IParsable + #pragma warning restore CS1591 + { + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static new global::Ayllu.Github.Client.Orgs.Item.PersonalAccessTokenRequests.PersonalAccessTokenRequestsResponse CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Orgs.Item.PersonalAccessTokenRequests.PersonalAccessTokenRequestsResponse(); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Orgs/Item/PersonalAccessTokens/GetDirectionQueryParameterType.cs b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/PersonalAccessTokens/GetDirectionQueryParameterType.cs new file mode 100644 index 0000000..0a105f7 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/PersonalAccessTokens/GetDirectionQueryParameterType.cs @@ -0,0 +1,20 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Orgs.Item.PersonalAccessTokens +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public enum GetDirectionQueryParameterType + #pragma warning restore CS1591 + { + [EnumMember(Value = "asc")] + #pragma warning disable CS1591 + Asc, + #pragma warning restore CS1591 + [EnumMember(Value = "desc")] + #pragma warning disable CS1591 + Desc, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Orgs/Item/PersonalAccessTokens/GetSortQueryParameterType.cs b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/PersonalAccessTokens/GetSortQueryParameterType.cs new file mode 100644 index 0000000..ea6b4d8 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/PersonalAccessTokens/GetSortQueryParameterType.cs @@ -0,0 +1,16 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Orgs.Item.PersonalAccessTokens +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public enum GetSortQueryParameterType + #pragma warning restore CS1591 + { + [EnumMember(Value = "created_at")] + #pragma warning disable CS1591 + Created_at, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Orgs/Item/PersonalAccessTokens/Item/Repositories/RepositoriesRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/PersonalAccessTokens/Item/Repositories/RepositoriesRequestBuilder.cs new file mode 100644 index 0000000..cc2f1d5 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/PersonalAccessTokens/Item/Repositories/RepositoriesRequestBuilder.cs @@ -0,0 +1,116 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Orgs.Item.PersonalAccessTokens.Item.Repositories +{ + /// + /// Builds and executes requests for operations under \orgs\{org}\personal-access-tokens\{pat_id}\repositories + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class RepositoriesRequestBuilder : BaseRequestBuilder + { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public RepositoriesRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/orgs/{org}/personal-access-tokens/{pat_id}/repositories{?page*,per_page*}", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public RepositoriesRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/orgs/{org}/personal-access-tokens/{pat_id}/repositories{?page*,per_page*}", rawUrl) + { + } + /// + /// Lists the repositories a fine-grained personal access token has access to.Only GitHub Apps can use this endpoint. + /// API method documentation + /// + /// A List<global::Ayllu.Github.Client.Models.MinimalRepository> + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 403 status code + /// When receiving a 404 status code + /// When receiving a 500 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task?> GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task> GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "403", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "404", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "500", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + }; + var collectionResult = await RequestAdapter.SendCollectionAsync(requestInfo, global::Ayllu.Github.Client.Models.MinimalRepository.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + return collectionResult?.AsList(); + } + /// + /// Lists the repositories a fine-grained personal access token has access to.Only GitHub Apps can use this endpoint. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.Orgs.Item.PersonalAccessTokens.Item.Repositories.RepositoriesRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Orgs.Item.PersonalAccessTokens.Item.Repositories.RepositoriesRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Lists the repositories a fine-grained personal access token has access to.Only GitHub Apps can use this endpoint. + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class RepositoriesRequestBuilderGetQueryParameters + { + /// The page number of the results to fetch. For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." + [QueryParameter("page")] + public int? Page { get; set; } + /// The number of results per page (max 100). For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." + [QueryParameter("per_page")] + public int? PerPage { get; set; } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class RepositoriesRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Orgs/Item/PersonalAccessTokens/Item/WithPat_ItemRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/PersonalAccessTokens/Item/WithPat_ItemRequestBuilder.cs new file mode 100644 index 0000000..0b18773 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/PersonalAccessTokens/Item/WithPat_ItemRequestBuilder.cs @@ -0,0 +1,114 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Ayllu.Github.Client.Orgs.Item.PersonalAccessTokens.Item.Repositories; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Orgs.Item.PersonalAccessTokens.Item +{ + /// + /// Builds and executes requests for operations under \orgs\{org}\personal-access-tokens\{pat_id} + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithPat_ItemRequestBuilder : BaseRequestBuilder + { + /// The repositories property + public global::Ayllu.Github.Client.Orgs.Item.PersonalAccessTokens.Item.Repositories.RepositoriesRequestBuilder Repositories + { + get => new global::Ayllu.Github.Client.Orgs.Item.PersonalAccessTokens.Item.Repositories.RepositoriesRequestBuilder(PathParameters, RequestAdapter); + } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public WithPat_ItemRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/orgs/{org}/personal-access-tokens/{pat_id}", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public WithPat_ItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/orgs/{org}/personal-access-tokens/{pat_id}", rawUrl) + { + } + /// + /// 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. + /// API method documentation + /// + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 403 status code + /// When receiving a 404 status code + /// When receiving a 422 status code + /// When receiving a 500 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PostAsync(global::Ayllu.Github.Client.Orgs.Item.PersonalAccessTokens.Item.WithPat_PostRequestBody body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task PostAsync(global::Ayllu.Github.Client.Orgs.Item.PersonalAccessTokens.Item.WithPat_PostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPostRequestInformation(body, requestConfiguration); + var errorMapping = new Dictionary> + { + { "403", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "404", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "422", global::Ayllu.Github.Client.Models.ValidationError.CreateFromDiscriminatorValue }, + { "500", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + }; + await RequestAdapter.SendNoContentAsync(requestInfo, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// 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. + /// + /// A + /// The request body + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPostRequestInformation(global::Ayllu.Github.Client.Orgs.Item.PersonalAccessTokens.Item.WithPat_PostRequestBody body, Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToPostRequestInformation(global::Ayllu.Github.Client.Orgs.Item.PersonalAccessTokens.Item.WithPat_PostRequestBody body, Action> requestConfiguration = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.Orgs.Item.PersonalAccessTokens.Item.WithPat_ItemRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Orgs.Item.PersonalAccessTokens.Item.WithPat_ItemRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithPat_ItemRequestBuilderPostRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Orgs/Item/PersonalAccessTokens/Item/WithPat_PostRequestBody.cs b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/PersonalAccessTokens/Item/WithPat_PostRequestBody.cs new file mode 100644 index 0000000..191fb1a --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/PersonalAccessTokens/Item/WithPat_PostRequestBody.cs @@ -0,0 +1,59 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Orgs.Item.PersonalAccessTokens.Item +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class WithPat_PostRequestBody : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Action to apply to the fine-grained personal access token. + public global::Ayllu.Github.Client.Orgs.Item.PersonalAccessTokens.Item.WithPat_PostRequestBody_action? Action { get; set; } + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public WithPat_PostRequestBody() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Orgs.Item.PersonalAccessTokens.Item.WithPat_PostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Orgs.Item.PersonalAccessTokens.Item.WithPat_PostRequestBody(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "action", n => { Action = n.GetEnumValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteEnumValue("action", Action); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Orgs/Item/PersonalAccessTokens/Item/WithPat_PostRequestBody_action.cs b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/PersonalAccessTokens/Item/WithPat_PostRequestBody_action.cs new file mode 100644 index 0000000..0597ce8 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/PersonalAccessTokens/Item/WithPat_PostRequestBody_action.cs @@ -0,0 +1,15 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Orgs.Item.PersonalAccessTokens.Item +{ + /// Action to apply to the fine-grained personal access token. + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public enum WithPat_PostRequestBody_action + { + [EnumMember(Value = "revoke")] + #pragma warning disable CS1591 + Revoke, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Orgs/Item/PersonalAccessTokens/PersonalAccessTokensPostRequestBody.cs b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/PersonalAccessTokens/PersonalAccessTokensPostRequestBody.cs new file mode 100644 index 0000000..734c7ba --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/PersonalAccessTokens/PersonalAccessTokensPostRequestBody.cs @@ -0,0 +1,69 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Orgs.Item.PersonalAccessTokens +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class PersonalAccessTokensPostRequestBody : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Action to apply to the fine-grained personal access token. + public global::Ayllu.Github.Client.Orgs.Item.PersonalAccessTokens.PersonalAccessTokensPostRequestBody_action? Action { get; set; } + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The IDs of the fine-grained personal access tokens. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? PatIds { get; set; } +#nullable restore +#else + public List PatIds { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public PersonalAccessTokensPostRequestBody() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Orgs.Item.PersonalAccessTokens.PersonalAccessTokensPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Orgs.Item.PersonalAccessTokens.PersonalAccessTokensPostRequestBody(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "action", n => { Action = n.GetEnumValue(); } }, + { "pat_ids", n => { PatIds = n.GetCollectionOfPrimitiveValues()?.AsList(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteEnumValue("action", Action); + writer.WriteCollectionOfPrimitiveValues("pat_ids", PatIds); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Orgs/Item/PersonalAccessTokens/PersonalAccessTokensPostRequestBody_action.cs b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/PersonalAccessTokens/PersonalAccessTokensPostRequestBody_action.cs new file mode 100644 index 0000000..3748454 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/PersonalAccessTokens/PersonalAccessTokensPostRequestBody_action.cs @@ -0,0 +1,15 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Orgs.Item.PersonalAccessTokens +{ + /// Action to apply to the fine-grained personal access token. + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public enum PersonalAccessTokensPostRequestBody_action + { + [EnumMember(Value = "revoke")] + #pragma warning disable CS1591 + Revoke, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Orgs/Item/PersonalAccessTokens/PersonalAccessTokensPostResponse.cs b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/PersonalAccessTokens/PersonalAccessTokensPostResponse.cs new file mode 100644 index 0000000..e6d41fe --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/PersonalAccessTokens/PersonalAccessTokensPostResponse.cs @@ -0,0 +1,55 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Orgs.Item.PersonalAccessTokens +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class PersonalAccessTokensPostResponse : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public PersonalAccessTokensPostResponse() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Orgs.Item.PersonalAccessTokens.PersonalAccessTokensPostResponse CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Orgs.Item.PersonalAccessTokens.PersonalAccessTokensPostResponse(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Orgs/Item/PersonalAccessTokens/PersonalAccessTokensRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/PersonalAccessTokens/PersonalAccessTokensRequestBuilder.cs new file mode 100644 index 0000000..64bda00 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/PersonalAccessTokens/PersonalAccessTokensRequestBuilder.cs @@ -0,0 +1,313 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Ayllu.Github.Client.Orgs.Item.PersonalAccessTokens.Item; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Orgs.Item.PersonalAccessTokens +{ + /// + /// Builds and executes requests for operations under \orgs\{org}\personal-access-tokens + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class PersonalAccessTokensRequestBuilder : BaseRequestBuilder + { + /// Gets an item from the Ayllu.Github.Client.orgs.item.personalAccessTokens.item collection + /// The unique identifier of the fine-grained personal access token. + /// A + public global::Ayllu.Github.Client.Orgs.Item.PersonalAccessTokens.Item.WithPat_ItemRequestBuilder this[int position] + { + get + { + var urlTplParams = new Dictionary(PathParameters); + urlTplParams.Add("pat_id", position); + return new global::Ayllu.Github.Client.Orgs.Item.PersonalAccessTokens.Item.WithPat_ItemRequestBuilder(urlTplParams, RequestAdapter); + } + } + /// Gets an item from the Ayllu.Github.Client.orgs.item.personalAccessTokens.item collection + /// The unique identifier of the fine-grained personal access token. + /// A + [Obsolete("This indexer is deprecated and will be removed in the next major version. Use the one with the typed parameter instead.")] + public global::Ayllu.Github.Client.Orgs.Item.PersonalAccessTokens.Item.WithPat_ItemRequestBuilder this[string position] + { + get + { + var urlTplParams = new Dictionary(PathParameters); + if (!string.IsNullOrWhiteSpace(position)) urlTplParams.Add("pat_id", position); + return new global::Ayllu.Github.Client.Orgs.Item.PersonalAccessTokens.Item.WithPat_ItemRequestBuilder(urlTplParams, RequestAdapter); + } + } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public PersonalAccessTokensRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/orgs/{org}/personal-access-tokens{?direction*,last_used_after*,last_used_before*,owner*,page*,per_page*,permission*,repository*,sort*,token_id*}", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public PersonalAccessTokensRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/orgs/{org}/personal-access-tokens{?direction*,last_used_after*,last_used_before*,owner*,page*,per_page*,permission*,repository*,sort*,token_id*}", rawUrl) + { + } + /// + /// Lists approved fine-grained personal access tokens owned by organization members that can access organization resources.Only GitHub Apps can use this endpoint. + /// API method documentation + /// + /// A List<global::Ayllu.Github.Client.Models.OrganizationProgrammaticAccessGrant> + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 403 status code + /// When receiving a 404 status code + /// When receiving a 422 status code + /// When receiving a 500 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task?> GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task> GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "403", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "404", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "422", global::Ayllu.Github.Client.Models.ValidationError.CreateFromDiscriminatorValue }, + { "500", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + }; + var collectionResult = await RequestAdapter.SendCollectionAsync(requestInfo, global::Ayllu.Github.Client.Models.OrganizationProgrammaticAccessGrant.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + return collectionResult?.AsList(); + } + /// + /// 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. + /// API method documentation + /// + /// A + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 403 status code + /// When receiving a 404 status code + /// When receiving a 422 status code + /// When receiving a 500 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PostAsPersonalAccessTokensPostResponseAsync(global::Ayllu.Github.Client.Orgs.Item.PersonalAccessTokens.PersonalAccessTokensPostRequestBody body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task PostAsPersonalAccessTokensPostResponseAsync(global::Ayllu.Github.Client.Orgs.Item.PersonalAccessTokens.PersonalAccessTokensPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPostRequestInformation(body, requestConfiguration); + var errorMapping = new Dictionary> + { + { "403", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "404", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "422", global::Ayllu.Github.Client.Models.ValidationError.CreateFromDiscriminatorValue }, + { "500", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Orgs.Item.PersonalAccessTokens.PersonalAccessTokensPostResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// 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. + /// API method documentation + /// + /// A + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 403 status code + /// When receiving a 404 status code + /// When receiving a 422 status code + /// When receiving a 500 status code + [Obsolete("This method is obsolete. Use PostAsPersonalAccessTokensPostResponseAsync instead.")] +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PostAsync(global::Ayllu.Github.Client.Orgs.Item.PersonalAccessTokens.PersonalAccessTokensPostRequestBody body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task PostAsync(global::Ayllu.Github.Client.Orgs.Item.PersonalAccessTokens.PersonalAccessTokensPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPostRequestInformation(body, requestConfiguration); + var errorMapping = new Dictionary> + { + { "403", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "404", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "422", global::Ayllu.Github.Client.Models.ValidationError.CreateFromDiscriminatorValue }, + { "500", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Orgs.Item.PersonalAccessTokens.PersonalAccessTokensResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// Lists approved fine-grained personal access tokens owned by organization members that can access organization resources.Only GitHub Apps can use this endpoint. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// 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. + /// + /// A + /// The request body + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPostRequestInformation(global::Ayllu.Github.Client.Orgs.Item.PersonalAccessTokens.PersonalAccessTokensPostRequestBody body, Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToPostRequestInformation(global::Ayllu.Github.Client.Orgs.Item.PersonalAccessTokens.PersonalAccessTokensPostRequestBody body, Action> requestConfiguration = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.Orgs.Item.PersonalAccessTokens.PersonalAccessTokensRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Orgs.Item.PersonalAccessTokens.PersonalAccessTokensRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Lists approved fine-grained personal access tokens owned by organization members that can access organization resources.Only GitHub Apps can use this endpoint. + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class PersonalAccessTokensRequestBuilderGetQueryParameters + { + /// The direction to sort the results by. + [Obsolete("This property is deprecated, use DirectionAsGetDirectionQueryParameterType instead")] +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("direction")] + public string? Direction { get; set; } +#nullable restore +#else + [QueryParameter("direction")] + public string Direction { get; set; } +#endif + /// The direction to sort the results by. + [QueryParameter("direction")] + public global::Ayllu.Github.Client.Orgs.Item.PersonalAccessTokens.GetDirectionQueryParameterType? DirectionAsGetDirectionQueryParameterType { get; set; } + /// 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`. + [QueryParameter("last_used_after")] + public DateTimeOffset? LastUsedAfter { get; set; } + /// 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`. + [QueryParameter("last_used_before")] + public DateTimeOffset? LastUsedBefore { get; set; } + /// A list of owner usernames to use to filter the results. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("owner")] + public string[]? Owner { get; set; } +#nullable restore +#else + [QueryParameter("owner")] + public string[] Owner { get; set; } +#endif + /// The page number of the results to fetch. For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." + [QueryParameter("page")] + public int? Page { get; set; } + /// The permission to use to filter the results. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("permission")] + public string? Permission { get; set; } +#nullable restore +#else + [QueryParameter("permission")] + public string Permission { get; set; } +#endif + /// The number of results per page (max 100). For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." + [QueryParameter("per_page")] + public int? PerPage { get; set; } + /// The name of the repository to use to filter the results. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("repository")] + public string? Repository { get; set; } +#nullable restore +#else + [QueryParameter("repository")] + public string Repository { get; set; } +#endif + /// The property by which to sort the results. + [Obsolete("This property is deprecated, use SortAsGetSortQueryParameterType instead")] +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("sort")] + public string? Sort { get; set; } +#nullable restore +#else + [QueryParameter("sort")] + public string Sort { get; set; } +#endif + /// The property by which to sort the results. + [QueryParameter("sort")] + public global::Ayllu.Github.Client.Orgs.Item.PersonalAccessTokens.GetSortQueryParameterType? SortAsGetSortQueryParameterType { get; set; } + /// The ID of the token +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("token_id")] + public string[]? TokenId { get; set; } +#nullable restore +#else + [QueryParameter("token_id")] + public string[] TokenId { get; set; } +#endif + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class PersonalAccessTokensRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class PersonalAccessTokensRequestBuilderPostRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Orgs/Item/PersonalAccessTokens/PersonalAccessTokensResponse.cs b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/PersonalAccessTokens/PersonalAccessTokensResponse.cs new file mode 100644 index 0000000..8d39ec6 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/PersonalAccessTokens/PersonalAccessTokensResponse.cs @@ -0,0 +1,28 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Orgs.Item.PersonalAccessTokens +{ + [Obsolete("This class is obsolete. Use PersonalAccessTokensPostResponse instead.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class PersonalAccessTokensResponse : global::Ayllu.Github.Client.Orgs.Item.PersonalAccessTokens.PersonalAccessTokensPostResponse, IParsable + #pragma warning restore CS1591 + { + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static new global::Ayllu.Github.Client.Orgs.Item.PersonalAccessTokens.PersonalAccessTokensResponse CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Orgs.Item.PersonalAccessTokens.PersonalAccessTokensResponse(); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Orgs/Item/PrivateRegistries/Item/WithSecret_nameItemRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/PrivateRegistries/Item/WithSecret_nameItemRequestBuilder.cs new file mode 100644 index 0000000..2cc1786 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/PrivateRegistries/Item/WithSecret_nameItemRequestBuilder.cs @@ -0,0 +1,207 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Orgs.Item.PrivateRegistries.Item +{ + /// + /// Builds and executes requests for operations under \orgs\{org}\private-registries\{secret_name} + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithSecret_nameItemRequestBuilder : BaseRequestBuilder + { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public WithSecret_nameItemRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/orgs/{org}/private-registries/{secret_name}", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public WithSecret_nameItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/orgs/{org}/private-registries/{secret_name}", rawUrl) + { + } + /// + /// Delete a private registry configuration at the organization-level.OAuth app tokens and personal access tokens (classic) need the `admin:org` scope to use this endpoint. + /// API method documentation + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 400 status code + /// When receiving a 404 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task DeleteAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task DeleteAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToDeleteRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "400", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "404", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + }; + await RequestAdapter.SendNoContentAsync(requestInfo, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// Get the configuration of a single private registry defined for an organization, omitting its encrypted value.OAuth app tokens and personal access tokens (classic) need the `admin:org` scope to use this endpoint. + /// API method documentation + /// + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 404 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "404", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Models.OrgPrivateRegistryConfiguration.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// Updates a private registry configuration with an encrypted value for an organization. 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/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. + /// API method documentation + /// + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 404 status code + /// When receiving a 422 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PatchAsync(global::Ayllu.Github.Client.Orgs.Item.PrivateRegistries.Item.WithSecret_namePatchRequestBody body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task PatchAsync(global::Ayllu.Github.Client.Orgs.Item.PrivateRegistries.Item.WithSecret_namePatchRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPatchRequestInformation(body, requestConfiguration); + var errorMapping = new Dictionary> + { + { "404", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "422", global::Ayllu.Github.Client.Models.ValidationError.CreateFromDiscriminatorValue }, + }; + await RequestAdapter.SendNoContentAsync(requestInfo, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// Delete a private registry configuration at the organization-level.OAuth app tokens and personal access tokens (classic) need the `admin:org` scope to use this endpoint. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToDeleteRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToDeleteRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.DELETE, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json, application/scim+json"); + return requestInfo; + } + /// + /// Get the configuration of a single private registry defined for an organization, omitting its encrypted value.OAuth app tokens and personal access tokens (classic) need the `admin:org` scope to use this endpoint. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Updates a private registry configuration with an encrypted value for an organization. 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/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. + /// + /// A + /// The request body + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPatchRequestInformation(global::Ayllu.Github.Client.Orgs.Item.PrivateRegistries.Item.WithSecret_namePatchRequestBody body, Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToPatchRequestInformation(global::Ayllu.Github.Client.Orgs.Item.PrivateRegistries.Item.WithSecret_namePatchRequestBody body, Action> requestConfiguration = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.Orgs.Item.PrivateRegistries.Item.WithSecret_nameItemRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Orgs.Item.PrivateRegistries.Item.WithSecret_nameItemRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithSecret_nameItemRequestBuilderDeleteRequestConfiguration : RequestConfiguration + { + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithSecret_nameItemRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithSecret_nameItemRequestBuilderPatchRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Orgs/Item/PrivateRegistries/Item/WithSecret_namePatchRequestBody.cs b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/PrivateRegistries/Item/WithSecret_namePatchRequestBody.cs new file mode 100644 index 0000000..588f58e --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/PrivateRegistries/Item/WithSecret_namePatchRequestBody.cs @@ -0,0 +1,113 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Orgs.Item.PrivateRegistries.Item +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class WithSecret_namePatchRequestBody : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// 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 private registries public key for an organization](https://docs.github.com/rest/private-registries/organization-configurations#get-private-registries-public-key-for-an-organization) endpoint. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? EncryptedValue { get; set; } +#nullable restore +#else + public string EncryptedValue { get; set; } +#endif + /// The ID of the key you used to encrypt the secret. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? KeyId { get; set; } +#nullable restore +#else + public string KeyId { get; set; } +#endif + /// The registry type. + public global::Ayllu.Github.Client.Orgs.Item.PrivateRegistries.Item.WithSecret_namePatchRequestBody_registry_type? RegistryType { get; set; } + /// An array of repository IDs that can access the organization private registry. You can only provide a list of repository IDs when `visibility` is set to `selected`. This field should be omitted if `visibility` is set to `all` or `private`. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? SelectedRepositoryIds { get; set; } +#nullable restore +#else + public List SelectedRepositoryIds { get; set; } +#endif + /// The URL of the private registry. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Url { get; set; } +#nullable restore +#else + public string Url { get; set; } +#endif + /// The username to use when authenticating with the private registry. This field should be omitted if the private registry does not require a username for authentication. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Username { get; set; } +#nullable restore +#else + public string Username { get; set; } +#endif + /// Which type of organization repositories have access to the private registry. `selected` means only the repositories specified by `selected_repository_ids` can access the private registry. + public global::Ayllu.Github.Client.Orgs.Item.PrivateRegistries.Item.WithSecret_namePatchRequestBody_visibility? Visibility { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public WithSecret_namePatchRequestBody() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Orgs.Item.PrivateRegistries.Item.WithSecret_namePatchRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Orgs.Item.PrivateRegistries.Item.WithSecret_namePatchRequestBody(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "encrypted_value", n => { EncryptedValue = n.GetStringValue(); } }, + { "key_id", n => { KeyId = n.GetStringValue(); } }, + { "registry_type", n => { RegistryType = n.GetEnumValue(); } }, + { "selected_repository_ids", n => { SelectedRepositoryIds = n.GetCollectionOfPrimitiveValues()?.AsList(); } }, + { "url", n => { Url = n.GetStringValue(); } }, + { "username", n => { Username = n.GetStringValue(); } }, + { "visibility", n => { Visibility = n.GetEnumValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("encrypted_value", EncryptedValue); + writer.WriteStringValue("key_id", KeyId); + writer.WriteEnumValue("registry_type", RegistryType); + writer.WriteCollectionOfPrimitiveValues("selected_repository_ids", SelectedRepositoryIds); + writer.WriteStringValue("url", Url); + writer.WriteStringValue("username", Username); + writer.WriteEnumValue("visibility", Visibility); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Orgs/Item/PrivateRegistries/Item/WithSecret_namePatchRequestBody_registry_type.cs b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/PrivateRegistries/Item/WithSecret_namePatchRequestBody_registry_type.cs new file mode 100644 index 0000000..87b4c15 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/PrivateRegistries/Item/WithSecret_namePatchRequestBody_registry_type.cs @@ -0,0 +1,71 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Orgs.Item.PrivateRegistries.Item +{ + /// The registry type. + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public enum WithSecret_namePatchRequestBody_registry_type + { + [EnumMember(Value = "maven_repository")] + #pragma warning disable CS1591 + Maven_repository, + #pragma warning restore CS1591 + [EnumMember(Value = "nuget_feed")] + #pragma warning disable CS1591 + Nuget_feed, + #pragma warning restore CS1591 + [EnumMember(Value = "goproxy_server")] + #pragma warning disable CS1591 + Goproxy_server, + #pragma warning restore CS1591 + [EnumMember(Value = "npm_registry")] + #pragma warning disable CS1591 + Npm_registry, + #pragma warning restore CS1591 + [EnumMember(Value = "rubygems_server")] + #pragma warning disable CS1591 + Rubygems_server, + #pragma warning restore CS1591 + [EnumMember(Value = "cargo_registry")] + #pragma warning disable CS1591 + Cargo_registry, + #pragma warning restore CS1591 + [EnumMember(Value = "composer_repository")] + #pragma warning disable CS1591 + Composer_repository, + #pragma warning restore CS1591 + [EnumMember(Value = "docker_registry")] + #pragma warning disable CS1591 + Docker_registry, + #pragma warning restore CS1591 + [EnumMember(Value = "git_source")] + #pragma warning disable CS1591 + Git_source, + #pragma warning restore CS1591 + [EnumMember(Value = "helm_registry")] + #pragma warning disable CS1591 + Helm_registry, + #pragma warning restore CS1591 + [EnumMember(Value = "hex_organization")] + #pragma warning disable CS1591 + Hex_organization, + #pragma warning restore CS1591 + [EnumMember(Value = "hex_repository")] + #pragma warning disable CS1591 + Hex_repository, + #pragma warning restore CS1591 + [EnumMember(Value = "pub_repository")] + #pragma warning disable CS1591 + Pub_repository, + #pragma warning restore CS1591 + [EnumMember(Value = "python_index")] + #pragma warning disable CS1591 + Python_index, + #pragma warning restore CS1591 + [EnumMember(Value = "terraform_registry")] + #pragma warning disable CS1591 + Terraform_registry, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Orgs/Item/PrivateRegistries/Item/WithSecret_namePatchRequestBody_visibility.cs b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/PrivateRegistries/Item/WithSecret_namePatchRequestBody_visibility.cs new file mode 100644 index 0000000..1f9d9ef --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/PrivateRegistries/Item/WithSecret_namePatchRequestBody_visibility.cs @@ -0,0 +1,23 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Orgs.Item.PrivateRegistries.Item +{ + /// Which type of organization repositories have access to the private registry. `selected` means only the repositories specified by `selected_repository_ids` can access the private registry. + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public enum WithSecret_namePatchRequestBody_visibility + { + [EnumMember(Value = "all")] + #pragma warning disable CS1591 + All, + #pragma warning restore CS1591 + [EnumMember(Value = "private")] + #pragma warning disable CS1591 + Private, + #pragma warning restore CS1591 + [EnumMember(Value = "selected")] + #pragma warning disable CS1591 + Selected, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Orgs/Item/PrivateRegistries/PrivateRegistriesGetResponse.cs b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/PrivateRegistries/PrivateRegistriesGetResponse.cs new file mode 100644 index 0000000..3848d35 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/PrivateRegistries/PrivateRegistriesGetResponse.cs @@ -0,0 +1,70 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Orgs.Item.PrivateRegistries +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class PrivateRegistriesGetResponse : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The configurations property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? Configurations { get; set; } +#nullable restore +#else + public List Configurations { get; set; } +#endif + /// The total_count property + public int? TotalCount { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public PrivateRegistriesGetResponse() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Orgs.Item.PrivateRegistries.PrivateRegistriesGetResponse CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Orgs.Item.PrivateRegistries.PrivateRegistriesGetResponse(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "configurations", n => { Configurations = n.GetCollectionOfObjectValues(global::Ayllu.Github.Client.Models.OrgPrivateRegistryConfiguration.CreateFromDiscriminatorValue)?.AsList(); } }, + { "total_count", n => { TotalCount = n.GetIntValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteCollectionOfObjectValues("configurations", Configurations); + writer.WriteIntValue("total_count", TotalCount); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Orgs/Item/PrivateRegistries/PrivateRegistriesPostRequestBody.cs b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/PrivateRegistries/PrivateRegistriesPostRequestBody.cs new file mode 100644 index 0000000..ea25d9f --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/PrivateRegistries/PrivateRegistriesPostRequestBody.cs @@ -0,0 +1,113 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Orgs.Item.PrivateRegistries +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class PrivateRegistriesPostRequestBody : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// 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 private registries public key for an organization](https://docs.github.com/rest/private-registries/organization-configurations#get-private-registries-public-key-for-an-organization) endpoint. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? EncryptedValue { get; set; } +#nullable restore +#else + public string EncryptedValue { get; set; } +#endif + /// The ID of the key you used to encrypt the secret. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? KeyId { get; set; } +#nullable restore +#else + public string KeyId { get; set; } +#endif + /// The registry type. + public global::Ayllu.Github.Client.Orgs.Item.PrivateRegistries.PrivateRegistriesPostRequestBody_registry_type? RegistryType { get; set; } + /// An array of repository IDs that can access the organization private registry. You can only provide a list of repository IDs when `visibility` is set to `selected`. You can manage the list of selected repositories using the [Update a private registry for an organization](https://docs.github.com/rest/private-registries/organization-configurations#update-a-private-registry-for-an-organization) endpoint. This field should be omitted if `visibility` is set to `all` or `private`. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? SelectedRepositoryIds { get; set; } +#nullable restore +#else + public List SelectedRepositoryIds { get; set; } +#endif + /// The URL of the private registry. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Url { get; set; } +#nullable restore +#else + public string Url { get; set; } +#endif + /// The username to use when authenticating with the private registry. This field should be omitted if the private registry does not require a username for authentication. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Username { get; set; } +#nullable restore +#else + public string Username { get; set; } +#endif + /// Which type of organization repositories have access to the private registry. `selected` means only the repositories specified by `selected_repository_ids` can access the private registry. + public global::Ayllu.Github.Client.Orgs.Item.PrivateRegistries.PrivateRegistriesPostRequestBody_visibility? Visibility { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public PrivateRegistriesPostRequestBody() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Orgs.Item.PrivateRegistries.PrivateRegistriesPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Orgs.Item.PrivateRegistries.PrivateRegistriesPostRequestBody(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "encrypted_value", n => { EncryptedValue = n.GetStringValue(); } }, + { "key_id", n => { KeyId = n.GetStringValue(); } }, + { "registry_type", n => { RegistryType = n.GetEnumValue(); } }, + { "selected_repository_ids", n => { SelectedRepositoryIds = n.GetCollectionOfPrimitiveValues()?.AsList(); } }, + { "url", n => { Url = n.GetStringValue(); } }, + { "username", n => { Username = n.GetStringValue(); } }, + { "visibility", n => { Visibility = n.GetEnumValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("encrypted_value", EncryptedValue); + writer.WriteStringValue("key_id", KeyId); + writer.WriteEnumValue("registry_type", RegistryType); + writer.WriteCollectionOfPrimitiveValues("selected_repository_ids", SelectedRepositoryIds); + writer.WriteStringValue("url", Url); + writer.WriteStringValue("username", Username); + writer.WriteEnumValue("visibility", Visibility); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Orgs/Item/PrivateRegistries/PrivateRegistriesPostRequestBody_registry_type.cs b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/PrivateRegistries/PrivateRegistriesPostRequestBody_registry_type.cs new file mode 100644 index 0000000..6fd010c --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/PrivateRegistries/PrivateRegistriesPostRequestBody_registry_type.cs @@ -0,0 +1,71 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Orgs.Item.PrivateRegistries +{ + /// The registry type. + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public enum PrivateRegistriesPostRequestBody_registry_type + { + [EnumMember(Value = "maven_repository")] + #pragma warning disable CS1591 + Maven_repository, + #pragma warning restore CS1591 + [EnumMember(Value = "nuget_feed")] + #pragma warning disable CS1591 + Nuget_feed, + #pragma warning restore CS1591 + [EnumMember(Value = "goproxy_server")] + #pragma warning disable CS1591 + Goproxy_server, + #pragma warning restore CS1591 + [EnumMember(Value = "npm_registry")] + #pragma warning disable CS1591 + Npm_registry, + #pragma warning restore CS1591 + [EnumMember(Value = "rubygems_server")] + #pragma warning disable CS1591 + Rubygems_server, + #pragma warning restore CS1591 + [EnumMember(Value = "cargo_registry")] + #pragma warning disable CS1591 + Cargo_registry, + #pragma warning restore CS1591 + [EnumMember(Value = "composer_repository")] + #pragma warning disable CS1591 + Composer_repository, + #pragma warning restore CS1591 + [EnumMember(Value = "docker_registry")] + #pragma warning disable CS1591 + Docker_registry, + #pragma warning restore CS1591 + [EnumMember(Value = "git_source")] + #pragma warning disable CS1591 + Git_source, + #pragma warning restore CS1591 + [EnumMember(Value = "helm_registry")] + #pragma warning disable CS1591 + Helm_registry, + #pragma warning restore CS1591 + [EnumMember(Value = "hex_organization")] + #pragma warning disable CS1591 + Hex_organization, + #pragma warning restore CS1591 + [EnumMember(Value = "hex_repository")] + #pragma warning disable CS1591 + Hex_repository, + #pragma warning restore CS1591 + [EnumMember(Value = "pub_repository")] + #pragma warning disable CS1591 + Pub_repository, + #pragma warning restore CS1591 + [EnumMember(Value = "python_index")] + #pragma warning disable CS1591 + Python_index, + #pragma warning restore CS1591 + [EnumMember(Value = "terraform_registry")] + #pragma warning disable CS1591 + Terraform_registry, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Orgs/Item/PrivateRegistries/PrivateRegistriesPostRequestBody_visibility.cs b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/PrivateRegistries/PrivateRegistriesPostRequestBody_visibility.cs new file mode 100644 index 0000000..6b48d2b --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/PrivateRegistries/PrivateRegistriesPostRequestBody_visibility.cs @@ -0,0 +1,23 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Orgs.Item.PrivateRegistries +{ + /// Which type of organization repositories have access to the private registry. `selected` means only the repositories specified by `selected_repository_ids` can access the private registry. + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public enum PrivateRegistriesPostRequestBody_visibility + { + [EnumMember(Value = "all")] + #pragma warning disable CS1591 + All, + #pragma warning restore CS1591 + [EnumMember(Value = "private")] + #pragma warning disable CS1591 + Private, + #pragma warning restore CS1591 + [EnumMember(Value = "selected")] + #pragma warning disable CS1591 + Selected, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Orgs/Item/PrivateRegistries/PrivateRegistriesRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/PrivateRegistries/PrivateRegistriesRequestBuilder.cs new file mode 100644 index 0000000..0248f73 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/PrivateRegistries/PrivateRegistriesRequestBuilder.cs @@ -0,0 +1,217 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Ayllu.Github.Client.Orgs.Item.PrivateRegistries.Item; +using Ayllu.Github.Client.Orgs.Item.PrivateRegistries.PublicKey; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Orgs.Item.PrivateRegistries +{ + /// + /// Builds and executes requests for operations under \orgs\{org}\private-registries + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class PrivateRegistriesRequestBuilder : BaseRequestBuilder + { + /// The publicKey property + public global::Ayllu.Github.Client.Orgs.Item.PrivateRegistries.PublicKey.PublicKeyRequestBuilder PublicKey + { + get => new global::Ayllu.Github.Client.Orgs.Item.PrivateRegistries.PublicKey.PublicKeyRequestBuilder(PathParameters, RequestAdapter); + } + /// Gets an item from the Ayllu.Github.Client.orgs.item.privateRegistries.item collection + /// The name of the secret. + /// A + public global::Ayllu.Github.Client.Orgs.Item.PrivateRegistries.Item.WithSecret_nameItemRequestBuilder this[string position] + { + get + { + var urlTplParams = new Dictionary(PathParameters); + urlTplParams.Add("secret_name", position); + return new global::Ayllu.Github.Client.Orgs.Item.PrivateRegistries.Item.WithSecret_nameItemRequestBuilder(urlTplParams, RequestAdapter); + } + } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public PrivateRegistriesRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/orgs/{org}/private-registries{?page*,per_page*}", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public PrivateRegistriesRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/orgs/{org}/private-registries{?page*,per_page*}", rawUrl) + { + } + /// + /// Lists all private registry configurations 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. + /// API method documentation + /// + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 400 status code + /// When receiving a 404 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsPrivateRegistriesGetResponseAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task GetAsPrivateRegistriesGetResponseAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "400", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "404", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Orgs.Item.PrivateRegistries.PrivateRegistriesGetResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// Lists all private registry configurations 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. + /// API method documentation + /// + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 400 status code + /// When receiving a 404 status code + [Obsolete("This method is obsolete. Use GetAsPrivateRegistriesGetResponseAsync instead.")] +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "400", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "404", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Orgs.Item.PrivateRegistries.PrivateRegistriesResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// Creates a private registry configuration with an encrypted value for an organization. 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/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. + /// API method documentation + /// + /// A + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 404 status code + /// When receiving a 422 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PostAsync(global::Ayllu.Github.Client.Orgs.Item.PrivateRegistries.PrivateRegistriesPostRequestBody body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task PostAsync(global::Ayllu.Github.Client.Orgs.Item.PrivateRegistries.PrivateRegistriesPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPostRequestInformation(body, requestConfiguration); + var errorMapping = new Dictionary> + { + { "404", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "422", global::Ayllu.Github.Client.Models.ValidationError.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Models.OrgPrivateRegistryConfigurationWithSelectedRepositories.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// Lists all private registry configurations 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. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Creates a private registry configuration with an encrypted value for an organization. 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/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. + /// + /// A + /// The request body + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPostRequestInformation(global::Ayllu.Github.Client.Orgs.Item.PrivateRegistries.PrivateRegistriesPostRequestBody body, Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToPostRequestInformation(global::Ayllu.Github.Client.Orgs.Item.PrivateRegistries.PrivateRegistriesPostRequestBody body, Action> requestConfiguration = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.Orgs.Item.PrivateRegistries.PrivateRegistriesRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Orgs.Item.PrivateRegistries.PrivateRegistriesRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Lists all private registry configurations 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. + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class PrivateRegistriesRequestBuilderGetQueryParameters + { + /// The page number of the results to fetch. For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." + [QueryParameter("page")] + public int? Page { get; set; } + /// The number of results per page (max 100). For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." + [QueryParameter("per_page")] + public int? PerPage { get; set; } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class PrivateRegistriesRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class PrivateRegistriesRequestBuilderPostRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Orgs/Item/PrivateRegistries/PrivateRegistriesResponse.cs b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/PrivateRegistries/PrivateRegistriesResponse.cs new file mode 100644 index 0000000..f7ac369 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/PrivateRegistries/PrivateRegistriesResponse.cs @@ -0,0 +1,28 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Orgs.Item.PrivateRegistries +{ + [Obsolete("This class is obsolete. Use PrivateRegistriesGetResponse instead.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class PrivateRegistriesResponse : global::Ayllu.Github.Client.Orgs.Item.PrivateRegistries.PrivateRegistriesGetResponse, IParsable + #pragma warning restore CS1591 + { + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static new global::Ayllu.Github.Client.Orgs.Item.PrivateRegistries.PrivateRegistriesResponse CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Orgs.Item.PrivateRegistries.PrivateRegistriesResponse(); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Orgs/Item/PrivateRegistries/PublicKey/PublicKeyGetResponse.cs b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/PrivateRegistries/PublicKey/PublicKeyGetResponse.cs new file mode 100644 index 0000000..da3d3ca --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/PrivateRegistries/PublicKey/PublicKeyGetResponse.cs @@ -0,0 +1,75 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Orgs.Item.PrivateRegistries.PublicKey +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class PublicKeyGetResponse : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The Base64 encoded public key. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Key { get; set; } +#nullable restore +#else + public string Key { get; set; } +#endif + /// The identifier for the key. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? KeyId { get; set; } +#nullable restore +#else + public string KeyId { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public PublicKeyGetResponse() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Orgs.Item.PrivateRegistries.PublicKey.PublicKeyGetResponse CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Orgs.Item.PrivateRegistries.PublicKey.PublicKeyGetResponse(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "key", n => { Key = n.GetStringValue(); } }, + { "key_id", n => { KeyId = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("key", Key); + writer.WriteStringValue("key_id", KeyId); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Orgs/Item/PrivateRegistries/PublicKey/PublicKeyRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/PrivateRegistries/PublicKey/PublicKeyRequestBuilder.cs new file mode 100644 index 0000000..61b7f50 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/PrivateRegistries/PublicKey/PublicKeyRequestBuilder.cs @@ -0,0 +1,123 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Orgs.Item.PrivateRegistries.PublicKey +{ + /// + /// Builds and executes requests for operations under \orgs\{org}\private-registries\public-key + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class PublicKeyRequestBuilder : BaseRequestBuilder + { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public PublicKeyRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/orgs/{org}/private-registries/public-key", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public PublicKeyRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/orgs/{org}/private-registries/public-key", rawUrl) + { + } + /// + /// Gets the org public key, which is needed to encrypt private registry secrets. You need to encrypt a secret before you can create or update secrets.OAuth tokens and personal access tokens (classic) need the `admin:org` scope to use this endpoint. + /// API method documentation + /// + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 404 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsPublicKeyGetResponseAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task GetAsPublicKeyGetResponseAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "404", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Orgs.Item.PrivateRegistries.PublicKey.PublicKeyGetResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// Gets the org public key, which is needed to encrypt private registry secrets. You need to encrypt a secret before you can create or update secrets.OAuth tokens and personal access tokens (classic) need the `admin:org` scope to use this endpoint. + /// API method documentation + /// + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 404 status code + [Obsolete("This method is obsolete. Use GetAsPublicKeyGetResponseAsync instead.")] +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "404", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Orgs.Item.PrivateRegistries.PublicKey.PublicKeyResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// Gets the org public key, which is needed to encrypt private registry secrets. You need to encrypt a secret before you can create or update secrets.OAuth tokens and personal access tokens (classic) need the `admin:org` scope to use this endpoint. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.Orgs.Item.PrivateRegistries.PublicKey.PublicKeyRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Orgs.Item.PrivateRegistries.PublicKey.PublicKeyRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class PublicKeyRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Orgs/Item/PrivateRegistries/PublicKey/PublicKeyResponse.cs b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/PrivateRegistries/PublicKey/PublicKeyResponse.cs new file mode 100644 index 0000000..5ed541e --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/PrivateRegistries/PublicKey/PublicKeyResponse.cs @@ -0,0 +1,28 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Orgs.Item.PrivateRegistries.PublicKey +{ + [Obsolete("This class is obsolete. Use PublicKeyGetResponse instead.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class PublicKeyResponse : global::Ayllu.Github.Client.Orgs.Item.PrivateRegistries.PublicKey.PublicKeyGetResponse, IParsable + #pragma warning restore CS1591 + { + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static new global::Ayllu.Github.Client.Orgs.Item.PrivateRegistries.PublicKey.PublicKeyResponse CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Orgs.Item.PrivateRegistries.PublicKey.PublicKeyResponse(); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Projects/GetStateQueryParameterType.cs b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Projects/GetStateQueryParameterType.cs new file mode 100644 index 0000000..948d04f --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Projects/GetStateQueryParameterType.cs @@ -0,0 +1,24 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Orgs.Item.Projects +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public enum GetStateQueryParameterType + #pragma warning restore CS1591 + { + [EnumMember(Value = "open")] + #pragma warning disable CS1591 + Open, + #pragma warning restore CS1591 + [EnumMember(Value = "closed")] + #pragma warning disable CS1591 + Closed, + #pragma warning restore CS1591 + [EnumMember(Value = "all")] + #pragma warning disable CS1591 + All, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Projects/ProjectsPostRequestBody.cs b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Projects/ProjectsPostRequestBody.cs new file mode 100644 index 0000000..a9650de --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Projects/ProjectsPostRequestBody.cs @@ -0,0 +1,75 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Orgs.Item.Projects +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class ProjectsPostRequestBody : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The description of the project. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Body { get; set; } +#nullable restore +#else + public string Body { get; set; } +#endif + /// The name of the project. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Name { get; set; } +#nullable restore +#else + public string Name { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public ProjectsPostRequestBody() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Orgs.Item.Projects.ProjectsPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Orgs.Item.Projects.ProjectsPostRequestBody(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "body", n => { Body = n.GetStringValue(); } }, + { "name", n => { Name = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("body", Body); + writer.WriteStringValue("name", Name); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Projects/ProjectsRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Projects/ProjectsRequestBuilder.cs new file mode 100644 index 0000000..f7caaa7 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Projects/ProjectsRequestBuilder.cs @@ -0,0 +1,195 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Orgs.Item.Projects +{ + /// + /// Builds and executes requests for operations under \orgs\{org}\projects + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class ProjectsRequestBuilder : BaseRequestBuilder + { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public ProjectsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/orgs/{org}/projects{?page*,per_page*,state*}", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public ProjectsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/orgs/{org}/projects{?page*,per_page*,state*}", rawUrl) + { + } + /// + /// > [!WARNING]> **Closing down notice:** Projects (classic) is being deprecated in favor of the new Projects experience.> See the [changelog](https://github.blog/changelog/2024-05-23-sunset-notice-projects-classic/) for more information. + /// API method documentation + /// + /// A List<global::Ayllu.Github.Client.Models.Project> + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 422 status code + [Obsolete("")] +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task?> GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task> GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "422", global::Ayllu.Github.Client.Models.ValidationErrorSimple.CreateFromDiscriminatorValue }, + }; + var collectionResult = await RequestAdapter.SendCollectionAsync(requestInfo, global::Ayllu.Github.Client.Models.Project.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + return collectionResult?.AsList(); + } + /// + /// > [!WARNING]> **Closing down notice:** Projects (classic) is being deprecated in favor of the new Projects experience.> See the [changelog](https://github.blog/changelog/2024-05-23-sunset-notice-projects-classic/) for more information. + /// API method documentation + /// + /// A + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 401 status code + /// When receiving a 403 status code + /// When receiving a 404 status code + /// When receiving a 410 status code + /// When receiving a 422 status code + [Obsolete("")] +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PostAsync(global::Ayllu.Github.Client.Orgs.Item.Projects.ProjectsPostRequestBody body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task PostAsync(global::Ayllu.Github.Client.Orgs.Item.Projects.ProjectsPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPostRequestInformation(body, requestConfiguration); + var errorMapping = new Dictionary> + { + { "401", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "403", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "404", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "410", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "422", global::Ayllu.Github.Client.Models.ValidationErrorSimple.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Models.Project.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// > [!WARNING]> **Closing down notice:** Projects (classic) is being deprecated in favor of the new Projects experience.> See the [changelog](https://github.blog/changelog/2024-05-23-sunset-notice-projects-classic/) for more information. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. + [Obsolete("")] +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// > [!WARNING]> **Closing down notice:** Projects (classic) is being deprecated in favor of the new Projects experience.> See the [changelog](https://github.blog/changelog/2024-05-23-sunset-notice-projects-classic/) for more information. + /// + /// A + /// The request body + /// Configuration for the request such as headers, query parameters, and middleware options. + [Obsolete("")] +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPostRequestInformation(global::Ayllu.Github.Client.Orgs.Item.Projects.ProjectsPostRequestBody body, Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToPostRequestInformation(global::Ayllu.Github.Client.Orgs.Item.Projects.ProjectsPostRequestBody body, Action> requestConfiguration = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + [Obsolete("")] + public global::Ayllu.Github.Client.Orgs.Item.Projects.ProjectsRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Orgs.Item.Projects.ProjectsRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// > [!WARNING]> **Closing down notice:** Projects (classic) is being deprecated in favor of the new Projects experience.> See the [changelog](https://github.blog/changelog/2024-05-23-sunset-notice-projects-classic/) for more information. + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class ProjectsRequestBuilderGetQueryParameters + { + /// The page number of the results to fetch. For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." + [QueryParameter("page")] + public int? Page { get; set; } + /// The number of results per page (max 100). For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." + [QueryParameter("per_page")] + public int? PerPage { get; set; } + /// Indicates the state of the projects to return. + [Obsolete("This property is deprecated, use StateAsGetStateQueryParameterType instead")] +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("state")] + public string? State { get; set; } +#nullable restore +#else + [QueryParameter("state")] + public string State { get; set; } +#endif + /// Indicates the state of the projects to return. + [QueryParameter("state")] + public global::Ayllu.Github.Client.Orgs.Item.Projects.GetStateQueryParameterType? StateAsGetStateQueryParameterType { get; set; } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class ProjectsRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class ProjectsRequestBuilderPostRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Properties/PropertiesRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Properties/PropertiesRequestBuilder.cs new file mode 100644 index 0000000..f566ef9 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Properties/PropertiesRequestBuilder.cs @@ -0,0 +1,47 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Orgs.Item.Properties.Schema; +using Ayllu.Github.Client.Orgs.Item.Properties.Values; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System; +namespace Ayllu.Github.Client.Orgs.Item.Properties +{ + /// + /// Builds and executes requests for operations under \orgs\{org}\properties + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class PropertiesRequestBuilder : BaseRequestBuilder + { + /// The schema property + public global::Ayllu.Github.Client.Orgs.Item.Properties.Schema.SchemaRequestBuilder Schema + { + get => new global::Ayllu.Github.Client.Orgs.Item.Properties.Schema.SchemaRequestBuilder(PathParameters, RequestAdapter); + } + /// The values property + public global::Ayllu.Github.Client.Orgs.Item.Properties.Values.ValuesRequestBuilder Values + { + get => new global::Ayllu.Github.Client.Orgs.Item.Properties.Values.ValuesRequestBuilder(PathParameters, RequestAdapter); + } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public PropertiesRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/orgs/{org}/properties", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public PropertiesRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/orgs/{org}/properties", rawUrl) + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Properties/Schema/Item/WithCustom_property_nameItemRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Properties/Schema/Item/WithCustom_property_nameItemRequestBuilder.cs new file mode 100644 index 0000000..13e2017 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Properties/Schema/Item/WithCustom_property_nameItemRequestBuilder.cs @@ -0,0 +1,210 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Orgs.Item.Properties.Schema.Item +{ + /// + /// Builds and executes requests for operations under \orgs\{org}\properties\schema\{custom_property_name} + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithCustom_property_nameItemRequestBuilder : BaseRequestBuilder + { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public WithCustom_property_nameItemRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/orgs/{org}/properties/schema/{custom_property_name}", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public WithCustom_property_nameItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/orgs/{org}/properties/schema/{custom_property_name}", rawUrl) + { + } + /// + /// 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. + /// API method documentation + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 403 status code + /// When receiving a 404 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task DeleteAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task DeleteAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToDeleteRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "403", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "404", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + }; + await RequestAdapter.SendNoContentAsync(requestInfo, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// Gets a custom property that is defined for an organization.Organization members can read these properties. + /// API method documentation + /// + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 403 status code + /// When receiving a 404 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "403", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "404", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Models.CustomProperty.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// 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. + /// API method documentation + /// + /// A + /// Custom property set payload + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 403 status code + /// When receiving a 404 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PutAsync(global::Ayllu.Github.Client.Models.CustomPropertySetPayload body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task PutAsync(global::Ayllu.Github.Client.Models.CustomPropertySetPayload body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPutRequestInformation(body, requestConfiguration); + var errorMapping = new Dictionary> + { + { "403", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "404", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Models.CustomProperty.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// 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. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToDeleteRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToDeleteRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.DELETE, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Gets a custom property that is defined for an organization.Organization members can read these properties. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// 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. + /// + /// A + /// Custom property set payload + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPutRequestInformation(global::Ayllu.Github.Client.Models.CustomPropertySetPayload body, Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToPutRequestInformation(global::Ayllu.Github.Client.Models.CustomPropertySetPayload body, Action> requestConfiguration = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation(Method.PUT, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.Orgs.Item.Properties.Schema.Item.WithCustom_property_nameItemRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Orgs.Item.Properties.Schema.Item.WithCustom_property_nameItemRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithCustom_property_nameItemRequestBuilderDeleteRequestConfiguration : RequestConfiguration + { + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithCustom_property_nameItemRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithCustom_property_nameItemRequestBuilderPutRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Properties/Schema/SchemaPatchRequestBody.cs b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Properties/Schema/SchemaPatchRequestBody.cs new file mode 100644 index 0000000..549153c --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Properties/Schema/SchemaPatchRequestBody.cs @@ -0,0 +1,66 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Orgs.Item.Properties.Schema +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class SchemaPatchRequestBody : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The array of custom properties to create or update. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? Properties { get; set; } +#nullable restore +#else + public List Properties { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public SchemaPatchRequestBody() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Orgs.Item.Properties.Schema.SchemaPatchRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Orgs.Item.Properties.Schema.SchemaPatchRequestBody(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "properties", n => { Properties = n.GetCollectionOfObjectValues(global::Ayllu.Github.Client.Models.CustomProperty.CreateFromDiscriminatorValue)?.AsList(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteCollectionOfObjectValues("properties", Properties); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Properties/Schema/SchemaRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Properties/Schema/SchemaRequestBuilder.cs new file mode 100644 index 0000000..331a39c --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Properties/Schema/SchemaRequestBuilder.cs @@ -0,0 +1,173 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Ayllu.Github.Client.Orgs.Item.Properties.Schema.Item; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Orgs.Item.Properties.Schema +{ + /// + /// Builds and executes requests for operations under \orgs\{org}\properties\schema + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class SchemaRequestBuilder : BaseRequestBuilder + { + /// Gets an item from the Ayllu.Github.Client.orgs.item.properties.schema.item collection + /// The custom property name + /// A + public global::Ayllu.Github.Client.Orgs.Item.Properties.Schema.Item.WithCustom_property_nameItemRequestBuilder this[string position] + { + get + { + var urlTplParams = new Dictionary(PathParameters); + urlTplParams.Add("custom_property_name", position); + return new global::Ayllu.Github.Client.Orgs.Item.Properties.Schema.Item.WithCustom_property_nameItemRequestBuilder(urlTplParams, RequestAdapter); + } + } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public SchemaRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/orgs/{org}/properties/schema", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public SchemaRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/orgs/{org}/properties/schema", rawUrl) + { + } + /// + /// Gets all custom properties defined for an organization.Organization members can read these properties. + /// API method documentation + /// + /// A List<global::Ayllu.Github.Client.Models.CustomProperty> + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 403 status code + /// When receiving a 404 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task?> GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task> GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "403", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "404", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + }; + var collectionResult = await RequestAdapter.SendCollectionAsync(requestInfo, global::Ayllu.Github.Client.Models.CustomProperty.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + return collectionResult?.AsList(); + } + /// + /// Creates new or updates existing custom properties defined for an organization in a batch.If the property already exists, the existing property will be replaced with the new values.Missing optional values will fall back to default values, previous values will be overwritten.E.g. if a property exists with `values_editable_by: org_and_repo_actors` and it's updated without specifying `values_editable_by`, it will be updated to default value `org_actors`.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. + /// API method documentation + /// + /// A List<global::Ayllu.Github.Client.Models.CustomProperty> + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 403 status code + /// When receiving a 404 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task?> PatchAsync(global::Ayllu.Github.Client.Orgs.Item.Properties.Schema.SchemaPatchRequestBody body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task> PatchAsync(global::Ayllu.Github.Client.Orgs.Item.Properties.Schema.SchemaPatchRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPatchRequestInformation(body, requestConfiguration); + var errorMapping = new Dictionary> + { + { "403", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "404", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + }; + var collectionResult = await RequestAdapter.SendCollectionAsync(requestInfo, global::Ayllu.Github.Client.Models.CustomProperty.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + return collectionResult?.AsList(); + } + /// + /// Gets all custom properties defined for an organization.Organization members can read these properties. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Creates new or updates existing custom properties defined for an organization in a batch.If the property already exists, the existing property will be replaced with the new values.Missing optional values will fall back to default values, previous values will be overwritten.E.g. if a property exists with `values_editable_by: org_and_repo_actors` and it's updated without specifying `values_editable_by`, it will be updated to default value `org_actors`.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. + /// + /// A + /// The request body + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPatchRequestInformation(global::Ayllu.Github.Client.Orgs.Item.Properties.Schema.SchemaPatchRequestBody body, Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToPatchRequestInformation(global::Ayllu.Github.Client.Orgs.Item.Properties.Schema.SchemaPatchRequestBody body, Action> requestConfiguration = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.Orgs.Item.Properties.Schema.SchemaRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Orgs.Item.Properties.Schema.SchemaRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class SchemaRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class SchemaRequestBuilderPatchRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Properties/Values/ValuesPatchRequestBody.cs b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Properties/Values/ValuesPatchRequestBody.cs new file mode 100644 index 0000000..ce7b3d4 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Properties/Values/ValuesPatchRequestBody.cs @@ -0,0 +1,76 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Orgs.Item.Properties.Values +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class ValuesPatchRequestBody : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// List of custom property names and associated values to apply to the repositories. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? Properties { get; set; } +#nullable restore +#else + public List Properties { get; set; } +#endif + /// The names of repositories that the custom property values will be applied to. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? RepositoryNames { get; set; } +#nullable restore +#else + public List RepositoryNames { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public ValuesPatchRequestBody() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Orgs.Item.Properties.Values.ValuesPatchRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Orgs.Item.Properties.Values.ValuesPatchRequestBody(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "properties", n => { Properties = n.GetCollectionOfObjectValues(global::Ayllu.Github.Client.Models.CustomPropertyValue.CreateFromDiscriminatorValue)?.AsList(); } }, + { "repository_names", n => { RepositoryNames = n.GetCollectionOfPrimitiveValues()?.AsList(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteCollectionOfObjectValues("properties", Properties); + writer.WriteCollectionOfPrimitiveValues("repository_names", RepositoryNames); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Properties/Values/ValuesRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Properties/Values/ValuesRequestBuilder.cs new file mode 100644 index 0000000..c0fcc53 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Properties/Values/ValuesRequestBuilder.cs @@ -0,0 +1,183 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Orgs.Item.Properties.Values +{ + /// + /// Builds and executes requests for operations under \orgs\{org}\properties\values + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class ValuesRequestBuilder : BaseRequestBuilder + { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public ValuesRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/orgs/{org}/properties/values{?page*,per_page*,repository_query*}", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public ValuesRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/orgs/{org}/properties/values{?page*,per_page*,repository_query*}", rawUrl) + { + } + /// + /// Lists organization repositories with all of their custom property values.Organization members can read these properties. + /// API method documentation + /// + /// A List<global::Ayllu.Github.Client.Models.OrgRepoCustomPropertyValues> + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 403 status code + /// When receiving a 404 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task?> GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task> GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "403", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "404", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + }; + var collectionResult = await RequestAdapter.SendCollectionAsync(requestInfo, global::Ayllu.Github.Client.Models.OrgRepoCustomPropertyValues.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + return collectionResult?.AsList(); + } + /// + /// 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. + /// API method documentation + /// + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 403 status code + /// When receiving a 404 status code + /// When receiving a 422 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PatchAsync(global::Ayllu.Github.Client.Orgs.Item.Properties.Values.ValuesPatchRequestBody body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task PatchAsync(global::Ayllu.Github.Client.Orgs.Item.Properties.Values.ValuesPatchRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPatchRequestInformation(body, requestConfiguration); + var errorMapping = new Dictionary> + { + { "403", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "404", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "422", global::Ayllu.Github.Client.Models.ValidationError.CreateFromDiscriminatorValue }, + }; + await RequestAdapter.SendNoContentAsync(requestInfo, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// Lists organization repositories with all of their custom property values.Organization members can read these properties. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// 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. + /// + /// A + /// The request body + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPatchRequestInformation(global::Ayllu.Github.Client.Orgs.Item.Properties.Values.ValuesPatchRequestBody body, Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToPatchRequestInformation(global::Ayllu.Github.Client.Orgs.Item.Properties.Values.ValuesPatchRequestBody body, Action> requestConfiguration = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.Orgs.Item.Properties.Values.ValuesRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Orgs.Item.Properties.Values.ValuesRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Lists organization repositories with all of their custom property values.Organization members can read these properties. + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class ValuesRequestBuilderGetQueryParameters + { + /// The page number of the results to fetch. For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." + [QueryParameter("page")] + public int? Page { get; set; } + /// The number of results per page (max 100). For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." + [QueryParameter("per_page")] + public int? PerPage { get; set; } + /// 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. The REST API supports the same qualifiers as the web interface for GitHub. To learn more about the format of the query, see [Constructing a search query](https://docs.github.com/rest/search/search#constructing-a-search-query). See "[Searching for repositories](https://docs.github.com/articles/searching-for-repositories/)" for a detailed list of qualifiers. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("repository_query")] + public string? RepositoryQuery { get; set; } +#nullable restore +#else + [QueryParameter("repository_query")] + public string RepositoryQuery { get; set; } +#endif + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class ValuesRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class ValuesRequestBuilderPatchRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Public_members/Item/WithUsernameItemRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Public_members/Item/WithUsernameItemRequestBuilder.cs new file mode 100644 index 0000000..c818747 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Public_members/Item/WithUsernameItemRequestBuilder.cs @@ -0,0 +1,185 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Orgs.Item.Public_members.Item +{ + /// + /// Builds and executes requests for operations under \orgs\{org}\public_members\{username} + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithUsernameItemRequestBuilder : BaseRequestBuilder + { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public WithUsernameItemRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/orgs/{org}/public_members/{username}", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public WithUsernameItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/orgs/{org}/public_members/{username}", rawUrl) + { + } + /// + /// Removes the public membership for the authenticated user from the specified organization, unless public visibility is enforced by default. + /// API method documentation + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task DeleteAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task DeleteAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToDeleteRequestInformation(requestConfiguration); + await RequestAdapter.SendNoContentAsync(requestInfo, default, cancellationToken).ConfigureAwait(false); + } + /// + /// Check if the provided user is a public member of the organization. + /// API method documentation + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + await RequestAdapter.SendNoContentAsync(requestInfo, default, cancellationToken).ConfigureAwait(false); + } + /// + /// 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/rest/guides/getting-started-with-the-rest-api#http-method)." + /// API method documentation + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 403 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PutAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task PutAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToPutRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "403", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + }; + await RequestAdapter.SendNoContentAsync(requestInfo, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// Removes the public membership for the authenticated user from the specified organization, unless public visibility is enforced by default. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToDeleteRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToDeleteRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.DELETE, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + return requestInfo; + } + /// + /// Check if the provided user is a public member of the organization. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + return requestInfo; + } + /// + /// 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/rest/guides/getting-started-with-the-rest-api#http-method)." + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPutRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToPutRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.PUT, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.Orgs.Item.Public_members.Item.WithUsernameItemRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Orgs.Item.Public_members.Item.WithUsernameItemRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithUsernameItemRequestBuilderDeleteRequestConfiguration : RequestConfiguration + { + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithUsernameItemRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithUsernameItemRequestBuilderPutRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Public_members/Public_membersRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Public_members/Public_membersRequestBuilder.cs new file mode 100644 index 0000000..2b125d9 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Public_members/Public_membersRequestBuilder.cs @@ -0,0 +1,120 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Ayllu.Github.Client.Orgs.Item.Public_members.Item; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Orgs.Item.Public_members +{ + /// + /// Builds and executes requests for operations under \orgs\{org}\public_members + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class Public_membersRequestBuilder : BaseRequestBuilder + { + /// Gets an item from the Ayllu.Github.Client.orgs.item.public_members.item collection + /// The handle for the GitHub user account. + /// A + public global::Ayllu.Github.Client.Orgs.Item.Public_members.Item.WithUsernameItemRequestBuilder this[string position] + { + get + { + var urlTplParams = new Dictionary(PathParameters); + urlTplParams.Add("username", position); + return new global::Ayllu.Github.Client.Orgs.Item.Public_members.Item.WithUsernameItemRequestBuilder(urlTplParams, RequestAdapter); + } + } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public Public_membersRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/orgs/{org}/public_members{?page*,per_page*}", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public Public_membersRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/orgs/{org}/public_members{?page*,per_page*}", rawUrl) + { + } + /// + /// Members of an organization can choose to have their membership publicized or not. + /// API method documentation + /// + /// A List<global::Ayllu.Github.Client.Models.SimpleUser> + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task?> GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task> GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var collectionResult = await RequestAdapter.SendCollectionAsync(requestInfo, global::Ayllu.Github.Client.Models.SimpleUser.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false); + return collectionResult?.AsList(); + } + /// + /// Members of an organization can choose to have their membership publicized or not. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.Orgs.Item.Public_members.Public_membersRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Orgs.Item.Public_members.Public_membersRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Members of an organization can choose to have their membership publicized or not. + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class Public_membersRequestBuilderGetQueryParameters + { + /// The page number of the results to fetch. For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." + [QueryParameter("page")] + public int? Page { get; set; } + /// The number of results per page (max 100). For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." + [QueryParameter("per_page")] + public int? PerPage { get; set; } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class Public_membersRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Repos/GetDirectionQueryParameterType.cs b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Repos/GetDirectionQueryParameterType.cs new file mode 100644 index 0000000..5f848e0 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Repos/GetDirectionQueryParameterType.cs @@ -0,0 +1,20 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Orgs.Item.Repos +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public enum GetDirectionQueryParameterType + #pragma warning restore CS1591 + { + [EnumMember(Value = "asc")] + #pragma warning disable CS1591 + Asc, + #pragma warning restore CS1591 + [EnumMember(Value = "desc")] + #pragma warning disable CS1591 + Desc, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Repos/GetSortQueryParameterType.cs b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Repos/GetSortQueryParameterType.cs new file mode 100644 index 0000000..cf74152 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Repos/GetSortQueryParameterType.cs @@ -0,0 +1,28 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Orgs.Item.Repos +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public enum GetSortQueryParameterType + #pragma warning restore CS1591 + { + [EnumMember(Value = "created")] + #pragma warning disable CS1591 + Created, + #pragma warning restore CS1591 + [EnumMember(Value = "updated")] + #pragma warning disable CS1591 + Updated, + #pragma warning restore CS1591 + [EnumMember(Value = "pushed")] + #pragma warning disable CS1591 + Pushed, + #pragma warning restore CS1591 + [EnumMember(Value = "full_name")] + #pragma warning disable CS1591 + Full_name, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Repos/GetTypeQueryParameterType.cs b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Repos/GetTypeQueryParameterType.cs new file mode 100644 index 0000000..cf8a676 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Repos/GetTypeQueryParameterType.cs @@ -0,0 +1,36 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Orgs.Item.Repos +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public enum GetTypeQueryParameterType + #pragma warning restore CS1591 + { + [EnumMember(Value = "all")] + #pragma warning disable CS1591 + All, + #pragma warning restore CS1591 + [EnumMember(Value = "public")] + #pragma warning disable CS1591 + Public, + #pragma warning restore CS1591 + [EnumMember(Value = "private")] + #pragma warning disable CS1591 + Private, + #pragma warning restore CS1591 + [EnumMember(Value = "forks")] + #pragma warning disable CS1591 + Forks, + #pragma warning restore CS1591 + [EnumMember(Value = "sources")] + #pragma warning disable CS1591 + Sources, + #pragma warning restore CS1591 + [EnumMember(Value = "member")] + #pragma warning disable CS1591 + Member, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Repos/ReposPostRequestBody.cs b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Repos/ReposPostRequestBody.cs new file mode 100644 index 0000000..4675eb1 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Repos/ReposPostRequestBody.cs @@ -0,0 +1,192 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Orgs.Item.Repos +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class ReposPostRequestBody : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// Either `true` to allow auto-merge on pull requests, or `false` to disallow auto-merge. + public bool? AllowAutoMerge { get; set; } + /// Either `true` to allow merging pull requests with a merge commit, or `false` to prevent merging pull requests with merge commits. + public bool? AllowMergeCommit { get; set; } + /// Either `true` to allow rebase-merging pull requests, or `false` to prevent rebase-merging. + public bool? AllowRebaseMerge { get; set; } + /// Either `true` to allow squash-merging pull requests, or `false` to prevent squash-merging. + public bool? AllowSquashMerge { get; set; } + /// Pass `true` to create an initial commit with empty README. + public bool? AutoInit { get; set; } + /// The custom properties for the new repository. The keys are the custom property names, and the values are the corresponding custom property values. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Orgs.Item.Repos.ReposPostRequestBody_custom_properties? CustomProperties { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Orgs.Item.Repos.ReposPostRequestBody_custom_properties CustomProperties { get; set; } +#endif + /// 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`.** + public bool? DeleteBranchOnMerge { get; set; } + /// A short description of the repository. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Description { get; set; } +#nullable restore +#else + public string Description { get; set; } +#endif + /// 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". +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? GitignoreTemplate { get; set; } +#nullable restore +#else + public string GitignoreTemplate { get; set; } +#endif + /// Whether downloads are enabled. + public bool? HasDownloads { get; set; } + /// Either `true` to enable issues for this repository or `false` to disable them. + public bool? HasIssues { get; set; } + /// 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. + public bool? HasProjects { get; set; } + /// Either `true` to enable the wiki for this repository or `false` to disable it. + public bool? HasWiki { get; set; } + /// A URL with more information about the repository. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Homepage { get; set; } +#nullable restore +#else + public string Homepage { get; set; } +#endif + /// Either `true` to make this repo available as a template repository or `false` to prevent it. + public bool? IsTemplate { get; set; } + /// Choose an [open source license template](https://choosealicense.com/) that best suits your needs, and then use the [license keyword](https://docs.github.com/articles/licensing-a-repository/#searching-github-by-license-type) as the `license_template` string. For example, "mit" or "mpl-2.0". +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? LicenseTemplate { get; set; } +#nullable restore +#else + public string LicenseTemplate { get; set; } +#endif + /// 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. + public global::Ayllu.Github.Client.Orgs.Item.Repos.ReposPostRequestBody_merge_commit_message? MergeCommitMessage { get; set; } + /// Required when using `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). + public global::Ayllu.Github.Client.Orgs.Item.Repos.ReposPostRequestBody_merge_commit_title? MergeCommitTitle { get; set; } + /// The name of the repository. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Name { get; set; } +#nullable restore +#else + public string Name { get; set; } +#endif + /// Whether the repository is private. + public bool? Private { get; set; } + /// 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. + public global::Ayllu.Github.Client.Orgs.Item.Repos.ReposPostRequestBody_squash_merge_commit_message? SquashMergeCommitMessage { get; set; } + /// Required when using `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). + public global::Ayllu.Github.Client.Orgs.Item.Repos.ReposPostRequestBody_squash_merge_commit_title? SquashMergeCommitTitle { get; set; } + /// The id of the team that will be granted access to this repository. This is only valid when creating a repository in an organization. + public int? TeamId { get; set; } + /// Either `true` to allow squash-merge commits to use pull request title, or `false` to use commit message. **This property is closing down. Please use `squash_merge_commit_title` instead. + [Obsolete("")] + public bool? UseSquashPrTitleAsDefault { get; set; } + /// The visibility of the repository. + public global::Ayllu.Github.Client.Orgs.Item.Repos.ReposPostRequestBody_visibility? Visibility { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public ReposPostRequestBody() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Orgs.Item.Repos.ReposPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Orgs.Item.Repos.ReposPostRequestBody(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "allow_auto_merge", n => { AllowAutoMerge = n.GetBoolValue(); } }, + { "allow_merge_commit", n => { AllowMergeCommit = n.GetBoolValue(); } }, + { "allow_rebase_merge", n => { AllowRebaseMerge = n.GetBoolValue(); } }, + { "allow_squash_merge", n => { AllowSquashMerge = n.GetBoolValue(); } }, + { "auto_init", n => { AutoInit = n.GetBoolValue(); } }, + { "custom_properties", n => { CustomProperties = n.GetObjectValue(global::Ayllu.Github.Client.Orgs.Item.Repos.ReposPostRequestBody_custom_properties.CreateFromDiscriminatorValue); } }, + { "delete_branch_on_merge", n => { DeleteBranchOnMerge = n.GetBoolValue(); } }, + { "description", n => { Description = n.GetStringValue(); } }, + { "gitignore_template", n => { GitignoreTemplate = n.GetStringValue(); } }, + { "has_downloads", n => { HasDownloads = n.GetBoolValue(); } }, + { "has_issues", n => { HasIssues = n.GetBoolValue(); } }, + { "has_projects", n => { HasProjects = n.GetBoolValue(); } }, + { "has_wiki", n => { HasWiki = n.GetBoolValue(); } }, + { "homepage", n => { Homepage = n.GetStringValue(); } }, + { "is_template", n => { IsTemplate = n.GetBoolValue(); } }, + { "license_template", n => { LicenseTemplate = n.GetStringValue(); } }, + { "merge_commit_message", n => { MergeCommitMessage = n.GetEnumValue(); } }, + { "merge_commit_title", n => { MergeCommitTitle = n.GetEnumValue(); } }, + { "name", n => { Name = n.GetStringValue(); } }, + { "private", n => { Private = n.GetBoolValue(); } }, + { "squash_merge_commit_message", n => { SquashMergeCommitMessage = n.GetEnumValue(); } }, + { "squash_merge_commit_title", n => { SquashMergeCommitTitle = n.GetEnumValue(); } }, + { "team_id", n => { TeamId = n.GetIntValue(); } }, + { "use_squash_pr_title_as_default", n => { UseSquashPrTitleAsDefault = n.GetBoolValue(); } }, + { "visibility", n => { Visibility = n.GetEnumValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteBoolValue("allow_auto_merge", AllowAutoMerge); + writer.WriteBoolValue("allow_merge_commit", AllowMergeCommit); + writer.WriteBoolValue("allow_rebase_merge", AllowRebaseMerge); + writer.WriteBoolValue("allow_squash_merge", AllowSquashMerge); + writer.WriteBoolValue("auto_init", AutoInit); + writer.WriteObjectValue("custom_properties", CustomProperties); + writer.WriteBoolValue("delete_branch_on_merge", DeleteBranchOnMerge); + writer.WriteStringValue("description", Description); + writer.WriteStringValue("gitignore_template", GitignoreTemplate); + writer.WriteBoolValue("has_downloads", HasDownloads); + writer.WriteBoolValue("has_issues", HasIssues); + writer.WriteBoolValue("has_projects", HasProjects); + writer.WriteBoolValue("has_wiki", HasWiki); + writer.WriteStringValue("homepage", Homepage); + writer.WriteBoolValue("is_template", IsTemplate); + writer.WriteStringValue("license_template", LicenseTemplate); + writer.WriteEnumValue("merge_commit_message", MergeCommitMessage); + writer.WriteEnumValue("merge_commit_title", MergeCommitTitle); + writer.WriteStringValue("name", Name); + writer.WriteBoolValue("private", Private); + writer.WriteEnumValue("squash_merge_commit_message", SquashMergeCommitMessage); + writer.WriteEnumValue("squash_merge_commit_title", SquashMergeCommitTitle); + writer.WriteIntValue("team_id", TeamId); + writer.WriteBoolValue("use_squash_pr_title_as_default", UseSquashPrTitleAsDefault); + writer.WriteEnumValue("visibility", Visibility); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Repos/ReposPostRequestBody_custom_properties.cs b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Repos/ReposPostRequestBody_custom_properties.cs new file mode 100644 index 0000000..a3db9f8 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Repos/ReposPostRequestBody_custom_properties.cs @@ -0,0 +1,56 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Orgs.Item.Repos +{ + /// + /// The custom properties for the new repository. The keys are the custom property names, and the values are the corresponding custom property values. + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class ReposPostRequestBody_custom_properties : IAdditionalDataHolder, IParsable + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public ReposPostRequestBody_custom_properties() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Orgs.Item.Repos.ReposPostRequestBody_custom_properties CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Orgs.Item.Repos.ReposPostRequestBody_custom_properties(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Repos/ReposPostRequestBody_merge_commit_message.cs b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Repos/ReposPostRequestBody_merge_commit_message.cs new file mode 100644 index 0000000..91eee0f --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Repos/ReposPostRequestBody_merge_commit_message.cs @@ -0,0 +1,23 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Orgs.Item.Repos +{ + /// 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. + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public enum ReposPostRequestBody_merge_commit_message + { + [EnumMember(Value = "PR_BODY")] + #pragma warning disable CS1591 + PR_BODY, + #pragma warning restore CS1591 + [EnumMember(Value = "PR_TITLE")] + #pragma warning disable CS1591 + PR_TITLE, + #pragma warning restore CS1591 + [EnumMember(Value = "BLANK")] + #pragma warning disable CS1591 + BLANK, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Repos/ReposPostRequestBody_merge_commit_title.cs b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Repos/ReposPostRequestBody_merge_commit_title.cs new file mode 100644 index 0000000..0730127 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Repos/ReposPostRequestBody_merge_commit_title.cs @@ -0,0 +1,19 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Orgs.Item.Repos +{ + /// Required when using `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). + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public enum ReposPostRequestBody_merge_commit_title + { + [EnumMember(Value = "PR_TITLE")] + #pragma warning disable CS1591 + PR_TITLE, + #pragma warning restore CS1591 + [EnumMember(Value = "MERGE_MESSAGE")] + #pragma warning disable CS1591 + MERGE_MESSAGE, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Repos/ReposPostRequestBody_squash_merge_commit_message.cs b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Repos/ReposPostRequestBody_squash_merge_commit_message.cs new file mode 100644 index 0000000..9dd849d --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Repos/ReposPostRequestBody_squash_merge_commit_message.cs @@ -0,0 +1,23 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Orgs.Item.Repos +{ + /// 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. + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public enum ReposPostRequestBody_squash_merge_commit_message + { + [EnumMember(Value = "PR_BODY")] + #pragma warning disable CS1591 + PR_BODY, + #pragma warning restore CS1591 + [EnumMember(Value = "COMMIT_MESSAGES")] + #pragma warning disable CS1591 + COMMIT_MESSAGES, + #pragma warning restore CS1591 + [EnumMember(Value = "BLANK")] + #pragma warning disable CS1591 + BLANK, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Repos/ReposPostRequestBody_squash_merge_commit_title.cs b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Repos/ReposPostRequestBody_squash_merge_commit_title.cs new file mode 100644 index 0000000..95f3eeb --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Repos/ReposPostRequestBody_squash_merge_commit_title.cs @@ -0,0 +1,19 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Orgs.Item.Repos +{ + /// Required when using `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). + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public enum ReposPostRequestBody_squash_merge_commit_title + { + [EnumMember(Value = "PR_TITLE")] + #pragma warning disable CS1591 + PR_TITLE, + #pragma warning restore CS1591 + [EnumMember(Value = "COMMIT_OR_PR_TITLE")] + #pragma warning disable CS1591 + COMMIT_OR_PR_TITLE, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Repos/ReposPostRequestBody_visibility.cs b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Repos/ReposPostRequestBody_visibility.cs new file mode 100644 index 0000000..1e8b134 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Repos/ReposPostRequestBody_visibility.cs @@ -0,0 +1,19 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Orgs.Item.Repos +{ + /// The visibility of the repository. + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public enum ReposPostRequestBody_visibility + { + [EnumMember(Value = "public")] + #pragma warning disable CS1591 + Public, + #pragma warning restore CS1591 + [EnumMember(Value = "private")] + #pragma warning disable CS1591 + Private, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Repos/ReposRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Repos/ReposRequestBuilder.cs new file mode 100644 index 0000000..a753c10 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Repos/ReposRequestBuilder.cs @@ -0,0 +1,207 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Orgs.Item.Repos +{ + /// + /// Builds and executes requests for operations under \orgs\{org}\repos + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class ReposRequestBuilder : BaseRequestBuilder + { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public ReposRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/orgs/{org}/repos{?direction*,page*,per_page*,sort*,type*}", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public ReposRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/orgs/{org}/repos{?direction*,page*,per_page*,sort*,type*}", rawUrl) + { + } + /// + /// 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/organizations/managing-peoples-access-to-your-organization-with-roles/managing-security-managers-in-your-organization)." + /// API method documentation + /// + /// A List<global::Ayllu.Github.Client.Models.MinimalRepository> + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task?> GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task> GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var collectionResult = await RequestAdapter.SendCollectionAsync(requestInfo, global::Ayllu.Github.Client.Models.MinimalRepository.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false); + return collectionResult?.AsList(); + } + /// + /// 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. + /// API method documentation + /// + /// A + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 403 status code + /// When receiving a 422 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PostAsync(global::Ayllu.Github.Client.Orgs.Item.Repos.ReposPostRequestBody body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task PostAsync(global::Ayllu.Github.Client.Orgs.Item.Repos.ReposPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPostRequestInformation(body, requestConfiguration); + var errorMapping = new Dictionary> + { + { "403", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "422", global::Ayllu.Github.Client.Models.ValidationError.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Models.FullRepository.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// 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/organizations/managing-peoples-access-to-your-organization-with-roles/managing-security-managers-in-your-organization)." + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// 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. + /// + /// A + /// The request body + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPostRequestInformation(global::Ayllu.Github.Client.Orgs.Item.Repos.ReposPostRequestBody body, Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToPostRequestInformation(global::Ayllu.Github.Client.Orgs.Item.Repos.ReposPostRequestBody body, Action> requestConfiguration = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.Orgs.Item.Repos.ReposRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Orgs.Item.Repos.ReposRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// 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/organizations/managing-peoples-access-to-your-organization-with-roles/managing-security-managers-in-your-organization)." + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class ReposRequestBuilderGetQueryParameters + { + /// The order to sort by. Default: `asc` when using `full_name`, otherwise `desc`. + [Obsolete("This property is deprecated, use DirectionAsGetDirectionQueryParameterType instead")] +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("direction")] + public string? Direction { get; set; } +#nullable restore +#else + [QueryParameter("direction")] + public string Direction { get; set; } +#endif + /// The order to sort by. Default: `asc` when using `full_name`, otherwise `desc`. + [QueryParameter("direction")] + public global::Ayllu.Github.Client.Orgs.Item.Repos.GetDirectionQueryParameterType? DirectionAsGetDirectionQueryParameterType { get; set; } + /// The page number of the results to fetch. For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." + [QueryParameter("page")] + public int? Page { get; set; } + /// The number of results per page (max 100). For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." + [QueryParameter("per_page")] + public int? PerPage { get; set; } + /// The property to sort the results by. + [Obsolete("This property is deprecated, use SortAsGetSortQueryParameterType instead")] +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("sort")] + public string? Sort { get; set; } +#nullable restore +#else + [QueryParameter("sort")] + public string Sort { get; set; } +#endif + /// The property to sort the results by. + [QueryParameter("sort")] + public global::Ayllu.Github.Client.Orgs.Item.Repos.GetSortQueryParameterType? SortAsGetSortQueryParameterType { get; set; } + /// Specifies the types of repositories you want returned. + [Obsolete("This property is deprecated, use TypeAsGetTypeQueryParameterType instead")] +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("type")] + public string? Type { get; set; } +#nullable restore +#else + [QueryParameter("type")] + public string Type { get; set; } +#endif + /// Specifies the types of repositories you want returned. + [QueryParameter("type")] + public global::Ayllu.Github.Client.Orgs.Item.Repos.GetTypeQueryParameterType? TypeAsGetTypeQueryParameterType { get; set; } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class ReposRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class ReposRequestBuilderPostRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Rulesets/Item/History/HistoryRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Rulesets/Item/History/HistoryRequestBuilder.cs new file mode 100644 index 0000000..112ab0b --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Rulesets/Item/History/HistoryRequestBuilder.cs @@ -0,0 +1,140 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Ayllu.Github.Client.Orgs.Item.Rulesets.Item.History.Item; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Orgs.Item.Rulesets.Item.History +{ + /// + /// Builds and executes requests for operations under \orgs\{org}\rulesets\{ruleset_id}\history + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class HistoryRequestBuilder : BaseRequestBuilder + { + /// Gets an item from the Ayllu.Github.Client.orgs.item.rulesets.item.history.item collection + /// The ID of the version + /// A + public global::Ayllu.Github.Client.Orgs.Item.Rulesets.Item.History.Item.WithVersion_ItemRequestBuilder this[int position] + { + get + { + var urlTplParams = new Dictionary(PathParameters); + urlTplParams.Add("version_id", position); + return new global::Ayllu.Github.Client.Orgs.Item.Rulesets.Item.History.Item.WithVersion_ItemRequestBuilder(urlTplParams, RequestAdapter); + } + } + /// Gets an item from the Ayllu.Github.Client.orgs.item.rulesets.item.history.item collection + /// The ID of the version + /// A + [Obsolete("This indexer is deprecated and will be removed in the next major version. Use the one with the typed parameter instead.")] + public global::Ayllu.Github.Client.Orgs.Item.Rulesets.Item.History.Item.WithVersion_ItemRequestBuilder this[string position] + { + get + { + var urlTplParams = new Dictionary(PathParameters); + if (!string.IsNullOrWhiteSpace(position)) urlTplParams.Add("version_id", position); + return new global::Ayllu.Github.Client.Orgs.Item.Rulesets.Item.History.Item.WithVersion_ItemRequestBuilder(urlTplParams, RequestAdapter); + } + } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public HistoryRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/orgs/{org}/rulesets/{ruleset_id}/history{?page*,per_page*}", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public HistoryRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/orgs/{org}/rulesets/{ruleset_id}/history{?page*,per_page*}", rawUrl) + { + } + /// + /// Get the history of an organization ruleset. + /// API method documentation + /// + /// A List<global::Ayllu.Github.Client.Models.RulesetVersion> + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 404 status code + /// When receiving a 500 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task?> GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task> GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "404", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "500", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + }; + var collectionResult = await RequestAdapter.SendCollectionAsync(requestInfo, global::Ayllu.Github.Client.Models.RulesetVersion.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + return collectionResult?.AsList(); + } + /// + /// Get the history of an organization ruleset. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.Orgs.Item.Rulesets.Item.History.HistoryRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Orgs.Item.Rulesets.Item.History.HistoryRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Get the history of an organization ruleset. + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class HistoryRequestBuilderGetQueryParameters + { + /// The page number of the results to fetch. For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." + [QueryParameter("page")] + public int? Page { get; set; } + /// The number of results per page (max 100). For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." + [QueryParameter("per_page")] + public int? PerPage { get; set; } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class HistoryRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Rulesets/Item/History/Item/WithVersion_ItemRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Rulesets/Item/History/Item/WithVersion_ItemRequestBuilder.cs new file mode 100644 index 0000000..d1c21f8 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Rulesets/Item/History/Item/WithVersion_ItemRequestBuilder.cs @@ -0,0 +1,100 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Orgs.Item.Rulesets.Item.History.Item +{ + /// + /// Builds and executes requests for operations under \orgs\{org}\rulesets\{ruleset_id}\history\{version_id} + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithVersion_ItemRequestBuilder : BaseRequestBuilder + { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public WithVersion_ItemRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/orgs/{org}/rulesets/{ruleset_id}/history/{version_id}", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public WithVersion_ItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/orgs/{org}/rulesets/{ruleset_id}/history/{version_id}", rawUrl) + { + } + /// + /// Get a version of an organization ruleset. + /// API method documentation + /// + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 404 status code + /// When receiving a 500 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "404", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "500", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Models.RulesetVersionWithState.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// Get a version of an organization ruleset. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.Orgs.Item.Rulesets.Item.History.Item.WithVersion_ItemRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Orgs.Item.Rulesets.Item.History.Item.WithVersion_ItemRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithVersion_ItemRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Rulesets/Item/WithRuleset_ItemRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Rulesets/Item/WithRuleset_ItemRequestBuilder.cs new file mode 100644 index 0000000..544b4bb --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Rulesets/Item/WithRuleset_ItemRequestBuilder.cs @@ -0,0 +1,216 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Ayllu.Github.Client.Orgs.Item.Rulesets.Item.History; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Orgs.Item.Rulesets.Item +{ + /// + /// Builds and executes requests for operations under \orgs\{org}\rulesets\{ruleset_id} + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithRuleset_ItemRequestBuilder : BaseRequestBuilder + { + /// The history property + public global::Ayllu.Github.Client.Orgs.Item.Rulesets.Item.History.HistoryRequestBuilder History + { + get => new global::Ayllu.Github.Client.Orgs.Item.Rulesets.Item.History.HistoryRequestBuilder(PathParameters, RequestAdapter); + } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public WithRuleset_ItemRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/orgs/{org}/rulesets/{ruleset_id}", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public WithRuleset_ItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/orgs/{org}/rulesets/{ruleset_id}", rawUrl) + { + } + /// + /// Delete a ruleset for an organization. + /// API method documentation + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 404 status code + /// When receiving a 500 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task DeleteAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task DeleteAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToDeleteRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "404", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "500", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + }; + await RequestAdapter.SendNoContentAsync(requestInfo, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// Get a repository ruleset for an organization.**Note:** To prevent leaking sensitive information, the `bypass_actors` property is only returned if the usermaking the API request has write access to the ruleset. + /// API method documentation + /// + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 404 status code + /// When receiving a 500 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "404", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "500", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Models.RepositoryRuleset.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// Update a ruleset for an organization. + /// API method documentation + /// + /// A + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 404 status code + /// When receiving a 500 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PutAsync(global::Ayllu.Github.Client.Orgs.Item.Rulesets.Item.WithRuleset_PutRequestBody body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task PutAsync(global::Ayllu.Github.Client.Orgs.Item.Rulesets.Item.WithRuleset_PutRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPutRequestInformation(body, requestConfiguration); + var errorMapping = new Dictionary> + { + { "404", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "500", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Models.RepositoryRuleset.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// Delete a ruleset for an organization. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToDeleteRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToDeleteRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.DELETE, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Get a repository ruleset for an organization.**Note:** To prevent leaking sensitive information, the `bypass_actors` property is only returned if the usermaking the API request has write access to the ruleset. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Update a ruleset for an organization. + /// + /// A + /// The request body + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPutRequestInformation(global::Ayllu.Github.Client.Orgs.Item.Rulesets.Item.WithRuleset_PutRequestBody body, Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToPutRequestInformation(global::Ayllu.Github.Client.Orgs.Item.Rulesets.Item.WithRuleset_PutRequestBody body, Action> requestConfiguration = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation(Method.PUT, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.Orgs.Item.Rulesets.Item.WithRuleset_ItemRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Orgs.Item.Rulesets.Item.WithRuleset_ItemRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithRuleset_ItemRequestBuilderDeleteRequestConfiguration : RequestConfiguration + { + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithRuleset_ItemRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithRuleset_ItemRequestBuilderPutRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Rulesets/Item/WithRuleset_PutRequestBody.cs b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Rulesets/Item/WithRuleset_PutRequestBody.cs new file mode 100644 index 0000000..187fead --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Rulesets/Item/WithRuleset_PutRequestBody.cs @@ -0,0 +1,104 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Orgs.Item.Rulesets.Item +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class WithRuleset_PutRequestBody : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The actors that can bypass the rules in this ruleset +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? BypassActors { get; set; } +#nullable restore +#else + public List BypassActors { get; set; } +#endif + /// Conditions for an organization ruleset.The branch and tag rulesets conditions object should contain both `repository_name` and `ref_name` properties, or both `repository_id` and `ref_name` properties, or both `repository_property` and `ref_name` properties.The push rulesets conditions object does not require the `ref_name` property.For repository policy rulesets, the conditions object should only contain the `repository_name`, the `repository_id`, or the `repository_property`. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.OrgRulesetConditions? Conditions { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.OrgRulesetConditions Conditions { get; set; } +#endif + /// The enforcement level of the ruleset. `evaluate` allows admins to test rules before enforcing them. Admins can view insights on the Rule Insights page (`evaluate` is only available with GitHub Enterprise). + public global::Ayllu.Github.Client.Models.RepositoryRuleEnforcement? Enforcement { get; set; } + /// The name of the ruleset. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Name { get; set; } +#nullable restore +#else + public string Name { get; set; } +#endif + /// An array of rules within the ruleset. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? Rules { get; set; } +#nullable restore +#else + public List Rules { get; set; } +#endif + /// The target of the ruleset + public global::Ayllu.Github.Client.Orgs.Item.Rulesets.Item.WithRuleset_PutRequestBody_target? Target { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public WithRuleset_PutRequestBody() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Orgs.Item.Rulesets.Item.WithRuleset_PutRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Orgs.Item.Rulesets.Item.WithRuleset_PutRequestBody(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "bypass_actors", n => { BypassActors = n.GetCollectionOfObjectValues(global::Ayllu.Github.Client.Models.RepositoryRulesetBypassActor.CreateFromDiscriminatorValue)?.AsList(); } }, + { "conditions", n => { Conditions = n.GetObjectValue(global::Ayllu.Github.Client.Models.OrgRulesetConditions.CreateFromDiscriminatorValue); } }, + { "enforcement", n => { Enforcement = n.GetEnumValue(); } }, + { "name", n => { Name = n.GetStringValue(); } }, + { "rules", n => { Rules = n.GetCollectionOfObjectValues(global::Ayllu.Github.Client.Models.OrgRules.CreateFromDiscriminatorValue)?.AsList(); } }, + { "target", n => { Target = n.GetEnumValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteCollectionOfObjectValues("bypass_actors", BypassActors); + writer.WriteObjectValue("conditions", Conditions); + writer.WriteEnumValue("enforcement", Enforcement); + writer.WriteStringValue("name", Name); + writer.WriteCollectionOfObjectValues("rules", Rules); + writer.WriteEnumValue("target", Target); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Rulesets/Item/WithRuleset_PutRequestBody_target.cs b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Rulesets/Item/WithRuleset_PutRequestBody_target.cs new file mode 100644 index 0000000..837c1bf --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Rulesets/Item/WithRuleset_PutRequestBody_target.cs @@ -0,0 +1,27 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Orgs.Item.Rulesets.Item +{ + /// The target of the ruleset + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public enum WithRuleset_PutRequestBody_target + { + [EnumMember(Value = "branch")] + #pragma warning disable CS1591 + Branch, + #pragma warning restore CS1591 + [EnumMember(Value = "tag")] + #pragma warning disable CS1591 + Tag, + #pragma warning restore CS1591 + [EnumMember(Value = "push")] + #pragma warning disable CS1591 + Push, + #pragma warning restore CS1591 + [EnumMember(Value = "repository")] + #pragma warning disable CS1591 + Repository, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Rulesets/RuleSuites/GetRule_suite_resultQueryParameterType.cs b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Rulesets/RuleSuites/GetRule_suite_resultQueryParameterType.cs new file mode 100644 index 0000000..d2edee9 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Rulesets/RuleSuites/GetRule_suite_resultQueryParameterType.cs @@ -0,0 +1,28 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Orgs.Item.Rulesets.RuleSuites +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public enum GetRule_suite_resultQueryParameterType + #pragma warning restore CS1591 + { + [EnumMember(Value = "pass")] + #pragma warning disable CS1591 + Pass, + #pragma warning restore CS1591 + [EnumMember(Value = "fail")] + #pragma warning disable CS1591 + Fail, + #pragma warning restore CS1591 + [EnumMember(Value = "bypass")] + #pragma warning disable CS1591 + Bypass, + #pragma warning restore CS1591 + [EnumMember(Value = "all")] + #pragma warning disable CS1591 + All, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Rulesets/RuleSuites/GetTime_periodQueryParameterType.cs b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Rulesets/RuleSuites/GetTime_periodQueryParameterType.cs new file mode 100644 index 0000000..7ac4b0d --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Rulesets/RuleSuites/GetTime_periodQueryParameterType.cs @@ -0,0 +1,28 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Orgs.Item.Rulesets.RuleSuites +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public enum GetTime_periodQueryParameterType + #pragma warning restore CS1591 + { + [EnumMember(Value = "hour")] + #pragma warning disable CS1591 + Hour, + #pragma warning restore CS1591 + [EnumMember(Value = "day")] + #pragma warning disable CS1591 + Day, + #pragma warning restore CS1591 + [EnumMember(Value = "week")] + #pragma warning disable CS1591 + Week, + #pragma warning restore CS1591 + [EnumMember(Value = "month")] + #pragma warning disable CS1591 + Month, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Rulesets/RuleSuites/Item/WithRule_suite_ItemRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Rulesets/RuleSuites/Item/WithRule_suite_ItemRequestBuilder.cs new file mode 100644 index 0000000..cabdaec --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Rulesets/RuleSuites/Item/WithRule_suite_ItemRequestBuilder.cs @@ -0,0 +1,100 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Orgs.Item.Rulesets.RuleSuites.Item +{ + /// + /// Builds and executes requests for operations under \orgs\{org}\rulesets\rule-suites\{rule_suite_id} + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithRule_suite_ItemRequestBuilder : BaseRequestBuilder + { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public WithRule_suite_ItemRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/orgs/{org}/rulesets/rule-suites/{rule_suite_id}", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public WithRule_suite_ItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/orgs/{org}/rulesets/rule-suites/{rule_suite_id}", rawUrl) + { + } + /// + /// 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/organizations/managing-organization-settings/managing-rulesets-for-repositories-in-your-organization#viewing-insights-for-rulesets)." + /// API method documentation + /// + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 404 status code + /// When receiving a 500 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "404", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "500", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Models.RuleSuite.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// 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/organizations/managing-organization-settings/managing-rulesets-for-repositories-in-your-organization#viewing-insights-for-rulesets)." + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.Orgs.Item.Rulesets.RuleSuites.Item.WithRule_suite_ItemRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Orgs.Item.Rulesets.RuleSuites.Item.WithRule_suite_ItemRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithRule_suite_ItemRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Rulesets/RuleSuites/RuleSuitesRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Rulesets/RuleSuites/RuleSuitesRequestBuilder.cs new file mode 100644 index 0000000..5a3949a --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Rulesets/RuleSuites/RuleSuitesRequestBuilder.cs @@ -0,0 +1,198 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Ayllu.Github.Client.Orgs.Item.Rulesets.RuleSuites.Item; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Orgs.Item.Rulesets.RuleSuites +{ + /// + /// Builds and executes requests for operations under \orgs\{org}\rulesets\rule-suites + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class RuleSuitesRequestBuilder : BaseRequestBuilder + { + /// Gets an item from the Ayllu.Github.Client.orgs.item.rulesets.ruleSuites.item collection + /// The unique identifier of the rule suite result.To get this ID, you can use [GET /repos/{owner}/{repo}/rulesets/rule-suites](https://docs.github.com/rest/repos/rule-suites#list-repository-rule-suites)for repositories and [GET /orgs/{org}/rulesets/rule-suites](https://docs.github.com/rest/orgs/rule-suites#list-organization-rule-suites)for organizations. + /// A + public global::Ayllu.Github.Client.Orgs.Item.Rulesets.RuleSuites.Item.WithRule_suite_ItemRequestBuilder this[int position] + { + get + { + var urlTplParams = new Dictionary(PathParameters); + urlTplParams.Add("rule_suite_id", position); + return new global::Ayllu.Github.Client.Orgs.Item.Rulesets.RuleSuites.Item.WithRule_suite_ItemRequestBuilder(urlTplParams, RequestAdapter); + } + } + /// Gets an item from the Ayllu.Github.Client.orgs.item.rulesets.ruleSuites.item collection + /// The unique identifier of the rule suite result.To get this ID, you can use [GET /repos/{owner}/{repo}/rulesets/rule-suites](https://docs.github.com/rest/repos/rule-suites#list-repository-rule-suites)for repositories and [GET /orgs/{org}/rulesets/rule-suites](https://docs.github.com/rest/orgs/rule-suites#list-organization-rule-suites)for organizations. + /// A + [Obsolete("This indexer is deprecated and will be removed in the next major version. Use the one with the typed parameter instead.")] + public global::Ayllu.Github.Client.Orgs.Item.Rulesets.RuleSuites.Item.WithRule_suite_ItemRequestBuilder this[string position] + { + get + { + var urlTplParams = new Dictionary(PathParameters); + if (!string.IsNullOrWhiteSpace(position)) urlTplParams.Add("rule_suite_id", position); + return new global::Ayllu.Github.Client.Orgs.Item.Rulesets.RuleSuites.Item.WithRule_suite_ItemRequestBuilder(urlTplParams, RequestAdapter); + } + } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public RuleSuitesRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/orgs/{org}/rulesets/rule-suites{?actor_name*,page*,per_page*,ref*,repository_name*,rule_suite_result*,time_period*}", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public RuleSuitesRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/orgs/{org}/rulesets/rule-suites{?actor_name*,page*,per_page*,ref*,repository_name*,rule_suite_result*,time_period*}", rawUrl) + { + } + /// + /// Lists suites of rule evaluations at the organization level.For more information, see "[Managing rulesets for repositories in your organization](https://docs.github.com/organizations/managing-organization-settings/managing-rulesets-for-repositories-in-your-organization#viewing-insights-for-rulesets)." + /// API method documentation + /// + /// A List<global::Ayllu.Github.Client.Models.RuleSuites> + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 404 status code + /// When receiving a 500 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task?> GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task> GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "404", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "500", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + }; + var collectionResult = await RequestAdapter.SendCollectionAsync(requestInfo, global::Ayllu.Github.Client.Models.RuleSuites.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + return collectionResult?.AsList(); + } + /// + /// Lists suites of rule evaluations at the organization level.For more information, see "[Managing rulesets for repositories in your organization](https://docs.github.com/organizations/managing-organization-settings/managing-rulesets-for-repositories-in-your-organization#viewing-insights-for-rulesets)." + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.Orgs.Item.Rulesets.RuleSuites.RuleSuitesRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Orgs.Item.Rulesets.RuleSuites.RuleSuitesRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Lists suites of rule evaluations at the organization level.For more information, see "[Managing rulesets for repositories in your organization](https://docs.github.com/organizations/managing-organization-settings/managing-rulesets-for-repositories-in-your-organization#viewing-insights-for-rulesets)." + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class RuleSuitesRequestBuilderGetQueryParameters + { + /// The handle for the GitHub user account to filter on. When specified, only rule evaluations triggered by this actor will be returned. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("actor_name")] + public string? ActorName { get; set; } +#nullable restore +#else + [QueryParameter("actor_name")] + public string ActorName { get; set; } +#endif + /// The page number of the results to fetch. For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." + [QueryParameter("page")] + public int? Page { get; set; } + /// The number of results per page (max 100). For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." + [QueryParameter("per_page")] + public int? PerPage { get; set; } + /// The name of the ref. Cannot contain wildcard characters. Optionally prefix with `refs/heads/` to limit to branches or `refs/tags/` to limit to tags. Omit the prefix to search across all refs. When specified, only rule evaluations triggered for this ref will be returned. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("ref")] + public string? Ref { get; set; } +#nullable restore +#else + [QueryParameter("ref")] + public string Ref { get; set; } +#endif + /// The name of the repository to filter on. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("repository_name")] + public string? RepositoryName { get; set; } +#nullable restore +#else + [QueryParameter("repository_name")] + public string RepositoryName { get; set; } +#endif + /// The rule suite results to filter on. When specified, only suites with this result will be returned. + [Obsolete("This property is deprecated, use RuleSuiteResultAsGetRuleSuiteResultQueryParameterType instead")] +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("rule_suite_result")] + public string? RuleSuiteResult { get; set; } +#nullable restore +#else + [QueryParameter("rule_suite_result")] + public string RuleSuiteResult { get; set; } +#endif + /// The rule suite results to filter on. When specified, only suites with this result will be returned. + [QueryParameter("rule_suite_result")] + public global::Ayllu.Github.Client.Orgs.Item.Rulesets.RuleSuites.GetRule_suite_resultQueryParameterType? RuleSuiteResultAsGetRuleSuiteResultQueryParameterType { get; set; } + /// 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 rule suites that occurred in the past 7 days (168 hours). + [Obsolete("This property is deprecated, use TimePeriodAsGetTimePeriodQueryParameterType instead")] +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("time_period")] + public string? TimePeriod { get; set; } +#nullable restore +#else + [QueryParameter("time_period")] + public string TimePeriod { get; set; } +#endif + /// 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 rule suites that occurred in the past 7 days (168 hours). + [QueryParameter("time_period")] + public global::Ayllu.Github.Client.Orgs.Item.Rulesets.RuleSuites.GetTime_periodQueryParameterType? TimePeriodAsGetTimePeriodQueryParameterType { get; set; } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class RuleSuitesRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Rulesets/RulesetsPostRequestBody.cs b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Rulesets/RulesetsPostRequestBody.cs new file mode 100644 index 0000000..4cbe00d --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Rulesets/RulesetsPostRequestBody.cs @@ -0,0 +1,105 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Orgs.Item.Rulesets +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class RulesetsPostRequestBody : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The actors that can bypass the rules in this ruleset +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? BypassActors { get; set; } +#nullable restore +#else + public List BypassActors { get; set; } +#endif + /// Conditions for an organization ruleset.The branch and tag rulesets conditions object should contain both `repository_name` and `ref_name` properties, or both `repository_id` and `ref_name` properties, or both `repository_property` and `ref_name` properties.The push rulesets conditions object does not require the `ref_name` property.For repository policy rulesets, the conditions object should only contain the `repository_name`, the `repository_id`, or the `repository_property`. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.OrgRulesetConditions? Conditions { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.OrgRulesetConditions Conditions { get; set; } +#endif + /// The enforcement level of the ruleset. `evaluate` allows admins to test rules before enforcing them. Admins can view insights on the Rule Insights page (`evaluate` is only available with GitHub Enterprise). + public global::Ayllu.Github.Client.Models.RepositoryRuleEnforcement? Enforcement { get; set; } + /// The name of the ruleset. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Name { get; set; } +#nullable restore +#else + public string Name { get; set; } +#endif + /// An array of rules within the ruleset. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? Rules { get; set; } +#nullable restore +#else + public List Rules { get; set; } +#endif + /// The target of the ruleset + public global::Ayllu.Github.Client.Orgs.Item.Rulesets.RulesetsPostRequestBody_target? Target { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public RulesetsPostRequestBody() + { + AdditionalData = new Dictionary(); + Target = global::Ayllu.Github.Client.Orgs.Item.Rulesets.RulesetsPostRequestBody_target.Branch; + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Orgs.Item.Rulesets.RulesetsPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Orgs.Item.Rulesets.RulesetsPostRequestBody(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "bypass_actors", n => { BypassActors = n.GetCollectionOfObjectValues(global::Ayllu.Github.Client.Models.RepositoryRulesetBypassActor.CreateFromDiscriminatorValue)?.AsList(); } }, + { "conditions", n => { Conditions = n.GetObjectValue(global::Ayllu.Github.Client.Models.OrgRulesetConditions.CreateFromDiscriminatorValue); } }, + { "enforcement", n => { Enforcement = n.GetEnumValue(); } }, + { "name", n => { Name = n.GetStringValue(); } }, + { "rules", n => { Rules = n.GetCollectionOfObjectValues(global::Ayllu.Github.Client.Models.OrgRules.CreateFromDiscriminatorValue)?.AsList(); } }, + { "target", n => { Target = n.GetEnumValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteCollectionOfObjectValues("bypass_actors", BypassActors); + writer.WriteObjectValue("conditions", Conditions); + writer.WriteEnumValue("enforcement", Enforcement); + writer.WriteStringValue("name", Name); + writer.WriteCollectionOfObjectValues("rules", Rules); + writer.WriteEnumValue("target", Target); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Rulesets/RulesetsPostRequestBody_target.cs b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Rulesets/RulesetsPostRequestBody_target.cs new file mode 100644 index 0000000..efd20ba --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Rulesets/RulesetsPostRequestBody_target.cs @@ -0,0 +1,27 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Orgs.Item.Rulesets +{ + /// The target of the ruleset + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public enum RulesetsPostRequestBody_target + { + [EnumMember(Value = "branch")] + #pragma warning disable CS1591 + Branch, + #pragma warning restore CS1591 + [EnumMember(Value = "tag")] + #pragma warning disable CS1591 + Tag, + #pragma warning restore CS1591 + [EnumMember(Value = "push")] + #pragma warning disable CS1591 + Push, + #pragma warning restore CS1591 + [EnumMember(Value = "repository")] + #pragma warning disable CS1591 + Repository, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Rulesets/RulesetsRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Rulesets/RulesetsRequestBuilder.cs new file mode 100644 index 0000000..590acb0 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Rulesets/RulesetsRequestBuilder.cs @@ -0,0 +1,214 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Ayllu.Github.Client.Orgs.Item.Rulesets.Item; +using Ayllu.Github.Client.Orgs.Item.Rulesets.RuleSuites; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Orgs.Item.Rulesets +{ + /// + /// Builds and executes requests for operations under \orgs\{org}\rulesets + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class RulesetsRequestBuilder : BaseRequestBuilder + { + /// The ruleSuites property + public global::Ayllu.Github.Client.Orgs.Item.Rulesets.RuleSuites.RuleSuitesRequestBuilder RuleSuites + { + get => new global::Ayllu.Github.Client.Orgs.Item.Rulesets.RuleSuites.RuleSuitesRequestBuilder(PathParameters, RequestAdapter); + } + /// Gets an item from the Ayllu.Github.Client.orgs.item.rulesets.item collection + /// The ID of the ruleset. + /// A + public global::Ayllu.Github.Client.Orgs.Item.Rulesets.Item.WithRuleset_ItemRequestBuilder this[int position] + { + get + { + var urlTplParams = new Dictionary(PathParameters); + urlTplParams.Add("ruleset_id", position); + return new global::Ayllu.Github.Client.Orgs.Item.Rulesets.Item.WithRuleset_ItemRequestBuilder(urlTplParams, RequestAdapter); + } + } + /// Gets an item from the Ayllu.Github.Client.orgs.item.rulesets.item collection + /// The ID of the ruleset. + /// A + [Obsolete("This indexer is deprecated and will be removed in the next major version. Use the one with the typed parameter instead.")] + public global::Ayllu.Github.Client.Orgs.Item.Rulesets.Item.WithRuleset_ItemRequestBuilder this[string position] + { + get + { + var urlTplParams = new Dictionary(PathParameters); + if (!string.IsNullOrWhiteSpace(position)) urlTplParams.Add("ruleset_id", position); + return new global::Ayllu.Github.Client.Orgs.Item.Rulesets.Item.WithRuleset_ItemRequestBuilder(urlTplParams, RequestAdapter); + } + } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public RulesetsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/orgs/{org}/rulesets{?page*,per_page*,targets*}", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public RulesetsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/orgs/{org}/rulesets{?page*,per_page*,targets*}", rawUrl) + { + } + /// + /// Get all the repository rulesets for an organization. + /// API method documentation + /// + /// A List<global::Ayllu.Github.Client.Models.RepositoryRuleset> + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 404 status code + /// When receiving a 500 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task?> GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task> GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "404", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "500", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + }; + var collectionResult = await RequestAdapter.SendCollectionAsync(requestInfo, global::Ayllu.Github.Client.Models.RepositoryRuleset.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + return collectionResult?.AsList(); + } + /// + /// Create a repository ruleset for an organization. + /// API method documentation + /// + /// A + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 404 status code + /// When receiving a 500 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PostAsync(global::Ayllu.Github.Client.Orgs.Item.Rulesets.RulesetsPostRequestBody body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task PostAsync(global::Ayllu.Github.Client.Orgs.Item.Rulesets.RulesetsPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPostRequestInformation(body, requestConfiguration); + var errorMapping = new Dictionary> + { + { "404", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "500", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Models.RepositoryRuleset.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// Get all the repository rulesets for an organization. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Create a repository ruleset for an organization. + /// + /// A + /// The request body + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPostRequestInformation(global::Ayllu.Github.Client.Orgs.Item.Rulesets.RulesetsPostRequestBody body, Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToPostRequestInformation(global::Ayllu.Github.Client.Orgs.Item.Rulesets.RulesetsPostRequestBody body, Action> requestConfiguration = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.Orgs.Item.Rulesets.RulesetsRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Orgs.Item.Rulesets.RulesetsRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Get all the repository rulesets for an organization. + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class RulesetsRequestBuilderGetQueryParameters + { + /// The page number of the results to fetch. For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." + [QueryParameter("page")] + public int? Page { get; set; } + /// The number of results per page (max 100). For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." + [QueryParameter("per_page")] + public int? PerPage { get; set; } + /// A comma-separated list of rule targets to filter by.If provided, only rulesets that apply to the specified targets will be returned.For example, `branch,tag,push`. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("targets")] + public string? Targets { get; set; } +#nullable restore +#else + [QueryParameter("targets")] + public string Targets { get; set; } +#endif + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class RulesetsRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class RulesetsRequestBuilderPostRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Orgs/Item/SecretScanning/Alerts/AlertsRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/SecretScanning/Alerts/AlertsRequestBuilder.cs new file mode 100644 index 0000000..455d43e --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/SecretScanning/Alerts/AlertsRequestBuilder.cs @@ -0,0 +1,215 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Orgs.Item.SecretScanning.Alerts +{ + /// + /// Builds and executes requests for operations under \orgs\{org}\secret-scanning\alerts + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class AlertsRequestBuilder : BaseRequestBuilder + { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public AlertsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/orgs/{org}/secret-scanning/alerts{?after*,before*,direction*,hide_secret*,is_multi_repo*,is_publicly_leaked*,page*,per_page*,resolution*,secret_type*,sort*,state*,validity*}", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public AlertsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/orgs/{org}/secret-scanning/alerts{?after*,before*,direction*,hide_secret*,is_multi_repo*,is_publicly_leaked*,page*,per_page*,resolution*,secret_type*,sort*,state*,validity*}", rawUrl) + { + } + /// + /// 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. + /// API method documentation + /// + /// A List<global::Ayllu.Github.Client.Models.OrganizationSecretScanningAlert> + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 404 status code + /// When receiving a 503 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task?> GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task> GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "404", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "503", global::Ayllu.Github.Client.Models.Alerts503Error.CreateFromDiscriminatorValue }, + }; + var collectionResult = await RequestAdapter.SendCollectionAsync(requestInfo, global::Ayllu.Github.Client.Models.OrganizationSecretScanningAlert.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + return collectionResult?.AsList(); + } + /// + /// 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. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.Orgs.Item.SecretScanning.Alerts.AlertsRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Orgs.Item.SecretScanning.Alerts.AlertsRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// 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. + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class AlertsRequestBuilderGetQueryParameters + { + /// A cursor, as given in the [Link header](https://docs.github.com/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. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("after")] + public string? After { get; set; } +#nullable restore +#else + [QueryParameter("after")] + public string After { get; set; } +#endif + /// A cursor, as given in the [Link header](https://docs.github.com/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. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("before")] + public string? Before { get; set; } +#nullable restore +#else + [QueryParameter("before")] + public string Before { get; set; } +#endif + /// The direction to sort the results by. + [Obsolete("This property is deprecated, use DirectionAsGetDirectionQueryParameterType instead")] +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("direction")] + public string? Direction { get; set; } +#nullable restore +#else + [QueryParameter("direction")] + public string Direction { get; set; } +#endif + /// The direction to sort the results by. + [QueryParameter("direction")] + public global::Ayllu.Github.Client.Orgs.Item.SecretScanning.Alerts.GetDirectionQueryParameterType? DirectionAsGetDirectionQueryParameterType { get; set; } + /// A boolean value representing whether or not to hide literal secrets in the results. + [QueryParameter("hide_secret")] + public bool? HideSecret { get; set; } + /// A boolean value representing whether or not to filter alerts by the multi-repo tag being present. + [QueryParameter("is_multi_repo")] + public bool? IsMultiRepo { get; set; } + /// A boolean value representing whether or not to filter alerts by the publicly-leaked tag being present. + [QueryParameter("is_publicly_leaked")] + public bool? IsPubliclyLeaked { get; set; } + /// The page number of the results to fetch. For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." + [QueryParameter("page")] + public int? Page { get; set; } + /// The number of results per page (max 100). For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." + [QueryParameter("per_page")] + public int? PerPage { get; set; } + /// 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`. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("resolution")] + public string? Resolution { get; set; } +#nullable restore +#else + [QueryParameter("resolution")] + public string Resolution { get; set; } +#endif + /// A comma-separated list of secret types to return. All default secret patterns are returned. To return generic patterns, pass the token name(s) in the parameter. See "[Supported secret scanning patterns](https://docs.github.com/code-security/secret-scanning/introduction/supported-secret-scanning-patterns#supported-secrets)" for a complete list of secret types. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("secret_type")] + public string? SecretType { get; set; } +#nullable restore +#else + [QueryParameter("secret_type")] + public string SecretType { get; set; } +#endif + /// The property to sort the results by. `created` means when the alert was created. `updated` means when the alert was updated or resolved. + [Obsolete("This property is deprecated, use SortAsGetSortQueryParameterType instead")] +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("sort")] + public string? Sort { get; set; } +#nullable restore +#else + [QueryParameter("sort")] + public string Sort { get; set; } +#endif + /// The property to sort the results by. `created` means when the alert was created. `updated` means when the alert was updated or resolved. + [QueryParameter("sort")] + public global::Ayllu.Github.Client.Orgs.Item.SecretScanning.Alerts.GetSortQueryParameterType? SortAsGetSortQueryParameterType { get; set; } + /// Set to `open` or `resolved` to only list secret scanning alerts in a specific state. + [Obsolete("This property is deprecated, use StateAsGetStateQueryParameterType instead")] +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("state")] + public string? State { get; set; } +#nullable restore +#else + [QueryParameter("state")] + public string State { get; set; } +#endif + /// Set to `open` or `resolved` to only list secret scanning alerts in a specific state. + [QueryParameter("state")] + public global::Ayllu.Github.Client.Orgs.Item.SecretScanning.Alerts.GetStateQueryParameterType? StateAsGetStateQueryParameterType { get; set; } + /// 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`. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("validity")] + public string? Validity { get; set; } +#nullable restore +#else + [QueryParameter("validity")] + public string Validity { get; set; } +#endif + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class AlertsRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Orgs/Item/SecretScanning/Alerts/GetDirectionQueryParameterType.cs b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/SecretScanning/Alerts/GetDirectionQueryParameterType.cs new file mode 100644 index 0000000..7b7abe2 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/SecretScanning/Alerts/GetDirectionQueryParameterType.cs @@ -0,0 +1,20 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Orgs.Item.SecretScanning.Alerts +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public enum GetDirectionQueryParameterType + #pragma warning restore CS1591 + { + [EnumMember(Value = "asc")] + #pragma warning disable CS1591 + Asc, + #pragma warning restore CS1591 + [EnumMember(Value = "desc")] + #pragma warning disable CS1591 + Desc, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Orgs/Item/SecretScanning/Alerts/GetSortQueryParameterType.cs b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/SecretScanning/Alerts/GetSortQueryParameterType.cs new file mode 100644 index 0000000..2eccec2 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/SecretScanning/Alerts/GetSortQueryParameterType.cs @@ -0,0 +1,20 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Orgs.Item.SecretScanning.Alerts +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public enum GetSortQueryParameterType + #pragma warning restore CS1591 + { + [EnumMember(Value = "created")] + #pragma warning disable CS1591 + Created, + #pragma warning restore CS1591 + [EnumMember(Value = "updated")] + #pragma warning disable CS1591 + Updated, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Orgs/Item/SecretScanning/Alerts/GetStateQueryParameterType.cs b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/SecretScanning/Alerts/GetStateQueryParameterType.cs new file mode 100644 index 0000000..131cd3b --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/SecretScanning/Alerts/GetStateQueryParameterType.cs @@ -0,0 +1,20 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Orgs.Item.SecretScanning.Alerts +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public enum GetStateQueryParameterType + #pragma warning restore CS1591 + { + [EnumMember(Value = "open")] + #pragma warning disable CS1591 + Open, + #pragma warning restore CS1591 + [EnumMember(Value = "resolved")] + #pragma warning disable CS1591 + Resolved, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Orgs/Item/SecretScanning/PatternConfigurations/PatternConfigurationsPatchRequestBody.cs b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/SecretScanning/PatternConfigurations/PatternConfigurationsPatchRequestBody.cs new file mode 100644 index 0000000..363d2bd --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/SecretScanning/PatternConfigurations/PatternConfigurationsPatchRequestBody.cs @@ -0,0 +1,85 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Orgs.Item.SecretScanning.PatternConfigurations +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class PatternConfigurationsPatchRequestBody : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// Pattern settings for custom patterns. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? CustomPatternSettings { get; set; } +#nullable restore +#else + public List CustomPatternSettings { get; set; } +#endif + /// The version of the entity. This is used to confirm you're updating the current version of the entity and mitigate unintentionally overriding someone else's update. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? PatternConfigVersion { get; set; } +#nullable restore +#else + public string PatternConfigVersion { get; set; } +#endif + /// Pattern settings for provider patterns. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? ProviderPatternSettings { get; set; } +#nullable restore +#else + public List ProviderPatternSettings { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public PatternConfigurationsPatchRequestBody() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Orgs.Item.SecretScanning.PatternConfigurations.PatternConfigurationsPatchRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Orgs.Item.SecretScanning.PatternConfigurations.PatternConfigurationsPatchRequestBody(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "custom_pattern_settings", n => { CustomPatternSettings = n.GetCollectionOfObjectValues(global::Ayllu.Github.Client.Orgs.Item.SecretScanning.PatternConfigurations.PatternConfigurationsPatchRequestBody_custom_pattern_settings.CreateFromDiscriminatorValue)?.AsList(); } }, + { "pattern_config_version", n => { PatternConfigVersion = n.GetStringValue(); } }, + { "provider_pattern_settings", n => { ProviderPatternSettings = n.GetCollectionOfObjectValues(global::Ayllu.Github.Client.Orgs.Item.SecretScanning.PatternConfigurations.PatternConfigurationsPatchRequestBody_provider_pattern_settings.CreateFromDiscriminatorValue)?.AsList(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteCollectionOfObjectValues("custom_pattern_settings", CustomPatternSettings); + writer.WriteStringValue("pattern_config_version", PatternConfigVersion); + writer.WriteCollectionOfObjectValues("provider_pattern_settings", ProviderPatternSettings); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Orgs/Item/SecretScanning/PatternConfigurations/PatternConfigurationsPatchRequestBody_custom_pattern_settings.cs b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/SecretScanning/PatternConfigurations/PatternConfigurationsPatchRequestBody_custom_pattern_settings.cs new file mode 100644 index 0000000..289a62e --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/SecretScanning/PatternConfigurations/PatternConfigurationsPatchRequestBody_custom_pattern_settings.cs @@ -0,0 +1,79 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Orgs.Item.SecretScanning.PatternConfigurations +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class PatternConfigurationsPatchRequestBody_custom_pattern_settings : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The version of the entity. This is used to confirm you're updating the current version of the entity and mitigate unintentionally overriding someone else's update. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? CustomPatternVersion { get; set; } +#nullable restore +#else + public string CustomPatternVersion { get; set; } +#endif + /// Push protection setting to set for the pattern. + public global::Ayllu.Github.Client.Orgs.Item.SecretScanning.PatternConfigurations.PatternConfigurationsPatchRequestBody_custom_pattern_settings_push_protection_setting? PushProtectionSetting { get; set; } + /// The ID of the pattern to configure. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? TokenType { get; set; } +#nullable restore +#else + public string TokenType { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public PatternConfigurationsPatchRequestBody_custom_pattern_settings() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Orgs.Item.SecretScanning.PatternConfigurations.PatternConfigurationsPatchRequestBody_custom_pattern_settings CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Orgs.Item.SecretScanning.PatternConfigurations.PatternConfigurationsPatchRequestBody_custom_pattern_settings(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "custom_pattern_version", n => { CustomPatternVersion = n.GetStringValue(); } }, + { "push_protection_setting", n => { PushProtectionSetting = n.GetEnumValue(); } }, + { "token_type", n => { TokenType = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("custom_pattern_version", CustomPatternVersion); + writer.WriteEnumValue("push_protection_setting", PushProtectionSetting); + writer.WriteStringValue("token_type", TokenType); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Orgs/Item/SecretScanning/PatternConfigurations/PatternConfigurationsPatchRequestBody_custom_pattern_settings_push_protection_setting.cs b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/SecretScanning/PatternConfigurations/PatternConfigurationsPatchRequestBody_custom_pattern_settings_push_protection_setting.cs new file mode 100644 index 0000000..4b9f9eb --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/SecretScanning/PatternConfigurations/PatternConfigurationsPatchRequestBody_custom_pattern_settings_push_protection_setting.cs @@ -0,0 +1,19 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Orgs.Item.SecretScanning.PatternConfigurations +{ + /// Push protection setting to set for the pattern. + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public enum PatternConfigurationsPatchRequestBody_custom_pattern_settings_push_protection_setting + { + [EnumMember(Value = "disabled")] + #pragma warning disable CS1591 + Disabled, + #pragma warning restore CS1591 + [EnumMember(Value = "enabled")] + #pragma warning disable CS1591 + Enabled, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Orgs/Item/SecretScanning/PatternConfigurations/PatternConfigurationsPatchRequestBody_provider_pattern_settings.cs b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/SecretScanning/PatternConfigurations/PatternConfigurationsPatchRequestBody_provider_pattern_settings.cs new file mode 100644 index 0000000..64ab0a6 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/SecretScanning/PatternConfigurations/PatternConfigurationsPatchRequestBody_provider_pattern_settings.cs @@ -0,0 +1,69 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Orgs.Item.SecretScanning.PatternConfigurations +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class PatternConfigurationsPatchRequestBody_provider_pattern_settings : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// Push protection setting to set for the pattern. + public global::Ayllu.Github.Client.Orgs.Item.SecretScanning.PatternConfigurations.PatternConfigurationsPatchRequestBody_provider_pattern_settings_push_protection_setting? PushProtectionSetting { get; set; } + /// The ID of the pattern to configure. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? TokenType { get; set; } +#nullable restore +#else + public string TokenType { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public PatternConfigurationsPatchRequestBody_provider_pattern_settings() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Orgs.Item.SecretScanning.PatternConfigurations.PatternConfigurationsPatchRequestBody_provider_pattern_settings CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Orgs.Item.SecretScanning.PatternConfigurations.PatternConfigurationsPatchRequestBody_provider_pattern_settings(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "push_protection_setting", n => { PushProtectionSetting = n.GetEnumValue(); } }, + { "token_type", n => { TokenType = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteEnumValue("push_protection_setting", PushProtectionSetting); + writer.WriteStringValue("token_type", TokenType); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Orgs/Item/SecretScanning/PatternConfigurations/PatternConfigurationsPatchRequestBody_provider_pattern_settings_push_protection_setting.cs b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/SecretScanning/PatternConfigurations/PatternConfigurationsPatchRequestBody_provider_pattern_settings_push_protection_setting.cs new file mode 100644 index 0000000..bfa0cef --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/SecretScanning/PatternConfigurations/PatternConfigurationsPatchRequestBody_provider_pattern_settings_push_protection_setting.cs @@ -0,0 +1,23 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Orgs.Item.SecretScanning.PatternConfigurations +{ + /// Push protection setting to set for the pattern. + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public enum PatternConfigurationsPatchRequestBody_provider_pattern_settings_push_protection_setting + { + [EnumMember(Value = "not-set")] + #pragma warning disable CS1591 + NotSet, + #pragma warning restore CS1591 + [EnumMember(Value = "disabled")] + #pragma warning disable CS1591 + Disabled, + #pragma warning restore CS1591 + [EnumMember(Value = "enabled")] + #pragma warning disable CS1591 + Enabled, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Orgs/Item/SecretScanning/PatternConfigurations/PatternConfigurationsPatchResponse.cs b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/SecretScanning/PatternConfigurations/PatternConfigurationsPatchResponse.cs new file mode 100644 index 0000000..5b6116b --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/SecretScanning/PatternConfigurations/PatternConfigurationsPatchResponse.cs @@ -0,0 +1,65 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Orgs.Item.SecretScanning.PatternConfigurations +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class PatternConfigurationsPatchResponse : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The updated pattern configuration version. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? PatternConfigVersion { get; set; } +#nullable restore +#else + public string PatternConfigVersion { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public PatternConfigurationsPatchResponse() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Orgs.Item.SecretScanning.PatternConfigurations.PatternConfigurationsPatchResponse CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Orgs.Item.SecretScanning.PatternConfigurations.PatternConfigurationsPatchResponse(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "pattern_config_version", n => { PatternConfigVersion = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("pattern_config_version", PatternConfigVersion); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Orgs/Item/SecretScanning/PatternConfigurations/PatternConfigurationsRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/SecretScanning/PatternConfigurations/PatternConfigurationsRequestBuilder.cs new file mode 100644 index 0000000..62f6f18 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/SecretScanning/PatternConfigurations/PatternConfigurationsRequestBuilder.cs @@ -0,0 +1,199 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Orgs.Item.SecretScanning.PatternConfigurations +{ + /// + /// Builds and executes requests for operations under \orgs\{org}\secret-scanning\pattern-configurations + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class PatternConfigurationsRequestBuilder : BaseRequestBuilder + { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public PatternConfigurationsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/orgs/{org}/secret-scanning/pattern-configurations", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public PatternConfigurationsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/orgs/{org}/secret-scanning/pattern-configurations", rawUrl) + { + } + /// + /// Lists the secret scanning pattern configurations for an organization.Personal access tokens (classic) need the `write:org` scope to use this endpoint. + /// API method documentation + /// + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 403 status code + /// When receiving a 404 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "403", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "404", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Models.SecretScanningPatternConfiguration.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// Updates the secret scanning pattern configurations for an organization.Personal access tokens (classic) need the `write:org` scope to use this endpoint. + /// API method documentation + /// + /// A + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 400 status code + /// When receiving a 403 status code + /// When receiving a 404 status code + /// When receiving a 409 status code + /// When receiving a 422 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PatchAsPatternConfigurationsPatchResponseAsync(global::Ayllu.Github.Client.Orgs.Item.SecretScanning.PatternConfigurations.PatternConfigurationsPatchRequestBody body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task PatchAsPatternConfigurationsPatchResponseAsync(global::Ayllu.Github.Client.Orgs.Item.SecretScanning.PatternConfigurations.PatternConfigurationsPatchRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPatchRequestInformation(body, requestConfiguration); + var errorMapping = new Dictionary> + { + { "400", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "403", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "404", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "409", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "422", global::Ayllu.Github.Client.Models.ValidationError.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Orgs.Item.SecretScanning.PatternConfigurations.PatternConfigurationsPatchResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// Updates the secret scanning pattern configurations for an organization.Personal access tokens (classic) need the `write:org` scope to use this endpoint. + /// API method documentation + /// + /// A + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 400 status code + /// When receiving a 403 status code + /// When receiving a 404 status code + /// When receiving a 409 status code + /// When receiving a 422 status code + [Obsolete("This method is obsolete. Use PatchAsPatternConfigurationsPatchResponseAsync instead.")] +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PatchAsync(global::Ayllu.Github.Client.Orgs.Item.SecretScanning.PatternConfigurations.PatternConfigurationsPatchRequestBody body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task PatchAsync(global::Ayllu.Github.Client.Orgs.Item.SecretScanning.PatternConfigurations.PatternConfigurationsPatchRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPatchRequestInformation(body, requestConfiguration); + var errorMapping = new Dictionary> + { + { "400", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "403", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "404", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "409", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "422", global::Ayllu.Github.Client.Models.ValidationError.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Orgs.Item.SecretScanning.PatternConfigurations.PatternConfigurationsResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// Lists the secret scanning pattern configurations for an organization.Personal access tokens (classic) need the `write:org` scope to use this endpoint. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Updates the secret scanning pattern configurations for an organization.Personal access tokens (classic) need the `write:org` scope to use this endpoint. + /// + /// A + /// The request body + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPatchRequestInformation(global::Ayllu.Github.Client.Orgs.Item.SecretScanning.PatternConfigurations.PatternConfigurationsPatchRequestBody body, Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToPatchRequestInformation(global::Ayllu.Github.Client.Orgs.Item.SecretScanning.PatternConfigurations.PatternConfigurationsPatchRequestBody body, Action> requestConfiguration = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.Orgs.Item.SecretScanning.PatternConfigurations.PatternConfigurationsRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Orgs.Item.SecretScanning.PatternConfigurations.PatternConfigurationsRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class PatternConfigurationsRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class PatternConfigurationsRequestBuilderPatchRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Orgs/Item/SecretScanning/PatternConfigurations/PatternConfigurationsResponse.cs b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/SecretScanning/PatternConfigurations/PatternConfigurationsResponse.cs new file mode 100644 index 0000000..a393415 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/SecretScanning/PatternConfigurations/PatternConfigurationsResponse.cs @@ -0,0 +1,28 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Orgs.Item.SecretScanning.PatternConfigurations +{ + [Obsolete("This class is obsolete. Use PatternConfigurationsPatchResponse instead.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class PatternConfigurationsResponse : global::Ayllu.Github.Client.Orgs.Item.SecretScanning.PatternConfigurations.PatternConfigurationsPatchResponse, IParsable + #pragma warning restore CS1591 + { + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static new global::Ayllu.Github.Client.Orgs.Item.SecretScanning.PatternConfigurations.PatternConfigurationsResponse CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Orgs.Item.SecretScanning.PatternConfigurations.PatternConfigurationsResponse(); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Orgs/Item/SecretScanning/SecretScanningRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/SecretScanning/SecretScanningRequestBuilder.cs new file mode 100644 index 0000000..fd40851 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/SecretScanning/SecretScanningRequestBuilder.cs @@ -0,0 +1,47 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Orgs.Item.SecretScanning.Alerts; +using Ayllu.Github.Client.Orgs.Item.SecretScanning.PatternConfigurations; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System; +namespace Ayllu.Github.Client.Orgs.Item.SecretScanning +{ + /// + /// Builds and executes requests for operations under \orgs\{org}\secret-scanning + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class SecretScanningRequestBuilder : BaseRequestBuilder + { + /// The alerts property + public global::Ayllu.Github.Client.Orgs.Item.SecretScanning.Alerts.AlertsRequestBuilder Alerts + { + get => new global::Ayllu.Github.Client.Orgs.Item.SecretScanning.Alerts.AlertsRequestBuilder(PathParameters, RequestAdapter); + } + /// The patternConfigurations property + public global::Ayllu.Github.Client.Orgs.Item.SecretScanning.PatternConfigurations.PatternConfigurationsRequestBuilder PatternConfigurations + { + get => new global::Ayllu.Github.Client.Orgs.Item.SecretScanning.PatternConfigurations.PatternConfigurationsRequestBuilder(PathParameters, RequestAdapter); + } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public SecretScanningRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/orgs/{org}/secret-scanning", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public SecretScanningRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/orgs/{org}/secret-scanning", rawUrl) + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Orgs/Item/SecurityAdvisories/GetDirectionQueryParameterType.cs b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/SecurityAdvisories/GetDirectionQueryParameterType.cs new file mode 100644 index 0000000..51f972d --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/SecurityAdvisories/GetDirectionQueryParameterType.cs @@ -0,0 +1,20 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Orgs.Item.SecurityAdvisories +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public enum GetDirectionQueryParameterType + #pragma warning restore CS1591 + { + [EnumMember(Value = "asc")] + #pragma warning disable CS1591 + Asc, + #pragma warning restore CS1591 + [EnumMember(Value = "desc")] + #pragma warning disable CS1591 + Desc, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Orgs/Item/SecurityAdvisories/GetSortQueryParameterType.cs b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/SecurityAdvisories/GetSortQueryParameterType.cs new file mode 100644 index 0000000..ea1aa43 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/SecurityAdvisories/GetSortQueryParameterType.cs @@ -0,0 +1,24 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Orgs.Item.SecurityAdvisories +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public enum GetSortQueryParameterType + #pragma warning restore CS1591 + { + [EnumMember(Value = "created")] + #pragma warning disable CS1591 + Created, + #pragma warning restore CS1591 + [EnumMember(Value = "updated")] + #pragma warning disable CS1591 + Updated, + #pragma warning restore CS1591 + [EnumMember(Value = "published")] + #pragma warning disable CS1591 + Published, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Orgs/Item/SecurityAdvisories/GetStateQueryParameterType.cs b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/SecurityAdvisories/GetStateQueryParameterType.cs new file mode 100644 index 0000000..8050922 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/SecurityAdvisories/GetStateQueryParameterType.cs @@ -0,0 +1,28 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Orgs.Item.SecurityAdvisories +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public enum GetStateQueryParameterType + #pragma warning restore CS1591 + { + [EnumMember(Value = "triage")] + #pragma warning disable CS1591 + Triage, + #pragma warning restore CS1591 + [EnumMember(Value = "draft")] + #pragma warning disable CS1591 + Draft, + #pragma warning restore CS1591 + [EnumMember(Value = "published")] + #pragma warning disable CS1591 + Published, + #pragma warning restore CS1591 + [EnumMember(Value = "closed")] + #pragma warning disable CS1591 + Closed, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Orgs/Item/SecurityAdvisories/SecurityAdvisoriesRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/SecurityAdvisories/SecurityAdvisoriesRequestBuilder.cs new file mode 100644 index 0000000..2c3993e --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/SecurityAdvisories/SecurityAdvisoriesRequestBuilder.cs @@ -0,0 +1,173 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Orgs.Item.SecurityAdvisories +{ + /// + /// Builds and executes requests for operations under \orgs\{org}\security-advisories + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class SecurityAdvisoriesRequestBuilder : BaseRequestBuilder + { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public SecurityAdvisoriesRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/orgs/{org}/security-advisories{?after*,before*,direction*,per_page*,sort*,state*}", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public SecurityAdvisoriesRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/orgs/{org}/security-advisories{?after*,before*,direction*,per_page*,sort*,state*}", rawUrl) + { + } + /// + /// 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. + /// API method documentation + /// + /// A List<global::Ayllu.Github.Client.Models.RepositoryAdvisory> + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 400 status code + /// When receiving a 404 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task?> GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task> GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "400", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "404", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + }; + var collectionResult = await RequestAdapter.SendCollectionAsync(requestInfo, global::Ayllu.Github.Client.Models.RepositoryAdvisory.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + return collectionResult?.AsList(); + } + /// + /// 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. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.Orgs.Item.SecurityAdvisories.SecurityAdvisoriesRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Orgs.Item.SecurityAdvisories.SecurityAdvisoriesRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// 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. + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class SecurityAdvisoriesRequestBuilderGetQueryParameters + { + /// A cursor, as given in the [Link header](https://docs.github.com/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/rest/using-the-rest-api/using-pagination-in-the-rest-api)." +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("after")] + public string? After { get; set; } +#nullable restore +#else + [QueryParameter("after")] + public string After { get; set; } +#endif + /// A cursor, as given in the [Link header](https://docs.github.com/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/rest/using-the-rest-api/using-pagination-in-the-rest-api)." +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("before")] + public string? Before { get; set; } +#nullable restore +#else + [QueryParameter("before")] + public string Before { get; set; } +#endif + /// The direction to sort the results by. + [Obsolete("This property is deprecated, use DirectionAsGetDirectionQueryParameterType instead")] +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("direction")] + public string? Direction { get; set; } +#nullable restore +#else + [QueryParameter("direction")] + public string Direction { get; set; } +#endif + /// The direction to sort the results by. + [QueryParameter("direction")] + public global::Ayllu.Github.Client.Orgs.Item.SecurityAdvisories.GetDirectionQueryParameterType? DirectionAsGetDirectionQueryParameterType { get; set; } + /// The number of advisories to return per page. For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." + [QueryParameter("per_page")] + public int? PerPage { get; set; } + /// The property to sort the results by. + [Obsolete("This property is deprecated, use SortAsGetSortQueryParameterType instead")] +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("sort")] + public string? Sort { get; set; } +#nullable restore +#else + [QueryParameter("sort")] + public string Sort { get; set; } +#endif + /// The property to sort the results by. + [QueryParameter("sort")] + public global::Ayllu.Github.Client.Orgs.Item.SecurityAdvisories.GetSortQueryParameterType? SortAsGetSortQueryParameterType { get; set; } + /// Filter by the state of the repository advisories. Only advisories of this state will be returned. + [Obsolete("This property is deprecated, use StateAsGetStateQueryParameterType instead")] +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("state")] + public string? State { get; set; } +#nullable restore +#else + [QueryParameter("state")] + public string State { get; set; } +#endif + /// Filter by the state of the repository advisories. Only advisories of this state will be returned. + [QueryParameter("state")] + public global::Ayllu.Github.Client.Orgs.Item.SecurityAdvisories.GetStateQueryParameterType? StateAsGetStateQueryParameterType { get; set; } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class SecurityAdvisoriesRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Orgs/Item/SecurityManagers/SecurityManagersRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/SecurityManagers/SecurityManagersRequestBuilder.cs new file mode 100644 index 0000000..ce5998a --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/SecurityManagers/SecurityManagersRequestBuilder.cs @@ -0,0 +1,104 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Ayllu.Github.Client.Orgs.Item.SecurityManagers.Teams; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Orgs.Item.SecurityManagers +{ + /// + /// Builds and executes requests for operations under \orgs\{org}\security-managers + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class SecurityManagersRequestBuilder : BaseRequestBuilder + { + /// The teams property + [Obsolete("")] + public global::Ayllu.Github.Client.Orgs.Item.SecurityManagers.Teams.TeamsRequestBuilder Teams + { + get => new global::Ayllu.Github.Client.Orgs.Item.SecurityManagers.Teams.TeamsRequestBuilder(PathParameters, RequestAdapter); + } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public SecurityManagersRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/orgs/{org}/security-managers", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public SecurityManagersRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/orgs/{org}/security-managers", rawUrl) + { + } + /// + /// > [!WARNING]> **Closing down notice:** This operation is closing down and will be removed starting January 1, 2026. Please use the "[Organization Roles](https://docs.github.com/rest/orgs/organization-roles)" endpoints instead. + /// API method documentation + /// + /// A List<global::Ayllu.Github.Client.Models.TeamSimple> + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + [Obsolete("")] +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task?> GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task> GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var collectionResult = await RequestAdapter.SendCollectionAsync(requestInfo, global::Ayllu.Github.Client.Models.TeamSimple.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false); + return collectionResult?.AsList(); + } + /// + /// > [!WARNING]> **Closing down notice:** This operation is closing down and will be removed starting January 1, 2026. Please use the "[Organization Roles](https://docs.github.com/rest/orgs/organization-roles)" endpoints instead. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. + [Obsolete("")] +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + [Obsolete("")] + public global::Ayllu.Github.Client.Orgs.Item.SecurityManagers.SecurityManagersRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Orgs.Item.SecurityManagers.SecurityManagersRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class SecurityManagersRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Orgs/Item/SecurityManagers/Teams/Item/WithTeam_slugItemRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/SecurityManagers/Teams/Item/WithTeam_slugItemRequestBuilder.cs new file mode 100644 index 0000000..6583e12 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/SecurityManagers/Teams/Item/WithTeam_slugItemRequestBuilder.cs @@ -0,0 +1,139 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Orgs.Item.SecurityManagers.Teams.Item +{ + /// + /// Builds and executes requests for operations under \orgs\{org}\security-managers\teams\{team_slug} + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithTeam_slugItemRequestBuilder : BaseRequestBuilder + { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public WithTeam_slugItemRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/orgs/{org}/security-managers/teams/{team_slug}", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public WithTeam_slugItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/orgs/{org}/security-managers/teams/{team_slug}", rawUrl) + { + } + /// + /// > [!WARNING]> **Closing down notice:** This operation is closing down and will be removed starting January 1, 2026. Please use the "[Organization Roles](https://docs.github.com/rest/orgs/organization-roles)" endpoints instead. + /// API method documentation + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + [Obsolete("")] +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task DeleteAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task DeleteAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToDeleteRequestInformation(requestConfiguration); + await RequestAdapter.SendNoContentAsync(requestInfo, default, cancellationToken).ConfigureAwait(false); + } + /// + /// > [!WARNING]> **Closing down notice:** This operation is closing down and will be removed starting January 1, 2026. Please use the "[Organization Roles](https://docs.github.com/rest/orgs/organization-roles)" endpoints instead. + /// API method documentation + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + [Obsolete("")] +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PutAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task PutAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToPutRequestInformation(requestConfiguration); + await RequestAdapter.SendNoContentAsync(requestInfo, default, cancellationToken).ConfigureAwait(false); + } + /// + /// > [!WARNING]> **Closing down notice:** This operation is closing down and will be removed starting January 1, 2026. Please use the "[Organization Roles](https://docs.github.com/rest/orgs/organization-roles)" endpoints instead. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. + [Obsolete("")] +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToDeleteRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToDeleteRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.DELETE, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + return requestInfo; + } + /// + /// > [!WARNING]> **Closing down notice:** This operation is closing down and will be removed starting January 1, 2026. Please use the "[Organization Roles](https://docs.github.com/rest/orgs/organization-roles)" endpoints instead. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. + [Obsolete("")] +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPutRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToPutRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.PUT, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + [Obsolete("")] + public global::Ayllu.Github.Client.Orgs.Item.SecurityManagers.Teams.Item.WithTeam_slugItemRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Orgs.Item.SecurityManagers.Teams.Item.WithTeam_slugItemRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithTeam_slugItemRequestBuilderDeleteRequestConfiguration : RequestConfiguration + { + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithTeam_slugItemRequestBuilderPutRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Orgs/Item/SecurityManagers/Teams/TeamsRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/SecurityManagers/Teams/TeamsRequestBuilder.cs new file mode 100644 index 0000000..a11b582 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/SecurityManagers/Teams/TeamsRequestBuilder.cs @@ -0,0 +1,49 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Orgs.Item.SecurityManagers.Teams.Item; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System; +namespace Ayllu.Github.Client.Orgs.Item.SecurityManagers.Teams +{ + /// + /// Builds and executes requests for operations under \orgs\{org}\security-managers\teams + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class TeamsRequestBuilder : BaseRequestBuilder + { + /// Gets an item from the Ayllu.Github.Client.orgs.item.securityManagers.teams.item collection + /// The slug of the team name. + /// A + [Obsolete("")] + public global::Ayllu.Github.Client.Orgs.Item.SecurityManagers.Teams.Item.WithTeam_slugItemRequestBuilder this[string position] + { + get + { + var urlTplParams = new Dictionary(PathParameters); + urlTplParams.Add("team_slug", position); + return new global::Ayllu.Github.Client.Orgs.Item.SecurityManagers.Teams.Item.WithTeam_slugItemRequestBuilder(urlTplParams, RequestAdapter); + } + } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public TeamsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/orgs/{org}/security-managers/teams", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public TeamsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/orgs/{org}/security-managers/teams", rawUrl) + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Settings/Billing/Actions/ActionsRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Settings/Billing/Actions/ActionsRequestBuilder.cs new file mode 100644 index 0000000..c4e858c --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Settings/Billing/Actions/ActionsRequestBuilder.cs @@ -0,0 +1,93 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Orgs.Item.Settings.Billing.Actions +{ + /// + /// Builds and executes requests for operations under \orgs\{org}\settings\billing\actions + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class ActionsRequestBuilder : BaseRequestBuilder + { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public ActionsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/orgs/{org}/settings/billing/actions", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public ActionsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/orgs/{org}/settings/billing/actions", rawUrl) + { + } + /// + /// 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/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. + /// API method documentation + /// + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Models.ActionsBillingUsage.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false); + } + /// + /// 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/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. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.Orgs.Item.Settings.Billing.Actions.ActionsRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Orgs.Item.Settings.Billing.Actions.ActionsRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class ActionsRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Settings/Billing/BillingRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Settings/Billing/BillingRequestBuilder.cs new file mode 100644 index 0000000..c399cb9 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Settings/Billing/BillingRequestBuilder.cs @@ -0,0 +1,53 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Orgs.Item.Settings.Billing.Actions; +using Ayllu.Github.Client.Orgs.Item.Settings.Billing.Packages; +using Ayllu.Github.Client.Orgs.Item.Settings.Billing.SharedStorage; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System; +namespace Ayllu.Github.Client.Orgs.Item.Settings.Billing +{ + /// + /// Builds and executes requests for operations under \orgs\{org}\settings\billing + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class BillingRequestBuilder : BaseRequestBuilder + { + /// The actions property + public global::Ayllu.Github.Client.Orgs.Item.Settings.Billing.Actions.ActionsRequestBuilder Actions + { + get => new global::Ayllu.Github.Client.Orgs.Item.Settings.Billing.Actions.ActionsRequestBuilder(PathParameters, RequestAdapter); + } + /// The packages property + public global::Ayllu.Github.Client.Orgs.Item.Settings.Billing.Packages.PackagesRequestBuilder Packages + { + get => new global::Ayllu.Github.Client.Orgs.Item.Settings.Billing.Packages.PackagesRequestBuilder(PathParameters, RequestAdapter); + } + /// The sharedStorage property + public global::Ayllu.Github.Client.Orgs.Item.Settings.Billing.SharedStorage.SharedStorageRequestBuilder SharedStorage + { + get => new global::Ayllu.Github.Client.Orgs.Item.Settings.Billing.SharedStorage.SharedStorageRequestBuilder(PathParameters, RequestAdapter); + } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public BillingRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/orgs/{org}/settings/billing", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public BillingRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/orgs/{org}/settings/billing", rawUrl) + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Settings/Billing/Packages/PackagesRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Settings/Billing/Packages/PackagesRequestBuilder.cs new file mode 100644 index 0000000..61c500f --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Settings/Billing/Packages/PackagesRequestBuilder.cs @@ -0,0 +1,93 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Orgs.Item.Settings.Billing.Packages +{ + /// + /// Builds and executes requests for operations under \orgs\{org}\settings\billing\packages + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class PackagesRequestBuilder : BaseRequestBuilder + { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public PackagesRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/orgs/{org}/settings/billing/packages", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public PackagesRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/orgs/{org}/settings/billing/packages", rawUrl) + { + } + /// + /// 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/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. + /// API method documentation + /// + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Models.PackagesBillingUsage.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false); + } + /// + /// 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/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. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.Orgs.Item.Settings.Billing.Packages.PackagesRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Orgs.Item.Settings.Billing.Packages.PackagesRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class PackagesRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Settings/Billing/SharedStorage/SharedStorageRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Settings/Billing/SharedStorage/SharedStorageRequestBuilder.cs new file mode 100644 index 0000000..60c9586 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Settings/Billing/SharedStorage/SharedStorageRequestBuilder.cs @@ -0,0 +1,93 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Orgs.Item.Settings.Billing.SharedStorage +{ + /// + /// Builds and executes requests for operations under \orgs\{org}\settings\billing\shared-storage + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class SharedStorageRequestBuilder : BaseRequestBuilder + { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public SharedStorageRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/orgs/{org}/settings/billing/shared-storage", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public SharedStorageRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/orgs/{org}/settings/billing/shared-storage", rawUrl) + { + } + /// + /// 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/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. + /// API method documentation + /// + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Models.CombinedBillingUsage.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false); + } + /// + /// 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/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. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.Orgs.Item.Settings.Billing.SharedStorage.SharedStorageRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Orgs.Item.Settings.Billing.SharedStorage.SharedStorageRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class SharedStorageRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Settings/NetworkConfigurations/Item/WithNetwork_configuration_ItemRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Settings/NetworkConfigurations/Item/WithNetwork_configuration_ItemRequestBuilder.cs new file mode 100644 index 0000000..0308293 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Settings/NetworkConfigurations/Item/WithNetwork_configuration_ItemRequestBuilder.cs @@ -0,0 +1,188 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Orgs.Item.Settings.NetworkConfigurations.Item +{ + /// + /// Builds and executes requests for operations under \orgs\{org}\settings\network-configurations\{network_configuration_id} + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithNetwork_configuration_ItemRequestBuilder : BaseRequestBuilder + { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public WithNetwork_configuration_ItemRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/orgs/{org}/settings/network-configurations/{network_configuration_id}", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public WithNetwork_configuration_ItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/orgs/{org}/settings/network-configurations/{network_configuration_id}", rawUrl) + { + } + /// + /// Deletes a hosted compute network configuration from an organization.OAuth app tokens and personal access tokens (classic) need the `write:network_configurations` scope to use this endpoint. + /// API method documentation + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task DeleteAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task DeleteAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToDeleteRequestInformation(requestConfiguration); + await RequestAdapter.SendNoContentAsync(requestInfo, default, cancellationToken).ConfigureAwait(false); + } + /// + /// Gets a hosted compute network configuration configured in an organization.OAuth app tokens and personal access tokens (classic) need the `read:network_configurations` scope to use this endpoint. + /// API method documentation + /// + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Models.NetworkConfiguration.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false); + } + /// + /// Updates a hosted compute network configuration for an organization.OAuth app tokens and personal access tokens (classic) need the `write:network_configurations` scope to use this endpoint. + /// API method documentation + /// + /// A + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PatchAsync(global::Ayllu.Github.Client.Orgs.Item.Settings.NetworkConfigurations.Item.WithNetwork_configuration_PatchRequestBody body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task PatchAsync(global::Ayllu.Github.Client.Orgs.Item.Settings.NetworkConfigurations.Item.WithNetwork_configuration_PatchRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPatchRequestInformation(body, requestConfiguration); + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Models.NetworkConfiguration.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false); + } + /// + /// Deletes a hosted compute network configuration from an organization.OAuth app tokens and personal access tokens (classic) need the `write:network_configurations` scope to use this endpoint. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToDeleteRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToDeleteRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.DELETE, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + return requestInfo; + } + /// + /// Gets a hosted compute network configuration configured in an organization.OAuth app tokens and personal access tokens (classic) need the `read:network_configurations` scope to use this endpoint. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Updates a hosted compute network configuration for an organization.OAuth app tokens and personal access tokens (classic) need the `write:network_configurations` scope to use this endpoint. + /// + /// A + /// The request body + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPatchRequestInformation(global::Ayllu.Github.Client.Orgs.Item.Settings.NetworkConfigurations.Item.WithNetwork_configuration_PatchRequestBody body, Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToPatchRequestInformation(global::Ayllu.Github.Client.Orgs.Item.Settings.NetworkConfigurations.Item.WithNetwork_configuration_PatchRequestBody body, Action> requestConfiguration = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.Orgs.Item.Settings.NetworkConfigurations.Item.WithNetwork_configuration_ItemRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Orgs.Item.Settings.NetworkConfigurations.Item.WithNetwork_configuration_ItemRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithNetwork_configuration_ItemRequestBuilderDeleteRequestConfiguration : RequestConfiguration + { + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithNetwork_configuration_ItemRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithNetwork_configuration_ItemRequestBuilderPatchRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Settings/NetworkConfigurations/Item/WithNetwork_configuration_PatchRequestBody.cs b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Settings/NetworkConfigurations/Item/WithNetwork_configuration_PatchRequestBody.cs new file mode 100644 index 0000000..1178cc3 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Settings/NetworkConfigurations/Item/WithNetwork_configuration_PatchRequestBody.cs @@ -0,0 +1,79 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Orgs.Item.Settings.NetworkConfigurations.Item +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class WithNetwork_configuration_PatchRequestBody : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The hosted compute service to use for the network configuration. + public global::Ayllu.Github.Client.Orgs.Item.Settings.NetworkConfigurations.Item.WithNetwork_configuration_PatchRequestBody_compute_service? ComputeService { get; set; } + /// Name of the network configuration. Must be between 1 and 100 characters and may only contain upper and lowercase letters a-z, numbers 0-9, '.', '-', and '_'. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Name { get; set; } +#nullable restore +#else + public string Name { get; set; } +#endif + /// The identifier of the network settings to use for the network configuration. Exactly one network settings must be specified. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? NetworkSettingsIds { get; set; } +#nullable restore +#else + public List NetworkSettingsIds { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public WithNetwork_configuration_PatchRequestBody() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Orgs.Item.Settings.NetworkConfigurations.Item.WithNetwork_configuration_PatchRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Orgs.Item.Settings.NetworkConfigurations.Item.WithNetwork_configuration_PatchRequestBody(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "compute_service", n => { ComputeService = n.GetEnumValue(); } }, + { "name", n => { Name = n.GetStringValue(); } }, + { "network_settings_ids", n => { NetworkSettingsIds = n.GetCollectionOfPrimitiveValues()?.AsList(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteEnumValue("compute_service", ComputeService); + writer.WriteStringValue("name", Name); + writer.WriteCollectionOfPrimitiveValues("network_settings_ids", NetworkSettingsIds); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Settings/NetworkConfigurations/Item/WithNetwork_configuration_PatchRequestBody_compute_service.cs b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Settings/NetworkConfigurations/Item/WithNetwork_configuration_PatchRequestBody_compute_service.cs new file mode 100644 index 0000000..b215c02 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Settings/NetworkConfigurations/Item/WithNetwork_configuration_PatchRequestBody_compute_service.cs @@ -0,0 +1,19 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Orgs.Item.Settings.NetworkConfigurations.Item +{ + /// The hosted compute service to use for the network configuration. + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public enum WithNetwork_configuration_PatchRequestBody_compute_service + { + [EnumMember(Value = "none")] + #pragma warning disable CS1591 + None, + #pragma warning restore CS1591 + [EnumMember(Value = "actions")] + #pragma warning disable CS1591 + Actions, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Settings/NetworkConfigurations/NetworkConfigurationsGetResponse.cs b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Settings/NetworkConfigurations/NetworkConfigurationsGetResponse.cs new file mode 100644 index 0000000..dba25c1 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Settings/NetworkConfigurations/NetworkConfigurationsGetResponse.cs @@ -0,0 +1,70 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Orgs.Item.Settings.NetworkConfigurations +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class NetworkConfigurationsGetResponse : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The network_configurations property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? NetworkConfigurations { get; set; } +#nullable restore +#else + public List NetworkConfigurations { get; set; } +#endif + /// The total_count property + public int? TotalCount { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public NetworkConfigurationsGetResponse() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Orgs.Item.Settings.NetworkConfigurations.NetworkConfigurationsGetResponse CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Orgs.Item.Settings.NetworkConfigurations.NetworkConfigurationsGetResponse(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "network_configurations", n => { NetworkConfigurations = n.GetCollectionOfObjectValues(global::Ayllu.Github.Client.Models.NetworkConfiguration.CreateFromDiscriminatorValue)?.AsList(); } }, + { "total_count", n => { TotalCount = n.GetIntValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteCollectionOfObjectValues("network_configurations", NetworkConfigurations); + writer.WriteIntValue("total_count", TotalCount); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Settings/NetworkConfigurations/NetworkConfigurationsPostRequestBody.cs b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Settings/NetworkConfigurations/NetworkConfigurationsPostRequestBody.cs new file mode 100644 index 0000000..cbdaea9 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Settings/NetworkConfigurations/NetworkConfigurationsPostRequestBody.cs @@ -0,0 +1,79 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Orgs.Item.Settings.NetworkConfigurations +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class NetworkConfigurationsPostRequestBody : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The hosted compute service to use for the network configuration. + public global::Ayllu.Github.Client.Orgs.Item.Settings.NetworkConfigurations.NetworkConfigurationsPostRequestBody_compute_service? ComputeService { get; set; } + /// Name of the network configuration. Must be between 1 and 100 characters and may only contain upper and lowercase letters a-z, numbers 0-9, '.', '-', and '_'. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Name { get; set; } +#nullable restore +#else + public string Name { get; set; } +#endif + /// The identifier of the network settings to use for the network configuration. Exactly one network settings must be specified. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? NetworkSettingsIds { get; set; } +#nullable restore +#else + public List NetworkSettingsIds { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public NetworkConfigurationsPostRequestBody() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Orgs.Item.Settings.NetworkConfigurations.NetworkConfigurationsPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Orgs.Item.Settings.NetworkConfigurations.NetworkConfigurationsPostRequestBody(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "compute_service", n => { ComputeService = n.GetEnumValue(); } }, + { "name", n => { Name = n.GetStringValue(); } }, + { "network_settings_ids", n => { NetworkSettingsIds = n.GetCollectionOfPrimitiveValues()?.AsList(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteEnumValue("compute_service", ComputeService); + writer.WriteStringValue("name", Name); + writer.WriteCollectionOfPrimitiveValues("network_settings_ids", NetworkSettingsIds); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Settings/NetworkConfigurations/NetworkConfigurationsPostRequestBody_compute_service.cs b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Settings/NetworkConfigurations/NetworkConfigurationsPostRequestBody_compute_service.cs new file mode 100644 index 0000000..729f3ba --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Settings/NetworkConfigurations/NetworkConfigurationsPostRequestBody_compute_service.cs @@ -0,0 +1,19 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Orgs.Item.Settings.NetworkConfigurations +{ + /// The hosted compute service to use for the network configuration. + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public enum NetworkConfigurationsPostRequestBody_compute_service + { + [EnumMember(Value = "none")] + #pragma warning disable CS1591 + None, + #pragma warning restore CS1591 + [EnumMember(Value = "actions")] + #pragma warning disable CS1591 + Actions, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Settings/NetworkConfigurations/NetworkConfigurationsRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Settings/NetworkConfigurations/NetworkConfigurationsRequestBuilder.cs new file mode 100644 index 0000000..4fffe46 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Settings/NetworkConfigurations/NetworkConfigurationsRequestBuilder.cs @@ -0,0 +1,190 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Ayllu.Github.Client.Orgs.Item.Settings.NetworkConfigurations.Item; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Orgs.Item.Settings.NetworkConfigurations +{ + /// + /// Builds and executes requests for operations under \orgs\{org}\settings\network-configurations + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class NetworkConfigurationsRequestBuilder : BaseRequestBuilder + { + /// Gets an item from the Ayllu.Github.Client.orgs.item.settings.networkConfigurations.item collection + /// Unique identifier of the hosted compute network configuration. + /// A + public global::Ayllu.Github.Client.Orgs.Item.Settings.NetworkConfigurations.Item.WithNetwork_configuration_ItemRequestBuilder this[string position] + { + get + { + var urlTplParams = new Dictionary(PathParameters); + urlTplParams.Add("network_configuration_id", position); + return new global::Ayllu.Github.Client.Orgs.Item.Settings.NetworkConfigurations.Item.WithNetwork_configuration_ItemRequestBuilder(urlTplParams, RequestAdapter); + } + } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public NetworkConfigurationsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/orgs/{org}/settings/network-configurations{?page*,per_page*}", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public NetworkConfigurationsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/orgs/{org}/settings/network-configurations{?page*,per_page*}", rawUrl) + { + } + /// + /// Lists all hosted compute network configurations configured in an organization.OAuth app tokens and personal access tokens (classic) need the `read:network_configurations` scope to use this endpoint. + /// API method documentation + /// + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsNetworkConfigurationsGetResponseAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task GetAsNetworkConfigurationsGetResponseAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Orgs.Item.Settings.NetworkConfigurations.NetworkConfigurationsGetResponse.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false); + } + /// + /// Lists all hosted compute network configurations configured in an organization.OAuth app tokens and personal access tokens (classic) need the `read:network_configurations` scope to use this endpoint. + /// API method documentation + /// + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + [Obsolete("This method is obsolete. Use GetAsNetworkConfigurationsGetResponseAsync instead.")] +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Orgs.Item.Settings.NetworkConfigurations.NetworkConfigurationsResponse.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false); + } + /// + /// Creates a hosted compute network configuration for an organization.OAuth app tokens and personal access tokens (classic) need the `write:network_configurations` scope to use this endpoint. + /// API method documentation + /// + /// A + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PostAsync(global::Ayllu.Github.Client.Orgs.Item.Settings.NetworkConfigurations.NetworkConfigurationsPostRequestBody body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task PostAsync(global::Ayllu.Github.Client.Orgs.Item.Settings.NetworkConfigurations.NetworkConfigurationsPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPostRequestInformation(body, requestConfiguration); + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Models.NetworkConfiguration.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false); + } + /// + /// Lists all hosted compute network configurations configured in an organization.OAuth app tokens and personal access tokens (classic) need the `read:network_configurations` scope to use this endpoint. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Creates a hosted compute network configuration for an organization.OAuth app tokens and personal access tokens (classic) need the `write:network_configurations` scope to use this endpoint. + /// + /// A + /// The request body + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPostRequestInformation(global::Ayllu.Github.Client.Orgs.Item.Settings.NetworkConfigurations.NetworkConfigurationsPostRequestBody body, Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToPostRequestInformation(global::Ayllu.Github.Client.Orgs.Item.Settings.NetworkConfigurations.NetworkConfigurationsPostRequestBody body, Action> requestConfiguration = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.Orgs.Item.Settings.NetworkConfigurations.NetworkConfigurationsRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Orgs.Item.Settings.NetworkConfigurations.NetworkConfigurationsRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Lists all hosted compute network configurations configured in an organization.OAuth app tokens and personal access tokens (classic) need the `read:network_configurations` scope to use this endpoint. + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class NetworkConfigurationsRequestBuilderGetQueryParameters + { + /// The page number of the results to fetch. For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." + [QueryParameter("page")] + public int? Page { get; set; } + /// The number of results per page (max 100). For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." + [QueryParameter("per_page")] + public int? PerPage { get; set; } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class NetworkConfigurationsRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class NetworkConfigurationsRequestBuilderPostRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Settings/NetworkConfigurations/NetworkConfigurationsResponse.cs b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Settings/NetworkConfigurations/NetworkConfigurationsResponse.cs new file mode 100644 index 0000000..a50ddd1 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Settings/NetworkConfigurations/NetworkConfigurationsResponse.cs @@ -0,0 +1,28 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Orgs.Item.Settings.NetworkConfigurations +{ + [Obsolete("This class is obsolete. Use NetworkConfigurationsGetResponse instead.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class NetworkConfigurationsResponse : global::Ayllu.Github.Client.Orgs.Item.Settings.NetworkConfigurations.NetworkConfigurationsGetResponse, IParsable + #pragma warning restore CS1591 + { + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static new global::Ayllu.Github.Client.Orgs.Item.Settings.NetworkConfigurations.NetworkConfigurationsResponse CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Orgs.Item.Settings.NetworkConfigurations.NetworkConfigurationsResponse(); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Settings/NetworkSettings/Item/WithNetwork_settings_ItemRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Settings/NetworkSettings/Item/WithNetwork_settings_ItemRequestBuilder.cs new file mode 100644 index 0000000..9570345 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Settings/NetworkSettings/Item/WithNetwork_settings_ItemRequestBuilder.cs @@ -0,0 +1,93 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Orgs.Item.Settings.NetworkSettings.Item +{ + /// + /// Builds and executes requests for operations under \orgs\{org}\settings\network-settings\{network_settings_id} + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithNetwork_settings_ItemRequestBuilder : BaseRequestBuilder + { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public WithNetwork_settings_ItemRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/orgs/{org}/settings/network-settings/{network_settings_id}", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public WithNetwork_settings_ItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/orgs/{org}/settings/network-settings/{network_settings_id}", rawUrl) + { + } + /// + /// Gets a hosted compute network settings resource configured for an organization.OAuth app tokens and personal access tokens (classic) need the `read:network_configurations` scope to use this endpoint. + /// API method documentation + /// + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Models.NetworkSettings.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false); + } + /// + /// Gets a hosted compute network settings resource configured for an organization.OAuth app tokens and personal access tokens (classic) need the `read:network_configurations` scope to use this endpoint. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.Orgs.Item.Settings.NetworkSettings.Item.WithNetwork_settings_ItemRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Orgs.Item.Settings.NetworkSettings.Item.WithNetwork_settings_ItemRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithNetwork_settings_ItemRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Settings/NetworkSettings/NetworkSettingsRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Settings/NetworkSettings/NetworkSettingsRequestBuilder.cs new file mode 100644 index 0000000..74432f4 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Settings/NetworkSettings/NetworkSettingsRequestBuilder.cs @@ -0,0 +1,48 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Orgs.Item.Settings.NetworkSettings.Item; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System; +namespace Ayllu.Github.Client.Orgs.Item.Settings.NetworkSettings +{ + /// + /// Builds and executes requests for operations under \orgs\{org}\settings\network-settings + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class NetworkSettingsRequestBuilder : BaseRequestBuilder + { + /// Gets an item from the Ayllu.Github.Client.orgs.item.settings.networkSettings.item collection + /// Unique identifier of the hosted compute network settings. + /// A + public global::Ayllu.Github.Client.Orgs.Item.Settings.NetworkSettings.Item.WithNetwork_settings_ItemRequestBuilder this[string position] + { + get + { + var urlTplParams = new Dictionary(PathParameters); + urlTplParams.Add("network_settings_id", position); + return new global::Ayllu.Github.Client.Orgs.Item.Settings.NetworkSettings.Item.WithNetwork_settings_ItemRequestBuilder(urlTplParams, RequestAdapter); + } + } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public NetworkSettingsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/orgs/{org}/settings/network-settings", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public NetworkSettingsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/orgs/{org}/settings/network-settings", rawUrl) + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Settings/SettingsRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Settings/SettingsRequestBuilder.cs new file mode 100644 index 0000000..5acb12a --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Settings/SettingsRequestBuilder.cs @@ -0,0 +1,53 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Orgs.Item.Settings.Billing; +using Ayllu.Github.Client.Orgs.Item.Settings.NetworkConfigurations; +using Ayllu.Github.Client.Orgs.Item.Settings.NetworkSettings; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System; +namespace Ayllu.Github.Client.Orgs.Item.Settings +{ + /// + /// Builds and executes requests for operations under \orgs\{org}\settings + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class SettingsRequestBuilder : BaseRequestBuilder + { + /// The billing property + public global::Ayllu.Github.Client.Orgs.Item.Settings.Billing.BillingRequestBuilder Billing + { + get => new global::Ayllu.Github.Client.Orgs.Item.Settings.Billing.BillingRequestBuilder(PathParameters, RequestAdapter); + } + /// The networkConfigurations property + public global::Ayllu.Github.Client.Orgs.Item.Settings.NetworkConfigurations.NetworkConfigurationsRequestBuilder NetworkConfigurations + { + get => new global::Ayllu.Github.Client.Orgs.Item.Settings.NetworkConfigurations.NetworkConfigurationsRequestBuilder(PathParameters, RequestAdapter); + } + /// The networkSettings property + public global::Ayllu.Github.Client.Orgs.Item.Settings.NetworkSettings.NetworkSettingsRequestBuilder NetworkSettings + { + get => new global::Ayllu.Github.Client.Orgs.Item.Settings.NetworkSettings.NetworkSettingsRequestBuilder(PathParameters, RequestAdapter); + } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public SettingsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/orgs/{org}/settings", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public SettingsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/orgs/{org}/settings", rawUrl) + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Team/Item/Copilot/CopilotRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Team/Item/Copilot/CopilotRequestBuilder.cs new file mode 100644 index 0000000..2a6bc74 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Team/Item/Copilot/CopilotRequestBuilder.cs @@ -0,0 +1,41 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Orgs.Item.Team.Item.Copilot.Metrics; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System; +namespace Ayllu.Github.Client.Orgs.Item.Team.Item.Copilot +{ + /// + /// Builds and executes requests for operations under \orgs\{org}\team\{team_slug}\copilot + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class CopilotRequestBuilder : BaseRequestBuilder + { + /// The metrics property + public global::Ayllu.Github.Client.Orgs.Item.Team.Item.Copilot.Metrics.MetricsRequestBuilder Metrics + { + get => new global::Ayllu.Github.Client.Orgs.Item.Team.Item.Copilot.Metrics.MetricsRequestBuilder(PathParameters, RequestAdapter); + } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public CopilotRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/orgs/{org}/team/{team_slug}/copilot", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public CopilotRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/orgs/{org}/team/{team_slug}/copilot", rawUrl) + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Team/Item/Copilot/Metrics/MetricsRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Team/Item/Copilot/Metrics/MetricsRequestBuilder.cs new file mode 100644 index 0000000..5ffe777 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Team/Item/Copilot/Metrics/MetricsRequestBuilder.cs @@ -0,0 +1,138 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Orgs.Item.Team.Item.Copilot.Metrics +{ + /// + /// Builds and executes requests for operations under \orgs\{org}\team\{team_slug}\copilot\metrics + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class MetricsRequestBuilder : BaseRequestBuilder + { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public MetricsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/orgs/{org}/team/{team_slug}/copilot/metrics{?page*,per_page*,since*,until*}", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public MetricsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/orgs/{org}/team/{team_slug}/copilot/metrics{?page*,per_page*,since*,until*}", rawUrl) + { + } + /// + /// Use this endpoint to see a breakdown of aggregated metrics for various GitHub Copilot features. See the response schema tab for detailed metrics definitions.> [!NOTE]> This endpoint will only return results for a given day if the team had **five or more members with active Copilot licenses** on that day, as evaluated at the end of that day.The response contains metrics for up to 28 days prior. Metrics are processed once per day for the previous day,and the response will only include data up until yesterday. In order for an end user to be counted towards these metrics,they must have telemetry enabled in their IDE.To access this endpoint, the Copilot Metrics API access policy must be enabled for the organization containing the team within GitHub settings.Only organization owners for the organization that contains this team and owners and billing managers of the parent enterprise can view Copilot metrics for a team.OAuth app tokens and personal access tokens (classic) need either the `manage_billing:copilot`, `read:org`, or `read:enterprise` scopes to use this endpoint. + /// API method documentation + /// + /// A List<global::Ayllu.Github.Client.Models.CopilotUsageMetricsDay> + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 403 status code + /// When receiving a 404 status code + /// When receiving a 422 status code + /// When receiving a 500 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task?> GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task> GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "403", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "404", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "422", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "500", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + }; + var collectionResult = await RequestAdapter.SendCollectionAsync(requestInfo, global::Ayllu.Github.Client.Models.CopilotUsageMetricsDay.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + return collectionResult?.AsList(); + } + /// + /// Use this endpoint to see a breakdown of aggregated metrics for various GitHub Copilot features. See the response schema tab for detailed metrics definitions.> [!NOTE]> This endpoint will only return results for a given day if the team had **five or more members with active Copilot licenses** on that day, as evaluated at the end of that day.The response contains metrics for up to 28 days prior. Metrics are processed once per day for the previous day,and the response will only include data up until yesterday. In order for an end user to be counted towards these metrics,they must have telemetry enabled in their IDE.To access this endpoint, the Copilot Metrics API access policy must be enabled for the organization containing the team within GitHub settings.Only organization owners for the organization that contains this team and owners and billing managers of the parent enterprise can view Copilot metrics for a team.OAuth app tokens and personal access tokens (classic) need either the `manage_billing:copilot`, `read:org`, or `read:enterprise` scopes to use this endpoint. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.Orgs.Item.Team.Item.Copilot.Metrics.MetricsRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Orgs.Item.Team.Item.Copilot.Metrics.MetricsRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Use this endpoint to see a breakdown of aggregated metrics for various GitHub Copilot features. See the response schema tab for detailed metrics definitions.> [!NOTE]> This endpoint will only return results for a given day if the team had **five or more members with active Copilot licenses** on that day, as evaluated at the end of that day.The response contains metrics for up to 28 days prior. Metrics are processed once per day for the previous day,and the response will only include data up until yesterday. In order for an end user to be counted towards these metrics,they must have telemetry enabled in their IDE.To access this endpoint, the Copilot Metrics API access policy must be enabled for the organization containing the team within GitHub settings.Only organization owners for the organization that contains this team and owners and billing managers of the parent enterprise can view Copilot metrics for a team.OAuth app tokens and personal access tokens (classic) need either the `manage_billing:copilot`, `read:org`, or `read:enterprise` scopes to use this endpoint. + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class MetricsRequestBuilderGetQueryParameters + { + /// The page number of the results to fetch. For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." + [QueryParameter("page")] + public int? Page { get; set; } + /// The number of days of metrics to display per page (max 28). For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." + [QueryParameter("per_page")] + public int? PerPage { get; set; } + /// 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. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("since")] + public string? Since { get; set; } +#nullable restore +#else + [QueryParameter("since")] + public string Since { get; set; } +#endif + /// 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. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("until")] + public string? Until { get; set; } +#nullable restore +#else + [QueryParameter("until")] + public string Until { get; set; } +#endif + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class MetricsRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Team/Item/WithTeam_slugItemRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Team/Item/WithTeam_slugItemRequestBuilder.cs new file mode 100644 index 0000000..89e92ff --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Team/Item/WithTeam_slugItemRequestBuilder.cs @@ -0,0 +1,41 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Orgs.Item.Team.Item.Copilot; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System; +namespace Ayllu.Github.Client.Orgs.Item.Team.Item +{ + /// + /// Builds and executes requests for operations under \orgs\{org}\team\{team_slug} + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithTeam_slugItemRequestBuilder : BaseRequestBuilder + { + /// The copilot property + public global::Ayllu.Github.Client.Orgs.Item.Team.Item.Copilot.CopilotRequestBuilder Copilot + { + get => new global::Ayllu.Github.Client.Orgs.Item.Team.Item.Copilot.CopilotRequestBuilder(PathParameters, RequestAdapter); + } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public WithTeam_slugItemRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/orgs/{org}/team/{team_slug}", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public WithTeam_slugItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/orgs/{org}/team/{team_slug}", rawUrl) + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Team/TeamRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Team/TeamRequestBuilder.cs new file mode 100644 index 0000000..fec41eb --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Team/TeamRequestBuilder.cs @@ -0,0 +1,48 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Orgs.Item.Team.Item; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System; +namespace Ayllu.Github.Client.Orgs.Item.Team +{ + /// + /// Builds and executes requests for operations under \orgs\{org}\team + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class TeamRequestBuilder : BaseRequestBuilder + { + /// Gets an item from the Ayllu.Github.Client.orgs.item.team.item collection + /// The slug of the team name. + /// A + public global::Ayllu.Github.Client.Orgs.Item.Team.Item.WithTeam_slugItemRequestBuilder this[string position] + { + get + { + var urlTplParams = new Dictionary(PathParameters); + urlTplParams.Add("team_slug", position); + return new global::Ayllu.Github.Client.Orgs.Item.Team.Item.WithTeam_slugItemRequestBuilder(urlTplParams, RequestAdapter); + } + } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public TeamRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/orgs/{org}/team", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public TeamRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/orgs/{org}/team", rawUrl) + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Teams/Item/Discussions/DiscussionsPostRequestBody.cs b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Teams/Item/Discussions/DiscussionsPostRequestBody.cs new file mode 100644 index 0000000..ee89e1e --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Teams/Item/Discussions/DiscussionsPostRequestBody.cs @@ -0,0 +1,79 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Orgs.Item.Teams.Item.Discussions +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class DiscussionsPostRequestBody : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The discussion post's body text. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Body { get; set; } +#nullable restore +#else + public string Body { get; set; } +#endif + /// 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. + public bool? Private { get; set; } + /// The discussion post's title. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Title { get; set; } +#nullable restore +#else + public string Title { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public DiscussionsPostRequestBody() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Orgs.Item.Teams.Item.Discussions.DiscussionsPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Orgs.Item.Teams.Item.Discussions.DiscussionsPostRequestBody(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "body", n => { Body = n.GetStringValue(); } }, + { "private", n => { Private = n.GetBoolValue(); } }, + { "title", n => { Title = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("body", Body); + writer.WriteBoolValue("private", Private); + writer.WriteStringValue("title", Title); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Teams/Item/Discussions/DiscussionsRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Teams/Item/Discussions/DiscussionsRequestBuilder.cs new file mode 100644 index 0000000..ffe8bae --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Teams/Item/Discussions/DiscussionsRequestBuilder.cs @@ -0,0 +1,208 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Ayllu.Github.Client.Orgs.Item.Teams.Item.Discussions.Item; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Orgs.Item.Teams.Item.Discussions +{ + /// + /// Builds and executes requests for operations under \orgs\{org}\teams\{team_slug}\discussions + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class DiscussionsRequestBuilder : BaseRequestBuilder + { + /// Gets an item from the Ayllu.Github.Client.orgs.item.teams.item.discussions.item collection + /// The number that identifies the discussion. + /// A + public global::Ayllu.Github.Client.Orgs.Item.Teams.Item.Discussions.Item.WithDiscussion_numberItemRequestBuilder this[int position] + { + get + { + var urlTplParams = new Dictionary(PathParameters); + urlTplParams.Add("discussion_number", position); + return new global::Ayllu.Github.Client.Orgs.Item.Teams.Item.Discussions.Item.WithDiscussion_numberItemRequestBuilder(urlTplParams, RequestAdapter); + } + } + /// Gets an item from the Ayllu.Github.Client.orgs.item.teams.item.discussions.item collection + /// The number that identifies the discussion. + /// A + [Obsolete("This indexer is deprecated and will be removed in the next major version. Use the one with the typed parameter instead.")] + public global::Ayllu.Github.Client.Orgs.Item.Teams.Item.Discussions.Item.WithDiscussion_numberItemRequestBuilder this[string position] + { + get + { + var urlTplParams = new Dictionary(PathParameters); + if (!string.IsNullOrWhiteSpace(position)) urlTplParams.Add("discussion_number", position); + return new global::Ayllu.Github.Client.Orgs.Item.Teams.Item.Discussions.Item.WithDiscussion_numberItemRequestBuilder(urlTplParams, RequestAdapter); + } + } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public DiscussionsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/orgs/{org}/teams/{team_slug}/discussions{?direction*,page*,per_page*,pinned*}", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public DiscussionsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/orgs/{org}/teams/{team_slug}/discussions{?direction*,page*,per_page*,pinned*}", rawUrl) + { + } + /// + /// 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. + /// API method documentation + /// + /// A List<global::Ayllu.Github.Client.Models.TeamDiscussion> + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task?> GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task> GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var collectionResult = await RequestAdapter.SendCollectionAsync(requestInfo, global::Ayllu.Github.Client.Models.TeamDiscussion.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false); + return collectionResult?.AsList(); + } + /// + /// Creates a new discussion post on a team's page.This endpoint triggers [notifications](https://docs.github.com/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. For more information, see "[Rate limits for the API](https://docs.github.com/rest/using-the-rest-api/rate-limits-for-the-rest-api#about-secondary-rate-limits)" and "[Best practices for using the REST API](https://docs.github.com/rest/guides/best-practices-for-using-the-rest-api)."> [!NOTE]> You can also specify a team by `org_id` and `team_id` using the route `POST /organizations/{org_id}/team/{team_id}/discussions`.OAuth app tokens and personal access tokens (classic) need the `write:discussion` scope to use this endpoint. + /// API method documentation + /// + /// A + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PostAsync(global::Ayllu.Github.Client.Orgs.Item.Teams.Item.Discussions.DiscussionsPostRequestBody body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task PostAsync(global::Ayllu.Github.Client.Orgs.Item.Teams.Item.Discussions.DiscussionsPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPostRequestInformation(body, requestConfiguration); + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Models.TeamDiscussion.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false); + } + /// + /// 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. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Creates a new discussion post on a team's page.This endpoint triggers [notifications](https://docs.github.com/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. For more information, see "[Rate limits for the API](https://docs.github.com/rest/using-the-rest-api/rate-limits-for-the-rest-api#about-secondary-rate-limits)" and "[Best practices for using the REST API](https://docs.github.com/rest/guides/best-practices-for-using-the-rest-api)."> [!NOTE]> You can also specify a team by `org_id` and `team_id` using the route `POST /organizations/{org_id}/team/{team_id}/discussions`.OAuth app tokens and personal access tokens (classic) need the `write:discussion` scope to use this endpoint. + /// + /// A + /// The request body + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPostRequestInformation(global::Ayllu.Github.Client.Orgs.Item.Teams.Item.Discussions.DiscussionsPostRequestBody body, Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToPostRequestInformation(global::Ayllu.Github.Client.Orgs.Item.Teams.Item.Discussions.DiscussionsPostRequestBody body, Action> requestConfiguration = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.Orgs.Item.Teams.Item.Discussions.DiscussionsRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Orgs.Item.Teams.Item.Discussions.DiscussionsRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// 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. + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class DiscussionsRequestBuilderGetQueryParameters + { + /// The direction to sort the results by. + [Obsolete("This property is deprecated, use DirectionAsGetDirectionQueryParameterType instead")] +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("direction")] + public string? Direction { get; set; } +#nullable restore +#else + [QueryParameter("direction")] + public string Direction { get; set; } +#endif + /// The direction to sort the results by. + [QueryParameter("direction")] + public global::Ayllu.Github.Client.Orgs.Item.Teams.Item.Discussions.GetDirectionQueryParameterType? DirectionAsGetDirectionQueryParameterType { get; set; } + /// The page number of the results to fetch. For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." + [QueryParameter("page")] + public int? Page { get; set; } + /// The number of results per page (max 100). For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." + [QueryParameter("per_page")] + public int? PerPage { get; set; } + /// Pinned discussions only filter +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("pinned")] + public string? Pinned { get; set; } +#nullable restore +#else + [QueryParameter("pinned")] + public string Pinned { get; set; } +#endif + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class DiscussionsRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class DiscussionsRequestBuilderPostRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Teams/Item/Discussions/GetDirectionQueryParameterType.cs b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Teams/Item/Discussions/GetDirectionQueryParameterType.cs new file mode 100644 index 0000000..498174f --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Teams/Item/Discussions/GetDirectionQueryParameterType.cs @@ -0,0 +1,20 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Orgs.Item.Teams.Item.Discussions +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public enum GetDirectionQueryParameterType + #pragma warning restore CS1591 + { + [EnumMember(Value = "asc")] + #pragma warning disable CS1591 + Asc, + #pragma warning restore CS1591 + [EnumMember(Value = "desc")] + #pragma warning disable CS1591 + Desc, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Teams/Item/Discussions/Item/Comments/CommentsPostRequestBody.cs b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Teams/Item/Discussions/Item/Comments/CommentsPostRequestBody.cs new file mode 100644 index 0000000..3ff3e29 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Teams/Item/Discussions/Item/Comments/CommentsPostRequestBody.cs @@ -0,0 +1,65 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Orgs.Item.Teams.Item.Discussions.Item.Comments +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class CommentsPostRequestBody : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The discussion comment's body text. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Body { get; set; } +#nullable restore +#else + public string Body { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public CommentsPostRequestBody() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Orgs.Item.Teams.Item.Discussions.Item.Comments.CommentsPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Orgs.Item.Teams.Item.Discussions.Item.Comments.CommentsPostRequestBody(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "body", n => { Body = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("body", Body); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Teams/Item/Discussions/Item/Comments/CommentsRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Teams/Item/Discussions/Item/Comments/CommentsRequestBuilder.cs new file mode 100644 index 0000000..e0a5fde --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Teams/Item/Discussions/Item/Comments/CommentsRequestBuilder.cs @@ -0,0 +1,198 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Ayllu.Github.Client.Orgs.Item.Teams.Item.Discussions.Item.Comments.Item; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Orgs.Item.Teams.Item.Discussions.Item.Comments +{ + /// + /// Builds and executes requests for operations under \orgs\{org}\teams\{team_slug}\discussions\{discussion_number}\comments + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class CommentsRequestBuilder : BaseRequestBuilder + { + /// Gets an item from the Ayllu.Github.Client.orgs.item.teams.item.discussions.item.comments.item collection + /// The number that identifies the comment. + /// A + public global::Ayllu.Github.Client.Orgs.Item.Teams.Item.Discussions.Item.Comments.Item.WithComment_numberItemRequestBuilder this[int position] + { + get + { + var urlTplParams = new Dictionary(PathParameters); + urlTplParams.Add("comment_number", position); + return new global::Ayllu.Github.Client.Orgs.Item.Teams.Item.Discussions.Item.Comments.Item.WithComment_numberItemRequestBuilder(urlTplParams, RequestAdapter); + } + } + /// Gets an item from the Ayllu.Github.Client.orgs.item.teams.item.discussions.item.comments.item collection + /// The number that identifies the comment. + /// A + [Obsolete("This indexer is deprecated and will be removed in the next major version. Use the one with the typed parameter instead.")] + public global::Ayllu.Github.Client.Orgs.Item.Teams.Item.Discussions.Item.Comments.Item.WithComment_numberItemRequestBuilder this[string position] + { + get + { + var urlTplParams = new Dictionary(PathParameters); + if (!string.IsNullOrWhiteSpace(position)) urlTplParams.Add("comment_number", position); + return new global::Ayllu.Github.Client.Orgs.Item.Teams.Item.Discussions.Item.Comments.Item.WithComment_numberItemRequestBuilder(urlTplParams, RequestAdapter); + } + } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public CommentsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments{?direction*,page*,per_page*}", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public CommentsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments{?direction*,page*,per_page*}", rawUrl) + { + } + /// + /// 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. + /// API method documentation + /// + /// A List<global::Ayllu.Github.Client.Models.TeamDiscussionComment> + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task?> GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task> GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var collectionResult = await RequestAdapter.SendCollectionAsync(requestInfo, global::Ayllu.Github.Client.Models.TeamDiscussionComment.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false); + return collectionResult?.AsList(); + } + /// + /// Creates a new comment on a team discussion.This endpoint triggers [notifications](https://docs.github.com/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. For more information, see "[Rate limits for the API](https://docs.github.com/rest/using-the-rest-api/rate-limits-for-the-rest-api#about-secondary-rate-limits)" and "[Best practices for using the REST API](https://docs.github.com/rest/guides/best-practices-for-using-the-rest-api)."> [!NOTE]> You can also specify a team by `org_id` and `team_id` using the route `POST /organizations/{org_id}/team/{team_id}/discussions/{discussion_number}/comments`.OAuth app tokens and personal access tokens (classic) need the `write:discussion` scope to use this endpoint. + /// API method documentation + /// + /// A + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PostAsync(global::Ayllu.Github.Client.Orgs.Item.Teams.Item.Discussions.Item.Comments.CommentsPostRequestBody body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task PostAsync(global::Ayllu.Github.Client.Orgs.Item.Teams.Item.Discussions.Item.Comments.CommentsPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPostRequestInformation(body, requestConfiguration); + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Models.TeamDiscussionComment.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false); + } + /// + /// 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. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Creates a new comment on a team discussion.This endpoint triggers [notifications](https://docs.github.com/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. For more information, see "[Rate limits for the API](https://docs.github.com/rest/using-the-rest-api/rate-limits-for-the-rest-api#about-secondary-rate-limits)" and "[Best practices for using the REST API](https://docs.github.com/rest/guides/best-practices-for-using-the-rest-api)."> [!NOTE]> You can also specify a team by `org_id` and `team_id` using the route `POST /organizations/{org_id}/team/{team_id}/discussions/{discussion_number}/comments`.OAuth app tokens and personal access tokens (classic) need the `write:discussion` scope to use this endpoint. + /// + /// A + /// The request body + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPostRequestInformation(global::Ayllu.Github.Client.Orgs.Item.Teams.Item.Discussions.Item.Comments.CommentsPostRequestBody body, Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToPostRequestInformation(global::Ayllu.Github.Client.Orgs.Item.Teams.Item.Discussions.Item.Comments.CommentsPostRequestBody body, Action> requestConfiguration = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.Orgs.Item.Teams.Item.Discussions.Item.Comments.CommentsRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Orgs.Item.Teams.Item.Discussions.Item.Comments.CommentsRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// 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. + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class CommentsRequestBuilderGetQueryParameters + { + /// The direction to sort the results by. + [Obsolete("This property is deprecated, use DirectionAsGetDirectionQueryParameterType instead")] +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("direction")] + public string? Direction { get; set; } +#nullable restore +#else + [QueryParameter("direction")] + public string Direction { get; set; } +#endif + /// The direction to sort the results by. + [QueryParameter("direction")] + public global::Ayllu.Github.Client.Orgs.Item.Teams.Item.Discussions.Item.Comments.GetDirectionQueryParameterType? DirectionAsGetDirectionQueryParameterType { get; set; } + /// The page number of the results to fetch. For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." + [QueryParameter("page")] + public int? Page { get; set; } + /// The number of results per page (max 100). For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." + [QueryParameter("per_page")] + public int? PerPage { get; set; } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class CommentsRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class CommentsRequestBuilderPostRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Teams/Item/Discussions/Item/Comments/GetDirectionQueryParameterType.cs b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Teams/Item/Discussions/Item/Comments/GetDirectionQueryParameterType.cs new file mode 100644 index 0000000..9b6611b --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Teams/Item/Discussions/Item/Comments/GetDirectionQueryParameterType.cs @@ -0,0 +1,20 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Orgs.Item.Teams.Item.Discussions.Item.Comments +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public enum GetDirectionQueryParameterType + #pragma warning restore CS1591 + { + [EnumMember(Value = "asc")] + #pragma warning disable CS1591 + Asc, + #pragma warning restore CS1591 + [EnumMember(Value = "desc")] + #pragma warning disable CS1591 + Desc, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Teams/Item/Discussions/Item/Comments/Item/Reactions/GetContentQueryParameterType.cs b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Teams/Item/Discussions/Item/Comments/Item/Reactions/GetContentQueryParameterType.cs new file mode 100644 index 0000000..f269f44 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Teams/Item/Discussions/Item/Comments/Item/Reactions/GetContentQueryParameterType.cs @@ -0,0 +1,44 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Orgs.Item.Teams.Item.Discussions.Item.Comments.Item.Reactions +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public enum GetContentQueryParameterType + #pragma warning restore CS1591 + { + [EnumMember(Value = "+1")] + #pragma warning disable CS1591 + Plus_1, + #pragma warning restore CS1591 + [EnumMember(Value = "-1")] + #pragma warning disable CS1591 + Minus_1, + #pragma warning restore CS1591 + [EnumMember(Value = "laugh")] + #pragma warning disable CS1591 + Laugh, + #pragma warning restore CS1591 + [EnumMember(Value = "confused")] + #pragma warning disable CS1591 + Confused, + #pragma warning restore CS1591 + [EnumMember(Value = "heart")] + #pragma warning disable CS1591 + Heart, + #pragma warning restore CS1591 + [EnumMember(Value = "hooray")] + #pragma warning disable CS1591 + Hooray, + #pragma warning restore CS1591 + [EnumMember(Value = "rocket")] + #pragma warning disable CS1591 + Rocket, + #pragma warning restore CS1591 + [EnumMember(Value = "eyes")] + #pragma warning disable CS1591 + Eyes, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Teams/Item/Discussions/Item/Comments/Item/Reactions/Item/WithReaction_ItemRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Teams/Item/Discussions/Item/Comments/Item/Reactions/Item/WithReaction_ItemRequestBuilder.cs new file mode 100644 index 0000000..83fad7e --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Teams/Item/Discussions/Item/Comments/Item/Reactions/Item/WithReaction_ItemRequestBuilder.cs @@ -0,0 +1,90 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Orgs.Item.Teams.Item.Discussions.Item.Comments.Item.Reactions.Item +{ + /// + /// Builds and executes requests for operations under \orgs\{org}\teams\{team_slug}\discussions\{discussion_number}\comments\{comment_number}\reactions\{reaction_id} + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithReaction_ItemRequestBuilder : BaseRequestBuilder + { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public WithReaction_ItemRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}/reactions/{reaction_id}", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public WithReaction_ItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}/reactions/{reaction_id}", rawUrl) + { + } + /// + /// > [!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/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 + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task DeleteAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task DeleteAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToDeleteRequestInformation(requestConfiguration); + await RequestAdapter.SendNoContentAsync(requestInfo, default, cancellationToken).ConfigureAwait(false); + } + /// + /// > [!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/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. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToDeleteRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToDeleteRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.DELETE, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.Orgs.Item.Teams.Item.Discussions.Item.Comments.Item.Reactions.Item.WithReaction_ItemRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Orgs.Item.Teams.Item.Discussions.Item.Comments.Item.Reactions.Item.WithReaction_ItemRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithReaction_ItemRequestBuilderDeleteRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Teams/Item/Discussions/Item/Comments/Item/Reactions/ReactionsPostRequestBody.cs b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Teams/Item/Discussions/Item/Comments/Item/Reactions/ReactionsPostRequestBody.cs new file mode 100644 index 0000000..be69595 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Teams/Item/Discussions/Item/Comments/Item/Reactions/ReactionsPostRequestBody.cs @@ -0,0 +1,59 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Orgs.Item.Teams.Item.Discussions.Item.Comments.Item.Reactions +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class ReactionsPostRequestBody : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The [reaction type](https://docs.github.com/rest/reactions/reactions#about-reactions) to add to the team discussion comment. + public global::Ayllu.Github.Client.Orgs.Item.Teams.Item.Discussions.Item.Comments.Item.Reactions.ReactionsPostRequestBody_content? Content { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public ReactionsPostRequestBody() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Orgs.Item.Teams.Item.Discussions.Item.Comments.Item.Reactions.ReactionsPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Orgs.Item.Teams.Item.Discussions.Item.Comments.Item.Reactions.ReactionsPostRequestBody(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "content", n => { Content = n.GetEnumValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteEnumValue("content", Content); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Teams/Item/Discussions/Item/Comments/Item/Reactions/ReactionsPostRequestBody_content.cs b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Teams/Item/Discussions/Item/Comments/Item/Reactions/ReactionsPostRequestBody_content.cs new file mode 100644 index 0000000..4ef73dc --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Teams/Item/Discussions/Item/Comments/Item/Reactions/ReactionsPostRequestBody_content.cs @@ -0,0 +1,43 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Orgs.Item.Teams.Item.Discussions.Item.Comments.Item.Reactions +{ + /// The [reaction type](https://docs.github.com/rest/reactions/reactions#about-reactions) to add to the team discussion comment. + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public enum ReactionsPostRequestBody_content + { + [EnumMember(Value = "+1")] + #pragma warning disable CS1591 + Plus_1, + #pragma warning restore CS1591 + [EnumMember(Value = "-1")] + #pragma warning disable CS1591 + Minus_1, + #pragma warning restore CS1591 + [EnumMember(Value = "laugh")] + #pragma warning disable CS1591 + Laugh, + #pragma warning restore CS1591 + [EnumMember(Value = "confused")] + #pragma warning disable CS1591 + Confused, + #pragma warning restore CS1591 + [EnumMember(Value = "heart")] + #pragma warning disable CS1591 + Heart, + #pragma warning restore CS1591 + [EnumMember(Value = "hooray")] + #pragma warning disable CS1591 + Hooray, + #pragma warning restore CS1591 + [EnumMember(Value = "rocket")] + #pragma warning disable CS1591 + Rocket, + #pragma warning restore CS1591 + [EnumMember(Value = "eyes")] + #pragma warning disable CS1591 + Eyes, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Teams/Item/Discussions/Item/Comments/Item/Reactions/ReactionsRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Teams/Item/Discussions/Item/Comments/Item/Reactions/ReactionsRequestBuilder.cs new file mode 100644 index 0000000..8db98cf --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Teams/Item/Discussions/Item/Comments/Item/Reactions/ReactionsRequestBuilder.cs @@ -0,0 +1,198 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Ayllu.Github.Client.Orgs.Item.Teams.Item.Discussions.Item.Comments.Item.Reactions.Item; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Orgs.Item.Teams.Item.Discussions.Item.Comments.Item.Reactions +{ + /// + /// Builds and executes requests for operations under \orgs\{org}\teams\{team_slug}\discussions\{discussion_number}\comments\{comment_number}\reactions + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class ReactionsRequestBuilder : BaseRequestBuilder + { + /// Gets an item from the Ayllu.Github.Client.orgs.item.teams.item.discussions.item.comments.item.reactions.item collection + /// The unique identifier of the reaction. + /// A + public global::Ayllu.Github.Client.Orgs.Item.Teams.Item.Discussions.Item.Comments.Item.Reactions.Item.WithReaction_ItemRequestBuilder this[int position] + { + get + { + var urlTplParams = new Dictionary(PathParameters); + urlTplParams.Add("reaction_id", position); + return new global::Ayllu.Github.Client.Orgs.Item.Teams.Item.Discussions.Item.Comments.Item.Reactions.Item.WithReaction_ItemRequestBuilder(urlTplParams, RequestAdapter); + } + } + /// Gets an item from the Ayllu.Github.Client.orgs.item.teams.item.discussions.item.comments.item.reactions.item collection + /// The unique identifier of the reaction. + /// A + [Obsolete("This indexer is deprecated and will be removed in the next major version. Use the one with the typed parameter instead.")] + public global::Ayllu.Github.Client.Orgs.Item.Teams.Item.Discussions.Item.Comments.Item.Reactions.Item.WithReaction_ItemRequestBuilder this[string position] + { + get + { + var urlTplParams = new Dictionary(PathParameters); + if (!string.IsNullOrWhiteSpace(position)) urlTplParams.Add("reaction_id", position); + return new global::Ayllu.Github.Client.Orgs.Item.Teams.Item.Discussions.Item.Comments.Item.Reactions.Item.WithReaction_ItemRequestBuilder(urlTplParams, RequestAdapter); + } + } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public ReactionsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}/reactions{?content*,page*,per_page*}", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public ReactionsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}/reactions{?content*,page*,per_page*}", rawUrl) + { + } + /// + /// List the reactions to a [team discussion comment](https://docs.github.com/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. + /// API method documentation + /// + /// A List<global::Ayllu.Github.Client.Models.Reaction> + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task?> GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task> GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var collectionResult = await RequestAdapter.SendCollectionAsync(requestInfo, global::Ayllu.Github.Client.Models.Reaction.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false); + return collectionResult?.AsList(); + } + /// + /// Create a reaction to a [team discussion comment](https://docs.github.com/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. + /// API method documentation + /// + /// A + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PostAsync(global::Ayllu.Github.Client.Orgs.Item.Teams.Item.Discussions.Item.Comments.Item.Reactions.ReactionsPostRequestBody body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task PostAsync(global::Ayllu.Github.Client.Orgs.Item.Teams.Item.Discussions.Item.Comments.Item.Reactions.ReactionsPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPostRequestInformation(body, requestConfiguration); + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Models.Reaction.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false); + } + /// + /// List the reactions to a [team discussion comment](https://docs.github.com/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. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Create a reaction to a [team discussion comment](https://docs.github.com/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. + /// + /// A + /// The request body + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPostRequestInformation(global::Ayllu.Github.Client.Orgs.Item.Teams.Item.Discussions.Item.Comments.Item.Reactions.ReactionsPostRequestBody body, Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToPostRequestInformation(global::Ayllu.Github.Client.Orgs.Item.Teams.Item.Discussions.Item.Comments.Item.Reactions.ReactionsPostRequestBody body, Action> requestConfiguration = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.Orgs.Item.Teams.Item.Discussions.Item.Comments.Item.Reactions.ReactionsRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Orgs.Item.Teams.Item.Discussions.Item.Comments.Item.Reactions.ReactionsRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// List the reactions to a [team discussion comment](https://docs.github.com/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. + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class ReactionsRequestBuilderGetQueryParameters + { + /// Returns a single [reaction type](https://docs.github.com/rest/reactions/reactions#about-reactions). Omit this parameter to list all reactions to a team discussion comment. + [Obsolete("This property is deprecated, use ContentAsGetContentQueryParameterType instead")] +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("content")] + public string? Content { get; set; } +#nullable restore +#else + [QueryParameter("content")] + public string Content { get; set; } +#endif + /// Returns a single [reaction type](https://docs.github.com/rest/reactions/reactions#about-reactions). Omit this parameter to list all reactions to a team discussion comment. + [QueryParameter("content")] + public global::Ayllu.Github.Client.Orgs.Item.Teams.Item.Discussions.Item.Comments.Item.Reactions.GetContentQueryParameterType? ContentAsGetContentQueryParameterType { get; set; } + /// The page number of the results to fetch. For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." + [QueryParameter("page")] + public int? Page { get; set; } + /// The number of results per page (max 100). For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." + [QueryParameter("per_page")] + public int? PerPage { get; set; } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class ReactionsRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class ReactionsRequestBuilderPostRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Teams/Item/Discussions/Item/Comments/Item/WithComment_numberItemRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Teams/Item/Discussions/Item/Comments/Item/WithComment_numberItemRequestBuilder.cs new file mode 100644 index 0000000..37ba75f --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Teams/Item/Discussions/Item/Comments/Item/WithComment_numberItemRequestBuilder.cs @@ -0,0 +1,194 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Ayllu.Github.Client.Orgs.Item.Teams.Item.Discussions.Item.Comments.Item.Reactions; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Orgs.Item.Teams.Item.Discussions.Item.Comments.Item +{ + /// + /// Builds and executes requests for operations under \orgs\{org}\teams\{team_slug}\discussions\{discussion_number}\comments\{comment_number} + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithComment_numberItemRequestBuilder : BaseRequestBuilder + { + /// The reactions property + public global::Ayllu.Github.Client.Orgs.Item.Teams.Item.Discussions.Item.Comments.Item.Reactions.ReactionsRequestBuilder Reactions + { + get => new global::Ayllu.Github.Client.Orgs.Item.Teams.Item.Discussions.Item.Comments.Item.Reactions.ReactionsRequestBuilder(PathParameters, RequestAdapter); + } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public WithComment_numberItemRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public WithComment_numberItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}", rawUrl) + { + } + /// + /// 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 + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task DeleteAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task DeleteAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToDeleteRequestInformation(requestConfiguration); + await RequestAdapter.SendNoContentAsync(requestInfo, default, cancellationToken).ConfigureAwait(false); + } + /// + /// 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. + /// API method documentation + /// + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Models.TeamDiscussionComment.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false); + } + /// + /// 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. + /// API method documentation + /// + /// A + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PatchAsync(global::Ayllu.Github.Client.Orgs.Item.Teams.Item.Discussions.Item.Comments.Item.WithComment_numberPatchRequestBody body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task PatchAsync(global::Ayllu.Github.Client.Orgs.Item.Teams.Item.Discussions.Item.Comments.Item.WithComment_numberPatchRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPatchRequestInformation(body, requestConfiguration); + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Models.TeamDiscussionComment.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false); + } + /// + /// 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. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToDeleteRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToDeleteRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.DELETE, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + return requestInfo; + } + /// + /// 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. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// 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. + /// + /// A + /// The request body + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPatchRequestInformation(global::Ayllu.Github.Client.Orgs.Item.Teams.Item.Discussions.Item.Comments.Item.WithComment_numberPatchRequestBody body, Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToPatchRequestInformation(global::Ayllu.Github.Client.Orgs.Item.Teams.Item.Discussions.Item.Comments.Item.WithComment_numberPatchRequestBody body, Action> requestConfiguration = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.Orgs.Item.Teams.Item.Discussions.Item.Comments.Item.WithComment_numberItemRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Orgs.Item.Teams.Item.Discussions.Item.Comments.Item.WithComment_numberItemRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithComment_numberItemRequestBuilderDeleteRequestConfiguration : RequestConfiguration + { + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithComment_numberItemRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithComment_numberItemRequestBuilderPatchRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Teams/Item/Discussions/Item/Comments/Item/WithComment_numberPatchRequestBody.cs b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Teams/Item/Discussions/Item/Comments/Item/WithComment_numberPatchRequestBody.cs new file mode 100644 index 0000000..7a471ed --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Teams/Item/Discussions/Item/Comments/Item/WithComment_numberPatchRequestBody.cs @@ -0,0 +1,65 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Orgs.Item.Teams.Item.Discussions.Item.Comments.Item +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class WithComment_numberPatchRequestBody : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The discussion comment's body text. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Body { get; set; } +#nullable restore +#else + public string Body { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public WithComment_numberPatchRequestBody() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Orgs.Item.Teams.Item.Discussions.Item.Comments.Item.WithComment_numberPatchRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Orgs.Item.Teams.Item.Discussions.Item.Comments.Item.WithComment_numberPatchRequestBody(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "body", n => { Body = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("body", Body); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Teams/Item/Discussions/Item/Reactions/GetContentQueryParameterType.cs b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Teams/Item/Discussions/Item/Reactions/GetContentQueryParameterType.cs new file mode 100644 index 0000000..d8e9700 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Teams/Item/Discussions/Item/Reactions/GetContentQueryParameterType.cs @@ -0,0 +1,44 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Orgs.Item.Teams.Item.Discussions.Item.Reactions +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public enum GetContentQueryParameterType + #pragma warning restore CS1591 + { + [EnumMember(Value = "+1")] + #pragma warning disable CS1591 + Plus_1, + #pragma warning restore CS1591 + [EnumMember(Value = "-1")] + #pragma warning disable CS1591 + Minus_1, + #pragma warning restore CS1591 + [EnumMember(Value = "laugh")] + #pragma warning disable CS1591 + Laugh, + #pragma warning restore CS1591 + [EnumMember(Value = "confused")] + #pragma warning disable CS1591 + Confused, + #pragma warning restore CS1591 + [EnumMember(Value = "heart")] + #pragma warning disable CS1591 + Heart, + #pragma warning restore CS1591 + [EnumMember(Value = "hooray")] + #pragma warning disable CS1591 + Hooray, + #pragma warning restore CS1591 + [EnumMember(Value = "rocket")] + #pragma warning disable CS1591 + Rocket, + #pragma warning restore CS1591 + [EnumMember(Value = "eyes")] + #pragma warning disable CS1591 + Eyes, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Teams/Item/Discussions/Item/Reactions/Item/WithReaction_ItemRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Teams/Item/Discussions/Item/Reactions/Item/WithReaction_ItemRequestBuilder.cs new file mode 100644 index 0000000..589b33d --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Teams/Item/Discussions/Item/Reactions/Item/WithReaction_ItemRequestBuilder.cs @@ -0,0 +1,90 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Orgs.Item.Teams.Item.Discussions.Item.Reactions.Item +{ + /// + /// Builds and executes requests for operations under \orgs\{org}\teams\{team_slug}\discussions\{discussion_number}\reactions\{reaction_id} + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithReaction_ItemRequestBuilder : BaseRequestBuilder + { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public WithReaction_ItemRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/reactions/{reaction_id}", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public WithReaction_ItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/reactions/{reaction_id}", rawUrl) + { + } + /// + /// > [!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/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 + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task DeleteAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task DeleteAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToDeleteRequestInformation(requestConfiguration); + await RequestAdapter.SendNoContentAsync(requestInfo, default, cancellationToken).ConfigureAwait(false); + } + /// + /// > [!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/rest/teams/discussions#get-a-discussion).OAuth app tokens and personal access tokens (classic) need the `write:discussion` scope to use this endpoint. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToDeleteRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToDeleteRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.DELETE, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.Orgs.Item.Teams.Item.Discussions.Item.Reactions.Item.WithReaction_ItemRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Orgs.Item.Teams.Item.Discussions.Item.Reactions.Item.WithReaction_ItemRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithReaction_ItemRequestBuilderDeleteRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Teams/Item/Discussions/Item/Reactions/ReactionsPostRequestBody.cs b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Teams/Item/Discussions/Item/Reactions/ReactionsPostRequestBody.cs new file mode 100644 index 0000000..4153913 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Teams/Item/Discussions/Item/Reactions/ReactionsPostRequestBody.cs @@ -0,0 +1,59 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Orgs.Item.Teams.Item.Discussions.Item.Reactions +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class ReactionsPostRequestBody : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The [reaction type](https://docs.github.com/rest/reactions/reactions#about-reactions) to add to the team discussion. + public global::Ayllu.Github.Client.Orgs.Item.Teams.Item.Discussions.Item.Reactions.ReactionsPostRequestBody_content? Content { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public ReactionsPostRequestBody() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Orgs.Item.Teams.Item.Discussions.Item.Reactions.ReactionsPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Orgs.Item.Teams.Item.Discussions.Item.Reactions.ReactionsPostRequestBody(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "content", n => { Content = n.GetEnumValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteEnumValue("content", Content); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Teams/Item/Discussions/Item/Reactions/ReactionsPostRequestBody_content.cs b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Teams/Item/Discussions/Item/Reactions/ReactionsPostRequestBody_content.cs new file mode 100644 index 0000000..0234199 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Teams/Item/Discussions/Item/Reactions/ReactionsPostRequestBody_content.cs @@ -0,0 +1,43 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Orgs.Item.Teams.Item.Discussions.Item.Reactions +{ + /// The [reaction type](https://docs.github.com/rest/reactions/reactions#about-reactions) to add to the team discussion. + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public enum ReactionsPostRequestBody_content + { + [EnumMember(Value = "+1")] + #pragma warning disable CS1591 + Plus_1, + #pragma warning restore CS1591 + [EnumMember(Value = "-1")] + #pragma warning disable CS1591 + Minus_1, + #pragma warning restore CS1591 + [EnumMember(Value = "laugh")] + #pragma warning disable CS1591 + Laugh, + #pragma warning restore CS1591 + [EnumMember(Value = "confused")] + #pragma warning disable CS1591 + Confused, + #pragma warning restore CS1591 + [EnumMember(Value = "heart")] + #pragma warning disable CS1591 + Heart, + #pragma warning restore CS1591 + [EnumMember(Value = "hooray")] + #pragma warning disable CS1591 + Hooray, + #pragma warning restore CS1591 + [EnumMember(Value = "rocket")] + #pragma warning disable CS1591 + Rocket, + #pragma warning restore CS1591 + [EnumMember(Value = "eyes")] + #pragma warning disable CS1591 + Eyes, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Teams/Item/Discussions/Item/Reactions/ReactionsRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Teams/Item/Discussions/Item/Reactions/ReactionsRequestBuilder.cs new file mode 100644 index 0000000..433a732 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Teams/Item/Discussions/Item/Reactions/ReactionsRequestBuilder.cs @@ -0,0 +1,198 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Ayllu.Github.Client.Orgs.Item.Teams.Item.Discussions.Item.Reactions.Item; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Orgs.Item.Teams.Item.Discussions.Item.Reactions +{ + /// + /// Builds and executes requests for operations under \orgs\{org}\teams\{team_slug}\discussions\{discussion_number}\reactions + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class ReactionsRequestBuilder : BaseRequestBuilder + { + /// Gets an item from the Ayllu.Github.Client.orgs.item.teams.item.discussions.item.reactions.item collection + /// The unique identifier of the reaction. + /// A + public global::Ayllu.Github.Client.Orgs.Item.Teams.Item.Discussions.Item.Reactions.Item.WithReaction_ItemRequestBuilder this[int position] + { + get + { + var urlTplParams = new Dictionary(PathParameters); + urlTplParams.Add("reaction_id", position); + return new global::Ayllu.Github.Client.Orgs.Item.Teams.Item.Discussions.Item.Reactions.Item.WithReaction_ItemRequestBuilder(urlTplParams, RequestAdapter); + } + } + /// Gets an item from the Ayllu.Github.Client.orgs.item.teams.item.discussions.item.reactions.item collection + /// The unique identifier of the reaction. + /// A + [Obsolete("This indexer is deprecated and will be removed in the next major version. Use the one with the typed parameter instead.")] + public global::Ayllu.Github.Client.Orgs.Item.Teams.Item.Discussions.Item.Reactions.Item.WithReaction_ItemRequestBuilder this[string position] + { + get + { + var urlTplParams = new Dictionary(PathParameters); + if (!string.IsNullOrWhiteSpace(position)) urlTplParams.Add("reaction_id", position); + return new global::Ayllu.Github.Client.Orgs.Item.Teams.Item.Discussions.Item.Reactions.Item.WithReaction_ItemRequestBuilder(urlTplParams, RequestAdapter); + } + } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public ReactionsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/reactions{?content*,page*,per_page*}", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public ReactionsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/reactions{?content*,page*,per_page*}", rawUrl) + { + } + /// + /// List the reactions to a [team discussion](https://docs.github.com/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. + /// API method documentation + /// + /// A List<global::Ayllu.Github.Client.Models.Reaction> + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task?> GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task> GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var collectionResult = await RequestAdapter.SendCollectionAsync(requestInfo, global::Ayllu.Github.Client.Models.Reaction.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false); + return collectionResult?.AsList(); + } + /// + /// Create a reaction to a [team discussion](https://docs.github.com/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. + /// API method documentation + /// + /// A + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PostAsync(global::Ayllu.Github.Client.Orgs.Item.Teams.Item.Discussions.Item.Reactions.ReactionsPostRequestBody body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task PostAsync(global::Ayllu.Github.Client.Orgs.Item.Teams.Item.Discussions.Item.Reactions.ReactionsPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPostRequestInformation(body, requestConfiguration); + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Models.Reaction.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false); + } + /// + /// List the reactions to a [team discussion](https://docs.github.com/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. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Create a reaction to a [team discussion](https://docs.github.com/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. + /// + /// A + /// The request body + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPostRequestInformation(global::Ayllu.Github.Client.Orgs.Item.Teams.Item.Discussions.Item.Reactions.ReactionsPostRequestBody body, Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToPostRequestInformation(global::Ayllu.Github.Client.Orgs.Item.Teams.Item.Discussions.Item.Reactions.ReactionsPostRequestBody body, Action> requestConfiguration = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.Orgs.Item.Teams.Item.Discussions.Item.Reactions.ReactionsRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Orgs.Item.Teams.Item.Discussions.Item.Reactions.ReactionsRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// List the reactions to a [team discussion](https://docs.github.com/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. + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class ReactionsRequestBuilderGetQueryParameters + { + /// Returns a single [reaction type](https://docs.github.com/rest/reactions/reactions#about-reactions). Omit this parameter to list all reactions to a team discussion. + [Obsolete("This property is deprecated, use ContentAsGetContentQueryParameterType instead")] +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("content")] + public string? Content { get; set; } +#nullable restore +#else + [QueryParameter("content")] + public string Content { get; set; } +#endif + /// Returns a single [reaction type](https://docs.github.com/rest/reactions/reactions#about-reactions). Omit this parameter to list all reactions to a team discussion. + [QueryParameter("content")] + public global::Ayllu.Github.Client.Orgs.Item.Teams.Item.Discussions.Item.Reactions.GetContentQueryParameterType? ContentAsGetContentQueryParameterType { get; set; } + /// The page number of the results to fetch. For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." + [QueryParameter("page")] + public int? Page { get; set; } + /// The number of results per page (max 100). For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." + [QueryParameter("per_page")] + public int? PerPage { get; set; } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class ReactionsRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class ReactionsRequestBuilderPostRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Teams/Item/Discussions/Item/WithDiscussion_numberItemRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Teams/Item/Discussions/Item/WithDiscussion_numberItemRequestBuilder.cs new file mode 100644 index 0000000..dba77ee --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Teams/Item/Discussions/Item/WithDiscussion_numberItemRequestBuilder.cs @@ -0,0 +1,200 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Ayllu.Github.Client.Orgs.Item.Teams.Item.Discussions.Item.Comments; +using Ayllu.Github.Client.Orgs.Item.Teams.Item.Discussions.Item.Reactions; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Orgs.Item.Teams.Item.Discussions.Item +{ + /// + /// Builds and executes requests for operations under \orgs\{org}\teams\{team_slug}\discussions\{discussion_number} + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithDiscussion_numberItemRequestBuilder : BaseRequestBuilder + { + /// The comments property + public global::Ayllu.Github.Client.Orgs.Item.Teams.Item.Discussions.Item.Comments.CommentsRequestBuilder Comments + { + get => new global::Ayllu.Github.Client.Orgs.Item.Teams.Item.Discussions.Item.Comments.CommentsRequestBuilder(PathParameters, RequestAdapter); + } + /// The reactions property + public global::Ayllu.Github.Client.Orgs.Item.Teams.Item.Discussions.Item.Reactions.ReactionsRequestBuilder Reactions + { + get => new global::Ayllu.Github.Client.Orgs.Item.Teams.Item.Discussions.Item.Reactions.ReactionsRequestBuilder(PathParameters, RequestAdapter); + } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public WithDiscussion_numberItemRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/orgs/{org}/teams/{team_slug}/discussions/{discussion_number}", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public WithDiscussion_numberItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/orgs/{org}/teams/{team_slug}/discussions/{discussion_number}", rawUrl) + { + } + /// + /// 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 + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task DeleteAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task DeleteAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToDeleteRequestInformation(requestConfiguration); + await RequestAdapter.SendNoContentAsync(requestInfo, default, cancellationToken).ConfigureAwait(false); + } + /// + /// 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. + /// API method documentation + /// + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Models.TeamDiscussion.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false); + } + /// + /// 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. + /// API method documentation + /// + /// A + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PatchAsync(global::Ayllu.Github.Client.Orgs.Item.Teams.Item.Discussions.Item.WithDiscussion_numberPatchRequestBody body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task PatchAsync(global::Ayllu.Github.Client.Orgs.Item.Teams.Item.Discussions.Item.WithDiscussion_numberPatchRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPatchRequestInformation(body, requestConfiguration); + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Models.TeamDiscussion.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false); + } + /// + /// 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. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToDeleteRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToDeleteRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.DELETE, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + return requestInfo; + } + /// + /// 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. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// 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. + /// + /// A + /// The request body + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPatchRequestInformation(global::Ayllu.Github.Client.Orgs.Item.Teams.Item.Discussions.Item.WithDiscussion_numberPatchRequestBody body, Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToPatchRequestInformation(global::Ayllu.Github.Client.Orgs.Item.Teams.Item.Discussions.Item.WithDiscussion_numberPatchRequestBody body, Action> requestConfiguration = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.Orgs.Item.Teams.Item.Discussions.Item.WithDiscussion_numberItemRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Orgs.Item.Teams.Item.Discussions.Item.WithDiscussion_numberItemRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithDiscussion_numberItemRequestBuilderDeleteRequestConfiguration : RequestConfiguration + { + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithDiscussion_numberItemRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithDiscussion_numberItemRequestBuilderPatchRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Teams/Item/Discussions/Item/WithDiscussion_numberPatchRequestBody.cs b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Teams/Item/Discussions/Item/WithDiscussion_numberPatchRequestBody.cs new file mode 100644 index 0000000..0e503d7 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Teams/Item/Discussions/Item/WithDiscussion_numberPatchRequestBody.cs @@ -0,0 +1,75 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Orgs.Item.Teams.Item.Discussions.Item +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class WithDiscussion_numberPatchRequestBody : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The discussion post's body text. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Body { get; set; } +#nullable restore +#else + public string Body { get; set; } +#endif + /// The discussion post's title. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Title { get; set; } +#nullable restore +#else + public string Title { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public WithDiscussion_numberPatchRequestBody() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Orgs.Item.Teams.Item.Discussions.Item.WithDiscussion_numberPatchRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Orgs.Item.Teams.Item.Discussions.Item.WithDiscussion_numberPatchRequestBody(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "body", n => { Body = n.GetStringValue(); } }, + { "title", n => { Title = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("body", Body); + writer.WriteStringValue("title", Title); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Teams/Item/Invitations/InvitationsRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Teams/Item/Invitations/InvitationsRequestBuilder.cs new file mode 100644 index 0000000..238a1ed --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Teams/Item/Invitations/InvitationsRequestBuilder.cs @@ -0,0 +1,107 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Orgs.Item.Teams.Item.Invitations +{ + /// + /// Builds and executes requests for operations under \orgs\{org}\teams\{team_slug}\invitations + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class InvitationsRequestBuilder : BaseRequestBuilder + { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public InvitationsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/orgs/{org}/teams/{team_slug}/invitations{?page*,per_page*}", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public InvitationsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/orgs/{org}/teams/{team_slug}/invitations{?page*,per_page*}", rawUrl) + { + } + /// + /// 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 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`. + /// API method documentation + /// + /// A List<global::Ayllu.Github.Client.Models.OrganizationInvitation> + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task?> GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task> GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var collectionResult = await RequestAdapter.SendCollectionAsync(requestInfo, global::Ayllu.Github.Client.Models.OrganizationInvitation.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false); + return collectionResult?.AsList(); + } + /// + /// 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 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`. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.Orgs.Item.Teams.Item.Invitations.InvitationsRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Orgs.Item.Teams.Item.Invitations.InvitationsRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// 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 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`. + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class InvitationsRequestBuilderGetQueryParameters + { + /// The page number of the results to fetch. For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." + [QueryParameter("page")] + public int? Page { get; set; } + /// The number of results per page (max 100). For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." + [QueryParameter("per_page")] + public int? PerPage { get; set; } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class InvitationsRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Teams/Item/Members/GetRoleQueryParameterType.cs b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Teams/Item/Members/GetRoleQueryParameterType.cs new file mode 100644 index 0000000..4bb68e6 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Teams/Item/Members/GetRoleQueryParameterType.cs @@ -0,0 +1,24 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Orgs.Item.Teams.Item.Members +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public enum GetRoleQueryParameterType + #pragma warning restore CS1591 + { + [EnumMember(Value = "member")] + #pragma warning disable CS1591 + Member, + #pragma warning restore CS1591 + [EnumMember(Value = "maintainer")] + #pragma warning disable CS1591 + Maintainer, + #pragma warning restore CS1591 + [EnumMember(Value = "all")] + #pragma warning disable CS1591 + All, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Teams/Item/Members/MembersRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Teams/Item/Members/MembersRequestBuilder.cs new file mode 100644 index 0000000..0957ee3 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Teams/Item/Members/MembersRequestBuilder.cs @@ -0,0 +1,121 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Orgs.Item.Teams.Item.Members +{ + /// + /// Builds and executes requests for operations under \orgs\{org}\teams\{team_slug}\members + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class MembersRequestBuilder : BaseRequestBuilder + { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public MembersRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/orgs/{org}/teams/{team_slug}/members{?page*,per_page*,role*}", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public MembersRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/orgs/{org}/teams/{team_slug}/members{?page*,per_page*,role*}", rawUrl) + { + } + /// + /// Team members will include the members of child teams.To list members in a team, the team must be visible to the authenticated user. + /// API method documentation + /// + /// A List<global::Ayllu.Github.Client.Models.SimpleUser> + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task?> GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task> GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var collectionResult = await RequestAdapter.SendCollectionAsync(requestInfo, global::Ayllu.Github.Client.Models.SimpleUser.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false); + return collectionResult?.AsList(); + } + /// + /// Team members will include the members of child teams.To list members in a team, the team must be visible to the authenticated user. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.Orgs.Item.Teams.Item.Members.MembersRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Orgs.Item.Teams.Item.Members.MembersRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Team members will include the members of child teams.To list members in a team, the team must be visible to the authenticated user. + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class MembersRequestBuilderGetQueryParameters + { + /// The page number of the results to fetch. For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." + [QueryParameter("page")] + public int? Page { get; set; } + /// The number of results per page (max 100). For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." + [QueryParameter("per_page")] + public int? PerPage { get; set; } + /// Filters members returned by their role in the team. + [Obsolete("This property is deprecated, use RoleAsGetRoleQueryParameterType instead")] +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("role")] + public string? Role { get; set; } +#nullable restore +#else + [QueryParameter("role")] + public string Role { get; set; } +#endif + /// Filters members returned by their role in the team. + [QueryParameter("role")] + public global::Ayllu.Github.Client.Orgs.Item.Teams.Item.Members.GetRoleQueryParameterType? RoleAsGetRoleQueryParameterType { get; set; } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class MembersRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Teams/Item/Memberships/Item/WithUsernameItemRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Teams/Item/Memberships/Item/WithUsernameItemRequestBuilder.cs new file mode 100644 index 0000000..bdfe54c --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Teams/Item/Memberships/Item/WithUsernameItemRequestBuilder.cs @@ -0,0 +1,188 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Orgs.Item.Teams.Item.Memberships.Item +{ + /// + /// Builds and executes requests for operations under \orgs\{org}\teams\{team_slug}\memberships\{username} + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithUsernameItemRequestBuilder : BaseRequestBuilder + { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public WithUsernameItemRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/orgs/{org}/teams/{team_slug}/memberships/{username}", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public WithUsernameItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/orgs/{org}/teams/{team_slug}/memberships/{username}", rawUrl) + { + } + /// + /// 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/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 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](https://docs.github.com/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 + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task DeleteAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task DeleteAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToDeleteRequestInformation(requestConfiguration); + await RequestAdapter.SendNoContentAsync(requestInfo, default, cancellationToken).ConfigureAwait(false); + } + /// + /// 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/rest/teams/teams#create-a-team). + /// API method documentation + /// + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Models.TeamMembership.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false); + } + /// + /// 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/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 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](https://docs.github.com/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}`. + /// API method documentation + /// + /// A + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PutAsync(global::Ayllu.Github.Client.Orgs.Item.Teams.Item.Memberships.Item.WithUsernamePutRequestBody body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task PutAsync(global::Ayllu.Github.Client.Orgs.Item.Teams.Item.Memberships.Item.WithUsernamePutRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPutRequestInformation(body, requestConfiguration); + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Models.TeamMembership.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false); + } + /// + /// 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/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 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](https://docs.github.com/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}`. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToDeleteRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToDeleteRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.DELETE, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + return requestInfo; + } + /// + /// 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/rest/teams/teams#create-a-team). + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// 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/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 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](https://docs.github.com/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}`. + /// + /// A + /// The request body + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPutRequestInformation(global::Ayllu.Github.Client.Orgs.Item.Teams.Item.Memberships.Item.WithUsernamePutRequestBody body, Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToPutRequestInformation(global::Ayllu.Github.Client.Orgs.Item.Teams.Item.Memberships.Item.WithUsernamePutRequestBody body, Action> requestConfiguration = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation(Method.PUT, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.Orgs.Item.Teams.Item.Memberships.Item.WithUsernameItemRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Orgs.Item.Teams.Item.Memberships.Item.WithUsernameItemRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithUsernameItemRequestBuilderDeleteRequestConfiguration : RequestConfiguration + { + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithUsernameItemRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithUsernameItemRequestBuilderPutRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Teams/Item/Memberships/Item/WithUsernamePutRequestBody.cs b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Teams/Item/Memberships/Item/WithUsernamePutRequestBody.cs new file mode 100644 index 0000000..27f7d73 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Teams/Item/Memberships/Item/WithUsernamePutRequestBody.cs @@ -0,0 +1,60 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Orgs.Item.Teams.Item.Memberships.Item +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class WithUsernamePutRequestBody : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The role that this user should have in the team. + public global::Ayllu.Github.Client.Orgs.Item.Teams.Item.Memberships.Item.WithUsernamePutRequestBody_role? Role { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public WithUsernamePutRequestBody() + { + AdditionalData = new Dictionary(); + Role = global::Ayllu.Github.Client.Orgs.Item.Teams.Item.Memberships.Item.WithUsernamePutRequestBody_role.Member; + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Orgs.Item.Teams.Item.Memberships.Item.WithUsernamePutRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Orgs.Item.Teams.Item.Memberships.Item.WithUsernamePutRequestBody(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "role", n => { Role = n.GetEnumValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteEnumValue("role", Role); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Teams/Item/Memberships/Item/WithUsernamePutRequestBody_role.cs b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Teams/Item/Memberships/Item/WithUsernamePutRequestBody_role.cs new file mode 100644 index 0000000..f1829e4 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Teams/Item/Memberships/Item/WithUsernamePutRequestBody_role.cs @@ -0,0 +1,19 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Orgs.Item.Teams.Item.Memberships.Item +{ + /// The role that this user should have in the team. + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public enum WithUsernamePutRequestBody_role + { + [EnumMember(Value = "member")] + #pragma warning disable CS1591 + Member, + #pragma warning restore CS1591 + [EnumMember(Value = "maintainer")] + #pragma warning disable CS1591 + Maintainer, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Teams/Item/Memberships/MembershipsRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Teams/Item/Memberships/MembershipsRequestBuilder.cs new file mode 100644 index 0000000..6be599f --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Teams/Item/Memberships/MembershipsRequestBuilder.cs @@ -0,0 +1,48 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Orgs.Item.Teams.Item.Memberships.Item; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System; +namespace Ayllu.Github.Client.Orgs.Item.Teams.Item.Memberships +{ + /// + /// Builds and executes requests for operations under \orgs\{org}\teams\{team_slug}\memberships + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class MembershipsRequestBuilder : BaseRequestBuilder + { + /// Gets an item from the Ayllu.Github.Client.orgs.item.teams.item.memberships.item collection + /// The handle for the GitHub user account. + /// A + public global::Ayllu.Github.Client.Orgs.Item.Teams.Item.Memberships.Item.WithUsernameItemRequestBuilder this[string position] + { + get + { + var urlTplParams = new Dictionary(PathParameters); + urlTplParams.Add("username", position); + return new global::Ayllu.Github.Client.Orgs.Item.Teams.Item.Memberships.Item.WithUsernameItemRequestBuilder(urlTplParams, RequestAdapter); + } + } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public MembershipsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/orgs/{org}/teams/{team_slug}/memberships", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public MembershipsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/orgs/{org}/teams/{team_slug}/memberships", rawUrl) + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Teams/Item/Projects/Item/WithProject_403Error.cs b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Teams/Item/Projects/Item/WithProject_403Error.cs new file mode 100644 index 0000000..a5840a3 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Teams/Item/Projects/Item/WithProject_403Error.cs @@ -0,0 +1,78 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Orgs.Item.Teams.Item.Projects.Item +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class WithProject_403Error : ApiException, IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The documentation_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? DocumentationUrl { get; set; } +#nullable restore +#else + public string DocumentationUrl { get; set; } +#endif + /// The primary error message. + public override string Message { get => MessageEscaped ?? string.Empty; } + /// The message property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? MessageEscaped { get; set; } +#nullable restore +#else + public string MessageEscaped { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public WithProject_403Error() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Orgs.Item.Teams.Item.Projects.Item.WithProject_403Error CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Orgs.Item.Teams.Item.Projects.Item.WithProject_403Error(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "documentation_url", n => { DocumentationUrl = n.GetStringValue(); } }, + { "message", n => { MessageEscaped = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("documentation_url", DocumentationUrl); + writer.WriteStringValue("message", MessageEscaped); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Teams/Item/Projects/Item/WithProject_ItemRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Teams/Item/Projects/Item/WithProject_ItemRequestBuilder.cs new file mode 100644 index 0000000..ca38720 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Teams/Item/Projects/Item/WithProject_ItemRequestBuilder.cs @@ -0,0 +1,199 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Orgs.Item.Teams.Item.Projects.Item +{ + /// + /// Builds and executes requests for operations under \orgs\{org}\teams\{team_slug}\projects\{project_id} + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithProject_ItemRequestBuilder : BaseRequestBuilder + { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public WithProject_ItemRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/orgs/{org}/teams/{team_slug}/projects/{project_id}", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public WithProject_ItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/orgs/{org}/teams/{team_slug}/projects/{project_id}", rawUrl) + { + } + /// + /// > [!WARNING]> **Closing down notice:** Projects (classic) is being deprecated in favor of the new Projects experience.> See the [changelog](https://github.blog/changelog/2024-05-23-sunset-notice-projects-classic/) for more information. + /// API method documentation + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + [Obsolete("")] +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task DeleteAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task DeleteAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToDeleteRequestInformation(requestConfiguration); + await RequestAdapter.SendNoContentAsync(requestInfo, default, cancellationToken).ConfigureAwait(false); + } + /// + /// > [!WARNING]> **Closing down notice:** Projects (classic) is being deprecated in favor of the new Projects experience.> See the [changelog](https://github.blog/changelog/2024-05-23-sunset-notice-projects-classic/) for more information. + /// API method documentation + /// + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + [Obsolete("")] +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Models.TeamProject.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false); + } + /// + /// > [!WARNING]> **Closing down notice:** Projects (classic) is being deprecated in favor of the new Projects experience.> See the [changelog](https://github.blog/changelog/2024-05-23-sunset-notice-projects-classic/) for more information. + /// API method documentation + /// + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 403 status code + [Obsolete("")] +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PutAsync(global::Ayllu.Github.Client.Orgs.Item.Teams.Item.Projects.Item.WithProject_PutRequestBody body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task PutAsync(global::Ayllu.Github.Client.Orgs.Item.Teams.Item.Projects.Item.WithProject_PutRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPutRequestInformation(body, requestConfiguration); + var errorMapping = new Dictionary> + { + { "403", global::Ayllu.Github.Client.Orgs.Item.Teams.Item.Projects.Item.WithProject_403Error.CreateFromDiscriminatorValue }, + }; + await RequestAdapter.SendNoContentAsync(requestInfo, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// > [!WARNING]> **Closing down notice:** Projects (classic) is being deprecated in favor of the new Projects experience.> See the [changelog](https://github.blog/changelog/2024-05-23-sunset-notice-projects-classic/) for more information. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. + [Obsolete("")] +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToDeleteRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToDeleteRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.DELETE, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + return requestInfo; + } + /// + /// > [!WARNING]> **Closing down notice:** Projects (classic) is being deprecated in favor of the new Projects experience.> See the [changelog](https://github.blog/changelog/2024-05-23-sunset-notice-projects-classic/) for more information. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. + [Obsolete("")] +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// > [!WARNING]> **Closing down notice:** Projects (classic) is being deprecated in favor of the new Projects experience.> See the [changelog](https://github.blog/changelog/2024-05-23-sunset-notice-projects-classic/) for more information. + /// + /// A + /// The request body + /// Configuration for the request such as headers, query parameters, and middleware options. + [Obsolete("")] +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPutRequestInformation(global::Ayllu.Github.Client.Orgs.Item.Teams.Item.Projects.Item.WithProject_PutRequestBody body, Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToPutRequestInformation(global::Ayllu.Github.Client.Orgs.Item.Teams.Item.Projects.Item.WithProject_PutRequestBody body, Action> requestConfiguration = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation(Method.PUT, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + [Obsolete("")] + public global::Ayllu.Github.Client.Orgs.Item.Teams.Item.Projects.Item.WithProject_ItemRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Orgs.Item.Teams.Item.Projects.Item.WithProject_ItemRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithProject_ItemRequestBuilderDeleteRequestConfiguration : RequestConfiguration + { + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithProject_ItemRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithProject_ItemRequestBuilderPutRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Teams/Item/Projects/Item/WithProject_PutRequestBody.cs b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Teams/Item/Projects/Item/WithProject_PutRequestBody.cs new file mode 100644 index 0000000..64a7a25 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Teams/Item/Projects/Item/WithProject_PutRequestBody.cs @@ -0,0 +1,59 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Orgs.Item.Teams.Item.Projects.Item +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class WithProject_PutRequestBody : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The permission to grant to the team for this project. Default: the team's `permission` attribute will be used to determine what permission to grant the team on this project. Note that, if you choose not to pass any parameters, you'll need to set `Content-Length` to zero when calling this endpoint. For more information, see "[HTTP method](https://docs.github.com/rest/guides/getting-started-with-the-rest-api#http-method)." + public global::Ayllu.Github.Client.Orgs.Item.Teams.Item.Projects.Item.WithProject_PutRequestBody_permission? Permission { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public WithProject_PutRequestBody() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Orgs.Item.Teams.Item.Projects.Item.WithProject_PutRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Orgs.Item.Teams.Item.Projects.Item.WithProject_PutRequestBody(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "permission", n => { Permission = n.GetEnumValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteEnumValue("permission", Permission); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Teams/Item/Projects/Item/WithProject_PutRequestBody_permission.cs b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Teams/Item/Projects/Item/WithProject_PutRequestBody_permission.cs new file mode 100644 index 0000000..9938610 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Teams/Item/Projects/Item/WithProject_PutRequestBody_permission.cs @@ -0,0 +1,23 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Orgs.Item.Teams.Item.Projects.Item +{ + /// The permission to grant to the team for this project. Default: the team's `permission` attribute will be used to determine what permission to grant the team on this project. Note that, if you choose not to pass any parameters, you'll need to set `Content-Length` to zero when calling this endpoint. For more information, see "[HTTP method](https://docs.github.com/rest/guides/getting-started-with-the-rest-api#http-method)." + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public enum WithProject_PutRequestBody_permission + { + [EnumMember(Value = "read")] + #pragma warning disable CS1591 + Read, + #pragma warning restore CS1591 + [EnumMember(Value = "write")] + #pragma warning disable CS1591 + Write, + #pragma warning restore CS1591 + [EnumMember(Value = "admin")] + #pragma warning disable CS1591 + Admin, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Teams/Item/Projects/ProjectsRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Teams/Item/Projects/ProjectsRequestBuilder.cs new file mode 100644 index 0000000..a3f6159 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Teams/Item/Projects/ProjectsRequestBuilder.cs @@ -0,0 +1,137 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Ayllu.Github.Client.Orgs.Item.Teams.Item.Projects.Item; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Orgs.Item.Teams.Item.Projects +{ + /// + /// Builds and executes requests for operations under \orgs\{org}\teams\{team_slug}\projects + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class ProjectsRequestBuilder : BaseRequestBuilder + { + /// Gets an item from the Ayllu.Github.Client.orgs.item.teams.item.projects.item collection + /// The unique identifier of the project. + /// A + [Obsolete("")] + public global::Ayllu.Github.Client.Orgs.Item.Teams.Item.Projects.Item.WithProject_ItemRequestBuilder this[int position] + { + get + { + var urlTplParams = new Dictionary(PathParameters); + urlTplParams.Add("project_id", position); + return new global::Ayllu.Github.Client.Orgs.Item.Teams.Item.Projects.Item.WithProject_ItemRequestBuilder(urlTplParams, RequestAdapter); + } + } + /// Gets an item from the Ayllu.Github.Client.orgs.item.teams.item.projects.item collection + /// The unique identifier of the project. + /// A + [Obsolete("This indexer is deprecated and will be removed in the next major version. Use the one with the typed parameter instead.")] + public global::Ayllu.Github.Client.Orgs.Item.Teams.Item.Projects.Item.WithProject_ItemRequestBuilder this[string position] + { + get + { + var urlTplParams = new Dictionary(PathParameters); + if (!string.IsNullOrWhiteSpace(position)) urlTplParams.Add("project_id", position); + return new global::Ayllu.Github.Client.Orgs.Item.Teams.Item.Projects.Item.WithProject_ItemRequestBuilder(urlTplParams, RequestAdapter); + } + } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public ProjectsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/orgs/{org}/teams/{team_slug}/projects{?page*,per_page*}", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public ProjectsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/orgs/{org}/teams/{team_slug}/projects{?page*,per_page*}", rawUrl) + { + } + /// + /// > [!WARNING]> **Closing down notice:** Projects (classic) is being deprecated in favor of the new Projects experience.> See the [changelog](https://github.blog/changelog/2024-05-23-sunset-notice-projects-classic/) for more information. + /// API method documentation + /// + /// A List<global::Ayllu.Github.Client.Models.TeamProject> + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + [Obsolete("")] +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task?> GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task> GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var collectionResult = await RequestAdapter.SendCollectionAsync(requestInfo, global::Ayllu.Github.Client.Models.TeamProject.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false); + return collectionResult?.AsList(); + } + /// + /// > [!WARNING]> **Closing down notice:** Projects (classic) is being deprecated in favor of the new Projects experience.> See the [changelog](https://github.blog/changelog/2024-05-23-sunset-notice-projects-classic/) for more information. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. + [Obsolete("")] +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + [Obsolete("")] + public global::Ayllu.Github.Client.Orgs.Item.Teams.Item.Projects.ProjectsRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Orgs.Item.Teams.Item.Projects.ProjectsRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// > [!WARNING]> **Closing down notice:** Projects (classic) is being deprecated in favor of the new Projects experience.> See the [changelog](https://github.blog/changelog/2024-05-23-sunset-notice-projects-classic/) for more information. + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class ProjectsRequestBuilderGetQueryParameters + { + /// The page number of the results to fetch. For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." + [QueryParameter("page")] + public int? Page { get; set; } + /// The number of results per page (max 100). For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." + [QueryParameter("per_page")] + public int? PerPage { get; set; } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class ProjectsRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Teams/Item/Repos/Item/Item/WithRepoItemRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Teams/Item/Repos/Item/Item/WithRepoItemRequestBuilder.cs new file mode 100644 index 0000000..4950048 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Teams/Item/Repos/Item/Item/WithRepoItemRequestBuilder.cs @@ -0,0 +1,186 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Orgs.Item.Teams.Item.Repos.Item.Item +{ + /// + /// Builds and executes requests for operations under \orgs\{org}\teams\{team_slug}\repos\{owner}\{repo} + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithRepoItemRequestBuilder : BaseRequestBuilder + { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public WithRepoItemRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/orgs/{org}/teams/{team_slug}/repos/{owner}/{repo}", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public WithRepoItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/orgs/{org}/teams/{team_slug}/repos/{owner}/{repo}", rawUrl) + { + } + /// + /// 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 + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task DeleteAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task DeleteAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToDeleteRequestInformation(requestConfiguration); + await RequestAdapter.SendNoContentAsync(requestInfo, default, cancellationToken).ConfigureAwait(false); + } + /// + /// Checks whether a team has `admin`, `push`, `maintain`, `triage`, or `pull` permission for a repository. Repositories inherited through a parent team will also be checked.You can also get information about the specified repository, including what permissions the team grants on it, by passing the following custom [media type](https://docs.github.com/rest/using-the-rest-api/getting-started-with-the-rest-api#media-types/) via the `application/vnd.github.v3.repository+json` accept header.If a team doesn't have permission for the repository, you will receive a `404 Not Found` response status.If the repository is private, you must have at least `read` permission for that repository, and your token must have the `repo` or `admin:org` scope. Otherwise, you will receive a `404 Not Found` response status.> [!NOTE]> You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/repos/{owner}/{repo}`. + /// API method documentation + /// + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Models.TeamRepository.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false); + } + /// + /// 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/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/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 + /// + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PutAsync(global::Ayllu.Github.Client.Orgs.Item.Teams.Item.Repos.Item.Item.WithRepoPutRequestBody body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task PutAsync(global::Ayllu.Github.Client.Orgs.Item.Teams.Item.Repos.Item.Item.WithRepoPutRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPutRequestInformation(body, requestConfiguration); + await RequestAdapter.SendNoContentAsync(requestInfo, default, cancellationToken).ConfigureAwait(false); + } + /// + /// 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}`. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToDeleteRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToDeleteRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.DELETE, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + return requestInfo; + } + /// + /// Checks whether a team has `admin`, `push`, `maintain`, `triage`, or `pull` permission for a repository. Repositories inherited through a parent team will also be checked.You can also get information about the specified repository, including what permissions the team grants on it, by passing the following custom [media type](https://docs.github.com/rest/using-the-rest-api/getting-started-with-the-rest-api#media-types/) via the `application/vnd.github.v3.repository+json` accept header.If a team doesn't have permission for the repository, you will receive a `404 Not Found` response status.If the repository is private, you must have at least `read` permission for that repository, and your token must have the `repo` or `admin:org` scope. Otherwise, you will receive a `404 Not Found` response status.> [!NOTE]> You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/repos/{owner}/{repo}`. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// 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/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/github/setting-up-and-managing-organizations-and-teams/repository-permission-levels-for-an-organization#permission-levels-for-repositories-owned-by-an-organization)". + /// + /// A + /// The request body + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPutRequestInformation(global::Ayllu.Github.Client.Orgs.Item.Teams.Item.Repos.Item.Item.WithRepoPutRequestBody body, Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToPutRequestInformation(global::Ayllu.Github.Client.Orgs.Item.Teams.Item.Repos.Item.Item.WithRepoPutRequestBody body, Action> requestConfiguration = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation(Method.PUT, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.Orgs.Item.Teams.Item.Repos.Item.Item.WithRepoItemRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Orgs.Item.Teams.Item.Repos.Item.Item.WithRepoItemRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithRepoItemRequestBuilderDeleteRequestConfiguration : RequestConfiguration + { + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithRepoItemRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithRepoItemRequestBuilderPutRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Teams/Item/Repos/Item/Item/WithRepoPutRequestBody.cs b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Teams/Item/Repos/Item/Item/WithRepoPutRequestBody.cs new file mode 100644 index 0000000..61d8602 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Teams/Item/Repos/Item/Item/WithRepoPutRequestBody.cs @@ -0,0 +1,65 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Orgs.Item.Teams.Item.Repos.Item.Item +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class WithRepoPutRequestBody : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// 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. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Permission { get; set; } +#nullable restore +#else + public string Permission { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public WithRepoPutRequestBody() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Orgs.Item.Teams.Item.Repos.Item.Item.WithRepoPutRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Orgs.Item.Teams.Item.Repos.Item.Item.WithRepoPutRequestBody(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "permission", n => { Permission = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("permission", Permission); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Teams/Item/Repos/Item/WithOwnerItemRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Teams/Item/Repos/Item/WithOwnerItemRequestBuilder.cs new file mode 100644 index 0000000..d17dcea --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Teams/Item/Repos/Item/WithOwnerItemRequestBuilder.cs @@ -0,0 +1,48 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Orgs.Item.Teams.Item.Repos.Item.Item; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System; +namespace Ayllu.Github.Client.Orgs.Item.Teams.Item.Repos.Item +{ + /// + /// Builds and executes requests for operations under \orgs\{org}\teams\{team_slug}\repos\{owner} + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithOwnerItemRequestBuilder : BaseRequestBuilder + { + /// Gets an item from the Ayllu.Github.Client.orgs.item.teams.item.repos.item.item collection + /// Unique identifier of the item + /// A + public global::Ayllu.Github.Client.Orgs.Item.Teams.Item.Repos.Item.Item.WithRepoItemRequestBuilder this[string position] + { + get + { + var urlTplParams = new Dictionary(PathParameters); + urlTplParams.Add("repo", position); + return new global::Ayllu.Github.Client.Orgs.Item.Teams.Item.Repos.Item.Item.WithRepoItemRequestBuilder(urlTplParams, RequestAdapter); + } + } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public WithOwnerItemRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/orgs/{org}/teams/{team_slug}/repos/{owner}", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public WithOwnerItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/orgs/{org}/teams/{team_slug}/repos/{owner}", rawUrl) + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Teams/Item/Repos/ReposRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Teams/Item/Repos/ReposRequestBuilder.cs new file mode 100644 index 0000000..bd03a73 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Teams/Item/Repos/ReposRequestBuilder.cs @@ -0,0 +1,120 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Ayllu.Github.Client.Orgs.Item.Teams.Item.Repos.Item; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Orgs.Item.Teams.Item.Repos +{ + /// + /// Builds and executes requests for operations under \orgs\{org}\teams\{team_slug}\repos + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class ReposRequestBuilder : BaseRequestBuilder + { + /// Gets an item from the Ayllu.Github.Client.orgs.item.teams.item.repos.item collection + /// Unique identifier of the item + /// A + public global::Ayllu.Github.Client.Orgs.Item.Teams.Item.Repos.Item.WithOwnerItemRequestBuilder this[string position] + { + get + { + var urlTplParams = new Dictionary(PathParameters); + urlTplParams.Add("owner", position); + return new global::Ayllu.Github.Client.Orgs.Item.Teams.Item.Repos.Item.WithOwnerItemRequestBuilder(urlTplParams, RequestAdapter); + } + } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public ReposRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/orgs/{org}/teams/{team_slug}/repos{?page*,per_page*}", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public ReposRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/orgs/{org}/teams/{team_slug}/repos{?page*,per_page*}", rawUrl) + { + } + /// + /// 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`. + /// API method documentation + /// + /// A List<global::Ayllu.Github.Client.Models.MinimalRepository> + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task?> GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task> GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var collectionResult = await RequestAdapter.SendCollectionAsync(requestInfo, global::Ayllu.Github.Client.Models.MinimalRepository.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false); + return collectionResult?.AsList(); + } + /// + /// 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`. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.Orgs.Item.Teams.Item.Repos.ReposRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Orgs.Item.Teams.Item.Repos.ReposRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// 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`. + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class ReposRequestBuilderGetQueryParameters + { + /// The page number of the results to fetch. For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." + [QueryParameter("page")] + public int? Page { get; set; } + /// The number of results per page (max 100). For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." + [QueryParameter("per_page")] + public int? PerPage { get; set; } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class ReposRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Teams/Item/Teams/TeamsRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Teams/Item/Teams/TeamsRequestBuilder.cs new file mode 100644 index 0000000..eeac204 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Teams/Item/Teams/TeamsRequestBuilder.cs @@ -0,0 +1,107 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Orgs.Item.Teams.Item.Teams +{ + /// + /// Builds and executes requests for operations under \orgs\{org}\teams\{team_slug}\teams + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class TeamsRequestBuilder : BaseRequestBuilder + { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public TeamsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/orgs/{org}/teams/{team_slug}/teams{?page*,per_page*}", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public TeamsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/orgs/{org}/teams/{team_slug}/teams{?page*,per_page*}", rawUrl) + { + } + /// + /// 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`. + /// API method documentation + /// + /// A List<global::Ayllu.Github.Client.Models.Team> + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task?> GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task> GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var collectionResult = await RequestAdapter.SendCollectionAsync(requestInfo, global::Ayllu.Github.Client.Models.Team.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false); + return collectionResult?.AsList(); + } + /// + /// 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`. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.Orgs.Item.Teams.Item.Teams.TeamsRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Orgs.Item.Teams.Item.Teams.TeamsRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// 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`. + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class TeamsRequestBuilderGetQueryParameters + { + /// The page number of the results to fetch. For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." + [QueryParameter("page")] + public int? Page { get; set; } + /// The number of results per page (max 100). For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." + [QueryParameter("per_page")] + public int? PerPage { get; set; } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class TeamsRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Teams/Item/WithTeam_slugItemRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Teams/Item/WithTeam_slugItemRequestBuilder.cs new file mode 100644 index 0000000..113ef53 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Teams/Item/WithTeam_slugItemRequestBuilder.cs @@ -0,0 +1,244 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Ayllu.Github.Client.Orgs.Item.Teams.Item.Discussions; +using Ayllu.Github.Client.Orgs.Item.Teams.Item.Invitations; +using Ayllu.Github.Client.Orgs.Item.Teams.Item.Members; +using Ayllu.Github.Client.Orgs.Item.Teams.Item.Memberships; +using Ayllu.Github.Client.Orgs.Item.Teams.Item.Projects; +using Ayllu.Github.Client.Orgs.Item.Teams.Item.Repos; +using Ayllu.Github.Client.Orgs.Item.Teams.Item.Teams; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Orgs.Item.Teams.Item +{ + /// + /// Builds and executes requests for operations under \orgs\{org}\teams\{team_slug} + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithTeam_slugItemRequestBuilder : BaseRequestBuilder + { + /// The discussions property + public global::Ayllu.Github.Client.Orgs.Item.Teams.Item.Discussions.DiscussionsRequestBuilder Discussions + { + get => new global::Ayllu.Github.Client.Orgs.Item.Teams.Item.Discussions.DiscussionsRequestBuilder(PathParameters, RequestAdapter); + } + /// The invitations property + public global::Ayllu.Github.Client.Orgs.Item.Teams.Item.Invitations.InvitationsRequestBuilder Invitations + { + get => new global::Ayllu.Github.Client.Orgs.Item.Teams.Item.Invitations.InvitationsRequestBuilder(PathParameters, RequestAdapter); + } + /// The members property + public global::Ayllu.Github.Client.Orgs.Item.Teams.Item.Members.MembersRequestBuilder Members + { + get => new global::Ayllu.Github.Client.Orgs.Item.Teams.Item.Members.MembersRequestBuilder(PathParameters, RequestAdapter); + } + /// The memberships property + public global::Ayllu.Github.Client.Orgs.Item.Teams.Item.Memberships.MembershipsRequestBuilder Memberships + { + get => new global::Ayllu.Github.Client.Orgs.Item.Teams.Item.Memberships.MembershipsRequestBuilder(PathParameters, RequestAdapter); + } + /// The projects property + public global::Ayllu.Github.Client.Orgs.Item.Teams.Item.Projects.ProjectsRequestBuilder Projects + { + get => new global::Ayllu.Github.Client.Orgs.Item.Teams.Item.Projects.ProjectsRequestBuilder(PathParameters, RequestAdapter); + } + /// The repos property + public global::Ayllu.Github.Client.Orgs.Item.Teams.Item.Repos.ReposRequestBuilder Repos + { + get => new global::Ayllu.Github.Client.Orgs.Item.Teams.Item.Repos.ReposRequestBuilder(PathParameters, RequestAdapter); + } + /// The teams property + public global::Ayllu.Github.Client.Orgs.Item.Teams.Item.Teams.TeamsRequestBuilder Teams + { + get => new global::Ayllu.Github.Client.Orgs.Item.Teams.Item.Teams.TeamsRequestBuilder(PathParameters, RequestAdapter); + } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public WithTeam_slugItemRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/orgs/{org}/teams/{team_slug}", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public WithTeam_slugItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/orgs/{org}/teams/{team_slug}", rawUrl) + { + } + /// + /// 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 + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task DeleteAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task DeleteAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToDeleteRequestInformation(requestConfiguration); + await RequestAdapter.SendNoContentAsync(requestInfo, default, cancellationToken).ConfigureAwait(false); + } + /// + /// Gets a team using the team's `slug`. To create the `slug`, GitHub 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}`. + /// API method documentation + /// + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 404 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "404", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Models.TeamFull.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// 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}`. + /// API method documentation + /// + /// A + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 403 status code + /// When receiving a 404 status code + /// When receiving a 422 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PatchAsync(global::Ayllu.Github.Client.Orgs.Item.Teams.Item.WithTeam_slugPatchRequestBody body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task PatchAsync(global::Ayllu.Github.Client.Orgs.Item.Teams.Item.WithTeam_slugPatchRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPatchRequestInformation(body, requestConfiguration); + var errorMapping = new Dictionary> + { + { "403", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "404", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "422", global::Ayllu.Github.Client.Models.ValidationError.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Models.TeamFull.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// 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}`. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToDeleteRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToDeleteRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.DELETE, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + return requestInfo; + } + /// + /// Gets a team using the team's `slug`. To create the `slug`, GitHub 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}`. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// 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}`. + /// + /// A + /// The request body + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPatchRequestInformation(global::Ayllu.Github.Client.Orgs.Item.Teams.Item.WithTeam_slugPatchRequestBody body, Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToPatchRequestInformation(global::Ayllu.Github.Client.Orgs.Item.Teams.Item.WithTeam_slugPatchRequestBody body, Action> requestConfiguration = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.Orgs.Item.Teams.Item.WithTeam_slugItemRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Orgs.Item.Teams.Item.WithTeam_slugItemRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithTeam_slugItemRequestBuilderDeleteRequestConfiguration : RequestConfiguration + { + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithTeam_slugItemRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithTeam_slugItemRequestBuilderPatchRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Teams/Item/WithTeam_slugPatchRequestBody.cs b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Teams/Item/WithTeam_slugPatchRequestBody.cs new file mode 100644 index 0000000..c9fac76 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Teams/Item/WithTeam_slugPatchRequestBody.cs @@ -0,0 +1,92 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Orgs.Item.Teams.Item +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class WithTeam_slugPatchRequestBody : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The description of the team. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Description { get; set; } +#nullable restore +#else + public string Description { get; set; } +#endif + /// The name of the team. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Name { get; set; } +#nullable restore +#else + public string Name { get; set; } +#endif + /// 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. + public global::Ayllu.Github.Client.Orgs.Item.Teams.Item.WithTeam_slugPatchRequestBody_notification_setting? NotificationSetting { get; set; } + /// The ID of a team to set as the parent team. + public int? ParentTeamId { get; set; } + /// **Closing down notice**. The permission that new repositories will be added to the team with when none is specified. + public global::Ayllu.Github.Client.Orgs.Item.Teams.Item.WithTeam_slugPatchRequestBody_permission? Permission { get; set; } + /// 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. + public global::Ayllu.Github.Client.Orgs.Item.Teams.Item.WithTeam_slugPatchRequestBody_privacy? Privacy { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public WithTeam_slugPatchRequestBody() + { + AdditionalData = new Dictionary(); + Permission = global::Ayllu.Github.Client.Orgs.Item.Teams.Item.WithTeam_slugPatchRequestBody_permission.Pull; + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Orgs.Item.Teams.Item.WithTeam_slugPatchRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Orgs.Item.Teams.Item.WithTeam_slugPatchRequestBody(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "description", n => { Description = n.GetStringValue(); } }, + { "name", n => { Name = n.GetStringValue(); } }, + { "notification_setting", n => { NotificationSetting = n.GetEnumValue(); } }, + { "parent_team_id", n => { ParentTeamId = n.GetIntValue(); } }, + { "permission", n => { Permission = n.GetEnumValue(); } }, + { "privacy", n => { Privacy = n.GetEnumValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("description", Description); + writer.WriteStringValue("name", Name); + writer.WriteEnumValue("notification_setting", NotificationSetting); + writer.WriteIntValue("parent_team_id", ParentTeamId); + writer.WriteEnumValue("permission", Permission); + writer.WriteEnumValue("privacy", Privacy); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Teams/Item/WithTeam_slugPatchRequestBody_notification_setting.cs b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Teams/Item/WithTeam_slugPatchRequestBody_notification_setting.cs new file mode 100644 index 0000000..da67b24 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Teams/Item/WithTeam_slugPatchRequestBody_notification_setting.cs @@ -0,0 +1,19 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Orgs.Item.Teams.Item +{ + /// 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. + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public enum WithTeam_slugPatchRequestBody_notification_setting + { + [EnumMember(Value = "notifications_enabled")] + #pragma warning disable CS1591 + Notifications_enabled, + #pragma warning restore CS1591 + [EnumMember(Value = "notifications_disabled")] + #pragma warning disable CS1591 + Notifications_disabled, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Teams/Item/WithTeam_slugPatchRequestBody_permission.cs b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Teams/Item/WithTeam_slugPatchRequestBody_permission.cs new file mode 100644 index 0000000..fe676f8 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Teams/Item/WithTeam_slugPatchRequestBody_permission.cs @@ -0,0 +1,23 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Orgs.Item.Teams.Item +{ + /// **Closing down notice**. The permission that new repositories will be added to the team with when none is specified. + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public enum WithTeam_slugPatchRequestBody_permission + { + [EnumMember(Value = "pull")] + #pragma warning disable CS1591 + Pull, + #pragma warning restore CS1591 + [EnumMember(Value = "push")] + #pragma warning disable CS1591 + Push, + #pragma warning restore CS1591 + [EnumMember(Value = "admin")] + #pragma warning disable CS1591 + Admin, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Teams/Item/WithTeam_slugPatchRequestBody_privacy.cs b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Teams/Item/WithTeam_slugPatchRequestBody_privacy.cs new file mode 100644 index 0000000..e123810 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Teams/Item/WithTeam_slugPatchRequestBody_privacy.cs @@ -0,0 +1,19 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Orgs.Item.Teams.Item +{ + /// 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. + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public enum WithTeam_slugPatchRequestBody_privacy + { + [EnumMember(Value = "secret")] + #pragma warning disable CS1591 + Secret, + #pragma warning restore CS1591 + [EnumMember(Value = "closed")] + #pragma warning disable CS1591 + Closed, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Teams/TeamsPostRequestBody.cs b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Teams/TeamsPostRequestBody.cs new file mode 100644 index 0000000..4cc4b13 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Teams/TeamsPostRequestBody.cs @@ -0,0 +1,112 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Orgs.Item.Teams +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class TeamsPostRequestBody : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The description of the team. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Description { get; set; } +#nullable restore +#else + public string Description { get; set; } +#endif + /// List GitHub usernames for organization members who will become team maintainers. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? Maintainers { get; set; } +#nullable restore +#else + public List Maintainers { get; set; } +#endif + /// The name of the team. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Name { get; set; } +#nullable restore +#else + public string Name { get; set; } +#endif + /// 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` + public global::Ayllu.Github.Client.Orgs.Item.Teams.TeamsPostRequestBody_notification_setting? NotificationSetting { get; set; } + /// The ID of a team to set as the parent team. + public int? ParentTeamId { get; set; } + /// **Closing down notice**. The permission that new repositories will be added to the team with when none is specified. + public global::Ayllu.Github.Client.Orgs.Item.Teams.TeamsPostRequestBody_permission? Permission { get; set; } + /// 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` + public global::Ayllu.Github.Client.Orgs.Item.Teams.TeamsPostRequestBody_privacy? Privacy { get; set; } + /// The full name (e.g., "organization-name/repository-name") of repositories to add the team to. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? RepoNames { get; set; } +#nullable restore +#else + public List RepoNames { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public TeamsPostRequestBody() + { + AdditionalData = new Dictionary(); + Permission = global::Ayllu.Github.Client.Orgs.Item.Teams.TeamsPostRequestBody_permission.Pull; + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Orgs.Item.Teams.TeamsPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Orgs.Item.Teams.TeamsPostRequestBody(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "description", n => { Description = n.GetStringValue(); } }, + { "maintainers", n => { Maintainers = n.GetCollectionOfPrimitiveValues()?.AsList(); } }, + { "name", n => { Name = n.GetStringValue(); } }, + { "notification_setting", n => { NotificationSetting = n.GetEnumValue(); } }, + { "parent_team_id", n => { ParentTeamId = n.GetIntValue(); } }, + { "permission", n => { Permission = n.GetEnumValue(); } }, + { "privacy", n => { Privacy = n.GetEnumValue(); } }, + { "repo_names", n => { RepoNames = n.GetCollectionOfPrimitiveValues()?.AsList(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("description", Description); + writer.WriteCollectionOfPrimitiveValues("maintainers", Maintainers); + writer.WriteStringValue("name", Name); + writer.WriteEnumValue("notification_setting", NotificationSetting); + writer.WriteIntValue("parent_team_id", ParentTeamId); + writer.WriteEnumValue("permission", Permission); + writer.WriteEnumValue("privacy", Privacy); + writer.WriteCollectionOfPrimitiveValues("repo_names", RepoNames); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Teams/TeamsPostRequestBody_notification_setting.cs b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Teams/TeamsPostRequestBody_notification_setting.cs new file mode 100644 index 0000000..cb4f1c6 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Teams/TeamsPostRequestBody_notification_setting.cs @@ -0,0 +1,19 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Orgs.Item.Teams +{ + /// 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` + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public enum TeamsPostRequestBody_notification_setting + { + [EnumMember(Value = "notifications_enabled")] + #pragma warning disable CS1591 + Notifications_enabled, + #pragma warning restore CS1591 + [EnumMember(Value = "notifications_disabled")] + #pragma warning disable CS1591 + Notifications_disabled, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Teams/TeamsPostRequestBody_permission.cs b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Teams/TeamsPostRequestBody_permission.cs new file mode 100644 index 0000000..96bc4ae --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Teams/TeamsPostRequestBody_permission.cs @@ -0,0 +1,19 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Orgs.Item.Teams +{ + /// **Closing down notice**. The permission that new repositories will be added to the team with when none is specified. + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public enum TeamsPostRequestBody_permission + { + [EnumMember(Value = "pull")] + #pragma warning disable CS1591 + Pull, + #pragma warning restore CS1591 + [EnumMember(Value = "push")] + #pragma warning disable CS1591 + Push, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Teams/TeamsPostRequestBody_privacy.cs b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Teams/TeamsPostRequestBody_privacy.cs new file mode 100644 index 0000000..0e06015 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Teams/TeamsPostRequestBody_privacy.cs @@ -0,0 +1,19 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Orgs.Item.Teams +{ + /// 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` + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public enum TeamsPostRequestBody_privacy + { + [EnumMember(Value = "secret")] + #pragma warning disable CS1591 + Secret, + #pragma warning restore CS1591 + [EnumMember(Value = "closed")] + #pragma warning disable CS1591 + Closed, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Teams/TeamsRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Teams/TeamsRequestBuilder.cs new file mode 100644 index 0000000..9f39b06 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/Teams/TeamsRequestBuilder.cs @@ -0,0 +1,183 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Ayllu.Github.Client.Orgs.Item.Teams.Item; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Orgs.Item.Teams +{ + /// + /// Builds and executes requests for operations under \orgs\{org}\teams + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class TeamsRequestBuilder : BaseRequestBuilder + { + /// Gets an item from the Ayllu.Github.Client.orgs.item.teams.item collection + /// The slug of the team name. + /// A + public global::Ayllu.Github.Client.Orgs.Item.Teams.Item.WithTeam_slugItemRequestBuilder this[string position] + { + get + { + var urlTplParams = new Dictionary(PathParameters); + urlTplParams.Add("team_slug", position); + return new global::Ayllu.Github.Client.Orgs.Item.Teams.Item.WithTeam_slugItemRequestBuilder(urlTplParams, RequestAdapter); + } + } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public TeamsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/orgs/{org}/teams{?page*,per_page*}", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public TeamsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/orgs/{org}/teams{?page*,per_page*}", rawUrl) + { + } + /// + /// Lists all teams in an organization that are visible to the authenticated user. + /// API method documentation + /// + /// A List<global::Ayllu.Github.Client.Models.Team> + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 403 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task?> GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task> GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "403", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + }; + var collectionResult = await RequestAdapter.SendCollectionAsync(requestInfo, global::Ayllu.Github.Client.Models.Team.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + return collectionResult?.AsList(); + } + /// + /// 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/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/github/setting-up-and-managing-organizations-and-teams/about-teams)". + /// API method documentation + /// + /// A + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 403 status code + /// When receiving a 422 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PostAsync(global::Ayllu.Github.Client.Orgs.Item.Teams.TeamsPostRequestBody body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task PostAsync(global::Ayllu.Github.Client.Orgs.Item.Teams.TeamsPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPostRequestInformation(body, requestConfiguration); + var errorMapping = new Dictionary> + { + { "403", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "422", global::Ayllu.Github.Client.Models.ValidationError.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Models.TeamFull.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// Lists all teams in an organization that are visible to the authenticated user. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// 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/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/github/setting-up-and-managing-organizations-and-teams/about-teams)". + /// + /// A + /// The request body + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPostRequestInformation(global::Ayllu.Github.Client.Orgs.Item.Teams.TeamsPostRequestBody body, Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToPostRequestInformation(global::Ayllu.Github.Client.Orgs.Item.Teams.TeamsPostRequestBody body, Action> requestConfiguration = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.Orgs.Item.Teams.TeamsRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Orgs.Item.Teams.TeamsRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Lists all teams in an organization that are visible to the authenticated user. + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class TeamsRequestBuilderGetQueryParameters + { + /// The page number of the results to fetch. For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." + [QueryParameter("page")] + public int? Page { get; set; } + /// The number of results per page (max 100). For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." + [QueryParameter("per_page")] + public int? PerPage { get; set; } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class TeamsRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class TeamsRequestBuilderPostRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Orgs/Item/WithOrgDeleteResponse.cs b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/WithOrgDeleteResponse.cs new file mode 100644 index 0000000..8d0d19a --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/WithOrgDeleteResponse.cs @@ -0,0 +1,55 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Orgs.Item +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class WithOrgDeleteResponse : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public WithOrgDeleteResponse() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Orgs.Item.WithOrgDeleteResponse CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Orgs.Item.WithOrgDeleteResponse(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Orgs/Item/WithOrgItemRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/WithOrgItemRequestBuilder.cs new file mode 100644 index 0000000..d700da9 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/WithOrgItemRequestBuilder.cs @@ -0,0 +1,487 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Ayllu.Github.Client.Orgs.Item.Actions; +using Ayllu.Github.Client.Orgs.Item.Attestations; +using Ayllu.Github.Client.Orgs.Item.Blocks; +using Ayllu.Github.Client.Orgs.Item.Campaigns; +using Ayllu.Github.Client.Orgs.Item.CodeScanning; +using Ayllu.Github.Client.Orgs.Item.CodeSecurity; +using Ayllu.Github.Client.Orgs.Item.Codespaces; +using Ayllu.Github.Client.Orgs.Item.Copilot; +using Ayllu.Github.Client.Orgs.Item.Dependabot; +using Ayllu.Github.Client.Orgs.Item.Docker; +using Ayllu.Github.Client.Orgs.Item.Events; +using Ayllu.Github.Client.Orgs.Item.Failed_invitations; +using Ayllu.Github.Client.Orgs.Item.Hooks; +using Ayllu.Github.Client.Orgs.Item.Insights; +using Ayllu.Github.Client.Orgs.Item.Installation; +using Ayllu.Github.Client.Orgs.Item.Installations; +using Ayllu.Github.Client.Orgs.Item.InteractionLimits; +using Ayllu.Github.Client.Orgs.Item.Invitations; +using Ayllu.Github.Client.Orgs.Item.IssueTypes; +using Ayllu.Github.Client.Orgs.Item.Issues; +using Ayllu.Github.Client.Orgs.Item.Item; +using Ayllu.Github.Client.Orgs.Item.Members; +using Ayllu.Github.Client.Orgs.Item.Memberships; +using Ayllu.Github.Client.Orgs.Item.Migrations; +using Ayllu.Github.Client.Orgs.Item.OrganizationRoles; +using Ayllu.Github.Client.Orgs.Item.Outside_collaborators; +using Ayllu.Github.Client.Orgs.Item.Packages; +using Ayllu.Github.Client.Orgs.Item.PersonalAccessTokenRequests; +using Ayllu.Github.Client.Orgs.Item.PersonalAccessTokens; +using Ayllu.Github.Client.Orgs.Item.PrivateRegistries; +using Ayllu.Github.Client.Orgs.Item.Projects; +using Ayllu.Github.Client.Orgs.Item.Properties; +using Ayllu.Github.Client.Orgs.Item.Public_members; +using Ayllu.Github.Client.Orgs.Item.Repos; +using Ayllu.Github.Client.Orgs.Item.Rulesets; +using Ayllu.Github.Client.Orgs.Item.SecretScanning; +using Ayllu.Github.Client.Orgs.Item.SecurityAdvisories; +using Ayllu.Github.Client.Orgs.Item.SecurityManagers; +using Ayllu.Github.Client.Orgs.Item.Settings; +using Ayllu.Github.Client.Orgs.Item.Team; +using Ayllu.Github.Client.Orgs.Item.Teams; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Orgs.Item +{ + /// + /// Builds and executes requests for operations under \orgs\{org} + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithOrgItemRequestBuilder : BaseRequestBuilder + { + /// The actions property + public global::Ayllu.Github.Client.Orgs.Item.Actions.ActionsRequestBuilder Actions + { + get => new global::Ayllu.Github.Client.Orgs.Item.Actions.ActionsRequestBuilder(PathParameters, RequestAdapter); + } + /// The attestations property + public global::Ayllu.Github.Client.Orgs.Item.Attestations.AttestationsRequestBuilder Attestations + { + get => new global::Ayllu.Github.Client.Orgs.Item.Attestations.AttestationsRequestBuilder(PathParameters, RequestAdapter); + } + /// The blocks property + public global::Ayllu.Github.Client.Orgs.Item.Blocks.BlocksRequestBuilder Blocks + { + get => new global::Ayllu.Github.Client.Orgs.Item.Blocks.BlocksRequestBuilder(PathParameters, RequestAdapter); + } + /// The campaigns property + public global::Ayllu.Github.Client.Orgs.Item.Campaigns.CampaignsRequestBuilder Campaigns + { + get => new global::Ayllu.Github.Client.Orgs.Item.Campaigns.CampaignsRequestBuilder(PathParameters, RequestAdapter); + } + /// The codeScanning property + public global::Ayllu.Github.Client.Orgs.Item.CodeScanning.CodeScanningRequestBuilder CodeScanning + { + get => new global::Ayllu.Github.Client.Orgs.Item.CodeScanning.CodeScanningRequestBuilder(PathParameters, RequestAdapter); + } + /// The codeSecurity property + public global::Ayllu.Github.Client.Orgs.Item.CodeSecurity.CodeSecurityRequestBuilder CodeSecurity + { + get => new global::Ayllu.Github.Client.Orgs.Item.CodeSecurity.CodeSecurityRequestBuilder(PathParameters, RequestAdapter); + } + /// The codespaces property + public global::Ayllu.Github.Client.Orgs.Item.Codespaces.CodespacesRequestBuilder Codespaces + { + get => new global::Ayllu.Github.Client.Orgs.Item.Codespaces.CodespacesRequestBuilder(PathParameters, RequestAdapter); + } + /// The copilot property + public global::Ayllu.Github.Client.Orgs.Item.Copilot.CopilotRequestBuilder Copilot + { + get => new global::Ayllu.Github.Client.Orgs.Item.Copilot.CopilotRequestBuilder(PathParameters, RequestAdapter); + } + /// The dependabot property + public global::Ayllu.Github.Client.Orgs.Item.Dependabot.DependabotRequestBuilder Dependabot + { + get => new global::Ayllu.Github.Client.Orgs.Item.Dependabot.DependabotRequestBuilder(PathParameters, RequestAdapter); + } + /// The docker property + public global::Ayllu.Github.Client.Orgs.Item.Docker.DockerRequestBuilder Docker + { + get => new global::Ayllu.Github.Client.Orgs.Item.Docker.DockerRequestBuilder(PathParameters, RequestAdapter); + } + /// The events property + public global::Ayllu.Github.Client.Orgs.Item.Events.EventsRequestBuilder Events + { + get => new global::Ayllu.Github.Client.Orgs.Item.Events.EventsRequestBuilder(PathParameters, RequestAdapter); + } + /// The failed_invitations property + public global::Ayllu.Github.Client.Orgs.Item.Failed_invitations.Failed_invitationsRequestBuilder Failed_invitations + { + get => new global::Ayllu.Github.Client.Orgs.Item.Failed_invitations.Failed_invitationsRequestBuilder(PathParameters, RequestAdapter); + } + /// The hooks property + public global::Ayllu.Github.Client.Orgs.Item.Hooks.HooksRequestBuilder Hooks + { + get => new global::Ayllu.Github.Client.Orgs.Item.Hooks.HooksRequestBuilder(PathParameters, RequestAdapter); + } + /// The insights property + public global::Ayllu.Github.Client.Orgs.Item.Insights.InsightsRequestBuilder Insights + { + get => new global::Ayllu.Github.Client.Orgs.Item.Insights.InsightsRequestBuilder(PathParameters, RequestAdapter); + } + /// The installation property + public global::Ayllu.Github.Client.Orgs.Item.Installation.InstallationRequestBuilder Installation + { + get => new global::Ayllu.Github.Client.Orgs.Item.Installation.InstallationRequestBuilder(PathParameters, RequestAdapter); + } + /// The installations property + public global::Ayllu.Github.Client.Orgs.Item.Installations.InstallationsRequestBuilder Installations + { + get => new global::Ayllu.Github.Client.Orgs.Item.Installations.InstallationsRequestBuilder(PathParameters, RequestAdapter); + } + /// The interactionLimits property + public global::Ayllu.Github.Client.Orgs.Item.InteractionLimits.InteractionLimitsRequestBuilder InteractionLimits + { + get => new global::Ayllu.Github.Client.Orgs.Item.InteractionLimits.InteractionLimitsRequestBuilder(PathParameters, RequestAdapter); + } + /// The invitations property + public global::Ayllu.Github.Client.Orgs.Item.Invitations.InvitationsRequestBuilder Invitations + { + get => new global::Ayllu.Github.Client.Orgs.Item.Invitations.InvitationsRequestBuilder(PathParameters, RequestAdapter); + } + /// The issues property + public global::Ayllu.Github.Client.Orgs.Item.Issues.IssuesRequestBuilder Issues + { + get => new global::Ayllu.Github.Client.Orgs.Item.Issues.IssuesRequestBuilder(PathParameters, RequestAdapter); + } + /// The issueTypes property + public global::Ayllu.Github.Client.Orgs.Item.IssueTypes.IssueTypesRequestBuilder IssueTypes + { + get => new global::Ayllu.Github.Client.Orgs.Item.IssueTypes.IssueTypesRequestBuilder(PathParameters, RequestAdapter); + } + /// The members property + public global::Ayllu.Github.Client.Orgs.Item.Members.MembersRequestBuilder Members + { + get => new global::Ayllu.Github.Client.Orgs.Item.Members.MembersRequestBuilder(PathParameters, RequestAdapter); + } + /// The memberships property + public global::Ayllu.Github.Client.Orgs.Item.Memberships.MembershipsRequestBuilder Memberships + { + get => new global::Ayllu.Github.Client.Orgs.Item.Memberships.MembershipsRequestBuilder(PathParameters, RequestAdapter); + } + /// The migrations property + public global::Ayllu.Github.Client.Orgs.Item.Migrations.MigrationsRequestBuilder Migrations + { + get => new global::Ayllu.Github.Client.Orgs.Item.Migrations.MigrationsRequestBuilder(PathParameters, RequestAdapter); + } + /// The organizationRoles property + public global::Ayllu.Github.Client.Orgs.Item.OrganizationRoles.OrganizationRolesRequestBuilder OrganizationRoles + { + get => new global::Ayllu.Github.Client.Orgs.Item.OrganizationRoles.OrganizationRolesRequestBuilder(PathParameters, RequestAdapter); + } + /// The outside_collaborators property + public global::Ayllu.Github.Client.Orgs.Item.Outside_collaborators.Outside_collaboratorsRequestBuilder Outside_collaborators + { + get => new global::Ayllu.Github.Client.Orgs.Item.Outside_collaborators.Outside_collaboratorsRequestBuilder(PathParameters, RequestAdapter); + } + /// The packages property + public global::Ayllu.Github.Client.Orgs.Item.Packages.PackagesRequestBuilder Packages + { + get => new global::Ayllu.Github.Client.Orgs.Item.Packages.PackagesRequestBuilder(PathParameters, RequestAdapter); + } + /// The personalAccessTokenRequests property + public global::Ayllu.Github.Client.Orgs.Item.PersonalAccessTokenRequests.PersonalAccessTokenRequestsRequestBuilder PersonalAccessTokenRequests + { + get => new global::Ayllu.Github.Client.Orgs.Item.PersonalAccessTokenRequests.PersonalAccessTokenRequestsRequestBuilder(PathParameters, RequestAdapter); + } + /// The personalAccessTokens property + public global::Ayllu.Github.Client.Orgs.Item.PersonalAccessTokens.PersonalAccessTokensRequestBuilder PersonalAccessTokens + { + get => new global::Ayllu.Github.Client.Orgs.Item.PersonalAccessTokens.PersonalAccessTokensRequestBuilder(PathParameters, RequestAdapter); + } + /// The privateRegistries property + public global::Ayllu.Github.Client.Orgs.Item.PrivateRegistries.PrivateRegistriesRequestBuilder PrivateRegistries + { + get => new global::Ayllu.Github.Client.Orgs.Item.PrivateRegistries.PrivateRegistriesRequestBuilder(PathParameters, RequestAdapter); + } + /// The projects property + public global::Ayllu.Github.Client.Orgs.Item.Projects.ProjectsRequestBuilder Projects + { + get => new global::Ayllu.Github.Client.Orgs.Item.Projects.ProjectsRequestBuilder(PathParameters, RequestAdapter); + } + /// The properties property + public global::Ayllu.Github.Client.Orgs.Item.Properties.PropertiesRequestBuilder Properties + { + get => new global::Ayllu.Github.Client.Orgs.Item.Properties.PropertiesRequestBuilder(PathParameters, RequestAdapter); + } + /// The public_members property + public global::Ayllu.Github.Client.Orgs.Item.Public_members.Public_membersRequestBuilder Public_members + { + get => new global::Ayllu.Github.Client.Orgs.Item.Public_members.Public_membersRequestBuilder(PathParameters, RequestAdapter); + } + /// The repos property + public global::Ayllu.Github.Client.Orgs.Item.Repos.ReposRequestBuilder Repos + { + get => new global::Ayllu.Github.Client.Orgs.Item.Repos.ReposRequestBuilder(PathParameters, RequestAdapter); + } + /// The rulesets property + public global::Ayllu.Github.Client.Orgs.Item.Rulesets.RulesetsRequestBuilder Rulesets + { + get => new global::Ayllu.Github.Client.Orgs.Item.Rulesets.RulesetsRequestBuilder(PathParameters, RequestAdapter); + } + /// The secretScanning property + public global::Ayllu.Github.Client.Orgs.Item.SecretScanning.SecretScanningRequestBuilder SecretScanning + { + get => new global::Ayllu.Github.Client.Orgs.Item.SecretScanning.SecretScanningRequestBuilder(PathParameters, RequestAdapter); + } + /// The securityAdvisories property + public global::Ayllu.Github.Client.Orgs.Item.SecurityAdvisories.SecurityAdvisoriesRequestBuilder SecurityAdvisories + { + get => new global::Ayllu.Github.Client.Orgs.Item.SecurityAdvisories.SecurityAdvisoriesRequestBuilder(PathParameters, RequestAdapter); + } + /// The securityManagers property + public global::Ayllu.Github.Client.Orgs.Item.SecurityManagers.SecurityManagersRequestBuilder SecurityManagers + { + get => new global::Ayllu.Github.Client.Orgs.Item.SecurityManagers.SecurityManagersRequestBuilder(PathParameters, RequestAdapter); + } + /// The settings property + public global::Ayllu.Github.Client.Orgs.Item.Settings.SettingsRequestBuilder Settings + { + get => new global::Ayllu.Github.Client.Orgs.Item.Settings.SettingsRequestBuilder(PathParameters, RequestAdapter); + } + /// The team property + public global::Ayllu.Github.Client.Orgs.Item.Team.TeamRequestBuilder Team + { + get => new global::Ayllu.Github.Client.Orgs.Item.Team.TeamRequestBuilder(PathParameters, RequestAdapter); + } + /// The teams property + public global::Ayllu.Github.Client.Orgs.Item.Teams.TeamsRequestBuilder Teams + { + get => new global::Ayllu.Github.Client.Orgs.Item.Teams.TeamsRequestBuilder(PathParameters, RequestAdapter); + } + /// Gets an item from the Ayllu.Github.Client.orgs.item.item collection + /// The security feature to enable or disable. + /// A + public global::Ayllu.Github.Client.Orgs.Item.Item.WithSecurity_productItemRequestBuilder this[string position] + { + get + { + var urlTplParams = new Dictionary(PathParameters); + urlTplParams.Add("security_product", position); + return new global::Ayllu.Github.Client.Orgs.Item.Item.WithSecurity_productItemRequestBuilder(urlTplParams, RequestAdapter); + } + } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public WithOrgItemRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/orgs/{org}", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public WithOrgItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/orgs/{org}", rawUrl) + { + } + /// + /// 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/site-policy/github-terms/github-terms-of-service + /// API method documentation + /// + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 403 status code + /// When receiving a 404 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task DeleteAsWithOrgDeleteResponseAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task DeleteAsWithOrgDeleteResponseAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToDeleteRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "403", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "404", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Orgs.Item.WithOrgDeleteResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// 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/site-policy/github-terms/github-terms-of-service + /// API method documentation + /// + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 403 status code + /// When receiving a 404 status code + [Obsolete("This method is obsolete. Use DeleteAsWithOrgDeleteResponseAsync instead.")] +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task DeleteAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task DeleteAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToDeleteRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "403", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "404", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Orgs.Item.WithOrgResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// Gets information about an organization.When the value of `two_factor_requirement_enabled` is `true`, the organization requires all members, billing managers, outside collaborators, guest collaborators, repository collaborators, or everyone with access to any repository within the organization to enable [two-factor authentication](https://docs.github.com/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.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 plan, GitHub Apps need the `Organization plan` permission. + /// API method documentation + /// + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 404 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "404", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Models.OrganizationFull.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// > [!WARNING]> **Closing down notice:** GitHub 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).> [!WARNING]> **Closing down notice:** Code security product enablement for new repositories through the organization API is closing down. Please use [code security configurations](https://docs.github.com/rest/code-security/configurations#set-a-code-security-configuration-as-a-default-for-an-organization) to set defaults instead. For more information on setting a default security configuration, see the [changelog](https://github.blog/changelog/2024-07-09-sunsetting-security-settings-defaults-parameters-in-the-organizations-rest-api/).Updates the organization's profile and member privileges.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. + /// API method documentation + /// + /// A + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 409 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PatchAsync(global::Ayllu.Github.Client.Orgs.Item.WithOrgPatchRequestBody body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task PatchAsync(global::Ayllu.Github.Client.Orgs.Item.WithOrgPatchRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPatchRequestInformation(body, requestConfiguration); + var errorMapping = new Dictionary> + { + { "409", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Models.OrganizationFull.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// 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/site-policy/github-terms/github-terms-of-service + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToDeleteRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToDeleteRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.DELETE, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Gets information about an organization.When the value of `two_factor_requirement_enabled` is `true`, the organization requires all members, billing managers, outside collaborators, guest collaborators, repository collaborators, or everyone with access to any repository within the organization to enable [two-factor authentication](https://docs.github.com/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.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 plan, GitHub Apps need the `Organization plan` permission. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// > [!WARNING]> **Closing down notice:** GitHub 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).> [!WARNING]> **Closing down notice:** Code security product enablement for new repositories through the organization API is closing down. Please use [code security configurations](https://docs.github.com/rest/code-security/configurations#set-a-code-security-configuration-as-a-default-for-an-organization) to set defaults instead. For more information on setting a default security configuration, see the [changelog](https://github.blog/changelog/2024-07-09-sunsetting-security-settings-defaults-parameters-in-the-organizations-rest-api/).Updates the organization's profile and member privileges.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. + /// + /// A + /// The request body + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPatchRequestInformation(global::Ayllu.Github.Client.Orgs.Item.WithOrgPatchRequestBody body, Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToPatchRequestInformation(global::Ayllu.Github.Client.Orgs.Item.WithOrgPatchRequestBody body, Action> requestConfiguration = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.Orgs.Item.WithOrgItemRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Orgs.Item.WithOrgItemRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithOrgItemRequestBuilderDeleteRequestConfiguration : RequestConfiguration + { + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithOrgItemRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithOrgItemRequestBuilderPatchRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Orgs/Item/WithOrgPatchRequestBody.cs b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/WithOrgPatchRequestBody.cs new file mode 100644 index 0000000..03fa56f --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/WithOrgPatchRequestBody.cs @@ -0,0 +1,236 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Orgs.Item +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class WithOrgPatchRequestBody : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// **Endpoint closing down notice.** Please use [code security configurations](https://docs.github.com/rest/code-security/configurations) instead.Whether GitHub Advanced Security is automatically enabled for new repositories and repositories transferred to this organization.To use this parameter, you must have admin permissions for the repository or be an owner or security manager for the organization that owns the repository. For more information, see "[Managing security managers in your organization](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/managing-security-managers-in-your-organization)."You can check which security and analysis features are currently enabled by using a `GET /orgs/{org}` request. + [Obsolete("")] + public bool? AdvancedSecurityEnabledForNewRepositories { get; set; } + /// Billing email address. This address is not publicized. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? BillingEmail { get; set; } +#nullable restore +#else + public string BillingEmail { get; set; } +#endif + /// The blog property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Blog { get; set; } +#nullable restore +#else + public string Blog { get; set; } +#endif + /// The company name. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Company { get; set; } +#nullable restore +#else + public string Company { get; set; } +#endif + /// Default permission level members have for organization repositories. + public global::Ayllu.Github.Client.Orgs.Item.WithOrgPatchRequestBody_default_repository_permission? DefaultRepositoryPermission { get; set; } + /// **Endpoint closing down notice.** Please use [code security configurations](https://docs.github.com/rest/code-security/configurations) instead.Whether Dependabot alerts are automatically enabled for new repositories and repositories transferred to this organization.To use this parameter, you must have admin permissions for the repository or be an owner or security manager for the organization that owns the repository. For more information, see "[Managing security managers in your organization](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/managing-security-managers-in-your-organization)."You can check which security and analysis features are currently enabled by using a `GET /orgs/{org}` request. + [Obsolete("")] + public bool? DependabotAlertsEnabledForNewRepositories { get; set; } + /// **Endpoint closing down notice.** Please use [code security configurations](https://docs.github.com/rest/code-security/configurations) instead.Whether Dependabot security updates are automatically enabled for new repositories and repositories transferred to this organization.To use this parameter, you must have admin permissions for the repository or be an owner or security manager for the organization that owns the repository. For more information, see "[Managing security managers in your organization](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/managing-security-managers-in-your-organization)."You can check which security and analysis features are currently enabled by using a `GET /orgs/{org}` request. + [Obsolete("")] + public bool? DependabotSecurityUpdatesEnabledForNewRepositories { get; set; } + /// **Endpoint closing down notice.** Please use [code security configurations](https://docs.github.com/rest/code-security/configurations) instead.Whether dependency graph is automatically enabled for new repositories and repositories transferred to this organization.To use this parameter, you must have admin permissions for the repository or be an owner or security manager for the organization that owns the repository. For more information, see "[Managing security managers in your organization](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/managing-security-managers-in-your-organization)."You can check which security and analysis features are currently enabled by using a `GET /orgs/{org}` request. + [Obsolete("")] + public bool? DependencyGraphEnabledForNewRepositories { get; set; } + /// Controls whether or not deploy keys may be added and used for repositories in the organization. + public bool? DeployKeysEnabledForRepositories { get; set; } + /// The description of the company. The maximum size is 160 characters. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Description { get; set; } +#nullable restore +#else + public string Description { get; set; } +#endif + /// The publicly visible email address. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Email { get; set; } +#nullable restore +#else + public string Email { get; set; } +#endif + /// Whether an organization can use organization projects. + public bool? HasOrganizationProjects { get; set; } + /// Whether repositories that belong to the organization can use repository projects. + public bool? HasRepositoryProjects { get; set; } + /// The location. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Location { get; set; } +#nullable restore +#else + public string Location { get; set; } +#endif + /// 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 closing down 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. + public global::Ayllu.Github.Client.Orgs.Item.WithOrgPatchRequestBody_members_allowed_repository_creation_type? MembersAllowedRepositoryCreationType { get; set; } + /// 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/github/setting-up-and-managing-organizations-and-teams/restricting-repository-creation-in-your-organization)" in the GitHub Help documentation. + public bool? MembersCanCreateInternalRepositories { get; set; } + /// Whether organization members can create GitHub Pages sites. Existing published sites will not be impacted. + public bool? MembersCanCreatePages { get; set; } + /// Whether organization members can create private GitHub Pages sites. Existing published sites will not be impacted. + public bool? MembersCanCreatePrivatePages { get; set; } + /// 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/github/setting-up-and-managing-organizations-and-teams/restricting-repository-creation-in-your-organization)" in the GitHub Help documentation. + public bool? MembersCanCreatePrivateRepositories { get; set; } + /// Whether organization members can create public GitHub Pages sites. Existing published sites will not be impacted. + public bool? MembersCanCreatePublicPages { get; set; } + /// 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/github/setting-up-and-managing-organizations-and-teams/restricting-repository-creation-in-your-organization)" in the GitHub Help documentation. + public bool? MembersCanCreatePublicRepositories { get; set; } + /// 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. + public bool? MembersCanCreateRepositories { get; set; } + /// Whether organization members can fork private organization repositories. + public bool? MembersCanForkPrivateRepositories { get; set; } + /// The shorthand name of the company. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Name { get; set; } +#nullable restore +#else + public string Name { get; set; } +#endif + /// **Endpoint closing down notice.** Please use [code security configurations](https://docs.github.com/rest/code-security/configurations) instead.Whether secret scanning is automatically enabled for new repositories and repositories transferred to this organization.To use this parameter, you must have admin permissions for the repository or be an owner or security manager for the organization that owns the repository. For more information, see "[Managing security managers in your organization](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/managing-security-managers-in-your-organization)."You can check which security and analysis features are currently enabled by using a `GET /orgs/{org}` request. + [Obsolete("")] + public bool? SecretScanningEnabledForNewRepositories { get; set; } + /// 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. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? SecretScanningPushProtectionCustomLink { get; set; } +#nullable restore +#else + public string SecretScanningPushProtectionCustomLink { get; set; } +#endif + /// Whether a custom link is shown to contributors who are blocked from pushing a secret by push protection. + public bool? SecretScanningPushProtectionCustomLinkEnabled { get; set; } + /// **Endpoint closing down notice.** Please use [code security configurations](https://docs.github.com/rest/code-security/configurations) instead.Whether secret scanning push protection is automatically enabled for new repositories and repositories transferred to this organization.To use this parameter, you must have admin permissions for the repository or be an owner or security manager for the organization that owns the repository. For more information, see "[Managing security managers in your organization](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/managing-security-managers-in-your-organization)."You can check which security and analysis features are currently enabled by using a `GET /orgs/{org}` request. + [Obsolete("")] + public bool? SecretScanningPushProtectionEnabledForNewRepositories { get; set; } + /// The Twitter username of the company. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? TwitterUsername { get; set; } +#nullable restore +#else + public string TwitterUsername { get; set; } +#endif + /// Whether contributors to organization repositories are required to sign off on commits they make through GitHub's web interface. + public bool? WebCommitSignoffRequired { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public WithOrgPatchRequestBody() + { + AdditionalData = new Dictionary(); + DefaultRepositoryPermission = global::Ayllu.Github.Client.Orgs.Item.WithOrgPatchRequestBody_default_repository_permission.Read; + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Orgs.Item.WithOrgPatchRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Orgs.Item.WithOrgPatchRequestBody(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "advanced_security_enabled_for_new_repositories", n => { AdvancedSecurityEnabledForNewRepositories = n.GetBoolValue(); } }, + { "billing_email", n => { BillingEmail = n.GetStringValue(); } }, + { "blog", n => { Blog = n.GetStringValue(); } }, + { "company", n => { Company = n.GetStringValue(); } }, + { "default_repository_permission", n => { DefaultRepositoryPermission = n.GetEnumValue(); } }, + { "dependabot_alerts_enabled_for_new_repositories", n => { DependabotAlertsEnabledForNewRepositories = n.GetBoolValue(); } }, + { "dependabot_security_updates_enabled_for_new_repositories", n => { DependabotSecurityUpdatesEnabledForNewRepositories = n.GetBoolValue(); } }, + { "dependency_graph_enabled_for_new_repositories", n => { DependencyGraphEnabledForNewRepositories = n.GetBoolValue(); } }, + { "deploy_keys_enabled_for_repositories", n => { DeployKeysEnabledForRepositories = n.GetBoolValue(); } }, + { "description", n => { Description = n.GetStringValue(); } }, + { "email", n => { Email = n.GetStringValue(); } }, + { "has_organization_projects", n => { HasOrganizationProjects = n.GetBoolValue(); } }, + { "has_repository_projects", n => { HasRepositoryProjects = n.GetBoolValue(); } }, + { "location", n => { Location = n.GetStringValue(); } }, + { "members_allowed_repository_creation_type", n => { MembersAllowedRepositoryCreationType = n.GetEnumValue(); } }, + { "members_can_create_internal_repositories", n => { MembersCanCreateInternalRepositories = n.GetBoolValue(); } }, + { "members_can_create_pages", n => { MembersCanCreatePages = n.GetBoolValue(); } }, + { "members_can_create_private_pages", n => { MembersCanCreatePrivatePages = n.GetBoolValue(); } }, + { "members_can_create_private_repositories", n => { MembersCanCreatePrivateRepositories = n.GetBoolValue(); } }, + { "members_can_create_public_pages", n => { MembersCanCreatePublicPages = n.GetBoolValue(); } }, + { "members_can_create_public_repositories", n => { MembersCanCreatePublicRepositories = n.GetBoolValue(); } }, + { "members_can_create_repositories", n => { MembersCanCreateRepositories = n.GetBoolValue(); } }, + { "members_can_fork_private_repositories", n => { MembersCanForkPrivateRepositories = n.GetBoolValue(); } }, + { "name", n => { Name = n.GetStringValue(); } }, + { "secret_scanning_enabled_for_new_repositories", n => { SecretScanningEnabledForNewRepositories = n.GetBoolValue(); } }, + { "secret_scanning_push_protection_custom_link", n => { SecretScanningPushProtectionCustomLink = n.GetStringValue(); } }, + { "secret_scanning_push_protection_custom_link_enabled", n => { SecretScanningPushProtectionCustomLinkEnabled = n.GetBoolValue(); } }, + { "secret_scanning_push_protection_enabled_for_new_repositories", n => { SecretScanningPushProtectionEnabledForNewRepositories = n.GetBoolValue(); } }, + { "twitter_username", n => { TwitterUsername = n.GetStringValue(); } }, + { "web_commit_signoff_required", n => { WebCommitSignoffRequired = n.GetBoolValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteBoolValue("advanced_security_enabled_for_new_repositories", AdvancedSecurityEnabledForNewRepositories); + writer.WriteStringValue("billing_email", BillingEmail); + writer.WriteStringValue("blog", Blog); + writer.WriteStringValue("company", Company); + writer.WriteEnumValue("default_repository_permission", DefaultRepositoryPermission); + writer.WriteBoolValue("dependabot_alerts_enabled_for_new_repositories", DependabotAlertsEnabledForNewRepositories); + writer.WriteBoolValue("dependabot_security_updates_enabled_for_new_repositories", DependabotSecurityUpdatesEnabledForNewRepositories); + writer.WriteBoolValue("dependency_graph_enabled_for_new_repositories", DependencyGraphEnabledForNewRepositories); + writer.WriteBoolValue("deploy_keys_enabled_for_repositories", DeployKeysEnabledForRepositories); + writer.WriteStringValue("description", Description); + writer.WriteStringValue("email", Email); + writer.WriteBoolValue("has_organization_projects", HasOrganizationProjects); + writer.WriteBoolValue("has_repository_projects", HasRepositoryProjects); + writer.WriteStringValue("location", Location); + writer.WriteEnumValue("members_allowed_repository_creation_type", MembersAllowedRepositoryCreationType); + writer.WriteBoolValue("members_can_create_internal_repositories", MembersCanCreateInternalRepositories); + writer.WriteBoolValue("members_can_create_pages", MembersCanCreatePages); + writer.WriteBoolValue("members_can_create_private_pages", MembersCanCreatePrivatePages); + writer.WriteBoolValue("members_can_create_private_repositories", MembersCanCreatePrivateRepositories); + writer.WriteBoolValue("members_can_create_public_pages", MembersCanCreatePublicPages); + writer.WriteBoolValue("members_can_create_public_repositories", MembersCanCreatePublicRepositories); + writer.WriteBoolValue("members_can_create_repositories", MembersCanCreateRepositories); + writer.WriteBoolValue("members_can_fork_private_repositories", MembersCanForkPrivateRepositories); + writer.WriteStringValue("name", Name); + writer.WriteBoolValue("secret_scanning_enabled_for_new_repositories", SecretScanningEnabledForNewRepositories); + writer.WriteStringValue("secret_scanning_push_protection_custom_link", SecretScanningPushProtectionCustomLink); + writer.WriteBoolValue("secret_scanning_push_protection_custom_link_enabled", SecretScanningPushProtectionCustomLinkEnabled); + writer.WriteBoolValue("secret_scanning_push_protection_enabled_for_new_repositories", SecretScanningPushProtectionEnabledForNewRepositories); + writer.WriteStringValue("twitter_username", TwitterUsername); + writer.WriteBoolValue("web_commit_signoff_required", WebCommitSignoffRequired); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Orgs/Item/WithOrgPatchRequestBody_default_repository_permission.cs b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/WithOrgPatchRequestBody_default_repository_permission.cs new file mode 100644 index 0000000..b45978a --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/WithOrgPatchRequestBody_default_repository_permission.cs @@ -0,0 +1,27 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Orgs.Item +{ + /// Default permission level members have for organization repositories. + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public enum WithOrgPatchRequestBody_default_repository_permission + { + [EnumMember(Value = "read")] + #pragma warning disable CS1591 + Read, + #pragma warning restore CS1591 + [EnumMember(Value = "write")] + #pragma warning disable CS1591 + Write, + #pragma warning restore CS1591 + [EnumMember(Value = "admin")] + #pragma warning disable CS1591 + Admin, + #pragma warning restore CS1591 + [EnumMember(Value = "none")] + #pragma warning disable CS1591 + None, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Orgs/Item/WithOrgPatchRequestBody_members_allowed_repository_creation_type.cs b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/WithOrgPatchRequestBody_members_allowed_repository_creation_type.cs new file mode 100644 index 0000000..6fdd822 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/WithOrgPatchRequestBody_members_allowed_repository_creation_type.cs @@ -0,0 +1,23 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Orgs.Item +{ + /// 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 closing down 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. + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public enum WithOrgPatchRequestBody_members_allowed_repository_creation_type + { + [EnumMember(Value = "all")] + #pragma warning disable CS1591 + All, + #pragma warning restore CS1591 + [EnumMember(Value = "private")] + #pragma warning disable CS1591 + Private, + #pragma warning restore CS1591 + [EnumMember(Value = "none")] + #pragma warning disable CS1591 + None, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Orgs/Item/WithOrgResponse.cs b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/WithOrgResponse.cs new file mode 100644 index 0000000..a054cb4 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Orgs/Item/WithOrgResponse.cs @@ -0,0 +1,28 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Orgs.Item +{ + [Obsolete("This class is obsolete. Use WithOrgDeleteResponse instead.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class WithOrgResponse : global::Ayllu.Github.Client.Orgs.Item.WithOrgDeleteResponse, IParsable + #pragma warning restore CS1591 + { + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static new global::Ayllu.Github.Client.Orgs.Item.WithOrgResponse CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Orgs.Item.WithOrgResponse(); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Orgs/OrgsRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Orgs/OrgsRequestBuilder.cs new file mode 100644 index 0000000..e68a035 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Orgs/OrgsRequestBuilder.cs @@ -0,0 +1,48 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Orgs.Item; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System; +namespace Ayllu.Github.Client.Orgs +{ + /// + /// Builds and executes requests for operations under \orgs + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class OrgsRequestBuilder : BaseRequestBuilder + { + /// Gets an item from the Ayllu.Github.Client.orgs.item collection + /// The organization name. The name is not case sensitive. + /// A + public global::Ayllu.Github.Client.Orgs.Item.WithOrgItemRequestBuilder this[string position] + { + get + { + var urlTplParams = new Dictionary(PathParameters); + urlTplParams.Add("org", position); + return new global::Ayllu.Github.Client.Orgs.Item.WithOrgItemRequestBuilder(urlTplParams, RequestAdapter); + } + } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public OrgsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/orgs", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public OrgsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/orgs", rawUrl) + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Projects/Columns/Cards/CardsRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Projects/Columns/Cards/CardsRequestBuilder.cs new file mode 100644 index 0000000..54f6617 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Projects/Columns/Cards/CardsRequestBuilder.cs @@ -0,0 +1,62 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Projects.Columns.Cards.Item; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System; +namespace Ayllu.Github.Client.Projects.Columns.Cards +{ + /// + /// Builds and executes requests for operations under \projects\columns\cards + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class CardsRequestBuilder : BaseRequestBuilder + { + /// Gets an item from the Ayllu.Github.Client.projects.columns.cards.item collection + /// The unique identifier of the card. + /// A + [Obsolete("")] + public global::Ayllu.Github.Client.Projects.Columns.Cards.Item.WithCard_ItemRequestBuilder this[int position] + { + get + { + var urlTplParams = new Dictionary(PathParameters); + urlTplParams.Add("card_id", position); + return new global::Ayllu.Github.Client.Projects.Columns.Cards.Item.WithCard_ItemRequestBuilder(urlTplParams, RequestAdapter); + } + } + /// Gets an item from the Ayllu.Github.Client.projects.columns.cards.item collection + /// The unique identifier of the card. + /// A + [Obsolete("This indexer is deprecated and will be removed in the next major version. Use the one with the typed parameter instead.")] + public global::Ayllu.Github.Client.Projects.Columns.Cards.Item.WithCard_ItemRequestBuilder this[string position] + { + get + { + var urlTplParams = new Dictionary(PathParameters); + if (!string.IsNullOrWhiteSpace(position)) urlTplParams.Add("card_id", position); + return new global::Ayllu.Github.Client.Projects.Columns.Cards.Item.WithCard_ItemRequestBuilder(urlTplParams, RequestAdapter); + } + } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public CardsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/projects/columns/cards", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public CardsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/projects/columns/cards", rawUrl) + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Projects/Columns/Cards/Item/Moves/Moves403Error.cs b/src/Ayllu.Github.Client/Github/Client/Projects/Columns/Cards/Item/Moves/Moves403Error.cs new file mode 100644 index 0000000..52a4536 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Projects/Columns/Cards/Item/Moves/Moves403Error.cs @@ -0,0 +1,88 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Projects.Columns.Cards.Item.Moves +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class Moves403Error : ApiException, IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The documentation_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? DocumentationUrl { get; set; } +#nullable restore +#else + public string DocumentationUrl { get; set; } +#endif + /// The errors property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? Errors { get; set; } +#nullable restore +#else + public List Errors { get; set; } +#endif + /// The primary error message. + public override string Message { get => MessageEscaped ?? string.Empty; } + /// The message property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? MessageEscaped { get; set; } +#nullable restore +#else + public string MessageEscaped { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public Moves403Error() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Projects.Columns.Cards.Item.Moves.Moves403Error CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Projects.Columns.Cards.Item.Moves.Moves403Error(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "documentation_url", n => { DocumentationUrl = n.GetStringValue(); } }, + { "errors", n => { Errors = n.GetCollectionOfObjectValues(global::Ayllu.Github.Client.Projects.Columns.Cards.Item.Moves.Moves403Error_errors.CreateFromDiscriminatorValue)?.AsList(); } }, + { "message", n => { MessageEscaped = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("documentation_url", DocumentationUrl); + writer.WriteCollectionOfObjectValues("errors", Errors); + writer.WriteStringValue("message", MessageEscaped); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Projects/Columns/Cards/Item/Moves/Moves403Error_errors.cs b/src/Ayllu.Github.Client/Github/Client/Projects/Columns/Cards/Item/Moves/Moves403Error_errors.cs new file mode 100644 index 0000000..69f0636 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Projects/Columns/Cards/Item/Moves/Moves403Error_errors.cs @@ -0,0 +1,95 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Projects.Columns.Cards.Item.Moves +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class Moves403Error_errors : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The code property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Code { get; set; } +#nullable restore +#else + public string Code { get; set; } +#endif + /// The field property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Field { get; set; } +#nullable restore +#else + public string Field { get; set; } +#endif + /// The message property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Message { get; set; } +#nullable restore +#else + public string Message { get; set; } +#endif + /// The resource property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Resource { get; set; } +#nullable restore +#else + public string Resource { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public Moves403Error_errors() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Projects.Columns.Cards.Item.Moves.Moves403Error_errors CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Projects.Columns.Cards.Item.Moves.Moves403Error_errors(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "code", n => { Code = n.GetStringValue(); } }, + { "field", n => { Field = n.GetStringValue(); } }, + { "message", n => { Message = n.GetStringValue(); } }, + { "resource", n => { Resource = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("code", Code); + writer.WriteStringValue("field", Field); + writer.WriteStringValue("message", Message); + writer.WriteStringValue("resource", Resource); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Projects/Columns/Cards/Item/Moves/Moves503Error.cs b/src/Ayllu.Github.Client/Github/Client/Projects/Columns/Cards/Item/Moves/Moves503Error.cs new file mode 100644 index 0000000..31f60d7 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Projects/Columns/Cards/Item/Moves/Moves503Error.cs @@ -0,0 +1,98 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Projects.Columns.Cards.Item.Moves +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class Moves503Error : ApiException, IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The code property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Code { get; set; } +#nullable restore +#else + public string Code { get; set; } +#endif + /// The documentation_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? DocumentationUrl { get; set; } +#nullable restore +#else + public string DocumentationUrl { get; set; } +#endif + /// The errors property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? Errors { get; set; } +#nullable restore +#else + public List Errors { get; set; } +#endif + /// The primary error message. + public override string Message { get => MessageEscaped ?? string.Empty; } + /// The message property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? MessageEscaped { get; set; } +#nullable restore +#else + public string MessageEscaped { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public Moves503Error() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Projects.Columns.Cards.Item.Moves.Moves503Error CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Projects.Columns.Cards.Item.Moves.Moves503Error(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "code", n => { Code = n.GetStringValue(); } }, + { "documentation_url", n => { DocumentationUrl = n.GetStringValue(); } }, + { "errors", n => { Errors = n.GetCollectionOfObjectValues(global::Ayllu.Github.Client.Projects.Columns.Cards.Item.Moves.Moves503Error_errors.CreateFromDiscriminatorValue)?.AsList(); } }, + { "message", n => { MessageEscaped = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("code", Code); + writer.WriteStringValue("documentation_url", DocumentationUrl); + writer.WriteCollectionOfObjectValues("errors", Errors); + writer.WriteStringValue("message", MessageEscaped); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Projects/Columns/Cards/Item/Moves/Moves503Error_errors.cs b/src/Ayllu.Github.Client/Github/Client/Projects/Columns/Cards/Item/Moves/Moves503Error_errors.cs new file mode 100644 index 0000000..4d40a5c --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Projects/Columns/Cards/Item/Moves/Moves503Error_errors.cs @@ -0,0 +1,75 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Projects.Columns.Cards.Item.Moves +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class Moves503Error_errors : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The code property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Code { get; set; } +#nullable restore +#else + public string Code { get; set; } +#endif + /// The message property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Message { get; set; } +#nullable restore +#else + public string Message { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public Moves503Error_errors() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Projects.Columns.Cards.Item.Moves.Moves503Error_errors CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Projects.Columns.Cards.Item.Moves.Moves503Error_errors(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "code", n => { Code = n.GetStringValue(); } }, + { "message", n => { Message = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("code", Code); + writer.WriteStringValue("message", Message); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Projects/Columns/Cards/Item/Moves/MovesPostRequestBody.cs b/src/Ayllu.Github.Client/Github/Client/Projects/Columns/Cards/Item/Moves/MovesPostRequestBody.cs new file mode 100644 index 0000000..fd9ba39 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Projects/Columns/Cards/Item/Moves/MovesPostRequestBody.cs @@ -0,0 +1,69 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Projects.Columns.Cards.Item.Moves +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class MovesPostRequestBody : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The unique identifier of the column the card should be moved to + public int? ColumnId { get; set; } + /// The position of the card in a column. Can be one of: `top`, `bottom`, or `after:<card_id>` to place after the specified card. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Position { get; set; } +#nullable restore +#else + public string Position { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public MovesPostRequestBody() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Projects.Columns.Cards.Item.Moves.MovesPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Projects.Columns.Cards.Item.Moves.MovesPostRequestBody(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "column_id", n => { ColumnId = n.GetIntValue(); } }, + { "position", n => { Position = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteIntValue("column_id", ColumnId); + writer.WriteStringValue("position", Position); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Projects/Columns/Cards/Item/Moves/MovesPostResponse.cs b/src/Ayllu.Github.Client/Github/Client/Projects/Columns/Cards/Item/Moves/MovesPostResponse.cs new file mode 100644 index 0000000..f7cad11 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Projects/Columns/Cards/Item/Moves/MovesPostResponse.cs @@ -0,0 +1,45 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Projects.Columns.Cards.Item.Moves +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class MovesPostResponse : IParsable + #pragma warning restore CS1591 + { + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Projects.Columns.Cards.Item.Moves.MovesPostResponse CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Projects.Columns.Cards.Item.Moves.MovesPostResponse(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Projects/Columns/Cards/Item/Moves/MovesRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Projects/Columns/Cards/Item/Moves/MovesRequestBuilder.cs new file mode 100644 index 0000000..5f1380f --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Projects/Columns/Cards/Item/Moves/MovesRequestBuilder.cs @@ -0,0 +1,145 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Projects.Columns.Cards.Item.Moves +{ + /// + /// Builds and executes requests for operations under \projects\columns\cards\{card_id}\moves + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class MovesRequestBuilder : BaseRequestBuilder + { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public MovesRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/projects/columns/cards/{card_id}/moves", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public MovesRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/projects/columns/cards/{card_id}/moves", rawUrl) + { + } + /// + /// > [!WARNING]> **Closing down notice:** Projects (classic) is being deprecated in favor of the new Projects experience.> See the [changelog](https://github.blog/changelog/2024-05-23-sunset-notice-projects-classic/) for more information. + /// API method documentation + /// + /// A + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 401 status code + /// When receiving a 403 status code + /// When receiving a 422 status code + /// When receiving a 503 status code + [Obsolete("")] +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PostAsMovesPostResponseAsync(global::Ayllu.Github.Client.Projects.Columns.Cards.Item.Moves.MovesPostRequestBody body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task PostAsMovesPostResponseAsync(global::Ayllu.Github.Client.Projects.Columns.Cards.Item.Moves.MovesPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPostRequestInformation(body, requestConfiguration); + var errorMapping = new Dictionary> + { + { "401", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "403", global::Ayllu.Github.Client.Projects.Columns.Cards.Item.Moves.Moves403Error.CreateFromDiscriminatorValue }, + { "422", global::Ayllu.Github.Client.Models.ValidationError.CreateFromDiscriminatorValue }, + { "503", global::Ayllu.Github.Client.Projects.Columns.Cards.Item.Moves.Moves503Error.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Projects.Columns.Cards.Item.Moves.MovesPostResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// > [!WARNING]> **Closing down notice:** Projects (classic) is being deprecated in favor of the new Projects experience.> See the [changelog](https://github.blog/changelog/2024-05-23-sunset-notice-projects-classic/) for more information. + /// API method documentation + /// + /// A + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 401 status code + /// When receiving a 403 status code + /// When receiving a 422 status code + /// When receiving a 503 status code + [Obsolete("This method is obsolete. Use PostAsMovesPostResponseAsync instead.")] +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PostAsync(global::Ayllu.Github.Client.Projects.Columns.Cards.Item.Moves.MovesPostRequestBody body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task PostAsync(global::Ayllu.Github.Client.Projects.Columns.Cards.Item.Moves.MovesPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPostRequestInformation(body, requestConfiguration); + var errorMapping = new Dictionary> + { + { "401", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "403", global::Ayllu.Github.Client.Projects.Columns.Cards.Item.Moves.Moves403Error.CreateFromDiscriminatorValue }, + { "422", global::Ayllu.Github.Client.Models.ValidationError.CreateFromDiscriminatorValue }, + { "503", global::Ayllu.Github.Client.Projects.Columns.Cards.Item.Moves.Moves503Error.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Projects.Columns.Cards.Item.Moves.MovesResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// > [!WARNING]> **Closing down notice:** Projects (classic) is being deprecated in favor of the new Projects experience.> See the [changelog](https://github.blog/changelog/2024-05-23-sunset-notice-projects-classic/) for more information. + /// + /// A + /// The request body + /// Configuration for the request such as headers, query parameters, and middleware options. + [Obsolete("")] +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPostRequestInformation(global::Ayllu.Github.Client.Projects.Columns.Cards.Item.Moves.MovesPostRequestBody body, Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToPostRequestInformation(global::Ayllu.Github.Client.Projects.Columns.Cards.Item.Moves.MovesPostRequestBody body, Action> requestConfiguration = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + [Obsolete("")] + public global::Ayllu.Github.Client.Projects.Columns.Cards.Item.Moves.MovesRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Projects.Columns.Cards.Item.Moves.MovesRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class MovesRequestBuilderPostRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Projects/Columns/Cards/Item/Moves/MovesResponse.cs b/src/Ayllu.Github.Client/Github/Client/Projects/Columns/Cards/Item/Moves/MovesResponse.cs new file mode 100644 index 0000000..7bba4f8 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Projects/Columns/Cards/Item/Moves/MovesResponse.cs @@ -0,0 +1,28 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Projects.Columns.Cards.Item.Moves +{ + [Obsolete("This class is obsolete. Use MovesPostResponse instead.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class MovesResponse : global::Ayllu.Github.Client.Projects.Columns.Cards.Item.Moves.MovesPostResponse, IParsable + #pragma warning restore CS1591 + { + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static new global::Ayllu.Github.Client.Projects.Columns.Cards.Item.Moves.MovesResponse CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Projects.Columns.Cards.Item.Moves.MovesResponse(); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Projects/Columns/Cards/Item/WithCard_403Error.cs b/src/Ayllu.Github.Client/Github/Client/Projects/Columns/Cards/Item/WithCard_403Error.cs new file mode 100644 index 0000000..f705d3b --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Projects/Columns/Cards/Item/WithCard_403Error.cs @@ -0,0 +1,88 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Projects.Columns.Cards.Item +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class WithCard_403Error : ApiException, IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The documentation_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? DocumentationUrl { get; set; } +#nullable restore +#else + public string DocumentationUrl { get; set; } +#endif + /// The errors property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? Errors { get; set; } +#nullable restore +#else + public List Errors { get; set; } +#endif + /// The primary error message. + public override string Message { get => MessageEscaped ?? string.Empty; } + /// The message property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? MessageEscaped { get; set; } +#nullable restore +#else + public string MessageEscaped { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public WithCard_403Error() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Projects.Columns.Cards.Item.WithCard_403Error CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Projects.Columns.Cards.Item.WithCard_403Error(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "documentation_url", n => { DocumentationUrl = n.GetStringValue(); } }, + { "errors", n => { Errors = n.GetCollectionOfPrimitiveValues()?.AsList(); } }, + { "message", n => { MessageEscaped = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("documentation_url", DocumentationUrl); + writer.WriteCollectionOfPrimitiveValues("errors", Errors); + writer.WriteStringValue("message", MessageEscaped); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Projects/Columns/Cards/Item/WithCard_ItemRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Projects/Columns/Cards/Item/WithCard_ItemRequestBuilder.cs new file mode 100644 index 0000000..1081513 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Projects/Columns/Cards/Item/WithCard_ItemRequestBuilder.cs @@ -0,0 +1,232 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Ayllu.Github.Client.Projects.Columns.Cards.Item.Moves; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Projects.Columns.Cards.Item +{ + /// + /// Builds and executes requests for operations under \projects\columns\cards\{card_id} + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithCard_ItemRequestBuilder : BaseRequestBuilder + { + /// The moves property + [Obsolete("")] + public global::Ayllu.Github.Client.Projects.Columns.Cards.Item.Moves.MovesRequestBuilder Moves + { + get => new global::Ayllu.Github.Client.Projects.Columns.Cards.Item.Moves.MovesRequestBuilder(PathParameters, RequestAdapter); + } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public WithCard_ItemRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/projects/columns/cards/{card_id}", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public WithCard_ItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/projects/columns/cards/{card_id}", rawUrl) + { + } + /// + /// > [!WARNING]> **Closing down notice:** Projects (classic) is being deprecated in favor of the new Projects experience.> See the [changelog](https://github.blog/changelog/2024-05-23-sunset-notice-projects-classic/) for more information. + /// API method documentation + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 401 status code + /// When receiving a 403 status code + /// When receiving a 404 status code + [Obsolete("")] +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task DeleteAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task DeleteAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToDeleteRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "401", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "403", global::Ayllu.Github.Client.Projects.Columns.Cards.Item.WithCard_403Error.CreateFromDiscriminatorValue }, + { "404", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + }; + await RequestAdapter.SendNoContentAsync(requestInfo, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// > [!WARNING]> **Closing down notice:** Projects (classic) is being deprecated in favor of the new Projects experience.> See the [changelog](https://github.blog/changelog/2024-05-23-sunset-notice-projects-classic/) for more information. + /// API method documentation + /// + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 401 status code + /// When receiving a 403 status code + /// When receiving a 404 status code + [Obsolete("")] +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "401", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "403", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "404", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Models.ProjectCard.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// > [!WARNING]> **Closing down notice:** Projects (classic) is being deprecated in favor of the new Projects experience.> See the [changelog](https://github.blog/changelog/2024-05-23-sunset-notice-projects-classic/) for more information. + /// API method documentation + /// + /// A + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 401 status code + /// When receiving a 403 status code + /// When receiving a 404 status code + /// When receiving a 422 status code + [Obsolete("")] +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PatchAsync(global::Ayllu.Github.Client.Projects.Columns.Cards.Item.WithCard_PatchRequestBody body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task PatchAsync(global::Ayllu.Github.Client.Projects.Columns.Cards.Item.WithCard_PatchRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPatchRequestInformation(body, requestConfiguration); + var errorMapping = new Dictionary> + { + { "401", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "403", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "404", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "422", global::Ayllu.Github.Client.Models.ValidationErrorSimple.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Models.ProjectCard.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// > [!WARNING]> **Closing down notice:** Projects (classic) is being deprecated in favor of the new Projects experience.> See the [changelog](https://github.blog/changelog/2024-05-23-sunset-notice-projects-classic/) for more information. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. + [Obsolete("")] +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToDeleteRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToDeleteRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.DELETE, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// > [!WARNING]> **Closing down notice:** Projects (classic) is being deprecated in favor of the new Projects experience.> See the [changelog](https://github.blog/changelog/2024-05-23-sunset-notice-projects-classic/) for more information. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. + [Obsolete("")] +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// > [!WARNING]> **Closing down notice:** Projects (classic) is being deprecated in favor of the new Projects experience.> See the [changelog](https://github.blog/changelog/2024-05-23-sunset-notice-projects-classic/) for more information. + /// + /// A + /// The request body + /// Configuration for the request such as headers, query parameters, and middleware options. + [Obsolete("")] +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPatchRequestInformation(global::Ayllu.Github.Client.Projects.Columns.Cards.Item.WithCard_PatchRequestBody body, Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToPatchRequestInformation(global::Ayllu.Github.Client.Projects.Columns.Cards.Item.WithCard_PatchRequestBody body, Action> requestConfiguration = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + [Obsolete("")] + public global::Ayllu.Github.Client.Projects.Columns.Cards.Item.WithCard_ItemRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Projects.Columns.Cards.Item.WithCard_ItemRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithCard_ItemRequestBuilderDeleteRequestConfiguration : RequestConfiguration + { + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithCard_ItemRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithCard_ItemRequestBuilderPatchRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Projects/Columns/Cards/Item/WithCard_PatchRequestBody.cs b/src/Ayllu.Github.Client/Github/Client/Projects/Columns/Cards/Item/WithCard_PatchRequestBody.cs new file mode 100644 index 0000000..668143b --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Projects/Columns/Cards/Item/WithCard_PatchRequestBody.cs @@ -0,0 +1,69 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Projects.Columns.Cards.Item +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class WithCard_PatchRequestBody : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// Whether or not the card is archived + public bool? Archived { get; set; } + /// The project card's note +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Note { get; set; } +#nullable restore +#else + public string Note { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public WithCard_PatchRequestBody() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Projects.Columns.Cards.Item.WithCard_PatchRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Projects.Columns.Cards.Item.WithCard_PatchRequestBody(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "archived", n => { Archived = n.GetBoolValue(); } }, + { "note", n => { Note = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteBoolValue("archived", Archived); + writer.WriteStringValue("note", Note); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Projects/Columns/ColumnsRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Projects/Columns/ColumnsRequestBuilder.cs new file mode 100644 index 0000000..961472f --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Projects/Columns/ColumnsRequestBuilder.cs @@ -0,0 +1,68 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Projects.Columns.Cards; +using Ayllu.Github.Client.Projects.Columns.Item; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System; +namespace Ayllu.Github.Client.Projects.Columns +{ + /// + /// Builds and executes requests for operations under \projects\columns + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class ColumnsRequestBuilder : BaseRequestBuilder + { + /// The cards property + public global::Ayllu.Github.Client.Projects.Columns.Cards.CardsRequestBuilder Cards + { + get => new global::Ayllu.Github.Client.Projects.Columns.Cards.CardsRequestBuilder(PathParameters, RequestAdapter); + } + /// Gets an item from the Ayllu.Github.Client.projects.columns.item collection + /// The unique identifier of the column. + /// A + [Obsolete("")] + public global::Ayllu.Github.Client.Projects.Columns.Item.WithColumn_ItemRequestBuilder this[int position] + { + get + { + var urlTplParams = new Dictionary(PathParameters); + urlTplParams.Add("column_id", position); + return new global::Ayllu.Github.Client.Projects.Columns.Item.WithColumn_ItemRequestBuilder(urlTplParams, RequestAdapter); + } + } + /// Gets an item from the Ayllu.Github.Client.projects.columns.item collection + /// The unique identifier of the column. + /// A + [Obsolete("This indexer is deprecated and will be removed in the next major version. Use the one with the typed parameter instead.")] + public global::Ayllu.Github.Client.Projects.Columns.Item.WithColumn_ItemRequestBuilder this[string position] + { + get + { + var urlTplParams = new Dictionary(PathParameters); + if (!string.IsNullOrWhiteSpace(position)) urlTplParams.Add("column_id", position); + return new global::Ayllu.Github.Client.Projects.Columns.Item.WithColumn_ItemRequestBuilder(urlTplParams, RequestAdapter); + } + } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public ColumnsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/projects/columns", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public ColumnsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/projects/columns", rawUrl) + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Projects/Columns/Item/Cards/CardsPostRequestBodyMember1.cs b/src/Ayllu.Github.Client/Github/Client/Projects/Columns/Item/Cards/CardsPostRequestBodyMember1.cs new file mode 100644 index 0000000..617b30e --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Projects/Columns/Item/Cards/CardsPostRequestBodyMember1.cs @@ -0,0 +1,65 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Projects.Columns.Item.Cards +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class CardsPostRequestBodyMember1 : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The project card's note +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Note { get; set; } +#nullable restore +#else + public string Note { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public CardsPostRequestBodyMember1() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Projects.Columns.Item.Cards.CardsPostRequestBodyMember1 CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Projects.Columns.Item.Cards.CardsPostRequestBodyMember1(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "note", n => { Note = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("note", Note); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Projects/Columns/Item/Cards/CardsPostRequestBodyMember2.cs b/src/Ayllu.Github.Client/Github/Client/Projects/Columns/Item/Cards/CardsPostRequestBodyMember2.cs new file mode 100644 index 0000000..b31afc6 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Projects/Columns/Item/Cards/CardsPostRequestBodyMember2.cs @@ -0,0 +1,69 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Projects.Columns.Item.Cards +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class CardsPostRequestBodyMember2 : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The unique identifier of the content associated with the card + public int? ContentId { get; set; } + /// The piece of content associated with the card +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? ContentType { get; set; } +#nullable restore +#else + public string ContentType { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public CardsPostRequestBodyMember2() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Projects.Columns.Item.Cards.CardsPostRequestBodyMember2 CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Projects.Columns.Item.Cards.CardsPostRequestBodyMember2(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "content_id", n => { ContentId = n.GetIntValue(); } }, + { "content_type", n => { ContentType = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteIntValue("content_id", ContentId); + writer.WriteStringValue("content_type", ContentType); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Projects/Columns/Item/Cards/CardsRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Projects/Columns/Item/Cards/CardsRequestBuilder.cs new file mode 100644 index 0000000..d321afe --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Projects/Columns/Item/Cards/CardsRequestBuilder.cs @@ -0,0 +1,268 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Projects.Columns.Item.Cards +{ + /// + /// Builds and executes requests for operations under \projects\columns\{column_id}\cards + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class CardsRequestBuilder : BaseRequestBuilder + { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public CardsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/projects/columns/{column_id}/cards{?archived_state*,page*,per_page*}", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public CardsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/projects/columns/{column_id}/cards{?archived_state*,page*,per_page*}", rawUrl) + { + } + /// + /// > [!WARNING]> **Closing down notice:** Projects (classic) is being deprecated in favor of the new Projects experience.> See the [changelog](https://github.blog/changelog/2024-05-23-sunset-notice-projects-classic/) for more information. + /// API method documentation + /// + /// A List<global::Ayllu.Github.Client.Models.ProjectCard> + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 401 status code + /// When receiving a 403 status code + [Obsolete("")] +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task?> GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task> GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "401", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "403", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + }; + var collectionResult = await RequestAdapter.SendCollectionAsync(requestInfo, global::Ayllu.Github.Client.Models.ProjectCard.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + return collectionResult?.AsList(); + } + /// + /// > [!WARNING]> **Closing down notice:** Projects (classic) is being deprecated in favor of the new Projects experience.> See the [changelog](https://github.blog/changelog/2024-05-23-sunset-notice-projects-classic/) for more information. + /// API method documentation + /// + /// A + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 401 status code + /// When receiving a 403 status code + /// When receiving a 503 status code + [Obsolete("")] +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PostAsync(global::Ayllu.Github.Client.Projects.Columns.Item.Cards.CardsRequestBuilder.CardsPostRequestBody body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task PostAsync(global::Ayllu.Github.Client.Projects.Columns.Item.Cards.CardsRequestBuilder.CardsPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPostRequestInformation(body, requestConfiguration); + var errorMapping = new Dictionary> + { + { "401", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "403", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "503", global::Ayllu.Github.Client.Projects.Columns.Item.Cards.ProjectCard503Error.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Models.ProjectCard.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// > [!WARNING]> **Closing down notice:** Projects (classic) is being deprecated in favor of the new Projects experience.> See the [changelog](https://github.blog/changelog/2024-05-23-sunset-notice-projects-classic/) for more information. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. + [Obsolete("")] +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// > [!WARNING]> **Closing down notice:** Projects (classic) is being deprecated in favor of the new Projects experience.> See the [changelog](https://github.blog/changelog/2024-05-23-sunset-notice-projects-classic/) for more information. + /// + /// A + /// The request body + /// Configuration for the request such as headers, query parameters, and middleware options. + [Obsolete("")] +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPostRequestInformation(global::Ayllu.Github.Client.Projects.Columns.Item.Cards.CardsRequestBuilder.CardsPostRequestBody body, Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToPostRequestInformation(global::Ayllu.Github.Client.Projects.Columns.Item.Cards.CardsRequestBuilder.CardsPostRequestBody body, Action> requestConfiguration = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + [Obsolete("")] + public global::Ayllu.Github.Client.Projects.Columns.Item.Cards.CardsRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Projects.Columns.Item.Cards.CardsRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Composed type wrapper for classes , + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class CardsPostRequestBody : IComposedTypeWrapper, IParsable + { + /// Composed type representation for type +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Projects.Columns.Item.Cards.CardsPostRequestBodyMember1? CardsPostRequestBodyMember1 { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Projects.Columns.Item.Cards.CardsPostRequestBodyMember1 CardsPostRequestBodyMember1 { get; set; } +#endif + /// Composed type representation for type +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Projects.Columns.Item.Cards.CardsPostRequestBodyMember2? CardsPostRequestBodyMember2 { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Projects.Columns.Item.Cards.CardsPostRequestBodyMember2 CardsPostRequestBodyMember2 { get; set; } +#endif + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Projects.Columns.Item.Cards.CardsRequestBuilder.CardsPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + var mappingValue = parseNode.GetChildNode("")?.GetStringValue(); + var result = new global::Ayllu.Github.Client.Projects.Columns.Item.Cards.CardsRequestBuilder.CardsPostRequestBody(); + if("".Equals(mappingValue, StringComparison.OrdinalIgnoreCase)) + { + result.CardsPostRequestBodyMember1 = new global::Ayllu.Github.Client.Projects.Columns.Item.Cards.CardsPostRequestBodyMember1(); + } + else if("".Equals(mappingValue, StringComparison.OrdinalIgnoreCase)) + { + result.CardsPostRequestBodyMember2 = new global::Ayllu.Github.Client.Projects.Columns.Item.Cards.CardsPostRequestBodyMember2(); + } + return result; + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + if(CardsPostRequestBodyMember1 != null) + { + return CardsPostRequestBodyMember1.GetFieldDeserializers(); + } + else if(CardsPostRequestBodyMember2 != null) + { + return CardsPostRequestBodyMember2.GetFieldDeserializers(); + } + return new Dictionary>(); + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(CardsPostRequestBodyMember1 != null) + { + writer.WriteObjectValue(null, CardsPostRequestBodyMember1); + } + else if(CardsPostRequestBodyMember2 != null) + { + writer.WriteObjectValue(null, CardsPostRequestBodyMember2); + } + } + } + /// + /// > [!WARNING]> **Closing down notice:** Projects (classic) is being deprecated in favor of the new Projects experience.> See the [changelog](https://github.blog/changelog/2024-05-23-sunset-notice-projects-classic/) for more information. + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class CardsRequestBuilderGetQueryParameters + { + /// Filters the project cards that are returned by the card's state. + [Obsolete("This property is deprecated, use ArchivedStateAsGetArchivedStateQueryParameterType instead")] +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("archived_state")] + public string? ArchivedState { get; set; } +#nullable restore +#else + [QueryParameter("archived_state")] + public string ArchivedState { get; set; } +#endif + /// Filters the project cards that are returned by the card's state. + [QueryParameter("archived_state")] + public global::Ayllu.Github.Client.Projects.Columns.Item.Cards.GetArchived_stateQueryParameterType? ArchivedStateAsGetArchivedStateQueryParameterType { get; set; } + /// The page number of the results to fetch. For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." + [QueryParameter("page")] + public int? Page { get; set; } + /// The number of results per page (max 100). For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." + [QueryParameter("per_page")] + public int? PerPage { get; set; } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class CardsRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class CardsRequestBuilderPostRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Projects/Columns/Item/Cards/GetArchived_stateQueryParameterType.cs b/src/Ayllu.Github.Client/Github/Client/Projects/Columns/Item/Cards/GetArchived_stateQueryParameterType.cs new file mode 100644 index 0000000..6af0e4d --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Projects/Columns/Item/Cards/GetArchived_stateQueryParameterType.cs @@ -0,0 +1,24 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Projects.Columns.Item.Cards +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public enum GetArchived_stateQueryParameterType + #pragma warning restore CS1591 + { + [EnumMember(Value = "all")] + #pragma warning disable CS1591 + All, + #pragma warning restore CS1591 + [EnumMember(Value = "archived")] + #pragma warning disable CS1591 + Archived, + #pragma warning restore CS1591 + [EnumMember(Value = "not_archived")] + #pragma warning disable CS1591 + Not_archived, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Projects/Columns/Item/Cards/ProjectCard503Error.cs b/src/Ayllu.Github.Client/Github/Client/Projects/Columns/Item/Cards/ProjectCard503Error.cs new file mode 100644 index 0000000..3301c0a --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Projects/Columns/Item/Cards/ProjectCard503Error.cs @@ -0,0 +1,98 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Projects.Columns.Item.Cards +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class ProjectCard503Error : ApiException, IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The code property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Code { get; set; } +#nullable restore +#else + public string Code { get; set; } +#endif + /// The documentation_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? DocumentationUrl { get; set; } +#nullable restore +#else + public string DocumentationUrl { get; set; } +#endif + /// The errors property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? Errors { get; set; } +#nullable restore +#else + public List Errors { get; set; } +#endif + /// The primary error message. + public override string Message { get => MessageEscaped ?? string.Empty; } + /// The message property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? MessageEscaped { get; set; } +#nullable restore +#else + public string MessageEscaped { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public ProjectCard503Error() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Projects.Columns.Item.Cards.ProjectCard503Error CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Projects.Columns.Item.Cards.ProjectCard503Error(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "code", n => { Code = n.GetStringValue(); } }, + { "documentation_url", n => { DocumentationUrl = n.GetStringValue(); } }, + { "errors", n => { Errors = n.GetCollectionOfObjectValues(global::Ayllu.Github.Client.Projects.Columns.Item.Cards.ProjectCard503Error_errors.CreateFromDiscriminatorValue)?.AsList(); } }, + { "message", n => { MessageEscaped = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("code", Code); + writer.WriteStringValue("documentation_url", DocumentationUrl); + writer.WriteCollectionOfObjectValues("errors", Errors); + writer.WriteStringValue("message", MessageEscaped); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Projects/Columns/Item/Cards/ProjectCard503Error_errors.cs b/src/Ayllu.Github.Client/Github/Client/Projects/Columns/Item/Cards/ProjectCard503Error_errors.cs new file mode 100644 index 0000000..8dc06d3 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Projects/Columns/Item/Cards/ProjectCard503Error_errors.cs @@ -0,0 +1,75 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Projects.Columns.Item.Cards +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class ProjectCard503Error_errors : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The code property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Code { get; set; } +#nullable restore +#else + public string Code { get; set; } +#endif + /// The message property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Message { get; set; } +#nullable restore +#else + public string Message { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public ProjectCard503Error_errors() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Projects.Columns.Item.Cards.ProjectCard503Error_errors CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Projects.Columns.Item.Cards.ProjectCard503Error_errors(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "code", n => { Code = n.GetStringValue(); } }, + { "message", n => { Message = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("code", Code); + writer.WriteStringValue("message", Message); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Projects/Columns/Item/Moves/MovesPostRequestBody.cs b/src/Ayllu.Github.Client/Github/Client/Projects/Columns/Item/Moves/MovesPostRequestBody.cs new file mode 100644 index 0000000..2108ef3 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Projects/Columns/Item/Moves/MovesPostRequestBody.cs @@ -0,0 +1,65 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Projects.Columns.Item.Moves +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class MovesPostRequestBody : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The position of the column in a project. Can be one of: `first`, `last`, or `after:<column_id>` to place after the specified column. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Position { get; set; } +#nullable restore +#else + public string Position { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public MovesPostRequestBody() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Projects.Columns.Item.Moves.MovesPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Projects.Columns.Item.Moves.MovesPostRequestBody(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "position", n => { Position = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("position", Position); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Projects/Columns/Item/Moves/MovesPostResponse.cs b/src/Ayllu.Github.Client/Github/Client/Projects/Columns/Item/Moves/MovesPostResponse.cs new file mode 100644 index 0000000..0c76165 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Projects/Columns/Item/Moves/MovesPostResponse.cs @@ -0,0 +1,45 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Projects.Columns.Item.Moves +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class MovesPostResponse : IParsable + #pragma warning restore CS1591 + { + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Projects.Columns.Item.Moves.MovesPostResponse CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Projects.Columns.Item.Moves.MovesPostResponse(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Projects/Columns/Item/Moves/MovesRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Projects/Columns/Item/Moves/MovesRequestBuilder.cs new file mode 100644 index 0000000..d6b1a5b --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Projects/Columns/Item/Moves/MovesRequestBuilder.cs @@ -0,0 +1,141 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Projects.Columns.Item.Moves +{ + /// + /// Builds and executes requests for operations under \projects\columns\{column_id}\moves + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class MovesRequestBuilder : BaseRequestBuilder + { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public MovesRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/projects/columns/{column_id}/moves", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public MovesRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/projects/columns/{column_id}/moves", rawUrl) + { + } + /// + /// > [!WARNING]> **Closing down notice:** Projects (classic) is being deprecated in favor of the new Projects experience.> See the [changelog](https://github.blog/changelog/2024-05-23-sunset-notice-projects-classic/) for more information. + /// API method documentation + /// + /// A + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 401 status code + /// When receiving a 403 status code + /// When receiving a 422 status code + [Obsolete("")] +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PostAsMovesPostResponseAsync(global::Ayllu.Github.Client.Projects.Columns.Item.Moves.MovesPostRequestBody body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task PostAsMovesPostResponseAsync(global::Ayllu.Github.Client.Projects.Columns.Item.Moves.MovesPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPostRequestInformation(body, requestConfiguration); + var errorMapping = new Dictionary> + { + { "401", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "403", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "422", global::Ayllu.Github.Client.Models.ValidationErrorSimple.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Projects.Columns.Item.Moves.MovesPostResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// > [!WARNING]> **Closing down notice:** Projects (classic) is being deprecated in favor of the new Projects experience.> See the [changelog](https://github.blog/changelog/2024-05-23-sunset-notice-projects-classic/) for more information. + /// API method documentation + /// + /// A + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 401 status code + /// When receiving a 403 status code + /// When receiving a 422 status code + [Obsolete("This method is obsolete. Use PostAsMovesPostResponseAsync instead.")] +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PostAsync(global::Ayllu.Github.Client.Projects.Columns.Item.Moves.MovesPostRequestBody body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task PostAsync(global::Ayllu.Github.Client.Projects.Columns.Item.Moves.MovesPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPostRequestInformation(body, requestConfiguration); + var errorMapping = new Dictionary> + { + { "401", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "403", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "422", global::Ayllu.Github.Client.Models.ValidationErrorSimple.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Projects.Columns.Item.Moves.MovesResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// > [!WARNING]> **Closing down notice:** Projects (classic) is being deprecated in favor of the new Projects experience.> See the [changelog](https://github.blog/changelog/2024-05-23-sunset-notice-projects-classic/) for more information. + /// + /// A + /// The request body + /// Configuration for the request such as headers, query parameters, and middleware options. + [Obsolete("")] +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPostRequestInformation(global::Ayllu.Github.Client.Projects.Columns.Item.Moves.MovesPostRequestBody body, Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToPostRequestInformation(global::Ayllu.Github.Client.Projects.Columns.Item.Moves.MovesPostRequestBody body, Action> requestConfiguration = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + [Obsolete("")] + public global::Ayllu.Github.Client.Projects.Columns.Item.Moves.MovesRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Projects.Columns.Item.Moves.MovesRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class MovesRequestBuilderPostRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Projects/Columns/Item/Moves/MovesResponse.cs b/src/Ayllu.Github.Client/Github/Client/Projects/Columns/Item/Moves/MovesResponse.cs new file mode 100644 index 0000000..a316b79 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Projects/Columns/Item/Moves/MovesResponse.cs @@ -0,0 +1,28 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Projects.Columns.Item.Moves +{ + [Obsolete("This class is obsolete. Use MovesPostResponse instead.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class MovesResponse : global::Ayllu.Github.Client.Projects.Columns.Item.Moves.MovesPostResponse, IParsable + #pragma warning restore CS1591 + { + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static new global::Ayllu.Github.Client.Projects.Columns.Item.Moves.MovesResponse CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Projects.Columns.Item.Moves.MovesResponse(); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Projects/Columns/Item/WithColumn_ItemRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Projects/Columns/Item/WithColumn_ItemRequestBuilder.cs new file mode 100644 index 0000000..5e697bc --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Projects/Columns/Item/WithColumn_ItemRequestBuilder.cs @@ -0,0 +1,233 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Ayllu.Github.Client.Projects.Columns.Item.Cards; +using Ayllu.Github.Client.Projects.Columns.Item.Moves; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Projects.Columns.Item +{ + /// + /// Builds and executes requests for operations under \projects\columns\{column_id} + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithColumn_ItemRequestBuilder : BaseRequestBuilder + { + /// The cards property + [Obsolete("")] + public global::Ayllu.Github.Client.Projects.Columns.Item.Cards.CardsRequestBuilder Cards + { + get => new global::Ayllu.Github.Client.Projects.Columns.Item.Cards.CardsRequestBuilder(PathParameters, RequestAdapter); + } + /// The moves property + [Obsolete("")] + public global::Ayllu.Github.Client.Projects.Columns.Item.Moves.MovesRequestBuilder Moves + { + get => new global::Ayllu.Github.Client.Projects.Columns.Item.Moves.MovesRequestBuilder(PathParameters, RequestAdapter); + } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public WithColumn_ItemRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/projects/columns/{column_id}", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public WithColumn_ItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/projects/columns/{column_id}", rawUrl) + { + } + /// + /// > [!WARNING]> **Closing down notice:** Projects (classic) is being deprecated in favor of the new Projects experience.> See the [changelog](https://github.blog/changelog/2024-05-23-sunset-notice-projects-classic/) for more information. + /// API method documentation + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 401 status code + /// When receiving a 403 status code + [Obsolete("")] +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task DeleteAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task DeleteAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToDeleteRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "401", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "403", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + }; + await RequestAdapter.SendNoContentAsync(requestInfo, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// > [!WARNING]> **Closing down notice:** Projects (classic) is being deprecated in favor of the new Projects experience.> See the [changelog](https://github.blog/changelog/2024-05-23-sunset-notice-projects-classic/) for more information. + /// API method documentation + /// + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 401 status code + /// When receiving a 403 status code + /// When receiving a 404 status code + [Obsolete("")] +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "401", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "403", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "404", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Models.ProjectColumn.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// > [!WARNING]> **Closing down notice:** Projects (classic) is being deprecated in favor of the new Projects experience.> See the [changelog](https://github.blog/changelog/2024-05-23-sunset-notice-projects-classic/) for more information. + /// API method documentation + /// + /// A + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 401 status code + /// When receiving a 403 status code + [Obsolete("")] +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PatchAsync(global::Ayllu.Github.Client.Projects.Columns.Item.WithColumn_PatchRequestBody body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task PatchAsync(global::Ayllu.Github.Client.Projects.Columns.Item.WithColumn_PatchRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPatchRequestInformation(body, requestConfiguration); + var errorMapping = new Dictionary> + { + { "401", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "403", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Models.ProjectColumn.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// > [!WARNING]> **Closing down notice:** Projects (classic) is being deprecated in favor of the new Projects experience.> See the [changelog](https://github.blog/changelog/2024-05-23-sunset-notice-projects-classic/) for more information. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. + [Obsolete("")] +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToDeleteRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToDeleteRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.DELETE, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// > [!WARNING]> **Closing down notice:** Projects (classic) is being deprecated in favor of the new Projects experience.> See the [changelog](https://github.blog/changelog/2024-05-23-sunset-notice-projects-classic/) for more information. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. + [Obsolete("")] +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// > [!WARNING]> **Closing down notice:** Projects (classic) is being deprecated in favor of the new Projects experience.> See the [changelog](https://github.blog/changelog/2024-05-23-sunset-notice-projects-classic/) for more information. + /// + /// A + /// The request body + /// Configuration for the request such as headers, query parameters, and middleware options. + [Obsolete("")] +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPatchRequestInformation(global::Ayllu.Github.Client.Projects.Columns.Item.WithColumn_PatchRequestBody body, Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToPatchRequestInformation(global::Ayllu.Github.Client.Projects.Columns.Item.WithColumn_PatchRequestBody body, Action> requestConfiguration = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + [Obsolete("")] + public global::Ayllu.Github.Client.Projects.Columns.Item.WithColumn_ItemRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Projects.Columns.Item.WithColumn_ItemRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithColumn_ItemRequestBuilderDeleteRequestConfiguration : RequestConfiguration + { + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithColumn_ItemRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithColumn_ItemRequestBuilderPatchRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Projects/Columns/Item/WithColumn_PatchRequestBody.cs b/src/Ayllu.Github.Client/Github/Client/Projects/Columns/Item/WithColumn_PatchRequestBody.cs new file mode 100644 index 0000000..ce31a4e --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Projects/Columns/Item/WithColumn_PatchRequestBody.cs @@ -0,0 +1,65 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Projects.Columns.Item +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class WithColumn_PatchRequestBody : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// Name of the project column +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Name { get; set; } +#nullable restore +#else + public string Name { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public WithColumn_PatchRequestBody() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Projects.Columns.Item.WithColumn_PatchRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Projects.Columns.Item.WithColumn_PatchRequestBody(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "name", n => { Name = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("name", Name); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Projects/Item/Collaborators/CollaboratorsRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Projects/Item/Collaborators/CollaboratorsRequestBuilder.cs new file mode 100644 index 0000000..bb3442c --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Projects/Item/Collaborators/CollaboratorsRequestBuilder.cs @@ -0,0 +1,149 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Ayllu.Github.Client.Projects.Item.Collaborators.Item; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Projects.Item.Collaborators +{ + /// + /// Builds and executes requests for operations under \projects\{project_id}\collaborators + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class CollaboratorsRequestBuilder : BaseRequestBuilder + { + /// Gets an item from the Ayllu.Github.Client.projects.item.collaborators.item collection + /// The handle for the GitHub user account. + /// A + [Obsolete("")] + public global::Ayllu.Github.Client.Projects.Item.Collaborators.Item.WithUsernameItemRequestBuilder this[string position] + { + get + { + var urlTplParams = new Dictionary(PathParameters); + urlTplParams.Add("username", position); + return new global::Ayllu.Github.Client.Projects.Item.Collaborators.Item.WithUsernameItemRequestBuilder(urlTplParams, RequestAdapter); + } + } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public CollaboratorsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/projects/{project_id}/collaborators{?affiliation*,page*,per_page*}", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public CollaboratorsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/projects/{project_id}/collaborators{?affiliation*,page*,per_page*}", rawUrl) + { + } + /// + /// > [!WARNING]> **Closing down notice:** Projects (classic) is being deprecated in favor of the new Projects experience.> See the [changelog](https://github.blog/changelog/2024-05-23-sunset-notice-projects-classic/) for more information. + /// API method documentation + /// + /// A List<global::Ayllu.Github.Client.Models.SimpleUser> + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 401 status code + /// When receiving a 403 status code + /// When receiving a 404 status code + /// When receiving a 422 status code + [Obsolete("")] +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task?> GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task> GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "401", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "403", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "404", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "422", global::Ayllu.Github.Client.Models.ValidationError.CreateFromDiscriminatorValue }, + }; + var collectionResult = await RequestAdapter.SendCollectionAsync(requestInfo, global::Ayllu.Github.Client.Models.SimpleUser.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + return collectionResult?.AsList(); + } + /// + /// > [!WARNING]> **Closing down notice:** Projects (classic) is being deprecated in favor of the new Projects experience.> See the [changelog](https://github.blog/changelog/2024-05-23-sunset-notice-projects-classic/) for more information. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. + [Obsolete("")] +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + [Obsolete("")] + public global::Ayllu.Github.Client.Projects.Item.Collaborators.CollaboratorsRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Projects.Item.Collaborators.CollaboratorsRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// > [!WARNING]> **Closing down notice:** Projects (classic) is being deprecated in favor of the new Projects experience.> See the [changelog](https://github.blog/changelog/2024-05-23-sunset-notice-projects-classic/) for more information. + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class CollaboratorsRequestBuilderGetQueryParameters + { + /// 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. + [Obsolete("This property is deprecated, use AffiliationAsGetAffiliationQueryParameterType instead")] +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("affiliation")] + public string? Affiliation { get; set; } +#nullable restore +#else + [QueryParameter("affiliation")] + public string Affiliation { get; set; } +#endif + /// 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. + [QueryParameter("affiliation")] + public global::Ayllu.Github.Client.Projects.Item.Collaborators.GetAffiliationQueryParameterType? AffiliationAsGetAffiliationQueryParameterType { get; set; } + /// The page number of the results to fetch. For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." + [QueryParameter("page")] + public int? Page { get; set; } + /// The number of results per page (max 100). For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." + [QueryParameter("per_page")] + public int? PerPage { get; set; } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class CollaboratorsRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Projects/Item/Collaborators/GetAffiliationQueryParameterType.cs b/src/Ayllu.Github.Client/Github/Client/Projects/Item/Collaborators/GetAffiliationQueryParameterType.cs new file mode 100644 index 0000000..335f9e1 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Projects/Item/Collaborators/GetAffiliationQueryParameterType.cs @@ -0,0 +1,24 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Projects.Item.Collaborators +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public enum GetAffiliationQueryParameterType + #pragma warning restore CS1591 + { + [EnumMember(Value = "outside")] + #pragma warning disable CS1591 + Outside, + #pragma warning restore CS1591 + [EnumMember(Value = "direct")] + #pragma warning disable CS1591 + Direct, + #pragma warning restore CS1591 + [EnumMember(Value = "all")] + #pragma warning disable CS1591 + All, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Projects/Item/Collaborators/Item/Permission/PermissionRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Projects/Item/Collaborators/Item/Permission/PermissionRequestBuilder.cs new file mode 100644 index 0000000..9d3d8e1 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Projects/Item/Collaborators/Item/Permission/PermissionRequestBuilder.cs @@ -0,0 +1,107 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Projects.Item.Collaborators.Item.Permission +{ + /// + /// Builds and executes requests for operations under \projects\{project_id}\collaborators\{username}\permission + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class PermissionRequestBuilder : BaseRequestBuilder + { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public PermissionRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/projects/{project_id}/collaborators/{username}/permission", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public PermissionRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/projects/{project_id}/collaborators/{username}/permission", rawUrl) + { + } + /// + /// > [!WARNING]> **Closing down notice:** Projects (classic) is being deprecated in favor of the new Projects experience.> See the [changelog](https://github.blog/changelog/2024-05-23-sunset-notice-projects-classic/) for more information. + /// API method documentation + /// + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 401 status code + /// When receiving a 403 status code + /// When receiving a 404 status code + /// When receiving a 422 status code + [Obsolete("")] +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "401", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "403", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "404", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "422", global::Ayllu.Github.Client.Models.ValidationError.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Models.ProjectCollaboratorPermission.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// > [!WARNING]> **Closing down notice:** Projects (classic) is being deprecated in favor of the new Projects experience.> See the [changelog](https://github.blog/changelog/2024-05-23-sunset-notice-projects-classic/) for more information. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. + [Obsolete("")] +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + [Obsolete("")] + public global::Ayllu.Github.Client.Projects.Item.Collaborators.Item.Permission.PermissionRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Projects.Item.Collaborators.Item.Permission.PermissionRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class PermissionRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Projects/Item/Collaborators/Item/WithUsernameItemRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Projects/Item/Collaborators/Item/WithUsernameItemRequestBuilder.cs new file mode 100644 index 0000000..44c6561 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Projects/Item/Collaborators/Item/WithUsernameItemRequestBuilder.cs @@ -0,0 +1,176 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Ayllu.Github.Client.Projects.Item.Collaborators.Item.Permission; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Projects.Item.Collaborators.Item +{ + /// + /// Builds and executes requests for operations under \projects\{project_id}\collaborators\{username} + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithUsernameItemRequestBuilder : BaseRequestBuilder + { + /// The permission property + [Obsolete("")] + public global::Ayllu.Github.Client.Projects.Item.Collaborators.Item.Permission.PermissionRequestBuilder Permission + { + get => new global::Ayllu.Github.Client.Projects.Item.Collaborators.Item.Permission.PermissionRequestBuilder(PathParameters, RequestAdapter); + } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public WithUsernameItemRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/projects/{project_id}/collaborators/{username}", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public WithUsernameItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/projects/{project_id}/collaborators/{username}", rawUrl) + { + } + /// + /// > [!WARNING]> **Closing down notice:** Projects (classic) is being deprecated in favor of the new Projects experience.> See the [changelog](https://github.blog/changelog/2024-05-23-sunset-notice-projects-classic/) for more information. + /// API method documentation + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 401 status code + /// When receiving a 403 status code + /// When receiving a 404 status code + /// When receiving a 422 status code + [Obsolete("")] +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task DeleteAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task DeleteAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToDeleteRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "401", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "403", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "404", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "422", global::Ayllu.Github.Client.Models.ValidationError.CreateFromDiscriminatorValue }, + }; + await RequestAdapter.SendNoContentAsync(requestInfo, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// > [!WARNING]> **Closing down notice:** Projects (classic) is being deprecated in favor of the new Projects experience.> See the [changelog](https://github.blog/changelog/2024-05-23-sunset-notice-projects-classic/) for more information. + /// API method documentation + /// + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 401 status code + /// When receiving a 403 status code + /// When receiving a 404 status code + /// When receiving a 422 status code + [Obsolete("")] +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PutAsync(global::Ayllu.Github.Client.Projects.Item.Collaborators.Item.WithUsernamePutRequestBody body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task PutAsync(global::Ayllu.Github.Client.Projects.Item.Collaborators.Item.WithUsernamePutRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPutRequestInformation(body, requestConfiguration); + var errorMapping = new Dictionary> + { + { "401", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "403", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "404", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "422", global::Ayllu.Github.Client.Models.ValidationError.CreateFromDiscriminatorValue }, + }; + await RequestAdapter.SendNoContentAsync(requestInfo, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// > [!WARNING]> **Closing down notice:** Projects (classic) is being deprecated in favor of the new Projects experience.> See the [changelog](https://github.blog/changelog/2024-05-23-sunset-notice-projects-classic/) for more information. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. + [Obsolete("")] +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToDeleteRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToDeleteRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.DELETE, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// > [!WARNING]> **Closing down notice:** Projects (classic) is being deprecated in favor of the new Projects experience.> See the [changelog](https://github.blog/changelog/2024-05-23-sunset-notice-projects-classic/) for more information. + /// + /// A + /// The request body + /// Configuration for the request such as headers, query parameters, and middleware options. + [Obsolete("")] +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPutRequestInformation(global::Ayllu.Github.Client.Projects.Item.Collaborators.Item.WithUsernamePutRequestBody body, Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToPutRequestInformation(global::Ayllu.Github.Client.Projects.Item.Collaborators.Item.WithUsernamePutRequestBody body, Action> requestConfiguration = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation(Method.PUT, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + [Obsolete("")] + public global::Ayllu.Github.Client.Projects.Item.Collaborators.Item.WithUsernameItemRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Projects.Item.Collaborators.Item.WithUsernameItemRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithUsernameItemRequestBuilderDeleteRequestConfiguration : RequestConfiguration + { + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithUsernameItemRequestBuilderPutRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Projects/Item/Collaborators/Item/WithUsernamePutRequestBody.cs b/src/Ayllu.Github.Client/Github/Client/Projects/Item/Collaborators/Item/WithUsernamePutRequestBody.cs new file mode 100644 index 0000000..0aae44b --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Projects/Item/Collaborators/Item/WithUsernamePutRequestBody.cs @@ -0,0 +1,60 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Projects.Item.Collaborators.Item +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class WithUsernamePutRequestBody : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The permission to grant the collaborator. + public global::Ayllu.Github.Client.Projects.Item.Collaborators.Item.WithUsernamePutRequestBody_permission? Permission { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public WithUsernamePutRequestBody() + { + AdditionalData = new Dictionary(); + Permission = global::Ayllu.Github.Client.Projects.Item.Collaborators.Item.WithUsernamePutRequestBody_permission.Write; + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Projects.Item.Collaborators.Item.WithUsernamePutRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Projects.Item.Collaborators.Item.WithUsernamePutRequestBody(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "permission", n => { Permission = n.GetEnumValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteEnumValue("permission", Permission); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Projects/Item/Collaborators/Item/WithUsernamePutRequestBody_permission.cs b/src/Ayllu.Github.Client/Github/Client/Projects/Item/Collaborators/Item/WithUsernamePutRequestBody_permission.cs new file mode 100644 index 0000000..1dc10fb --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Projects/Item/Collaborators/Item/WithUsernamePutRequestBody_permission.cs @@ -0,0 +1,23 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Projects.Item.Collaborators.Item +{ + /// The permission to grant the collaborator. + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public enum WithUsernamePutRequestBody_permission + { + [EnumMember(Value = "read")] + #pragma warning disable CS1591 + Read, + #pragma warning restore CS1591 + [EnumMember(Value = "write")] + #pragma warning disable CS1591 + Write, + #pragma warning restore CS1591 + [EnumMember(Value = "admin")] + #pragma warning disable CS1591 + Admin, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Projects/Item/Columns/ColumnsPostRequestBody.cs b/src/Ayllu.Github.Client/Github/Client/Projects/Item/Columns/ColumnsPostRequestBody.cs new file mode 100644 index 0000000..86f3562 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Projects/Item/Columns/ColumnsPostRequestBody.cs @@ -0,0 +1,65 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Projects.Item.Columns +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class ColumnsPostRequestBody : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// Name of the project column +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Name { get; set; } +#nullable restore +#else + public string Name { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public ColumnsPostRequestBody() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Projects.Item.Columns.ColumnsPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Projects.Item.Columns.ColumnsPostRequestBody(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "name", n => { Name = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("name", Name); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Projects/Item/Columns/ColumnsRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Projects/Item/Columns/ColumnsRequestBuilder.cs new file mode 100644 index 0000000..c3a118b --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Projects/Item/Columns/ColumnsRequestBuilder.cs @@ -0,0 +1,179 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Projects.Item.Columns +{ + /// + /// Builds and executes requests for operations under \projects\{project_id}\columns + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class ColumnsRequestBuilder : BaseRequestBuilder + { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public ColumnsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/projects/{project_id}/columns{?page*,per_page*}", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public ColumnsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/projects/{project_id}/columns{?page*,per_page*}", rawUrl) + { + } + /// + /// > [!WARNING]> **Closing down notice:** Projects (classic) is being deprecated in favor of the new Projects experience.> See the [changelog](https://github.blog/changelog/2024-05-23-sunset-notice-projects-classic/) for more information. + /// API method documentation + /// + /// A List<global::Ayllu.Github.Client.Models.ProjectColumn> + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 401 status code + /// When receiving a 403 status code + [Obsolete("")] +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task?> GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task> GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "401", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "403", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + }; + var collectionResult = await RequestAdapter.SendCollectionAsync(requestInfo, global::Ayllu.Github.Client.Models.ProjectColumn.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + return collectionResult?.AsList(); + } + /// + /// > [!WARNING]> **Closing down notice:** Projects (classic) is being deprecated in favor of the new Projects experience.> See the [changelog](https://github.blog/changelog/2024-05-23-sunset-notice-projects-classic/) for more information. + /// API method documentation + /// + /// A + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 401 status code + /// When receiving a 403 status code + /// When receiving a 422 status code + [Obsolete("")] +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PostAsync(global::Ayllu.Github.Client.Projects.Item.Columns.ColumnsPostRequestBody body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task PostAsync(global::Ayllu.Github.Client.Projects.Item.Columns.ColumnsPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPostRequestInformation(body, requestConfiguration); + var errorMapping = new Dictionary> + { + { "401", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "403", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "422", global::Ayllu.Github.Client.Models.ValidationErrorSimple.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Models.ProjectColumn.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// > [!WARNING]> **Closing down notice:** Projects (classic) is being deprecated in favor of the new Projects experience.> See the [changelog](https://github.blog/changelog/2024-05-23-sunset-notice-projects-classic/) for more information. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. + [Obsolete("")] +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// > [!WARNING]> **Closing down notice:** Projects (classic) is being deprecated in favor of the new Projects experience.> See the [changelog](https://github.blog/changelog/2024-05-23-sunset-notice-projects-classic/) for more information. + /// + /// A + /// The request body + /// Configuration for the request such as headers, query parameters, and middleware options. + [Obsolete("")] +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPostRequestInformation(global::Ayllu.Github.Client.Projects.Item.Columns.ColumnsPostRequestBody body, Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToPostRequestInformation(global::Ayllu.Github.Client.Projects.Item.Columns.ColumnsPostRequestBody body, Action> requestConfiguration = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + [Obsolete("")] + public global::Ayllu.Github.Client.Projects.Item.Columns.ColumnsRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Projects.Item.Columns.ColumnsRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// > [!WARNING]> **Closing down notice:** Projects (classic) is being deprecated in favor of the new Projects experience.> See the [changelog](https://github.blog/changelog/2024-05-23-sunset-notice-projects-classic/) for more information. + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class ColumnsRequestBuilderGetQueryParameters + { + /// The page number of the results to fetch. For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." + [QueryParameter("page")] + public int? Page { get; set; } + /// The number of results per page (max 100). For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." + [QueryParameter("per_page")] + public int? PerPage { get; set; } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class ColumnsRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class ColumnsRequestBuilderPostRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Projects/Item/Project403Error.cs b/src/Ayllu.Github.Client/Github/Client/Projects/Item/Project403Error.cs new file mode 100644 index 0000000..f4655ad --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Projects/Item/Project403Error.cs @@ -0,0 +1,88 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Projects.Item +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class Project403Error : ApiException, IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The documentation_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? DocumentationUrl { get; set; } +#nullable restore +#else + public string DocumentationUrl { get; set; } +#endif + /// The errors property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? Errors { get; set; } +#nullable restore +#else + public List Errors { get; set; } +#endif + /// The primary error message. + public override string Message { get => MessageEscaped ?? string.Empty; } + /// The message property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? MessageEscaped { get; set; } +#nullable restore +#else + public string MessageEscaped { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public Project403Error() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Projects.Item.Project403Error CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Projects.Item.Project403Error(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "documentation_url", n => { DocumentationUrl = n.GetStringValue(); } }, + { "errors", n => { Errors = n.GetCollectionOfPrimitiveValues()?.AsList(); } }, + { "message", n => { MessageEscaped = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("documentation_url", DocumentationUrl); + writer.WriteCollectionOfPrimitiveValues("errors", Errors); + writer.WriteStringValue("message", MessageEscaped); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Projects/Item/WithProject_403Error.cs b/src/Ayllu.Github.Client/Github/Client/Projects/Item/WithProject_403Error.cs new file mode 100644 index 0000000..b5b99d0 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Projects/Item/WithProject_403Error.cs @@ -0,0 +1,88 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Projects.Item +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class WithProject_403Error : ApiException, IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The documentation_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? DocumentationUrl { get; set; } +#nullable restore +#else + public string DocumentationUrl { get; set; } +#endif + /// The errors property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? Errors { get; set; } +#nullable restore +#else + public List Errors { get; set; } +#endif + /// The primary error message. + public override string Message { get => MessageEscaped ?? string.Empty; } + /// The message property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? MessageEscaped { get; set; } +#nullable restore +#else + public string MessageEscaped { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public WithProject_403Error() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Projects.Item.WithProject_403Error CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Projects.Item.WithProject_403Error(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "documentation_url", n => { DocumentationUrl = n.GetStringValue(); } }, + { "errors", n => { Errors = n.GetCollectionOfPrimitiveValues()?.AsList(); } }, + { "message", n => { MessageEscaped = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("documentation_url", DocumentationUrl); + writer.WriteCollectionOfPrimitiveValues("errors", Errors); + writer.WriteStringValue("message", MessageEscaped); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Projects/Item/WithProject_ItemRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Projects/Item/WithProject_ItemRequestBuilder.cs new file mode 100644 index 0000000..65ba501 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Projects/Item/WithProject_ItemRequestBuilder.cs @@ -0,0 +1,239 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Ayllu.Github.Client.Projects.Item.Collaborators; +using Ayllu.Github.Client.Projects.Item.Columns; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Projects.Item +{ + /// + /// Builds and executes requests for operations under \projects\{project_id} + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithProject_ItemRequestBuilder : BaseRequestBuilder + { + /// The collaborators property + [Obsolete("")] + public global::Ayllu.Github.Client.Projects.Item.Collaborators.CollaboratorsRequestBuilder Collaborators + { + get => new global::Ayllu.Github.Client.Projects.Item.Collaborators.CollaboratorsRequestBuilder(PathParameters, RequestAdapter); + } + /// The columns property + [Obsolete("")] + public global::Ayllu.Github.Client.Projects.Item.Columns.ColumnsRequestBuilder Columns + { + get => new global::Ayllu.Github.Client.Projects.Item.Columns.ColumnsRequestBuilder(PathParameters, RequestAdapter); + } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public WithProject_ItemRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/projects/{project_id}", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public WithProject_ItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/projects/{project_id}", rawUrl) + { + } + /// + /// > [!WARNING]> **Closing down notice:** Projects (classic) is being deprecated in favor of the new Projects experience.> See the [changelog](https://github.blog/changelog/2024-05-23-sunset-notice-projects-classic/) for more information. + /// API method documentation + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 401 status code + /// When receiving a 403 status code + /// When receiving a 404 status code + /// When receiving a 410 status code + [Obsolete("")] +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task DeleteAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task DeleteAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToDeleteRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "401", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "403", global::Ayllu.Github.Client.Projects.Item.WithProject_403Error.CreateFromDiscriminatorValue }, + { "404", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "410", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + }; + await RequestAdapter.SendNoContentAsync(requestInfo, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// > [!WARNING]> **Closing down notice:** Projects (classic) is being deprecated in favor of the new Projects experience.> See the [changelog](https://github.blog/changelog/2024-05-23-sunset-notice-projects-classic/) for more information. + /// API method documentation + /// + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 401 status code + /// When receiving a 403 status code + [Obsolete("")] +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "401", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "403", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Models.Project.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// > [!WARNING]> **Closing down notice:** Projects (classic) is being deprecated in favor of the new Projects experience.> See the [changelog](https://github.blog/changelog/2024-05-23-sunset-notice-projects-classic/) for more information. + /// API method documentation + /// + /// A + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 401 status code + /// When receiving a 403 status code + /// When receiving a 410 status code + /// When receiving a 422 status code + [Obsolete("")] +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PatchAsync(global::Ayllu.Github.Client.Projects.Item.WithProject_PatchRequestBody body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task PatchAsync(global::Ayllu.Github.Client.Projects.Item.WithProject_PatchRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPatchRequestInformation(body, requestConfiguration); + var errorMapping = new Dictionary> + { + { "401", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "403", global::Ayllu.Github.Client.Projects.Item.Project403Error.CreateFromDiscriminatorValue }, + { "410", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "422", global::Ayllu.Github.Client.Models.ValidationErrorSimple.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Models.Project.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// > [!WARNING]> **Closing down notice:** Projects (classic) is being deprecated in favor of the new Projects experience.> See the [changelog](https://github.blog/changelog/2024-05-23-sunset-notice-projects-classic/) for more information. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. + [Obsolete("")] +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToDeleteRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToDeleteRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.DELETE, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// > [!WARNING]> **Closing down notice:** Projects (classic) is being deprecated in favor of the new Projects experience.> See the [changelog](https://github.blog/changelog/2024-05-23-sunset-notice-projects-classic/) for more information. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. + [Obsolete("")] +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// > [!WARNING]> **Closing down notice:** Projects (classic) is being deprecated in favor of the new Projects experience.> See the [changelog](https://github.blog/changelog/2024-05-23-sunset-notice-projects-classic/) for more information. + /// + /// A + /// The request body + /// Configuration for the request such as headers, query parameters, and middleware options. + [Obsolete("")] +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPatchRequestInformation(global::Ayllu.Github.Client.Projects.Item.WithProject_PatchRequestBody body, Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToPatchRequestInformation(global::Ayllu.Github.Client.Projects.Item.WithProject_PatchRequestBody body, Action> requestConfiguration = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + [Obsolete("")] + public global::Ayllu.Github.Client.Projects.Item.WithProject_ItemRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Projects.Item.WithProject_ItemRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithProject_ItemRequestBuilderDeleteRequestConfiguration : RequestConfiguration + { + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithProject_ItemRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithProject_ItemRequestBuilderPatchRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Projects/Item/WithProject_PatchRequestBody.cs b/src/Ayllu.Github.Client/Github/Client/Projects/Item/WithProject_PatchRequestBody.cs new file mode 100644 index 0000000..47f01cf --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Projects/Item/WithProject_PatchRequestBody.cs @@ -0,0 +1,93 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Projects.Item +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class WithProject_PatchRequestBody : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// Body of the project +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Body { get; set; } +#nullable restore +#else + public string Body { get; set; } +#endif + /// Name of the project +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Name { get; set; } +#nullable restore +#else + public string Name { get; set; } +#endif + /// The baseline permission that all organization members have on this project + public global::Ayllu.Github.Client.Projects.Item.WithProject_PatchRequestBody_organization_permission? OrganizationPermission { get; set; } + /// Whether or not this project can be seen by everyone. + public bool? Private { get; set; } + /// State of the project; either 'open' or 'closed' +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? State { get; set; } +#nullable restore +#else + public string State { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public WithProject_PatchRequestBody() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Projects.Item.WithProject_PatchRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Projects.Item.WithProject_PatchRequestBody(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "body", n => { Body = n.GetStringValue(); } }, + { "name", n => { Name = n.GetStringValue(); } }, + { "organization_permission", n => { OrganizationPermission = n.GetEnumValue(); } }, + { "private", n => { Private = n.GetBoolValue(); } }, + { "state", n => { State = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("body", Body); + writer.WriteStringValue("name", Name); + writer.WriteEnumValue("organization_permission", OrganizationPermission); + writer.WriteBoolValue("private", Private); + writer.WriteStringValue("state", State); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Projects/Item/WithProject_PatchRequestBody_organization_permission.cs b/src/Ayllu.Github.Client/Github/Client/Projects/Item/WithProject_PatchRequestBody_organization_permission.cs new file mode 100644 index 0000000..d28baa9 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Projects/Item/WithProject_PatchRequestBody_organization_permission.cs @@ -0,0 +1,27 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Projects.Item +{ + /// The baseline permission that all organization members have on this project + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public enum WithProject_PatchRequestBody_organization_permission + { + [EnumMember(Value = "read")] + #pragma warning disable CS1591 + Read, + #pragma warning restore CS1591 + [EnumMember(Value = "write")] + #pragma warning disable CS1591 + Write, + #pragma warning restore CS1591 + [EnumMember(Value = "admin")] + #pragma warning disable CS1591 + Admin, + #pragma warning restore CS1591 + [EnumMember(Value = "none")] + #pragma warning disable CS1591 + None, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Projects/ProjectsRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Projects/ProjectsRequestBuilder.cs new file mode 100644 index 0000000..9d4ea39 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Projects/ProjectsRequestBuilder.cs @@ -0,0 +1,68 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Projects.Columns; +using Ayllu.Github.Client.Projects.Item; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System; +namespace Ayllu.Github.Client.Projects +{ + /// + /// Builds and executes requests for operations under \projects + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class ProjectsRequestBuilder : BaseRequestBuilder + { + /// The columns property + public global::Ayllu.Github.Client.Projects.Columns.ColumnsRequestBuilder Columns + { + get => new global::Ayllu.Github.Client.Projects.Columns.ColumnsRequestBuilder(PathParameters, RequestAdapter); + } + /// Gets an item from the Ayllu.Github.Client.projects.item collection + /// The unique identifier of the project. + /// A + [Obsolete("")] + public global::Ayllu.Github.Client.Projects.Item.WithProject_ItemRequestBuilder this[int position] + { + get + { + var urlTplParams = new Dictionary(PathParameters); + urlTplParams.Add("project_id", position); + return new global::Ayllu.Github.Client.Projects.Item.WithProject_ItemRequestBuilder(urlTplParams, RequestAdapter); + } + } + /// Gets an item from the Ayllu.Github.Client.projects.item collection + /// The unique identifier of the project. + /// A + [Obsolete("This indexer is deprecated and will be removed in the next major version. Use the one with the typed parameter instead.")] + public global::Ayllu.Github.Client.Projects.Item.WithProject_ItemRequestBuilder this[string position] + { + get + { + var urlTplParams = new Dictionary(PathParameters); + if (!string.IsNullOrWhiteSpace(position)) urlTplParams.Add("project_id", position); + return new global::Ayllu.Github.Client.Projects.Item.WithProject_ItemRequestBuilder(urlTplParams, RequestAdapter); + } + } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public ProjectsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/projects", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public ProjectsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/projects", rawUrl) + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Rate_limit/Rate_limitRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Rate_limit/Rate_limitRequestBuilder.cs new file mode 100644 index 0000000..36b724d --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Rate_limit/Rate_limitRequestBuilder.cs @@ -0,0 +1,98 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Rate_limit +{ + /// + /// Builds and executes requests for operations under \rate_limit + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class Rate_limitRequestBuilder : BaseRequestBuilder + { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public Rate_limitRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/rate_limit", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public Rate_limitRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/rate_limit", rawUrl) + { + } + /// + /// > [!NOTE]> Accessing this endpoint does not count against your REST API rate limit.Some categories of endpoints have custom rate limits that are separate from the rate limit governing the other REST API endpoints. For this reason, the API response categorizes your rate limit. Under `resources`, you'll see objects relating to different categories:* The `core` object provides your rate limit status for all non-search-related resources in the REST API.* The `search` object provides your rate limit status for the REST API for searching (excluding code searches). For more information, see "[Search](https://docs.github.com/rest/search/search)."* The `code_search` object provides your rate limit status for the REST API for searching code. For more information, see "[Search code](https://docs.github.com/rest/search/search#search-code)."* The `graphql` object provides your rate limit status for the GraphQL API. For more information, see "[Resource limitations](https://docs.github.com/graphql/overview/resource-limitations#rate-limit)."* The `integration_manifest` object provides your rate limit status for the `POST /app-manifests/{code}/conversions` operation. For more information, see "[Creating a GitHub App from a manifest](https://docs.github.com/apps/creating-github-apps/setting-up-a-github-app/creating-a-github-app-from-a-manifest#3-you-exchange-the-temporary-code-to-retrieve-the-app-configuration)."* The `dependency_snapshots` object provides your rate limit status for submitting snapshots to the dependency graph. For more information, see "[Dependency graph](https://docs.github.com/rest/dependency-graph)."* The `dependency_sbom` object provides your rate limit status for requesting SBOMs from the dependency graph. For more information, see "[Dependency graph](https://docs.github.com/rest/dependency-graph)."* The `code_scanning_upload` object provides your rate limit status for uploading SARIF results to code scanning. For more information, see "[Uploading a SARIF file to GitHub](https://docs.github.com/code-security/code-scanning/integrating-with-code-scanning/uploading-a-sarif-file-to-github)."* The `actions_runner_registration` object provides your rate limit status for registering self-hosted runners in GitHub Actions. For more information, see "[Self-hosted runners](https://docs.github.com/rest/actions/self-hosted-runners)."* The `source_import` object is no longer in use for any API endpoints, and it will be removed in the next API version. For more information about API versions, see "[API Versions](https://docs.github.com/rest/about-the-rest-api/api-versions)."> [!NOTE]> The `rate` object is closing down. 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. + /// API method documentation + /// + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 404 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "404", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Models.RateLimitOverview.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// > [!NOTE]> Accessing this endpoint does not count against your REST API rate limit.Some categories of endpoints have custom rate limits that are separate from the rate limit governing the other REST API endpoints. For this reason, the API response categorizes your rate limit. Under `resources`, you'll see objects relating to different categories:* The `core` object provides your rate limit status for all non-search-related resources in the REST API.* The `search` object provides your rate limit status for the REST API for searching (excluding code searches). For more information, see "[Search](https://docs.github.com/rest/search/search)."* The `code_search` object provides your rate limit status for the REST API for searching code. For more information, see "[Search code](https://docs.github.com/rest/search/search#search-code)."* The `graphql` object provides your rate limit status for the GraphQL API. For more information, see "[Resource limitations](https://docs.github.com/graphql/overview/resource-limitations#rate-limit)."* The `integration_manifest` object provides your rate limit status for the `POST /app-manifests/{code}/conversions` operation. For more information, see "[Creating a GitHub App from a manifest](https://docs.github.com/apps/creating-github-apps/setting-up-a-github-app/creating-a-github-app-from-a-manifest#3-you-exchange-the-temporary-code-to-retrieve-the-app-configuration)."* The `dependency_snapshots` object provides your rate limit status for submitting snapshots to the dependency graph. For more information, see "[Dependency graph](https://docs.github.com/rest/dependency-graph)."* The `dependency_sbom` object provides your rate limit status for requesting SBOMs from the dependency graph. For more information, see "[Dependency graph](https://docs.github.com/rest/dependency-graph)."* The `code_scanning_upload` object provides your rate limit status for uploading SARIF results to code scanning. For more information, see "[Uploading a SARIF file to GitHub](https://docs.github.com/code-security/code-scanning/integrating-with-code-scanning/uploading-a-sarif-file-to-github)."* The `actions_runner_registration` object provides your rate limit status for registering self-hosted runners in GitHub Actions. For more information, see "[Self-hosted runners](https://docs.github.com/rest/actions/self-hosted-runners)."* The `source_import` object is no longer in use for any API endpoints, and it will be removed in the next API version. For more information about API versions, see "[API Versions](https://docs.github.com/rest/about-the-rest-api/api-versions)."> [!NOTE]> The `rate` object is closing down. 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. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.Rate_limit.Rate_limitRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Rate_limit.Rate_limitRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class Rate_limitRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Actions/ActionsRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Actions/ActionsRequestBuilder.cs new file mode 100644 index 0000000..72e44bf --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Actions/ActionsRequestBuilder.cs @@ -0,0 +1,113 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Repos.Item.Item.Actions.Artifacts; +using Ayllu.Github.Client.Repos.Item.Item.Actions.Cache; +using Ayllu.Github.Client.Repos.Item.Item.Actions.Caches; +using Ayllu.Github.Client.Repos.Item.Item.Actions.Jobs; +using Ayllu.Github.Client.Repos.Item.Item.Actions.Oidc; +using Ayllu.Github.Client.Repos.Item.Item.Actions.OrganizationSecrets; +using Ayllu.Github.Client.Repos.Item.Item.Actions.OrganizationVariables; +using Ayllu.Github.Client.Repos.Item.Item.Actions.Permissions; +using Ayllu.Github.Client.Repos.Item.Item.Actions.Runners; +using Ayllu.Github.Client.Repos.Item.Item.Actions.Runs; +using Ayllu.Github.Client.Repos.Item.Item.Actions.Secrets; +using Ayllu.Github.Client.Repos.Item.Item.Actions.Variables; +using Ayllu.Github.Client.Repos.Item.Item.Actions.Workflows; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.Actions +{ + /// + /// Builds and executes requests for operations under \repos\{owner-id}\{repo-id}\actions + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class ActionsRequestBuilder : BaseRequestBuilder + { + /// The artifacts property + public global::Ayllu.Github.Client.Repos.Item.Item.Actions.Artifacts.ArtifactsRequestBuilder Artifacts + { + get => new global::Ayllu.Github.Client.Repos.Item.Item.Actions.Artifacts.ArtifactsRequestBuilder(PathParameters, RequestAdapter); + } + /// The cache property + public global::Ayllu.Github.Client.Repos.Item.Item.Actions.Cache.CacheRequestBuilder Cache + { + get => new global::Ayllu.Github.Client.Repos.Item.Item.Actions.Cache.CacheRequestBuilder(PathParameters, RequestAdapter); + } + /// The caches property + public global::Ayllu.Github.Client.Repos.Item.Item.Actions.Caches.CachesRequestBuilder Caches + { + get => new global::Ayllu.Github.Client.Repos.Item.Item.Actions.Caches.CachesRequestBuilder(PathParameters, RequestAdapter); + } + /// The jobs property + public global::Ayllu.Github.Client.Repos.Item.Item.Actions.Jobs.JobsRequestBuilder Jobs + { + get => new global::Ayllu.Github.Client.Repos.Item.Item.Actions.Jobs.JobsRequestBuilder(PathParameters, RequestAdapter); + } + /// The oidc property + public global::Ayllu.Github.Client.Repos.Item.Item.Actions.Oidc.OidcRequestBuilder Oidc + { + get => new global::Ayllu.Github.Client.Repos.Item.Item.Actions.Oidc.OidcRequestBuilder(PathParameters, RequestAdapter); + } + /// The organizationSecrets property + public global::Ayllu.Github.Client.Repos.Item.Item.Actions.OrganizationSecrets.OrganizationSecretsRequestBuilder OrganizationSecrets + { + get => new global::Ayllu.Github.Client.Repos.Item.Item.Actions.OrganizationSecrets.OrganizationSecretsRequestBuilder(PathParameters, RequestAdapter); + } + /// The organizationVariables property + public global::Ayllu.Github.Client.Repos.Item.Item.Actions.OrganizationVariables.OrganizationVariablesRequestBuilder OrganizationVariables + { + get => new global::Ayllu.Github.Client.Repos.Item.Item.Actions.OrganizationVariables.OrganizationVariablesRequestBuilder(PathParameters, RequestAdapter); + } + /// The permissions property + public global::Ayllu.Github.Client.Repos.Item.Item.Actions.Permissions.PermissionsRequestBuilder Permissions + { + get => new global::Ayllu.Github.Client.Repos.Item.Item.Actions.Permissions.PermissionsRequestBuilder(PathParameters, RequestAdapter); + } + /// The runners property + public global::Ayllu.Github.Client.Repos.Item.Item.Actions.Runners.RunnersRequestBuilder Runners + { + get => new global::Ayllu.Github.Client.Repos.Item.Item.Actions.Runners.RunnersRequestBuilder(PathParameters, RequestAdapter); + } + /// The runs property + public global::Ayllu.Github.Client.Repos.Item.Item.Actions.Runs.RunsRequestBuilder Runs + { + get => new global::Ayllu.Github.Client.Repos.Item.Item.Actions.Runs.RunsRequestBuilder(PathParameters, RequestAdapter); + } + /// The secrets property + public global::Ayllu.Github.Client.Repos.Item.Item.Actions.Secrets.SecretsRequestBuilder Secrets + { + get => new global::Ayllu.Github.Client.Repos.Item.Item.Actions.Secrets.SecretsRequestBuilder(PathParameters, RequestAdapter); + } + /// The variables property + public global::Ayllu.Github.Client.Repos.Item.Item.Actions.Variables.VariablesRequestBuilder Variables + { + get => new global::Ayllu.Github.Client.Repos.Item.Item.Actions.Variables.VariablesRequestBuilder(PathParameters, RequestAdapter); + } + /// The workflows property + public global::Ayllu.Github.Client.Repos.Item.Item.Actions.Workflows.WorkflowsRequestBuilder Workflows + { + get => new global::Ayllu.Github.Client.Repos.Item.Item.Actions.Workflows.WorkflowsRequestBuilder(PathParameters, RequestAdapter); + } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public ActionsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/actions", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public ActionsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/actions", rawUrl) + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Actions/Artifacts/ArtifactsGetResponse.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Actions/Artifacts/ArtifactsGetResponse.cs new file mode 100644 index 0000000..939648f --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Actions/Artifacts/ArtifactsGetResponse.cs @@ -0,0 +1,70 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.Actions.Artifacts +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class ArtifactsGetResponse : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The artifacts property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? Artifacts { get; set; } +#nullable restore +#else + public List Artifacts { get; set; } +#endif + /// The total_count property + public int? TotalCount { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public ArtifactsGetResponse() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Repos.Item.Item.Actions.Artifacts.ArtifactsGetResponse CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Repos.Item.Item.Actions.Artifacts.ArtifactsGetResponse(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "artifacts", n => { Artifacts = n.GetCollectionOfObjectValues(global::Ayllu.Github.Client.Models.Artifact.CreateFromDiscriminatorValue)?.AsList(); } }, + { "total_count", n => { TotalCount = n.GetIntValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteCollectionOfObjectValues("artifacts", Artifacts); + writer.WriteIntValue("total_count", TotalCount); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Actions/Artifacts/ArtifactsRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Actions/Artifacts/ArtifactsRequestBuilder.cs new file mode 100644 index 0000000..1736616 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Actions/Artifacts/ArtifactsRequestBuilder.cs @@ -0,0 +1,161 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Repos.Item.Item.Actions.Artifacts.Item; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.Actions.Artifacts +{ + /// + /// Builds and executes requests for operations under \repos\{owner-id}\{repo-id}\actions\artifacts + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class ArtifactsRequestBuilder : BaseRequestBuilder + { + /// Gets an item from the Ayllu.Github.Client.repos.item.item.actions.artifacts.item collection + /// The unique identifier of the artifact. + /// A + public global::Ayllu.Github.Client.Repos.Item.Item.Actions.Artifacts.Item.WithArtifact_ItemRequestBuilder this[int position] + { + get + { + var urlTplParams = new Dictionary(PathParameters); + urlTplParams.Add("artifact_id", position); + return new global::Ayllu.Github.Client.Repos.Item.Item.Actions.Artifacts.Item.WithArtifact_ItemRequestBuilder(urlTplParams, RequestAdapter); + } + } + /// Gets an item from the Ayllu.Github.Client.repos.item.item.actions.artifacts.item collection + /// The unique identifier of the artifact. + /// A + [Obsolete("This indexer is deprecated and will be removed in the next major version. Use the one with the typed parameter instead.")] + public global::Ayllu.Github.Client.Repos.Item.Item.Actions.Artifacts.Item.WithArtifact_ItemRequestBuilder this[string position] + { + get + { + var urlTplParams = new Dictionary(PathParameters); + if (!string.IsNullOrWhiteSpace(position)) urlTplParams.Add("artifact_id", position); + return new global::Ayllu.Github.Client.Repos.Item.Item.Actions.Artifacts.Item.WithArtifact_ItemRequestBuilder(urlTplParams, RequestAdapter); + } + } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public ArtifactsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/actions/artifacts{?name*,page*,per_page*}", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public ArtifactsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/actions/artifacts{?name*,page*,per_page*}", rawUrl) + { + } + /// + /// 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. + /// API method documentation + /// + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsArtifactsGetResponseAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task GetAsArtifactsGetResponseAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Repos.Item.Item.Actions.Artifacts.ArtifactsGetResponse.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false); + } + /// + /// 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. + /// API method documentation + /// + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + [Obsolete("This method is obsolete. Use GetAsArtifactsGetResponseAsync instead.")] +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Repos.Item.Item.Actions.Artifacts.ArtifactsResponse.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false); + } + /// + /// 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. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.Repos.Item.Item.Actions.Artifacts.ArtifactsRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Repos.Item.Item.Actions.Artifacts.ArtifactsRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// 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. + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class ArtifactsRequestBuilderGetQueryParameters + { + /// The name field of an artifact. When specified, only artifacts with this name will be returned. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("name")] + public string? Name { get; set; } +#nullable restore +#else + [QueryParameter("name")] + public string Name { get; set; } +#endif + /// The page number of the results to fetch. For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." + [QueryParameter("page")] + public int? Page { get; set; } + /// The number of results per page (max 100). For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." + [QueryParameter("per_page")] + public int? PerPage { get; set; } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class ArtifactsRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Actions/Artifacts/ArtifactsResponse.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Actions/Artifacts/ArtifactsResponse.cs new file mode 100644 index 0000000..0606547 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Actions/Artifacts/ArtifactsResponse.cs @@ -0,0 +1,28 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.Actions.Artifacts +{ + [Obsolete("This class is obsolete. Use ArtifactsGetResponse instead.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class ArtifactsResponse : global::Ayllu.Github.Client.Repos.Item.Item.Actions.Artifacts.ArtifactsGetResponse, IParsable + #pragma warning restore CS1591 + { + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static new global::Ayllu.Github.Client.Repos.Item.Item.Actions.Artifacts.ArtifactsResponse CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Repos.Item.Item.Actions.Artifacts.ArtifactsResponse(); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Actions/Artifacts/Item/Item/WithArchive_formatItemRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Actions/Artifacts/Item/Item/WithArchive_formatItemRequestBuilder.cs new file mode 100644 index 0000000..913793e --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Actions/Artifacts/Item/Item/WithArchive_formatItemRequestBuilder.cs @@ -0,0 +1,97 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.Actions.Artifacts.Item.Item +{ + /// + /// Builds and executes requests for operations under \repos\{owner-id}\{repo-id}\actions\artifacts\{artifact_id}\{archive_format} + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithArchive_formatItemRequestBuilder : BaseRequestBuilder + { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public WithArchive_formatItemRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/actions/artifacts/{artifact_id}/{archive_format}", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public WithArchive_formatItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/actions/artifacts/{artifact_id}/{archive_format}", rawUrl) + { + } + /// + /// 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. + /// API method documentation + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 410 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "410", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + }; + await RequestAdapter.SendNoContentAsync(requestInfo, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// 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. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.Repos.Item.Item.Actions.Artifacts.Item.Item.WithArchive_formatItemRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Repos.Item.Item.Actions.Artifacts.Item.Item.WithArchive_formatItemRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithArchive_formatItemRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Actions/Artifacts/Item/WithArtifact_ItemRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Actions/Artifacts/Item/WithArtifact_ItemRequestBuilder.cs new file mode 100644 index 0000000..b463657 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Actions/Artifacts/Item/WithArtifact_ItemRequestBuilder.cs @@ -0,0 +1,150 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Ayllu.Github.Client.Repos.Item.Item.Actions.Artifacts.Item.Item; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.Actions.Artifacts.Item +{ + /// + /// Builds and executes requests for operations under \repos\{owner-id}\{repo-id}\actions\artifacts\{artifact_id} + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithArtifact_ItemRequestBuilder : BaseRequestBuilder + { + /// Gets an item from the Ayllu.Github.Client.repos.item.item.actions.artifacts.item.item collection + /// Unique identifier of the item + /// A + public global::Ayllu.Github.Client.Repos.Item.Item.Actions.Artifacts.Item.Item.WithArchive_formatItemRequestBuilder this[string position] + { + get + { + var urlTplParams = new Dictionary(PathParameters); + urlTplParams.Add("archive_format", position); + return new global::Ayllu.Github.Client.Repos.Item.Item.Actions.Artifacts.Item.Item.WithArchive_formatItemRequestBuilder(urlTplParams, RequestAdapter); + } + } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public WithArtifact_ItemRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/actions/artifacts/{artifact_id}", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public WithArtifact_ItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/actions/artifacts/{artifact_id}", rawUrl) + { + } + /// + /// 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 + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task DeleteAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task DeleteAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToDeleteRequestInformation(requestConfiguration); + await RequestAdapter.SendNoContentAsync(requestInfo, default, cancellationToken).ConfigureAwait(false); + } + /// + /// 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. + /// API method documentation + /// + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Models.Artifact.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false); + } + /// + /// Deletes an artifact for a workflow run.OAuth tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToDeleteRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToDeleteRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.DELETE, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + return requestInfo; + } + /// + /// 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. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.Repos.Item.Item.Actions.Artifacts.Item.WithArtifact_ItemRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Repos.Item.Item.Actions.Artifacts.Item.WithArtifact_ItemRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithArtifact_ItemRequestBuilderDeleteRequestConfiguration : RequestConfiguration + { + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithArtifact_ItemRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Actions/Cache/CacheRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Actions/Cache/CacheRequestBuilder.cs new file mode 100644 index 0000000..59290d6 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Actions/Cache/CacheRequestBuilder.cs @@ -0,0 +1,41 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Repos.Item.Item.Actions.Cache.Usage; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.Actions.Cache +{ + /// + /// Builds and executes requests for operations under \repos\{owner-id}\{repo-id}\actions\cache + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class CacheRequestBuilder : BaseRequestBuilder + { + /// The usage property + public global::Ayllu.Github.Client.Repos.Item.Item.Actions.Cache.Usage.UsageRequestBuilder Usage + { + get => new global::Ayllu.Github.Client.Repos.Item.Item.Actions.Cache.Usage.UsageRequestBuilder(PathParameters, RequestAdapter); + } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public CacheRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/actions/cache", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public CacheRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/actions/cache", rawUrl) + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Actions/Cache/Usage/UsageRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Actions/Cache/Usage/UsageRequestBuilder.cs new file mode 100644 index 0000000..d33eecf --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Actions/Cache/Usage/UsageRequestBuilder.cs @@ -0,0 +1,93 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.Actions.Cache.Usage +{ + /// + /// Builds and executes requests for operations under \repos\{owner-id}\{repo-id}\actions\cache\usage + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class UsageRequestBuilder : BaseRequestBuilder + { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public UsageRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/actions/cache/usage", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public UsageRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/actions/cache/usage", rawUrl) + { + } + /// + /// 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. + /// API method documentation + /// + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Models.ActionsCacheUsageByRepository.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false); + } + /// + /// 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. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.Repos.Item.Item.Actions.Cache.Usage.UsageRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Repos.Item.Item.Actions.Cache.Usage.UsageRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class UsageRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Actions/Caches/CachesRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Actions/Caches/CachesRequestBuilder.cs new file mode 100644 index 0000000..4ffdf7e --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Actions/Caches/CachesRequestBuilder.cs @@ -0,0 +1,253 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Ayllu.Github.Client.Repos.Item.Item.Actions.Caches.Item; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.Actions.Caches +{ + /// + /// Builds and executes requests for operations under \repos\{owner-id}\{repo-id}\actions\caches + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class CachesRequestBuilder : BaseRequestBuilder + { + /// Gets an item from the Ayllu.Github.Client.repos.item.item.actions.caches.item collection + /// The unique identifier of the GitHub Actions cache. + /// A + public global::Ayllu.Github.Client.Repos.Item.Item.Actions.Caches.Item.WithCache_ItemRequestBuilder this[int position] + { + get + { + var urlTplParams = new Dictionary(PathParameters); + urlTplParams.Add("cache_id", position); + return new global::Ayllu.Github.Client.Repos.Item.Item.Actions.Caches.Item.WithCache_ItemRequestBuilder(urlTplParams, RequestAdapter); + } + } + /// Gets an item from the Ayllu.Github.Client.repos.item.item.actions.caches.item collection + /// The unique identifier of the GitHub Actions cache. + /// A + [Obsolete("This indexer is deprecated and will be removed in the next major version. Use the one with the typed parameter instead.")] + public global::Ayllu.Github.Client.Repos.Item.Item.Actions.Caches.Item.WithCache_ItemRequestBuilder this[string position] + { + get + { + var urlTplParams = new Dictionary(PathParameters); + if (!string.IsNullOrWhiteSpace(position)) urlTplParams.Add("cache_id", position); + return new global::Ayllu.Github.Client.Repos.Item.Item.Actions.Caches.Item.WithCache_ItemRequestBuilder(urlTplParams, RequestAdapter); + } + } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public CachesRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/actions/caches{?direction*,key*,page*,per_page*,ref*,sort*}", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public CachesRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/actions/caches{?direction*,key*,page*,per_page*,ref*,sort*}", rawUrl) + { + } + /// + /// 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. + /// API method documentation + /// + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task DeleteAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task DeleteAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToDeleteRequestInformation(requestConfiguration); + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Models.ActionsCacheList.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false); + } + /// + /// Lists the GitHub Actions caches for a repository.OAuth tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. + /// API method documentation + /// + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Models.ActionsCacheList.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false); + } + /// + /// 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. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToDeleteRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToDeleteRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.DELETE, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/actions/caches?key={key}{&ref*}", PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Lists the GitHub Actions caches for a repository.OAuth tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.Repos.Item.Item.Actions.Caches.CachesRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Repos.Item.Item.Actions.Caches.CachesRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// 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. + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class CachesRequestBuilderDeleteQueryParameters + { + /// A key for identifying the cache. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("key")] + public string? Key { get; set; } +#nullable restore +#else + [QueryParameter("key")] + public string Key { get; set; } +#endif + /// The full Git reference for narrowing down the cache. The `ref` for a branch should be formatted as `refs/heads/<branch name>`. To reference a pull request use `refs/pull/<number>/merge`. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("ref")] + public string? Ref { get; set; } +#nullable restore +#else + [QueryParameter("ref")] + public string Ref { get; set; } +#endif + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class CachesRequestBuilderDeleteRequestConfiguration : RequestConfiguration + { + } + /// + /// Lists the GitHub Actions caches for a repository.OAuth tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class CachesRequestBuilderGetQueryParameters + { + /// The direction to sort the results by. + [Obsolete("This property is deprecated, use DirectionAsGetDirectionQueryParameterType instead")] +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("direction")] + public string? Direction { get; set; } +#nullable restore +#else + [QueryParameter("direction")] + public string Direction { get; set; } +#endif + /// The direction to sort the results by. + [QueryParameter("direction")] + public global::Ayllu.Github.Client.Repos.Item.Item.Actions.Caches.GetDirectionQueryParameterType? DirectionAsGetDirectionQueryParameterType { get; set; } + /// An explicit key or prefix for identifying the cache +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("key")] + public string? Key { get; set; } +#nullable restore +#else + [QueryParameter("key")] + public string Key { get; set; } +#endif + /// The page number of the results to fetch. For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." + [QueryParameter("page")] + public int? Page { get; set; } + /// The number of results per page (max 100). For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." + [QueryParameter("per_page")] + public int? PerPage { get; set; } + /// The full Git reference for narrowing down the cache. The `ref` for a branch should be formatted as `refs/heads/<branch name>`. To reference a pull request use `refs/pull/<number>/merge`. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("ref")] + public string? Ref { get; set; } +#nullable restore +#else + [QueryParameter("ref")] + public string Ref { get; set; } +#endif + /// 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. + [Obsolete("This property is deprecated, use SortAsGetSortQueryParameterType instead")] +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("sort")] + public string? Sort { get; set; } +#nullable restore +#else + [QueryParameter("sort")] + public string Sort { get; set; } +#endif + /// 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. + [QueryParameter("sort")] + public global::Ayllu.Github.Client.Repos.Item.Item.Actions.Caches.GetSortQueryParameterType? SortAsGetSortQueryParameterType { get; set; } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class CachesRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Actions/Caches/GetDirectionQueryParameterType.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Actions/Caches/GetDirectionQueryParameterType.cs new file mode 100644 index 0000000..fdcd7e0 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Actions/Caches/GetDirectionQueryParameterType.cs @@ -0,0 +1,20 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.Actions.Caches +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public enum GetDirectionQueryParameterType + #pragma warning restore CS1591 + { + [EnumMember(Value = "asc")] + #pragma warning disable CS1591 + Asc, + #pragma warning restore CS1591 + [EnumMember(Value = "desc")] + #pragma warning disable CS1591 + Desc, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Actions/Caches/GetSortQueryParameterType.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Actions/Caches/GetSortQueryParameterType.cs new file mode 100644 index 0000000..5cbf0de --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Actions/Caches/GetSortQueryParameterType.cs @@ -0,0 +1,24 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.Actions.Caches +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public enum GetSortQueryParameterType + #pragma warning restore CS1591 + { + [EnumMember(Value = "created_at")] + #pragma warning disable CS1591 + Created_at, + #pragma warning restore CS1591 + [EnumMember(Value = "last_accessed_at")] + #pragma warning disable CS1591 + Last_accessed_at, + #pragma warning restore CS1591 + [EnumMember(Value = "size_in_bytes")] + #pragma warning disable CS1591 + Size_in_bytes, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Actions/Caches/Item/WithCache_ItemRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Actions/Caches/Item/WithCache_ItemRequestBuilder.cs new file mode 100644 index 0000000..b7f42e9 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Actions/Caches/Item/WithCache_ItemRequestBuilder.cs @@ -0,0 +1,90 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.Actions.Caches.Item +{ + /// + /// Builds and executes requests for operations under \repos\{owner-id}\{repo-id}\actions\caches\{cache_id} + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithCache_ItemRequestBuilder : BaseRequestBuilder + { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public WithCache_ItemRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/actions/caches/{cache_id}", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public WithCache_ItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/actions/caches/{cache_id}", rawUrl) + { + } + /// + /// 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 + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task DeleteAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task DeleteAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToDeleteRequestInformation(requestConfiguration); + await RequestAdapter.SendNoContentAsync(requestInfo, default, cancellationToken).ConfigureAwait(false); + } + /// + /// 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. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToDeleteRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToDeleteRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.DELETE, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.Repos.Item.Item.Actions.Caches.Item.WithCache_ItemRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Repos.Item.Item.Actions.Caches.Item.WithCache_ItemRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithCache_ItemRequestBuilderDeleteRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Actions/Jobs/Item/Logs/LogsRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Actions/Jobs/Item/Logs/LogsRequestBuilder.cs new file mode 100644 index 0000000..b6ab8aa --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Actions/Jobs/Item/Logs/LogsRequestBuilder.cs @@ -0,0 +1,90 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.Actions.Jobs.Item.Logs +{ + /// + /// Builds and executes requests for operations under \repos\{owner-id}\{repo-id}\actions\jobs\{job_id}\logs + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class LogsRequestBuilder : BaseRequestBuilder + { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public LogsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/actions/jobs/{job_id}/logs", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public LogsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/actions/jobs/{job_id}/logs", rawUrl) + { + } + /// + /// 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 + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + await RequestAdapter.SendNoContentAsync(requestInfo, default, cancellationToken).ConfigureAwait(false); + } + /// + /// 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. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.Repos.Item.Item.Actions.Jobs.Item.Logs.LogsRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Repos.Item.Item.Actions.Jobs.Item.Logs.LogsRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class LogsRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Actions/Jobs/Item/Rerun/RerunPostRequestBody.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Actions/Jobs/Item/Rerun/RerunPostRequestBody.cs new file mode 100644 index 0000000..d830a83 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Actions/Jobs/Item/Rerun/RerunPostRequestBody.cs @@ -0,0 +1,59 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.Actions.Jobs.Item.Rerun +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class RerunPostRequestBody : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// Whether to enable debug logging for the re-run. + public bool? EnableDebugLogging { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public RerunPostRequestBody() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Repos.Item.Item.Actions.Jobs.Item.Rerun.RerunPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Repos.Item.Item.Actions.Jobs.Item.Rerun.RerunPostRequestBody(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "enable_debug_logging", n => { EnableDebugLogging = n.GetBoolValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteBoolValue("enable_debug_logging", EnableDebugLogging); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Actions/Jobs/Item/Rerun/RerunRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Actions/Jobs/Item/Rerun/RerunRequestBuilder.cs new file mode 100644 index 0000000..c102241 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Actions/Jobs/Item/Rerun/RerunRequestBuilder.cs @@ -0,0 +1,103 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.Actions.Jobs.Item.Rerun +{ + /// + /// Builds and executes requests for operations under \repos\{owner-id}\{repo-id}\actions\jobs\{job_id}\rerun + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class RerunRequestBuilder : BaseRequestBuilder + { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public RerunRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/actions/jobs/{job_id}/rerun", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public RerunRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/actions/jobs/{job_id}/rerun", rawUrl) + { + } + /// + /// 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. + /// API method documentation + /// + /// A + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 403 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PostAsync(global::Ayllu.Github.Client.Repos.Item.Item.Actions.Jobs.Item.Rerun.RerunPostRequestBody body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task PostAsync(global::Ayllu.Github.Client.Repos.Item.Item.Actions.Jobs.Item.Rerun.RerunPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPostRequestInformation(body, requestConfiguration); + var errorMapping = new Dictionary> + { + { "403", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Models.EmptyObject.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// 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. + /// + /// A + /// The request body + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPostRequestInformation(global::Ayllu.Github.Client.Repos.Item.Item.Actions.Jobs.Item.Rerun.RerunPostRequestBody body, Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToPostRequestInformation(global::Ayllu.Github.Client.Repos.Item.Item.Actions.Jobs.Item.Rerun.RerunPostRequestBody body, Action> requestConfiguration = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.Repos.Item.Item.Actions.Jobs.Item.Rerun.RerunRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Repos.Item.Item.Actions.Jobs.Item.Rerun.RerunRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class RerunRequestBuilderPostRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Actions/Jobs/Item/WithJob_ItemRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Actions/Jobs/Item/WithJob_ItemRequestBuilder.cs new file mode 100644 index 0000000..b8a2785 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Actions/Jobs/Item/WithJob_ItemRequestBuilder.cs @@ -0,0 +1,105 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Ayllu.Github.Client.Repos.Item.Item.Actions.Jobs.Item.Logs; +using Ayllu.Github.Client.Repos.Item.Item.Actions.Jobs.Item.Rerun; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.Actions.Jobs.Item +{ + /// + /// Builds and executes requests for operations under \repos\{owner-id}\{repo-id}\actions\jobs\{job_id} + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithJob_ItemRequestBuilder : BaseRequestBuilder + { + /// The logs property + public global::Ayllu.Github.Client.Repos.Item.Item.Actions.Jobs.Item.Logs.LogsRequestBuilder Logs + { + get => new global::Ayllu.Github.Client.Repos.Item.Item.Actions.Jobs.Item.Logs.LogsRequestBuilder(PathParameters, RequestAdapter); + } + /// The rerun property + public global::Ayllu.Github.Client.Repos.Item.Item.Actions.Jobs.Item.Rerun.RerunRequestBuilder Rerun + { + get => new global::Ayllu.Github.Client.Repos.Item.Item.Actions.Jobs.Item.Rerun.RerunRequestBuilder(PathParameters, RequestAdapter); + } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public WithJob_ItemRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/actions/jobs/{job_id}", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public WithJob_ItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/actions/jobs/{job_id}", rawUrl) + { + } + /// + /// 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. + /// API method documentation + /// + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Models.Job.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false); + } + /// + /// 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. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.Repos.Item.Item.Actions.Jobs.Item.WithJob_ItemRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Repos.Item.Item.Actions.Jobs.Item.WithJob_ItemRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithJob_ItemRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Actions/Jobs/JobsRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Actions/Jobs/JobsRequestBuilder.cs new file mode 100644 index 0000000..57f8c6e --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Actions/Jobs/JobsRequestBuilder.cs @@ -0,0 +1,61 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Repos.Item.Item.Actions.Jobs.Item; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.Actions.Jobs +{ + /// + /// Builds and executes requests for operations under \repos\{owner-id}\{repo-id}\actions\jobs + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class JobsRequestBuilder : BaseRequestBuilder + { + /// Gets an item from the Ayllu.Github.Client.repos.item.item.actions.jobs.item collection + /// The unique identifier of the job. + /// A + public global::Ayllu.Github.Client.Repos.Item.Item.Actions.Jobs.Item.WithJob_ItemRequestBuilder this[int position] + { + get + { + var urlTplParams = new Dictionary(PathParameters); + urlTplParams.Add("job_id", position); + return new global::Ayllu.Github.Client.Repos.Item.Item.Actions.Jobs.Item.WithJob_ItemRequestBuilder(urlTplParams, RequestAdapter); + } + } + /// Gets an item from the Ayllu.Github.Client.repos.item.item.actions.jobs.item collection + /// The unique identifier of the job. + /// A + [Obsolete("This indexer is deprecated and will be removed in the next major version. Use the one with the typed parameter instead.")] + public global::Ayllu.Github.Client.Repos.Item.Item.Actions.Jobs.Item.WithJob_ItemRequestBuilder this[string position] + { + get + { + var urlTplParams = new Dictionary(PathParameters); + if (!string.IsNullOrWhiteSpace(position)) urlTplParams.Add("job_id", position); + return new global::Ayllu.Github.Client.Repos.Item.Item.Actions.Jobs.Item.WithJob_ItemRequestBuilder(urlTplParams, RequestAdapter); + } + } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public JobsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/actions/jobs", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public JobsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/actions/jobs", rawUrl) + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Actions/Oidc/Customization/CustomizationRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Actions/Oidc/Customization/CustomizationRequestBuilder.cs new file mode 100644 index 0000000..dc1d80b --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Actions/Oidc/Customization/CustomizationRequestBuilder.cs @@ -0,0 +1,41 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Repos.Item.Item.Actions.Oidc.Customization.Sub; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.Actions.Oidc.Customization +{ + /// + /// Builds and executes requests for operations under \repos\{owner-id}\{repo-id}\actions\oidc\customization + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class CustomizationRequestBuilder : BaseRequestBuilder + { + /// The sub property + public global::Ayllu.Github.Client.Repos.Item.Item.Actions.Oidc.Customization.Sub.SubRequestBuilder Sub + { + get => new global::Ayllu.Github.Client.Repos.Item.Item.Actions.Oidc.Customization.Sub.SubRequestBuilder(PathParameters, RequestAdapter); + } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public CustomizationRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/actions/oidc/customization", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public CustomizationRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/actions/oidc/customization", rawUrl) + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Actions/Oidc/Customization/Sub/SubPutRequestBody.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Actions/Oidc/Customization/Sub/SubPutRequestBody.cs new file mode 100644 index 0000000..45004c5 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Actions/Oidc/Customization/Sub/SubPutRequestBody.cs @@ -0,0 +1,70 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.Actions.Oidc.Customization.Sub +{ + /// + /// Actions OIDC subject customization for a repository + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class SubPutRequestBody : IAdditionalDataHolder, IParsable + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// Array of unique strings. Each claim key can only contain alphanumeric characters and underscores. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? IncludeClaimKeys { get; set; } +#nullable restore +#else + public List IncludeClaimKeys { get; set; } +#endif + /// Whether to use the default template or not. If `true`, the `include_claim_keys` field is ignored. + public bool? UseDefault { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public SubPutRequestBody() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Repos.Item.Item.Actions.Oidc.Customization.Sub.SubPutRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Repos.Item.Item.Actions.Oidc.Customization.Sub.SubPutRequestBody(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "include_claim_keys", n => { IncludeClaimKeys = n.GetCollectionOfPrimitiveValues()?.AsList(); } }, + { "use_default", n => { UseDefault = n.GetBoolValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteCollectionOfPrimitiveValues("include_claim_keys", IncludeClaimKeys); + writer.WriteBoolValue("use_default", UseDefault); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Actions/Oidc/Customization/Sub/SubRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Actions/Oidc/Customization/Sub/SubRequestBuilder.cs new file mode 100644 index 0000000..e1ceaa2 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Actions/Oidc/Customization/Sub/SubRequestBuilder.cs @@ -0,0 +1,160 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.Actions.Oidc.Customization.Sub +{ + /// + /// Builds and executes requests for operations under \repos\{owner-id}\{repo-id}\actions\oidc\customization\sub + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class SubRequestBuilder : BaseRequestBuilder + { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public SubRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/actions/oidc/customization/sub", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public SubRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/actions/oidc/customization/sub", rawUrl) + { + } + /// + /// 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. + /// API method documentation + /// + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 400 status code + /// When receiving a 404 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "400", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "404", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Models.OidcCustomSubRepo.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// 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. + /// API method documentation + /// + /// A + /// Actions OIDC subject customization for a repository + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 400 status code + /// When receiving a 404 status code + /// When receiving a 422 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PutAsync(global::Ayllu.Github.Client.Repos.Item.Item.Actions.Oidc.Customization.Sub.SubPutRequestBody body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task PutAsync(global::Ayllu.Github.Client.Repos.Item.Item.Actions.Oidc.Customization.Sub.SubPutRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPutRequestInformation(body, requestConfiguration); + var errorMapping = new Dictionary> + { + { "400", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "404", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "422", global::Ayllu.Github.Client.Models.ValidationErrorSimple.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Models.EmptyObject.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// 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. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// 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. + /// + /// A + /// Actions OIDC subject customization for a repository + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPutRequestInformation(global::Ayllu.Github.Client.Repos.Item.Item.Actions.Oidc.Customization.Sub.SubPutRequestBody body, Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToPutRequestInformation(global::Ayllu.Github.Client.Repos.Item.Item.Actions.Oidc.Customization.Sub.SubPutRequestBody body, Action> requestConfiguration = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation(Method.PUT, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.Repos.Item.Item.Actions.Oidc.Customization.Sub.SubRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Repos.Item.Item.Actions.Oidc.Customization.Sub.SubRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class SubRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class SubRequestBuilderPutRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Actions/Oidc/OidcRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Actions/Oidc/OidcRequestBuilder.cs new file mode 100644 index 0000000..db954e4 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Actions/Oidc/OidcRequestBuilder.cs @@ -0,0 +1,41 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Repos.Item.Item.Actions.Oidc.Customization; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.Actions.Oidc +{ + /// + /// Builds and executes requests for operations under \repos\{owner-id}\{repo-id}\actions\oidc + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class OidcRequestBuilder : BaseRequestBuilder + { + /// The customization property + public global::Ayllu.Github.Client.Repos.Item.Item.Actions.Oidc.Customization.CustomizationRequestBuilder Customization + { + get => new global::Ayllu.Github.Client.Repos.Item.Item.Actions.Oidc.Customization.CustomizationRequestBuilder(PathParameters, RequestAdapter); + } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public OidcRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/actions/oidc", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public OidcRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/actions/oidc", rawUrl) + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Actions/OrganizationSecrets/OrganizationSecretsGetResponse.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Actions/OrganizationSecrets/OrganizationSecretsGetResponse.cs new file mode 100644 index 0000000..c3aeae3 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Actions/OrganizationSecrets/OrganizationSecretsGetResponse.cs @@ -0,0 +1,70 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.Actions.OrganizationSecrets +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class OrganizationSecretsGetResponse : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The secrets property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? Secrets { get; set; } +#nullable restore +#else + public List Secrets { get; set; } +#endif + /// The total_count property + public int? TotalCount { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public OrganizationSecretsGetResponse() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Repos.Item.Item.Actions.OrganizationSecrets.OrganizationSecretsGetResponse CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Repos.Item.Item.Actions.OrganizationSecrets.OrganizationSecretsGetResponse(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "secrets", n => { Secrets = n.GetCollectionOfObjectValues(global::Ayllu.Github.Client.Models.ActionsSecret.CreateFromDiscriminatorValue)?.AsList(); } }, + { "total_count", n => { TotalCount = n.GetIntValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteCollectionOfObjectValues("secrets", Secrets); + writer.WriteIntValue("total_count", TotalCount); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Actions/OrganizationSecrets/OrganizationSecretsRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Actions/OrganizationSecrets/OrganizationSecretsRequestBuilder.cs new file mode 100644 index 0000000..41194a4 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Actions/OrganizationSecrets/OrganizationSecretsRequestBuilder.cs @@ -0,0 +1,125 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.Actions.OrganizationSecrets +{ + /// + /// Builds and executes requests for operations under \repos\{owner-id}\{repo-id}\actions\organization-secrets + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class OrganizationSecretsRequestBuilder : BaseRequestBuilder + { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public OrganizationSecretsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/actions/organization-secrets{?page*,per_page*}", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public OrganizationSecretsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/actions/organization-secrets{?page*,per_page*}", rawUrl) + { + } + /// + /// 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. + /// API method documentation + /// + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsOrganizationSecretsGetResponseAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task GetAsOrganizationSecretsGetResponseAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Repos.Item.Item.Actions.OrganizationSecrets.OrganizationSecretsGetResponse.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false); + } + /// + /// 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. + /// API method documentation + /// + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + [Obsolete("This method is obsolete. Use GetAsOrganizationSecretsGetResponseAsync instead.")] +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Repos.Item.Item.Actions.OrganizationSecrets.OrganizationSecretsResponse.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false); + } + /// + /// 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. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.Repos.Item.Item.Actions.OrganizationSecrets.OrganizationSecretsRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Repos.Item.Item.Actions.OrganizationSecrets.OrganizationSecretsRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// 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. + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class OrganizationSecretsRequestBuilderGetQueryParameters + { + /// The page number of the results to fetch. For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." + [QueryParameter("page")] + public int? Page { get; set; } + /// The number of results per page (max 100). For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." + [QueryParameter("per_page")] + public int? PerPage { get; set; } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class OrganizationSecretsRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Actions/OrganizationSecrets/OrganizationSecretsResponse.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Actions/OrganizationSecrets/OrganizationSecretsResponse.cs new file mode 100644 index 0000000..012968c --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Actions/OrganizationSecrets/OrganizationSecretsResponse.cs @@ -0,0 +1,28 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.Actions.OrganizationSecrets +{ + [Obsolete("This class is obsolete. Use OrganizationSecretsGetResponse instead.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class OrganizationSecretsResponse : global::Ayllu.Github.Client.Repos.Item.Item.Actions.OrganizationSecrets.OrganizationSecretsGetResponse, IParsable + #pragma warning restore CS1591 + { + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static new global::Ayllu.Github.Client.Repos.Item.Item.Actions.OrganizationSecrets.OrganizationSecretsResponse CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Repos.Item.Item.Actions.OrganizationSecrets.OrganizationSecretsResponse(); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Actions/OrganizationVariables/OrganizationVariablesGetResponse.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Actions/OrganizationVariables/OrganizationVariablesGetResponse.cs new file mode 100644 index 0000000..c53f428 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Actions/OrganizationVariables/OrganizationVariablesGetResponse.cs @@ -0,0 +1,70 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.Actions.OrganizationVariables +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class OrganizationVariablesGetResponse : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The total_count property + public int? TotalCount { get; set; } + /// The variables property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? Variables { get; set; } +#nullable restore +#else + public List Variables { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public OrganizationVariablesGetResponse() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Repos.Item.Item.Actions.OrganizationVariables.OrganizationVariablesGetResponse CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Repos.Item.Item.Actions.OrganizationVariables.OrganizationVariablesGetResponse(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "total_count", n => { TotalCount = n.GetIntValue(); } }, + { "variables", n => { Variables = n.GetCollectionOfObjectValues(global::Ayllu.Github.Client.Models.ActionsVariable.CreateFromDiscriminatorValue)?.AsList(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteIntValue("total_count", TotalCount); + writer.WriteCollectionOfObjectValues("variables", Variables); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Actions/OrganizationVariables/OrganizationVariablesRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Actions/OrganizationVariables/OrganizationVariablesRequestBuilder.cs new file mode 100644 index 0000000..39c01a0 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Actions/OrganizationVariables/OrganizationVariablesRequestBuilder.cs @@ -0,0 +1,125 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.Actions.OrganizationVariables +{ + /// + /// Builds and executes requests for operations under \repos\{owner-id}\{repo-id}\actions\organization-variables + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class OrganizationVariablesRequestBuilder : BaseRequestBuilder + { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public OrganizationVariablesRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/actions/organization-variables{?page*,per_page*}", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public OrganizationVariablesRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/actions/organization-variables{?page*,per_page*}", rawUrl) + { + } + /// + /// 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. + /// API method documentation + /// + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsOrganizationVariablesGetResponseAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task GetAsOrganizationVariablesGetResponseAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Repos.Item.Item.Actions.OrganizationVariables.OrganizationVariablesGetResponse.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false); + } + /// + /// 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. + /// API method documentation + /// + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + [Obsolete("This method is obsolete. Use GetAsOrganizationVariablesGetResponseAsync instead.")] +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Repos.Item.Item.Actions.OrganizationVariables.OrganizationVariablesResponse.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false); + } + /// + /// 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. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.Repos.Item.Item.Actions.OrganizationVariables.OrganizationVariablesRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Repos.Item.Item.Actions.OrganizationVariables.OrganizationVariablesRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// 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. + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class OrganizationVariablesRequestBuilderGetQueryParameters + { + /// The page number of the results to fetch. For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." + [QueryParameter("page")] + public int? Page { get; set; } + /// The number of results per page (max 30). For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." + [QueryParameter("per_page")] + public int? PerPage { get; set; } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class OrganizationVariablesRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Actions/OrganizationVariables/OrganizationVariablesResponse.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Actions/OrganizationVariables/OrganizationVariablesResponse.cs new file mode 100644 index 0000000..a4d94be --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Actions/OrganizationVariables/OrganizationVariablesResponse.cs @@ -0,0 +1,28 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.Actions.OrganizationVariables +{ + [Obsolete("This class is obsolete. Use OrganizationVariablesGetResponse instead.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class OrganizationVariablesResponse : global::Ayllu.Github.Client.Repos.Item.Item.Actions.OrganizationVariables.OrganizationVariablesGetResponse, IParsable + #pragma warning restore CS1591 + { + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static new global::Ayllu.Github.Client.Repos.Item.Item.Actions.OrganizationVariables.OrganizationVariablesResponse CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Repos.Item.Item.Actions.OrganizationVariables.OrganizationVariablesResponse(); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Actions/Permissions/Access/AccessRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Actions/Permissions/Access/AccessRequestBuilder.cs new file mode 100644 index 0000000..441d790 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Actions/Permissions/Access/AccessRequestBuilder.cs @@ -0,0 +1,142 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.Actions.Permissions.Access +{ + /// + /// Builds and executes requests for operations under \repos\{owner-id}\{repo-id}\actions\permissions\access + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class AccessRequestBuilder : BaseRequestBuilder + { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public AccessRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/actions/permissions/access", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public AccessRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/actions/permissions/access", rawUrl) + { + } + /// + /// 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 private repositories.For more information, see "[Allowing access to components in a private repository](https://docs.github.com/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)."OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. + /// API method documentation + /// + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Models.ActionsWorkflowAccessToRepository.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false); + } + /// + /// 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 private repositories.For more information, see "[Allowing access to components in a private repository](https://docs.github.com/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)".OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. + /// API method documentation + /// + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PutAsync(global::Ayllu.Github.Client.Models.ActionsWorkflowAccessToRepository body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task PutAsync(global::Ayllu.Github.Client.Models.ActionsWorkflowAccessToRepository body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPutRequestInformation(body, requestConfiguration); + await RequestAdapter.SendNoContentAsync(requestInfo, default, cancellationToken).ConfigureAwait(false); + } + /// + /// 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 private repositories.For more information, see "[Allowing access to components in a private repository](https://docs.github.com/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)."OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// 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 private repositories.For more information, see "[Allowing access to components in a private repository](https://docs.github.com/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)".OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. + /// + /// A + /// The request body + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPutRequestInformation(global::Ayllu.Github.Client.Models.ActionsWorkflowAccessToRepository body, Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToPutRequestInformation(global::Ayllu.Github.Client.Models.ActionsWorkflowAccessToRepository body, Action> requestConfiguration = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation(Method.PUT, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.Repos.Item.Item.Actions.Permissions.Access.AccessRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Repos.Item.Item.Actions.Permissions.Access.AccessRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class AccessRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class AccessRequestBuilderPutRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Actions/Permissions/ArtifactAndLogRetention/ArtifactAndLogRetentionRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Actions/Permissions/ArtifactAndLogRetention/ArtifactAndLogRetentionRequestBuilder.cs new file mode 100644 index 0000000..81073bc --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Actions/Permissions/ArtifactAndLogRetention/ArtifactAndLogRetentionRequestBuilder.cs @@ -0,0 +1,155 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.Actions.Permissions.ArtifactAndLogRetention +{ + /// + /// Builds and executes requests for operations under \repos\{owner-id}\{repo-id}\actions\permissions\artifact-and-log-retention + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class ArtifactAndLogRetentionRequestBuilder : BaseRequestBuilder + { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public ArtifactAndLogRetentionRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/actions/permissions/artifact-and-log-retention", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public ArtifactAndLogRetentionRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/actions/permissions/artifact-and-log-retention", rawUrl) + { + } + /// + /// Gets artifact and log retention settings for a repository.OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. + /// API method documentation + /// + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 404 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "404", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Models.ActionsArtifactAndLogRetentionResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// Sets artifact and log retention settings for a repository.OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. + /// API method documentation + /// + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 404 status code + /// When receiving a 422 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PutAsync(global::Ayllu.Github.Client.Models.ActionsArtifactAndLogRetention body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task PutAsync(global::Ayllu.Github.Client.Models.ActionsArtifactAndLogRetention body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPutRequestInformation(body, requestConfiguration); + var errorMapping = new Dictionary> + { + { "404", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "422", global::Ayllu.Github.Client.Models.ValidationError.CreateFromDiscriminatorValue }, + }; + await RequestAdapter.SendNoContentAsync(requestInfo, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// Gets artifact and log retention settings for a repository.OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Sets artifact and log retention settings for a repository.OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. + /// + /// A + /// The request body + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPutRequestInformation(global::Ayllu.Github.Client.Models.ActionsArtifactAndLogRetention body, Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToPutRequestInformation(global::Ayllu.Github.Client.Models.ActionsArtifactAndLogRetention body, Action> requestConfiguration = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation(Method.PUT, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.Repos.Item.Item.Actions.Permissions.ArtifactAndLogRetention.ArtifactAndLogRetentionRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Repos.Item.Item.Actions.Permissions.ArtifactAndLogRetention.ArtifactAndLogRetentionRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class ArtifactAndLogRetentionRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class ArtifactAndLogRetentionRequestBuilderPutRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Actions/Permissions/ForkPrContributorApproval/ForkPrContributorApprovalRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Actions/Permissions/ForkPrContributorApproval/ForkPrContributorApprovalRequestBuilder.cs new file mode 100644 index 0000000..276150d --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Actions/Permissions/ForkPrContributorApproval/ForkPrContributorApprovalRequestBuilder.cs @@ -0,0 +1,155 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.Actions.Permissions.ForkPrContributorApproval +{ + /// + /// Builds and executes requests for operations under \repos\{owner-id}\{repo-id}\actions\permissions\fork-pr-contributor-approval + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class ForkPrContributorApprovalRequestBuilder : BaseRequestBuilder + { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public ForkPrContributorApprovalRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/actions/permissions/fork-pr-contributor-approval", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public ForkPrContributorApprovalRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/actions/permissions/fork-pr-contributor-approval", rawUrl) + { + } + /// + /// Gets the fork PR contributor approval policy for a repository.OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. + /// API method documentation + /// + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 404 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "404", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Models.ActionsForkPrContributorApproval.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// Sets the fork PR contributor approval policy for a repository.OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. + /// API method documentation + /// + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 404 status code + /// When receiving a 422 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PutAsync(global::Ayllu.Github.Client.Models.ActionsForkPrContributorApproval body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task PutAsync(global::Ayllu.Github.Client.Models.ActionsForkPrContributorApproval body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPutRequestInformation(body, requestConfiguration); + var errorMapping = new Dictionary> + { + { "404", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "422", global::Ayllu.Github.Client.Models.ValidationError.CreateFromDiscriminatorValue }, + }; + await RequestAdapter.SendNoContentAsync(requestInfo, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// Gets the fork PR contributor approval policy for a repository.OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Sets the fork PR contributor approval policy for a repository.OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. + /// + /// A + /// The request body + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPutRequestInformation(global::Ayllu.Github.Client.Models.ActionsForkPrContributorApproval body, Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToPutRequestInformation(global::Ayllu.Github.Client.Models.ActionsForkPrContributorApproval body, Action> requestConfiguration = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation(Method.PUT, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.Repos.Item.Item.Actions.Permissions.ForkPrContributorApproval.ForkPrContributorApprovalRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Repos.Item.Item.Actions.Permissions.ForkPrContributorApproval.ForkPrContributorApprovalRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class ForkPrContributorApprovalRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class ForkPrContributorApprovalRequestBuilderPutRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Actions/Permissions/ForkPrWorkflowsPrivateRepos/ForkPrWorkflowsPrivateReposRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Actions/Permissions/ForkPrWorkflowsPrivateRepos/ForkPrWorkflowsPrivateReposRequestBuilder.cs new file mode 100644 index 0000000..329f5bd --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Actions/Permissions/ForkPrWorkflowsPrivateRepos/ForkPrWorkflowsPrivateReposRequestBuilder.cs @@ -0,0 +1,157 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.Actions.Permissions.ForkPrWorkflowsPrivateRepos +{ + /// + /// Builds and executes requests for operations under \repos\{owner-id}\{repo-id}\actions\permissions\fork-pr-workflows-private-repos + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class ForkPrWorkflowsPrivateReposRequestBuilder : BaseRequestBuilder + { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public ForkPrWorkflowsPrivateReposRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/actions/permissions/fork-pr-workflows-private-repos", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public ForkPrWorkflowsPrivateReposRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/actions/permissions/fork-pr-workflows-private-repos", rawUrl) + { + } + /// + /// Gets the settings for whether workflows from fork pull requests can run on a private repository.OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. + /// API method documentation + /// + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 403 status code + /// When receiving a 404 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "403", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "404", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Models.ActionsForkPrWorkflowsPrivateRepos.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// Sets the settings for whether workflows from fork pull requests can run on a private repository.OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. + /// API method documentation + /// + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 404 status code + /// When receiving a 422 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PutAsync(global::Ayllu.Github.Client.Models.ActionsForkPrWorkflowsPrivateReposRequest body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task PutAsync(global::Ayllu.Github.Client.Models.ActionsForkPrWorkflowsPrivateReposRequest body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPutRequestInformation(body, requestConfiguration); + var errorMapping = new Dictionary> + { + { "404", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "422", global::Ayllu.Github.Client.Models.ValidationError.CreateFromDiscriminatorValue }, + }; + await RequestAdapter.SendNoContentAsync(requestInfo, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// Gets the settings for whether workflows from fork pull requests can run on a private repository.OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Sets the settings for whether workflows from fork pull requests can run on a private repository.OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. + /// + /// A + /// The request body + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPutRequestInformation(global::Ayllu.Github.Client.Models.ActionsForkPrWorkflowsPrivateReposRequest body, Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToPutRequestInformation(global::Ayllu.Github.Client.Models.ActionsForkPrWorkflowsPrivateReposRequest body, Action> requestConfiguration = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation(Method.PUT, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.Repos.Item.Item.Actions.Permissions.ForkPrWorkflowsPrivateRepos.ForkPrWorkflowsPrivateReposRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Repos.Item.Item.Actions.Permissions.ForkPrWorkflowsPrivateRepos.ForkPrWorkflowsPrivateReposRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class ForkPrWorkflowsPrivateReposRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class ForkPrWorkflowsPrivateReposRequestBuilderPutRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Actions/Permissions/PermissionsPutRequestBody.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Actions/Permissions/PermissionsPutRequestBody.cs new file mode 100644 index 0000000..708495c --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Actions/Permissions/PermissionsPutRequestBody.cs @@ -0,0 +1,68 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.Actions.Permissions +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class PermissionsPutRequestBody : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The permissions policy that controls the actions and reusable workflows that are allowed to run. + public global::Ayllu.Github.Client.Models.AllowedActions? AllowedActions { get; set; } + /// Whether GitHub Actions is enabled on the repository. + public bool? Enabled { get; set; } + /// Whether actions must be pinned to a full-length commit SHA. + public bool? ShaPinningRequired { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public PermissionsPutRequestBody() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Repos.Item.Item.Actions.Permissions.PermissionsPutRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Repos.Item.Item.Actions.Permissions.PermissionsPutRequestBody(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "allowed_actions", n => { AllowedActions = n.GetEnumValue(); } }, + { "enabled", n => { Enabled = n.GetBoolValue(); } }, + { "sha_pinning_required", n => { ShaPinningRequired = n.GetBoolValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteEnumValue("allowed_actions", AllowedActions); + writer.WriteBoolValue("enabled", Enabled); + writer.WriteBoolValue("sha_pinning_required", ShaPinningRequired); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Actions/Permissions/PermissionsRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Actions/Permissions/PermissionsRequestBuilder.cs new file mode 100644 index 0000000..fd25854 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Actions/Permissions/PermissionsRequestBuilder.cs @@ -0,0 +1,178 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Ayllu.Github.Client.Repos.Item.Item.Actions.Permissions.Access; +using Ayllu.Github.Client.Repos.Item.Item.Actions.Permissions.ArtifactAndLogRetention; +using Ayllu.Github.Client.Repos.Item.Item.Actions.Permissions.ForkPrContributorApproval; +using Ayllu.Github.Client.Repos.Item.Item.Actions.Permissions.ForkPrWorkflowsPrivateRepos; +using Ayllu.Github.Client.Repos.Item.Item.Actions.Permissions.SelectedActions; +using Ayllu.Github.Client.Repos.Item.Item.Actions.Permissions.Workflow; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.Actions.Permissions +{ + /// + /// Builds and executes requests for operations under \repos\{owner-id}\{repo-id}\actions\permissions + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class PermissionsRequestBuilder : BaseRequestBuilder + { + /// The access property + public global::Ayllu.Github.Client.Repos.Item.Item.Actions.Permissions.Access.AccessRequestBuilder Access + { + get => new global::Ayllu.Github.Client.Repos.Item.Item.Actions.Permissions.Access.AccessRequestBuilder(PathParameters, RequestAdapter); + } + /// The artifactAndLogRetention property + public global::Ayllu.Github.Client.Repos.Item.Item.Actions.Permissions.ArtifactAndLogRetention.ArtifactAndLogRetentionRequestBuilder ArtifactAndLogRetention + { + get => new global::Ayllu.Github.Client.Repos.Item.Item.Actions.Permissions.ArtifactAndLogRetention.ArtifactAndLogRetentionRequestBuilder(PathParameters, RequestAdapter); + } + /// The forkPrContributorApproval property + public global::Ayllu.Github.Client.Repos.Item.Item.Actions.Permissions.ForkPrContributorApproval.ForkPrContributorApprovalRequestBuilder ForkPrContributorApproval + { + get => new global::Ayllu.Github.Client.Repos.Item.Item.Actions.Permissions.ForkPrContributorApproval.ForkPrContributorApprovalRequestBuilder(PathParameters, RequestAdapter); + } + /// The forkPrWorkflowsPrivateRepos property + public global::Ayllu.Github.Client.Repos.Item.Item.Actions.Permissions.ForkPrWorkflowsPrivateRepos.ForkPrWorkflowsPrivateReposRequestBuilder ForkPrWorkflowsPrivateRepos + { + get => new global::Ayllu.Github.Client.Repos.Item.Item.Actions.Permissions.ForkPrWorkflowsPrivateRepos.ForkPrWorkflowsPrivateReposRequestBuilder(PathParameters, RequestAdapter); + } + /// The selectedActions property + public global::Ayllu.Github.Client.Repos.Item.Item.Actions.Permissions.SelectedActions.SelectedActionsRequestBuilder SelectedActions + { + get => new global::Ayllu.Github.Client.Repos.Item.Item.Actions.Permissions.SelectedActions.SelectedActionsRequestBuilder(PathParameters, RequestAdapter); + } + /// The workflow property + public global::Ayllu.Github.Client.Repos.Item.Item.Actions.Permissions.Workflow.WorkflowRequestBuilder Workflow + { + get => new global::Ayllu.Github.Client.Repos.Item.Item.Actions.Permissions.Workflow.WorkflowRequestBuilder(PathParameters, RequestAdapter); + } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public PermissionsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/actions/permissions", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public PermissionsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/actions/permissions", rawUrl) + { + } + /// + /// 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. + /// API method documentation + /// + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Models.ActionsRepositoryPermissions.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false); + } + /// + /// Sets the GitHub Actions permissions policy for enabling GitHub Actions and allowed actions and reusable workflows in the repository.OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. + /// API method documentation + /// + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PutAsync(global::Ayllu.Github.Client.Repos.Item.Item.Actions.Permissions.PermissionsPutRequestBody body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task PutAsync(global::Ayllu.Github.Client.Repos.Item.Item.Actions.Permissions.PermissionsPutRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPutRequestInformation(body, requestConfiguration); + await RequestAdapter.SendNoContentAsync(requestInfo, default, cancellationToken).ConfigureAwait(false); + } + /// + /// 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. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Sets the GitHub Actions permissions policy for enabling GitHub Actions and allowed actions and reusable workflows in the repository.OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. + /// + /// A + /// The request body + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPutRequestInformation(global::Ayllu.Github.Client.Repos.Item.Item.Actions.Permissions.PermissionsPutRequestBody body, Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToPutRequestInformation(global::Ayllu.Github.Client.Repos.Item.Item.Actions.Permissions.PermissionsPutRequestBody body, Action> requestConfiguration = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation(Method.PUT, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.Repos.Item.Item.Actions.Permissions.PermissionsRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Repos.Item.Item.Actions.Permissions.PermissionsRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class PermissionsRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class PermissionsRequestBuilderPutRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Actions/Permissions/SelectedActions/SelectedActionsRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Actions/Permissions/SelectedActions/SelectedActionsRequestBuilder.cs new file mode 100644 index 0000000..a79f17e --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Actions/Permissions/SelectedActions/SelectedActionsRequestBuilder.cs @@ -0,0 +1,142 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.Actions.Permissions.SelectedActions +{ + /// + /// Builds and executes requests for operations under \repos\{owner-id}\{repo-id}\actions\permissions\selected-actions + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class SelectedActionsRequestBuilder : BaseRequestBuilder + { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public SelectedActionsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/actions/permissions/selected-actions", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public SelectedActionsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/actions/permissions/selected-actions", rawUrl) + { + } + /// + /// 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. + /// API method documentation + /// + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Models.SelectedActions.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false); + } + /// + /// Sets the actions and reusable workflows 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)."OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. + /// API method documentation + /// + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PutAsync(global::Ayllu.Github.Client.Models.SelectedActions body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task PutAsync(global::Ayllu.Github.Client.Models.SelectedActions body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPutRequestInformation(body, requestConfiguration); + await RequestAdapter.SendNoContentAsync(requestInfo, default, cancellationToken).ConfigureAwait(false); + } + /// + /// 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. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Sets the actions and reusable workflows 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)."OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. + /// + /// A + /// The request body + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPutRequestInformation(global::Ayllu.Github.Client.Models.SelectedActions body, Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToPutRequestInformation(global::Ayllu.Github.Client.Models.SelectedActions body, Action> requestConfiguration = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation(Method.PUT, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.Repos.Item.Item.Actions.Permissions.SelectedActions.SelectedActionsRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Repos.Item.Item.Actions.Permissions.SelectedActions.SelectedActionsRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class SelectedActionsRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class SelectedActionsRequestBuilderPutRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Actions/Permissions/Workflow/WorkflowRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Actions/Permissions/Workflow/WorkflowRequestBuilder.cs new file mode 100644 index 0000000..47d8cc7 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Actions/Permissions/Workflow/WorkflowRequestBuilder.cs @@ -0,0 +1,142 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.Actions.Permissions.Workflow +{ + /// + /// Builds and executes requests for operations under \repos\{owner-id}\{repo-id}\actions\permissions\workflow + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WorkflowRequestBuilder : BaseRequestBuilder + { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public WorkflowRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/actions/permissions/workflow", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public WorkflowRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/actions/permissions/workflow", rawUrl) + { + } + /// + /// 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/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. + /// API method documentation + /// + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Models.ActionsGetDefaultWorkflowPermissions.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false); + } + /// + /// 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/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 + /// + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PutAsync(global::Ayllu.Github.Client.Models.ActionsSetDefaultWorkflowPermissions body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task PutAsync(global::Ayllu.Github.Client.Models.ActionsSetDefaultWorkflowPermissions body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPutRequestInformation(body, requestConfiguration); + await RequestAdapter.SendNoContentAsync(requestInfo, default, cancellationToken).ConfigureAwait(false); + } + /// + /// 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/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. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// 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/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. + /// + /// A + /// The request body + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPutRequestInformation(global::Ayllu.Github.Client.Models.ActionsSetDefaultWorkflowPermissions body, Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToPutRequestInformation(global::Ayllu.Github.Client.Models.ActionsSetDefaultWorkflowPermissions body, Action> requestConfiguration = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation(Method.PUT, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.Repos.Item.Item.Actions.Permissions.Workflow.WorkflowRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Repos.Item.Item.Actions.Permissions.Workflow.WorkflowRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WorkflowRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WorkflowRequestBuilderPutRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Actions/Runners/Downloads/DownloadsRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Actions/Runners/Downloads/DownloadsRequestBuilder.cs new file mode 100644 index 0000000..391e690 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Actions/Runners/Downloads/DownloadsRequestBuilder.cs @@ -0,0 +1,94 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.Actions.Runners.Downloads +{ + /// + /// Builds and executes requests for operations under \repos\{owner-id}\{repo-id}\actions\runners\downloads + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class DownloadsRequestBuilder : BaseRequestBuilder + { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public DownloadsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/actions/runners/downloads", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public DownloadsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/actions/runners/downloads", rawUrl) + { + } + /// + /// 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. + /// API method documentation + /// + /// A List<global::Ayllu.Github.Client.Models.RunnerApplication> + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task?> GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task> GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var collectionResult = await RequestAdapter.SendCollectionAsync(requestInfo, global::Ayllu.Github.Client.Models.RunnerApplication.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false); + return collectionResult?.AsList(); + } + /// + /// 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. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.Repos.Item.Item.Actions.Runners.Downloads.DownloadsRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Repos.Item.Item.Actions.Runners.Downloads.DownloadsRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class DownloadsRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Actions/Runners/GenerateJitconfig/GenerateJitconfigPostRequestBody.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Actions/Runners/GenerateJitconfig/GenerateJitconfigPostRequestBody.cs new file mode 100644 index 0000000..b941dee --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Actions/Runners/GenerateJitconfig/GenerateJitconfigPostRequestBody.cs @@ -0,0 +1,90 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.Actions.Runners.GenerateJitconfig +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class GenerateJitconfigPostRequestBody : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The names of the custom labels to add to the runner. **Minimum items**: 1. **Maximum items**: 100. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? Labels { get; set; } +#nullable restore +#else + public List Labels { get; set; } +#endif + /// The name of the new runner. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Name { get; set; } +#nullable restore +#else + public string Name { get; set; } +#endif + /// The ID of the runner group to register the runner to. + public int? RunnerGroupId { get; set; } + /// The working directory to be used for job execution, relative to the runner install directory. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? WorkFolder { get; set; } +#nullable restore +#else + public string WorkFolder { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public GenerateJitconfigPostRequestBody() + { + AdditionalData = new Dictionary(); + WorkFolder = "_work"; + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Repos.Item.Item.Actions.Runners.GenerateJitconfig.GenerateJitconfigPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Repos.Item.Item.Actions.Runners.GenerateJitconfig.GenerateJitconfigPostRequestBody(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "labels", n => { Labels = n.GetCollectionOfPrimitiveValues()?.AsList(); } }, + { "name", n => { Name = n.GetStringValue(); } }, + { "runner_group_id", n => { RunnerGroupId = n.GetIntValue(); } }, + { "work_folder", n => { WorkFolder = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteCollectionOfPrimitiveValues("labels", Labels); + writer.WriteStringValue("name", Name); + writer.WriteIntValue("runner_group_id", RunnerGroupId); + writer.WriteStringValue("work_folder", WorkFolder); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Actions/Runners/GenerateJitconfig/GenerateJitconfigPostResponse.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Actions/Runners/GenerateJitconfig/GenerateJitconfigPostResponse.cs new file mode 100644 index 0000000..ae6e4e8 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Actions/Runners/GenerateJitconfig/GenerateJitconfigPostResponse.cs @@ -0,0 +1,76 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.Actions.Runners.GenerateJitconfig +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class GenerateJitconfigPostResponse : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The base64 encoded runner configuration. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? EncodedJitConfig { get; set; } +#nullable restore +#else + public string EncodedJitConfig { get; set; } +#endif + /// A self hosted runner +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.Runner? Runner { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.Runner Runner { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public GenerateJitconfigPostResponse() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Repos.Item.Item.Actions.Runners.GenerateJitconfig.GenerateJitconfigPostResponse CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Repos.Item.Item.Actions.Runners.GenerateJitconfig.GenerateJitconfigPostResponse(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "encoded_jit_config", n => { EncodedJitConfig = n.GetStringValue(); } }, + { "runner", n => { Runner = n.GetObjectValue(global::Ayllu.Github.Client.Models.Runner.CreateFromDiscriminatorValue); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("encoded_jit_config", EncodedJitConfig); + writer.WriteObjectValue("runner", Runner); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Actions/Runners/GenerateJitconfig/GenerateJitconfigRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Actions/Runners/GenerateJitconfig/GenerateJitconfigRequestBuilder.cs new file mode 100644 index 0000000..6b64e7a --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Actions/Runners/GenerateJitconfig/GenerateJitconfigRequestBuilder.cs @@ -0,0 +1,138 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.Actions.Runners.GenerateJitconfig +{ + /// + /// Builds and executes requests for operations under \repos\{owner-id}\{repo-id}\actions\runners\generate-jitconfig + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class GenerateJitconfigRequestBuilder : BaseRequestBuilder + { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public GenerateJitconfigRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/actions/runners/generate-jitconfig", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public GenerateJitconfigRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/actions/runners/generate-jitconfig", rawUrl) + { + } + /// + /// 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. + /// API method documentation + /// + /// A + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 404 status code + /// When receiving a 409 status code + /// When receiving a 422 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PostAsGenerateJitconfigPostResponseAsync(global::Ayllu.Github.Client.Repos.Item.Item.Actions.Runners.GenerateJitconfig.GenerateJitconfigPostRequestBody body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task PostAsGenerateJitconfigPostResponseAsync(global::Ayllu.Github.Client.Repos.Item.Item.Actions.Runners.GenerateJitconfig.GenerateJitconfigPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPostRequestInformation(body, requestConfiguration); + var errorMapping = new Dictionary> + { + { "404", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "409", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "422", global::Ayllu.Github.Client.Models.ValidationErrorSimple.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Repos.Item.Item.Actions.Runners.GenerateJitconfig.GenerateJitconfigPostResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// 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. + /// API method documentation + /// + /// A + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 404 status code + /// When receiving a 409 status code + /// When receiving a 422 status code + [Obsolete("This method is obsolete. Use PostAsGenerateJitconfigPostResponseAsync instead.")] +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PostAsync(global::Ayllu.Github.Client.Repos.Item.Item.Actions.Runners.GenerateJitconfig.GenerateJitconfigPostRequestBody body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task PostAsync(global::Ayllu.Github.Client.Repos.Item.Item.Actions.Runners.GenerateJitconfig.GenerateJitconfigPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPostRequestInformation(body, requestConfiguration); + var errorMapping = new Dictionary> + { + { "404", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "409", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "422", global::Ayllu.Github.Client.Models.ValidationErrorSimple.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Repos.Item.Item.Actions.Runners.GenerateJitconfig.GenerateJitconfigResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// 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. + /// + /// A + /// The request body + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPostRequestInformation(global::Ayllu.Github.Client.Repos.Item.Item.Actions.Runners.GenerateJitconfig.GenerateJitconfigPostRequestBody body, Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToPostRequestInformation(global::Ayllu.Github.Client.Repos.Item.Item.Actions.Runners.GenerateJitconfig.GenerateJitconfigPostRequestBody body, Action> requestConfiguration = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.Repos.Item.Item.Actions.Runners.GenerateJitconfig.GenerateJitconfigRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Repos.Item.Item.Actions.Runners.GenerateJitconfig.GenerateJitconfigRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class GenerateJitconfigRequestBuilderPostRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Actions/Runners/GenerateJitconfig/GenerateJitconfigResponse.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Actions/Runners/GenerateJitconfig/GenerateJitconfigResponse.cs new file mode 100644 index 0000000..b297660 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Actions/Runners/GenerateJitconfig/GenerateJitconfigResponse.cs @@ -0,0 +1,28 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.Actions.Runners.GenerateJitconfig +{ + [Obsolete("This class is obsolete. Use GenerateJitconfigPostResponse instead.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class GenerateJitconfigResponse : global::Ayllu.Github.Client.Repos.Item.Item.Actions.Runners.GenerateJitconfig.GenerateJitconfigPostResponse, IParsable + #pragma warning restore CS1591 + { + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static new global::Ayllu.Github.Client.Repos.Item.Item.Actions.Runners.GenerateJitconfig.GenerateJitconfigResponse CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Repos.Item.Item.Actions.Runners.GenerateJitconfig.GenerateJitconfigResponse(); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Actions/Runners/Item/Labels/Item/WithNameDeleteResponse.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Actions/Runners/Item/Labels/Item/WithNameDeleteResponse.cs new file mode 100644 index 0000000..9470fbc --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Actions/Runners/Item/Labels/Item/WithNameDeleteResponse.cs @@ -0,0 +1,70 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.Actions.Runners.Item.Labels.Item +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class WithNameDeleteResponse : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The labels property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? Labels { get; set; } +#nullable restore +#else + public List Labels { get; set; } +#endif + /// The total_count property + public int? TotalCount { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public WithNameDeleteResponse() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Repos.Item.Item.Actions.Runners.Item.Labels.Item.WithNameDeleteResponse CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Repos.Item.Item.Actions.Runners.Item.Labels.Item.WithNameDeleteResponse(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "labels", n => { Labels = n.GetCollectionOfObjectValues(global::Ayllu.Github.Client.Models.RunnerLabel.CreateFromDiscriminatorValue)?.AsList(); } }, + { "total_count", n => { TotalCount = n.GetIntValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteCollectionOfObjectValues("labels", Labels); + writer.WriteIntValue("total_count", TotalCount); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Actions/Runners/Item/Labels/Item/WithNameItemRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Actions/Runners/Item/Labels/Item/WithNameItemRequestBuilder.cs new file mode 100644 index 0000000..ab9a016 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Actions/Runners/Item/Labels/Item/WithNameItemRequestBuilder.cs @@ -0,0 +1,127 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.Actions.Runners.Item.Labels.Item +{ + /// + /// Builds and executes requests for operations under \repos\{owner-id}\{repo-id}\actions\runners\{runner_id}\labels\{name} + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithNameItemRequestBuilder : BaseRequestBuilder + { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public WithNameItemRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/actions/runners/{runner_id}/labels/{name}", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public WithNameItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/actions/runners/{runner_id}/labels/{name}", rawUrl) + { + } + /// + /// 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. + /// API method documentation + /// + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 404 status code + /// When receiving a 422 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task DeleteAsWithNameDeleteResponseAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task DeleteAsWithNameDeleteResponseAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToDeleteRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "404", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "422", global::Ayllu.Github.Client.Models.ValidationErrorSimple.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Repos.Item.Item.Actions.Runners.Item.Labels.Item.WithNameDeleteResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// 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. + /// API method documentation + /// + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 404 status code + /// When receiving a 422 status code + [Obsolete("This method is obsolete. Use DeleteAsWithNameDeleteResponseAsync instead.")] +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task DeleteAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task DeleteAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToDeleteRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "404", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "422", global::Ayllu.Github.Client.Models.ValidationErrorSimple.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Repos.Item.Item.Actions.Runners.Item.Labels.Item.WithNameResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// 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. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToDeleteRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToDeleteRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.DELETE, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.Repos.Item.Item.Actions.Runners.Item.Labels.Item.WithNameItemRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Repos.Item.Item.Actions.Runners.Item.Labels.Item.WithNameItemRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithNameItemRequestBuilderDeleteRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Actions/Runners/Item/Labels/Item/WithNameResponse.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Actions/Runners/Item/Labels/Item/WithNameResponse.cs new file mode 100644 index 0000000..0042b5d --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Actions/Runners/Item/Labels/Item/WithNameResponse.cs @@ -0,0 +1,28 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.Actions.Runners.Item.Labels.Item +{ + [Obsolete("This class is obsolete. Use WithNameDeleteResponse instead.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class WithNameResponse : global::Ayllu.Github.Client.Repos.Item.Item.Actions.Runners.Item.Labels.Item.WithNameDeleteResponse, IParsable + #pragma warning restore CS1591 + { + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static new global::Ayllu.Github.Client.Repos.Item.Item.Actions.Runners.Item.Labels.Item.WithNameResponse CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Repos.Item.Item.Actions.Runners.Item.Labels.Item.WithNameResponse(); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Actions/Runners/Item/Labels/LabelsDeleteResponse.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Actions/Runners/Item/Labels/LabelsDeleteResponse.cs new file mode 100644 index 0000000..1b9835c --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Actions/Runners/Item/Labels/LabelsDeleteResponse.cs @@ -0,0 +1,70 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.Actions.Runners.Item.Labels +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class LabelsDeleteResponse : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The labels property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? Labels { get; set; } +#nullable restore +#else + public List Labels { get; set; } +#endif + /// The total_count property + public int? TotalCount { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public LabelsDeleteResponse() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Repos.Item.Item.Actions.Runners.Item.Labels.LabelsDeleteResponse CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Repos.Item.Item.Actions.Runners.Item.Labels.LabelsDeleteResponse(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "labels", n => { Labels = n.GetCollectionOfObjectValues(global::Ayllu.Github.Client.Models.RunnerLabel.CreateFromDiscriminatorValue)?.AsList(); } }, + { "total_count", n => { TotalCount = n.GetIntValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteCollectionOfObjectValues("labels", Labels); + writer.WriteIntValue("total_count", TotalCount); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Actions/Runners/Item/Labels/LabelsGetResponse.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Actions/Runners/Item/Labels/LabelsGetResponse.cs new file mode 100644 index 0000000..c7d5e04 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Actions/Runners/Item/Labels/LabelsGetResponse.cs @@ -0,0 +1,70 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.Actions.Runners.Item.Labels +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class LabelsGetResponse : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The labels property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? Labels { get; set; } +#nullable restore +#else + public List Labels { get; set; } +#endif + /// The total_count property + public int? TotalCount { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public LabelsGetResponse() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Repos.Item.Item.Actions.Runners.Item.Labels.LabelsGetResponse CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Repos.Item.Item.Actions.Runners.Item.Labels.LabelsGetResponse(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "labels", n => { Labels = n.GetCollectionOfObjectValues(global::Ayllu.Github.Client.Models.RunnerLabel.CreateFromDiscriminatorValue)?.AsList(); } }, + { "total_count", n => { TotalCount = n.GetIntValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteCollectionOfObjectValues("labels", Labels); + writer.WriteIntValue("total_count", TotalCount); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Actions/Runners/Item/Labels/LabelsPostRequestBody.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Actions/Runners/Item/Labels/LabelsPostRequestBody.cs new file mode 100644 index 0000000..62a089f --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Actions/Runners/Item/Labels/LabelsPostRequestBody.cs @@ -0,0 +1,65 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.Actions.Runners.Item.Labels +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class LabelsPostRequestBody : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The names of the custom labels to add to the runner. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? Labels { get; set; } +#nullable restore +#else + public List Labels { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public LabelsPostRequestBody() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Repos.Item.Item.Actions.Runners.Item.Labels.LabelsPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Repos.Item.Item.Actions.Runners.Item.Labels.LabelsPostRequestBody(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "labels", n => { Labels = n.GetCollectionOfPrimitiveValues()?.AsList(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteCollectionOfPrimitiveValues("labels", Labels); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Actions/Runners/Item/Labels/LabelsPostResponse.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Actions/Runners/Item/Labels/LabelsPostResponse.cs new file mode 100644 index 0000000..df6248d --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Actions/Runners/Item/Labels/LabelsPostResponse.cs @@ -0,0 +1,70 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.Actions.Runners.Item.Labels +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class LabelsPostResponse : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The labels property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? Labels { get; set; } +#nullable restore +#else + public List Labels { get; set; } +#endif + /// The total_count property + public int? TotalCount { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public LabelsPostResponse() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Repos.Item.Item.Actions.Runners.Item.Labels.LabelsPostResponse CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Repos.Item.Item.Actions.Runners.Item.Labels.LabelsPostResponse(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "labels", n => { Labels = n.GetCollectionOfObjectValues(global::Ayllu.Github.Client.Models.RunnerLabel.CreateFromDiscriminatorValue)?.AsList(); } }, + { "total_count", n => { TotalCount = n.GetIntValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteCollectionOfObjectValues("labels", Labels); + writer.WriteIntValue("total_count", TotalCount); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Actions/Runners/Item/Labels/LabelsPutRequestBody.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Actions/Runners/Item/Labels/LabelsPutRequestBody.cs new file mode 100644 index 0000000..d554571 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Actions/Runners/Item/Labels/LabelsPutRequestBody.cs @@ -0,0 +1,65 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.Actions.Runners.Item.Labels +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class LabelsPutRequestBody : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The names of the custom labels to set for the runner. You can pass an empty array to remove all custom labels. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? Labels { get; set; } +#nullable restore +#else + public List Labels { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public LabelsPutRequestBody() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Repos.Item.Item.Actions.Runners.Item.Labels.LabelsPutRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Repos.Item.Item.Actions.Runners.Item.Labels.LabelsPutRequestBody(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "labels", n => { Labels = n.GetCollectionOfPrimitiveValues()?.AsList(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteCollectionOfPrimitiveValues("labels", Labels); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Actions/Runners/Item/Labels/LabelsPutResponse.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Actions/Runners/Item/Labels/LabelsPutResponse.cs new file mode 100644 index 0000000..a6b36ef --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Actions/Runners/Item/Labels/LabelsPutResponse.cs @@ -0,0 +1,70 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.Actions.Runners.Item.Labels +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class LabelsPutResponse : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The labels property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? Labels { get; set; } +#nullable restore +#else + public List Labels { get; set; } +#endif + /// The total_count property + public int? TotalCount { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public LabelsPutResponse() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Repos.Item.Item.Actions.Runners.Item.Labels.LabelsPutResponse CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Repos.Item.Item.Actions.Runners.Item.Labels.LabelsPutResponse(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "labels", n => { Labels = n.GetCollectionOfObjectValues(global::Ayllu.Github.Client.Models.RunnerLabel.CreateFromDiscriminatorValue)?.AsList(); } }, + { "total_count", n => { TotalCount = n.GetIntValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteCollectionOfObjectValues("labels", Labels); + writer.WriteIntValue("total_count", TotalCount); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Actions/Runners/Item/Labels/LabelsRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Actions/Runners/Item/Labels/LabelsRequestBuilder.cs new file mode 100644 index 0000000..660b6b9 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Actions/Runners/Item/Labels/LabelsRequestBuilder.cs @@ -0,0 +1,386 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Ayllu.Github.Client.Repos.Item.Item.Actions.Runners.Item.Labels.Item; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.Actions.Runners.Item.Labels +{ + /// + /// Builds and executes requests for operations under \repos\{owner-id}\{repo-id}\actions\runners\{runner_id}\labels + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class LabelsRequestBuilder : BaseRequestBuilder + { + /// Gets an item from the Ayllu.Github.Client.repos.item.item.actions.runners.item.labels.item collection + /// The name of a self-hosted runner's custom label. + /// A + public global::Ayllu.Github.Client.Repos.Item.Item.Actions.Runners.Item.Labels.Item.WithNameItemRequestBuilder this[string position] + { + get + { + var urlTplParams = new Dictionary(PathParameters); + urlTplParams.Add("name", position); + return new global::Ayllu.Github.Client.Repos.Item.Item.Actions.Runners.Item.Labels.Item.WithNameItemRequestBuilder(urlTplParams, RequestAdapter); + } + } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public LabelsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/actions/runners/{runner_id}/labels", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public LabelsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/actions/runners/{runner_id}/labels", rawUrl) + { + } + /// + /// 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. + /// API method documentation + /// + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 404 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task DeleteAsLabelsDeleteResponseAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task DeleteAsLabelsDeleteResponseAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToDeleteRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "404", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Repos.Item.Item.Actions.Runners.Item.Labels.LabelsDeleteResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// 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. + /// API method documentation + /// + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 404 status code + [Obsolete("This method is obsolete. Use DeleteAsLabelsDeleteResponseAsync instead.")] +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task DeleteAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task DeleteAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToDeleteRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "404", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Repos.Item.Item.Actions.Runners.Item.Labels.LabelsResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// 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. + /// API method documentation + /// + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 404 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsLabelsGetResponseAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task GetAsLabelsGetResponseAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "404", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Repos.Item.Item.Actions.Runners.Item.Labels.LabelsGetResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// 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. + /// API method documentation + /// + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 404 status code + [Obsolete("This method is obsolete. Use GetAsLabelsGetResponseAsync instead.")] +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "404", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Repos.Item.Item.Actions.Runners.Item.Labels.LabelsResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// 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. + /// API method documentation + /// + /// A + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 404 status code + /// When receiving a 422 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PostAsLabelsPostResponseAsync(global::Ayllu.Github.Client.Repos.Item.Item.Actions.Runners.Item.Labels.LabelsPostRequestBody body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task PostAsLabelsPostResponseAsync(global::Ayllu.Github.Client.Repos.Item.Item.Actions.Runners.Item.Labels.LabelsPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPostRequestInformation(body, requestConfiguration); + var errorMapping = new Dictionary> + { + { "404", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "422", global::Ayllu.Github.Client.Models.ValidationErrorSimple.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Repos.Item.Item.Actions.Runners.Item.Labels.LabelsPostResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// 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. + /// API method documentation + /// + /// A + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 404 status code + /// When receiving a 422 status code + [Obsolete("This method is obsolete. Use PostAsLabelsPostResponseAsync instead.")] +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PostAsync(global::Ayllu.Github.Client.Repos.Item.Item.Actions.Runners.Item.Labels.LabelsPostRequestBody body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task PostAsync(global::Ayllu.Github.Client.Repos.Item.Item.Actions.Runners.Item.Labels.LabelsPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPostRequestInformation(body, requestConfiguration); + var errorMapping = new Dictionary> + { + { "404", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "422", global::Ayllu.Github.Client.Models.ValidationErrorSimple.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Repos.Item.Item.Actions.Runners.Item.Labels.LabelsResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// 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. + /// API method documentation + /// + /// A + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 404 status code + /// When receiving a 422 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PutAsLabelsPutResponseAsync(global::Ayllu.Github.Client.Repos.Item.Item.Actions.Runners.Item.Labels.LabelsPutRequestBody body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task PutAsLabelsPutResponseAsync(global::Ayllu.Github.Client.Repos.Item.Item.Actions.Runners.Item.Labels.LabelsPutRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPutRequestInformation(body, requestConfiguration); + var errorMapping = new Dictionary> + { + { "404", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "422", global::Ayllu.Github.Client.Models.ValidationErrorSimple.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Repos.Item.Item.Actions.Runners.Item.Labels.LabelsPutResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// 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. + /// API method documentation + /// + /// A + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 404 status code + /// When receiving a 422 status code + [Obsolete("This method is obsolete. Use PutAsLabelsPutResponseAsync instead.")] +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PutAsync(global::Ayllu.Github.Client.Repos.Item.Item.Actions.Runners.Item.Labels.LabelsPutRequestBody body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task PutAsync(global::Ayllu.Github.Client.Repos.Item.Item.Actions.Runners.Item.Labels.LabelsPutRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPutRequestInformation(body, requestConfiguration); + var errorMapping = new Dictionary> + { + { "404", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "422", global::Ayllu.Github.Client.Models.ValidationErrorSimple.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Repos.Item.Item.Actions.Runners.Item.Labels.LabelsResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// 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. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToDeleteRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToDeleteRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.DELETE, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// 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. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// 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. + /// + /// A + /// The request body + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPostRequestInformation(global::Ayllu.Github.Client.Repos.Item.Item.Actions.Runners.Item.Labels.LabelsPostRequestBody body, Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToPostRequestInformation(global::Ayllu.Github.Client.Repos.Item.Item.Actions.Runners.Item.Labels.LabelsPostRequestBody body, Action> requestConfiguration = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + return requestInfo; + } + /// + /// 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. + /// + /// A + /// The request body + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPutRequestInformation(global::Ayllu.Github.Client.Repos.Item.Item.Actions.Runners.Item.Labels.LabelsPutRequestBody body, Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToPutRequestInformation(global::Ayllu.Github.Client.Repos.Item.Item.Actions.Runners.Item.Labels.LabelsPutRequestBody body, Action> requestConfiguration = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation(Method.PUT, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.Repos.Item.Item.Actions.Runners.Item.Labels.LabelsRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Repos.Item.Item.Actions.Runners.Item.Labels.LabelsRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class LabelsRequestBuilderDeleteRequestConfiguration : RequestConfiguration + { + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class LabelsRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class LabelsRequestBuilderPostRequestConfiguration : RequestConfiguration + { + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class LabelsRequestBuilderPutRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Actions/Runners/Item/Labels/LabelsResponse.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Actions/Runners/Item/Labels/LabelsResponse.cs new file mode 100644 index 0000000..618ca62 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Actions/Runners/Item/Labels/LabelsResponse.cs @@ -0,0 +1,28 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.Actions.Runners.Item.Labels +{ + [Obsolete("This class is obsolete. Use LabelsGetResponse instead.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class LabelsResponse : global::Ayllu.Github.Client.Repos.Item.Item.Actions.Runners.Item.Labels.LabelsGetResponse, IParsable + #pragma warning restore CS1591 + { + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static new global::Ayllu.Github.Client.Repos.Item.Item.Actions.Runners.Item.Labels.LabelsResponse CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Repos.Item.Item.Actions.Runners.Item.Labels.LabelsResponse(); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Actions/Runners/Item/WithRunner_ItemRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Actions/Runners/Item/WithRunner_ItemRequestBuilder.cs new file mode 100644 index 0000000..0e692fd --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Actions/Runners/Item/WithRunner_ItemRequestBuilder.cs @@ -0,0 +1,149 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Ayllu.Github.Client.Repos.Item.Item.Actions.Runners.Item.Labels; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.Actions.Runners.Item +{ + /// + /// Builds and executes requests for operations under \repos\{owner-id}\{repo-id}\actions\runners\{runner_id} + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithRunner_ItemRequestBuilder : BaseRequestBuilder + { + /// The labels property + public global::Ayllu.Github.Client.Repos.Item.Item.Actions.Runners.Item.Labels.LabelsRequestBuilder Labels + { + get => new global::Ayllu.Github.Client.Repos.Item.Item.Actions.Runners.Item.Labels.LabelsRequestBuilder(PathParameters, RequestAdapter); + } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public WithRunner_ItemRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/actions/runners/{runner_id}", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public WithRunner_ItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/actions/runners/{runner_id}", rawUrl) + { + } + /// + /// 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 + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 422 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task DeleteAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task DeleteAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToDeleteRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "422", global::Ayllu.Github.Client.Models.ValidationErrorSimple.CreateFromDiscriminatorValue }, + }; + await RequestAdapter.SendNoContentAsync(requestInfo, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// 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. + /// API method documentation + /// + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Models.Runner.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false); + } + /// + /// 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. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToDeleteRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToDeleteRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.DELETE, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// 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. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.Repos.Item.Item.Actions.Runners.Item.WithRunner_ItemRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Repos.Item.Item.Actions.Runners.Item.WithRunner_ItemRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithRunner_ItemRequestBuilderDeleteRequestConfiguration : RequestConfiguration + { + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithRunner_ItemRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Actions/Runners/RegistrationToken/RegistrationTokenRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Actions/Runners/RegistrationToken/RegistrationTokenRequestBuilder.cs new file mode 100644 index 0000000..ee11872 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Actions/Runners/RegistrationToken/RegistrationTokenRequestBuilder.cs @@ -0,0 +1,93 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.Actions.Runners.RegistrationToken +{ + /// + /// Builds and executes requests for operations under \repos\{owner-id}\{repo-id}\actions\runners\registration-token + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class RegistrationTokenRequestBuilder : BaseRequestBuilder + { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public RegistrationTokenRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/actions/runners/registration-token", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public RegistrationTokenRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/actions/runners/registration-token", rawUrl) + { + } + /// + /// 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. + /// API method documentation + /// + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PostAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task PostAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToPostRequestInformation(requestConfiguration); + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Models.AuthenticationToken.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false); + } + /// + /// 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. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPostRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToPostRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.Repos.Item.Item.Actions.Runners.RegistrationToken.RegistrationTokenRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Repos.Item.Item.Actions.Runners.RegistrationToken.RegistrationTokenRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class RegistrationTokenRequestBuilderPostRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Actions/Runners/RemoveToken/RemoveTokenRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Actions/Runners/RemoveToken/RemoveTokenRequestBuilder.cs new file mode 100644 index 0000000..d596b3e --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Actions/Runners/RemoveToken/RemoveTokenRequestBuilder.cs @@ -0,0 +1,93 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.Actions.Runners.RemoveToken +{ + /// + /// Builds and executes requests for operations under \repos\{owner-id}\{repo-id}\actions\runners\remove-token + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class RemoveTokenRequestBuilder : BaseRequestBuilder + { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public RemoveTokenRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/actions/runners/remove-token", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public RemoveTokenRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/actions/runners/remove-token", rawUrl) + { + } + /// + /// 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. + /// API method documentation + /// + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PostAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task PostAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToPostRequestInformation(requestConfiguration); + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Models.AuthenticationToken.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false); + } + /// + /// 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. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPostRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToPostRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.Repos.Item.Item.Actions.Runners.RemoveToken.RemoveTokenRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Repos.Item.Item.Actions.Runners.RemoveToken.RemoveTokenRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class RemoveTokenRequestBuilderPostRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Actions/Runners/RunnersGetResponse.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Actions/Runners/RunnersGetResponse.cs new file mode 100644 index 0000000..b9016a7 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Actions/Runners/RunnersGetResponse.cs @@ -0,0 +1,70 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.Actions.Runners +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class RunnersGetResponse : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The runners property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? Runners { get; set; } +#nullable restore +#else + public List Runners { get; set; } +#endif + /// The total_count property + public int? TotalCount { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public RunnersGetResponse() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Repos.Item.Item.Actions.Runners.RunnersGetResponse CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Repos.Item.Item.Actions.Runners.RunnersGetResponse(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "runners", n => { Runners = n.GetCollectionOfObjectValues(global::Ayllu.Github.Client.Models.Runner.CreateFromDiscriminatorValue)?.AsList(); } }, + { "total_count", n => { TotalCount = n.GetIntValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteCollectionOfObjectValues("runners", Runners); + writer.WriteIntValue("total_count", TotalCount); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Actions/Runners/RunnersRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Actions/Runners/RunnersRequestBuilder.cs new file mode 100644 index 0000000..f0e85bb --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Actions/Runners/RunnersRequestBuilder.cs @@ -0,0 +1,185 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Repos.Item.Item.Actions.Runners.Downloads; +using Ayllu.Github.Client.Repos.Item.Item.Actions.Runners.GenerateJitconfig; +using Ayllu.Github.Client.Repos.Item.Item.Actions.Runners.Item; +using Ayllu.Github.Client.Repos.Item.Item.Actions.Runners.RegistrationToken; +using Ayllu.Github.Client.Repos.Item.Item.Actions.Runners.RemoveToken; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.Actions.Runners +{ + /// + /// Builds and executes requests for operations under \repos\{owner-id}\{repo-id}\actions\runners + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class RunnersRequestBuilder : BaseRequestBuilder + { + /// The downloads property + public global::Ayllu.Github.Client.Repos.Item.Item.Actions.Runners.Downloads.DownloadsRequestBuilder Downloads + { + get => new global::Ayllu.Github.Client.Repos.Item.Item.Actions.Runners.Downloads.DownloadsRequestBuilder(PathParameters, RequestAdapter); + } + /// The generateJitconfig property + public global::Ayllu.Github.Client.Repos.Item.Item.Actions.Runners.GenerateJitconfig.GenerateJitconfigRequestBuilder GenerateJitconfig + { + get => new global::Ayllu.Github.Client.Repos.Item.Item.Actions.Runners.GenerateJitconfig.GenerateJitconfigRequestBuilder(PathParameters, RequestAdapter); + } + /// The registrationToken property + public global::Ayllu.Github.Client.Repos.Item.Item.Actions.Runners.RegistrationToken.RegistrationTokenRequestBuilder RegistrationToken + { + get => new global::Ayllu.Github.Client.Repos.Item.Item.Actions.Runners.RegistrationToken.RegistrationTokenRequestBuilder(PathParameters, RequestAdapter); + } + /// The removeToken property + public global::Ayllu.Github.Client.Repos.Item.Item.Actions.Runners.RemoveToken.RemoveTokenRequestBuilder RemoveToken + { + get => new global::Ayllu.Github.Client.Repos.Item.Item.Actions.Runners.RemoveToken.RemoveTokenRequestBuilder(PathParameters, RequestAdapter); + } + /// Gets an item from the Ayllu.Github.Client.repos.item.item.actions.runners.item collection + /// Unique identifier of the self-hosted runner. + /// A + public global::Ayllu.Github.Client.Repos.Item.Item.Actions.Runners.Item.WithRunner_ItemRequestBuilder this[int position] + { + get + { + var urlTplParams = new Dictionary(PathParameters); + urlTplParams.Add("runner_id", position); + return new global::Ayllu.Github.Client.Repos.Item.Item.Actions.Runners.Item.WithRunner_ItemRequestBuilder(urlTplParams, RequestAdapter); + } + } + /// Gets an item from the Ayllu.Github.Client.repos.item.item.actions.runners.item collection + /// Unique identifier of the self-hosted runner. + /// A + [Obsolete("This indexer is deprecated and will be removed in the next major version. Use the one with the typed parameter instead.")] + public global::Ayllu.Github.Client.Repos.Item.Item.Actions.Runners.Item.WithRunner_ItemRequestBuilder this[string position] + { + get + { + var urlTplParams = new Dictionary(PathParameters); + if (!string.IsNullOrWhiteSpace(position)) urlTplParams.Add("runner_id", position); + return new global::Ayllu.Github.Client.Repos.Item.Item.Actions.Runners.Item.WithRunner_ItemRequestBuilder(urlTplParams, RequestAdapter); + } + } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public RunnersRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/actions/runners{?name*,page*,per_page*}", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public RunnersRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/actions/runners{?name*,page*,per_page*}", rawUrl) + { + } + /// + /// 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. + /// API method documentation + /// + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsRunnersGetResponseAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task GetAsRunnersGetResponseAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Repos.Item.Item.Actions.Runners.RunnersGetResponse.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false); + } + /// + /// 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. + /// API method documentation + /// + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + [Obsolete("This method is obsolete. Use GetAsRunnersGetResponseAsync instead.")] +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Repos.Item.Item.Actions.Runners.RunnersResponse.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false); + } + /// + /// 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. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.Repos.Item.Item.Actions.Runners.RunnersRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Repos.Item.Item.Actions.Runners.RunnersRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// 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. + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class RunnersRequestBuilderGetQueryParameters + { + /// The name of a self-hosted runner. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("name")] + public string? Name { get; set; } +#nullable restore +#else + [QueryParameter("name")] + public string Name { get; set; } +#endif + /// The page number of the results to fetch. For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." + [QueryParameter("page")] + public int? Page { get; set; } + /// The number of results per page (max 100). For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." + [QueryParameter("per_page")] + public int? PerPage { get; set; } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class RunnersRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Actions/Runners/RunnersResponse.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Actions/Runners/RunnersResponse.cs new file mode 100644 index 0000000..a049e3a --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Actions/Runners/RunnersResponse.cs @@ -0,0 +1,28 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.Actions.Runners +{ + [Obsolete("This class is obsolete. Use RunnersGetResponse instead.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class RunnersResponse : global::Ayllu.Github.Client.Repos.Item.Item.Actions.Runners.RunnersGetResponse, IParsable + #pragma warning restore CS1591 + { + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static new global::Ayllu.Github.Client.Repos.Item.Item.Actions.Runners.RunnersResponse CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Repos.Item.Item.Actions.Runners.RunnersResponse(); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Actions/Runs/GetStatusQueryParameterType.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Actions/Runs/GetStatusQueryParameterType.cs new file mode 100644 index 0000000..11f6509 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Actions/Runs/GetStatusQueryParameterType.cs @@ -0,0 +1,68 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.Actions.Runs +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public enum GetStatusQueryParameterType + #pragma warning restore CS1591 + { + [EnumMember(Value = "completed")] + #pragma warning disable CS1591 + Completed, + #pragma warning restore CS1591 + [EnumMember(Value = "action_required")] + #pragma warning disable CS1591 + Action_required, + #pragma warning restore CS1591 + [EnumMember(Value = "cancelled")] + #pragma warning disable CS1591 + Cancelled, + #pragma warning restore CS1591 + [EnumMember(Value = "failure")] + #pragma warning disable CS1591 + Failure, + #pragma warning restore CS1591 + [EnumMember(Value = "neutral")] + #pragma warning disable CS1591 + Neutral, + #pragma warning restore CS1591 + [EnumMember(Value = "skipped")] + #pragma warning disable CS1591 + Skipped, + #pragma warning restore CS1591 + [EnumMember(Value = "stale")] + #pragma warning disable CS1591 + Stale, + #pragma warning restore CS1591 + [EnumMember(Value = "success")] + #pragma warning disable CS1591 + Success, + #pragma warning restore CS1591 + [EnumMember(Value = "timed_out")] + #pragma warning disable CS1591 + Timed_out, + #pragma warning restore CS1591 + [EnumMember(Value = "in_progress")] + #pragma warning disable CS1591 + In_progress, + #pragma warning restore CS1591 + [EnumMember(Value = "queued")] + #pragma warning disable CS1591 + Queued, + #pragma warning restore CS1591 + [EnumMember(Value = "requested")] + #pragma warning disable CS1591 + Requested, + #pragma warning restore CS1591 + [EnumMember(Value = "waiting")] + #pragma warning disable CS1591 + Waiting, + #pragma warning restore CS1591 + [EnumMember(Value = "pending")] + #pragma warning disable CS1591 + Pending, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Actions/Runs/Item/Approvals/ApprovalsRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Actions/Runs/Item/Approvals/ApprovalsRequestBuilder.cs new file mode 100644 index 0000000..7a8d869 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Actions/Runs/Item/Approvals/ApprovalsRequestBuilder.cs @@ -0,0 +1,94 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.Actions.Runs.Item.Approvals +{ + /// + /// Builds and executes requests for operations under \repos\{owner-id}\{repo-id}\actions\runs\{run_id}\approvals + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class ApprovalsRequestBuilder : BaseRequestBuilder + { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public ApprovalsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/actions/runs/{run_id}/approvals", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public ApprovalsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/actions/runs/{run_id}/approvals", rawUrl) + { + } + /// + /// 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. + /// API method documentation + /// + /// A List<global::Ayllu.Github.Client.Models.EnvironmentApprovals> + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task?> GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task> GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var collectionResult = await RequestAdapter.SendCollectionAsync(requestInfo, global::Ayllu.Github.Client.Models.EnvironmentApprovals.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false); + return collectionResult?.AsList(); + } + /// + /// 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. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.Repos.Item.Item.Actions.Runs.Item.Approvals.ApprovalsRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Repos.Item.Item.Actions.Runs.Item.Approvals.ApprovalsRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class ApprovalsRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Actions/Runs/Item/Approve/ApproveRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Actions/Runs/Item/Approve/ApproveRequestBuilder.cs new file mode 100644 index 0000000..495e106 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Actions/Runs/Item/Approve/ApproveRequestBuilder.cs @@ -0,0 +1,100 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.Actions.Runs.Item.Approve +{ + /// + /// Builds and executes requests for operations under \repos\{owner-id}\{repo-id}\actions\runs\{run_id}\approve + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class ApproveRequestBuilder : BaseRequestBuilder + { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public ApproveRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/actions/runs/{run_id}/approve", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public ApproveRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/actions/runs/{run_id}/approve", rawUrl) + { + } + /// + /// 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/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. + /// API method documentation + /// + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 403 status code + /// When receiving a 404 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PostAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task PostAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToPostRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "403", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "404", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Models.EmptyObject.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// 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/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. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPostRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToPostRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.Repos.Item.Item.Actions.Runs.Item.Approve.ApproveRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Repos.Item.Item.Actions.Runs.Item.Approve.ApproveRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class ApproveRequestBuilderPostRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Actions/Runs/Item/Artifacts/ArtifactsGetResponse.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Actions/Runs/Item/Artifacts/ArtifactsGetResponse.cs new file mode 100644 index 0000000..e07e7d2 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Actions/Runs/Item/Artifacts/ArtifactsGetResponse.cs @@ -0,0 +1,70 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.Actions.Runs.Item.Artifacts +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class ArtifactsGetResponse : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The artifacts property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? Artifacts { get; set; } +#nullable restore +#else + public List Artifacts { get; set; } +#endif + /// The total_count property + public int? TotalCount { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public ArtifactsGetResponse() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Repos.Item.Item.Actions.Runs.Item.Artifacts.ArtifactsGetResponse CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Repos.Item.Item.Actions.Runs.Item.Artifacts.ArtifactsGetResponse(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "artifacts", n => { Artifacts = n.GetCollectionOfObjectValues(global::Ayllu.Github.Client.Models.Artifact.CreateFromDiscriminatorValue)?.AsList(); } }, + { "total_count", n => { TotalCount = n.GetIntValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteCollectionOfObjectValues("artifacts", Artifacts); + writer.WriteIntValue("total_count", TotalCount); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Actions/Runs/Item/Artifacts/ArtifactsRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Actions/Runs/Item/Artifacts/ArtifactsRequestBuilder.cs new file mode 100644 index 0000000..cf4ab0b --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Actions/Runs/Item/Artifacts/ArtifactsRequestBuilder.cs @@ -0,0 +1,135 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.Actions.Runs.Item.Artifacts +{ + /// + /// Builds and executes requests for operations under \repos\{owner-id}\{repo-id}\actions\runs\{run_id}\artifacts + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class ArtifactsRequestBuilder : BaseRequestBuilder + { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public ArtifactsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/actions/runs/{run_id}/artifacts{?name*,page*,per_page*}", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public ArtifactsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/actions/runs/{run_id}/artifacts{?name*,page*,per_page*}", rawUrl) + { + } + /// + /// 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. + /// API method documentation + /// + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsArtifactsGetResponseAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task GetAsArtifactsGetResponseAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Repos.Item.Item.Actions.Runs.Item.Artifacts.ArtifactsGetResponse.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false); + } + /// + /// 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. + /// API method documentation + /// + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + [Obsolete("This method is obsolete. Use GetAsArtifactsGetResponseAsync instead.")] +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Repos.Item.Item.Actions.Runs.Item.Artifacts.ArtifactsResponse.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false); + } + /// + /// 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. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.Repos.Item.Item.Actions.Runs.Item.Artifacts.ArtifactsRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Repos.Item.Item.Actions.Runs.Item.Artifacts.ArtifactsRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// 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. + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class ArtifactsRequestBuilderGetQueryParameters + { + /// The name field of an artifact. When specified, only artifacts with this name will be returned. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("name")] + public string? Name { get; set; } +#nullable restore +#else + [QueryParameter("name")] + public string Name { get; set; } +#endif + /// The page number of the results to fetch. For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." + [QueryParameter("page")] + public int? Page { get; set; } + /// The number of results per page (max 100). For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." + [QueryParameter("per_page")] + public int? PerPage { get; set; } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class ArtifactsRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Actions/Runs/Item/Artifacts/ArtifactsResponse.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Actions/Runs/Item/Artifacts/ArtifactsResponse.cs new file mode 100644 index 0000000..962baed --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Actions/Runs/Item/Artifacts/ArtifactsResponse.cs @@ -0,0 +1,28 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.Actions.Runs.Item.Artifacts +{ + [Obsolete("This class is obsolete. Use ArtifactsGetResponse instead.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class ArtifactsResponse : global::Ayllu.Github.Client.Repos.Item.Item.Actions.Runs.Item.Artifacts.ArtifactsGetResponse, IParsable + #pragma warning restore CS1591 + { + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static new global::Ayllu.Github.Client.Repos.Item.Item.Actions.Runs.Item.Artifacts.ArtifactsResponse CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Repos.Item.Item.Actions.Runs.Item.Artifacts.ArtifactsResponse(); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Actions/Runs/Item/Attempts/AttemptsRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Actions/Runs/Item/Attempts/AttemptsRequestBuilder.cs new file mode 100644 index 0000000..50d9268 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Actions/Runs/Item/Attempts/AttemptsRequestBuilder.cs @@ -0,0 +1,61 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Repos.Item.Item.Actions.Runs.Item.Attempts.Item; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.Actions.Runs.Item.Attempts +{ + /// + /// Builds and executes requests for operations under \repos\{owner-id}\{repo-id}\actions\runs\{run_id}\attempts + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class AttemptsRequestBuilder : BaseRequestBuilder + { + /// Gets an item from the Ayllu.Github.Client.repos.item.item.actions.runs.item.attempts.item collection + /// The attempt number of the workflow run. + /// A + public global::Ayllu.Github.Client.Repos.Item.Item.Actions.Runs.Item.Attempts.Item.WithAttempt_numberItemRequestBuilder this[int position] + { + get + { + var urlTplParams = new Dictionary(PathParameters); + urlTplParams.Add("attempt_number", position); + return new global::Ayllu.Github.Client.Repos.Item.Item.Actions.Runs.Item.Attempts.Item.WithAttempt_numberItemRequestBuilder(urlTplParams, RequestAdapter); + } + } + /// Gets an item from the Ayllu.Github.Client.repos.item.item.actions.runs.item.attempts.item collection + /// The attempt number of the workflow run. + /// A + [Obsolete("This indexer is deprecated and will be removed in the next major version. Use the one with the typed parameter instead.")] + public global::Ayllu.Github.Client.Repos.Item.Item.Actions.Runs.Item.Attempts.Item.WithAttempt_numberItemRequestBuilder this[string position] + { + get + { + var urlTplParams = new Dictionary(PathParameters); + if (!string.IsNullOrWhiteSpace(position)) urlTplParams.Add("attempt_number", position); + return new global::Ayllu.Github.Client.Repos.Item.Item.Actions.Runs.Item.Attempts.Item.WithAttempt_numberItemRequestBuilder(urlTplParams, RequestAdapter); + } + } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public AttemptsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/actions/runs/{run_id}/attempts", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public AttemptsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/actions/runs/{run_id}/attempts", rawUrl) + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Actions/Runs/Item/Attempts/Item/Jobs/JobsGetResponse.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Actions/Runs/Item/Attempts/Item/Jobs/JobsGetResponse.cs new file mode 100644 index 0000000..2da10bd --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Actions/Runs/Item/Attempts/Item/Jobs/JobsGetResponse.cs @@ -0,0 +1,70 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.Actions.Runs.Item.Attempts.Item.Jobs +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class JobsGetResponse : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The jobs property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? Jobs { get; set; } +#nullable restore +#else + public List Jobs { get; set; } +#endif + /// The total_count property + public int? TotalCount { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public JobsGetResponse() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Repos.Item.Item.Actions.Runs.Item.Attempts.Item.Jobs.JobsGetResponse CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Repos.Item.Item.Actions.Runs.Item.Attempts.Item.Jobs.JobsGetResponse(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "jobs", n => { Jobs = n.GetCollectionOfObjectValues(global::Ayllu.Github.Client.Models.Job.CreateFromDiscriminatorValue)?.AsList(); } }, + { "total_count", n => { TotalCount = n.GetIntValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteCollectionOfObjectValues("jobs", Jobs); + writer.WriteIntValue("total_count", TotalCount); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Actions/Runs/Item/Attempts/Item/Jobs/JobsRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Actions/Runs/Item/Attempts/Item/Jobs/JobsRequestBuilder.cs new file mode 100644 index 0000000..fba8c7d --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Actions/Runs/Item/Attempts/Item/Jobs/JobsRequestBuilder.cs @@ -0,0 +1,136 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.Actions.Runs.Item.Attempts.Item.Jobs +{ + /// + /// Builds and executes requests for operations under \repos\{owner-id}\{repo-id}\actions\runs\{run_id}\attempts\{attempt_number}\jobs + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class JobsRequestBuilder : BaseRequestBuilder + { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public JobsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/actions/runs/{run_id}/attempts/{attempt_number}/jobs{?page*,per_page*}", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public JobsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/actions/runs/{run_id}/attempts/{attempt_number}/jobs{?page*,per_page*}", rawUrl) + { + } + /// + /// 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/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. + /// API method documentation + /// + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 404 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsJobsGetResponseAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task GetAsJobsGetResponseAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "404", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Repos.Item.Item.Actions.Runs.Item.Attempts.Item.Jobs.JobsGetResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// 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/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. + /// API method documentation + /// + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 404 status code + [Obsolete("This method is obsolete. Use GetAsJobsGetResponseAsync instead.")] +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "404", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Repos.Item.Item.Actions.Runs.Item.Attempts.Item.Jobs.JobsResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// 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/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. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.Repos.Item.Item.Actions.Runs.Item.Attempts.Item.Jobs.JobsRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Repos.Item.Item.Actions.Runs.Item.Attempts.Item.Jobs.JobsRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// 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/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. + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class JobsRequestBuilderGetQueryParameters + { + /// The page number of the results to fetch. For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." + [QueryParameter("page")] + public int? Page { get; set; } + /// The number of results per page (max 100). For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." + [QueryParameter("per_page")] + public int? PerPage { get; set; } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class JobsRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Actions/Runs/Item/Attempts/Item/Jobs/JobsResponse.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Actions/Runs/Item/Attempts/Item/Jobs/JobsResponse.cs new file mode 100644 index 0000000..8cf8530 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Actions/Runs/Item/Attempts/Item/Jobs/JobsResponse.cs @@ -0,0 +1,28 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.Actions.Runs.Item.Attempts.Item.Jobs +{ + [Obsolete("This class is obsolete. Use JobsGetResponse instead.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class JobsResponse : global::Ayllu.Github.Client.Repos.Item.Item.Actions.Runs.Item.Attempts.Item.Jobs.JobsGetResponse, IParsable + #pragma warning restore CS1591 + { + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static new global::Ayllu.Github.Client.Repos.Item.Item.Actions.Runs.Item.Attempts.Item.Jobs.JobsResponse CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Repos.Item.Item.Actions.Runs.Item.Attempts.Item.Jobs.JobsResponse(); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Actions/Runs/Item/Attempts/Item/Logs/LogsRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Actions/Runs/Item/Attempts/Item/Logs/LogsRequestBuilder.cs new file mode 100644 index 0000000..95b7822 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Actions/Runs/Item/Attempts/Item/Logs/LogsRequestBuilder.cs @@ -0,0 +1,90 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.Actions.Runs.Item.Attempts.Item.Logs +{ + /// + /// Builds and executes requests for operations under \repos\{owner-id}\{repo-id}\actions\runs\{run_id}\attempts\{attempt_number}\logs + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class LogsRequestBuilder : BaseRequestBuilder + { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public LogsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/actions/runs/{run_id}/attempts/{attempt_number}/logs", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public LogsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/actions/runs/{run_id}/attempts/{attempt_number}/logs", rawUrl) + { + } + /// + /// 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 + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + await RequestAdapter.SendNoContentAsync(requestInfo, default, cancellationToken).ConfigureAwait(false); + } + /// + /// 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. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.Repos.Item.Item.Actions.Runs.Item.Attempts.Item.Logs.LogsRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Repos.Item.Item.Actions.Runs.Item.Attempts.Item.Logs.LogsRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class LogsRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Actions/Runs/Item/Attempts/Item/WithAttempt_numberItemRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Actions/Runs/Item/Attempts/Item/WithAttempt_numberItemRequestBuilder.cs new file mode 100644 index 0000000..30c5428 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Actions/Runs/Item/Attempts/Item/WithAttempt_numberItemRequestBuilder.cs @@ -0,0 +1,115 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Ayllu.Github.Client.Repos.Item.Item.Actions.Runs.Item.Attempts.Item.Jobs; +using Ayllu.Github.Client.Repos.Item.Item.Actions.Runs.Item.Attempts.Item.Logs; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.Actions.Runs.Item.Attempts.Item +{ + /// + /// Builds and executes requests for operations under \repos\{owner-id}\{repo-id}\actions\runs\{run_id}\attempts\{attempt_number} + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithAttempt_numberItemRequestBuilder : BaseRequestBuilder + { + /// The jobs property + public global::Ayllu.Github.Client.Repos.Item.Item.Actions.Runs.Item.Attempts.Item.Jobs.JobsRequestBuilder Jobs + { + get => new global::Ayllu.Github.Client.Repos.Item.Item.Actions.Runs.Item.Attempts.Item.Jobs.JobsRequestBuilder(PathParameters, RequestAdapter); + } + /// The logs property + public global::Ayllu.Github.Client.Repos.Item.Item.Actions.Runs.Item.Attempts.Item.Logs.LogsRequestBuilder Logs + { + get => new global::Ayllu.Github.Client.Repos.Item.Item.Actions.Runs.Item.Attempts.Item.Logs.LogsRequestBuilder(PathParameters, RequestAdapter); + } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public WithAttempt_numberItemRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/actions/runs/{run_id}/attempts/{attempt_number}{?exclude_pull_requests*}", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public WithAttempt_numberItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/actions/runs/{run_id}/attempts/{attempt_number}{?exclude_pull_requests*}", rawUrl) + { + } + /// + /// 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. + /// API method documentation + /// + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Models.WorkflowRun.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false); + } + /// + /// 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. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.Repos.Item.Item.Actions.Runs.Item.Attempts.Item.WithAttempt_numberItemRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Repos.Item.Item.Actions.Runs.Item.Attempts.Item.WithAttempt_numberItemRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// 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. + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithAttempt_numberItemRequestBuilderGetQueryParameters + { + /// If `true` pull requests are omitted from the response (empty array). + [QueryParameter("exclude_pull_requests")] + public bool? ExcludePullRequests { get; set; } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithAttempt_numberItemRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Actions/Runs/Item/Cancel/CancelRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Actions/Runs/Item/Cancel/CancelRequestBuilder.cs new file mode 100644 index 0000000..b18eaf7 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Actions/Runs/Item/Cancel/CancelRequestBuilder.cs @@ -0,0 +1,98 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.Actions.Runs.Item.Cancel +{ + /// + /// Builds and executes requests for operations under \repos\{owner-id}\{repo-id}\actions\runs\{run_id}\cancel + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class CancelRequestBuilder : BaseRequestBuilder + { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public CancelRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/actions/runs/{run_id}/cancel", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public CancelRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/actions/runs/{run_id}/cancel", rawUrl) + { + } + /// + /// Cancels a workflow run using its `id`.OAuth tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. + /// API method documentation + /// + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 409 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PostAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task PostAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToPostRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "409", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Models.EmptyObject.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// Cancels a workflow run using its `id`.OAuth tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPostRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToPostRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.Repos.Item.Item.Actions.Runs.Item.Cancel.CancelRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Repos.Item.Item.Actions.Runs.Item.Cancel.CancelRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class CancelRequestBuilderPostRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Actions/Runs/Item/Deployment_protection_rule/Deployment_protection_ruleRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Actions/Runs/Item/Deployment_protection_rule/Deployment_protection_ruleRequestBuilder.cs new file mode 100644 index 0000000..b965557 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Actions/Runs/Item/Deployment_protection_rule/Deployment_protection_ruleRequestBuilder.cs @@ -0,0 +1,153 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.Actions.Runs.Item.Deployment_protection_rule +{ + /// + /// Builds and executes requests for operations under \repos\{owner-id}\{repo-id}\actions\runs\{run_id}\deployment_protection_rule + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class Deployment_protection_ruleRequestBuilder : BaseRequestBuilder + { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public Deployment_protection_ruleRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/actions/runs/{run_id}/deployment_protection_rule", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public Deployment_protection_ruleRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/actions/runs/{run_id}/deployment_protection_rule", rawUrl) + { + } + /// + /// 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/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 + /// + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PostAsync(global::Ayllu.Github.Client.Repos.Item.Item.Actions.Runs.Item.Deployment_protection_rule.Deployment_protection_ruleRequestBuilder.Deployment_protection_rulePostRequestBody body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task PostAsync(global::Ayllu.Github.Client.Repos.Item.Item.Actions.Runs.Item.Deployment_protection_rule.Deployment_protection_ruleRequestBuilder.Deployment_protection_rulePostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPostRequestInformation(body, requestConfiguration); + await RequestAdapter.SendNoContentAsync(requestInfo, default, cancellationToken).ConfigureAwait(false); + } + /// + /// 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/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. + /// + /// A + /// The request body + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPostRequestInformation(global::Ayllu.Github.Client.Repos.Item.Item.Actions.Runs.Item.Deployment_protection_rule.Deployment_protection_ruleRequestBuilder.Deployment_protection_rulePostRequestBody body, Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToPostRequestInformation(global::Ayllu.Github.Client.Repos.Item.Item.Actions.Runs.Item.Deployment_protection_rule.Deployment_protection_ruleRequestBuilder.Deployment_protection_rulePostRequestBody body, Action> requestConfiguration = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.Repos.Item.Item.Actions.Runs.Item.Deployment_protection_rule.Deployment_protection_ruleRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Repos.Item.Item.Actions.Runs.Item.Deployment_protection_rule.Deployment_protection_ruleRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Composed type wrapper for classes , + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class Deployment_protection_rulePostRequestBody : IComposedTypeWrapper, IParsable + { + /// Composed type representation for type +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.ReviewCustomGatesCommentRequired? ReviewCustomGatesCommentRequired { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.ReviewCustomGatesCommentRequired ReviewCustomGatesCommentRequired { get; set; } +#endif + /// Composed type representation for type +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.ReviewCustomGatesStateRequired? ReviewCustomGatesStateRequired { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.ReviewCustomGatesStateRequired ReviewCustomGatesStateRequired { get; set; } +#endif + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Repos.Item.Item.Actions.Runs.Item.Deployment_protection_rule.Deployment_protection_ruleRequestBuilder.Deployment_protection_rulePostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + var result = new global::Ayllu.Github.Client.Repos.Item.Item.Actions.Runs.Item.Deployment_protection_rule.Deployment_protection_ruleRequestBuilder.Deployment_protection_rulePostRequestBody(); + result.ReviewCustomGatesCommentRequired = new global::Ayllu.Github.Client.Models.ReviewCustomGatesCommentRequired(); + result.ReviewCustomGatesStateRequired = new global::Ayllu.Github.Client.Models.ReviewCustomGatesStateRequired(); + return result; + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + if(ReviewCustomGatesCommentRequired != null || ReviewCustomGatesStateRequired != null) + { + return ParseNodeHelper.MergeDeserializersForIntersectionWrapper(ReviewCustomGatesCommentRequired, ReviewCustomGatesStateRequired); + } + return new Dictionary>(); + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteObjectValue(null, ReviewCustomGatesCommentRequired, ReviewCustomGatesStateRequired); + } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class Deployment_protection_ruleRequestBuilderPostRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Actions/Runs/Item/ForceCancel/ForceCancelRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Actions/Runs/Item/ForceCancel/ForceCancelRequestBuilder.cs new file mode 100644 index 0000000..af43122 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Actions/Runs/Item/ForceCancel/ForceCancelRequestBuilder.cs @@ -0,0 +1,98 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.Actions.Runs.Item.ForceCancel +{ + /// + /// Builds and executes requests for operations under \repos\{owner-id}\{repo-id}\actions\runs\{run_id}\force-cancel + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class ForceCancelRequestBuilder : BaseRequestBuilder + { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public ForceCancelRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/actions/runs/{run_id}/force-cancel", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public ForceCancelRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/actions/runs/{run_id}/force-cancel", rawUrl) + { + } + /// + /// 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. + /// API method documentation + /// + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 409 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PostAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task PostAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToPostRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "409", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Models.EmptyObject.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// 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. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPostRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToPostRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.Repos.Item.Item.Actions.Runs.Item.ForceCancel.ForceCancelRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Repos.Item.Item.Actions.Runs.Item.ForceCancel.ForceCancelRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class ForceCancelRequestBuilderPostRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Actions/Runs/Item/Jobs/GetFilterQueryParameterType.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Actions/Runs/Item/Jobs/GetFilterQueryParameterType.cs new file mode 100644 index 0000000..4718392 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Actions/Runs/Item/Jobs/GetFilterQueryParameterType.cs @@ -0,0 +1,20 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.Actions.Runs.Item.Jobs +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public enum GetFilterQueryParameterType + #pragma warning restore CS1591 + { + [EnumMember(Value = "latest")] + #pragma warning disable CS1591 + Latest, + #pragma warning restore CS1591 + [EnumMember(Value = "all")] + #pragma warning disable CS1591 + All, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Actions/Runs/Item/Jobs/JobsGetResponse.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Actions/Runs/Item/Jobs/JobsGetResponse.cs new file mode 100644 index 0000000..9e35bf5 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Actions/Runs/Item/Jobs/JobsGetResponse.cs @@ -0,0 +1,70 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.Actions.Runs.Item.Jobs +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class JobsGetResponse : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The jobs property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? Jobs { get; set; } +#nullable restore +#else + public List Jobs { get; set; } +#endif + /// The total_count property + public int? TotalCount { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public JobsGetResponse() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Repos.Item.Item.Actions.Runs.Item.Jobs.JobsGetResponse CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Repos.Item.Item.Actions.Runs.Item.Jobs.JobsGetResponse(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "jobs", n => { Jobs = n.GetCollectionOfObjectValues(global::Ayllu.Github.Client.Models.Job.CreateFromDiscriminatorValue)?.AsList(); } }, + { "total_count", n => { TotalCount = n.GetIntValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteCollectionOfObjectValues("jobs", Jobs); + writer.WriteIntValue("total_count", TotalCount); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Actions/Runs/Item/Jobs/JobsRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Actions/Runs/Item/Jobs/JobsRequestBuilder.cs new file mode 100644 index 0000000..49e5d29 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Actions/Runs/Item/Jobs/JobsRequestBuilder.cs @@ -0,0 +1,139 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.Actions.Runs.Item.Jobs +{ + /// + /// Builds and executes requests for operations under \repos\{owner-id}\{repo-id}\actions\runs\{run_id}\jobs + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class JobsRequestBuilder : BaseRequestBuilder + { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public JobsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/actions/runs/{run_id}/jobs{?filter*,page*,per_page*}", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public JobsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/actions/runs/{run_id}/jobs{?filter*,page*,per_page*}", rawUrl) + { + } + /// + /// 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/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. + /// API method documentation + /// + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsJobsGetResponseAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task GetAsJobsGetResponseAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Repos.Item.Item.Actions.Runs.Item.Jobs.JobsGetResponse.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false); + } + /// + /// 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/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. + /// API method documentation + /// + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + [Obsolete("This method is obsolete. Use GetAsJobsGetResponseAsync instead.")] +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Repos.Item.Item.Actions.Runs.Item.Jobs.JobsResponse.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false); + } + /// + /// 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/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. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.Repos.Item.Item.Actions.Runs.Item.Jobs.JobsRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Repos.Item.Item.Actions.Runs.Item.Jobs.JobsRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// 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/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. + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class JobsRequestBuilderGetQueryParameters + { + /// 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. + [Obsolete("This property is deprecated, use FilterAsGetFilterQueryParameterType instead")] +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("filter")] + public string? Filter { get; set; } +#nullable restore +#else + [QueryParameter("filter")] + public string Filter { get; set; } +#endif + /// 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. + [QueryParameter("filter")] + public global::Ayllu.Github.Client.Repos.Item.Item.Actions.Runs.Item.Jobs.GetFilterQueryParameterType? FilterAsGetFilterQueryParameterType { get; set; } + /// The page number of the results to fetch. For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." + [QueryParameter("page")] + public int? Page { get; set; } + /// The number of results per page (max 100). For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." + [QueryParameter("per_page")] + public int? PerPage { get; set; } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class JobsRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Actions/Runs/Item/Jobs/JobsResponse.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Actions/Runs/Item/Jobs/JobsResponse.cs new file mode 100644 index 0000000..208a266 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Actions/Runs/Item/Jobs/JobsResponse.cs @@ -0,0 +1,28 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.Actions.Runs.Item.Jobs +{ + [Obsolete("This class is obsolete. Use JobsGetResponse instead.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class JobsResponse : global::Ayllu.Github.Client.Repos.Item.Item.Actions.Runs.Item.Jobs.JobsGetResponse, IParsable + #pragma warning restore CS1591 + { + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static new global::Ayllu.Github.Client.Repos.Item.Item.Actions.Runs.Item.Jobs.JobsResponse CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Repos.Item.Item.Actions.Runs.Item.Jobs.JobsResponse(); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Actions/Runs/Item/Logs/LogsRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Actions/Runs/Item/Logs/LogsRequestBuilder.cs new file mode 100644 index 0000000..3c38d7c --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Actions/Runs/Item/Logs/LogsRequestBuilder.cs @@ -0,0 +1,143 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.Actions.Runs.Item.Logs +{ + /// + /// Builds and executes requests for operations under \repos\{owner-id}\{repo-id}\actions\runs\{run_id}\logs + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class LogsRequestBuilder : BaseRequestBuilder + { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public LogsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/actions/runs/{run_id}/logs", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public LogsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/actions/runs/{run_id}/logs", rawUrl) + { + } + /// + /// Deletes all logs for a workflow run.OAuth tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. + /// API method documentation + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 403 status code + /// When receiving a 500 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task DeleteAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task DeleteAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToDeleteRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "403", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "500", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + }; + await RequestAdapter.SendNoContentAsync(requestInfo, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// 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 + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + await RequestAdapter.SendNoContentAsync(requestInfo, default, cancellationToken).ConfigureAwait(false); + } + /// + /// Deletes all logs for a workflow run.OAuth tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToDeleteRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToDeleteRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.DELETE, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// 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. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.Repos.Item.Item.Actions.Runs.Item.Logs.LogsRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Repos.Item.Item.Actions.Runs.Item.Logs.LogsRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class LogsRequestBuilderDeleteRequestConfiguration : RequestConfiguration + { + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class LogsRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Actions/Runs/Item/Pending_deployments/Pending_deploymentsPostRequestBody.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Actions/Runs/Item/Pending_deployments/Pending_deploymentsPostRequestBody.cs new file mode 100644 index 0000000..1e0aa5d --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Actions/Runs/Item/Pending_deployments/Pending_deploymentsPostRequestBody.cs @@ -0,0 +1,79 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.Actions.Runs.Item.Pending_deployments +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class Pending_deploymentsPostRequestBody : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// A comment to accompany the deployment review +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Comment { get; set; } +#nullable restore +#else + public string Comment { get; set; } +#endif + /// The list of environment ids to approve or reject +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? EnvironmentIds { get; set; } +#nullable restore +#else + public List EnvironmentIds { get; set; } +#endif + /// Whether to approve or reject deployment to the specified environments. + public global::Ayllu.Github.Client.Repos.Item.Item.Actions.Runs.Item.Pending_deployments.Pending_deploymentsPostRequestBody_state? State { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public Pending_deploymentsPostRequestBody() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Repos.Item.Item.Actions.Runs.Item.Pending_deployments.Pending_deploymentsPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Repos.Item.Item.Actions.Runs.Item.Pending_deployments.Pending_deploymentsPostRequestBody(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "comment", n => { Comment = n.GetStringValue(); } }, + { "environment_ids", n => { EnvironmentIds = n.GetCollectionOfPrimitiveValues()?.AsList(); } }, + { "state", n => { State = n.GetEnumValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("comment", Comment); + writer.WriteCollectionOfPrimitiveValues("environment_ids", EnvironmentIds); + writer.WriteEnumValue("state", State); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Actions/Runs/Item/Pending_deployments/Pending_deploymentsPostRequestBody_state.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Actions/Runs/Item/Pending_deployments/Pending_deploymentsPostRequestBody_state.cs new file mode 100644 index 0000000..e3a2637 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Actions/Runs/Item/Pending_deployments/Pending_deploymentsPostRequestBody_state.cs @@ -0,0 +1,19 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.Actions.Runs.Item.Pending_deployments +{ + /// Whether to approve or reject deployment to the specified environments. + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public enum Pending_deploymentsPostRequestBody_state + { + [EnumMember(Value = "approved")] + #pragma warning disable CS1591 + Approved, + #pragma warning restore CS1591 + [EnumMember(Value = "rejected")] + #pragma warning disable CS1591 + Rejected, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Actions/Runs/Item/Pending_deployments/Pending_deploymentsRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Actions/Runs/Item/Pending_deployments/Pending_deploymentsRequestBuilder.cs new file mode 100644 index 0000000..c7e36fa --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Actions/Runs/Item/Pending_deployments/Pending_deploymentsRequestBuilder.cs @@ -0,0 +1,146 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.Actions.Runs.Item.Pending_deployments +{ + /// + /// Builds and executes requests for operations under \repos\{owner-id}\{repo-id}\actions\runs\{run_id}\pending_deployments + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class Pending_deploymentsRequestBuilder : BaseRequestBuilder + { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public Pending_deploymentsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/actions/runs/{run_id}/pending_deployments", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public Pending_deploymentsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/actions/runs/{run_id}/pending_deployments", rawUrl) + { + } + /// + /// 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. + /// API method documentation + /// + /// A List<global::Ayllu.Github.Client.Models.PendingDeployment> + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task?> GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task> GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var collectionResult = await RequestAdapter.SendCollectionAsync(requestInfo, global::Ayllu.Github.Client.Models.PendingDeployment.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false); + return collectionResult?.AsList(); + } + /// + /// 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. + /// API method documentation + /// + /// A List<global::Ayllu.Github.Client.Models.Deployment> + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task?> PostAsync(global::Ayllu.Github.Client.Repos.Item.Item.Actions.Runs.Item.Pending_deployments.Pending_deploymentsPostRequestBody body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task> PostAsync(global::Ayllu.Github.Client.Repos.Item.Item.Actions.Runs.Item.Pending_deployments.Pending_deploymentsPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPostRequestInformation(body, requestConfiguration); + var collectionResult = await RequestAdapter.SendCollectionAsync(requestInfo, global::Ayllu.Github.Client.Models.Deployment.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false); + return collectionResult?.AsList(); + } + /// + /// 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. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// 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. + /// + /// A + /// The request body + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPostRequestInformation(global::Ayllu.Github.Client.Repos.Item.Item.Actions.Runs.Item.Pending_deployments.Pending_deploymentsPostRequestBody body, Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToPostRequestInformation(global::Ayllu.Github.Client.Repos.Item.Item.Actions.Runs.Item.Pending_deployments.Pending_deploymentsPostRequestBody body, Action> requestConfiguration = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.Repos.Item.Item.Actions.Runs.Item.Pending_deployments.Pending_deploymentsRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Repos.Item.Item.Actions.Runs.Item.Pending_deployments.Pending_deploymentsRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class Pending_deploymentsRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class Pending_deploymentsRequestBuilderPostRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Actions/Runs/Item/Rerun/RerunPostRequestBody.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Actions/Runs/Item/Rerun/RerunPostRequestBody.cs new file mode 100644 index 0000000..0e6b102 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Actions/Runs/Item/Rerun/RerunPostRequestBody.cs @@ -0,0 +1,59 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.Actions.Runs.Item.Rerun +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class RerunPostRequestBody : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// Whether to enable debug logging for the re-run. + public bool? EnableDebugLogging { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public RerunPostRequestBody() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Repos.Item.Item.Actions.Runs.Item.Rerun.RerunPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Repos.Item.Item.Actions.Runs.Item.Rerun.RerunPostRequestBody(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "enable_debug_logging", n => { EnableDebugLogging = n.GetBoolValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteBoolValue("enable_debug_logging", EnableDebugLogging); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Actions/Runs/Item/Rerun/RerunRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Actions/Runs/Item/Rerun/RerunRequestBuilder.cs new file mode 100644 index 0000000..59a0c18 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Actions/Runs/Item/Rerun/RerunRequestBuilder.cs @@ -0,0 +1,98 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.Actions.Runs.Item.Rerun +{ + /// + /// Builds and executes requests for operations under \repos\{owner-id}\{repo-id}\actions\runs\{run_id}\rerun + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class RerunRequestBuilder : BaseRequestBuilder + { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public RerunRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/actions/runs/{run_id}/rerun", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public RerunRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/actions/runs/{run_id}/rerun", rawUrl) + { + } + /// + /// Re-runs your workflow run using its `id`.OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. + /// API method documentation + /// + /// A + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PostAsync(global::Ayllu.Github.Client.Repos.Item.Item.Actions.Runs.Item.Rerun.RerunPostRequestBody body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task PostAsync(global::Ayllu.Github.Client.Repos.Item.Item.Actions.Runs.Item.Rerun.RerunPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPostRequestInformation(body, requestConfiguration); + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Models.EmptyObject.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false); + } + /// + /// Re-runs your workflow run using its `id`.OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. + /// + /// A + /// The request body + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPostRequestInformation(global::Ayllu.Github.Client.Repos.Item.Item.Actions.Runs.Item.Rerun.RerunPostRequestBody body, Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToPostRequestInformation(global::Ayllu.Github.Client.Repos.Item.Item.Actions.Runs.Item.Rerun.RerunPostRequestBody body, Action> requestConfiguration = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.Repos.Item.Item.Actions.Runs.Item.Rerun.RerunRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Repos.Item.Item.Actions.Runs.Item.Rerun.RerunRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class RerunRequestBuilderPostRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Actions/Runs/Item/RerunFailedJobs/RerunFailedJobsPostRequestBody.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Actions/Runs/Item/RerunFailedJobs/RerunFailedJobsPostRequestBody.cs new file mode 100644 index 0000000..0188476 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Actions/Runs/Item/RerunFailedJobs/RerunFailedJobsPostRequestBody.cs @@ -0,0 +1,59 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.Actions.Runs.Item.RerunFailedJobs +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class RerunFailedJobsPostRequestBody : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// Whether to enable debug logging for the re-run. + public bool? EnableDebugLogging { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public RerunFailedJobsPostRequestBody() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Repos.Item.Item.Actions.Runs.Item.RerunFailedJobs.RerunFailedJobsPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Repos.Item.Item.Actions.Runs.Item.RerunFailedJobs.RerunFailedJobsPostRequestBody(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "enable_debug_logging", n => { EnableDebugLogging = n.GetBoolValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteBoolValue("enable_debug_logging", EnableDebugLogging); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Actions/Runs/Item/RerunFailedJobs/RerunFailedJobsRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Actions/Runs/Item/RerunFailedJobs/RerunFailedJobsRequestBuilder.cs new file mode 100644 index 0000000..cfc239c --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Actions/Runs/Item/RerunFailedJobs/RerunFailedJobsRequestBuilder.cs @@ -0,0 +1,98 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.Actions.Runs.Item.RerunFailedJobs +{ + /// + /// Builds and executes requests for operations under \repos\{owner-id}\{repo-id}\actions\runs\{run_id}\rerun-failed-jobs + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class RerunFailedJobsRequestBuilder : BaseRequestBuilder + { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public RerunFailedJobsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/actions/runs/{run_id}/rerun-failed-jobs", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public RerunFailedJobsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/actions/runs/{run_id}/rerun-failed-jobs", rawUrl) + { + } + /// + /// 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. + /// API method documentation + /// + /// A + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PostAsync(global::Ayllu.Github.Client.Repos.Item.Item.Actions.Runs.Item.RerunFailedJobs.RerunFailedJobsPostRequestBody body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task PostAsync(global::Ayllu.Github.Client.Repos.Item.Item.Actions.Runs.Item.RerunFailedJobs.RerunFailedJobsPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPostRequestInformation(body, requestConfiguration); + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Models.EmptyObject.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false); + } + /// + /// 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. + /// + /// A + /// The request body + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPostRequestInformation(global::Ayllu.Github.Client.Repos.Item.Item.Actions.Runs.Item.RerunFailedJobs.RerunFailedJobsPostRequestBody body, Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToPostRequestInformation(global::Ayllu.Github.Client.Repos.Item.Item.Actions.Runs.Item.RerunFailedJobs.RerunFailedJobsPostRequestBody body, Action> requestConfiguration = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.Repos.Item.Item.Actions.Runs.Item.RerunFailedJobs.RerunFailedJobsRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Repos.Item.Item.Actions.Runs.Item.RerunFailedJobs.RerunFailedJobsRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class RerunFailedJobsRequestBuilderPostRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Actions/Runs/Item/Timing/TimingRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Actions/Runs/Item/Timing/TimingRequestBuilder.cs new file mode 100644 index 0000000..6152c80 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Actions/Runs/Item/Timing/TimingRequestBuilder.cs @@ -0,0 +1,93 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.Actions.Runs.Item.Timing +{ + /// + /// Builds and executes requests for operations under \repos\{owner-id}\{repo-id}\actions\runs\{run_id}\timing + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class TimingRequestBuilder : BaseRequestBuilder + { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public TimingRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/actions/runs/{run_id}/timing", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public TimingRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/actions/runs/{run_id}/timing", rawUrl) + { + } + /// + /// > [!WARNING] > This endpoint is in the process of closing down. Refer to "[Actions Get workflow usage and Get workflow run usage endpoints closing down](https://github.blog/changelog/2025-02-02-actions-get-workflow-usage-and-get-workflow-run-usage-endpoints-closing-down/)" for more information.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-hosted runners. Usage is listed for each GitHub-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/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. + /// API method documentation + /// + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Models.WorkflowRunUsage.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false); + } + /// + /// > [!WARNING] > This endpoint is in the process of closing down. Refer to "[Actions Get workflow usage and Get workflow run usage endpoints closing down](https://github.blog/changelog/2025-02-02-actions-get-workflow-usage-and-get-workflow-run-usage-endpoints-closing-down/)" for more information.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-hosted runners. Usage is listed for each GitHub-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/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. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.Repos.Item.Item.Actions.Runs.Item.Timing.TimingRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Repos.Item.Item.Actions.Runs.Item.Timing.TimingRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class TimingRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Actions/Runs/Item/WithRun_ItemRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Actions/Runs/Item/WithRun_ItemRequestBuilder.cs new file mode 100644 index 0000000..8bc3e5e --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Actions/Runs/Item/WithRun_ItemRequestBuilder.cs @@ -0,0 +1,225 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Ayllu.Github.Client.Repos.Item.Item.Actions.Runs.Item.Approvals; +using Ayllu.Github.Client.Repos.Item.Item.Actions.Runs.Item.Approve; +using Ayllu.Github.Client.Repos.Item.Item.Actions.Runs.Item.Artifacts; +using Ayllu.Github.Client.Repos.Item.Item.Actions.Runs.Item.Attempts; +using Ayllu.Github.Client.Repos.Item.Item.Actions.Runs.Item.Cancel; +using Ayllu.Github.Client.Repos.Item.Item.Actions.Runs.Item.Deployment_protection_rule; +using Ayllu.Github.Client.Repos.Item.Item.Actions.Runs.Item.ForceCancel; +using Ayllu.Github.Client.Repos.Item.Item.Actions.Runs.Item.Jobs; +using Ayllu.Github.Client.Repos.Item.Item.Actions.Runs.Item.Logs; +using Ayllu.Github.Client.Repos.Item.Item.Actions.Runs.Item.Pending_deployments; +using Ayllu.Github.Client.Repos.Item.Item.Actions.Runs.Item.Rerun; +using Ayllu.Github.Client.Repos.Item.Item.Actions.Runs.Item.RerunFailedJobs; +using Ayllu.Github.Client.Repos.Item.Item.Actions.Runs.Item.Timing; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.Actions.Runs.Item +{ + /// + /// Builds and executes requests for operations under \repos\{owner-id}\{repo-id}\actions\runs\{run_id} + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithRun_ItemRequestBuilder : BaseRequestBuilder + { + /// The approvals property + public global::Ayllu.Github.Client.Repos.Item.Item.Actions.Runs.Item.Approvals.ApprovalsRequestBuilder Approvals + { + get => new global::Ayllu.Github.Client.Repos.Item.Item.Actions.Runs.Item.Approvals.ApprovalsRequestBuilder(PathParameters, RequestAdapter); + } + /// The approve property + public global::Ayllu.Github.Client.Repos.Item.Item.Actions.Runs.Item.Approve.ApproveRequestBuilder Approve + { + get => new global::Ayllu.Github.Client.Repos.Item.Item.Actions.Runs.Item.Approve.ApproveRequestBuilder(PathParameters, RequestAdapter); + } + /// The artifacts property + public global::Ayllu.Github.Client.Repos.Item.Item.Actions.Runs.Item.Artifacts.ArtifactsRequestBuilder Artifacts + { + get => new global::Ayllu.Github.Client.Repos.Item.Item.Actions.Runs.Item.Artifacts.ArtifactsRequestBuilder(PathParameters, RequestAdapter); + } + /// The attempts property + public global::Ayllu.Github.Client.Repos.Item.Item.Actions.Runs.Item.Attempts.AttemptsRequestBuilder Attempts + { + get => new global::Ayllu.Github.Client.Repos.Item.Item.Actions.Runs.Item.Attempts.AttemptsRequestBuilder(PathParameters, RequestAdapter); + } + /// The cancel property + public global::Ayllu.Github.Client.Repos.Item.Item.Actions.Runs.Item.Cancel.CancelRequestBuilder Cancel + { + get => new global::Ayllu.Github.Client.Repos.Item.Item.Actions.Runs.Item.Cancel.CancelRequestBuilder(PathParameters, RequestAdapter); + } + /// The deployment_protection_rule property + public global::Ayllu.Github.Client.Repos.Item.Item.Actions.Runs.Item.Deployment_protection_rule.Deployment_protection_ruleRequestBuilder Deployment_protection_rule + { + get => new global::Ayllu.Github.Client.Repos.Item.Item.Actions.Runs.Item.Deployment_protection_rule.Deployment_protection_ruleRequestBuilder(PathParameters, RequestAdapter); + } + /// The forceCancel property + public global::Ayllu.Github.Client.Repos.Item.Item.Actions.Runs.Item.ForceCancel.ForceCancelRequestBuilder ForceCancel + { + get => new global::Ayllu.Github.Client.Repos.Item.Item.Actions.Runs.Item.ForceCancel.ForceCancelRequestBuilder(PathParameters, RequestAdapter); + } + /// The jobs property + public global::Ayllu.Github.Client.Repos.Item.Item.Actions.Runs.Item.Jobs.JobsRequestBuilder Jobs + { + get => new global::Ayllu.Github.Client.Repos.Item.Item.Actions.Runs.Item.Jobs.JobsRequestBuilder(PathParameters, RequestAdapter); + } + /// The logs property + public global::Ayllu.Github.Client.Repos.Item.Item.Actions.Runs.Item.Logs.LogsRequestBuilder Logs + { + get => new global::Ayllu.Github.Client.Repos.Item.Item.Actions.Runs.Item.Logs.LogsRequestBuilder(PathParameters, RequestAdapter); + } + /// The pending_deployments property + public global::Ayllu.Github.Client.Repos.Item.Item.Actions.Runs.Item.Pending_deployments.Pending_deploymentsRequestBuilder Pending_deployments + { + get => new global::Ayllu.Github.Client.Repos.Item.Item.Actions.Runs.Item.Pending_deployments.Pending_deploymentsRequestBuilder(PathParameters, RequestAdapter); + } + /// The rerun property + public global::Ayllu.Github.Client.Repos.Item.Item.Actions.Runs.Item.Rerun.RerunRequestBuilder Rerun + { + get => new global::Ayllu.Github.Client.Repos.Item.Item.Actions.Runs.Item.Rerun.RerunRequestBuilder(PathParameters, RequestAdapter); + } + /// The rerunFailedJobs property + public global::Ayllu.Github.Client.Repos.Item.Item.Actions.Runs.Item.RerunFailedJobs.RerunFailedJobsRequestBuilder RerunFailedJobs + { + get => new global::Ayllu.Github.Client.Repos.Item.Item.Actions.Runs.Item.RerunFailedJobs.RerunFailedJobsRequestBuilder(PathParameters, RequestAdapter); + } + /// The timing property + public global::Ayllu.Github.Client.Repos.Item.Item.Actions.Runs.Item.Timing.TimingRequestBuilder Timing + { + get => new global::Ayllu.Github.Client.Repos.Item.Item.Actions.Runs.Item.Timing.TimingRequestBuilder(PathParameters, RequestAdapter); + } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public WithRun_ItemRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/actions/runs/{run_id}{?exclude_pull_requests*}", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public WithRun_ItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/actions/runs/{run_id}{?exclude_pull_requests*}", rawUrl) + { + } + /// + /// 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 + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task DeleteAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task DeleteAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToDeleteRequestInformation(requestConfiguration); + await RequestAdapter.SendNoContentAsync(requestInfo, default, cancellationToken).ConfigureAwait(false); + } + /// + /// 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. + /// API method documentation + /// + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Models.WorkflowRun.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false); + } + /// + /// 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. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToDeleteRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToDeleteRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.DELETE, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + return requestInfo; + } + /// + /// 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. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.Repos.Item.Item.Actions.Runs.Item.WithRun_ItemRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Repos.Item.Item.Actions.Runs.Item.WithRun_ItemRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithRun_ItemRequestBuilderDeleteRequestConfiguration : RequestConfiguration + { + } + /// + /// 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. + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithRun_ItemRequestBuilderGetQueryParameters + { + /// If `true` pull requests are omitted from the response (empty array). + [QueryParameter("exclude_pull_requests")] + public bool? ExcludePullRequests { get; set; } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithRun_ItemRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Actions/Runs/RunsGetResponse.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Actions/Runs/RunsGetResponse.cs new file mode 100644 index 0000000..bc411e8 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Actions/Runs/RunsGetResponse.cs @@ -0,0 +1,70 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.Actions.Runs +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class RunsGetResponse : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The total_count property + public int? TotalCount { get; set; } + /// The workflow_runs property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? WorkflowRuns { get; set; } +#nullable restore +#else + public List WorkflowRuns { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public RunsGetResponse() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Repos.Item.Item.Actions.Runs.RunsGetResponse CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Repos.Item.Item.Actions.Runs.RunsGetResponse(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "total_count", n => { TotalCount = n.GetIntValue(); } }, + { "workflow_runs", n => { WorkflowRuns = n.GetCollectionOfObjectValues(global::Ayllu.Github.Client.Models.WorkflowRun.CreateFromDiscriminatorValue)?.AsList(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteIntValue("total_count", TotalCount); + writer.WriteCollectionOfObjectValues("workflow_runs", WorkflowRuns); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Actions/Runs/RunsRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Actions/Runs/RunsRequestBuilder.cs new file mode 100644 index 0000000..01982ca --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Actions/Runs/RunsRequestBuilder.cs @@ -0,0 +1,214 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Repos.Item.Item.Actions.Runs.Item; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.Actions.Runs +{ + /// + /// Builds and executes requests for operations under \repos\{owner-id}\{repo-id}\actions\runs + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class RunsRequestBuilder : BaseRequestBuilder + { + /// Gets an item from the Ayllu.Github.Client.repos.item.item.actions.runs.item collection + /// The unique identifier of the workflow run. + /// A + public global::Ayllu.Github.Client.Repos.Item.Item.Actions.Runs.Item.WithRun_ItemRequestBuilder this[int position] + { + get + { + var urlTplParams = new Dictionary(PathParameters); + urlTplParams.Add("run_id", position); + return new global::Ayllu.Github.Client.Repos.Item.Item.Actions.Runs.Item.WithRun_ItemRequestBuilder(urlTplParams, RequestAdapter); + } + } + /// Gets an item from the Ayllu.Github.Client.repos.item.item.actions.runs.item collection + /// The unique identifier of the workflow run. + /// A + [Obsolete("This indexer is deprecated and will be removed in the next major version. Use the one with the typed parameter instead.")] + public global::Ayllu.Github.Client.Repos.Item.Item.Actions.Runs.Item.WithRun_ItemRequestBuilder this[string position] + { + get + { + var urlTplParams = new Dictionary(PathParameters); + if (!string.IsNullOrWhiteSpace(position)) urlTplParams.Add("run_id", position); + return new global::Ayllu.Github.Client.Repos.Item.Item.Actions.Runs.Item.WithRun_ItemRequestBuilder(urlTplParams, RequestAdapter); + } + } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public RunsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(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) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public RunsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(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*}", rawUrl) + { + } + /// + /// 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/rest/guides/getting-started-with-the-rest-api#parameters).Anyone with read access to the repository can use this endpoint.OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint with a private repository.This endpoint will return up to 1,000 results for each search when using the following parameters: `actor`, `branch`, `check_suite_id`, `created`, `event`, `head_sha`, `status`. + /// API method documentation + /// + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsRunsGetResponseAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task GetAsRunsGetResponseAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Repos.Item.Item.Actions.Runs.RunsGetResponse.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false); + } + /// + /// 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/rest/guides/getting-started-with-the-rest-api#parameters).Anyone with read access to the repository can use this endpoint.OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint with a private repository.This endpoint will return up to 1,000 results for each search when using the following parameters: `actor`, `branch`, `check_suite_id`, `created`, `event`, `head_sha`, `status`. + /// API method documentation + /// + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + [Obsolete("This method is obsolete. Use GetAsRunsGetResponseAsync instead.")] +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Repos.Item.Item.Actions.Runs.RunsResponse.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false); + } + /// + /// 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/rest/guides/getting-started-with-the-rest-api#parameters).Anyone with read access to the repository can use this endpoint.OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint with a private repository.This endpoint will return up to 1,000 results for each search when using the following parameters: `actor`, `branch`, `check_suite_id`, `created`, `event`, `head_sha`, `status`. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.Repos.Item.Item.Actions.Runs.RunsRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Repos.Item.Item.Actions.Runs.RunsRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// 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/rest/guides/getting-started-with-the-rest-api#parameters).Anyone with read access to the repository can use this endpoint.OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint with a private repository.This endpoint will return up to 1,000 results for each search when using the following parameters: `actor`, `branch`, `check_suite_id`, `created`, `event`, `head_sha`, `status`. + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class RunsRequestBuilderGetQueryParameters + { + /// Returns someone's workflow runs. Use the login for the user who created the `push` associated with the check suite or workflow run. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("actor")] + public string? Actor { get; set; } +#nullable restore +#else + [QueryParameter("actor")] + public string Actor { get; set; } +#endif + /// Returns workflow runs associated with a branch. Use the name of the branch of the `push`. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("branch")] + public string? Branch { get; set; } +#nullable restore +#else + [QueryParameter("branch")] + public string Branch { get; set; } +#endif + /// Returns workflow runs with the `check_suite_id` that you specify. + [QueryParameter("check_suite_id")] + public int? CheckSuiteId { get; set; } + /// 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/search-github/getting-started-with-searching-on-github/understanding-the-search-syntax#query-for-dates)." + [QueryParameter("created")] + public DateTimeOffset? Created { get; set; } + /// 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/actions/automating-your-workflow-with-github-actions/events-that-trigger-workflows)." +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("event")] + public string? Event { get; set; } +#nullable restore +#else + [QueryParameter("event")] + public string Event { get; set; } +#endif + /// If `true` pull requests are omitted from the response (empty array). + [QueryParameter("exclude_pull_requests")] + public bool? ExcludePullRequests { get; set; } + /// Only returns workflow runs that are associated with the specified `head_sha`. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("head_sha")] + public string? HeadSha { get; set; } +#nullable restore +#else + [QueryParameter("head_sha")] + public string HeadSha { get; set; } +#endif + /// The page number of the results to fetch. For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." + [QueryParameter("page")] + public int? Page { get; set; } + /// The number of results per page (max 100). For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." + [QueryParameter("per_page")] + public int? PerPage { get; set; } + /// 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`. + [Obsolete("This property is deprecated, use StatusAsGetStatusQueryParameterType instead")] +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("status")] + public string? Status { get; set; } +#nullable restore +#else + [QueryParameter("status")] + public string Status { get; set; } +#endif + /// 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`. + [QueryParameter("status")] + public global::Ayllu.Github.Client.Repos.Item.Item.Actions.Runs.GetStatusQueryParameterType? StatusAsGetStatusQueryParameterType { get; set; } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class RunsRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Actions/Runs/RunsResponse.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Actions/Runs/RunsResponse.cs new file mode 100644 index 0000000..a0e3f05 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Actions/Runs/RunsResponse.cs @@ -0,0 +1,28 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.Actions.Runs +{ + [Obsolete("This class is obsolete. Use RunsGetResponse instead.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class RunsResponse : global::Ayllu.Github.Client.Repos.Item.Item.Actions.Runs.RunsGetResponse, IParsable + #pragma warning restore CS1591 + { + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static new global::Ayllu.Github.Client.Repos.Item.Item.Actions.Runs.RunsResponse CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Repos.Item.Item.Actions.Runs.RunsResponse(); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Actions/Secrets/Item/WithSecret_nameItemRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Actions/Secrets/Item/WithSecret_nameItemRequestBuilder.cs new file mode 100644 index 0000000..94df69a --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Actions/Secrets/Item/WithSecret_nameItemRequestBuilder.cs @@ -0,0 +1,188 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.Actions.Secrets.Item +{ + /// + /// Builds and executes requests for operations under \repos\{owner-id}\{repo-id}\actions\secrets\{secret_name} + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithSecret_nameItemRequestBuilder : BaseRequestBuilder + { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public WithSecret_nameItemRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/actions/secrets/{secret_name}", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public WithSecret_nameItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/actions/secrets/{secret_name}", rawUrl) + { + } + /// + /// 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 + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task DeleteAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task DeleteAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToDeleteRequestInformation(requestConfiguration); + await RequestAdapter.SendNoContentAsync(requestInfo, default, cancellationToken).ConfigureAwait(false); + } + /// + /// 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. + /// API method documentation + /// + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Models.ActionsSecret.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false); + } + /// + /// 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/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. + /// API method documentation + /// + /// A + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PutAsync(global::Ayllu.Github.Client.Repos.Item.Item.Actions.Secrets.Item.WithSecret_namePutRequestBody body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task PutAsync(global::Ayllu.Github.Client.Repos.Item.Item.Actions.Secrets.Item.WithSecret_namePutRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPutRequestInformation(body, requestConfiguration); + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Models.EmptyObject.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false); + } + /// + /// 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. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToDeleteRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToDeleteRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.DELETE, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + return requestInfo; + } + /// + /// 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. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// 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/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. + /// + /// A + /// The request body + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPutRequestInformation(global::Ayllu.Github.Client.Repos.Item.Item.Actions.Secrets.Item.WithSecret_namePutRequestBody body, Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToPutRequestInformation(global::Ayllu.Github.Client.Repos.Item.Item.Actions.Secrets.Item.WithSecret_namePutRequestBody body, Action> requestConfiguration = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation(Method.PUT, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.Repos.Item.Item.Actions.Secrets.Item.WithSecret_nameItemRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Repos.Item.Item.Actions.Secrets.Item.WithSecret_nameItemRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithSecret_nameItemRequestBuilderDeleteRequestConfiguration : RequestConfiguration + { + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithSecret_nameItemRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithSecret_nameItemRequestBuilderPutRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Actions/Secrets/Item/WithSecret_namePutRequestBody.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Actions/Secrets/Item/WithSecret_namePutRequestBody.cs new file mode 100644 index 0000000..7ab1228 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Actions/Secrets/Item/WithSecret_namePutRequestBody.cs @@ -0,0 +1,75 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.Actions.Secrets.Item +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class WithSecret_namePutRequestBody : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// 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/rest/actions/secrets#get-a-repository-public-key) endpoint. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? EncryptedValue { get; set; } +#nullable restore +#else + public string EncryptedValue { get; set; } +#endif + /// ID of the key you used to encrypt the secret. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? KeyId { get; set; } +#nullable restore +#else + public string KeyId { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public WithSecret_namePutRequestBody() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Repos.Item.Item.Actions.Secrets.Item.WithSecret_namePutRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Repos.Item.Item.Actions.Secrets.Item.WithSecret_namePutRequestBody(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "encrypted_value", n => { EncryptedValue = n.GetStringValue(); } }, + { "key_id", n => { KeyId = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("encrypted_value", EncryptedValue); + writer.WriteStringValue("key_id", KeyId); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Actions/Secrets/PublicKey/PublicKeyRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Actions/Secrets/PublicKey/PublicKeyRequestBuilder.cs new file mode 100644 index 0000000..98cc4dc --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Actions/Secrets/PublicKey/PublicKeyRequestBuilder.cs @@ -0,0 +1,93 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.Actions.Secrets.PublicKey +{ + /// + /// Builds and executes requests for operations under \repos\{owner-id}\{repo-id}\actions\secrets\public-key + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class PublicKeyRequestBuilder : BaseRequestBuilder + { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public PublicKeyRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/actions/secrets/public-key", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public PublicKeyRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/actions/secrets/public-key", rawUrl) + { + } + /// + /// 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. + /// API method documentation + /// + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Models.ActionsPublicKey.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false); + } + /// + /// 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. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.Repos.Item.Item.Actions.Secrets.PublicKey.PublicKeyRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Repos.Item.Item.Actions.Secrets.PublicKey.PublicKeyRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class PublicKeyRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Actions/Secrets/SecretsGetResponse.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Actions/Secrets/SecretsGetResponse.cs new file mode 100644 index 0000000..81893bb --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Actions/Secrets/SecretsGetResponse.cs @@ -0,0 +1,70 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.Actions.Secrets +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class SecretsGetResponse : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The secrets property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? Secrets { get; set; } +#nullable restore +#else + public List Secrets { get; set; } +#endif + /// The total_count property + public int? TotalCount { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public SecretsGetResponse() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Repos.Item.Item.Actions.Secrets.SecretsGetResponse CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Repos.Item.Item.Actions.Secrets.SecretsGetResponse(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "secrets", n => { Secrets = n.GetCollectionOfObjectValues(global::Ayllu.Github.Client.Models.ActionsSecret.CreateFromDiscriminatorValue)?.AsList(); } }, + { "total_count", n => { TotalCount = n.GetIntValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteCollectionOfObjectValues("secrets", Secrets); + writer.WriteIntValue("total_count", TotalCount); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Actions/Secrets/SecretsRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Actions/Secrets/SecretsRequestBuilder.cs new file mode 100644 index 0000000..8590198 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Actions/Secrets/SecretsRequestBuilder.cs @@ -0,0 +1,144 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Repos.Item.Item.Actions.Secrets.Item; +using Ayllu.Github.Client.Repos.Item.Item.Actions.Secrets.PublicKey; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.Actions.Secrets +{ + /// + /// Builds and executes requests for operations under \repos\{owner-id}\{repo-id}\actions\secrets + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class SecretsRequestBuilder : BaseRequestBuilder + { + /// The publicKey property + public global::Ayllu.Github.Client.Repos.Item.Item.Actions.Secrets.PublicKey.PublicKeyRequestBuilder PublicKey + { + get => new global::Ayllu.Github.Client.Repos.Item.Item.Actions.Secrets.PublicKey.PublicKeyRequestBuilder(PathParameters, RequestAdapter); + } + /// Gets an item from the Ayllu.Github.Client.repos.item.item.actions.secrets.item collection + /// The name of the secret. + /// A + public global::Ayllu.Github.Client.Repos.Item.Item.Actions.Secrets.Item.WithSecret_nameItemRequestBuilder this[string position] + { + get + { + var urlTplParams = new Dictionary(PathParameters); + urlTplParams.Add("secret_name", position); + return new global::Ayllu.Github.Client.Repos.Item.Item.Actions.Secrets.Item.WithSecret_nameItemRequestBuilder(urlTplParams, RequestAdapter); + } + } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public SecretsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/actions/secrets{?page*,per_page*}", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public SecretsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/actions/secrets{?page*,per_page*}", rawUrl) + { + } + /// + /// 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. + /// API method documentation + /// + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsSecretsGetResponseAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task GetAsSecretsGetResponseAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Repos.Item.Item.Actions.Secrets.SecretsGetResponse.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false); + } + /// + /// 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. + /// API method documentation + /// + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + [Obsolete("This method is obsolete. Use GetAsSecretsGetResponseAsync instead.")] +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Repos.Item.Item.Actions.Secrets.SecretsResponse.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false); + } + /// + /// 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. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.Repos.Item.Item.Actions.Secrets.SecretsRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Repos.Item.Item.Actions.Secrets.SecretsRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// 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. + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class SecretsRequestBuilderGetQueryParameters + { + /// The page number of the results to fetch. For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." + [QueryParameter("page")] + public int? Page { get; set; } + /// The number of results per page (max 100). For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." + [QueryParameter("per_page")] + public int? PerPage { get; set; } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class SecretsRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Actions/Secrets/SecretsResponse.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Actions/Secrets/SecretsResponse.cs new file mode 100644 index 0000000..d905daf --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Actions/Secrets/SecretsResponse.cs @@ -0,0 +1,28 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.Actions.Secrets +{ + [Obsolete("This class is obsolete. Use SecretsGetResponse instead.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class SecretsResponse : global::Ayllu.Github.Client.Repos.Item.Item.Actions.Secrets.SecretsGetResponse, IParsable + #pragma warning restore CS1591 + { + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static new global::Ayllu.Github.Client.Repos.Item.Item.Actions.Secrets.SecretsResponse CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Repos.Item.Item.Actions.Secrets.SecretsResponse(); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Actions/Variables/Item/WithNameItemRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Actions/Variables/Item/WithNameItemRequestBuilder.cs new file mode 100644 index 0000000..5e1f6fb --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Actions/Variables/Item/WithNameItemRequestBuilder.cs @@ -0,0 +1,186 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.Actions.Variables.Item +{ + /// + /// Builds and executes requests for operations under \repos\{owner-id}\{repo-id}\actions\variables\{name} + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithNameItemRequestBuilder : BaseRequestBuilder + { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public WithNameItemRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/actions/variables/{name}", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public WithNameItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/actions/variables/{name}", rawUrl) + { + } + /// + /// 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 + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task DeleteAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task DeleteAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToDeleteRequestInformation(requestConfiguration); + await RequestAdapter.SendNoContentAsync(requestInfo, default, cancellationToken).ConfigureAwait(false); + } + /// + /// 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. + /// API method documentation + /// + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Models.ActionsVariable.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false); + } + /// + /// 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 + /// + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PatchAsync(global::Ayllu.Github.Client.Repos.Item.Item.Actions.Variables.Item.WithNamePatchRequestBody body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task PatchAsync(global::Ayllu.Github.Client.Repos.Item.Item.Actions.Variables.Item.WithNamePatchRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPatchRequestInformation(body, requestConfiguration); + await RequestAdapter.SendNoContentAsync(requestInfo, default, cancellationToken).ConfigureAwait(false); + } + /// + /// 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. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToDeleteRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToDeleteRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.DELETE, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + return requestInfo; + } + /// + /// 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. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// 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. + /// + /// A + /// The request body + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPatchRequestInformation(global::Ayllu.Github.Client.Repos.Item.Item.Actions.Variables.Item.WithNamePatchRequestBody body, Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToPatchRequestInformation(global::Ayllu.Github.Client.Repos.Item.Item.Actions.Variables.Item.WithNamePatchRequestBody body, Action> requestConfiguration = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.Repos.Item.Item.Actions.Variables.Item.WithNameItemRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Repos.Item.Item.Actions.Variables.Item.WithNameItemRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithNameItemRequestBuilderDeleteRequestConfiguration : RequestConfiguration + { + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithNameItemRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithNameItemRequestBuilderPatchRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Actions/Variables/Item/WithNamePatchRequestBody.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Actions/Variables/Item/WithNamePatchRequestBody.cs new file mode 100644 index 0000000..ece6f1e --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Actions/Variables/Item/WithNamePatchRequestBody.cs @@ -0,0 +1,75 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.Actions.Variables.Item +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class WithNamePatchRequestBody : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The name of the variable. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Name { get; set; } +#nullable restore +#else + public string Name { get; set; } +#endif + /// The value of the variable. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Value { get; set; } +#nullable restore +#else + public string Value { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public WithNamePatchRequestBody() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Repos.Item.Item.Actions.Variables.Item.WithNamePatchRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Repos.Item.Item.Actions.Variables.Item.WithNamePatchRequestBody(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "name", n => { Name = n.GetStringValue(); } }, + { "value", n => { Value = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("name", Name); + writer.WriteStringValue("value", Value); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Actions/Variables/VariablesGetResponse.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Actions/Variables/VariablesGetResponse.cs new file mode 100644 index 0000000..a8ae35c --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Actions/Variables/VariablesGetResponse.cs @@ -0,0 +1,70 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.Actions.Variables +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class VariablesGetResponse : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The total_count property + public int? TotalCount { get; set; } + /// The variables property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? Variables { get; set; } +#nullable restore +#else + public List Variables { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public VariablesGetResponse() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Repos.Item.Item.Actions.Variables.VariablesGetResponse CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Repos.Item.Item.Actions.Variables.VariablesGetResponse(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "total_count", n => { TotalCount = n.GetIntValue(); } }, + { "variables", n => { Variables = n.GetCollectionOfObjectValues(global::Ayllu.Github.Client.Models.ActionsVariable.CreateFromDiscriminatorValue)?.AsList(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteIntValue("total_count", TotalCount); + writer.WriteCollectionOfObjectValues("variables", Variables); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Actions/Variables/VariablesPostRequestBody.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Actions/Variables/VariablesPostRequestBody.cs new file mode 100644 index 0000000..14c5dc4 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Actions/Variables/VariablesPostRequestBody.cs @@ -0,0 +1,75 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.Actions.Variables +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class VariablesPostRequestBody : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The name of the variable. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Name { get; set; } +#nullable restore +#else + public string Name { get; set; } +#endif + /// The value of the variable. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Value { get; set; } +#nullable restore +#else + public string Value { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public VariablesPostRequestBody() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Repos.Item.Item.Actions.Variables.VariablesPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Repos.Item.Item.Actions.Variables.VariablesPostRequestBody(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "name", n => { Name = n.GetStringValue(); } }, + { "value", n => { Value = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("name", Name); + writer.WriteStringValue("value", Value); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Actions/Variables/VariablesRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Actions/Variables/VariablesRequestBuilder.cs new file mode 100644 index 0000000..952ac3b --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Actions/Variables/VariablesRequestBuilder.cs @@ -0,0 +1,190 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Ayllu.Github.Client.Repos.Item.Item.Actions.Variables.Item; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.Actions.Variables +{ + /// + /// Builds and executes requests for operations under \repos\{owner-id}\{repo-id}\actions\variables + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class VariablesRequestBuilder : BaseRequestBuilder + { + /// Gets an item from the Ayllu.Github.Client.repos.item.item.actions.variables.item collection + /// The name of the variable. + /// A + public global::Ayllu.Github.Client.Repos.Item.Item.Actions.Variables.Item.WithNameItemRequestBuilder this[string position] + { + get + { + var urlTplParams = new Dictionary(PathParameters); + urlTplParams.Add("name", position); + return new global::Ayllu.Github.Client.Repos.Item.Item.Actions.Variables.Item.WithNameItemRequestBuilder(urlTplParams, RequestAdapter); + } + } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public VariablesRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/actions/variables{?page*,per_page*}", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public VariablesRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/actions/variables{?page*,per_page*}", rawUrl) + { + } + /// + /// 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. + /// API method documentation + /// + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsVariablesGetResponseAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task GetAsVariablesGetResponseAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Repos.Item.Item.Actions.Variables.VariablesGetResponse.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false); + } + /// + /// 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. + /// API method documentation + /// + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + [Obsolete("This method is obsolete. Use GetAsVariablesGetResponseAsync instead.")] +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Repos.Item.Item.Actions.Variables.VariablesResponse.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false); + } + /// + /// 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. + /// API method documentation + /// + /// A + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PostAsync(global::Ayllu.Github.Client.Repos.Item.Item.Actions.Variables.VariablesPostRequestBody body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task PostAsync(global::Ayllu.Github.Client.Repos.Item.Item.Actions.Variables.VariablesPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPostRequestInformation(body, requestConfiguration); + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Models.EmptyObject.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false); + } + /// + /// 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. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// 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. + /// + /// A + /// The request body + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPostRequestInformation(global::Ayllu.Github.Client.Repos.Item.Item.Actions.Variables.VariablesPostRequestBody body, Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToPostRequestInformation(global::Ayllu.Github.Client.Repos.Item.Item.Actions.Variables.VariablesPostRequestBody body, Action> requestConfiguration = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.Repos.Item.Item.Actions.Variables.VariablesRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Repos.Item.Item.Actions.Variables.VariablesRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// 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. + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class VariablesRequestBuilderGetQueryParameters + { + /// The page number of the results to fetch. For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." + [QueryParameter("page")] + public int? Page { get; set; } + /// The number of results per page (max 30). For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." + [QueryParameter("per_page")] + public int? PerPage { get; set; } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class VariablesRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class VariablesRequestBuilderPostRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Actions/Variables/VariablesResponse.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Actions/Variables/VariablesResponse.cs new file mode 100644 index 0000000..053edf2 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Actions/Variables/VariablesResponse.cs @@ -0,0 +1,28 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.Actions.Variables +{ + [Obsolete("This class is obsolete. Use VariablesGetResponse instead.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class VariablesResponse : global::Ayllu.Github.Client.Repos.Item.Item.Actions.Variables.VariablesGetResponse, IParsable + #pragma warning restore CS1591 + { + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static new global::Ayllu.Github.Client.Repos.Item.Item.Actions.Variables.VariablesResponse CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Repos.Item.Item.Actions.Variables.VariablesResponse(); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Actions/Workflows/Item/Disable/DisableRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Actions/Workflows/Item/Disable/DisableRequestBuilder.cs new file mode 100644 index 0000000..6c7c835 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Actions/Workflows/Item/Disable/DisableRequestBuilder.cs @@ -0,0 +1,90 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.Actions.Workflows.Item.Disable +{ + /// + /// Builds and executes requests for operations under \repos\{owner-id}\{repo-id}\actions\workflows\{workflow_id}\disable + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class DisableRequestBuilder : BaseRequestBuilder + { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public DisableRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/actions/workflows/{workflow_id}/disable", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public DisableRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/actions/workflows/{workflow_id}/disable", rawUrl) + { + } + /// + /// 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 + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PutAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task PutAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToPutRequestInformation(requestConfiguration); + await RequestAdapter.SendNoContentAsync(requestInfo, default, cancellationToken).ConfigureAwait(false); + } + /// + /// 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. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPutRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToPutRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.PUT, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.Repos.Item.Item.Actions.Workflows.Item.Disable.DisableRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Repos.Item.Item.Actions.Workflows.Item.Disable.DisableRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class DisableRequestBuilderPutRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Actions/Workflows/Item/Dispatches/DispatchesPostRequestBody.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Actions/Workflows/Item/Dispatches/DispatchesPostRequestBody.cs new file mode 100644 index 0000000..a07569c --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Actions/Workflows/Item/Dispatches/DispatchesPostRequestBody.cs @@ -0,0 +1,75 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.Actions.Workflows.Item.Dispatches +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class DispatchesPostRequestBody : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// 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. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Repos.Item.Item.Actions.Workflows.Item.Dispatches.DispatchesPostRequestBody_inputs? Inputs { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Repos.Item.Item.Actions.Workflows.Item.Dispatches.DispatchesPostRequestBody_inputs Inputs { get; set; } +#endif + /// The git reference for the workflow. The reference can be a branch or tag name. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Ref { get; set; } +#nullable restore +#else + public string Ref { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public DispatchesPostRequestBody() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Repos.Item.Item.Actions.Workflows.Item.Dispatches.DispatchesPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Repos.Item.Item.Actions.Workflows.Item.Dispatches.DispatchesPostRequestBody(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "inputs", n => { Inputs = n.GetObjectValue(global::Ayllu.Github.Client.Repos.Item.Item.Actions.Workflows.Item.Dispatches.DispatchesPostRequestBody_inputs.CreateFromDiscriminatorValue); } }, + { "ref", n => { Ref = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteObjectValue("inputs", Inputs); + writer.WriteStringValue("ref", Ref); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Actions/Workflows/Item/Dispatches/DispatchesPostRequestBody_inputs.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Actions/Workflows/Item/Dispatches/DispatchesPostRequestBody_inputs.cs new file mode 100644 index 0000000..edcf808 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Actions/Workflows/Item/Dispatches/DispatchesPostRequestBody_inputs.cs @@ -0,0 +1,56 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.Actions.Workflows.Item.Dispatches +{ + /// + /// 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. + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class DispatchesPostRequestBody_inputs : IAdditionalDataHolder, IParsable + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public DispatchesPostRequestBody_inputs() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Repos.Item.Item.Actions.Workflows.Item.Dispatches.DispatchesPostRequestBody_inputs CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Repos.Item.Item.Actions.Workflows.Item.Dispatches.DispatchesPostRequestBody_inputs(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Actions/Workflows/Item/Dispatches/DispatchesRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Actions/Workflows/Item/Dispatches/DispatchesRequestBuilder.cs new file mode 100644 index 0000000..4e60584 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Actions/Workflows/Item/Dispatches/DispatchesRequestBuilder.cs @@ -0,0 +1,95 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.Actions.Workflows.Item.Dispatches +{ + /// + /// Builds and executes requests for operations under \repos\{owner-id}\{repo-id}\actions\workflows\{workflow_id}\dispatches + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class DispatchesRequestBuilder : BaseRequestBuilder + { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public DispatchesRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/actions/workflows/{workflow_id}/dispatches", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public DispatchesRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/actions/workflows/{workflow_id}/dispatches", rawUrl) + { + } + /// + /// 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 + /// + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PostAsync(global::Ayllu.Github.Client.Repos.Item.Item.Actions.Workflows.Item.Dispatches.DispatchesPostRequestBody body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task PostAsync(global::Ayllu.Github.Client.Repos.Item.Item.Actions.Workflows.Item.Dispatches.DispatchesPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPostRequestInformation(body, requestConfiguration); + await RequestAdapter.SendNoContentAsync(requestInfo, default, cancellationToken).ConfigureAwait(false); + } + /// + /// 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. + /// + /// A + /// The request body + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPostRequestInformation(global::Ayllu.Github.Client.Repos.Item.Item.Actions.Workflows.Item.Dispatches.DispatchesPostRequestBody body, Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToPostRequestInformation(global::Ayllu.Github.Client.Repos.Item.Item.Actions.Workflows.Item.Dispatches.DispatchesPostRequestBody body, Action> requestConfiguration = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.Repos.Item.Item.Actions.Workflows.Item.Dispatches.DispatchesRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Repos.Item.Item.Actions.Workflows.Item.Dispatches.DispatchesRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class DispatchesRequestBuilderPostRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Actions/Workflows/Item/Enable/EnableRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Actions/Workflows/Item/Enable/EnableRequestBuilder.cs new file mode 100644 index 0000000..5add3a5 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Actions/Workflows/Item/Enable/EnableRequestBuilder.cs @@ -0,0 +1,90 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.Actions.Workflows.Item.Enable +{ + /// + /// Builds and executes requests for operations under \repos\{owner-id}\{repo-id}\actions\workflows\{workflow_id}\enable + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class EnableRequestBuilder : BaseRequestBuilder + { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public EnableRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/actions/workflows/{workflow_id}/enable", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public EnableRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/actions/workflows/{workflow_id}/enable", rawUrl) + { + } + /// + /// 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 + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PutAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task PutAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToPutRequestInformation(requestConfiguration); + await RequestAdapter.SendNoContentAsync(requestInfo, default, cancellationToken).ConfigureAwait(false); + } + /// + /// 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. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPutRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToPutRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.PUT, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.Repos.Item.Item.Actions.Workflows.Item.Enable.EnableRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Repos.Item.Item.Actions.Workflows.Item.Enable.EnableRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class EnableRequestBuilderPutRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Actions/Workflows/Item/Runs/GetStatusQueryParameterType.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Actions/Workflows/Item/Runs/GetStatusQueryParameterType.cs new file mode 100644 index 0000000..050c1d5 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Actions/Workflows/Item/Runs/GetStatusQueryParameterType.cs @@ -0,0 +1,68 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.Actions.Workflows.Item.Runs +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public enum GetStatusQueryParameterType + #pragma warning restore CS1591 + { + [EnumMember(Value = "completed")] + #pragma warning disable CS1591 + Completed, + #pragma warning restore CS1591 + [EnumMember(Value = "action_required")] + #pragma warning disable CS1591 + Action_required, + #pragma warning restore CS1591 + [EnumMember(Value = "cancelled")] + #pragma warning disable CS1591 + Cancelled, + #pragma warning restore CS1591 + [EnumMember(Value = "failure")] + #pragma warning disable CS1591 + Failure, + #pragma warning restore CS1591 + [EnumMember(Value = "neutral")] + #pragma warning disable CS1591 + Neutral, + #pragma warning restore CS1591 + [EnumMember(Value = "skipped")] + #pragma warning disable CS1591 + Skipped, + #pragma warning restore CS1591 + [EnumMember(Value = "stale")] + #pragma warning disable CS1591 + Stale, + #pragma warning restore CS1591 + [EnumMember(Value = "success")] + #pragma warning disable CS1591 + Success, + #pragma warning restore CS1591 + [EnumMember(Value = "timed_out")] + #pragma warning disable CS1591 + Timed_out, + #pragma warning restore CS1591 + [EnumMember(Value = "in_progress")] + #pragma warning disable CS1591 + In_progress, + #pragma warning restore CS1591 + [EnumMember(Value = "queued")] + #pragma warning disable CS1591 + Queued, + #pragma warning restore CS1591 + [EnumMember(Value = "requested")] + #pragma warning disable CS1591 + Requested, + #pragma warning restore CS1591 + [EnumMember(Value = "waiting")] + #pragma warning disable CS1591 + Waiting, + #pragma warning restore CS1591 + [EnumMember(Value = "pending")] + #pragma warning disable CS1591 + Pending, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Actions/Workflows/Item/Runs/RunsGetResponse.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Actions/Workflows/Item/Runs/RunsGetResponse.cs new file mode 100644 index 0000000..fe7bbcf --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Actions/Workflows/Item/Runs/RunsGetResponse.cs @@ -0,0 +1,70 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.Actions.Workflows.Item.Runs +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class RunsGetResponse : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The total_count property + public int? TotalCount { get; set; } + /// The workflow_runs property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? WorkflowRuns { get; set; } +#nullable restore +#else + public List WorkflowRuns { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public RunsGetResponse() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Repos.Item.Item.Actions.Workflows.Item.Runs.RunsGetResponse CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Repos.Item.Item.Actions.Workflows.Item.Runs.RunsGetResponse(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "total_count", n => { TotalCount = n.GetIntValue(); } }, + { "workflow_runs", n => { WorkflowRuns = n.GetCollectionOfObjectValues(global::Ayllu.Github.Client.Models.WorkflowRun.CreateFromDiscriminatorValue)?.AsList(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteIntValue("total_count", TotalCount); + writer.WriteCollectionOfObjectValues("workflow_runs", WorkflowRuns); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Actions/Workflows/Item/Runs/RunsRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Actions/Workflows/Item/Runs/RunsRequestBuilder.cs new file mode 100644 index 0000000..eff55b6 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Actions/Workflows/Item/Runs/RunsRequestBuilder.cs @@ -0,0 +1,188 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.Actions.Workflows.Item.Runs +{ + /// + /// Builds and executes requests for operations under \repos\{owner-id}\{repo-id}\actions\workflows\{workflow_id}\runs + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class RunsRequestBuilder : BaseRequestBuilder + { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public RunsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(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) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public RunsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(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*}", rawUrl) + { + } + /// + /// 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/rest/guides/getting-started-with-the-rest-api#parameters).Anyone with read access to the repository can use this endpointOAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint with a private repository.This endpoint will return up to 1,000 results for each search when using the following parameters: `actor`, `branch`, `check_suite_id`, `created`, `event`, `head_sha`, `status`. + /// API method documentation + /// + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsRunsGetResponseAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task GetAsRunsGetResponseAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Repos.Item.Item.Actions.Workflows.Item.Runs.RunsGetResponse.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false); + } + /// + /// 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/rest/guides/getting-started-with-the-rest-api#parameters).Anyone with read access to the repository can use this endpointOAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint with a private repository.This endpoint will return up to 1,000 results for each search when using the following parameters: `actor`, `branch`, `check_suite_id`, `created`, `event`, `head_sha`, `status`. + /// API method documentation + /// + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + [Obsolete("This method is obsolete. Use GetAsRunsGetResponseAsync instead.")] +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Repos.Item.Item.Actions.Workflows.Item.Runs.RunsResponse.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false); + } + /// + /// 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/rest/guides/getting-started-with-the-rest-api#parameters).Anyone with read access to the repository can use this endpointOAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint with a private repository.This endpoint will return up to 1,000 results for each search when using the following parameters: `actor`, `branch`, `check_suite_id`, `created`, `event`, `head_sha`, `status`. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.Repos.Item.Item.Actions.Workflows.Item.Runs.RunsRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Repos.Item.Item.Actions.Workflows.Item.Runs.RunsRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// 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/rest/guides/getting-started-with-the-rest-api#parameters).Anyone with read access to the repository can use this endpointOAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint with a private repository.This endpoint will return up to 1,000 results for each search when using the following parameters: `actor`, `branch`, `check_suite_id`, `created`, `event`, `head_sha`, `status`. + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class RunsRequestBuilderGetQueryParameters + { + /// Returns someone's workflow runs. Use the login for the user who created the `push` associated with the check suite or workflow run. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("actor")] + public string? Actor { get; set; } +#nullable restore +#else + [QueryParameter("actor")] + public string Actor { get; set; } +#endif + /// Returns workflow runs associated with a branch. Use the name of the branch of the `push`. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("branch")] + public string? Branch { get; set; } +#nullable restore +#else + [QueryParameter("branch")] + public string Branch { get; set; } +#endif + /// Returns workflow runs with the `check_suite_id` that you specify. + [QueryParameter("check_suite_id")] + public int? CheckSuiteId { get; set; } + /// 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/search-github/getting-started-with-searching-on-github/understanding-the-search-syntax#query-for-dates)." + [QueryParameter("created")] + public DateTimeOffset? Created { get; set; } + /// 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/actions/automating-your-workflow-with-github-actions/events-that-trigger-workflows)." +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("event")] + public string? Event { get; set; } +#nullable restore +#else + [QueryParameter("event")] + public string Event { get; set; } +#endif + /// If `true` pull requests are omitted from the response (empty array). + [QueryParameter("exclude_pull_requests")] + public bool? ExcludePullRequests { get; set; } + /// Only returns workflow runs that are associated with the specified `head_sha`. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("head_sha")] + public string? HeadSha { get; set; } +#nullable restore +#else + [QueryParameter("head_sha")] + public string HeadSha { get; set; } +#endif + /// The page number of the results to fetch. For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." + [QueryParameter("page")] + public int? Page { get; set; } + /// The number of results per page (max 100). For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." + [QueryParameter("per_page")] + public int? PerPage { get; set; } + /// 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`. + [Obsolete("This property is deprecated, use StatusAsGetStatusQueryParameterType instead")] +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("status")] + public string? Status { get; set; } +#nullable restore +#else + [QueryParameter("status")] + public string Status { get; set; } +#endif + /// 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`. + [QueryParameter("status")] + public global::Ayllu.Github.Client.Repos.Item.Item.Actions.Workflows.Item.Runs.GetStatusQueryParameterType? StatusAsGetStatusQueryParameterType { get; set; } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class RunsRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Actions/Workflows/Item/Runs/RunsResponse.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Actions/Workflows/Item/Runs/RunsResponse.cs new file mode 100644 index 0000000..72a0fc7 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Actions/Workflows/Item/Runs/RunsResponse.cs @@ -0,0 +1,28 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.Actions.Workflows.Item.Runs +{ + [Obsolete("This class is obsolete. Use RunsGetResponse instead.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class RunsResponse : global::Ayllu.Github.Client.Repos.Item.Item.Actions.Workflows.Item.Runs.RunsGetResponse, IParsable + #pragma warning restore CS1591 + { + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static new global::Ayllu.Github.Client.Repos.Item.Item.Actions.Workflows.Item.Runs.RunsResponse CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Repos.Item.Item.Actions.Workflows.Item.Runs.RunsResponse(); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Actions/Workflows/Item/Timing/TimingRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Actions/Workflows/Item/Timing/TimingRequestBuilder.cs new file mode 100644 index 0000000..c67f4e5 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Actions/Workflows/Item/Timing/TimingRequestBuilder.cs @@ -0,0 +1,93 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.Actions.Workflows.Item.Timing +{ + /// + /// Builds and executes requests for operations under \repos\{owner-id}\{repo-id}\actions\workflows\{workflow_id}\timing + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class TimingRequestBuilder : BaseRequestBuilder + { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public TimingRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/actions/workflows/{workflow_id}/timing", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public TimingRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/actions/workflows/{workflow_id}/timing", rawUrl) + { + } + /// + /// > [!WARNING] > This endpoint is in the process of closing down. Refer to "[Actions Get workflow usage and Get workflow run usage endpoints closing down](https://github.blog/changelog/2025-02-02-actions-get-workflow-usage-and-get-workflow-run-usage-endpoints-closing-down/)" for more information.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-hosted runners. Usage is listed for each GitHub-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/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. + /// API method documentation + /// + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Models.WorkflowUsage.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false); + } + /// + /// > [!WARNING] > This endpoint is in the process of closing down. Refer to "[Actions Get workflow usage and Get workflow run usage endpoints closing down](https://github.blog/changelog/2025-02-02-actions-get-workflow-usage-and-get-workflow-run-usage-endpoints-closing-down/)" for more information.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-hosted runners. Usage is listed for each GitHub-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/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. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.Repos.Item.Item.Actions.Workflows.Item.Timing.TimingRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Repos.Item.Item.Actions.Workflows.Item.Timing.TimingRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class TimingRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Actions/Workflows/Item/WithWorkflow_ItemRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Actions/Workflows/Item/WithWorkflow_ItemRequestBuilder.cs new file mode 100644 index 0000000..8815ba6 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Actions/Workflows/Item/WithWorkflow_ItemRequestBuilder.cs @@ -0,0 +1,123 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Ayllu.Github.Client.Repos.Item.Item.Actions.Workflows.Item.Disable; +using Ayllu.Github.Client.Repos.Item.Item.Actions.Workflows.Item.Dispatches; +using Ayllu.Github.Client.Repos.Item.Item.Actions.Workflows.Item.Enable; +using Ayllu.Github.Client.Repos.Item.Item.Actions.Workflows.Item.Runs; +using Ayllu.Github.Client.Repos.Item.Item.Actions.Workflows.Item.Timing; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.Actions.Workflows.Item +{ + /// + /// Builds and executes requests for operations under \repos\{owner-id}\{repo-id}\actions\workflows\{workflow_id} + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithWorkflow_ItemRequestBuilder : BaseRequestBuilder + { + /// The disable property + public global::Ayllu.Github.Client.Repos.Item.Item.Actions.Workflows.Item.Disable.DisableRequestBuilder Disable + { + get => new global::Ayllu.Github.Client.Repos.Item.Item.Actions.Workflows.Item.Disable.DisableRequestBuilder(PathParameters, RequestAdapter); + } + /// The dispatches property + public global::Ayllu.Github.Client.Repos.Item.Item.Actions.Workflows.Item.Dispatches.DispatchesRequestBuilder Dispatches + { + get => new global::Ayllu.Github.Client.Repos.Item.Item.Actions.Workflows.Item.Dispatches.DispatchesRequestBuilder(PathParameters, RequestAdapter); + } + /// The enable property + public global::Ayllu.Github.Client.Repos.Item.Item.Actions.Workflows.Item.Enable.EnableRequestBuilder Enable + { + get => new global::Ayllu.Github.Client.Repos.Item.Item.Actions.Workflows.Item.Enable.EnableRequestBuilder(PathParameters, RequestAdapter); + } + /// The runs property + public global::Ayllu.Github.Client.Repos.Item.Item.Actions.Workflows.Item.Runs.RunsRequestBuilder Runs + { + get => new global::Ayllu.Github.Client.Repos.Item.Item.Actions.Workflows.Item.Runs.RunsRequestBuilder(PathParameters, RequestAdapter); + } + /// The timing property + public global::Ayllu.Github.Client.Repos.Item.Item.Actions.Workflows.Item.Timing.TimingRequestBuilder Timing + { + get => new global::Ayllu.Github.Client.Repos.Item.Item.Actions.Workflows.Item.Timing.TimingRequestBuilder(PathParameters, RequestAdapter); + } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public WithWorkflow_ItemRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/actions/workflows/{workflow_id}", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public WithWorkflow_ItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/actions/workflows/{workflow_id}", rawUrl) + { + } + /// + /// 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. + /// API method documentation + /// + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Models.Workflow.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false); + } + /// + /// 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. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.Repos.Item.Item.Actions.Workflows.Item.WithWorkflow_ItemRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Repos.Item.Item.Actions.Workflows.Item.WithWorkflow_ItemRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithWorkflow_ItemRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Actions/Workflows/WorkflowsGetResponse.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Actions/Workflows/WorkflowsGetResponse.cs new file mode 100644 index 0000000..c7d31ae --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Actions/Workflows/WorkflowsGetResponse.cs @@ -0,0 +1,70 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.Actions.Workflows +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class WorkflowsGetResponse : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The total_count property + public int? TotalCount { get; set; } + /// The workflows property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? Workflows { get; set; } +#nullable restore +#else + public List Workflows { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public WorkflowsGetResponse() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Repos.Item.Item.Actions.Workflows.WorkflowsGetResponse CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Repos.Item.Item.Actions.Workflows.WorkflowsGetResponse(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "total_count", n => { TotalCount = n.GetIntValue(); } }, + { "workflows", n => { Workflows = n.GetCollectionOfObjectValues(global::Ayllu.Github.Client.Models.Workflow.CreateFromDiscriminatorValue)?.AsList(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteIntValue("total_count", TotalCount); + writer.WriteCollectionOfObjectValues("workflows", Workflows); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Actions/Workflows/WorkflowsRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Actions/Workflows/WorkflowsRequestBuilder.cs new file mode 100644 index 0000000..6b20dcb --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Actions/Workflows/WorkflowsRequestBuilder.cs @@ -0,0 +1,151 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Repos.Item.Item.Actions.Workflows.Item; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.Actions.Workflows +{ + /// + /// Builds and executes requests for operations under \repos\{owner-id}\{repo-id}\actions\workflows + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WorkflowsRequestBuilder : BaseRequestBuilder + { + /// Gets an item from the Ayllu.Github.Client.repos.item.item.actions.workflows.item collection + /// The ID of the workflow. You can also pass the workflow file name as a string. + /// A + public global::Ayllu.Github.Client.Repos.Item.Item.Actions.Workflows.Item.WithWorkflow_ItemRequestBuilder this[int position] + { + get + { + var urlTplParams = new Dictionary(PathParameters); + urlTplParams.Add("workflow_id", position); + return new global::Ayllu.Github.Client.Repos.Item.Item.Actions.Workflows.Item.WithWorkflow_ItemRequestBuilder(urlTplParams, RequestAdapter); + } + } + /// Gets an item from the Ayllu.Github.Client.repos.item.item.actions.workflows.item collection + /// The ID of the workflow. You can also pass the workflow file name as a string. + /// A + [Obsolete("This indexer is deprecated and will be removed in the next major version. Use the one with the typed parameter instead.")] + public global::Ayllu.Github.Client.Repos.Item.Item.Actions.Workflows.Item.WithWorkflow_ItemRequestBuilder this[string position] + { + get + { + var urlTplParams = new Dictionary(PathParameters); + if (!string.IsNullOrWhiteSpace(position)) urlTplParams.Add("workflow_id", position); + return new global::Ayllu.Github.Client.Repos.Item.Item.Actions.Workflows.Item.WithWorkflow_ItemRequestBuilder(urlTplParams, RequestAdapter); + } + } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public WorkflowsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/actions/workflows{?page*,per_page*}", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public WorkflowsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/actions/workflows{?page*,per_page*}", rawUrl) + { + } + /// + /// 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. + /// API method documentation + /// + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsWorkflowsGetResponseAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task GetAsWorkflowsGetResponseAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Repos.Item.Item.Actions.Workflows.WorkflowsGetResponse.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false); + } + /// + /// 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. + /// API method documentation + /// + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + [Obsolete("This method is obsolete. Use GetAsWorkflowsGetResponseAsync instead.")] +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Repos.Item.Item.Actions.Workflows.WorkflowsResponse.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false); + } + /// + /// 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. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.Repos.Item.Item.Actions.Workflows.WorkflowsRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Repos.Item.Item.Actions.Workflows.WorkflowsRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// 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. + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WorkflowsRequestBuilderGetQueryParameters + { + /// The page number of the results to fetch. For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." + [QueryParameter("page")] + public int? Page { get; set; } + /// The number of results per page (max 100). For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." + [QueryParameter("per_page")] + public int? PerPage { get; set; } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WorkflowsRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Actions/Workflows/WorkflowsResponse.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Actions/Workflows/WorkflowsResponse.cs new file mode 100644 index 0000000..da752f3 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Actions/Workflows/WorkflowsResponse.cs @@ -0,0 +1,28 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.Actions.Workflows +{ + [Obsolete("This class is obsolete. Use WorkflowsGetResponse instead.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class WorkflowsResponse : global::Ayllu.Github.Client.Repos.Item.Item.Actions.Workflows.WorkflowsGetResponse, IParsable + #pragma warning restore CS1591 + { + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static new global::Ayllu.Github.Client.Repos.Item.Item.Actions.Workflows.WorkflowsResponse CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Repos.Item.Item.Actions.Workflows.WorkflowsResponse(); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Activity/ActivityRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Activity/ActivityRequestBuilder.cs new file mode 100644 index 0000000..815b9ab --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Activity/ActivityRequestBuilder.cs @@ -0,0 +1,191 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.Activity +{ + /// + /// Builds and executes requests for operations under \repos\{owner-id}\{repo-id}\activity + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class ActivityRequestBuilder : BaseRequestBuilder + { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public ActivityRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/activity{?activity_type*,actor*,after*,before*,direction*,per_page*,ref*,time_period*}", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public ActivityRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/activity{?activity_type*,actor*,after*,before*,direction*,per_page*,ref*,time_period*}", rawUrl) + { + } + /// + /// 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/repositories/viewing-activity-and-data-for-your-repository)." + /// API method documentation + /// + /// A List<global::Ayllu.Github.Client.Models.Activity> + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 422 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task?> GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task> GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "422", global::Ayllu.Github.Client.Models.ValidationErrorSimple.CreateFromDiscriminatorValue }, + }; + var collectionResult = await RequestAdapter.SendCollectionAsync(requestInfo, global::Ayllu.Github.Client.Models.Activity.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + return collectionResult?.AsList(); + } + /// + /// 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/repositories/viewing-activity-and-data-for-your-repository)." + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.Repos.Item.Item.Activity.ActivityRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Repos.Item.Item.Activity.ActivityRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// 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/repositories/viewing-activity-and-data-for-your-repository)." + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class ActivityRequestBuilderGetQueryParameters + { + /// The activity type to filter by.For example, you can choose to filter by "force_push", to see all force pushes to the repository. + [Obsolete("This property is deprecated, use ActivityTypeAsGetActivityTypeQueryParameterType instead")] +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("activity_type")] + public string? ActivityType { get; set; } +#nullable restore +#else + [QueryParameter("activity_type")] + public string ActivityType { get; set; } +#endif + /// The activity type to filter by.For example, you can choose to filter by "force_push", to see all force pushes to the repository. + [QueryParameter("activity_type")] + public global::Ayllu.Github.Client.Repos.Item.Item.Activity.GetActivity_typeQueryParameterType? ActivityTypeAsGetActivityTypeQueryParameterType { get; set; } + /// The GitHub username to use to filter by the actor who performed the activity. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("actor")] + public string? Actor { get; set; } +#nullable restore +#else + [QueryParameter("actor")] + public string Actor { get; set; } +#endif + /// A cursor, as given in the [Link header](https://docs.github.com/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/rest/using-the-rest-api/using-pagination-in-the-rest-api)." +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("after")] + public string? After { get; set; } +#nullable restore +#else + [QueryParameter("after")] + public string After { get; set; } +#endif + /// A cursor, as given in the [Link header](https://docs.github.com/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/rest/using-the-rest-api/using-pagination-in-the-rest-api)." +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("before")] + public string? Before { get; set; } +#nullable restore +#else + [QueryParameter("before")] + public string Before { get; set; } +#endif + /// The direction to sort the results by. + [Obsolete("This property is deprecated, use DirectionAsGetDirectionQueryParameterType instead")] +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("direction")] + public string? Direction { get; set; } +#nullable restore +#else + [QueryParameter("direction")] + public string Direction { get; set; } +#endif + /// The direction to sort the results by. + [QueryParameter("direction")] + public global::Ayllu.Github.Client.Repos.Item.Item.Activity.GetDirectionQueryParameterType? DirectionAsGetDirectionQueryParameterType { get; set; } + /// The number of results per page (max 100). For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." + [QueryParameter("per_page")] + public int? PerPage { get; set; } + /// 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. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("ref")] + public string? Ref { get; set; } +#nullable restore +#else + [QueryParameter("ref")] + public string Ref { get; set; } +#endif + /// 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). + [Obsolete("This property is deprecated, use TimePeriodAsGetTimePeriodQueryParameterType instead")] +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("time_period")] + public string? TimePeriod { get; set; } +#nullable restore +#else + [QueryParameter("time_period")] + public string TimePeriod { get; set; } +#endif + /// 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). + [QueryParameter("time_period")] + public global::Ayllu.Github.Client.Repos.Item.Item.Activity.GetTime_periodQueryParameterType? TimePeriodAsGetTimePeriodQueryParameterType { get; set; } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class ActivityRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Activity/GetActivity_typeQueryParameterType.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Activity/GetActivity_typeQueryParameterType.cs new file mode 100644 index 0000000..8f13877 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Activity/GetActivity_typeQueryParameterType.cs @@ -0,0 +1,36 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.Activity +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public enum GetActivity_typeQueryParameterType + #pragma warning restore CS1591 + { + [EnumMember(Value = "push")] + #pragma warning disable CS1591 + Push, + #pragma warning restore CS1591 + [EnumMember(Value = "force_push")] + #pragma warning disable CS1591 + Force_push, + #pragma warning restore CS1591 + [EnumMember(Value = "branch_creation")] + #pragma warning disable CS1591 + Branch_creation, + #pragma warning restore CS1591 + [EnumMember(Value = "branch_deletion")] + #pragma warning disable CS1591 + Branch_deletion, + #pragma warning restore CS1591 + [EnumMember(Value = "pr_merge")] + #pragma warning disable CS1591 + Pr_merge, + #pragma warning restore CS1591 + [EnumMember(Value = "merge_queue_merge")] + #pragma warning disable CS1591 + Merge_queue_merge, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Activity/GetDirectionQueryParameterType.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Activity/GetDirectionQueryParameterType.cs new file mode 100644 index 0000000..b995fda --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Activity/GetDirectionQueryParameterType.cs @@ -0,0 +1,20 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.Activity +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public enum GetDirectionQueryParameterType + #pragma warning restore CS1591 + { + [EnumMember(Value = "asc")] + #pragma warning disable CS1591 + Asc, + #pragma warning restore CS1591 + [EnumMember(Value = "desc")] + #pragma warning disable CS1591 + Desc, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Activity/GetTime_periodQueryParameterType.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Activity/GetTime_periodQueryParameterType.cs new file mode 100644 index 0000000..e23a425 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Activity/GetTime_periodQueryParameterType.cs @@ -0,0 +1,32 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.Activity +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public enum GetTime_periodQueryParameterType + #pragma warning restore CS1591 + { + [EnumMember(Value = "day")] + #pragma warning disable CS1591 + Day, + #pragma warning restore CS1591 + [EnumMember(Value = "week")] + #pragma warning disable CS1591 + Week, + #pragma warning restore CS1591 + [EnumMember(Value = "month")] + #pragma warning disable CS1591 + Month, + #pragma warning restore CS1591 + [EnumMember(Value = "quarter")] + #pragma warning disable CS1591 + Quarter, + #pragma warning restore CS1591 + [EnumMember(Value = "year")] + #pragma warning disable CS1591 + Year, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Assignees/AssigneesRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Assignees/AssigneesRequestBuilder.cs new file mode 100644 index 0000000..9923d54 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Assignees/AssigneesRequestBuilder.cs @@ -0,0 +1,125 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Ayllu.Github.Client.Repos.Item.Item.Assignees.Item; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.Assignees +{ + /// + /// Builds and executes requests for operations under \repos\{owner-id}\{repo-id}\assignees + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class AssigneesRequestBuilder : BaseRequestBuilder + { + /// Gets an item from the Ayllu.Github.Client.repos.item.item.assignees.item collection + /// Unique identifier of the item + /// A + public global::Ayllu.Github.Client.Repos.Item.Item.Assignees.Item.WithAssigneeItemRequestBuilder this[string position] + { + get + { + var urlTplParams = new Dictionary(PathParameters); + urlTplParams.Add("assignee", position); + return new global::Ayllu.Github.Client.Repos.Item.Item.Assignees.Item.WithAssigneeItemRequestBuilder(urlTplParams, RequestAdapter); + } + } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public AssigneesRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/assignees{?page*,per_page*}", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public AssigneesRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/assignees{?page*,per_page*}", rawUrl) + { + } + /// + /// Lists the [available assignees](https://docs.github.com/articles/assigning-issues-and-pull-requests-to-other-github-users/) for issues in a repository. + /// API method documentation + /// + /// A List<global::Ayllu.Github.Client.Models.SimpleUser> + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 404 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task?> GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task> GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "404", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + }; + var collectionResult = await RequestAdapter.SendCollectionAsync(requestInfo, global::Ayllu.Github.Client.Models.SimpleUser.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + return collectionResult?.AsList(); + } + /// + /// Lists the [available assignees](https://docs.github.com/articles/assigning-issues-and-pull-requests-to-other-github-users/) for issues in a repository. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.Repos.Item.Item.Assignees.AssigneesRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Repos.Item.Item.Assignees.AssigneesRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Lists the [available assignees](https://docs.github.com/articles/assigning-issues-and-pull-requests-to-other-github-users/) for issues in a repository. + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class AssigneesRequestBuilderGetQueryParameters + { + /// The page number of the results to fetch. For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." + [QueryParameter("page")] + public int? Page { get; set; } + /// The number of results per page (max 100). For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." + [QueryParameter("per_page")] + public int? PerPage { get; set; } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class AssigneesRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Assignees/Item/WithAssigneeItemRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Assignees/Item/WithAssigneeItemRequestBuilder.cs new file mode 100644 index 0000000..64a57cb --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Assignees/Item/WithAssigneeItemRequestBuilder.cs @@ -0,0 +1,97 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.Assignees.Item +{ + /// + /// Builds and executes requests for operations under \repos\{owner-id}\{repo-id}\assignees\{assignee} + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithAssigneeItemRequestBuilder : BaseRequestBuilder + { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public WithAssigneeItemRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/assignees/{assignee}", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public WithAssigneeItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/assignees/{assignee}", rawUrl) + { + } + /// + /// 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. + /// API method documentation + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 404 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "404", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + }; + await RequestAdapter.SendNoContentAsync(requestInfo, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// 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. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.Repos.Item.Item.Assignees.Item.WithAssigneeItemRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Repos.Item.Item.Assignees.Item.WithAssigneeItemRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithAssigneeItemRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Attestations/AttestationsPostRequestBody.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Attestations/AttestationsPostRequestBody.cs new file mode 100644 index 0000000..c517321 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Attestations/AttestationsPostRequestBody.cs @@ -0,0 +1,65 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.Attestations +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class AttestationsPostRequestBody : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// 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. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Repos.Item.Item.Attestations.AttestationsPostRequestBody_bundle? Bundle { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Repos.Item.Item.Attestations.AttestationsPostRequestBody_bundle Bundle { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public AttestationsPostRequestBody() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Repos.Item.Item.Attestations.AttestationsPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Repos.Item.Item.Attestations.AttestationsPostRequestBody(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "bundle", n => { Bundle = n.GetObjectValue(global::Ayllu.Github.Client.Repos.Item.Item.Attestations.AttestationsPostRequestBody_bundle.CreateFromDiscriminatorValue); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteObjectValue("bundle", Bundle); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Attestations/AttestationsPostRequestBody_bundle.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Attestations/AttestationsPostRequestBody_bundle.cs new file mode 100644 index 0000000..e6be98f --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Attestations/AttestationsPostRequestBody_bundle.cs @@ -0,0 +1,86 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.Attestations +{ + /// + /// 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. + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class AttestationsPostRequestBody_bundle : IAdditionalDataHolder, IParsable + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The dsseEnvelope property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Repos.Item.Item.Attestations.AttestationsPostRequestBody_bundle_dsseEnvelope? DsseEnvelope { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Repos.Item.Item.Attestations.AttestationsPostRequestBody_bundle_dsseEnvelope DsseEnvelope { get; set; } +#endif + /// The mediaType property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? MediaType { get; set; } +#nullable restore +#else + public string MediaType { get; set; } +#endif + /// The verificationMaterial property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Repos.Item.Item.Attestations.AttestationsPostRequestBody_bundle_verificationMaterial? VerificationMaterial { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Repos.Item.Item.Attestations.AttestationsPostRequestBody_bundle_verificationMaterial VerificationMaterial { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public AttestationsPostRequestBody_bundle() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Repos.Item.Item.Attestations.AttestationsPostRequestBody_bundle CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Repos.Item.Item.Attestations.AttestationsPostRequestBody_bundle(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "dsseEnvelope", n => { DsseEnvelope = n.GetObjectValue(global::Ayllu.Github.Client.Repos.Item.Item.Attestations.AttestationsPostRequestBody_bundle_dsseEnvelope.CreateFromDiscriminatorValue); } }, + { "mediaType", n => { MediaType = n.GetStringValue(); } }, + { "verificationMaterial", n => { VerificationMaterial = n.GetObjectValue(global::Ayllu.Github.Client.Repos.Item.Item.Attestations.AttestationsPostRequestBody_bundle_verificationMaterial.CreateFromDiscriminatorValue); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteObjectValue("dsseEnvelope", DsseEnvelope); + writer.WriteStringValue("mediaType", MediaType); + writer.WriteObjectValue("verificationMaterial", VerificationMaterial); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Attestations/AttestationsPostRequestBody_bundle_dsseEnvelope.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Attestations/AttestationsPostRequestBody_bundle_dsseEnvelope.cs new file mode 100644 index 0000000..2fff302 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Attestations/AttestationsPostRequestBody_bundle_dsseEnvelope.cs @@ -0,0 +1,55 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.Attestations +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class AttestationsPostRequestBody_bundle_dsseEnvelope : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public AttestationsPostRequestBody_bundle_dsseEnvelope() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Repos.Item.Item.Attestations.AttestationsPostRequestBody_bundle_dsseEnvelope CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Repos.Item.Item.Attestations.AttestationsPostRequestBody_bundle_dsseEnvelope(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Attestations/AttestationsPostRequestBody_bundle_verificationMaterial.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Attestations/AttestationsPostRequestBody_bundle_verificationMaterial.cs new file mode 100644 index 0000000..cfe0fff --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Attestations/AttestationsPostRequestBody_bundle_verificationMaterial.cs @@ -0,0 +1,55 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.Attestations +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class AttestationsPostRequestBody_bundle_verificationMaterial : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public AttestationsPostRequestBody_bundle_verificationMaterial() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Repos.Item.Item.Attestations.AttestationsPostRequestBody_bundle_verificationMaterial CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Repos.Item.Item.Attestations.AttestationsPostRequestBody_bundle_verificationMaterial(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Attestations/AttestationsPostResponse.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Attestations/AttestationsPostResponse.cs new file mode 100644 index 0000000..0164fcb --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Attestations/AttestationsPostResponse.cs @@ -0,0 +1,59 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.Attestations +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class AttestationsPostResponse : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The ID of the attestation. + public int? Id { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public AttestationsPostResponse() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Repos.Item.Item.Attestations.AttestationsPostResponse CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Repos.Item.Item.Attestations.AttestationsPostResponse(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "id", n => { Id = n.GetIntValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteIntValue("id", Id); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Attestations/AttestationsRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Attestations/AttestationsRequestBuilder.cs new file mode 100644 index 0000000..be97443 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Attestations/AttestationsRequestBuilder.cs @@ -0,0 +1,147 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Ayllu.Github.Client.Repos.Item.Item.Attestations.Item; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.Attestations +{ + /// + /// Builds and executes requests for operations under \repos\{owner-id}\{repo-id}\attestations + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class AttestationsRequestBuilder : BaseRequestBuilder + { + /// Gets an item from the Ayllu.Github.Client.repos.item.item.attestations.item collection + /// The parameter should be set to the attestation's subject's SHA256 digest, in the form `sha256:HEX_DIGEST`. + /// A + public global::Ayllu.Github.Client.Repos.Item.Item.Attestations.Item.WithSubject_digestItemRequestBuilder this[string position] + { + get + { + var urlTplParams = new Dictionary(PathParameters); + urlTplParams.Add("subject_digest", position); + return new global::Ayllu.Github.Client.Repos.Item.Item.Attestations.Item.WithSubject_digestItemRequestBuilder(urlTplParams, RequestAdapter); + } + } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public AttestationsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/attestations", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public AttestationsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/attestations", rawUrl) + { + } + /// + /// 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 more information, see our guide on [using artifact attestations to establish a build's provenance](https://docs.github.com/actions/security-guides/using-artifact-attestations-to-establish-provenance-for-builds). + /// API method documentation + /// + /// A + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 403 status code + /// When receiving a 422 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PostAsAttestationsPostResponseAsync(global::Ayllu.Github.Client.Repos.Item.Item.Attestations.AttestationsPostRequestBody body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task PostAsAttestationsPostResponseAsync(global::Ayllu.Github.Client.Repos.Item.Item.Attestations.AttestationsPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPostRequestInformation(body, requestConfiguration); + var errorMapping = new Dictionary> + { + { "403", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "422", global::Ayllu.Github.Client.Models.ValidationError.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Repos.Item.Item.Attestations.AttestationsPostResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// 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 more information, see our guide on [using artifact attestations to establish a build's provenance](https://docs.github.com/actions/security-guides/using-artifact-attestations-to-establish-provenance-for-builds). + /// API method documentation + /// + /// A + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 403 status code + /// When receiving a 422 status code + [Obsolete("This method is obsolete. Use PostAsAttestationsPostResponseAsync instead.")] +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PostAsync(global::Ayllu.Github.Client.Repos.Item.Item.Attestations.AttestationsPostRequestBody body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task PostAsync(global::Ayllu.Github.Client.Repos.Item.Item.Attestations.AttestationsPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPostRequestInformation(body, requestConfiguration); + var errorMapping = new Dictionary> + { + { "403", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "422", global::Ayllu.Github.Client.Models.ValidationError.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Repos.Item.Item.Attestations.AttestationsResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// 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 more information, see our guide on [using artifact attestations to establish a build's provenance](https://docs.github.com/actions/security-guides/using-artifact-attestations-to-establish-provenance-for-builds). + /// + /// A + /// The request body + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPostRequestInformation(global::Ayllu.Github.Client.Repos.Item.Item.Attestations.AttestationsPostRequestBody body, Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToPostRequestInformation(global::Ayllu.Github.Client.Repos.Item.Item.Attestations.AttestationsPostRequestBody body, Action> requestConfiguration = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.Repos.Item.Item.Attestations.AttestationsRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Repos.Item.Item.Attestations.AttestationsRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class AttestationsRequestBuilderPostRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Attestations/AttestationsResponse.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Attestations/AttestationsResponse.cs new file mode 100644 index 0000000..9472458 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Attestations/AttestationsResponse.cs @@ -0,0 +1,28 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.Attestations +{ + [Obsolete("This class is obsolete. Use AttestationsPostResponse instead.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class AttestationsResponse : global::Ayllu.Github.Client.Repos.Item.Item.Attestations.AttestationsPostResponse, IParsable + #pragma warning restore CS1591 + { + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static new global::Ayllu.Github.Client.Repos.Item.Item.Attestations.AttestationsResponse CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Repos.Item.Item.Attestations.AttestationsResponse(); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Attestations/Item/WithSubject_digestGetResponse.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Attestations/Item/WithSubject_digestGetResponse.cs new file mode 100644 index 0000000..4d53f7c --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Attestations/Item/WithSubject_digestGetResponse.cs @@ -0,0 +1,65 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.Attestations.Item +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class WithSubject_digestGetResponse : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The attestations property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? Attestations { get; set; } +#nullable restore +#else + public List Attestations { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public WithSubject_digestGetResponse() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Repos.Item.Item.Attestations.Item.WithSubject_digestGetResponse CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Repos.Item.Item.Attestations.Item.WithSubject_digestGetResponse(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "attestations", n => { Attestations = n.GetCollectionOfObjectValues(global::Ayllu.Github.Client.Repos.Item.Item.Attestations.Item.WithSubject_digestGetResponse_attestations.CreateFromDiscriminatorValue)?.AsList(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteCollectionOfObjectValues("attestations", Attestations); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Attestations/Item/WithSubject_digestGetResponse_attestations.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Attestations/Item/WithSubject_digestGetResponse_attestations.cs new file mode 100644 index 0000000..1dbbdf3 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Attestations/Item/WithSubject_digestGetResponse_attestations.cs @@ -0,0 +1,79 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.Attestations.Item +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class WithSubject_digestGetResponse_attestations : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// 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. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Repos.Item.Item.Attestations.Item.WithSubject_digestGetResponse_attestations_bundle? Bundle { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Repos.Item.Item.Attestations.Item.WithSubject_digestGetResponse_attestations_bundle Bundle { get; set; } +#endif + /// The bundle_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? BundleUrl { get; set; } +#nullable restore +#else + public string BundleUrl { get; set; } +#endif + /// The repository_id property + public int? RepositoryId { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public WithSubject_digestGetResponse_attestations() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Repos.Item.Item.Attestations.Item.WithSubject_digestGetResponse_attestations CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Repos.Item.Item.Attestations.Item.WithSubject_digestGetResponse_attestations(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "bundle", n => { Bundle = n.GetObjectValue(global::Ayllu.Github.Client.Repos.Item.Item.Attestations.Item.WithSubject_digestGetResponse_attestations_bundle.CreateFromDiscriminatorValue); } }, + { "bundle_url", n => { BundleUrl = n.GetStringValue(); } }, + { "repository_id", n => { RepositoryId = n.GetIntValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteObjectValue("bundle", Bundle); + writer.WriteStringValue("bundle_url", BundleUrl); + writer.WriteIntValue("repository_id", RepositoryId); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Attestations/Item/WithSubject_digestGetResponse_attestations_bundle.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Attestations/Item/WithSubject_digestGetResponse_attestations_bundle.cs new file mode 100644 index 0000000..ea42678 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Attestations/Item/WithSubject_digestGetResponse_attestations_bundle.cs @@ -0,0 +1,86 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.Attestations.Item +{ + /// + /// 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. + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithSubject_digestGetResponse_attestations_bundle : IAdditionalDataHolder, IParsable + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The dsseEnvelope property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Repos.Item.Item.Attestations.Item.WithSubject_digestGetResponse_attestations_bundle_dsseEnvelope? DsseEnvelope { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Repos.Item.Item.Attestations.Item.WithSubject_digestGetResponse_attestations_bundle_dsseEnvelope DsseEnvelope { get; set; } +#endif + /// The mediaType property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? MediaType { get; set; } +#nullable restore +#else + public string MediaType { get; set; } +#endif + /// The verificationMaterial property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Repos.Item.Item.Attestations.Item.WithSubject_digestGetResponse_attestations_bundle_verificationMaterial? VerificationMaterial { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Repos.Item.Item.Attestations.Item.WithSubject_digestGetResponse_attestations_bundle_verificationMaterial VerificationMaterial { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public WithSubject_digestGetResponse_attestations_bundle() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Repos.Item.Item.Attestations.Item.WithSubject_digestGetResponse_attestations_bundle CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Repos.Item.Item.Attestations.Item.WithSubject_digestGetResponse_attestations_bundle(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "dsseEnvelope", n => { DsseEnvelope = n.GetObjectValue(global::Ayllu.Github.Client.Repos.Item.Item.Attestations.Item.WithSubject_digestGetResponse_attestations_bundle_dsseEnvelope.CreateFromDiscriminatorValue); } }, + { "mediaType", n => { MediaType = n.GetStringValue(); } }, + { "verificationMaterial", n => { VerificationMaterial = n.GetObjectValue(global::Ayllu.Github.Client.Repos.Item.Item.Attestations.Item.WithSubject_digestGetResponse_attestations_bundle_verificationMaterial.CreateFromDiscriminatorValue); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteObjectValue("dsseEnvelope", DsseEnvelope); + writer.WriteStringValue("mediaType", MediaType); + writer.WriteObjectValue("verificationMaterial", VerificationMaterial); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Attestations/Item/WithSubject_digestGetResponse_attestations_bundle_dsseEnvelope.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Attestations/Item/WithSubject_digestGetResponse_attestations_bundle_dsseEnvelope.cs new file mode 100644 index 0000000..b7d84ac --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Attestations/Item/WithSubject_digestGetResponse_attestations_bundle_dsseEnvelope.cs @@ -0,0 +1,55 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.Attestations.Item +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class WithSubject_digestGetResponse_attestations_bundle_dsseEnvelope : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public WithSubject_digestGetResponse_attestations_bundle_dsseEnvelope() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Repos.Item.Item.Attestations.Item.WithSubject_digestGetResponse_attestations_bundle_dsseEnvelope CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Repos.Item.Item.Attestations.Item.WithSubject_digestGetResponse_attestations_bundle_dsseEnvelope(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Attestations/Item/WithSubject_digestGetResponse_attestations_bundle_verificationMaterial.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Attestations/Item/WithSubject_digestGetResponse_attestations_bundle_verificationMaterial.cs new file mode 100644 index 0000000..5aa8e78 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Attestations/Item/WithSubject_digestGetResponse_attestations_bundle_verificationMaterial.cs @@ -0,0 +1,55 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.Attestations.Item +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class WithSubject_digestGetResponse_attestations_bundle_verificationMaterial : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public WithSubject_digestGetResponse_attestations_bundle_verificationMaterial() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Repos.Item.Item.Attestations.Item.WithSubject_digestGetResponse_attestations_bundle_verificationMaterial CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Repos.Item.Item.Attestations.Item.WithSubject_digestGetResponse_attestations_bundle_verificationMaterial(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Attestations/Item/WithSubject_digestItemRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Attestations/Item/WithSubject_digestItemRequestBuilder.cs new file mode 100644 index 0000000..b576ec2 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Attestations/Item/WithSubject_digestItemRequestBuilder.cs @@ -0,0 +1,152 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.Attestations.Item +{ + /// + /// Builds and executes requests for operations under \repos\{owner-id}\{repo-id}\attestations\{subject_digest} + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithSubject_digestItemRequestBuilder : BaseRequestBuilder + { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public WithSubject_digestItemRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/attestations/{subject_digest}{?after*,before*,per_page*,predicate_type*}", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public WithSubject_digestItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/attestations/{subject_digest}{?after*,before*,per_page*,predicate_type*}", rawUrl) + { + } + /// + /// 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/actions/security-guides/using-artifact-attestations-to-establish-provenance-for-builds). + /// API method documentation + /// + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsWithSubject_digestGetResponseAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task GetAsWithSubject_digestGetResponseAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Repos.Item.Item.Attestations.Item.WithSubject_digestGetResponse.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false); + } + /// + /// 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/actions/security-guides/using-artifact-attestations-to-establish-provenance-for-builds). + /// API method documentation + /// + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + [Obsolete("This method is obsolete. Use GetAsWithSubject_digestGetResponseAsync instead.")] +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Repos.Item.Item.Attestations.Item.WithSubject_digestResponse.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false); + } + /// + /// 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/actions/security-guides/using-artifact-attestations-to-establish-provenance-for-builds). + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.Repos.Item.Item.Attestations.Item.WithSubject_digestItemRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Repos.Item.Item.Attestations.Item.WithSubject_digestItemRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// 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/actions/security-guides/using-artifact-attestations-to-establish-provenance-for-builds). + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithSubject_digestItemRequestBuilderGetQueryParameters + { + /// A cursor, as given in the [Link header](https://docs.github.com/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/rest/using-the-rest-api/using-pagination-in-the-rest-api)." +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("after")] + public string? After { get; set; } +#nullable restore +#else + [QueryParameter("after")] + public string After { get; set; } +#endif + /// A cursor, as given in the [Link header](https://docs.github.com/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/rest/using-the-rest-api/using-pagination-in-the-rest-api)." +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("before")] + public string? Before { get; set; } +#nullable restore +#else + [QueryParameter("before")] + public string Before { get; set; } +#endif + /// The number of results per page (max 100). For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." + [QueryParameter("per_page")] + public int? PerPage { get; set; } + /// Optional filter for fetching attestations with a given predicate type.This option accepts `provenance`, `sbom`, or freeform text for custom predicate types. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("predicate_type")] + public string? PredicateType { get; set; } +#nullable restore +#else + [QueryParameter("predicate_type")] + public string PredicateType { get; set; } +#endif + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithSubject_digestItemRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Attestations/Item/WithSubject_digestResponse.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Attestations/Item/WithSubject_digestResponse.cs new file mode 100644 index 0000000..3719b7a --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Attestations/Item/WithSubject_digestResponse.cs @@ -0,0 +1,28 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.Attestations.Item +{ + [Obsolete("This class is obsolete. Use WithSubject_digestGetResponse instead.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class WithSubject_digestResponse : global::Ayllu.Github.Client.Repos.Item.Item.Attestations.Item.WithSubject_digestGetResponse, IParsable + #pragma warning restore CS1591 + { + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static new global::Ayllu.Github.Client.Repos.Item.Item.Attestations.Item.WithSubject_digestResponse CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Repos.Item.Item.Attestations.Item.WithSubject_digestResponse(); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Autolinks/AutolinksPostRequestBody.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Autolinks/AutolinksPostRequestBody.cs new file mode 100644 index 0000000..b1f4e73 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Autolinks/AutolinksPostRequestBody.cs @@ -0,0 +1,79 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.Autolinks +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class AutolinksPostRequestBody : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// Whether this autolink reference matches alphanumeric characters. If true, the `<num>` parameter of the `url_template` matches alphanumeric characters `A-Z` (case insensitive), `0-9`, and `-`. If false, this autolink reference only matches numeric characters. + public bool? IsAlphanumeric { get; set; } + /// This prefix appended by certain characters will generate a link any time it is found in an issue, pull request, or commit. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? KeyPrefix { get; set; } +#nullable restore +#else + public string KeyPrefix { get; set; } +#endif + /// The URL must contain `<num>` for the reference number. `<num>` matches different characters depending on the value of `is_alphanumeric`. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? UrlTemplate { get; set; } +#nullable restore +#else + public string UrlTemplate { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public AutolinksPostRequestBody() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Repos.Item.Item.Autolinks.AutolinksPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Repos.Item.Item.Autolinks.AutolinksPostRequestBody(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "is_alphanumeric", n => { IsAlphanumeric = n.GetBoolValue(); } }, + { "key_prefix", n => { KeyPrefix = n.GetStringValue(); } }, + { "url_template", n => { UrlTemplate = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteBoolValue("is_alphanumeric", IsAlphanumeric); + writer.WriteStringValue("key_prefix", KeyPrefix); + writer.WriteStringValue("url_template", UrlTemplate); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Autolinks/AutolinksRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Autolinks/AutolinksRequestBuilder.cs new file mode 100644 index 0000000..b3c180f --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Autolinks/AutolinksRequestBuilder.cs @@ -0,0 +1,176 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Ayllu.Github.Client.Repos.Item.Item.Autolinks.Item; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.Autolinks +{ + /// + /// Builds and executes requests for operations under \repos\{owner-id}\{repo-id}\autolinks + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class AutolinksRequestBuilder : BaseRequestBuilder + { + /// Gets an item from the Ayllu.Github.Client.repos.item.item.autolinks.item collection + /// The unique identifier of the autolink. + /// A + public global::Ayllu.Github.Client.Repos.Item.Item.Autolinks.Item.WithAutolink_ItemRequestBuilder this[int position] + { + get + { + var urlTplParams = new Dictionary(PathParameters); + urlTplParams.Add("autolink_id", position); + return new global::Ayllu.Github.Client.Repos.Item.Item.Autolinks.Item.WithAutolink_ItemRequestBuilder(urlTplParams, RequestAdapter); + } + } + /// Gets an item from the Ayllu.Github.Client.repos.item.item.autolinks.item collection + /// The unique identifier of the autolink. + /// A + [Obsolete("This indexer is deprecated and will be removed in the next major version. Use the one with the typed parameter instead.")] + public global::Ayllu.Github.Client.Repos.Item.Item.Autolinks.Item.WithAutolink_ItemRequestBuilder this[string position] + { + get + { + var urlTplParams = new Dictionary(PathParameters); + if (!string.IsNullOrWhiteSpace(position)) urlTplParams.Add("autolink_id", position); + return new global::Ayllu.Github.Client.Repos.Item.Item.Autolinks.Item.WithAutolink_ItemRequestBuilder(urlTplParams, RequestAdapter); + } + } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public AutolinksRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/autolinks", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public AutolinksRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/autolinks", rawUrl) + { + } + /// + /// Gets all autolinks that are configured for a repository.Information about autolinks are only available to repository administrators. + /// API method documentation + /// + /// A List<global::Ayllu.Github.Client.Models.Autolink> + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task?> GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task> GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var collectionResult = await RequestAdapter.SendCollectionAsync(requestInfo, global::Ayllu.Github.Client.Models.Autolink.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false); + return collectionResult?.AsList(); + } + /// + /// Users with admin access to the repository can create an autolink. + /// API method documentation + /// + /// A + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 422 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PostAsync(global::Ayllu.Github.Client.Repos.Item.Item.Autolinks.AutolinksPostRequestBody body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task PostAsync(global::Ayllu.Github.Client.Repos.Item.Item.Autolinks.AutolinksPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPostRequestInformation(body, requestConfiguration); + var errorMapping = new Dictionary> + { + { "422", global::Ayllu.Github.Client.Models.ValidationError.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Models.Autolink.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// Gets all autolinks that are configured for a repository.Information about autolinks are only available to repository administrators. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Users with admin access to the repository can create an autolink. + /// + /// A + /// The request body + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPostRequestInformation(global::Ayllu.Github.Client.Repos.Item.Item.Autolinks.AutolinksPostRequestBody body, Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToPostRequestInformation(global::Ayllu.Github.Client.Repos.Item.Item.Autolinks.AutolinksPostRequestBody body, Action> requestConfiguration = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.Repos.Item.Item.Autolinks.AutolinksRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Repos.Item.Item.Autolinks.AutolinksRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class AutolinksRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class AutolinksRequestBuilderPostRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Autolinks/Item/WithAutolink_ItemRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Autolinks/Item/WithAutolink_ItemRequestBuilder.cs new file mode 100644 index 0000000..670b612 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Autolinks/Item/WithAutolink_ItemRequestBuilder.cs @@ -0,0 +1,148 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.Autolinks.Item +{ + /// + /// Builds and executes requests for operations under \repos\{owner-id}\{repo-id}\autolinks\{autolink_id} + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithAutolink_ItemRequestBuilder : BaseRequestBuilder + { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public WithAutolink_ItemRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/autolinks/{autolink_id}", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public WithAutolink_ItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/autolinks/{autolink_id}", rawUrl) + { + } + /// + /// This deletes a single autolink reference by ID that was configured for the given repository.Information about autolinks are only available to repository administrators. + /// API method documentation + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 404 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task DeleteAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task DeleteAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToDeleteRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "404", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + }; + await RequestAdapter.SendNoContentAsync(requestInfo, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// This returns a single autolink reference by ID that was configured for the given repository.Information about autolinks are only available to repository administrators. + /// API method documentation + /// + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 404 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "404", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Models.Autolink.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// This deletes a single autolink reference by ID that was configured for the given repository.Information about autolinks are only available to repository administrators. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToDeleteRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToDeleteRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.DELETE, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// This returns a single autolink reference by ID that was configured for the given repository.Information about autolinks are only available to repository administrators. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.Repos.Item.Item.Autolinks.Item.WithAutolink_ItemRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Repos.Item.Item.Autolinks.Item.WithAutolink_ItemRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithAutolink_ItemRequestBuilderDeleteRequestConfiguration : RequestConfiguration + { + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithAutolink_ItemRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/AutomatedSecurityFixes/AutomatedSecurityFixesRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/AutomatedSecurityFixes/AutomatedSecurityFixesRequestBuilder.cs new file mode 100644 index 0000000..abc2cc8 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/AutomatedSecurityFixes/AutomatedSecurityFixesRequestBuilder.cs @@ -0,0 +1,181 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.AutomatedSecurityFixes +{ + /// + /// Builds and executes requests for operations under \repos\{owner-id}\{repo-id}\automated-security-fixes + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class AutomatedSecurityFixesRequestBuilder : BaseRequestBuilder + { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public AutomatedSecurityFixesRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/automated-security-fixes", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public AutomatedSecurityFixesRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/automated-security-fixes", rawUrl) + { + } + /// + /// Disables Dependabot security updates for a repository. The authenticated user must have admin access to the repository. For more information, see "[Configuring Dependabot security updates](https://docs.github.com/articles/configuring-automated-security-fixes)". + /// API method documentation + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task DeleteAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task DeleteAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToDeleteRequestInformation(requestConfiguration); + await RequestAdapter.SendNoContentAsync(requestInfo, default, cancellationToken).ConfigureAwait(false); + } + /// + /// Shows whether Dependabot security updates are enabled, disabled or paused for a repository. The authenticated user must have admin read access to the repository. For more information, see "[Configuring Dependabot security updates](https://docs.github.com/articles/configuring-automated-security-fixes)". + /// API method documentation + /// + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Models.CheckAutomatedSecurityFixes.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false); + } + /// + /// Enables Dependabot security updates for a repository. The authenticated user must have admin access to the repository. For more information, see "[Configuring Dependabot security updates](https://docs.github.com/articles/configuring-automated-security-fixes)". + /// API method documentation + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PutAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task PutAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToPutRequestInformation(requestConfiguration); + await RequestAdapter.SendNoContentAsync(requestInfo, default, cancellationToken).ConfigureAwait(false); + } + /// + /// Disables Dependabot security updates for a repository. The authenticated user must have admin access to the repository. For more information, see "[Configuring Dependabot security updates](https://docs.github.com/articles/configuring-automated-security-fixes)". + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToDeleteRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToDeleteRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.DELETE, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + return requestInfo; + } + /// + /// Shows whether Dependabot security updates are enabled, disabled or paused for a repository. The authenticated user must have admin read access to the repository. For more information, see "[Configuring Dependabot security updates](https://docs.github.com/articles/configuring-automated-security-fixes)". + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Enables Dependabot security updates for a repository. The authenticated user must have admin access to the repository. For more information, see "[Configuring Dependabot security updates](https://docs.github.com/articles/configuring-automated-security-fixes)". + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPutRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToPutRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.PUT, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.Repos.Item.Item.AutomatedSecurityFixes.AutomatedSecurityFixesRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Repos.Item.Item.AutomatedSecurityFixes.AutomatedSecurityFixesRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class AutomatedSecurityFixesRequestBuilderDeleteRequestConfiguration : RequestConfiguration + { + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class AutomatedSecurityFixesRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class AutomatedSecurityFixesRequestBuilderPutRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Branches/BranchesRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Branches/BranchesRequestBuilder.cs new file mode 100644 index 0000000..dbdaf80 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Branches/BranchesRequestBuilder.cs @@ -0,0 +1,125 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Ayllu.Github.Client.Repos.Item.Item.Branches.Item; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.Branches +{ + /// + /// Builds and executes requests for operations under \repos\{owner-id}\{repo-id}\branches + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class BranchesRequestBuilder : BaseRequestBuilder + { + /// Gets an item from the Ayllu.Github.Client.repos.item.item.branches.item collection + /// The name of the branch. Cannot contain wildcard characters. To use wildcard characters in branch names, use [the GraphQL API](https://docs.github.com/graphql). + /// A + public global::Ayllu.Github.Client.Repos.Item.Item.Branches.Item.WithBranchItemRequestBuilder this[string position] + { + get + { + var urlTplParams = new Dictionary(PathParameters); + urlTplParams.Add("branch", position); + return new global::Ayllu.Github.Client.Repos.Item.Item.Branches.Item.WithBranchItemRequestBuilder(urlTplParams, RequestAdapter); + } + } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public BranchesRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/branches{?page*,per_page*,protected*}", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public BranchesRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/branches{?page*,per_page*,protected*}", rawUrl) + { + } + /// + /// List branches + /// API method documentation + /// + /// A List<global::Ayllu.Github.Client.Models.ShortBranch> + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 404 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task?> GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task> GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "404", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + }; + var collectionResult = await RequestAdapter.SendCollectionAsync(requestInfo, global::Ayllu.Github.Client.Models.ShortBranch.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + return collectionResult?.AsList(); + } + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.Repos.Item.Item.Branches.BranchesRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Repos.Item.Item.Branches.BranchesRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// List branches + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class BranchesRequestBuilderGetQueryParameters + { + /// The page number of the results to fetch. For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." + [QueryParameter("page")] + public int? Page { get; set; } + /// The number of results per page (max 100). For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." + [QueryParameter("per_page")] + public int? PerPage { get; set; } + /// 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. + [QueryParameter("protected")] + public bool? Protected { get; set; } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class BranchesRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Branches/Item/Protection/Enforce_admins/Enforce_adminsRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Branches/Item/Protection/Enforce_admins/Enforce_adminsRequestBuilder.cs new file mode 100644 index 0000000..a1fa927 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Branches/Item/Protection/Enforce_admins/Enforce_adminsRequestBuilder.cs @@ -0,0 +1,189 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.Branches.Item.Protection.Enforce_admins +{ + /// + /// Builds and executes requests for operations under \repos\{owner-id}\{repo-id}\branches\{branch}\protection\enforce_admins + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class Enforce_adminsRequestBuilder : BaseRequestBuilder + { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public Enforce_adminsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/branches/{branch}/protection/enforce_admins", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public Enforce_adminsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/branches/{branch}/protection/enforce_admins", rawUrl) + { + } + /// + /// 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/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. + /// API method documentation + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 404 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task DeleteAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task DeleteAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToDeleteRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "404", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + }; + await RequestAdapter.SendNoContentAsync(requestInfo, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// 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/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + /// API method documentation + /// + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Models.ProtectedBranchAdminEnforced.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false); + } + /// + /// 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/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. + /// API method documentation + /// + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PostAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task PostAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToPostRequestInformation(requestConfiguration); + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Models.ProtectedBranchAdminEnforced.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false); + } + /// + /// 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/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. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToDeleteRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToDeleteRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.DELETE, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// 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/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// 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/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. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPostRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToPostRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.Repos.Item.Item.Branches.Item.Protection.Enforce_admins.Enforce_adminsRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Repos.Item.Item.Branches.Item.Protection.Enforce_admins.Enforce_adminsRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class Enforce_adminsRequestBuilderDeleteRequestConfiguration : RequestConfiguration + { + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class Enforce_adminsRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class Enforce_adminsRequestBuilderPostRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Branches/Item/Protection/ProtectionPutRequestBody.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Branches/Item/Protection/ProtectionPutRequestBody.cs new file mode 100644 index 0000000..73fab8f --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Branches/Item/Protection/ProtectionPutRequestBody.cs @@ -0,0 +1,117 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.Branches.Item.Protection +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class ProtectionPutRequestBody : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// 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/github/administering-a-repository/enabling-force-pushes-to-a-protected-branch)" in the GitHub Help documentation. + public bool? AllowDeletions { get; set; } + /// 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/github/administering-a-repository/enabling-force-pushes-to-a-protected-branch)" in the GitHub Help documentation." + public bool? AllowForcePushes { get; set; } + /// 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`. + public bool? AllowForkSyncing { get; set; } + /// 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`. + public bool? BlockCreations { get; set; } + /// Enforce all configured restrictions for administrators. Set to `true` to enforce required status checks for repository administrators. Set to `null` to disable. + public bool? EnforceAdmins { get; set; } + /// Whether to set the branch as read-only. If this is true, users will not be able to push to the branch. Default: `false`. + public bool? LockBranch { get; set; } + /// 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`. + public bool? RequiredConversationResolution { get; set; } + /// 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/github/administering-a-repository/requiring-a-linear-commit-history)" in the GitHub Help documentation. + public bool? RequiredLinearHistory { get; set; } + /// Require at least one approving review on a pull request, before merging. Set to `null` to disable. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Repos.Item.Item.Branches.Item.Protection.ProtectionPutRequestBody_required_pull_request_reviews? RequiredPullRequestReviews { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Repos.Item.Item.Branches.Item.Protection.ProtectionPutRequestBody_required_pull_request_reviews RequiredPullRequestReviews { get; set; } +#endif + /// Require status checks to pass before merging. Set to `null` to disable. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Repos.Item.Item.Branches.Item.Protection.ProtectionPutRequestBody_required_status_checks? RequiredStatusChecks { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Repos.Item.Item.Branches.Item.Protection.ProtectionPutRequestBody_required_status_checks RequiredStatusChecks { get; set; } +#endif + /// 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. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Repos.Item.Item.Branches.Item.Protection.ProtectionPutRequestBody_restrictions? Restrictions { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Repos.Item.Item.Branches.Item.Protection.ProtectionPutRequestBody_restrictions Restrictions { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public ProtectionPutRequestBody() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Repos.Item.Item.Branches.Item.Protection.ProtectionPutRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Repos.Item.Item.Branches.Item.Protection.ProtectionPutRequestBody(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "allow_deletions", n => { AllowDeletions = n.GetBoolValue(); } }, + { "allow_force_pushes", n => { AllowForcePushes = n.GetBoolValue(); } }, + { "allow_fork_syncing", n => { AllowForkSyncing = n.GetBoolValue(); } }, + { "block_creations", n => { BlockCreations = n.GetBoolValue(); } }, + { "enforce_admins", n => { EnforceAdmins = n.GetBoolValue(); } }, + { "lock_branch", n => { LockBranch = n.GetBoolValue(); } }, + { "required_conversation_resolution", n => { RequiredConversationResolution = n.GetBoolValue(); } }, + { "required_linear_history", n => { RequiredLinearHistory = n.GetBoolValue(); } }, + { "required_pull_request_reviews", n => { RequiredPullRequestReviews = n.GetObjectValue(global::Ayllu.Github.Client.Repos.Item.Item.Branches.Item.Protection.ProtectionPutRequestBody_required_pull_request_reviews.CreateFromDiscriminatorValue); } }, + { "required_status_checks", n => { RequiredStatusChecks = n.GetObjectValue(global::Ayllu.Github.Client.Repos.Item.Item.Branches.Item.Protection.ProtectionPutRequestBody_required_status_checks.CreateFromDiscriminatorValue); } }, + { "restrictions", n => { Restrictions = n.GetObjectValue(global::Ayllu.Github.Client.Repos.Item.Item.Branches.Item.Protection.ProtectionPutRequestBody_restrictions.CreateFromDiscriminatorValue); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteBoolValue("allow_deletions", AllowDeletions); + writer.WriteBoolValue("allow_force_pushes", AllowForcePushes); + writer.WriteBoolValue("allow_fork_syncing", AllowForkSyncing); + writer.WriteBoolValue("block_creations", BlockCreations); + writer.WriteBoolValue("enforce_admins", EnforceAdmins); + writer.WriteBoolValue("lock_branch", LockBranch); + writer.WriteBoolValue("required_conversation_resolution", RequiredConversationResolution); + writer.WriteBoolValue("required_linear_history", RequiredLinearHistory); + writer.WriteObjectValue("required_pull_request_reviews", RequiredPullRequestReviews); + writer.WriteObjectValue("required_status_checks", RequiredStatusChecks); + writer.WriteObjectValue("restrictions", Restrictions); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Branches/Item/Protection/ProtectionPutRequestBody_required_pull_request_reviews.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Branches/Item/Protection/ProtectionPutRequestBody_required_pull_request_reviews.cs new file mode 100644 index 0000000..97fb03a --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Branches/Item/Protection/ProtectionPutRequestBody_required_pull_request_reviews.cs @@ -0,0 +1,92 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.Branches.Item.Protection +{ + /// + /// Require at least one approving review on a pull request, before merging. Set to `null` to disable. + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class ProtectionPutRequestBody_required_pull_request_reviews : IAdditionalDataHolder, IParsable + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// Allow specific users, teams, or apps to bypass pull request requirements. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Repos.Item.Item.Branches.Item.Protection.ProtectionPutRequestBody_required_pull_request_reviews_bypass_pull_request_allowances? BypassPullRequestAllowances { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Repos.Item.Item.Branches.Item.Protection.ProtectionPutRequestBody_required_pull_request_reviews_bypass_pull_request_allowances BypassPullRequestAllowances { get; set; } +#endif + /// 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. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Repos.Item.Item.Branches.Item.Protection.ProtectionPutRequestBody_required_pull_request_reviews_dismissal_restrictions? DismissalRestrictions { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Repos.Item.Item.Branches.Item.Protection.ProtectionPutRequestBody_required_pull_request_reviews_dismissal_restrictions DismissalRestrictions { get; set; } +#endif + /// Set to `true` if you want to automatically dismiss approving reviews when someone pushes a new commit. + public bool? DismissStaleReviews { get; set; } + /// Blocks merging pull requests until [code owners](https://docs.github.com/articles/about-code-owners/) review them. + public bool? RequireCodeOwnerReviews { get; set; } + /// Specify the number of reviewers required to approve pull requests. Use a number between 1 and 6 or 0 to not require reviewers. + public int? RequiredApprovingReviewCount { get; set; } + /// Whether the most recent push must be approved by someone other than the person who pushed it. Default: `false`. + public bool? RequireLastPushApproval { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public ProtectionPutRequestBody_required_pull_request_reviews() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Repos.Item.Item.Branches.Item.Protection.ProtectionPutRequestBody_required_pull_request_reviews CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Repos.Item.Item.Branches.Item.Protection.ProtectionPutRequestBody_required_pull_request_reviews(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "bypass_pull_request_allowances", n => { BypassPullRequestAllowances = n.GetObjectValue(global::Ayllu.Github.Client.Repos.Item.Item.Branches.Item.Protection.ProtectionPutRequestBody_required_pull_request_reviews_bypass_pull_request_allowances.CreateFromDiscriminatorValue); } }, + { "dismiss_stale_reviews", n => { DismissStaleReviews = n.GetBoolValue(); } }, + { "dismissal_restrictions", n => { DismissalRestrictions = n.GetObjectValue(global::Ayllu.Github.Client.Repos.Item.Item.Branches.Item.Protection.ProtectionPutRequestBody_required_pull_request_reviews_dismissal_restrictions.CreateFromDiscriminatorValue); } }, + { "require_code_owner_reviews", n => { RequireCodeOwnerReviews = n.GetBoolValue(); } }, + { "require_last_push_approval", n => { RequireLastPushApproval = n.GetBoolValue(); } }, + { "required_approving_review_count", n => { RequiredApprovingReviewCount = n.GetIntValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteObjectValue("bypass_pull_request_allowances", BypassPullRequestAllowances); + writer.WriteObjectValue("dismissal_restrictions", DismissalRestrictions); + writer.WriteBoolValue("dismiss_stale_reviews", DismissStaleReviews); + writer.WriteBoolValue("require_code_owner_reviews", RequireCodeOwnerReviews); + writer.WriteIntValue("required_approving_review_count", RequiredApprovingReviewCount); + writer.WriteBoolValue("require_last_push_approval", RequireLastPushApproval); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Branches/Item/Protection/ProtectionPutRequestBody_required_pull_request_reviews_bypass_pull_request_allowances.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Branches/Item/Protection/ProtectionPutRequestBody_required_pull_request_reviews_bypass_pull_request_allowances.cs new file mode 100644 index 0000000..c85cc2d --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Branches/Item/Protection/ProtectionPutRequestBody_required_pull_request_reviews_bypass_pull_request_allowances.cs @@ -0,0 +1,86 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.Branches.Item.Protection +{ + /// + /// Allow specific users, teams, or apps to bypass pull request requirements. + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class ProtectionPutRequestBody_required_pull_request_reviews_bypass_pull_request_allowances : IAdditionalDataHolder, IParsable + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The list of app `slug`s allowed to bypass pull request requirements. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? Apps { get; set; } +#nullable restore +#else + public List Apps { get; set; } +#endif + /// The list of team `slug`s allowed to bypass pull request requirements. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? Teams { get; set; } +#nullable restore +#else + public List Teams { get; set; } +#endif + /// The list of user `login`s allowed to bypass pull request requirements. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? Users { get; set; } +#nullable restore +#else + public List Users { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public ProtectionPutRequestBody_required_pull_request_reviews_bypass_pull_request_allowances() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Repos.Item.Item.Branches.Item.Protection.ProtectionPutRequestBody_required_pull_request_reviews_bypass_pull_request_allowances CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Repos.Item.Item.Branches.Item.Protection.ProtectionPutRequestBody_required_pull_request_reviews_bypass_pull_request_allowances(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "apps", n => { Apps = n.GetCollectionOfPrimitiveValues()?.AsList(); } }, + { "teams", n => { Teams = n.GetCollectionOfPrimitiveValues()?.AsList(); } }, + { "users", n => { Users = n.GetCollectionOfPrimitiveValues()?.AsList(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteCollectionOfPrimitiveValues("apps", Apps); + writer.WriteCollectionOfPrimitiveValues("teams", Teams); + writer.WriteCollectionOfPrimitiveValues("users", Users); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Branches/Item/Protection/ProtectionPutRequestBody_required_pull_request_reviews_dismissal_restrictions.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Branches/Item/Protection/ProtectionPutRequestBody_required_pull_request_reviews_dismissal_restrictions.cs new file mode 100644 index 0000000..a587574 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Branches/Item/Protection/ProtectionPutRequestBody_required_pull_request_reviews_dismissal_restrictions.cs @@ -0,0 +1,86 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.Branches.Item.Protection +{ + /// + /// 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. + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class ProtectionPutRequestBody_required_pull_request_reviews_dismissal_restrictions : IAdditionalDataHolder, IParsable + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The list of app `slug`s with dismissal access +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? Apps { get; set; } +#nullable restore +#else + public List Apps { get; set; } +#endif + /// The list of team `slug`s with dismissal access +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? Teams { get; set; } +#nullable restore +#else + public List Teams { get; set; } +#endif + /// The list of user `login`s with dismissal access +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? Users { get; set; } +#nullable restore +#else + public List Users { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public ProtectionPutRequestBody_required_pull_request_reviews_dismissal_restrictions() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Repos.Item.Item.Branches.Item.Protection.ProtectionPutRequestBody_required_pull_request_reviews_dismissal_restrictions CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Repos.Item.Item.Branches.Item.Protection.ProtectionPutRequestBody_required_pull_request_reviews_dismissal_restrictions(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "apps", n => { Apps = n.GetCollectionOfPrimitiveValues()?.AsList(); } }, + { "teams", n => { Teams = n.GetCollectionOfPrimitiveValues()?.AsList(); } }, + { "users", n => { Users = n.GetCollectionOfPrimitiveValues()?.AsList(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteCollectionOfPrimitiveValues("apps", Apps); + writer.WriteCollectionOfPrimitiveValues("teams", Teams); + writer.WriteCollectionOfPrimitiveValues("users", Users); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Branches/Item/Protection/ProtectionPutRequestBody_required_status_checks.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Branches/Item/Protection/ProtectionPutRequestBody_required_status_checks.cs new file mode 100644 index 0000000..ca56298 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Branches/Item/Protection/ProtectionPutRequestBody_required_status_checks.cs @@ -0,0 +1,81 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.Branches.Item.Protection +{ + /// + /// Require status checks to pass before merging. Set to `null` to disable. + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class ProtectionPutRequestBody_required_status_checks : IAdditionalDataHolder, IParsable + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The list of status checks to require in order to merge into this branch. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? Checks { get; set; } +#nullable restore +#else + public List Checks { get; set; } +#endif + /// **Closing down notice**: 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. + [Obsolete("")] +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? Contexts { get; set; } +#nullable restore +#else + public List Contexts { get; set; } +#endif + /// Require branches to be up to date before merging. + public bool? Strict { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public ProtectionPutRequestBody_required_status_checks() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Repos.Item.Item.Branches.Item.Protection.ProtectionPutRequestBody_required_status_checks CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Repos.Item.Item.Branches.Item.Protection.ProtectionPutRequestBody_required_status_checks(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "checks", n => { Checks = n.GetCollectionOfObjectValues(global::Ayllu.Github.Client.Repos.Item.Item.Branches.Item.Protection.ProtectionPutRequestBody_required_status_checks_checks.CreateFromDiscriminatorValue)?.AsList(); } }, + { "contexts", n => { Contexts = n.GetCollectionOfPrimitiveValues()?.AsList(); } }, + { "strict", n => { Strict = n.GetBoolValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteCollectionOfObjectValues("checks", Checks); + writer.WriteCollectionOfPrimitiveValues("contexts", Contexts); + writer.WriteBoolValue("strict", Strict); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Branches/Item/Protection/ProtectionPutRequestBody_required_status_checks_checks.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Branches/Item/Protection/ProtectionPutRequestBody_required_status_checks_checks.cs new file mode 100644 index 0000000..b95c243 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Branches/Item/Protection/ProtectionPutRequestBody_required_status_checks_checks.cs @@ -0,0 +1,69 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.Branches.Item.Protection +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class ProtectionPutRequestBody_required_status_checks_checks : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// 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. + public int? AppId { get; set; } + /// The name of the required check +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Context { get; set; } +#nullable restore +#else + public string Context { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public ProtectionPutRequestBody_required_status_checks_checks() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Repos.Item.Item.Branches.Item.Protection.ProtectionPutRequestBody_required_status_checks_checks CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Repos.Item.Item.Branches.Item.Protection.ProtectionPutRequestBody_required_status_checks_checks(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "app_id", n => { AppId = n.GetIntValue(); } }, + { "context", n => { Context = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteIntValue("app_id", AppId); + writer.WriteStringValue("context", Context); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Branches/Item/Protection/ProtectionPutRequestBody_restrictions.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Branches/Item/Protection/ProtectionPutRequestBody_restrictions.cs new file mode 100644 index 0000000..7a5cf1f --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Branches/Item/Protection/ProtectionPutRequestBody_restrictions.cs @@ -0,0 +1,86 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.Branches.Item.Protection +{ + /// + /// 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. + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class ProtectionPutRequestBody_restrictions : IAdditionalDataHolder, IParsable + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The list of app `slug`s with push access +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? Apps { get; set; } +#nullable restore +#else + public List Apps { get; set; } +#endif + /// The list of team `slug`s with push access +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? Teams { get; set; } +#nullable restore +#else + public List Teams { get; set; } +#endif + /// The list of user `login`s with push access +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? Users { get; set; } +#nullable restore +#else + public List Users { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public ProtectionPutRequestBody_restrictions() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Repos.Item.Item.Branches.Item.Protection.ProtectionPutRequestBody_restrictions CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Repos.Item.Item.Branches.Item.Protection.ProtectionPutRequestBody_restrictions(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "apps", n => { Apps = n.GetCollectionOfPrimitiveValues()?.AsList(); } }, + { "teams", n => { Teams = n.GetCollectionOfPrimitiveValues()?.AsList(); } }, + { "users", n => { Users = n.GetCollectionOfPrimitiveValues()?.AsList(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteCollectionOfPrimitiveValues("apps", Apps); + writer.WriteCollectionOfPrimitiveValues("teams", Teams); + writer.WriteCollectionOfPrimitiveValues("users", Users); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Branches/Item/Protection/ProtectionRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Branches/Item/Protection/ProtectionRequestBuilder.cs new file mode 100644 index 0000000..c599d8c --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Branches/Item/Protection/ProtectionRequestBuilder.cs @@ -0,0 +1,238 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Ayllu.Github.Client.Repos.Item.Item.Branches.Item.Protection.Enforce_admins; +using Ayllu.Github.Client.Repos.Item.Item.Branches.Item.Protection.Required_pull_request_reviews; +using Ayllu.Github.Client.Repos.Item.Item.Branches.Item.Protection.Required_signatures; +using Ayllu.Github.Client.Repos.Item.Item.Branches.Item.Protection.Required_status_checks; +using Ayllu.Github.Client.Repos.Item.Item.Branches.Item.Protection.Restrictions; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.Branches.Item.Protection +{ + /// + /// Builds and executes requests for operations under \repos\{owner-id}\{repo-id}\branches\{branch}\protection + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class ProtectionRequestBuilder : BaseRequestBuilder + { + /// The enforce_admins property + public global::Ayllu.Github.Client.Repos.Item.Item.Branches.Item.Protection.Enforce_admins.Enforce_adminsRequestBuilder Enforce_admins + { + get => new global::Ayllu.Github.Client.Repos.Item.Item.Branches.Item.Protection.Enforce_admins.Enforce_adminsRequestBuilder(PathParameters, RequestAdapter); + } + /// The required_pull_request_reviews property + public global::Ayllu.Github.Client.Repos.Item.Item.Branches.Item.Protection.Required_pull_request_reviews.Required_pull_request_reviewsRequestBuilder Required_pull_request_reviews + { + get => new global::Ayllu.Github.Client.Repos.Item.Item.Branches.Item.Protection.Required_pull_request_reviews.Required_pull_request_reviewsRequestBuilder(PathParameters, RequestAdapter); + } + /// The required_signatures property + public global::Ayllu.Github.Client.Repos.Item.Item.Branches.Item.Protection.Required_signatures.Required_signaturesRequestBuilder Required_signatures + { + get => new global::Ayllu.Github.Client.Repos.Item.Item.Branches.Item.Protection.Required_signatures.Required_signaturesRequestBuilder(PathParameters, RequestAdapter); + } + /// The required_status_checks property + public global::Ayllu.Github.Client.Repos.Item.Item.Branches.Item.Protection.Required_status_checks.Required_status_checksRequestBuilder Required_status_checks + { + get => new global::Ayllu.Github.Client.Repos.Item.Item.Branches.Item.Protection.Required_status_checks.Required_status_checksRequestBuilder(PathParameters, RequestAdapter); + } + /// The restrictions property + public global::Ayllu.Github.Client.Repos.Item.Item.Branches.Item.Protection.Restrictions.RestrictionsRequestBuilder Restrictions + { + get => new global::Ayllu.Github.Client.Repos.Item.Item.Branches.Item.Protection.Restrictions.RestrictionsRequestBuilder(PathParameters, RequestAdapter); + } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public ProtectionRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/branches/{branch}/protection", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public ProtectionRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/branches/{branch}/protection", rawUrl) + { + } + /// + /// 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/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + /// API method documentation + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 403 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task DeleteAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task DeleteAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToDeleteRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "403", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + }; + await RequestAdapter.SendNoContentAsync(requestInfo, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// 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/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + /// API method documentation + /// + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 404 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "404", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Models.BranchProtection.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// 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/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. + /// API method documentation + /// + /// A + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 403 status code + /// When receiving a 404 status code + /// When receiving a 422 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PutAsync(global::Ayllu.Github.Client.Repos.Item.Item.Branches.Item.Protection.ProtectionPutRequestBody body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task PutAsync(global::Ayllu.Github.Client.Repos.Item.Item.Branches.Item.Protection.ProtectionPutRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPutRequestInformation(body, requestConfiguration); + var errorMapping = new Dictionary> + { + { "403", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "404", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "422", global::Ayllu.Github.Client.Models.ValidationErrorSimple.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Models.ProtectedBranch.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// 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/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToDeleteRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToDeleteRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.DELETE, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// 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/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// 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/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. + /// + /// A + /// The request body + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPutRequestInformation(global::Ayllu.Github.Client.Repos.Item.Item.Branches.Item.Protection.ProtectionPutRequestBody body, Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToPutRequestInformation(global::Ayllu.Github.Client.Repos.Item.Item.Branches.Item.Protection.ProtectionPutRequestBody body, Action> requestConfiguration = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation(Method.PUT, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.Repos.Item.Item.Branches.Item.Protection.ProtectionRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Repos.Item.Item.Branches.Item.Protection.ProtectionRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class ProtectionRequestBuilderDeleteRequestConfiguration : RequestConfiguration + { + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class ProtectionRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class ProtectionRequestBuilderPutRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Branches/Item/Protection/Required_pull_request_reviews/Required_pull_request_reviewsPatchRequestBody.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Branches/Item/Protection/Required_pull_request_reviews/Required_pull_request_reviewsPatchRequestBody.cs new file mode 100644 index 0000000..ee0ed8e --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Branches/Item/Protection/Required_pull_request_reviews/Required_pull_request_reviewsPatchRequestBody.cs @@ -0,0 +1,91 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.Branches.Item.Protection.Required_pull_request_reviews +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class Required_pull_request_reviewsPatchRequestBody : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// Allow specific users, teams, or apps to bypass pull request requirements. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Repos.Item.Item.Branches.Item.Protection.Required_pull_request_reviews.Required_pull_request_reviewsPatchRequestBody_bypass_pull_request_allowances? BypassPullRequestAllowances { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Repos.Item.Item.Branches.Item.Protection.Required_pull_request_reviews.Required_pull_request_reviewsPatchRequestBody_bypass_pull_request_allowances BypassPullRequestAllowances { get; set; } +#endif + /// 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. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Repos.Item.Item.Branches.Item.Protection.Required_pull_request_reviews.Required_pull_request_reviewsPatchRequestBody_dismissal_restrictions? DismissalRestrictions { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Repos.Item.Item.Branches.Item.Protection.Required_pull_request_reviews.Required_pull_request_reviewsPatchRequestBody_dismissal_restrictions DismissalRestrictions { get; set; } +#endif + /// Set to `true` if you want to automatically dismiss approving reviews when someone pushes a new commit. + public bool? DismissStaleReviews { get; set; } + /// Blocks merging pull requests until [code owners](https://docs.github.com/articles/about-code-owners/) have reviewed. + public bool? RequireCodeOwnerReviews { get; set; } + /// Specifies the number of reviewers required to approve pull requests. Use a number between 1 and 6 or 0 to not require reviewers. + public int? RequiredApprovingReviewCount { get; set; } + /// Whether the most recent push must be approved by someone other than the person who pushed it. Default: `false` + public bool? RequireLastPushApproval { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public Required_pull_request_reviewsPatchRequestBody() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Repos.Item.Item.Branches.Item.Protection.Required_pull_request_reviews.Required_pull_request_reviewsPatchRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Repos.Item.Item.Branches.Item.Protection.Required_pull_request_reviews.Required_pull_request_reviewsPatchRequestBody(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "bypass_pull_request_allowances", n => { BypassPullRequestAllowances = n.GetObjectValue(global::Ayllu.Github.Client.Repos.Item.Item.Branches.Item.Protection.Required_pull_request_reviews.Required_pull_request_reviewsPatchRequestBody_bypass_pull_request_allowances.CreateFromDiscriminatorValue); } }, + { "dismiss_stale_reviews", n => { DismissStaleReviews = n.GetBoolValue(); } }, + { "dismissal_restrictions", n => { DismissalRestrictions = n.GetObjectValue(global::Ayllu.Github.Client.Repos.Item.Item.Branches.Item.Protection.Required_pull_request_reviews.Required_pull_request_reviewsPatchRequestBody_dismissal_restrictions.CreateFromDiscriminatorValue); } }, + { "require_code_owner_reviews", n => { RequireCodeOwnerReviews = n.GetBoolValue(); } }, + { "require_last_push_approval", n => { RequireLastPushApproval = n.GetBoolValue(); } }, + { "required_approving_review_count", n => { RequiredApprovingReviewCount = n.GetIntValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteObjectValue("bypass_pull_request_allowances", BypassPullRequestAllowances); + writer.WriteObjectValue("dismissal_restrictions", DismissalRestrictions); + writer.WriteBoolValue("dismiss_stale_reviews", DismissStaleReviews); + writer.WriteBoolValue("require_code_owner_reviews", RequireCodeOwnerReviews); + writer.WriteIntValue("required_approving_review_count", RequiredApprovingReviewCount); + writer.WriteBoolValue("require_last_push_approval", RequireLastPushApproval); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Branches/Item/Protection/Required_pull_request_reviews/Required_pull_request_reviewsPatchRequestBody_bypass_pull_request_allowances.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Branches/Item/Protection/Required_pull_request_reviews/Required_pull_request_reviewsPatchRequestBody_bypass_pull_request_allowances.cs new file mode 100644 index 0000000..262d9dd --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Branches/Item/Protection/Required_pull_request_reviews/Required_pull_request_reviewsPatchRequestBody_bypass_pull_request_allowances.cs @@ -0,0 +1,86 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.Branches.Item.Protection.Required_pull_request_reviews +{ + /// + /// Allow specific users, teams, or apps to bypass pull request requirements. + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class Required_pull_request_reviewsPatchRequestBody_bypass_pull_request_allowances : IAdditionalDataHolder, IParsable + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The list of app `slug`s allowed to bypass pull request requirements. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? Apps { get; set; } +#nullable restore +#else + public List Apps { get; set; } +#endif + /// The list of team `slug`s allowed to bypass pull request requirements. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? Teams { get; set; } +#nullable restore +#else + public List Teams { get; set; } +#endif + /// The list of user `login`s allowed to bypass pull request requirements. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? Users { get; set; } +#nullable restore +#else + public List Users { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public Required_pull_request_reviewsPatchRequestBody_bypass_pull_request_allowances() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Repos.Item.Item.Branches.Item.Protection.Required_pull_request_reviews.Required_pull_request_reviewsPatchRequestBody_bypass_pull_request_allowances CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Repos.Item.Item.Branches.Item.Protection.Required_pull_request_reviews.Required_pull_request_reviewsPatchRequestBody_bypass_pull_request_allowances(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "apps", n => { Apps = n.GetCollectionOfPrimitiveValues()?.AsList(); } }, + { "teams", n => { Teams = n.GetCollectionOfPrimitiveValues()?.AsList(); } }, + { "users", n => { Users = n.GetCollectionOfPrimitiveValues()?.AsList(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteCollectionOfPrimitiveValues("apps", Apps); + writer.WriteCollectionOfPrimitiveValues("teams", Teams); + writer.WriteCollectionOfPrimitiveValues("users", Users); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Branches/Item/Protection/Required_pull_request_reviews/Required_pull_request_reviewsPatchRequestBody_dismissal_restrictions.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Branches/Item/Protection/Required_pull_request_reviews/Required_pull_request_reviewsPatchRequestBody_dismissal_restrictions.cs new file mode 100644 index 0000000..2f22626 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Branches/Item/Protection/Required_pull_request_reviews/Required_pull_request_reviewsPatchRequestBody_dismissal_restrictions.cs @@ -0,0 +1,86 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.Branches.Item.Protection.Required_pull_request_reviews +{ + /// + /// 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. + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class Required_pull_request_reviewsPatchRequestBody_dismissal_restrictions : IAdditionalDataHolder, IParsable + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The list of app `slug`s with dismissal access +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? Apps { get; set; } +#nullable restore +#else + public List Apps { get; set; } +#endif + /// The list of team `slug`s with dismissal access +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? Teams { get; set; } +#nullable restore +#else + public List Teams { get; set; } +#endif + /// The list of user `login`s with dismissal access +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? Users { get; set; } +#nullable restore +#else + public List Users { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public Required_pull_request_reviewsPatchRequestBody_dismissal_restrictions() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Repos.Item.Item.Branches.Item.Protection.Required_pull_request_reviews.Required_pull_request_reviewsPatchRequestBody_dismissal_restrictions CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Repos.Item.Item.Branches.Item.Protection.Required_pull_request_reviews.Required_pull_request_reviewsPatchRequestBody_dismissal_restrictions(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "apps", n => { Apps = n.GetCollectionOfPrimitiveValues()?.AsList(); } }, + { "teams", n => { Teams = n.GetCollectionOfPrimitiveValues()?.AsList(); } }, + { "users", n => { Users = n.GetCollectionOfPrimitiveValues()?.AsList(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteCollectionOfPrimitiveValues("apps", Apps); + writer.WriteCollectionOfPrimitiveValues("teams", Teams); + writer.WriteCollectionOfPrimitiveValues("users", Users); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Branches/Item/Protection/Required_pull_request_reviews/Required_pull_request_reviewsRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Branches/Item/Protection/Required_pull_request_reviews/Required_pull_request_reviewsRequestBuilder.cs new file mode 100644 index 0000000..7b02615 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Branches/Item/Protection/Required_pull_request_reviews/Required_pull_request_reviewsRequestBuilder.cs @@ -0,0 +1,199 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.Branches.Item.Protection.Required_pull_request_reviews +{ + /// + /// Builds and executes requests for operations under \repos\{owner-id}\{repo-id}\branches\{branch}\protection\required_pull_request_reviews + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class Required_pull_request_reviewsRequestBuilder : BaseRequestBuilder + { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public Required_pull_request_reviewsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/branches/{branch}/protection/required_pull_request_reviews", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public Required_pull_request_reviewsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/branches/{branch}/protection/required_pull_request_reviews", rawUrl) + { + } + /// + /// 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/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + /// API method documentation + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 404 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task DeleteAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task DeleteAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToDeleteRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "404", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + }; + await RequestAdapter.SendNoContentAsync(requestInfo, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// 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/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + /// API method documentation + /// + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Models.ProtectedBranchPullRequestReview.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false); + } + /// + /// 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/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. + /// API method documentation + /// + /// A + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 422 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PatchAsync(global::Ayllu.Github.Client.Repos.Item.Item.Branches.Item.Protection.Required_pull_request_reviews.Required_pull_request_reviewsPatchRequestBody body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task PatchAsync(global::Ayllu.Github.Client.Repos.Item.Item.Branches.Item.Protection.Required_pull_request_reviews.Required_pull_request_reviewsPatchRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPatchRequestInformation(body, requestConfiguration); + var errorMapping = new Dictionary> + { + { "422", global::Ayllu.Github.Client.Models.ValidationError.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Models.ProtectedBranchPullRequestReview.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// 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/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToDeleteRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToDeleteRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.DELETE, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// 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/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// 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/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. + /// + /// A + /// The request body + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPatchRequestInformation(global::Ayllu.Github.Client.Repos.Item.Item.Branches.Item.Protection.Required_pull_request_reviews.Required_pull_request_reviewsPatchRequestBody body, Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToPatchRequestInformation(global::Ayllu.Github.Client.Repos.Item.Item.Branches.Item.Protection.Required_pull_request_reviews.Required_pull_request_reviewsPatchRequestBody body, Action> requestConfiguration = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.Repos.Item.Item.Branches.Item.Protection.Required_pull_request_reviews.Required_pull_request_reviewsRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Repos.Item.Item.Branches.Item.Protection.Required_pull_request_reviews.Required_pull_request_reviewsRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class Required_pull_request_reviewsRequestBuilderDeleteRequestConfiguration : RequestConfiguration + { + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class Required_pull_request_reviewsRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class Required_pull_request_reviewsRequestBuilderPatchRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Branches/Item/Protection/Required_signatures/Required_signaturesRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Branches/Item/Protection/Required_signatures/Required_signaturesRequestBuilder.cs new file mode 100644 index 0000000..3aee72b --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Branches/Item/Protection/Required_signatures/Required_signaturesRequestBuilder.cs @@ -0,0 +1,199 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.Branches.Item.Protection.Required_signatures +{ + /// + /// Builds and executes requests for operations under \repos\{owner-id}\{repo-id}\branches\{branch}\protection\required_signatures + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class Required_signaturesRequestBuilder : BaseRequestBuilder + { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public Required_signaturesRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/branches/{branch}/protection/required_signatures", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public Required_signaturesRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/branches/{branch}/protection/required_signatures", rawUrl) + { + } + /// + /// 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/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. + /// API method documentation + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 404 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task DeleteAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task DeleteAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToDeleteRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "404", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + }; + await RequestAdapter.SendNoContentAsync(requestInfo, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// 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/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/articles/signing-commits-with-gpg) in GitHub Help.> [!NOTE]> You must enable branch protection to require signed commits. + /// API method documentation + /// + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 404 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "404", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Models.ProtectedBranchAdminEnforced.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// 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/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. + /// API method documentation + /// + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 404 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PostAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task PostAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToPostRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "404", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Models.ProtectedBranchAdminEnforced.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// 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/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. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToDeleteRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToDeleteRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.DELETE, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// 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/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/articles/signing-commits-with-gpg) in GitHub Help.> [!NOTE]> You must enable branch protection to require signed commits. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// 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/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. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPostRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToPostRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.Repos.Item.Item.Branches.Item.Protection.Required_signatures.Required_signaturesRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Repos.Item.Item.Branches.Item.Protection.Required_signatures.Required_signaturesRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class Required_signaturesRequestBuilderDeleteRequestConfiguration : RequestConfiguration + { + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class Required_signaturesRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class Required_signaturesRequestBuilderPostRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Branches/Item/Protection/Required_status_checks/Contexts/ContextsDeleteRequestBodyMember1.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Branches/Item/Protection/Required_status_checks/Contexts/ContextsDeleteRequestBodyMember1.cs new file mode 100644 index 0000000..8a98644 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Branches/Item/Protection/Required_status_checks/Contexts/ContextsDeleteRequestBodyMember1.cs @@ -0,0 +1,65 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.Branches.Item.Protection.Required_status_checks.Contexts +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class ContextsDeleteRequestBodyMember1 : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The name of the status checks +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? Contexts { get; set; } +#nullable restore +#else + public List Contexts { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public ContextsDeleteRequestBodyMember1() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Repos.Item.Item.Branches.Item.Protection.Required_status_checks.Contexts.ContextsDeleteRequestBodyMember1 CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Repos.Item.Item.Branches.Item.Protection.Required_status_checks.Contexts.ContextsDeleteRequestBodyMember1(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "contexts", n => { Contexts = n.GetCollectionOfPrimitiveValues()?.AsList(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteCollectionOfPrimitiveValues("contexts", Contexts); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Branches/Item/Protection/Required_status_checks/Contexts/ContextsPostRequestBodyMember1.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Branches/Item/Protection/Required_status_checks/Contexts/ContextsPostRequestBodyMember1.cs new file mode 100644 index 0000000..896c357 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Branches/Item/Protection/Required_status_checks/Contexts/ContextsPostRequestBodyMember1.cs @@ -0,0 +1,65 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.Branches.Item.Protection.Required_status_checks.Contexts +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class ContextsPostRequestBodyMember1 : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The name of the status checks +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? Contexts { get; set; } +#nullable restore +#else + public List Contexts { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public ContextsPostRequestBodyMember1() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Repos.Item.Item.Branches.Item.Protection.Required_status_checks.Contexts.ContextsPostRequestBodyMember1 CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Repos.Item.Item.Branches.Item.Protection.Required_status_checks.Contexts.ContextsPostRequestBodyMember1(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "contexts", n => { Contexts = n.GetCollectionOfPrimitiveValues()?.AsList(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteCollectionOfPrimitiveValues("contexts", Contexts); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Branches/Item/Protection/Required_status_checks/Contexts/ContextsPutRequestBodyMember1.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Branches/Item/Protection/Required_status_checks/Contexts/ContextsPutRequestBodyMember1.cs new file mode 100644 index 0000000..a8b862d --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Branches/Item/Protection/Required_status_checks/Contexts/ContextsPutRequestBodyMember1.cs @@ -0,0 +1,65 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.Branches.Item.Protection.Required_status_checks.Contexts +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class ContextsPutRequestBodyMember1 : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The name of the status checks +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? Contexts { get; set; } +#nullable restore +#else + public List Contexts { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public ContextsPutRequestBodyMember1() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Repos.Item.Item.Branches.Item.Protection.Required_status_checks.Contexts.ContextsPutRequestBodyMember1 CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Repos.Item.Item.Branches.Item.Protection.Required_status_checks.Contexts.ContextsPutRequestBodyMember1(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "contexts", n => { Contexts = n.GetCollectionOfPrimitiveValues()?.AsList(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteCollectionOfPrimitiveValues("contexts", Contexts); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Branches/Item/Protection/Required_status_checks/Contexts/ContextsRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Branches/Item/Protection/Required_status_checks/Contexts/ContextsRequestBuilder.cs new file mode 100644 index 0000000..bfcb711 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Branches/Item/Protection/Required_status_checks/Contexts/ContextsRequestBuilder.cs @@ -0,0 +1,491 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.Branches.Item.Protection.Required_status_checks.Contexts +{ + /// + /// Builds and executes requests for operations under \repos\{owner-id}\{repo-id}\branches\{branch}\protection\required_status_checks\contexts + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class ContextsRequestBuilder : BaseRequestBuilder + { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public ContextsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/branches/{branch}/protection/required_status_checks/contexts", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public ContextsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/branches/{branch}/protection/required_status_checks/contexts", rawUrl) + { + } + /// + /// 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/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + /// API method documentation + /// + /// A List<string> + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 404 status code + /// When receiving a 422 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task?> DeleteAsync(global::Ayllu.Github.Client.Repos.Item.Item.Branches.Item.Protection.Required_status_checks.Contexts.ContextsRequestBuilder.ContextsDeleteRequestBody body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task> DeleteAsync(global::Ayllu.Github.Client.Repos.Item.Item.Branches.Item.Protection.Required_status_checks.Contexts.ContextsRequestBuilder.ContextsDeleteRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = ToDeleteRequestInformation(body, requestConfiguration); + var errorMapping = new Dictionary> + { + { "404", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "422", global::Ayllu.Github.Client.Models.ValidationError.CreateFromDiscriminatorValue }, + }; + var collectionResult = await RequestAdapter.SendPrimitiveCollectionAsync(requestInfo, errorMapping, cancellationToken).ConfigureAwait(false); + return collectionResult?.AsList(); + } + /// + /// 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/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + /// API method documentation + /// + /// A List<string> + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 404 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task?> GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task> GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "404", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + }; + var collectionResult = await RequestAdapter.SendPrimitiveCollectionAsync(requestInfo, errorMapping, cancellationToken).ConfigureAwait(false); + return collectionResult?.AsList(); + } + /// + /// 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/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + /// API method documentation + /// + /// A List<string> + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 403 status code + /// When receiving a 404 status code + /// When receiving a 422 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task?> PostAsync(global::Ayllu.Github.Client.Repos.Item.Item.Branches.Item.Protection.Required_status_checks.Contexts.ContextsRequestBuilder.ContextsPostRequestBody body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task> PostAsync(global::Ayllu.Github.Client.Repos.Item.Item.Branches.Item.Protection.Required_status_checks.Contexts.ContextsRequestBuilder.ContextsPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPostRequestInformation(body, requestConfiguration); + var errorMapping = new Dictionary> + { + { "403", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "404", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "422", global::Ayllu.Github.Client.Models.ValidationError.CreateFromDiscriminatorValue }, + }; + var collectionResult = await RequestAdapter.SendPrimitiveCollectionAsync(requestInfo, errorMapping, cancellationToken).ConfigureAwait(false); + return collectionResult?.AsList(); + } + /// + /// 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/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + /// API method documentation + /// + /// A List<string> + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 404 status code + /// When receiving a 422 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task?> PutAsync(global::Ayllu.Github.Client.Repos.Item.Item.Branches.Item.Protection.Required_status_checks.Contexts.ContextsRequestBuilder.ContextsPutRequestBody body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task> PutAsync(global::Ayllu.Github.Client.Repos.Item.Item.Branches.Item.Protection.Required_status_checks.Contexts.ContextsRequestBuilder.ContextsPutRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPutRequestInformation(body, requestConfiguration); + var errorMapping = new Dictionary> + { + { "404", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "422", global::Ayllu.Github.Client.Models.ValidationError.CreateFromDiscriminatorValue }, + }; + var collectionResult = await RequestAdapter.SendPrimitiveCollectionAsync(requestInfo, errorMapping, cancellationToken).ConfigureAwait(false); + return collectionResult?.AsList(); + } + /// + /// 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/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + /// + /// A + /// The request body + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToDeleteRequestInformation(global::Ayllu.Github.Client.Repos.Item.Item.Branches.Item.Protection.Required_status_checks.Contexts.ContextsRequestBuilder.ContextsDeleteRequestBody body, Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToDeleteRequestInformation(global::Ayllu.Github.Client.Repos.Item.Item.Branches.Item.Protection.Required_status_checks.Contexts.ContextsRequestBuilder.ContextsDeleteRequestBody body, Action> requestConfiguration = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation(Method.DELETE, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + return requestInfo; + } + /// + /// 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/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// 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/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + /// + /// A + /// The request body + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPostRequestInformation(global::Ayllu.Github.Client.Repos.Item.Item.Branches.Item.Protection.Required_status_checks.Contexts.ContextsRequestBuilder.ContextsPostRequestBody body, Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToPostRequestInformation(global::Ayllu.Github.Client.Repos.Item.Item.Branches.Item.Protection.Required_status_checks.Contexts.ContextsRequestBuilder.ContextsPostRequestBody body, Action> requestConfiguration = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + return requestInfo; + } + /// + /// 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/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + /// + /// A + /// The request body + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPutRequestInformation(global::Ayllu.Github.Client.Repos.Item.Item.Branches.Item.Protection.Required_status_checks.Contexts.ContextsRequestBuilder.ContextsPutRequestBody body, Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToPutRequestInformation(global::Ayllu.Github.Client.Repos.Item.Item.Branches.Item.Protection.Required_status_checks.Contexts.ContextsRequestBuilder.ContextsPutRequestBody body, Action> requestConfiguration = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation(Method.PUT, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.Repos.Item.Item.Branches.Item.Protection.Required_status_checks.Contexts.ContextsRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Repos.Item.Item.Branches.Item.Protection.Required_status_checks.Contexts.ContextsRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Composed type wrapper for classes , List<string> + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class ContextsDeleteRequestBody : IComposedTypeWrapper, IParsable + { + /// Composed type representation for type +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Repos.Item.Item.Branches.Item.Protection.Required_status_checks.Contexts.ContextsDeleteRequestBodyMember1? ContextsDeleteRequestBodyMember1 { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Repos.Item.Item.Branches.Item.Protection.Required_status_checks.Contexts.ContextsDeleteRequestBodyMember1 ContextsDeleteRequestBodyMember1 { get; set; } +#endif + /// Composed type representation for type List<string> +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? String { get; set; } +#nullable restore +#else + public List String { get; set; } +#endif + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Repos.Item.Item.Branches.Item.Protection.Required_status_checks.Contexts.ContextsRequestBuilder.ContextsDeleteRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + var mappingValue = parseNode.GetChildNode("")?.GetStringValue(); + var result = new global::Ayllu.Github.Client.Repos.Item.Item.Branches.Item.Protection.Required_status_checks.Contexts.ContextsRequestBuilder.ContextsDeleteRequestBody(); + if("".Equals(mappingValue, StringComparison.OrdinalIgnoreCase)) + { + result.ContextsDeleteRequestBodyMember1 = new global::Ayllu.Github.Client.Repos.Item.Item.Branches.Item.Protection.Required_status_checks.Contexts.ContextsDeleteRequestBodyMember1(); + } + else if(parseNode.GetCollectionOfPrimitiveValues()?.AsList() is List stringValue) + { + result.String = stringValue; + } + return result; + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + if(ContextsDeleteRequestBodyMember1 != null) + { + return ContextsDeleteRequestBodyMember1.GetFieldDeserializers(); + } + return new Dictionary>(); + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ContextsDeleteRequestBodyMember1 != null) + { + writer.WriteObjectValue(null, ContextsDeleteRequestBodyMember1); + } + else if(String != null) + { + writer.WriteCollectionOfPrimitiveValues(null, String); + } + } + } + /// + /// Composed type wrapper for classes , List<string> + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class ContextsPostRequestBody : IComposedTypeWrapper, IParsable + { + /// Composed type representation for type +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Repos.Item.Item.Branches.Item.Protection.Required_status_checks.Contexts.ContextsPostRequestBodyMember1? ContextsPostRequestBodyMember1 { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Repos.Item.Item.Branches.Item.Protection.Required_status_checks.Contexts.ContextsPostRequestBodyMember1 ContextsPostRequestBodyMember1 { get; set; } +#endif + /// Composed type representation for type List<string> +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? String { get; set; } +#nullable restore +#else + public List String { get; set; } +#endif + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Repos.Item.Item.Branches.Item.Protection.Required_status_checks.Contexts.ContextsRequestBuilder.ContextsPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + var mappingValue = parseNode.GetChildNode("")?.GetStringValue(); + var result = new global::Ayllu.Github.Client.Repos.Item.Item.Branches.Item.Protection.Required_status_checks.Contexts.ContextsRequestBuilder.ContextsPostRequestBody(); + if("".Equals(mappingValue, StringComparison.OrdinalIgnoreCase)) + { + result.ContextsPostRequestBodyMember1 = new global::Ayllu.Github.Client.Repos.Item.Item.Branches.Item.Protection.Required_status_checks.Contexts.ContextsPostRequestBodyMember1(); + } + else if(parseNode.GetCollectionOfPrimitiveValues()?.AsList() is List stringValue) + { + result.String = stringValue; + } + return result; + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + if(ContextsPostRequestBodyMember1 != null) + { + return ContextsPostRequestBodyMember1.GetFieldDeserializers(); + } + return new Dictionary>(); + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ContextsPostRequestBodyMember1 != null) + { + writer.WriteObjectValue(null, ContextsPostRequestBodyMember1); + } + else if(String != null) + { + writer.WriteCollectionOfPrimitiveValues(null, String); + } + } + } + /// + /// Composed type wrapper for classes , List<string> + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class ContextsPutRequestBody : IComposedTypeWrapper, IParsable + { + /// Composed type representation for type +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Repos.Item.Item.Branches.Item.Protection.Required_status_checks.Contexts.ContextsPutRequestBodyMember1? ContextsPutRequestBodyMember1 { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Repos.Item.Item.Branches.Item.Protection.Required_status_checks.Contexts.ContextsPutRequestBodyMember1 ContextsPutRequestBodyMember1 { get; set; } +#endif + /// Composed type representation for type List<string> +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? String { get; set; } +#nullable restore +#else + public List String { get; set; } +#endif + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Repos.Item.Item.Branches.Item.Protection.Required_status_checks.Contexts.ContextsRequestBuilder.ContextsPutRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + var mappingValue = parseNode.GetChildNode("")?.GetStringValue(); + var result = new global::Ayllu.Github.Client.Repos.Item.Item.Branches.Item.Protection.Required_status_checks.Contexts.ContextsRequestBuilder.ContextsPutRequestBody(); + if("".Equals(mappingValue, StringComparison.OrdinalIgnoreCase)) + { + result.ContextsPutRequestBodyMember1 = new global::Ayllu.Github.Client.Repos.Item.Item.Branches.Item.Protection.Required_status_checks.Contexts.ContextsPutRequestBodyMember1(); + } + else if(parseNode.GetCollectionOfPrimitiveValues()?.AsList() is List stringValue) + { + result.String = stringValue; + } + return result; + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + if(ContextsPutRequestBodyMember1 != null) + { + return ContextsPutRequestBodyMember1.GetFieldDeserializers(); + } + return new Dictionary>(); + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ContextsPutRequestBodyMember1 != null) + { + writer.WriteObjectValue(null, ContextsPutRequestBodyMember1); + } + else if(String != null) + { + writer.WriteCollectionOfPrimitiveValues(null, String); + } + } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class ContextsRequestBuilderDeleteRequestConfiguration : RequestConfiguration + { + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class ContextsRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class ContextsRequestBuilderPostRequestConfiguration : RequestConfiguration + { + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class ContextsRequestBuilderPutRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Branches/Item/Protection/Required_status_checks/Required_status_checksPatchRequestBody.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Branches/Item/Protection/Required_status_checks/Required_status_checksPatchRequestBody.cs new file mode 100644 index 0000000..69bd3ed --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Branches/Item/Protection/Required_status_checks/Required_status_checksPatchRequestBody.cs @@ -0,0 +1,80 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.Branches.Item.Protection.Required_status_checks +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class Required_status_checksPatchRequestBody : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The list of status checks to require in order to merge into this branch. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? Checks { get; set; } +#nullable restore +#else + public List Checks { get; set; } +#endif + /// **Closing down notice**: 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. + [Obsolete("")] +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? Contexts { get; set; } +#nullable restore +#else + public List Contexts { get; set; } +#endif + /// Require branches to be up to date before merging. + public bool? Strict { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public Required_status_checksPatchRequestBody() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Repos.Item.Item.Branches.Item.Protection.Required_status_checks.Required_status_checksPatchRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Repos.Item.Item.Branches.Item.Protection.Required_status_checks.Required_status_checksPatchRequestBody(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "checks", n => { Checks = n.GetCollectionOfObjectValues(global::Ayllu.Github.Client.Repos.Item.Item.Branches.Item.Protection.Required_status_checks.Required_status_checksPatchRequestBody_checks.CreateFromDiscriminatorValue)?.AsList(); } }, + { "contexts", n => { Contexts = n.GetCollectionOfPrimitiveValues()?.AsList(); } }, + { "strict", n => { Strict = n.GetBoolValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteCollectionOfObjectValues("checks", Checks); + writer.WriteCollectionOfPrimitiveValues("contexts", Contexts); + writer.WriteBoolValue("strict", Strict); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Branches/Item/Protection/Required_status_checks/Required_status_checksPatchRequestBody_checks.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Branches/Item/Protection/Required_status_checks/Required_status_checksPatchRequestBody_checks.cs new file mode 100644 index 0000000..5c6961c --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Branches/Item/Protection/Required_status_checks/Required_status_checksPatchRequestBody_checks.cs @@ -0,0 +1,69 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.Branches.Item.Protection.Required_status_checks +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class Required_status_checksPatchRequestBody_checks : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// 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. + public int? AppId { get; set; } + /// The name of the required check +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Context { get; set; } +#nullable restore +#else + public string Context { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public Required_status_checksPatchRequestBody_checks() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Repos.Item.Item.Branches.Item.Protection.Required_status_checks.Required_status_checksPatchRequestBody_checks CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Repos.Item.Item.Branches.Item.Protection.Required_status_checks.Required_status_checksPatchRequestBody_checks(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "app_id", n => { AppId = n.GetIntValue(); } }, + { "context", n => { Context = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteIntValue("app_id", AppId); + writer.WriteStringValue("context", Context); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Branches/Item/Protection/Required_status_checks/Required_status_checksRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Branches/Item/Protection/Required_status_checks/Required_status_checksRequestBuilder.cs new file mode 100644 index 0000000..7583f44 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Branches/Item/Protection/Required_status_checks/Required_status_checksRequestBuilder.cs @@ -0,0 +1,206 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Ayllu.Github.Client.Repos.Item.Item.Branches.Item.Protection.Required_status_checks.Contexts; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.Branches.Item.Protection.Required_status_checks +{ + /// + /// Builds and executes requests for operations under \repos\{owner-id}\{repo-id}\branches\{branch}\protection\required_status_checks + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class Required_status_checksRequestBuilder : BaseRequestBuilder + { + /// The contexts property + public global::Ayllu.Github.Client.Repos.Item.Item.Branches.Item.Protection.Required_status_checks.Contexts.ContextsRequestBuilder Contexts + { + get => new global::Ayllu.Github.Client.Repos.Item.Item.Branches.Item.Protection.Required_status_checks.Contexts.ContextsRequestBuilder(PathParameters, RequestAdapter); + } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public Required_status_checksRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/branches/{branch}/protection/required_status_checks", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public Required_status_checksRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/branches/{branch}/protection/required_status_checks", rawUrl) + { + } + /// + /// 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/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + /// API method documentation + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task DeleteAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task DeleteAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToDeleteRequestInformation(requestConfiguration); + await RequestAdapter.SendNoContentAsync(requestInfo, default, cancellationToken).ConfigureAwait(false); + } + /// + /// 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/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + /// API method documentation + /// + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 404 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "404", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Models.StatusCheckPolicy.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// 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/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. + /// API method documentation + /// + /// A + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 404 status code + /// When receiving a 422 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PatchAsync(global::Ayllu.Github.Client.Repos.Item.Item.Branches.Item.Protection.Required_status_checks.Required_status_checksPatchRequestBody body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task PatchAsync(global::Ayllu.Github.Client.Repos.Item.Item.Branches.Item.Protection.Required_status_checks.Required_status_checksPatchRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPatchRequestInformation(body, requestConfiguration); + var errorMapping = new Dictionary> + { + { "404", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "422", global::Ayllu.Github.Client.Models.ValidationError.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Models.StatusCheckPolicy.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// 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/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToDeleteRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToDeleteRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.DELETE, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + return requestInfo; + } + /// + /// 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/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// 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/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. + /// + /// A + /// The request body + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPatchRequestInformation(global::Ayllu.Github.Client.Repos.Item.Item.Branches.Item.Protection.Required_status_checks.Required_status_checksPatchRequestBody body, Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToPatchRequestInformation(global::Ayllu.Github.Client.Repos.Item.Item.Branches.Item.Protection.Required_status_checks.Required_status_checksPatchRequestBody body, Action> requestConfiguration = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.Repos.Item.Item.Branches.Item.Protection.Required_status_checks.Required_status_checksRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Repos.Item.Item.Branches.Item.Protection.Required_status_checks.Required_status_checksRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class Required_status_checksRequestBuilderDeleteRequestConfiguration : RequestConfiguration + { + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class Required_status_checksRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class Required_status_checksRequestBuilderPatchRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Branches/Item/Protection/Restrictions/Apps/AppsDeleteRequestBody.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Branches/Item/Protection/Restrictions/Apps/AppsDeleteRequestBody.cs new file mode 100644 index 0000000..40b56c6 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Branches/Item/Protection/Restrictions/Apps/AppsDeleteRequestBody.cs @@ -0,0 +1,65 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.Branches.Item.Protection.Restrictions.Apps +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class AppsDeleteRequestBody : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// 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. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? Apps { get; set; } +#nullable restore +#else + public List Apps { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public AppsDeleteRequestBody() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Repos.Item.Item.Branches.Item.Protection.Restrictions.Apps.AppsDeleteRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Repos.Item.Item.Branches.Item.Protection.Restrictions.Apps.AppsDeleteRequestBody(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "apps", n => { Apps = n.GetCollectionOfPrimitiveValues()?.AsList(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteCollectionOfPrimitiveValues("apps", Apps); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Branches/Item/Protection/Restrictions/Apps/AppsPostRequestBody.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Branches/Item/Protection/Restrictions/Apps/AppsPostRequestBody.cs new file mode 100644 index 0000000..b4ca249 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Branches/Item/Protection/Restrictions/Apps/AppsPostRequestBody.cs @@ -0,0 +1,65 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.Branches.Item.Protection.Restrictions.Apps +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class AppsPostRequestBody : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// 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. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? Apps { get; set; } +#nullable restore +#else + public List Apps { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public AppsPostRequestBody() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Repos.Item.Item.Branches.Item.Protection.Restrictions.Apps.AppsPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Repos.Item.Item.Branches.Item.Protection.Restrictions.Apps.AppsPostRequestBody(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "apps", n => { Apps = n.GetCollectionOfPrimitiveValues()?.AsList(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteCollectionOfPrimitiveValues("apps", Apps); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Branches/Item/Protection/Restrictions/Apps/AppsPutRequestBody.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Branches/Item/Protection/Restrictions/Apps/AppsPutRequestBody.cs new file mode 100644 index 0000000..8ee0c1c --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Branches/Item/Protection/Restrictions/Apps/AppsPutRequestBody.cs @@ -0,0 +1,65 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.Branches.Item.Protection.Restrictions.Apps +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class AppsPutRequestBody : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// 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. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? Apps { get; set; } +#nullable restore +#else + public List Apps { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public AppsPutRequestBody() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Repos.Item.Item.Branches.Item.Protection.Restrictions.Apps.AppsPutRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Repos.Item.Item.Branches.Item.Protection.Restrictions.Apps.AppsPutRequestBody(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "apps", n => { Apps = n.GetCollectionOfPrimitiveValues()?.AsList(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteCollectionOfPrimitiveValues("apps", Apps); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Branches/Item/Protection/Restrictions/Apps/AppsRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Branches/Item/Protection/Restrictions/Apps/AppsRequestBuilder.cs new file mode 100644 index 0000000..e80b480 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Branches/Item/Protection/Restrictions/Apps/AppsRequestBuilder.cs @@ -0,0 +1,270 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.Branches.Item.Protection.Restrictions.Apps +{ + /// + /// Builds and executes requests for operations under \repos\{owner-id}\{repo-id}\branches\{branch}\protection\restrictions\apps + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class AppsRequestBuilder : BaseRequestBuilder + { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public AppsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/branches/{branch}/protection/restrictions/apps", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public AppsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/branches/{branch}/protection/restrictions/apps", rawUrl) + { + } + /// + /// 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/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. + /// API method documentation + /// + /// A List<global::Ayllu.Github.Client.Models.Integration> + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 422 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task?> DeleteAsync(global::Ayllu.Github.Client.Repos.Item.Item.Branches.Item.Protection.Restrictions.Apps.AppsDeleteRequestBody body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task> DeleteAsync(global::Ayllu.Github.Client.Repos.Item.Item.Branches.Item.Protection.Restrictions.Apps.AppsDeleteRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = ToDeleteRequestInformation(body, requestConfiguration); + var errorMapping = new Dictionary> + { + { "422", global::Ayllu.Github.Client.Models.ValidationError.CreateFromDiscriminatorValue }, + }; + var collectionResult = await RequestAdapter.SendCollectionAsync(requestInfo, global::Ayllu.Github.Client.Models.Integration.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + return collectionResult?.AsList(); + } + /// + /// 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/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. + /// API method documentation + /// + /// A List<global::Ayllu.Github.Client.Models.Integration> + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 404 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task?> GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task> GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "404", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + }; + var collectionResult = await RequestAdapter.SendCollectionAsync(requestInfo, global::Ayllu.Github.Client.Models.Integration.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + return collectionResult?.AsList(); + } + /// + /// 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/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. + /// API method documentation + /// + /// A List<global::Ayllu.Github.Client.Models.Integration> + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 422 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task?> PostAsync(global::Ayllu.Github.Client.Repos.Item.Item.Branches.Item.Protection.Restrictions.Apps.AppsPostRequestBody body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task> PostAsync(global::Ayllu.Github.Client.Repos.Item.Item.Branches.Item.Protection.Restrictions.Apps.AppsPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPostRequestInformation(body, requestConfiguration); + var errorMapping = new Dictionary> + { + { "422", global::Ayllu.Github.Client.Models.ValidationError.CreateFromDiscriminatorValue }, + }; + var collectionResult = await RequestAdapter.SendCollectionAsync(requestInfo, global::Ayllu.Github.Client.Models.Integration.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + return collectionResult?.AsList(); + } + /// + /// 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/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. + /// API method documentation + /// + /// A List<global::Ayllu.Github.Client.Models.Integration> + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 422 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task?> PutAsync(global::Ayllu.Github.Client.Repos.Item.Item.Branches.Item.Protection.Restrictions.Apps.AppsPutRequestBody body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task> PutAsync(global::Ayllu.Github.Client.Repos.Item.Item.Branches.Item.Protection.Restrictions.Apps.AppsPutRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPutRequestInformation(body, requestConfiguration); + var errorMapping = new Dictionary> + { + { "422", global::Ayllu.Github.Client.Models.ValidationError.CreateFromDiscriminatorValue }, + }; + var collectionResult = await RequestAdapter.SendCollectionAsync(requestInfo, global::Ayllu.Github.Client.Models.Integration.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + return collectionResult?.AsList(); + } + /// + /// 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/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. + /// + /// A + /// The request body + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToDeleteRequestInformation(global::Ayllu.Github.Client.Repos.Item.Item.Branches.Item.Protection.Restrictions.Apps.AppsDeleteRequestBody body, Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToDeleteRequestInformation(global::Ayllu.Github.Client.Repos.Item.Item.Branches.Item.Protection.Restrictions.Apps.AppsDeleteRequestBody body, Action> requestConfiguration = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation(Method.DELETE, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + return requestInfo; + } + /// + /// 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/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. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// 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/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. + /// + /// A + /// The request body + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPostRequestInformation(global::Ayllu.Github.Client.Repos.Item.Item.Branches.Item.Protection.Restrictions.Apps.AppsPostRequestBody body, Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToPostRequestInformation(global::Ayllu.Github.Client.Repos.Item.Item.Branches.Item.Protection.Restrictions.Apps.AppsPostRequestBody body, Action> requestConfiguration = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + return requestInfo; + } + /// + /// 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/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. + /// + /// A + /// The request body + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPutRequestInformation(global::Ayllu.Github.Client.Repos.Item.Item.Branches.Item.Protection.Restrictions.Apps.AppsPutRequestBody body, Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToPutRequestInformation(global::Ayllu.Github.Client.Repos.Item.Item.Branches.Item.Protection.Restrictions.Apps.AppsPutRequestBody body, Action> requestConfiguration = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation(Method.PUT, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.Repos.Item.Item.Branches.Item.Protection.Restrictions.Apps.AppsRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Repos.Item.Item.Branches.Item.Protection.Restrictions.Apps.AppsRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class AppsRequestBuilderDeleteRequestConfiguration : RequestConfiguration + { + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class AppsRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class AppsRequestBuilderPostRequestConfiguration : RequestConfiguration + { + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class AppsRequestBuilderPutRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Branches/Item/Protection/Restrictions/RestrictionsRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Branches/Item/Protection/Restrictions/RestrictionsRequestBuilder.cs new file mode 100644 index 0000000..a1e4e76 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Branches/Item/Protection/Restrictions/RestrictionsRequestBuilder.cs @@ -0,0 +1,160 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Ayllu.Github.Client.Repos.Item.Item.Branches.Item.Protection.Restrictions.Apps; +using Ayllu.Github.Client.Repos.Item.Item.Branches.Item.Protection.Restrictions.Teams; +using Ayllu.Github.Client.Repos.Item.Item.Branches.Item.Protection.Restrictions.Users; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.Branches.Item.Protection.Restrictions +{ + /// + /// Builds and executes requests for operations under \repos\{owner-id}\{repo-id}\branches\{branch}\protection\restrictions + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class RestrictionsRequestBuilder : BaseRequestBuilder + { + /// The apps property + public global::Ayllu.Github.Client.Repos.Item.Item.Branches.Item.Protection.Restrictions.Apps.AppsRequestBuilder Apps + { + get => new global::Ayllu.Github.Client.Repos.Item.Item.Branches.Item.Protection.Restrictions.Apps.AppsRequestBuilder(PathParameters, RequestAdapter); + } + /// The teams property + public global::Ayllu.Github.Client.Repos.Item.Item.Branches.Item.Protection.Restrictions.Teams.TeamsRequestBuilder Teams + { + get => new global::Ayllu.Github.Client.Repos.Item.Item.Branches.Item.Protection.Restrictions.Teams.TeamsRequestBuilder(PathParameters, RequestAdapter); + } + /// The users property + public global::Ayllu.Github.Client.Repos.Item.Item.Branches.Item.Protection.Restrictions.Users.UsersRequestBuilder Users + { + get => new global::Ayllu.Github.Client.Repos.Item.Item.Branches.Item.Protection.Restrictions.Users.UsersRequestBuilder(PathParameters, RequestAdapter); + } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public RestrictionsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/branches/{branch}/protection/restrictions", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public RestrictionsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/branches/{branch}/protection/restrictions", rawUrl) + { + } + /// + /// 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/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 + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task DeleteAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task DeleteAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToDeleteRequestInformation(requestConfiguration); + await RequestAdapter.SendNoContentAsync(requestInfo, default, cancellationToken).ConfigureAwait(false); + } + /// + /// 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/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. + /// API method documentation + /// + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 404 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "404", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Models.BranchRestrictionPolicy.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// 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/github/getting-started-with-github/githubs-products) in the GitHub Help documentation.Disables the ability to restrict who can push to this branch. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToDeleteRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToDeleteRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.DELETE, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + return requestInfo; + } + /// + /// 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/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. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.Repos.Item.Item.Branches.Item.Protection.Restrictions.RestrictionsRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Repos.Item.Item.Branches.Item.Protection.Restrictions.RestrictionsRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class RestrictionsRequestBuilderDeleteRequestConfiguration : RequestConfiguration + { + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class RestrictionsRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Branches/Item/Protection/Restrictions/Teams/TeamsDeleteRequestBodyMember1.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Branches/Item/Protection/Restrictions/Teams/TeamsDeleteRequestBodyMember1.cs new file mode 100644 index 0000000..17d47e5 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Branches/Item/Protection/Restrictions/Teams/TeamsDeleteRequestBodyMember1.cs @@ -0,0 +1,65 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.Branches.Item.Protection.Restrictions.Teams +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class TeamsDeleteRequestBodyMember1 : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The slug values for teams +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? Teams { get; set; } +#nullable restore +#else + public List Teams { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public TeamsDeleteRequestBodyMember1() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Repos.Item.Item.Branches.Item.Protection.Restrictions.Teams.TeamsDeleteRequestBodyMember1 CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Repos.Item.Item.Branches.Item.Protection.Restrictions.Teams.TeamsDeleteRequestBodyMember1(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "teams", n => { Teams = n.GetCollectionOfPrimitiveValues()?.AsList(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteCollectionOfPrimitiveValues("teams", Teams); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Branches/Item/Protection/Restrictions/Teams/TeamsPostRequestBodyMember1.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Branches/Item/Protection/Restrictions/Teams/TeamsPostRequestBodyMember1.cs new file mode 100644 index 0000000..c74bc3b --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Branches/Item/Protection/Restrictions/Teams/TeamsPostRequestBodyMember1.cs @@ -0,0 +1,65 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.Branches.Item.Protection.Restrictions.Teams +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class TeamsPostRequestBodyMember1 : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The slug values for teams +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? Teams { get; set; } +#nullable restore +#else + public List Teams { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public TeamsPostRequestBodyMember1() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Repos.Item.Item.Branches.Item.Protection.Restrictions.Teams.TeamsPostRequestBodyMember1 CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Repos.Item.Item.Branches.Item.Protection.Restrictions.Teams.TeamsPostRequestBodyMember1(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "teams", n => { Teams = n.GetCollectionOfPrimitiveValues()?.AsList(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteCollectionOfPrimitiveValues("teams", Teams); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Branches/Item/Protection/Restrictions/Teams/TeamsPutRequestBodyMember1.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Branches/Item/Protection/Restrictions/Teams/TeamsPutRequestBodyMember1.cs new file mode 100644 index 0000000..5d9a436 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Branches/Item/Protection/Restrictions/Teams/TeamsPutRequestBodyMember1.cs @@ -0,0 +1,65 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.Branches.Item.Protection.Restrictions.Teams +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class TeamsPutRequestBodyMember1 : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The slug values for teams +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? Teams { get; set; } +#nullable restore +#else + public List Teams { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public TeamsPutRequestBodyMember1() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Repos.Item.Item.Branches.Item.Protection.Restrictions.Teams.TeamsPutRequestBodyMember1 CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Repos.Item.Item.Branches.Item.Protection.Restrictions.Teams.TeamsPutRequestBodyMember1(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "teams", n => { Teams = n.GetCollectionOfPrimitiveValues()?.AsList(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteCollectionOfPrimitiveValues("teams", Teams); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Branches/Item/Protection/Restrictions/Teams/TeamsRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Branches/Item/Protection/Restrictions/Teams/TeamsRequestBuilder.cs new file mode 100644 index 0000000..56be9b6 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Branches/Item/Protection/Restrictions/Teams/TeamsRequestBuilder.cs @@ -0,0 +1,483 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.Branches.Item.Protection.Restrictions.Teams +{ + /// + /// Builds and executes requests for operations under \repos\{owner-id}\{repo-id}\branches\{branch}\protection\restrictions\teams + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class TeamsRequestBuilder : BaseRequestBuilder + { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public TeamsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/branches/{branch}/protection/restrictions/teams", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public TeamsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/branches/{branch}/protection/restrictions/teams", rawUrl) + { + } + /// + /// 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/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. + /// API method documentation + /// + /// A List<global::Ayllu.Github.Client.Models.Team> + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 422 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task?> DeleteAsync(global::Ayllu.Github.Client.Repos.Item.Item.Branches.Item.Protection.Restrictions.Teams.TeamsRequestBuilder.TeamsDeleteRequestBody body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task> DeleteAsync(global::Ayllu.Github.Client.Repos.Item.Item.Branches.Item.Protection.Restrictions.Teams.TeamsRequestBuilder.TeamsDeleteRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = ToDeleteRequestInformation(body, requestConfiguration); + var errorMapping = new Dictionary> + { + { "422", global::Ayllu.Github.Client.Models.ValidationError.CreateFromDiscriminatorValue }, + }; + var collectionResult = await RequestAdapter.SendCollectionAsync(requestInfo, global::Ayllu.Github.Client.Models.Team.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + return collectionResult?.AsList(); + } + /// + /// 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/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. + /// API method documentation + /// + /// A List<global::Ayllu.Github.Client.Models.Team> + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 404 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task?> GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task> GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "404", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + }; + var collectionResult = await RequestAdapter.SendCollectionAsync(requestInfo, global::Ayllu.Github.Client.Models.Team.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + return collectionResult?.AsList(); + } + /// + /// 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/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. + /// API method documentation + /// + /// A List<global::Ayllu.Github.Client.Models.Team> + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 422 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task?> PostAsync(global::Ayllu.Github.Client.Repos.Item.Item.Branches.Item.Protection.Restrictions.Teams.TeamsRequestBuilder.TeamsPostRequestBody body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task> PostAsync(global::Ayllu.Github.Client.Repos.Item.Item.Branches.Item.Protection.Restrictions.Teams.TeamsRequestBuilder.TeamsPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPostRequestInformation(body, requestConfiguration); + var errorMapping = new Dictionary> + { + { "422", global::Ayllu.Github.Client.Models.ValidationError.CreateFromDiscriminatorValue }, + }; + var collectionResult = await RequestAdapter.SendCollectionAsync(requestInfo, global::Ayllu.Github.Client.Models.Team.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + return collectionResult?.AsList(); + } + /// + /// 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/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. + /// API method documentation + /// + /// A List<global::Ayllu.Github.Client.Models.Team> + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 422 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task?> PutAsync(global::Ayllu.Github.Client.Repos.Item.Item.Branches.Item.Protection.Restrictions.Teams.TeamsRequestBuilder.TeamsPutRequestBody body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task> PutAsync(global::Ayllu.Github.Client.Repos.Item.Item.Branches.Item.Protection.Restrictions.Teams.TeamsRequestBuilder.TeamsPutRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPutRequestInformation(body, requestConfiguration); + var errorMapping = new Dictionary> + { + { "422", global::Ayllu.Github.Client.Models.ValidationError.CreateFromDiscriminatorValue }, + }; + var collectionResult = await RequestAdapter.SendCollectionAsync(requestInfo, global::Ayllu.Github.Client.Models.Team.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + return collectionResult?.AsList(); + } + /// + /// 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/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. + /// + /// A + /// The request body + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToDeleteRequestInformation(global::Ayllu.Github.Client.Repos.Item.Item.Branches.Item.Protection.Restrictions.Teams.TeamsRequestBuilder.TeamsDeleteRequestBody body, Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToDeleteRequestInformation(global::Ayllu.Github.Client.Repos.Item.Item.Branches.Item.Protection.Restrictions.Teams.TeamsRequestBuilder.TeamsDeleteRequestBody body, Action> requestConfiguration = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation(Method.DELETE, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + return requestInfo; + } + /// + /// 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/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. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// 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/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. + /// + /// A + /// The request body + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPostRequestInformation(global::Ayllu.Github.Client.Repos.Item.Item.Branches.Item.Protection.Restrictions.Teams.TeamsRequestBuilder.TeamsPostRequestBody body, Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToPostRequestInformation(global::Ayllu.Github.Client.Repos.Item.Item.Branches.Item.Protection.Restrictions.Teams.TeamsRequestBuilder.TeamsPostRequestBody body, Action> requestConfiguration = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + return requestInfo; + } + /// + /// 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/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. + /// + /// A + /// The request body + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPutRequestInformation(global::Ayllu.Github.Client.Repos.Item.Item.Branches.Item.Protection.Restrictions.Teams.TeamsRequestBuilder.TeamsPutRequestBody body, Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToPutRequestInformation(global::Ayllu.Github.Client.Repos.Item.Item.Branches.Item.Protection.Restrictions.Teams.TeamsRequestBuilder.TeamsPutRequestBody body, Action> requestConfiguration = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation(Method.PUT, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.Repos.Item.Item.Branches.Item.Protection.Restrictions.Teams.TeamsRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Repos.Item.Item.Branches.Item.Protection.Restrictions.Teams.TeamsRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Composed type wrapper for classes , List<string> + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class TeamsDeleteRequestBody : IComposedTypeWrapper, IParsable + { + /// Composed type representation for type List<string> +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? String { get; set; } +#nullable restore +#else + public List String { get; set; } +#endif + /// Composed type representation for type +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Repos.Item.Item.Branches.Item.Protection.Restrictions.Teams.TeamsDeleteRequestBodyMember1? TeamsDeleteRequestBodyMember1 { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Repos.Item.Item.Branches.Item.Protection.Restrictions.Teams.TeamsDeleteRequestBodyMember1 TeamsDeleteRequestBodyMember1 { get; set; } +#endif + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Repos.Item.Item.Branches.Item.Protection.Restrictions.Teams.TeamsRequestBuilder.TeamsDeleteRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + var mappingValue = parseNode.GetChildNode("")?.GetStringValue(); + var result = new global::Ayllu.Github.Client.Repos.Item.Item.Branches.Item.Protection.Restrictions.Teams.TeamsRequestBuilder.TeamsDeleteRequestBody(); + if("".Equals(mappingValue, StringComparison.OrdinalIgnoreCase)) + { + result.TeamsDeleteRequestBodyMember1 = new global::Ayllu.Github.Client.Repos.Item.Item.Branches.Item.Protection.Restrictions.Teams.TeamsDeleteRequestBodyMember1(); + } + else if(parseNode.GetCollectionOfPrimitiveValues()?.AsList() is List stringValue) + { + result.String = stringValue; + } + return result; + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + if(TeamsDeleteRequestBodyMember1 != null) + { + return TeamsDeleteRequestBodyMember1.GetFieldDeserializers(); + } + return new Dictionary>(); + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(TeamsDeleteRequestBodyMember1 != null) + { + writer.WriteObjectValue(null, TeamsDeleteRequestBodyMember1); + } + else if(String != null) + { + writer.WriteCollectionOfPrimitiveValues(null, String); + } + } + } + /// + /// Composed type wrapper for classes , List<string> + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class TeamsPostRequestBody : IComposedTypeWrapper, IParsable + { + /// Composed type representation for type List<string> +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? String { get; set; } +#nullable restore +#else + public List String { get; set; } +#endif + /// Composed type representation for type +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Repos.Item.Item.Branches.Item.Protection.Restrictions.Teams.TeamsPostRequestBodyMember1? TeamsPostRequestBodyMember1 { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Repos.Item.Item.Branches.Item.Protection.Restrictions.Teams.TeamsPostRequestBodyMember1 TeamsPostRequestBodyMember1 { get; set; } +#endif + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Repos.Item.Item.Branches.Item.Protection.Restrictions.Teams.TeamsRequestBuilder.TeamsPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + var mappingValue = parseNode.GetChildNode("")?.GetStringValue(); + var result = new global::Ayllu.Github.Client.Repos.Item.Item.Branches.Item.Protection.Restrictions.Teams.TeamsRequestBuilder.TeamsPostRequestBody(); + if("".Equals(mappingValue, StringComparison.OrdinalIgnoreCase)) + { + result.TeamsPostRequestBodyMember1 = new global::Ayllu.Github.Client.Repos.Item.Item.Branches.Item.Protection.Restrictions.Teams.TeamsPostRequestBodyMember1(); + } + else if(parseNode.GetCollectionOfPrimitiveValues()?.AsList() is List stringValue) + { + result.String = stringValue; + } + return result; + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + if(TeamsPostRequestBodyMember1 != null) + { + return TeamsPostRequestBodyMember1.GetFieldDeserializers(); + } + return new Dictionary>(); + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(TeamsPostRequestBodyMember1 != null) + { + writer.WriteObjectValue(null, TeamsPostRequestBodyMember1); + } + else if(String != null) + { + writer.WriteCollectionOfPrimitiveValues(null, String); + } + } + } + /// + /// Composed type wrapper for classes , List<string> + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class TeamsPutRequestBody : IComposedTypeWrapper, IParsable + { + /// Composed type representation for type List<string> +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? String { get; set; } +#nullable restore +#else + public List String { get; set; } +#endif + /// Composed type representation for type +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Repos.Item.Item.Branches.Item.Protection.Restrictions.Teams.TeamsPutRequestBodyMember1? TeamsPutRequestBodyMember1 { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Repos.Item.Item.Branches.Item.Protection.Restrictions.Teams.TeamsPutRequestBodyMember1 TeamsPutRequestBodyMember1 { get; set; } +#endif + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Repos.Item.Item.Branches.Item.Protection.Restrictions.Teams.TeamsRequestBuilder.TeamsPutRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + var mappingValue = parseNode.GetChildNode("")?.GetStringValue(); + var result = new global::Ayllu.Github.Client.Repos.Item.Item.Branches.Item.Protection.Restrictions.Teams.TeamsRequestBuilder.TeamsPutRequestBody(); + if("".Equals(mappingValue, StringComparison.OrdinalIgnoreCase)) + { + result.TeamsPutRequestBodyMember1 = new global::Ayllu.Github.Client.Repos.Item.Item.Branches.Item.Protection.Restrictions.Teams.TeamsPutRequestBodyMember1(); + } + else if(parseNode.GetCollectionOfPrimitiveValues()?.AsList() is List stringValue) + { + result.String = stringValue; + } + return result; + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + if(TeamsPutRequestBodyMember1 != null) + { + return TeamsPutRequestBodyMember1.GetFieldDeserializers(); + } + return new Dictionary>(); + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(TeamsPutRequestBodyMember1 != null) + { + writer.WriteObjectValue(null, TeamsPutRequestBodyMember1); + } + else if(String != null) + { + writer.WriteCollectionOfPrimitiveValues(null, String); + } + } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class TeamsRequestBuilderDeleteRequestConfiguration : RequestConfiguration + { + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class TeamsRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class TeamsRequestBuilderPostRequestConfiguration : RequestConfiguration + { + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class TeamsRequestBuilderPutRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Branches/Item/Protection/Restrictions/Users/UsersDeleteRequestBody.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Branches/Item/Protection/Restrictions/Users/UsersDeleteRequestBody.cs new file mode 100644 index 0000000..55f8b50 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Branches/Item/Protection/Restrictions/Users/UsersDeleteRequestBody.cs @@ -0,0 +1,65 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.Branches.Item.Protection.Restrictions.Users +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class UsersDeleteRequestBody : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The username for users +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? Users { get; set; } +#nullable restore +#else + public List Users { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public UsersDeleteRequestBody() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Repos.Item.Item.Branches.Item.Protection.Restrictions.Users.UsersDeleteRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Repos.Item.Item.Branches.Item.Protection.Restrictions.Users.UsersDeleteRequestBody(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "users", n => { Users = n.GetCollectionOfPrimitiveValues()?.AsList(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteCollectionOfPrimitiveValues("users", Users); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Branches/Item/Protection/Restrictions/Users/UsersPostRequestBody.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Branches/Item/Protection/Restrictions/Users/UsersPostRequestBody.cs new file mode 100644 index 0000000..ab5a522 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Branches/Item/Protection/Restrictions/Users/UsersPostRequestBody.cs @@ -0,0 +1,65 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.Branches.Item.Protection.Restrictions.Users +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class UsersPostRequestBody : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The username for users +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? Users { get; set; } +#nullable restore +#else + public List Users { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public UsersPostRequestBody() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Repos.Item.Item.Branches.Item.Protection.Restrictions.Users.UsersPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Repos.Item.Item.Branches.Item.Protection.Restrictions.Users.UsersPostRequestBody(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "users", n => { Users = n.GetCollectionOfPrimitiveValues()?.AsList(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteCollectionOfPrimitiveValues("users", Users); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Branches/Item/Protection/Restrictions/Users/UsersPutRequestBody.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Branches/Item/Protection/Restrictions/Users/UsersPutRequestBody.cs new file mode 100644 index 0000000..80e7b4c --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Branches/Item/Protection/Restrictions/Users/UsersPutRequestBody.cs @@ -0,0 +1,65 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.Branches.Item.Protection.Restrictions.Users +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class UsersPutRequestBody : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The username for users +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? Users { get; set; } +#nullable restore +#else + public List Users { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public UsersPutRequestBody() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Repos.Item.Item.Branches.Item.Protection.Restrictions.Users.UsersPutRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Repos.Item.Item.Branches.Item.Protection.Restrictions.Users.UsersPutRequestBody(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "users", n => { Users = n.GetCollectionOfPrimitiveValues()?.AsList(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteCollectionOfPrimitiveValues("users", Users); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Branches/Item/Protection/Restrictions/Users/UsersRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Branches/Item/Protection/Restrictions/Users/UsersRequestBuilder.cs new file mode 100644 index 0000000..d51fde9 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Branches/Item/Protection/Restrictions/Users/UsersRequestBuilder.cs @@ -0,0 +1,270 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.Branches.Item.Protection.Restrictions.Users +{ + /// + /// Builds and executes requests for operations under \repos\{owner-id}\{repo-id}\branches\{branch}\protection\restrictions\users + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class UsersRequestBuilder : BaseRequestBuilder + { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public UsersRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/branches/{branch}/protection/restrictions/users", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public UsersRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/branches/{branch}/protection/restrictions/users", rawUrl) + { + } + /// + /// 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/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. | + /// API method documentation + /// + /// A List<global::Ayllu.Github.Client.Models.SimpleUser> + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 422 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task?> DeleteAsync(global::Ayllu.Github.Client.Repos.Item.Item.Branches.Item.Protection.Restrictions.Users.UsersDeleteRequestBody body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task> DeleteAsync(global::Ayllu.Github.Client.Repos.Item.Item.Branches.Item.Protection.Restrictions.Users.UsersDeleteRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = ToDeleteRequestInformation(body, requestConfiguration); + var errorMapping = new Dictionary> + { + { "422", global::Ayllu.Github.Client.Models.ValidationError.CreateFromDiscriminatorValue }, + }; + var collectionResult = await RequestAdapter.SendCollectionAsync(requestInfo, global::Ayllu.Github.Client.Models.SimpleUser.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + return collectionResult?.AsList(); + } + /// + /// 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/github/getting-started-with-github/githubs-products) in the GitHub Help documentation.Lists the people who have push access to this branch. + /// API method documentation + /// + /// A List<global::Ayllu.Github.Client.Models.SimpleUser> + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 404 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task?> GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task> GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "404", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + }; + var collectionResult = await RequestAdapter.SendCollectionAsync(requestInfo, global::Ayllu.Github.Client.Models.SimpleUser.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + return collectionResult?.AsList(); + } + /// + /// 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/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. | + /// API method documentation + /// + /// A List<global::Ayllu.Github.Client.Models.SimpleUser> + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 422 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task?> PostAsync(global::Ayllu.Github.Client.Repos.Item.Item.Branches.Item.Protection.Restrictions.Users.UsersPostRequestBody body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task> PostAsync(global::Ayllu.Github.Client.Repos.Item.Item.Branches.Item.Protection.Restrictions.Users.UsersPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPostRequestInformation(body, requestConfiguration); + var errorMapping = new Dictionary> + { + { "422", global::Ayllu.Github.Client.Models.ValidationError.CreateFromDiscriminatorValue }, + }; + var collectionResult = await RequestAdapter.SendCollectionAsync(requestInfo, global::Ayllu.Github.Client.Models.SimpleUser.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + return collectionResult?.AsList(); + } + /// + /// 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/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. | + /// API method documentation + /// + /// A List<global::Ayllu.Github.Client.Models.SimpleUser> + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 422 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task?> PutAsync(global::Ayllu.Github.Client.Repos.Item.Item.Branches.Item.Protection.Restrictions.Users.UsersPutRequestBody body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task> PutAsync(global::Ayllu.Github.Client.Repos.Item.Item.Branches.Item.Protection.Restrictions.Users.UsersPutRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPutRequestInformation(body, requestConfiguration); + var errorMapping = new Dictionary> + { + { "422", global::Ayllu.Github.Client.Models.ValidationError.CreateFromDiscriminatorValue }, + }; + var collectionResult = await RequestAdapter.SendCollectionAsync(requestInfo, global::Ayllu.Github.Client.Models.SimpleUser.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + return collectionResult?.AsList(); + } + /// + /// 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/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. | + /// + /// A + /// The request body + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToDeleteRequestInformation(global::Ayllu.Github.Client.Repos.Item.Item.Branches.Item.Protection.Restrictions.Users.UsersDeleteRequestBody body, Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToDeleteRequestInformation(global::Ayllu.Github.Client.Repos.Item.Item.Branches.Item.Protection.Restrictions.Users.UsersDeleteRequestBody body, Action> requestConfiguration = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation(Method.DELETE, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + return requestInfo; + } + /// + /// 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/github/getting-started-with-github/githubs-products) in the GitHub Help documentation.Lists the people who have push access to this branch. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// 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/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. | + /// + /// A + /// The request body + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPostRequestInformation(global::Ayllu.Github.Client.Repos.Item.Item.Branches.Item.Protection.Restrictions.Users.UsersPostRequestBody body, Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToPostRequestInformation(global::Ayllu.Github.Client.Repos.Item.Item.Branches.Item.Protection.Restrictions.Users.UsersPostRequestBody body, Action> requestConfiguration = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + return requestInfo; + } + /// + /// 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/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. | + /// + /// A + /// The request body + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPutRequestInformation(global::Ayllu.Github.Client.Repos.Item.Item.Branches.Item.Protection.Restrictions.Users.UsersPutRequestBody body, Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToPutRequestInformation(global::Ayllu.Github.Client.Repos.Item.Item.Branches.Item.Protection.Restrictions.Users.UsersPutRequestBody body, Action> requestConfiguration = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation(Method.PUT, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.Repos.Item.Item.Branches.Item.Protection.Restrictions.Users.UsersRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Repos.Item.Item.Branches.Item.Protection.Restrictions.Users.UsersRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class UsersRequestBuilderDeleteRequestConfiguration : RequestConfiguration + { + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class UsersRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class UsersRequestBuilderPostRequestConfiguration : RequestConfiguration + { + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class UsersRequestBuilderPutRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Branches/Item/Rename/RenamePostRequestBody.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Branches/Item/Rename/RenamePostRequestBody.cs new file mode 100644 index 0000000..8404891 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Branches/Item/Rename/RenamePostRequestBody.cs @@ -0,0 +1,65 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.Branches.Item.Rename +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class RenamePostRequestBody : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The new name of the branch. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? NewName { get; set; } +#nullable restore +#else + public string NewName { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public RenamePostRequestBody() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Repos.Item.Item.Branches.Item.Rename.RenamePostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Repos.Item.Item.Branches.Item.Rename.RenamePostRequestBody(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "new_name", n => { NewName = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("new_name", NewName); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Branches/Item/Rename/RenameRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Branches/Item/Rename/RenameRequestBuilder.cs new file mode 100644 index 0000000..b69889f --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Branches/Item/Rename/RenameRequestBuilder.cs @@ -0,0 +1,107 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.Branches.Item.Rename +{ + /// + /// Builds and executes requests for operations under \repos\{owner-id}\{repo-id}\branches\{branch}\rename + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class RenameRequestBuilder : BaseRequestBuilder + { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public RenameRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/branches/{branch}/rename", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public RenameRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/branches/{branch}/rename", rawUrl) + { + } + /// + /// 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/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. + /// API method documentation + /// + /// A + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 403 status code + /// When receiving a 404 status code + /// When receiving a 422 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PostAsync(global::Ayllu.Github.Client.Repos.Item.Item.Branches.Item.Rename.RenamePostRequestBody body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task PostAsync(global::Ayllu.Github.Client.Repos.Item.Item.Branches.Item.Rename.RenamePostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPostRequestInformation(body, requestConfiguration); + var errorMapping = new Dictionary> + { + { "403", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "404", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "422", global::Ayllu.Github.Client.Models.ValidationError.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Models.BranchWithProtection.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// 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/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. + /// + /// A + /// The request body + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPostRequestInformation(global::Ayllu.Github.Client.Repos.Item.Item.Branches.Item.Rename.RenamePostRequestBody body, Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToPostRequestInformation(global::Ayllu.Github.Client.Repos.Item.Item.Branches.Item.Rename.RenamePostRequestBody body, Action> requestConfiguration = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.Repos.Item.Item.Branches.Item.Rename.RenameRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Repos.Item.Item.Branches.Item.Rename.RenameRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class RenameRequestBuilderPostRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Branches/Item/WithBranchItemRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Branches/Item/WithBranchItemRequestBuilder.cs new file mode 100644 index 0000000..9701630 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Branches/Item/WithBranchItemRequestBuilder.cs @@ -0,0 +1,107 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Ayllu.Github.Client.Repos.Item.Item.Branches.Item.Protection; +using Ayllu.Github.Client.Repos.Item.Item.Branches.Item.Rename; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.Branches.Item +{ + /// + /// Builds and executes requests for operations under \repos\{owner-id}\{repo-id}\branches\{branch} + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithBranchItemRequestBuilder : BaseRequestBuilder + { + /// The protection property + public global::Ayllu.Github.Client.Repos.Item.Item.Branches.Item.Protection.ProtectionRequestBuilder Protection + { + get => new global::Ayllu.Github.Client.Repos.Item.Item.Branches.Item.Protection.ProtectionRequestBuilder(PathParameters, RequestAdapter); + } + /// The rename property + public global::Ayllu.Github.Client.Repos.Item.Item.Branches.Item.Rename.RenameRequestBuilder Rename + { + get => new global::Ayllu.Github.Client.Repos.Item.Item.Branches.Item.Rename.RenameRequestBuilder(PathParameters, RequestAdapter); + } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public WithBranchItemRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/branches/{branch}", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public WithBranchItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/branches/{branch}", rawUrl) + { + } + /// + /// Get a branch + /// API method documentation + /// + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 404 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "404", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Models.BranchWithProtection.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.Repos.Item.Item.Branches.Item.WithBranchItemRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Repos.Item.Item.Branches.Item.WithBranchItemRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithBranchItemRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/CheckRuns/CheckRunsPostRequestBodyMember1.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/CheckRuns/CheckRunsPostRequestBodyMember1.cs new file mode 100644 index 0000000..b4839ca --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/CheckRuns/CheckRunsPostRequestBodyMember1.cs @@ -0,0 +1,59 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.CheckRuns +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class CheckRunsPostRequestBodyMember1 : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The status property + public global::Ayllu.Github.Client.Repos.Item.Item.CheckRuns.CheckRunsPostRequestBodyMember1_status? Status { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public CheckRunsPostRequestBodyMember1() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Repos.Item.Item.CheckRuns.CheckRunsPostRequestBodyMember1 CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Repos.Item.Item.CheckRuns.CheckRunsPostRequestBodyMember1(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "status", n => { Status = n.GetEnumValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteEnumValue("status", Status); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/CheckRuns/CheckRunsPostRequestBodyMember1_status.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/CheckRuns/CheckRunsPostRequestBodyMember1_status.cs new file mode 100644 index 0000000..90764ac --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/CheckRuns/CheckRunsPostRequestBodyMember1_status.cs @@ -0,0 +1,16 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.CheckRuns +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public enum CheckRunsPostRequestBodyMember1_status + #pragma warning restore CS1591 + { + [EnumMember(Value = "completed")] + #pragma warning disable CS1591 + Completed, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/CheckRuns/CheckRunsPostRequestBodyMember2.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/CheckRuns/CheckRunsPostRequestBodyMember2.cs new file mode 100644 index 0000000..af05516 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/CheckRuns/CheckRunsPostRequestBodyMember2.cs @@ -0,0 +1,59 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.CheckRuns +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class CheckRunsPostRequestBodyMember2 : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The status property + public global::Ayllu.Github.Client.Repos.Item.Item.CheckRuns.CheckRunsPostRequestBodyMember2_status? Status { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public CheckRunsPostRequestBodyMember2() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Repos.Item.Item.CheckRuns.CheckRunsPostRequestBodyMember2 CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Repos.Item.Item.CheckRuns.CheckRunsPostRequestBodyMember2(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "status", n => { Status = n.GetEnumValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteEnumValue("status", Status); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/CheckRuns/CheckRunsPostRequestBodyMember2_status.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/CheckRuns/CheckRunsPostRequestBodyMember2_status.cs new file mode 100644 index 0000000..9ae3667 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/CheckRuns/CheckRunsPostRequestBodyMember2_status.cs @@ -0,0 +1,20 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.CheckRuns +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public enum CheckRunsPostRequestBodyMember2_status + #pragma warning restore CS1591 + { + [EnumMember(Value = "queued")] + #pragma warning disable CS1591 + Queued, + #pragma warning restore CS1591 + [EnumMember(Value = "in_progress")] + #pragma warning disable CS1591 + In_progress, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/CheckRuns/CheckRunsRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/CheckRuns/CheckRunsRequestBuilder.cs new file mode 100644 index 0000000..5a36c34 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/CheckRuns/CheckRunsRequestBuilder.cs @@ -0,0 +1,199 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Ayllu.Github.Client.Repos.Item.Item.CheckRuns.Item; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.CheckRuns +{ + /// + /// Builds and executes requests for operations under \repos\{owner-id}\{repo-id}\check-runs + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class CheckRunsRequestBuilder : BaseRequestBuilder + { + /// Gets an item from the Ayllu.Github.Client.repos.item.item.checkRuns.item collection + /// The unique identifier of the check run. + /// A + public global::Ayllu.Github.Client.Repos.Item.Item.CheckRuns.Item.WithCheck_run_ItemRequestBuilder this[int position] + { + get + { + var urlTplParams = new Dictionary(PathParameters); + urlTplParams.Add("check_run_id", position); + return new global::Ayllu.Github.Client.Repos.Item.Item.CheckRuns.Item.WithCheck_run_ItemRequestBuilder(urlTplParams, RequestAdapter); + } + } + /// Gets an item from the Ayllu.Github.Client.repos.item.item.checkRuns.item collection + /// The unique identifier of the check run. + /// A + [Obsolete("This indexer is deprecated and will be removed in the next major version. Use the one with the typed parameter instead.")] + public global::Ayllu.Github.Client.Repos.Item.Item.CheckRuns.Item.WithCheck_run_ItemRequestBuilder this[string position] + { + get + { + var urlTplParams = new Dictionary(PathParameters); + if (!string.IsNullOrWhiteSpace(position)) urlTplParams.Add("check_run_id", position); + return new global::Ayllu.Github.Client.Repos.Item.Item.CheckRuns.Item.WithCheck_run_ItemRequestBuilder(urlTplParams, RequestAdapter); + } + } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public CheckRunsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/check-runs", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public CheckRunsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/check-runs", rawUrl) + { + } + /// + /// 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. + /// API method documentation + /// + /// A + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PostAsync(global::Ayllu.Github.Client.Repos.Item.Item.CheckRuns.CheckRunsRequestBuilder.CheckRunsPostRequestBody body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task PostAsync(global::Ayllu.Github.Client.Repos.Item.Item.CheckRuns.CheckRunsRequestBuilder.CheckRunsPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPostRequestInformation(body, requestConfiguration); + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Models.CheckRun.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false); + } + /// + /// 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. + /// + /// A + /// The request body + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPostRequestInformation(global::Ayllu.Github.Client.Repos.Item.Item.CheckRuns.CheckRunsRequestBuilder.CheckRunsPostRequestBody body, Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToPostRequestInformation(global::Ayllu.Github.Client.Repos.Item.Item.CheckRuns.CheckRunsRequestBuilder.CheckRunsPostRequestBody body, Action> requestConfiguration = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.Repos.Item.Item.CheckRuns.CheckRunsRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Repos.Item.Item.CheckRuns.CheckRunsRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Composed type wrapper for classes , + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class CheckRunsPostRequestBody : IComposedTypeWrapper, IParsable + { + /// Composed type representation for type +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Repos.Item.Item.CheckRuns.CheckRunsPostRequestBodyMember1? CheckRunsPostRequestBodyMember1 { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Repos.Item.Item.CheckRuns.CheckRunsPostRequestBodyMember1 CheckRunsPostRequestBodyMember1 { get; set; } +#endif + /// Composed type representation for type +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Repos.Item.Item.CheckRuns.CheckRunsPostRequestBodyMember2? CheckRunsPostRequestBodyMember2 { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Repos.Item.Item.CheckRuns.CheckRunsPostRequestBodyMember2 CheckRunsPostRequestBodyMember2 { get; set; } +#endif + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Repos.Item.Item.CheckRuns.CheckRunsRequestBuilder.CheckRunsPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + var mappingValue = parseNode.GetChildNode("status")?.GetStringValue(); + var result = new global::Ayllu.Github.Client.Repos.Item.Item.CheckRuns.CheckRunsRequestBuilder.CheckRunsPostRequestBody(); + if("".Equals(mappingValue, StringComparison.OrdinalIgnoreCase)) + { + result.CheckRunsPostRequestBodyMember1 = new global::Ayllu.Github.Client.Repos.Item.Item.CheckRuns.CheckRunsPostRequestBodyMember1(); + } + else if("".Equals(mappingValue, StringComparison.OrdinalIgnoreCase)) + { + result.CheckRunsPostRequestBodyMember2 = new global::Ayllu.Github.Client.Repos.Item.Item.CheckRuns.CheckRunsPostRequestBodyMember2(); + } + return result; + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + if(CheckRunsPostRequestBodyMember1 != null) + { + return CheckRunsPostRequestBodyMember1.GetFieldDeserializers(); + } + else if(CheckRunsPostRequestBodyMember2 != null) + { + return CheckRunsPostRequestBodyMember2.GetFieldDeserializers(); + } + return new Dictionary>(); + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(CheckRunsPostRequestBodyMember1 != null) + { + writer.WriteObjectValue(null, CheckRunsPostRequestBodyMember1); + } + else if(CheckRunsPostRequestBodyMember2 != null) + { + writer.WriteObjectValue(null, CheckRunsPostRequestBodyMember2); + } + } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class CheckRunsRequestBuilderPostRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/CheckRuns/Item/Annotations/AnnotationsRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/CheckRuns/Item/Annotations/AnnotationsRequestBuilder.cs new file mode 100644 index 0000000..f4ba481 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/CheckRuns/Item/Annotations/AnnotationsRequestBuilder.cs @@ -0,0 +1,107 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.CheckRuns.Item.Annotations +{ + /// + /// Builds and executes requests for operations under \repos\{owner-id}\{repo-id}\check-runs\{check_run_id}\annotations + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class AnnotationsRequestBuilder : BaseRequestBuilder + { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public AnnotationsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/check-runs/{check_run_id}/annotations{?page*,per_page*}", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public AnnotationsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/check-runs/{check_run_id}/annotations{?page*,per_page*}", rawUrl) + { + } + /// + /// 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. + /// API method documentation + /// + /// A List<global::Ayllu.Github.Client.Models.CheckAnnotation> + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task?> GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task> GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var collectionResult = await RequestAdapter.SendCollectionAsync(requestInfo, global::Ayllu.Github.Client.Models.CheckAnnotation.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false); + return collectionResult?.AsList(); + } + /// + /// 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. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.Repos.Item.Item.CheckRuns.Item.Annotations.AnnotationsRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Repos.Item.Item.CheckRuns.Item.Annotations.AnnotationsRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// 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. + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class AnnotationsRequestBuilderGetQueryParameters + { + /// The page number of the results to fetch. For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." + [QueryParameter("page")] + public int? Page { get; set; } + /// The number of results per page (max 100). For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." + [QueryParameter("per_page")] + public int? PerPage { get; set; } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class AnnotationsRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/CheckRuns/Item/Rerequest/RerequestRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/CheckRuns/Item/Rerequest/RerequestRequestBuilder.cs new file mode 100644 index 0000000..0ce7045 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/CheckRuns/Item/Rerequest/RerequestRequestBuilder.cs @@ -0,0 +1,102 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.CheckRuns.Item.Rerequest +{ + /// + /// Builds and executes requests for operations under \repos\{owner-id}\{repo-id}\check-runs\{check_run_id}\rerequest + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class RerequestRequestBuilder : BaseRequestBuilder + { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public RerequestRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/check-runs/{check_run_id}/rerequest", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public RerequestRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/check-runs/{check_run_id}/rerequest", rawUrl) + { + } + /// + /// 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/webhooks/event-payloads/#check_run) event with the action `rerequested`. When a check run is `rerequested`, the `status` of the check suite it belongs to is reset to `queued` and the `conclusion` is cleared. The check run itself is not updated. GitHub apps recieving the [`check_run` webhook](https://docs.github.com/webhooks/event-payloads/#check_run) with the `rerequested` action should then decide if the check run should be reset or updated and call the [update `check_run` endpoint](https://docs.github.com/rest/checks/runs#update-a-check-run) to update the check_run if desired.For more information about how to re-run GitHub Actions jobs, see "[Re-run a job from a workflow run](https://docs.github.com/rest/actions/workflow-runs#re-run-a-job-from-a-workflow-run)". + /// API method documentation + /// + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 403 status code + /// When receiving a 404 status code + /// When receiving a 422 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PostAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task PostAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToPostRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "403", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "404", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "422", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Models.EmptyObject.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// 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/webhooks/event-payloads/#check_run) event with the action `rerequested`. When a check run is `rerequested`, the `status` of the check suite it belongs to is reset to `queued` and the `conclusion` is cleared. The check run itself is not updated. GitHub apps recieving the [`check_run` webhook](https://docs.github.com/webhooks/event-payloads/#check_run) with the `rerequested` action should then decide if the check run should be reset or updated and call the [update `check_run` endpoint](https://docs.github.com/rest/checks/runs#update-a-check-run) to update the check_run if desired.For more information about how to re-run GitHub Actions jobs, see "[Re-run a job from a workflow run](https://docs.github.com/rest/actions/workflow-runs#re-run-a-job-from-a-workflow-run)". + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPostRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToPostRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.Repos.Item.Item.CheckRuns.Item.Rerequest.RerequestRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Repos.Item.Item.CheckRuns.Item.Rerequest.RerequestRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class RerequestRequestBuilderPostRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/CheckRuns/Item/WithCheck_run_ItemRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/CheckRuns/Item/WithCheck_run_ItemRequestBuilder.cs new file mode 100644 index 0000000..49b5ed2 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/CheckRuns/Item/WithCheck_run_ItemRequestBuilder.cs @@ -0,0 +1,213 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Ayllu.Github.Client.Repos.Item.Item.CheckRuns.Item.Annotations; +using Ayllu.Github.Client.Repos.Item.Item.CheckRuns.Item.Rerequest; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.CheckRuns.Item +{ + /// + /// Builds and executes requests for operations under \repos\{owner-id}\{repo-id}\check-runs\{check_run_id} + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithCheck_run_ItemRequestBuilder : BaseRequestBuilder + { + /// The annotations property + public global::Ayllu.Github.Client.Repos.Item.Item.CheckRuns.Item.Annotations.AnnotationsRequestBuilder Annotations + { + get => new global::Ayllu.Github.Client.Repos.Item.Item.CheckRuns.Item.Annotations.AnnotationsRequestBuilder(PathParameters, RequestAdapter); + } + /// The rerequest property + public global::Ayllu.Github.Client.Repos.Item.Item.CheckRuns.Item.Rerequest.RerequestRequestBuilder Rerequest + { + get => new global::Ayllu.Github.Client.Repos.Item.Item.CheckRuns.Item.Rerequest.RerequestRequestBuilder(PathParameters, RequestAdapter); + } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public WithCheck_run_ItemRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/check-runs/{check_run_id}", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public WithCheck_run_ItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/check-runs/{check_run_id}", rawUrl) + { + } + /// + /// 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. + /// API method documentation + /// + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Models.CheckRun.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false); + } + /// + /// 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. + /// API method documentation + /// + /// A + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PatchAsync(global::Ayllu.Github.Client.Repos.Item.Item.CheckRuns.Item.WithCheck_run_ItemRequestBuilder.WithCheck_run_PatchRequestBody body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task PatchAsync(global::Ayllu.Github.Client.Repos.Item.Item.CheckRuns.Item.WithCheck_run_ItemRequestBuilder.WithCheck_run_PatchRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPatchRequestInformation(body, requestConfiguration); + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Models.CheckRun.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false); + } + /// + /// 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. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// 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. + /// + /// A + /// The request body + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPatchRequestInformation(global::Ayllu.Github.Client.Repos.Item.Item.CheckRuns.Item.WithCheck_run_ItemRequestBuilder.WithCheck_run_PatchRequestBody body, Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToPatchRequestInformation(global::Ayllu.Github.Client.Repos.Item.Item.CheckRuns.Item.WithCheck_run_ItemRequestBuilder.WithCheck_run_PatchRequestBody body, Action> requestConfiguration = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.Repos.Item.Item.CheckRuns.Item.WithCheck_run_ItemRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Repos.Item.Item.CheckRuns.Item.WithCheck_run_ItemRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithCheck_run_ItemRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithCheck_run_ItemRequestBuilderPatchRequestConfiguration : RequestConfiguration + { + } + /// + /// Composed type wrapper for classes , + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithCheck_run_PatchRequestBody : IComposedTypeWrapper, IParsable + { + /// Composed type representation for type +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Repos.Item.Item.CheckRuns.Item.WithCheck_run_PatchRequestBodyMember1? WithCheckRunPatchRequestBodyMember1 { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Repos.Item.Item.CheckRuns.Item.WithCheck_run_PatchRequestBodyMember1 WithCheckRunPatchRequestBodyMember1 { get; set; } +#endif + /// Composed type representation for type +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Repos.Item.Item.CheckRuns.Item.WithCheck_run_PatchRequestBodyMember2? WithCheckRunPatchRequestBodyMember2 { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Repos.Item.Item.CheckRuns.Item.WithCheck_run_PatchRequestBodyMember2 WithCheckRunPatchRequestBodyMember2 { get; set; } +#endif + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Repos.Item.Item.CheckRuns.Item.WithCheck_run_ItemRequestBuilder.WithCheck_run_PatchRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + var result = new global::Ayllu.Github.Client.Repos.Item.Item.CheckRuns.Item.WithCheck_run_ItemRequestBuilder.WithCheck_run_PatchRequestBody(); + result.WithCheckRunPatchRequestBodyMember1 = new global::Ayllu.Github.Client.Repos.Item.Item.CheckRuns.Item.WithCheck_run_PatchRequestBodyMember1(); + result.WithCheckRunPatchRequestBodyMember2 = new global::Ayllu.Github.Client.Repos.Item.Item.CheckRuns.Item.WithCheck_run_PatchRequestBodyMember2(); + return result; + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + if(WithCheckRunPatchRequestBodyMember1 != null || WithCheckRunPatchRequestBodyMember2 != null) + { + return ParseNodeHelper.MergeDeserializersForIntersectionWrapper(WithCheckRunPatchRequestBodyMember1, WithCheckRunPatchRequestBodyMember2); + } + return new Dictionary>(); + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteObjectValue(null, WithCheckRunPatchRequestBodyMember1, WithCheckRunPatchRequestBodyMember2); + } + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/CheckRuns/Item/WithCheck_run_PatchRequestBodyMember1.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/CheckRuns/Item/WithCheck_run_PatchRequestBodyMember1.cs new file mode 100644 index 0000000..8833a9a --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/CheckRuns/Item/WithCheck_run_PatchRequestBodyMember1.cs @@ -0,0 +1,59 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.CheckRuns.Item +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class WithCheck_run_PatchRequestBodyMember1 : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The status property + public global::Ayllu.Github.Client.Repos.Item.Item.CheckRuns.Item.WithCheck_run_PatchRequestBodyMember1_status? Status { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public WithCheck_run_PatchRequestBodyMember1() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Repos.Item.Item.CheckRuns.Item.WithCheck_run_PatchRequestBodyMember1 CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Repos.Item.Item.CheckRuns.Item.WithCheck_run_PatchRequestBodyMember1(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "status", n => { Status = n.GetEnumValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteEnumValue("status", Status); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/CheckRuns/Item/WithCheck_run_PatchRequestBodyMember1_status.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/CheckRuns/Item/WithCheck_run_PatchRequestBodyMember1_status.cs new file mode 100644 index 0000000..917c7ab --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/CheckRuns/Item/WithCheck_run_PatchRequestBodyMember1_status.cs @@ -0,0 +1,16 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.CheckRuns.Item +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public enum WithCheck_run_PatchRequestBodyMember1_status + #pragma warning restore CS1591 + { + [EnumMember(Value = "completed")] + #pragma warning disable CS1591 + Completed, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/CheckRuns/Item/WithCheck_run_PatchRequestBodyMember2.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/CheckRuns/Item/WithCheck_run_PatchRequestBodyMember2.cs new file mode 100644 index 0000000..7386dd2 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/CheckRuns/Item/WithCheck_run_PatchRequestBodyMember2.cs @@ -0,0 +1,59 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.CheckRuns.Item +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class WithCheck_run_PatchRequestBodyMember2 : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The status property + public global::Ayllu.Github.Client.Repos.Item.Item.CheckRuns.Item.WithCheck_run_PatchRequestBodyMember2_status? Status { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public WithCheck_run_PatchRequestBodyMember2() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Repos.Item.Item.CheckRuns.Item.WithCheck_run_PatchRequestBodyMember2 CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Repos.Item.Item.CheckRuns.Item.WithCheck_run_PatchRequestBodyMember2(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "status", n => { Status = n.GetEnumValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteEnumValue("status", Status); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/CheckRuns/Item/WithCheck_run_PatchRequestBodyMember2_status.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/CheckRuns/Item/WithCheck_run_PatchRequestBodyMember2_status.cs new file mode 100644 index 0000000..f713d55 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/CheckRuns/Item/WithCheck_run_PatchRequestBodyMember2_status.cs @@ -0,0 +1,20 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.CheckRuns.Item +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public enum WithCheck_run_PatchRequestBodyMember2_status + #pragma warning restore CS1591 + { + [EnumMember(Value = "queued")] + #pragma warning disable CS1591 + Queued, + #pragma warning restore CS1591 + [EnumMember(Value = "in_progress")] + #pragma warning disable CS1591 + In_progress, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/CheckSuites/CheckSuitesPostRequestBody.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/CheckSuites/CheckSuitesPostRequestBody.cs new file mode 100644 index 0000000..3cbe039 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/CheckSuites/CheckSuitesPostRequestBody.cs @@ -0,0 +1,65 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.CheckSuites +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class CheckSuitesPostRequestBody : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The sha of the head commit. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? HeadSha { get; set; } +#nullable restore +#else + public string HeadSha { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public CheckSuitesPostRequestBody() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Repos.Item.Item.CheckSuites.CheckSuitesPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Repos.Item.Item.CheckSuites.CheckSuitesPostRequestBody(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "head_sha", n => { HeadSha = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("head_sha", HeadSha); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/CheckSuites/CheckSuitesRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/CheckSuites/CheckSuitesRequestBuilder.cs new file mode 100644 index 0000000..1b28479 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/CheckSuites/CheckSuitesRequestBuilder.cs @@ -0,0 +1,130 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Ayllu.Github.Client.Repos.Item.Item.CheckSuites.Item; +using Ayllu.Github.Client.Repos.Item.Item.CheckSuites.Preferences; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.CheckSuites +{ + /// + /// Builds and executes requests for operations under \repos\{owner-id}\{repo-id}\check-suites + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class CheckSuitesRequestBuilder : BaseRequestBuilder + { + /// The preferences property + public global::Ayllu.Github.Client.Repos.Item.Item.CheckSuites.Preferences.PreferencesRequestBuilder Preferences + { + get => new global::Ayllu.Github.Client.Repos.Item.Item.CheckSuites.Preferences.PreferencesRequestBuilder(PathParameters, RequestAdapter); + } + /// Gets an item from the Ayllu.Github.Client.repos.item.item.checkSuites.item collection + /// The unique identifier of the check suite. + /// A + public global::Ayllu.Github.Client.Repos.Item.Item.CheckSuites.Item.WithCheck_suite_ItemRequestBuilder this[int position] + { + get + { + var urlTplParams = new Dictionary(PathParameters); + urlTplParams.Add("check_suite_id", position); + return new global::Ayllu.Github.Client.Repos.Item.Item.CheckSuites.Item.WithCheck_suite_ItemRequestBuilder(urlTplParams, RequestAdapter); + } + } + /// Gets an item from the Ayllu.Github.Client.repos.item.item.checkSuites.item collection + /// The unique identifier of the check suite. + /// A + [Obsolete("This indexer is deprecated and will be removed in the next major version. Use the one with the typed parameter instead.")] + public global::Ayllu.Github.Client.Repos.Item.Item.CheckSuites.Item.WithCheck_suite_ItemRequestBuilder this[string position] + { + get + { + var urlTplParams = new Dictionary(PathParameters); + if (!string.IsNullOrWhiteSpace(position)) urlTplParams.Add("check_suite_id", position); + return new global::Ayllu.Github.Client.Repos.Item.Item.CheckSuites.Item.WithCheck_suite_ItemRequestBuilder(urlTplParams, RequestAdapter); + } + } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public CheckSuitesRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/check-suites", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public CheckSuitesRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/check-suites", rawUrl) + { + } + /// + /// Creates a check suite manually. By default, check suites are automatically created when you create a [check run](https://docs.github.com/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/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. + /// API method documentation + /// + /// A + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PostAsync(global::Ayllu.Github.Client.Repos.Item.Item.CheckSuites.CheckSuitesPostRequestBody body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task PostAsync(global::Ayllu.Github.Client.Repos.Item.Item.CheckSuites.CheckSuitesPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPostRequestInformation(body, requestConfiguration); + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Models.CheckSuite.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false); + } + /// + /// Creates a check suite manually. By default, check suites are automatically created when you create a [check run](https://docs.github.com/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/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. + /// + /// A + /// The request body + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPostRequestInformation(global::Ayllu.Github.Client.Repos.Item.Item.CheckSuites.CheckSuitesPostRequestBody body, Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToPostRequestInformation(global::Ayllu.Github.Client.Repos.Item.Item.CheckSuites.CheckSuitesPostRequestBody body, Action> requestConfiguration = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.Repos.Item.Item.CheckSuites.CheckSuitesRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Repos.Item.Item.CheckSuites.CheckSuitesRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class CheckSuitesRequestBuilderPostRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/CheckSuites/Item/CheckRuns/CheckRunsGetResponse.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/CheckSuites/Item/CheckRuns/CheckRunsGetResponse.cs new file mode 100644 index 0000000..a0e438b --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/CheckSuites/Item/CheckRuns/CheckRunsGetResponse.cs @@ -0,0 +1,70 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.CheckSuites.Item.CheckRuns +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class CheckRunsGetResponse : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The check_runs property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? CheckRuns { get; set; } +#nullable restore +#else + public List CheckRuns { get; set; } +#endif + /// The total_count property + public int? TotalCount { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public CheckRunsGetResponse() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Repos.Item.Item.CheckSuites.Item.CheckRuns.CheckRunsGetResponse CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Repos.Item.Item.CheckSuites.Item.CheckRuns.CheckRunsGetResponse(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "check_runs", n => { CheckRuns = n.GetCollectionOfObjectValues(global::Ayllu.Github.Client.Models.CheckRun.CreateFromDiscriminatorValue)?.AsList(); } }, + { "total_count", n => { TotalCount = n.GetIntValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteCollectionOfObjectValues("check_runs", CheckRuns); + writer.WriteIntValue("total_count", TotalCount); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/CheckSuites/Item/CheckRuns/CheckRunsRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/CheckSuites/Item/CheckRuns/CheckRunsRequestBuilder.cs new file mode 100644 index 0000000..8121c21 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/CheckSuites/Item/CheckRuns/CheckRunsRequestBuilder.cs @@ -0,0 +1,163 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.CheckSuites.Item.CheckRuns +{ + /// + /// Builds and executes requests for operations under \repos\{owner-id}\{repo-id}\check-suites\{check_suite_id}\check-runs + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class CheckRunsRequestBuilder : BaseRequestBuilder + { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public CheckRunsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/check-suites/{check_suite_id}/check-runs{?check_name*,filter*,page*,per_page*,status*}", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public CheckRunsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/check-suites/{check_suite_id}/check-runs{?check_name*,filter*,page*,per_page*,status*}", rawUrl) + { + } + /// + /// 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. + /// API method documentation + /// + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsCheckRunsGetResponseAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task GetAsCheckRunsGetResponseAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Repos.Item.Item.CheckSuites.Item.CheckRuns.CheckRunsGetResponse.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false); + } + /// + /// 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. + /// API method documentation + /// + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + [Obsolete("This method is obsolete. Use GetAsCheckRunsGetResponseAsync instead.")] +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Repos.Item.Item.CheckSuites.Item.CheckRuns.CheckRunsResponse.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false); + } + /// + /// 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. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.Repos.Item.Item.CheckSuites.Item.CheckRuns.CheckRunsRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Repos.Item.Item.CheckSuites.Item.CheckRuns.CheckRunsRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// 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. + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class CheckRunsRequestBuilderGetQueryParameters + { + /// Returns check runs with the specified `name`. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("check_name")] + public string? CheckName { get; set; } +#nullable restore +#else + [QueryParameter("check_name")] + public string CheckName { get; set; } +#endif + /// Filters check runs by their `completed_at` timestamp. `latest` returns the most recent check runs. + [Obsolete("This property is deprecated, use FilterAsGetFilterQueryParameterType instead")] +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("filter")] + public string? Filter { get; set; } +#nullable restore +#else + [QueryParameter("filter")] + public string Filter { get; set; } +#endif + /// Filters check runs by their `completed_at` timestamp. `latest` returns the most recent check runs. + [QueryParameter("filter")] + public global::Ayllu.Github.Client.Repos.Item.Item.CheckSuites.Item.CheckRuns.GetFilterQueryParameterType? FilterAsGetFilterQueryParameterType { get; set; } + /// The page number of the results to fetch. For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." + [QueryParameter("page")] + public int? Page { get; set; } + /// The number of results per page (max 100). For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." + [QueryParameter("per_page")] + public int? PerPage { get; set; } + /// Returns check runs with the specified `status`. + [Obsolete("This property is deprecated, use StatusAsGetStatusQueryParameterType instead")] +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("status")] + public string? Status { get; set; } +#nullable restore +#else + [QueryParameter("status")] + public string Status { get; set; } +#endif + /// Returns check runs with the specified `status`. + [QueryParameter("status")] + public global::Ayllu.Github.Client.Repos.Item.Item.CheckSuites.Item.CheckRuns.GetStatusQueryParameterType? StatusAsGetStatusQueryParameterType { get; set; } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class CheckRunsRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/CheckSuites/Item/CheckRuns/CheckRunsResponse.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/CheckSuites/Item/CheckRuns/CheckRunsResponse.cs new file mode 100644 index 0000000..bd9f97e --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/CheckSuites/Item/CheckRuns/CheckRunsResponse.cs @@ -0,0 +1,28 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.CheckSuites.Item.CheckRuns +{ + [Obsolete("This class is obsolete. Use CheckRunsGetResponse instead.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class CheckRunsResponse : global::Ayllu.Github.Client.Repos.Item.Item.CheckSuites.Item.CheckRuns.CheckRunsGetResponse, IParsable + #pragma warning restore CS1591 + { + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static new global::Ayllu.Github.Client.Repos.Item.Item.CheckSuites.Item.CheckRuns.CheckRunsResponse CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Repos.Item.Item.CheckSuites.Item.CheckRuns.CheckRunsResponse(); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/CheckSuites/Item/CheckRuns/GetFilterQueryParameterType.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/CheckSuites/Item/CheckRuns/GetFilterQueryParameterType.cs new file mode 100644 index 0000000..2ad3bcd --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/CheckSuites/Item/CheckRuns/GetFilterQueryParameterType.cs @@ -0,0 +1,20 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.CheckSuites.Item.CheckRuns +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public enum GetFilterQueryParameterType + #pragma warning restore CS1591 + { + [EnumMember(Value = "latest")] + #pragma warning disable CS1591 + Latest, + #pragma warning restore CS1591 + [EnumMember(Value = "all")] + #pragma warning disable CS1591 + All, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/CheckSuites/Item/CheckRuns/GetStatusQueryParameterType.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/CheckSuites/Item/CheckRuns/GetStatusQueryParameterType.cs new file mode 100644 index 0000000..fba7469 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/CheckSuites/Item/CheckRuns/GetStatusQueryParameterType.cs @@ -0,0 +1,24 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.CheckSuites.Item.CheckRuns +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public enum GetStatusQueryParameterType + #pragma warning restore CS1591 + { + [EnumMember(Value = "queued")] + #pragma warning disable CS1591 + Queued, + #pragma warning restore CS1591 + [EnumMember(Value = "in_progress")] + #pragma warning disable CS1591 + In_progress, + #pragma warning restore CS1591 + [EnumMember(Value = "completed")] + #pragma warning disable CS1591 + Completed, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/CheckSuites/Item/Rerequest/RerequestRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/CheckSuites/Item/Rerequest/RerequestRequestBuilder.cs new file mode 100644 index 0000000..339a74b --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/CheckSuites/Item/Rerequest/RerequestRequestBuilder.cs @@ -0,0 +1,93 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.CheckSuites.Item.Rerequest +{ + /// + /// Builds and executes requests for operations under \repos\{owner-id}\{repo-id}\check-suites\{check_suite_id}\rerequest + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class RerequestRequestBuilder : BaseRequestBuilder + { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public RerequestRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/check-suites/{check_suite_id}/rerequest", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public RerequestRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/check-suites/{check_suite_id}/rerequest", rawUrl) + { + } + /// + /// 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/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. + /// API method documentation + /// + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PostAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task PostAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToPostRequestInformation(requestConfiguration); + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Models.EmptyObject.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false); + } + /// + /// 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/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. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPostRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToPostRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.Repos.Item.Item.CheckSuites.Item.Rerequest.RerequestRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Repos.Item.Item.CheckSuites.Item.Rerequest.RerequestRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class RerequestRequestBuilderPostRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/CheckSuites/Item/WithCheck_suite_ItemRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/CheckSuites/Item/WithCheck_suite_ItemRequestBuilder.cs new file mode 100644 index 0000000..73f914f --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/CheckSuites/Item/WithCheck_suite_ItemRequestBuilder.cs @@ -0,0 +1,105 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Ayllu.Github.Client.Repos.Item.Item.CheckSuites.Item.CheckRuns; +using Ayllu.Github.Client.Repos.Item.Item.CheckSuites.Item.Rerequest; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.CheckSuites.Item +{ + /// + /// Builds and executes requests for operations under \repos\{owner-id}\{repo-id}\check-suites\{check_suite_id} + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithCheck_suite_ItemRequestBuilder : BaseRequestBuilder + { + /// The checkRuns property + public global::Ayllu.Github.Client.Repos.Item.Item.CheckSuites.Item.CheckRuns.CheckRunsRequestBuilder CheckRuns + { + get => new global::Ayllu.Github.Client.Repos.Item.Item.CheckSuites.Item.CheckRuns.CheckRunsRequestBuilder(PathParameters, RequestAdapter); + } + /// The rerequest property + public global::Ayllu.Github.Client.Repos.Item.Item.CheckSuites.Item.Rerequest.RerequestRequestBuilder Rerequest + { + get => new global::Ayllu.Github.Client.Repos.Item.Item.CheckSuites.Item.Rerequest.RerequestRequestBuilder(PathParameters, RequestAdapter); + } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public WithCheck_suite_ItemRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/check-suites/{check_suite_id}", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public WithCheck_suite_ItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/check-suites/{check_suite_id}", rawUrl) + { + } + /// + /// 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. + /// API method documentation + /// + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Models.CheckSuite.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false); + } + /// + /// 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. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.Repos.Item.Item.CheckSuites.Item.WithCheck_suite_ItemRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Repos.Item.Item.CheckSuites.Item.WithCheck_suite_ItemRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithCheck_suite_ItemRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/CheckSuites/Preferences/PreferencesPatchRequestBody.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/CheckSuites/Preferences/PreferencesPatchRequestBody.cs new file mode 100644 index 0000000..acb276c --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/CheckSuites/Preferences/PreferencesPatchRequestBody.cs @@ -0,0 +1,65 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.CheckSuites.Preferences +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class PreferencesPatchRequestBody : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// Enables or disables automatic creation of CheckSuite events upon pushes to the repository. Enabled by default. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? AutoTriggerChecks { get; set; } +#nullable restore +#else + public List AutoTriggerChecks { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public PreferencesPatchRequestBody() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Repos.Item.Item.CheckSuites.Preferences.PreferencesPatchRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Repos.Item.Item.CheckSuites.Preferences.PreferencesPatchRequestBody(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "auto_trigger_checks", n => { AutoTriggerChecks = n.GetCollectionOfObjectValues(global::Ayllu.Github.Client.Repos.Item.Item.CheckSuites.Preferences.PreferencesPatchRequestBody_auto_trigger_checks.CreateFromDiscriminatorValue)?.AsList(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteCollectionOfObjectValues("auto_trigger_checks", AutoTriggerChecks); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/CheckSuites/Preferences/PreferencesPatchRequestBody_auto_trigger_checks.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/CheckSuites/Preferences/PreferencesPatchRequestBody_auto_trigger_checks.cs new file mode 100644 index 0000000..86e4e7d --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/CheckSuites/Preferences/PreferencesPatchRequestBody_auto_trigger_checks.cs @@ -0,0 +1,63 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.CheckSuites.Preferences +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class PreferencesPatchRequestBody_auto_trigger_checks : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The `id` of the GitHub App. + public int? AppId { get; set; } + /// Set to `true` to enable automatic creation of CheckSuite events upon pushes to the repository, or `false` to disable them. + public bool? Setting { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public PreferencesPatchRequestBody_auto_trigger_checks() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Repos.Item.Item.CheckSuites.Preferences.PreferencesPatchRequestBody_auto_trigger_checks CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Repos.Item.Item.CheckSuites.Preferences.PreferencesPatchRequestBody_auto_trigger_checks(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "app_id", n => { AppId = n.GetIntValue(); } }, + { "setting", n => { Setting = n.GetBoolValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteIntValue("app_id", AppId); + writer.WriteBoolValue("setting", Setting); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/CheckSuites/Preferences/PreferencesRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/CheckSuites/Preferences/PreferencesRequestBuilder.cs new file mode 100644 index 0000000..13742e4 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/CheckSuites/Preferences/PreferencesRequestBuilder.cs @@ -0,0 +1,98 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.CheckSuites.Preferences +{ + /// + /// Builds and executes requests for operations under \repos\{owner-id}\{repo-id}\check-suites\preferences + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class PreferencesRequestBuilder : BaseRequestBuilder + { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public PreferencesRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/check-suites/preferences", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public PreferencesRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/check-suites/preferences", rawUrl) + { + } + /// + /// 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/rest/checks/suites#create-a-check-suite).You must have admin permissions in the repository to set preferences for check suites. + /// API method documentation + /// + /// A + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PatchAsync(global::Ayllu.Github.Client.Repos.Item.Item.CheckSuites.Preferences.PreferencesPatchRequestBody body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task PatchAsync(global::Ayllu.Github.Client.Repos.Item.Item.CheckSuites.Preferences.PreferencesPatchRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPatchRequestInformation(body, requestConfiguration); + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Models.CheckSuitePreference.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false); + } + /// + /// 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/rest/checks/suites#create-a-check-suite).You must have admin permissions in the repository to set preferences for check suites. + /// + /// A + /// The request body + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPatchRequestInformation(global::Ayllu.Github.Client.Repos.Item.Item.CheckSuites.Preferences.PreferencesPatchRequestBody body, Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToPatchRequestInformation(global::Ayllu.Github.Client.Repos.Item.Item.CheckSuites.Preferences.PreferencesPatchRequestBody body, Action> requestConfiguration = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.Repos.Item.Item.CheckSuites.Preferences.PreferencesRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Repos.Item.Item.CheckSuites.Preferences.PreferencesRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class PreferencesRequestBuilderPatchRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/CodeScanning/Alerts/AlertsRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/CodeScanning/Alerts/AlertsRequestBuilder.cs new file mode 100644 index 0000000..6cc86f8 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/CodeScanning/Alerts/AlertsRequestBuilder.cs @@ -0,0 +1,251 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Ayllu.Github.Client.Repos.Item.Item.CodeScanning.Alerts.Item; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.CodeScanning.Alerts +{ + /// + /// Builds and executes requests for operations under \repos\{owner-id}\{repo-id}\code-scanning\alerts + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class AlertsRequestBuilder : BaseRequestBuilder + { + /// Gets an item from the Ayllu.Github.Client.repos.item.item.codeScanning.alerts.item collection + /// The number that identifies an alert. You can find this at the end of the URL for a code scanning alert within GitHub, and in the `number` field in the response from the `GET /repos/{owner}/{repo}/code-scanning/alerts` operation. + /// A + public global::Ayllu.Github.Client.Repos.Item.Item.CodeScanning.Alerts.Item.WithAlert_numberItemRequestBuilder this[int position] + { + get + { + var urlTplParams = new Dictionary(PathParameters); + urlTplParams.Add("alert_number", position); + return new global::Ayllu.Github.Client.Repos.Item.Item.CodeScanning.Alerts.Item.WithAlert_numberItemRequestBuilder(urlTplParams, RequestAdapter); + } + } + /// Gets an item from the Ayllu.Github.Client.repos.item.item.codeScanning.alerts.item collection + /// The number that identifies an alert. You can find this at the end of the URL for a code scanning alert within GitHub, and in the `number` field in the response from the `GET /repos/{owner}/{repo}/code-scanning/alerts` operation. + /// A + [Obsolete("This indexer is deprecated and will be removed in the next major version. Use the one with the typed parameter instead.")] + public global::Ayllu.Github.Client.Repos.Item.Item.CodeScanning.Alerts.Item.WithAlert_numberItemRequestBuilder this[string position] + { + get + { + var urlTplParams = new Dictionary(PathParameters); + if (!string.IsNullOrWhiteSpace(position)) urlTplParams.Add("alert_number", position); + return new global::Ayllu.Github.Client.Repos.Item.Item.CodeScanning.Alerts.Item.WithAlert_numberItemRequestBuilder(urlTplParams, RequestAdapter); + } + } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public AlertsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/code-scanning/alerts{?after*,before*,direction*,page*,per_page*,pr*,ref*,severity*,sort*,state*,tool_guid*,tool_name*}", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public AlertsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/code-scanning/alerts{?after*,before*,direction*,page*,per_page*,pr*,ref*,severity*,sort*,state*,tool_guid*,tool_name*}", rawUrl) + { + } + /// + /// 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. + /// API method documentation + /// + /// A List<global::Ayllu.Github.Client.Models.CodeScanningAlertItems> + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 403 status code + /// When receiving a 404 status code + /// When receiving a 503 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task?> GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task> GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "403", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "404", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "503", global::Ayllu.Github.Client.Models.Alerts503Error.CreateFromDiscriminatorValue }, + }; + var collectionResult = await RequestAdapter.SendCollectionAsync(requestInfo, global::Ayllu.Github.Client.Models.CodeScanningAlertItems.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + return collectionResult?.AsList(); + } + /// + /// 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. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.Repos.Item.Item.CodeScanning.Alerts.AlertsRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Repos.Item.Item.CodeScanning.Alerts.AlertsRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// 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. + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class AlertsRequestBuilderGetQueryParameters + { + /// A cursor, as given in the [Link header](https://docs.github.com/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/rest/using-the-rest-api/using-pagination-in-the-rest-api)." +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("after")] + public string? After { get; set; } +#nullable restore +#else + [QueryParameter("after")] + public string After { get; set; } +#endif + /// A cursor, as given in the [Link header](https://docs.github.com/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/rest/using-the-rest-api/using-pagination-in-the-rest-api)." +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("before")] + public string? Before { get; set; } +#nullable restore +#else + [QueryParameter("before")] + public string Before { get; set; } +#endif + /// The direction to sort the results by. + [Obsolete("This property is deprecated, use DirectionAsGetDirectionQueryParameterType instead")] +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("direction")] + public string? Direction { get; set; } +#nullable restore +#else + [QueryParameter("direction")] + public string Direction { get; set; } +#endif + /// The direction to sort the results by. + [QueryParameter("direction")] + public global::Ayllu.Github.Client.Repos.Item.Item.CodeScanning.Alerts.GetDirectionQueryParameterType? DirectionAsGetDirectionQueryParameterType { get; set; } + /// The page number of the results to fetch. For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." + [QueryParameter("page")] + public int? Page { get; set; } + /// The number of results per page (max 100). For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." + [QueryParameter("per_page")] + public int? PerPage { get; set; } + /// The number of the pull request for the results you want to list. + [QueryParameter("pr")] + public int? Pr { get; set; } + /// The Git reference for the results you want to list. The `ref` for a branch can be formatted either as `refs/heads/<branch name>` or simply `<branch name>`. To reference a pull request use `refs/pull/<number>/merge`. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("ref")] + public string? Ref { get; set; } +#nullable restore +#else + [QueryParameter("ref")] + public string Ref { get; set; } +#endif + /// If specified, only code scanning alerts with this severity will be returned. + [Obsolete("This property is deprecated, use SeverityAsCodeScanningAlertSeverity instead")] +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("severity")] + public string? Severity { get; set; } +#nullable restore +#else + [QueryParameter("severity")] + public string Severity { get; set; } +#endif + /// If specified, only code scanning alerts with this severity will be returned. + [QueryParameter("severity")] + public global::Ayllu.Github.Client.Models.CodeScanningAlertSeverity? SeverityAsCodeScanningAlertSeverity { get; set; } + /// The property by which to sort the results. + [Obsolete("This property is deprecated, use SortAsGetSortQueryParameterType instead")] +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("sort")] + public string? Sort { get; set; } +#nullable restore +#else + [QueryParameter("sort")] + public string Sort { get; set; } +#endif + /// The property by which to sort the results. + [QueryParameter("sort")] + public global::Ayllu.Github.Client.Repos.Item.Item.CodeScanning.Alerts.GetSortQueryParameterType? SortAsGetSortQueryParameterType { get; set; } + /// If specified, only code scanning alerts with this state will be returned. + [Obsolete("This property is deprecated, use StateAsCodeScanningAlertStateQuery instead")] +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("state")] + public string? State { get; set; } +#nullable restore +#else + [QueryParameter("state")] + public string State { get; set; } +#endif + /// If specified, only code scanning alerts with this state will be returned. + [QueryParameter("state")] + public global::Ayllu.Github.Client.Models.CodeScanningAlertStateQuery? StateAsCodeScanningAlertStateQuery { get; set; } + /// 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. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("tool_guid")] + public string? ToolGuid { get; set; } +#nullable restore +#else + [QueryParameter("tool_guid")] + public string ToolGuid { get; set; } +#endif + /// 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. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("tool_name")] + public string? ToolName { get; set; } +#nullable restore +#else + [QueryParameter("tool_name")] + public string ToolName { get; set; } +#endif + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class AlertsRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/CodeScanning/Alerts/GetDirectionQueryParameterType.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/CodeScanning/Alerts/GetDirectionQueryParameterType.cs new file mode 100644 index 0000000..13d1405 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/CodeScanning/Alerts/GetDirectionQueryParameterType.cs @@ -0,0 +1,20 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.CodeScanning.Alerts +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public enum GetDirectionQueryParameterType + #pragma warning restore CS1591 + { + [EnumMember(Value = "asc")] + #pragma warning disable CS1591 + Asc, + #pragma warning restore CS1591 + [EnumMember(Value = "desc")] + #pragma warning disable CS1591 + Desc, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/CodeScanning/Alerts/GetSortQueryParameterType.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/CodeScanning/Alerts/GetSortQueryParameterType.cs new file mode 100644 index 0000000..981c654 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/CodeScanning/Alerts/GetSortQueryParameterType.cs @@ -0,0 +1,20 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.CodeScanning.Alerts +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public enum GetSortQueryParameterType + #pragma warning restore CS1591 + { + [EnumMember(Value = "created")] + #pragma warning disable CS1591 + Created, + #pragma warning restore CS1591 + [EnumMember(Value = "updated")] + #pragma warning disable CS1591 + Updated, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/CodeScanning/Alerts/Item/Autofix/AutofixRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/CodeScanning/Alerts/Item/Autofix/AutofixRequestBuilder.cs new file mode 100644 index 0000000..e6c1a4d --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/CodeScanning/Alerts/Item/Autofix/AutofixRequestBuilder.cs @@ -0,0 +1,167 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Ayllu.Github.Client.Repos.Item.Item.CodeScanning.Alerts.Item.Autofix.Commits; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.CodeScanning.Alerts.Item.Autofix +{ + /// + /// Builds and executes requests for operations under \repos\{owner-id}\{repo-id}\code-scanning\alerts\{alert_number}\autofix + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class AutofixRequestBuilder : BaseRequestBuilder + { + /// The commits property + public global::Ayllu.Github.Client.Repos.Item.Item.CodeScanning.Alerts.Item.Autofix.Commits.CommitsRequestBuilder Commits + { + get => new global::Ayllu.Github.Client.Repos.Item.Item.CodeScanning.Alerts.Item.Autofix.Commits.CommitsRequestBuilder(PathParameters, RequestAdapter); + } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public AutofixRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/code-scanning/alerts/{alert_number}/autofix", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public AutofixRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/code-scanning/alerts/{alert_number}/autofix", rawUrl) + { + } + /// + /// Gets the status and description of an autofix for a 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. + /// API method documentation + /// + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 400 status code + /// When receiving a 403 status code + /// When receiving a 404 status code + /// When receiving a 503 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "400", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "403", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "404", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "503", global::Ayllu.Github.Client.Models.CodeScanningAutofix503Error.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Models.CodeScanningAutofix.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// Creates an autofix for a code scanning alert.If a new autofix is to be created as a result of this request or is currently being generated, then this endpoint will return a 202 Accepted response.If an autofix already exists for a given alert, then this endpoint will return a 200 OK response.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. + /// API method documentation + /// + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 400 status code + /// When receiving a 403 status code + /// When receiving a 404 status code + /// When receiving a 503 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PostAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task PostAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToPostRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "400", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "403", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "404", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "503", global::Ayllu.Github.Client.Models.CodeScanningAutofix503Error.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Models.CodeScanningAutofix.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// Gets the status and description of an autofix for a 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. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Creates an autofix for a code scanning alert.If a new autofix is to be created as a result of this request or is currently being generated, then this endpoint will return a 202 Accepted response.If an autofix already exists for a given alert, then this endpoint will return a 200 OK response.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. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPostRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToPostRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.Repos.Item.Item.CodeScanning.Alerts.Item.Autofix.AutofixRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Repos.Item.Item.CodeScanning.Alerts.Item.Autofix.AutofixRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class AutofixRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class AutofixRequestBuilderPostRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/CodeScanning/Alerts/Item/Autofix/Commits/CommitsRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/CodeScanning/Alerts/Item/Autofix/Commits/CommitsRequestBuilder.cs new file mode 100644 index 0000000..18dbf93 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/CodeScanning/Alerts/Item/Autofix/Commits/CommitsRequestBuilder.cs @@ -0,0 +1,109 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.CodeScanning.Alerts.Item.Autofix.Commits +{ + /// + /// Builds and executes requests for operations under \repos\{owner-id}\{repo-id}\code-scanning\alerts\{alert_number}\autofix\commits + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class CommitsRequestBuilder : BaseRequestBuilder + { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public CommitsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/code-scanning/alerts/{alert_number}/autofix/commits", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public CommitsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/code-scanning/alerts/{alert_number}/autofix/commits", rawUrl) + { + } + /// + /// Commits an autofix for a code scanning alert.If an autofix is committed as a result of this request, then this endpoint will return a 201 Created response.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. + /// API method documentation + /// + /// A + /// Commit an autofix for a code scanning alert + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 400 status code + /// When receiving a 403 status code + /// When receiving a 404 status code + /// When receiving a 503 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PostAsync(global::Ayllu.Github.Client.Models.CodeScanningAutofixCommits body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task PostAsync(global::Ayllu.Github.Client.Models.CodeScanningAutofixCommits body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPostRequestInformation(body, requestConfiguration); + var errorMapping = new Dictionary> + { + { "400", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "403", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "404", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "503", global::Ayllu.Github.Client.Models.CodeScanningAutofixCommitsResponse503Error.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Models.CodeScanningAutofixCommitsResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// Commits an autofix for a code scanning alert.If an autofix is committed as a result of this request, then this endpoint will return a 201 Created response.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. + /// + /// A + /// Commit an autofix for a code scanning alert + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPostRequestInformation(global::Ayllu.Github.Client.Models.CodeScanningAutofixCommits body, Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToPostRequestInformation(global::Ayllu.Github.Client.Models.CodeScanningAutofixCommits body, Action> requestConfiguration = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.Repos.Item.Item.CodeScanning.Alerts.Item.Autofix.Commits.CommitsRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Repos.Item.Item.CodeScanning.Alerts.Item.Autofix.Commits.CommitsRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class CommitsRequestBuilderPostRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/CodeScanning/Alerts/Item/Instances/InstancesRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/CodeScanning/Alerts/Item/Instances/InstancesRequestBuilder.cs new file mode 100644 index 0000000..0ec4fe2 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/CodeScanning/Alerts/Item/Instances/InstancesRequestBuilder.cs @@ -0,0 +1,129 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.CodeScanning.Alerts.Item.Instances +{ + /// + /// Builds and executes requests for operations under \repos\{owner-id}\{repo-id}\code-scanning\alerts\{alert_number}\instances + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class InstancesRequestBuilder : BaseRequestBuilder + { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public InstancesRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/code-scanning/alerts/{alert_number}/instances{?page*,per_page*,pr*,ref*}", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public InstancesRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/code-scanning/alerts/{alert_number}/instances{?page*,per_page*,pr*,ref*}", rawUrl) + { + } + /// + /// 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. + /// API method documentation + /// + /// A List<global::Ayllu.Github.Client.Models.CodeScanningAlertInstance> + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 403 status code + /// When receiving a 404 status code + /// When receiving a 503 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task?> GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task> GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "403", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "404", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "503", global::Ayllu.Github.Client.Models.Instances503Error.CreateFromDiscriminatorValue }, + }; + var collectionResult = await RequestAdapter.SendCollectionAsync(requestInfo, global::Ayllu.Github.Client.Models.CodeScanningAlertInstance.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + return collectionResult?.AsList(); + } + /// + /// 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. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.Repos.Item.Item.CodeScanning.Alerts.Item.Instances.InstancesRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Repos.Item.Item.CodeScanning.Alerts.Item.Instances.InstancesRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// 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. + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class InstancesRequestBuilderGetQueryParameters + { + /// The page number of the results to fetch. For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." + [QueryParameter("page")] + public int? Page { get; set; } + /// The number of results per page (max 100). For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." + [QueryParameter("per_page")] + public int? PerPage { get; set; } + /// The number of the pull request for the results you want to list. + [QueryParameter("pr")] + public int? Pr { get; set; } + /// The Git reference for the results you want to list. The `ref` for a branch can be formatted either as `refs/heads/<branch name>` or simply `<branch name>`. To reference a pull request use `refs/pull/<number>/merge`. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("ref")] + public string? Ref { get; set; } +#nullable restore +#else + [QueryParameter("ref")] + public string Ref { get; set; } +#endif + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class InstancesRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/CodeScanning/Alerts/Item/WithAlert_numberItemRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/CodeScanning/Alerts/Item/WithAlert_numberItemRequestBuilder.cs new file mode 100644 index 0000000..118e0cc --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/CodeScanning/Alerts/Item/WithAlert_numberItemRequestBuilder.cs @@ -0,0 +1,176 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Ayllu.Github.Client.Repos.Item.Item.CodeScanning.Alerts.Item.Autofix; +using Ayllu.Github.Client.Repos.Item.Item.CodeScanning.Alerts.Item.Instances; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.CodeScanning.Alerts.Item +{ + /// + /// Builds and executes requests for operations under \repos\{owner-id}\{repo-id}\code-scanning\alerts\{alert_number} + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithAlert_numberItemRequestBuilder : BaseRequestBuilder + { + /// The autofix property + public global::Ayllu.Github.Client.Repos.Item.Item.CodeScanning.Alerts.Item.Autofix.AutofixRequestBuilder Autofix + { + get => new global::Ayllu.Github.Client.Repos.Item.Item.CodeScanning.Alerts.Item.Autofix.AutofixRequestBuilder(PathParameters, RequestAdapter); + } + /// The instances property + public global::Ayllu.Github.Client.Repos.Item.Item.CodeScanning.Alerts.Item.Instances.InstancesRequestBuilder Instances + { + get => new global::Ayllu.Github.Client.Repos.Item.Item.CodeScanning.Alerts.Item.Instances.InstancesRequestBuilder(PathParameters, RequestAdapter); + } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public WithAlert_numberItemRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/code-scanning/alerts/{alert_number}", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public WithAlert_numberItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/code-scanning/alerts/{alert_number}", rawUrl) + { + } + /// + /// 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. + /// API method documentation + /// + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 403 status code + /// When receiving a 404 status code + /// When receiving a 503 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "403", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "404", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "503", global::Ayllu.Github.Client.Models.CodeScanningAlert503Error.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Models.CodeScanningAlert.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// 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. + /// API method documentation + /// + /// A + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 400 status code + /// When receiving a 403 status code + /// When receiving a 404 status code + /// When receiving a 503 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PatchAsync(global::Ayllu.Github.Client.Repos.Item.Item.CodeScanning.Alerts.Item.WithAlert_numberPatchRequestBody body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task PatchAsync(global::Ayllu.Github.Client.Repos.Item.Item.CodeScanning.Alerts.Item.WithAlert_numberPatchRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPatchRequestInformation(body, requestConfiguration); + var errorMapping = new Dictionary> + { + { "400", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "403", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "404", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "503", global::Ayllu.Github.Client.Models.CodeScanningAlert503Error.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Models.CodeScanningAlert.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// 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. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// 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. + /// + /// A + /// The request body + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPatchRequestInformation(global::Ayllu.Github.Client.Repos.Item.Item.CodeScanning.Alerts.Item.WithAlert_numberPatchRequestBody body, Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToPatchRequestInformation(global::Ayllu.Github.Client.Repos.Item.Item.CodeScanning.Alerts.Item.WithAlert_numberPatchRequestBody body, Action> requestConfiguration = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.Repos.Item.Item.CodeScanning.Alerts.Item.WithAlert_numberItemRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Repos.Item.Item.CodeScanning.Alerts.Item.WithAlert_numberItemRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithAlert_numberItemRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithAlert_numberItemRequestBuilderPatchRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/CodeScanning/Alerts/Item/WithAlert_numberPatchRequestBody.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/CodeScanning/Alerts/Item/WithAlert_numberPatchRequestBody.cs new file mode 100644 index 0000000..6e0b437 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/CodeScanning/Alerts/Item/WithAlert_numberPatchRequestBody.cs @@ -0,0 +1,78 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.CodeScanning.Alerts.Item +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class WithAlert_numberPatchRequestBody : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// If `true`, attempt to create an alert dismissal request. + public bool? CreateRequest { get; set; } + /// The dismissal comment associated with the dismissal of the alert. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? DismissedComment { get; set; } +#nullable restore +#else + public string DismissedComment { get; set; } +#endif + /// **Required when the state is dismissed.** The reason for dismissing or closing the alert. + public global::Ayllu.Github.Client.Models.CodeScanningAlertDismissedReason? DismissedReason { get; set; } + /// Sets the state of the code scanning alert. You must provide `dismissed_reason` when you set the state to `dismissed`. + public global::Ayllu.Github.Client.Models.CodeScanningAlertSetState? State { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public WithAlert_numberPatchRequestBody() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Repos.Item.Item.CodeScanning.Alerts.Item.WithAlert_numberPatchRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Repos.Item.Item.CodeScanning.Alerts.Item.WithAlert_numberPatchRequestBody(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "create_request", n => { CreateRequest = n.GetBoolValue(); } }, + { "dismissed_comment", n => { DismissedComment = n.GetStringValue(); } }, + { "dismissed_reason", n => { DismissedReason = n.GetEnumValue(); } }, + { "state", n => { State = n.GetEnumValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteBoolValue("create_request", CreateRequest); + writer.WriteStringValue("dismissed_comment", DismissedComment); + writer.WriteEnumValue("dismissed_reason", DismissedReason); + writer.WriteEnumValue("state", State); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/CodeScanning/Analyses/AnalysesRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/CodeScanning/Analyses/AnalysesRequestBuilder.cs new file mode 100644 index 0000000..1d48d5f --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/CodeScanning/Analyses/AnalysesRequestBuilder.cs @@ -0,0 +1,213 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Ayllu.Github.Client.Repos.Item.Item.CodeScanning.Analyses.Item; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.CodeScanning.Analyses +{ + /// + /// Builds and executes requests for operations under \repos\{owner-id}\{repo-id}\code-scanning\analyses + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class AnalysesRequestBuilder : BaseRequestBuilder + { + /// Gets an item from the Ayllu.Github.Client.repos.item.item.codeScanning.analyses.item collection + /// The ID of the analysis, as returned from the `GET /repos/{owner}/{repo}/code-scanning/analyses` operation. + /// A + public global::Ayllu.Github.Client.Repos.Item.Item.CodeScanning.Analyses.Item.WithAnalysis_ItemRequestBuilder this[int position] + { + get + { + var urlTplParams = new Dictionary(PathParameters); + urlTplParams.Add("analysis_id", position); + return new global::Ayllu.Github.Client.Repos.Item.Item.CodeScanning.Analyses.Item.WithAnalysis_ItemRequestBuilder(urlTplParams, RequestAdapter); + } + } + /// Gets an item from the Ayllu.Github.Client.repos.item.item.codeScanning.analyses.item collection + /// The ID of the analysis, as returned from the `GET /repos/{owner}/{repo}/code-scanning/analyses` operation. + /// A + [Obsolete("This indexer is deprecated and will be removed in the next major version. Use the one with the typed parameter instead.")] + public global::Ayllu.Github.Client.Repos.Item.Item.CodeScanning.Analyses.Item.WithAnalysis_ItemRequestBuilder this[string position] + { + get + { + var urlTplParams = new Dictionary(PathParameters); + if (!string.IsNullOrWhiteSpace(position)) urlTplParams.Add("analysis_id", position); + return new global::Ayllu.Github.Client.Repos.Item.Item.CodeScanning.Analyses.Item.WithAnalysis_ItemRequestBuilder(urlTplParams, RequestAdapter); + } + } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public AnalysesRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/code-scanning/analyses{?direction*,page*,per_page*,pr*,ref*,sarif_id*,sort*,tool_guid*,tool_name*}", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public AnalysesRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/code-scanning/analyses{?direction*,page*,per_page*,pr*,ref*,sarif_id*,sort*,tool_guid*,tool_name*}", rawUrl) + { + } + /// + /// 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.> [!WARNING]> **Closing down notice:** The `tool_name` field is closing down 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. + /// API method documentation + /// + /// A List<global::Ayllu.Github.Client.Models.CodeScanningAnalysis> + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 403 status code + /// When receiving a 404 status code + /// When receiving a 503 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task?> GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task> GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "403", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "404", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "503", global::Ayllu.Github.Client.Models.Analyses503Error.CreateFromDiscriminatorValue }, + }; + var collectionResult = await RequestAdapter.SendCollectionAsync(requestInfo, global::Ayllu.Github.Client.Models.CodeScanningAnalysis.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + return collectionResult?.AsList(); + } + /// + /// 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.> [!WARNING]> **Closing down notice:** The `tool_name` field is closing down 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. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.Repos.Item.Item.CodeScanning.Analyses.AnalysesRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Repos.Item.Item.CodeScanning.Analyses.AnalysesRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// 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.> [!WARNING]> **Closing down notice:** The `tool_name` field is closing down 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. + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class AnalysesRequestBuilderGetQueryParameters + { + /// The direction to sort the results by. + [Obsolete("This property is deprecated, use DirectionAsGetDirectionQueryParameterType instead")] +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("direction")] + public string? Direction { get; set; } +#nullable restore +#else + [QueryParameter("direction")] + public string Direction { get; set; } +#endif + /// The direction to sort the results by. + [QueryParameter("direction")] + public global::Ayllu.Github.Client.Repos.Item.Item.CodeScanning.Analyses.GetDirectionQueryParameterType? DirectionAsGetDirectionQueryParameterType { get; set; } + /// The page number of the results to fetch. For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." + [QueryParameter("page")] + public int? Page { get; set; } + /// The number of results per page (max 100). For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." + [QueryParameter("per_page")] + public int? PerPage { get; set; } + /// The number of the pull request for the results you want to list. + [QueryParameter("pr")] + public int? Pr { get; set; } + /// The Git reference for the analyses you want to list. The `ref` for a branch can be formatted either as `refs/heads/<branch name>` or simply `<branch name>`. To reference a pull request use `refs/pull/<number>/merge`. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("ref")] + public string? Ref { get; set; } +#nullable restore +#else + [QueryParameter("ref")] + public string Ref { get; set; } +#endif + /// Filter analyses belonging to the same SARIF upload. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("sarif_id")] + public string? SarifId { get; set; } +#nullable restore +#else + [QueryParameter("sarif_id")] + public string SarifId { get; set; } +#endif + /// The property by which to sort the results. + [Obsolete("This property is deprecated, use SortAsGetSortQueryParameterType instead")] +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("sort")] + public string? Sort { get; set; } +#nullable restore +#else + [QueryParameter("sort")] + public string Sort { get; set; } +#endif + /// The property by which to sort the results. + [QueryParameter("sort")] + public global::Ayllu.Github.Client.Repos.Item.Item.CodeScanning.Analyses.GetSortQueryParameterType? SortAsGetSortQueryParameterType { get; set; } + /// 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. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("tool_guid")] + public string? ToolGuid { get; set; } +#nullable restore +#else + [QueryParameter("tool_guid")] + public string ToolGuid { get; set; } +#endif + /// 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. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("tool_name")] + public string? ToolName { get; set; } +#nullable restore +#else + [QueryParameter("tool_name")] + public string ToolName { get; set; } +#endif + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class AnalysesRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/CodeScanning/Analyses/GetDirectionQueryParameterType.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/CodeScanning/Analyses/GetDirectionQueryParameterType.cs new file mode 100644 index 0000000..ee8a69c --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/CodeScanning/Analyses/GetDirectionQueryParameterType.cs @@ -0,0 +1,20 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.CodeScanning.Analyses +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public enum GetDirectionQueryParameterType + #pragma warning restore CS1591 + { + [EnumMember(Value = "asc")] + #pragma warning disable CS1591 + Asc, + #pragma warning restore CS1591 + [EnumMember(Value = "desc")] + #pragma warning disable CS1591 + Desc, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/CodeScanning/Analyses/GetSortQueryParameterType.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/CodeScanning/Analyses/GetSortQueryParameterType.cs new file mode 100644 index 0000000..b5bc942 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/CodeScanning/Analyses/GetSortQueryParameterType.cs @@ -0,0 +1,16 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.CodeScanning.Analyses +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public enum GetSortQueryParameterType + #pragma warning restore CS1591 + { + [EnumMember(Value = "created")] + #pragma warning disable CS1591 + Created, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/CodeScanning/Analyses/Item/WithAnalysis_ItemRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/CodeScanning/Analyses/Item/WithAnalysis_ItemRequestBuilder.cs new file mode 100644 index 0000000..91ffc71 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/CodeScanning/Analyses/Item/WithAnalysis_ItemRequestBuilder.cs @@ -0,0 +1,178 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.CodeScanning.Analyses.Item +{ + /// + /// Builds and executes requests for operations under \repos\{owner-id}\{repo-id}\code-scanning\analyses\{analysis_id} + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithAnalysis_ItemRequestBuilder : BaseRequestBuilder + { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public WithAnalysis_ItemRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/code-scanning/analyses/{analysis_id}{?confirm_delete*}", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public WithAnalysis_ItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/code-scanning/analyses/{analysis_id}{?confirm_delete*}", rawUrl) + { + } + /// + /// 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. + /// API method documentation + /// + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 400 status code + /// When receiving a 403 status code + /// When receiving a 404 status code + /// When receiving a 503 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task DeleteAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task DeleteAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToDeleteRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "400", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "403", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "404", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "503", global::Ayllu.Github.Client.Models.CodeScanningAnalysisDeletion503Error.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Models.CodeScanningAnalysisDeletion.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// 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/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. + /// API method documentation + /// + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 403 status code + /// When receiving a 404 status code + /// When receiving a 422 status code + /// When receiving a 503 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "403", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "404", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "422", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "503", global::Ayllu.Github.Client.Models.CodeScanningAnalysis503Error.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Models.CodeScanningAnalysis.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// 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. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToDeleteRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToDeleteRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.DELETE, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// 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/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. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.Repos.Item.Item.CodeScanning.Analyses.Item.WithAnalysis_ItemRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Repos.Item.Item.CodeScanning.Analyses.Item.WithAnalysis_ItemRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// 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. + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithAnalysis_ItemRequestBuilderDeleteQueryParameters + { + /// 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.` +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("confirm_delete")] + public string? ConfirmDelete { get; set; } +#nullable restore +#else + [QueryParameter("confirm_delete")] + public string ConfirmDelete { get; set; } +#endif + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithAnalysis_ItemRequestBuilderDeleteRequestConfiguration : RequestConfiguration + { + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithAnalysis_ItemRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/CodeScanning/CodeScanningRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/CodeScanning/CodeScanningRequestBuilder.cs new file mode 100644 index 0000000..c4ee198 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/CodeScanning/CodeScanningRequestBuilder.cs @@ -0,0 +1,65 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Repos.Item.Item.CodeScanning.Alerts; +using Ayllu.Github.Client.Repos.Item.Item.CodeScanning.Analyses; +using Ayllu.Github.Client.Repos.Item.Item.CodeScanning.Codeql; +using Ayllu.Github.Client.Repos.Item.Item.CodeScanning.DefaultSetup; +using Ayllu.Github.Client.Repos.Item.Item.CodeScanning.Sarifs; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.CodeScanning +{ + /// + /// Builds and executes requests for operations under \repos\{owner-id}\{repo-id}\code-scanning + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class CodeScanningRequestBuilder : BaseRequestBuilder + { + /// The alerts property + public global::Ayllu.Github.Client.Repos.Item.Item.CodeScanning.Alerts.AlertsRequestBuilder Alerts + { + get => new global::Ayllu.Github.Client.Repos.Item.Item.CodeScanning.Alerts.AlertsRequestBuilder(PathParameters, RequestAdapter); + } + /// The analyses property + public global::Ayllu.Github.Client.Repos.Item.Item.CodeScanning.Analyses.AnalysesRequestBuilder Analyses + { + get => new global::Ayllu.Github.Client.Repos.Item.Item.CodeScanning.Analyses.AnalysesRequestBuilder(PathParameters, RequestAdapter); + } + /// The codeql property + public global::Ayllu.Github.Client.Repos.Item.Item.CodeScanning.Codeql.CodeqlRequestBuilder Codeql + { + get => new global::Ayllu.Github.Client.Repos.Item.Item.CodeScanning.Codeql.CodeqlRequestBuilder(PathParameters, RequestAdapter); + } + /// The defaultSetup property + public global::Ayllu.Github.Client.Repos.Item.Item.CodeScanning.DefaultSetup.DefaultSetupRequestBuilder DefaultSetup + { + get => new global::Ayllu.Github.Client.Repos.Item.Item.CodeScanning.DefaultSetup.DefaultSetupRequestBuilder(PathParameters, RequestAdapter); + } + /// The sarifs property + public global::Ayllu.Github.Client.Repos.Item.Item.CodeScanning.Sarifs.SarifsRequestBuilder Sarifs + { + get => new global::Ayllu.Github.Client.Repos.Item.Item.CodeScanning.Sarifs.SarifsRequestBuilder(PathParameters, RequestAdapter); + } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public CodeScanningRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/code-scanning", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public CodeScanningRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/code-scanning", rawUrl) + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/CodeScanning/Codeql/CodeqlRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/CodeScanning/Codeql/CodeqlRequestBuilder.cs new file mode 100644 index 0000000..7fa3c51 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/CodeScanning/Codeql/CodeqlRequestBuilder.cs @@ -0,0 +1,47 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Repos.Item.Item.CodeScanning.Codeql.Databases; +using Ayllu.Github.Client.Repos.Item.Item.CodeScanning.Codeql.VariantAnalyses; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.CodeScanning.Codeql +{ + /// + /// Builds and executes requests for operations under \repos\{owner-id}\{repo-id}\code-scanning\codeql + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class CodeqlRequestBuilder : BaseRequestBuilder + { + /// The databases property + public global::Ayllu.Github.Client.Repos.Item.Item.CodeScanning.Codeql.Databases.DatabasesRequestBuilder Databases + { + get => new global::Ayllu.Github.Client.Repos.Item.Item.CodeScanning.Codeql.Databases.DatabasesRequestBuilder(PathParameters, RequestAdapter); + } + /// The variantAnalyses property + public global::Ayllu.Github.Client.Repos.Item.Item.CodeScanning.Codeql.VariantAnalyses.VariantAnalysesRequestBuilder VariantAnalyses + { + get => new global::Ayllu.Github.Client.Repos.Item.Item.CodeScanning.Codeql.VariantAnalyses.VariantAnalysesRequestBuilder(PathParameters, RequestAdapter); + } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public CodeqlRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/code-scanning/codeql", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public CodeqlRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/code-scanning/codeql", rawUrl) + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/CodeScanning/Codeql/Databases/DatabasesRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/CodeScanning/Codeql/Databases/DatabasesRequestBuilder.cs new file mode 100644 index 0000000..647fae1 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/CodeScanning/Codeql/Databases/DatabasesRequestBuilder.cs @@ -0,0 +1,116 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Ayllu.Github.Client.Repos.Item.Item.CodeScanning.Codeql.Databases.Item; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.CodeScanning.Codeql.Databases +{ + /// + /// Builds and executes requests for operations under \repos\{owner-id}\{repo-id}\code-scanning\codeql\databases + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class DatabasesRequestBuilder : BaseRequestBuilder + { + /// Gets an item from the Ayllu.Github.Client.repos.item.item.codeScanning.codeql.databases.item collection + /// The language of the CodeQL database. + /// A + public global::Ayllu.Github.Client.Repos.Item.Item.CodeScanning.Codeql.Databases.Item.WithLanguageItemRequestBuilder this[string position] + { + get + { + var urlTplParams = new Dictionary(PathParameters); + urlTplParams.Add("language", position); + return new global::Ayllu.Github.Client.Repos.Item.Item.CodeScanning.Codeql.Databases.Item.WithLanguageItemRequestBuilder(urlTplParams, RequestAdapter); + } + } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public DatabasesRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/code-scanning/codeql/databases", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public DatabasesRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/code-scanning/codeql/databases", rawUrl) + { + } + /// + /// Lists the CodeQL databases that are available in a repository.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. + /// API method documentation + /// + /// A List<global::Ayllu.Github.Client.Models.CodeScanningCodeqlDatabase> + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 403 status code + /// When receiving a 404 status code + /// When receiving a 503 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task?> GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task> GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "403", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "404", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "503", global::Ayllu.Github.Client.Models.Databases503Error.CreateFromDiscriminatorValue }, + }; + var collectionResult = await RequestAdapter.SendCollectionAsync(requestInfo, global::Ayllu.Github.Client.Models.CodeScanningCodeqlDatabase.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + return collectionResult?.AsList(); + } + /// + /// Lists the CodeQL databases that are available in a repository.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. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.Repos.Item.Item.CodeScanning.Codeql.Databases.DatabasesRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Repos.Item.Item.CodeScanning.Codeql.Databases.DatabasesRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class DatabasesRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/CodeScanning/Codeql/Databases/Item/WithLanguageItemRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/CodeScanning/Codeql/Databases/Item/WithLanguageItemRequestBuilder.cs new file mode 100644 index 0000000..379c5a0 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/CodeScanning/Codeql/Databases/Item/WithLanguageItemRequestBuilder.cs @@ -0,0 +1,156 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.CodeScanning.Codeql.Databases.Item +{ + /// + /// Builds and executes requests for operations under \repos\{owner-id}\{repo-id}\code-scanning\codeql\databases\{language} + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithLanguageItemRequestBuilder : BaseRequestBuilder + { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public WithLanguageItemRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/code-scanning/codeql/databases/{language}", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public WithLanguageItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/code-scanning/codeql/databases/{language}", rawUrl) + { + } + /// + /// Deletes a CodeQL database for a language in a repository.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. + /// API method documentation + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 403 status code + /// When receiving a 404 status code + /// When receiving a 503 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task DeleteAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task DeleteAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToDeleteRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "403", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "404", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "503", global::Ayllu.Github.Client.Models.WithLanguage503Error.CreateFromDiscriminatorValue }, + }; + await RequestAdapter.SendNoContentAsync(requestInfo, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// Gets a CodeQL database for a language in a repository.By default this endpoint returns JSON metadata about the CodeQL database. Todownload the CodeQL database binary content, set the `Accept` header of the requestto [`application/zip`](https://docs.github.com/rest/using-the-rest-api/getting-started-with-the-rest-api#media-types), and make sureyour HTTP client is configured to follow redirects or use the `Location` headerto make a second request to get the redirect URL.OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint with private or public repositories, or the `public_repo` scope to use this endpoint with only public repositories. + /// API method documentation + /// + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 403 status code + /// When receiving a 404 status code + /// When receiving a 503 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "403", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "404", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "503", global::Ayllu.Github.Client.Models.CodeScanningCodeqlDatabase503Error.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Models.CodeScanningCodeqlDatabase.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// Deletes a CodeQL database for a language in a repository.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. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToDeleteRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToDeleteRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.DELETE, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Gets a CodeQL database for a language in a repository.By default this endpoint returns JSON metadata about the CodeQL database. Todownload the CodeQL database binary content, set the `Accept` header of the requestto [`application/zip`](https://docs.github.com/rest/using-the-rest-api/getting-started-with-the-rest-api#media-types), and make sureyour HTTP client is configured to follow redirects or use the `Location` headerto make a second request to get the redirect URL.OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint with private or public repositories, or the `public_repo` scope to use this endpoint with only public repositories. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.Repos.Item.Item.CodeScanning.Codeql.Databases.Item.WithLanguageItemRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Repos.Item.Item.CodeScanning.Codeql.Databases.Item.WithLanguageItemRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithLanguageItemRequestBuilderDeleteRequestConfiguration : RequestConfiguration + { + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithLanguageItemRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/CodeScanning/Codeql/VariantAnalyses/Item/Repos/Item/Item/WithRepo_nameItemRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/CodeScanning/Codeql/VariantAnalyses/Item/Repos/Item/Item/WithRepo_nameItemRequestBuilder.cs new file mode 100644 index 0000000..968dd80 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/CodeScanning/Codeql/VariantAnalyses/Item/Repos/Item/Item/WithRepo_nameItemRequestBuilder.cs @@ -0,0 +1,100 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.CodeScanning.Codeql.VariantAnalyses.Item.Repos.Item.Item +{ + /// + /// 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} + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithRepo_nameItemRequestBuilder : BaseRequestBuilder + { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public WithRepo_nameItemRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/code-scanning/codeql/variant-analyses/{codeql_variant_analysis_id}/repos/{repo_owner}/{repo_name}", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public WithRepo_nameItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/code-scanning/codeql/variant-analyses/{codeql_variant_analysis_id}/repos/{repo_owner}/{repo_name}", rawUrl) + { + } + /// + /// 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. + /// API method documentation + /// + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 404 status code + /// When receiving a 503 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "404", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "503", global::Ayllu.Github.Client.Models.CodeScanningVariantAnalysisRepoTask503Error.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Models.CodeScanningVariantAnalysisRepoTask.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// 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. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.Repos.Item.Item.CodeScanning.Codeql.VariantAnalyses.Item.Repos.Item.Item.WithRepo_nameItemRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Repos.Item.Item.CodeScanning.Codeql.VariantAnalyses.Item.Repos.Item.Item.WithRepo_nameItemRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithRepo_nameItemRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/CodeScanning/Codeql/VariantAnalyses/Item/Repos/Item/WithRepo_ownerItemRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/CodeScanning/Codeql/VariantAnalyses/Item/Repos/Item/WithRepo_ownerItemRequestBuilder.cs new file mode 100644 index 0000000..08a75f4 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/CodeScanning/Codeql/VariantAnalyses/Item/Repos/Item/WithRepo_ownerItemRequestBuilder.cs @@ -0,0 +1,48 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Repos.Item.Item.CodeScanning.Codeql.VariantAnalyses.Item.Repos.Item.Item; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.CodeScanning.Codeql.VariantAnalyses.Item.Repos.Item +{ + /// + /// Builds and executes requests for operations under \repos\{owner-id}\{repo-id}\code-scanning\codeql\variant-analyses\{codeql_variant_analysis_id}\repos\{repo_owner} + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithRepo_ownerItemRequestBuilder : BaseRequestBuilder + { + /// Gets an item from the Ayllu.Github.Client.repos.item.item.codeScanning.codeql.variantAnalyses.item.repos.item.item collection + /// The name of the variant analysis repository. + /// A + public global::Ayllu.Github.Client.Repos.Item.Item.CodeScanning.Codeql.VariantAnalyses.Item.Repos.Item.Item.WithRepo_nameItemRequestBuilder this[string position] + { + get + { + var urlTplParams = new Dictionary(PathParameters); + urlTplParams.Add("repo_name", position); + return new global::Ayllu.Github.Client.Repos.Item.Item.CodeScanning.Codeql.VariantAnalyses.Item.Repos.Item.Item.WithRepo_nameItemRequestBuilder(urlTplParams, RequestAdapter); + } + } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public WithRepo_ownerItemRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/code-scanning/codeql/variant-analyses/{codeql_variant_analysis_id}/repos/{repo_owner}", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public WithRepo_ownerItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/code-scanning/codeql/variant-analyses/{codeql_variant_analysis_id}/repos/{repo_owner}", rawUrl) + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/CodeScanning/Codeql/VariantAnalyses/Item/Repos/ReposRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/CodeScanning/Codeql/VariantAnalyses/Item/Repos/ReposRequestBuilder.cs new file mode 100644 index 0000000..7ee33e2 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/CodeScanning/Codeql/VariantAnalyses/Item/Repos/ReposRequestBuilder.cs @@ -0,0 +1,48 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Repos.Item.Item.CodeScanning.Codeql.VariantAnalyses.Item.Repos.Item; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.CodeScanning.Codeql.VariantAnalyses.Item.Repos +{ + /// + /// Builds and executes requests for operations under \repos\{owner-id}\{repo-id}\code-scanning\codeql\variant-analyses\{codeql_variant_analysis_id}\repos + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class ReposRequestBuilder : BaseRequestBuilder + { + /// Gets an item from the Ayllu.Github.Client.repos.item.item.codeScanning.codeql.variantAnalyses.item.repos.item collection + /// The account owner of the variant analysis repository. The name is not case sensitive. + /// A + public global::Ayllu.Github.Client.Repos.Item.Item.CodeScanning.Codeql.VariantAnalyses.Item.Repos.Item.WithRepo_ownerItemRequestBuilder this[string position] + { + get + { + var urlTplParams = new Dictionary(PathParameters); + urlTplParams.Add("repo_owner", position); + return new global::Ayllu.Github.Client.Repos.Item.Item.CodeScanning.Codeql.VariantAnalyses.Item.Repos.Item.WithRepo_ownerItemRequestBuilder(urlTplParams, RequestAdapter); + } + } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public ReposRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/code-scanning/codeql/variant-analyses/{codeql_variant_analysis_id}/repos", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public ReposRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/code-scanning/codeql/variant-analyses/{codeql_variant_analysis_id}/repos", rawUrl) + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/CodeScanning/Codeql/VariantAnalyses/Item/WithCodeql_variant_analysis_ItemRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/CodeScanning/Codeql/VariantAnalyses/Item/WithCodeql_variant_analysis_ItemRequestBuilder.cs new file mode 100644 index 0000000..12ad254 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/CodeScanning/Codeql/VariantAnalyses/Item/WithCodeql_variant_analysis_ItemRequestBuilder.cs @@ -0,0 +1,106 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Ayllu.Github.Client.Repos.Item.Item.CodeScanning.Codeql.VariantAnalyses.Item.Repos; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.CodeScanning.Codeql.VariantAnalyses.Item +{ + /// + /// Builds and executes requests for operations under \repos\{owner-id}\{repo-id}\code-scanning\codeql\variant-analyses\{codeql_variant_analysis_id} + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithCodeql_variant_analysis_ItemRequestBuilder : BaseRequestBuilder + { + /// The repos property + public global::Ayllu.Github.Client.Repos.Item.Item.CodeScanning.Codeql.VariantAnalyses.Item.Repos.ReposRequestBuilder Repos + { + get => new global::Ayllu.Github.Client.Repos.Item.Item.CodeScanning.Codeql.VariantAnalyses.Item.Repos.ReposRequestBuilder(PathParameters, RequestAdapter); + } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public WithCodeql_variant_analysis_ItemRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/code-scanning/codeql/variant-analyses/{codeql_variant_analysis_id}", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public WithCodeql_variant_analysis_ItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/code-scanning/codeql/variant-analyses/{codeql_variant_analysis_id}", rawUrl) + { + } + /// + /// 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. + /// API method documentation + /// + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 404 status code + /// When receiving a 503 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "404", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "503", global::Ayllu.Github.Client.Models.CodeScanningVariantAnalysis503Error.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Models.CodeScanningVariantAnalysis.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// 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. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.Repos.Item.Item.CodeScanning.Codeql.VariantAnalyses.Item.WithCodeql_variant_analysis_ItemRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Repos.Item.Item.CodeScanning.Codeql.VariantAnalyses.Item.WithCodeql_variant_analysis_ItemRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithCodeql_variant_analysis_ItemRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/CodeScanning/Codeql/VariantAnalyses/VariantAnalysesPostRequestBody.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/CodeScanning/Codeql/VariantAnalyses/VariantAnalysesPostRequestBody.cs new file mode 100644 index 0000000..34ca12f --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/CodeScanning/Codeql/VariantAnalyses/VariantAnalysesPostRequestBody.cs @@ -0,0 +1,90 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.CodeScanning.Codeql.VariantAnalyses +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class VariantAnalysesPostRequestBody : IParsable + #pragma warning restore CS1591 + { + /// The language targeted by the CodeQL query + public global::Ayllu.Github.Client.Models.CodeScanningVariantAnalysisLanguage? Language { get; set; } + /// A Base64-encoded tarball containing a CodeQL query and all its dependencies +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? QueryPack { get; set; } +#nullable restore +#else + public string QueryPack { get; set; } +#endif + /// 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. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? Repositories { get; set; } +#nullable restore +#else + public List Repositories { get; set; } +#endif + /// List of repository lists to run the query against. Precisely one property from `repositories`, `repository_lists` and `repository_owners` is required. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? RepositoryLists { get; set; } +#nullable restore +#else + public List RepositoryLists { get; set; } +#endif + /// 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. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? RepositoryOwners { get; set; } +#nullable restore +#else + public List RepositoryOwners { get; set; } +#endif + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Repos.Item.Item.CodeScanning.Codeql.VariantAnalyses.VariantAnalysesPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Repos.Item.Item.CodeScanning.Codeql.VariantAnalyses.VariantAnalysesPostRequestBody(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "language", n => { Language = n.GetEnumValue(); } }, + { "query_pack", n => { QueryPack = n.GetStringValue(); } }, + { "repositories", n => { Repositories = n.GetCollectionOfPrimitiveValues()?.AsList(); } }, + { "repository_lists", n => { RepositoryLists = n.GetCollectionOfPrimitiveValues()?.AsList(); } }, + { "repository_owners", n => { RepositoryOwners = n.GetCollectionOfPrimitiveValues()?.AsList(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteEnumValue("language", Language); + writer.WriteStringValue("query_pack", QueryPack); + writer.WriteCollectionOfPrimitiveValues("repositories", Repositories); + writer.WriteCollectionOfPrimitiveValues("repository_lists", RepositoryLists); + writer.WriteCollectionOfPrimitiveValues("repository_owners", RepositoryOwners); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/CodeScanning/Codeql/VariantAnalyses/VariantAnalysesRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/CodeScanning/Codeql/VariantAnalyses/VariantAnalysesRequestBuilder.cs new file mode 100644 index 0000000..325d3d8 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/CodeScanning/Codeql/VariantAnalyses/VariantAnalysesRequestBuilder.cs @@ -0,0 +1,133 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Ayllu.Github.Client.Repos.Item.Item.CodeScanning.Codeql.VariantAnalyses.Item; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.CodeScanning.Codeql.VariantAnalyses +{ + /// + /// Builds and executes requests for operations under \repos\{owner-id}\{repo-id}\code-scanning\codeql\variant-analyses + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class VariantAnalysesRequestBuilder : BaseRequestBuilder + { + /// Gets an item from the Ayllu.Github.Client.repos.item.item.codeScanning.codeql.variantAnalyses.item collection + /// The unique identifier of the variant analysis. + /// A + public global::Ayllu.Github.Client.Repos.Item.Item.CodeScanning.Codeql.VariantAnalyses.Item.WithCodeql_variant_analysis_ItemRequestBuilder this[int position] + { + get + { + var urlTplParams = new Dictionary(PathParameters); + urlTplParams.Add("codeql_variant_analysis_id", position); + return new global::Ayllu.Github.Client.Repos.Item.Item.CodeScanning.Codeql.VariantAnalyses.Item.WithCodeql_variant_analysis_ItemRequestBuilder(urlTplParams, RequestAdapter); + } + } + /// Gets an item from the Ayllu.Github.Client.repos.item.item.codeScanning.codeql.variantAnalyses.item collection + /// The unique identifier of the variant analysis. + /// A + [Obsolete("This indexer is deprecated and will be removed in the next major version. Use the one with the typed parameter instead.")] + public global::Ayllu.Github.Client.Repos.Item.Item.CodeScanning.Codeql.VariantAnalyses.Item.WithCodeql_variant_analysis_ItemRequestBuilder this[string position] + { + get + { + var urlTplParams = new Dictionary(PathParameters); + if (!string.IsNullOrWhiteSpace(position)) urlTplParams.Add("codeql_variant_analysis_id", position); + return new global::Ayllu.Github.Client.Repos.Item.Item.CodeScanning.Codeql.VariantAnalyses.Item.WithCodeql_variant_analysis_ItemRequestBuilder(urlTplParams, RequestAdapter); + } + } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public VariantAnalysesRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/code-scanning/codeql/variant-analyses", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public VariantAnalysesRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/code-scanning/codeql/variant-analyses", rawUrl) + { + } + /// + /// Creates a new CodeQL variant analysis, which will run a CodeQL query against one or more repositories.Get started by learning more about [running CodeQL queries at scale with Multi-Repository Variant Analysis](https://docs.github.com/code-security/codeql-for-vs-code/getting-started-with-codeql-for-vs-code/running-codeql-queries-at-scale-with-multi-repository-variant-analysis).Use the `owner` and `repo` parameters in the URL to specify the controller repository thatwill be used for running GitHub Actions workflows and storing the results of the CodeQL variant analysis.OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. + /// API method documentation + /// + /// A + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 404 status code + /// When receiving a 422 status code + /// When receiving a 503 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PostAsync(global::Ayllu.Github.Client.Repos.Item.Item.CodeScanning.Codeql.VariantAnalyses.VariantAnalysesPostRequestBody body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task PostAsync(global::Ayllu.Github.Client.Repos.Item.Item.CodeScanning.Codeql.VariantAnalyses.VariantAnalysesPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPostRequestInformation(body, requestConfiguration); + var errorMapping = new Dictionary> + { + { "404", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "422", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "503", global::Ayllu.Github.Client.Models.CodeScanningVariantAnalysis503Error.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Models.CodeScanningVariantAnalysis.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// Creates a new CodeQL variant analysis, which will run a CodeQL query against one or more repositories.Get started by learning more about [running CodeQL queries at scale with Multi-Repository Variant Analysis](https://docs.github.com/code-security/codeql-for-vs-code/getting-started-with-codeql-for-vs-code/running-codeql-queries-at-scale-with-multi-repository-variant-analysis).Use the `owner` and `repo` parameters in the URL to specify the controller repository thatwill be used for running GitHub Actions workflows and storing the results of the CodeQL variant analysis.OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. + /// + /// A + /// The request body + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPostRequestInformation(global::Ayllu.Github.Client.Repos.Item.Item.CodeScanning.Codeql.VariantAnalyses.VariantAnalysesPostRequestBody body, Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToPostRequestInformation(global::Ayllu.Github.Client.Repos.Item.Item.CodeScanning.Codeql.VariantAnalyses.VariantAnalysesPostRequestBody body, Action> requestConfiguration = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.Repos.Item.Item.CodeScanning.Codeql.VariantAnalyses.VariantAnalysesRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Repos.Item.Item.CodeScanning.Codeql.VariantAnalyses.VariantAnalysesRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class VariantAnalysesRequestBuilderPostRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/CodeScanning/DefaultSetup/DefaultSetupRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/CodeScanning/DefaultSetup/DefaultSetupRequestBuilder.cs new file mode 100644 index 0000000..498d904 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/CodeScanning/DefaultSetup/DefaultSetupRequestBuilder.cs @@ -0,0 +1,166 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.CodeScanning.DefaultSetup +{ + /// + /// Builds and executes requests for operations under \repos\{owner-id}\{repo-id}\code-scanning\default-setup + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class DefaultSetupRequestBuilder : BaseRequestBuilder + { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public DefaultSetupRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/code-scanning/default-setup", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public DefaultSetupRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/code-scanning/default-setup", rawUrl) + { + } + /// + /// 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. + /// API method documentation + /// + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 403 status code + /// When receiving a 404 status code + /// When receiving a 503 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "403", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "404", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "503", global::Ayllu.Github.Client.Models.CodeScanningDefaultSetup503Error.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Models.CodeScanningDefaultSetup.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// 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. + /// API method documentation + /// + /// A + /// Configuration for code scanning default setup. + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 403 status code + /// When receiving a 404 status code + /// When receiving a 409 status code + /// When receiving a 422 status code + /// When receiving a 503 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PatchAsync(global::Ayllu.Github.Client.Models.CodeScanningDefaultSetupUpdate body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task PatchAsync(global::Ayllu.Github.Client.Models.CodeScanningDefaultSetupUpdate body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPatchRequestInformation(body, requestConfiguration); + var errorMapping = new Dictionary> + { + { "403", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "404", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "409", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "422", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "503", global::Ayllu.Github.Client.Models.EmptyObject503Error.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Models.EmptyObject.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// 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. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// 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. + /// + /// A + /// Configuration for code scanning default setup. + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPatchRequestInformation(global::Ayllu.Github.Client.Models.CodeScanningDefaultSetupUpdate body, Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToPatchRequestInformation(global::Ayllu.Github.Client.Models.CodeScanningDefaultSetupUpdate body, Action> requestConfiguration = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.Repos.Item.Item.CodeScanning.DefaultSetup.DefaultSetupRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Repos.Item.Item.CodeScanning.DefaultSetup.DefaultSetupRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class DefaultSetupRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class DefaultSetupRequestBuilderPatchRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/CodeScanning/Sarifs/Item/WithSarif_ItemRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/CodeScanning/Sarifs/Item/WithSarif_ItemRequestBuilder.cs new file mode 100644 index 0000000..0c67cf1 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/CodeScanning/Sarifs/Item/WithSarif_ItemRequestBuilder.cs @@ -0,0 +1,100 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.CodeScanning.Sarifs.Item +{ + /// + /// Builds and executes requests for operations under \repos\{owner-id}\{repo-id}\code-scanning\sarifs\{sarif_id} + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithSarif_ItemRequestBuilder : BaseRequestBuilder + { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public WithSarif_ItemRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/code-scanning/sarifs/{sarif_id}", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public WithSarif_ItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/code-scanning/sarifs/{sarif_id}", rawUrl) + { + } + /// + /// 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. + /// API method documentation + /// + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 403 status code + /// When receiving a 503 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "403", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "503", global::Ayllu.Github.Client.Models.CodeScanningSarifsStatus503Error.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Models.CodeScanningSarifsStatus.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// 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. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.Repos.Item.Item.CodeScanning.Sarifs.Item.WithSarif_ItemRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Repos.Item.Item.CodeScanning.Sarifs.Item.WithSarif_ItemRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithSarif_ItemRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/CodeScanning/Sarifs/SarifsPostRequestBody.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/CodeScanning/Sarifs/SarifsPostRequestBody.cs new file mode 100644 index 0000000..aa6f94a --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/CodeScanning/Sarifs/SarifsPostRequestBody.cs @@ -0,0 +1,103 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.CodeScanning.Sarifs +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class SarifsPostRequestBody : IParsable + #pragma warning restore CS1591 + { + /// 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. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? CheckoutUri { get; set; } +#nullable restore +#else + public string CheckoutUri { get; set; } +#endif + /// The SHA of the commit to which the analysis you are uploading relates. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? CommitSha { get; set; } +#nullable restore +#else + public string CommitSha { get; set; } +#endif + /// The full Git reference, formatted as `refs/heads/<branch name>`,`refs/tags/<tag>`, `refs/pull/<number>/merge`, or `refs/pull/<number>/head`. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Ref { get; set; } +#nullable restore +#else + public string Ref { get; set; } +#endif + /// 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/code-security/secure-coding/sarif-support-for-code-scanning)." +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Sarif { get; set; } +#nullable restore +#else + public string Sarif { get; set; } +#endif + /// 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`. + public DateTimeOffset? StartedAt { get; set; } + /// 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`. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? ToolName { get; set; } +#nullable restore +#else + public string ToolName { get; set; } +#endif + /// 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. + public bool? Validate { get; set; } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Repos.Item.Item.CodeScanning.Sarifs.SarifsPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Repos.Item.Item.CodeScanning.Sarifs.SarifsPostRequestBody(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "checkout_uri", n => { CheckoutUri = n.GetStringValue(); } }, + { "commit_sha", n => { CommitSha = n.GetStringValue(); } }, + { "ref", n => { Ref = n.GetStringValue(); } }, + { "sarif", n => { Sarif = n.GetStringValue(); } }, + { "started_at", n => { StartedAt = n.GetDateTimeOffsetValue(); } }, + { "tool_name", n => { ToolName = n.GetStringValue(); } }, + { "validate", n => { Validate = n.GetBoolValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("checkout_uri", CheckoutUri); + writer.WriteStringValue("commit_sha", CommitSha); + writer.WriteStringValue("ref", Ref); + writer.WriteStringValue("sarif", Sarif); + writer.WriteDateTimeOffsetValue("started_at", StartedAt); + writer.WriteStringValue("tool_name", ToolName); + writer.WriteBoolValue("validate", Validate); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/CodeScanning/Sarifs/SarifsRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/CodeScanning/Sarifs/SarifsRequestBuilder.cs new file mode 100644 index 0000000..8199555 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/CodeScanning/Sarifs/SarifsRequestBuilder.cs @@ -0,0 +1,120 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Ayllu.Github.Client.Repos.Item.Item.CodeScanning.Sarifs.Item; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.CodeScanning.Sarifs +{ + /// + /// Builds and executes requests for operations under \repos\{owner-id}\{repo-id}\code-scanning\sarifs + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class SarifsRequestBuilder : BaseRequestBuilder + { + /// Gets an item from the Ayllu.Github.Client.repos.item.item.codeScanning.sarifs.item collection + /// The SARIF ID obtained after uploading. + /// A + public global::Ayllu.Github.Client.Repos.Item.Item.CodeScanning.Sarifs.Item.WithSarif_ItemRequestBuilder this[string position] + { + get + { + var urlTplParams = new Dictionary(PathParameters); + urlTplParams.Add("sarif_id", position); + return new global::Ayllu.Github.Client.Repos.Item.Item.CodeScanning.Sarifs.Item.WithSarif_ItemRequestBuilder(urlTplParams, RequestAdapter); + } + } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public SarifsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/code-scanning/sarifs", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public SarifsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/code-scanning/sarifs", rawUrl) + { + } + /// + /// 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/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/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. + /// API method documentation + /// + /// A + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 403 status code + /// When receiving a 404 status code + /// When receiving a 503 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PostAsync(global::Ayllu.Github.Client.Repos.Item.Item.CodeScanning.Sarifs.SarifsPostRequestBody body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task PostAsync(global::Ayllu.Github.Client.Repos.Item.Item.CodeScanning.Sarifs.SarifsPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPostRequestInformation(body, requestConfiguration); + var errorMapping = new Dictionary> + { + { "403", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "404", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "503", global::Ayllu.Github.Client.Models.CodeScanningSarifsReceipt503Error.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Models.CodeScanningSarifsReceipt.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// 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/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/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. + /// + /// A + /// The request body + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPostRequestInformation(global::Ayllu.Github.Client.Repos.Item.Item.CodeScanning.Sarifs.SarifsPostRequestBody body, Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToPostRequestInformation(global::Ayllu.Github.Client.Repos.Item.Item.CodeScanning.Sarifs.SarifsPostRequestBody body, Action> requestConfiguration = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.Repos.Item.Item.CodeScanning.Sarifs.SarifsRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Repos.Item.Item.CodeScanning.Sarifs.SarifsRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class SarifsRequestBuilderPostRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/CodeSecurityConfiguration/CodeSecurityConfigurationRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/CodeSecurityConfiguration/CodeSecurityConfigurationRequestBuilder.cs new file mode 100644 index 0000000..0b89b84 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/CodeSecurityConfiguration/CodeSecurityConfigurationRequestBuilder.cs @@ -0,0 +1,100 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.CodeSecurityConfiguration +{ + /// + /// Builds and executes requests for operations under \repos\{owner-id}\{repo-id}\code-security-configuration + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class CodeSecurityConfigurationRequestBuilder : BaseRequestBuilder + { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public CodeSecurityConfigurationRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/code-security-configuration", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public CodeSecurityConfigurationRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/code-security-configuration", rawUrl) + { + } + /// + /// Get the code security configuration that manages a repository's code security settings.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` scope to use this endpoint. + /// API method documentation + /// + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 403 status code + /// When receiving a 404 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "403", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "404", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Models.CodeSecurityConfigurationForRepository.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// Get the code security configuration that manages a repository's code security settings.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` scope to use this endpoint. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.Repos.Item.Item.CodeSecurityConfiguration.CodeSecurityConfigurationRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Repos.Item.Item.CodeSecurityConfiguration.CodeSecurityConfigurationRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class CodeSecurityConfigurationRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Codeowners/CodeownersRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Codeowners/CodeownersRequestBuilder.cs new file mode 100644 index 0000000..b722155 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Codeowners/CodeownersRequestBuilder.cs @@ -0,0 +1,41 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Repos.Item.Item.Codeowners.Errors; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.Codeowners +{ + /// + /// Builds and executes requests for operations under \repos\{owner-id}\{repo-id}\codeowners + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class CodeownersRequestBuilder : BaseRequestBuilder + { + /// The errors property + public global::Ayllu.Github.Client.Repos.Item.Item.Codeowners.Errors.ErrorsRequestBuilder Errors + { + get => new global::Ayllu.Github.Client.Repos.Item.Item.Codeowners.Errors.ErrorsRequestBuilder(PathParameters, RequestAdapter); + } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public CodeownersRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/codeowners", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public CodeownersRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/codeowners", rawUrl) + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Codeowners/Errors/ErrorsRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Codeowners/Errors/ErrorsRequestBuilder.cs new file mode 100644 index 0000000..6908457 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Codeowners/Errors/ErrorsRequestBuilder.cs @@ -0,0 +1,110 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.Codeowners.Errors +{ + /// + /// Builds and executes requests for operations under \repos\{owner-id}\{repo-id}\codeowners\errors + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class ErrorsRequestBuilder : BaseRequestBuilder + { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public ErrorsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/codeowners/errors{?ref*}", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public ErrorsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/codeowners/errors{?ref*}", rawUrl) + { + } + /// + /// 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/repositories/managing-your-repositorys-settings-and-features/customizing-your-repository/about-code-owners)." + /// API method documentation + /// + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Models.CodeownersErrors.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false); + } + /// + /// 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/repositories/managing-your-repositorys-settings-and-features/customizing-your-repository/about-code-owners)." + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.Repos.Item.Item.Codeowners.Errors.ErrorsRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Repos.Item.Item.Codeowners.Errors.ErrorsRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// 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/repositories/managing-your-repositorys-settings-and-features/customizing-your-repository/about-code-owners)." + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class ErrorsRequestBuilderGetQueryParameters + { + /// 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`) +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("ref")] + public string? Ref { get; set; } +#nullable restore +#else + [QueryParameter("ref")] + public string Ref { get; set; } +#endif + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class ErrorsRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Codespaces/CodespacesGetResponse.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Codespaces/CodespacesGetResponse.cs new file mode 100644 index 0000000..18a3299 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Codespaces/CodespacesGetResponse.cs @@ -0,0 +1,70 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.Codespaces +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class CodespacesGetResponse : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The codespaces property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? Codespaces { get; set; } +#nullable restore +#else + public List Codespaces { get; set; } +#endif + /// The total_count property + public int? TotalCount { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public CodespacesGetResponse() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Repos.Item.Item.Codespaces.CodespacesGetResponse CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Repos.Item.Item.Codespaces.CodespacesGetResponse(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "codespaces", n => { Codespaces = n.GetCollectionOfObjectValues(global::Ayllu.Github.Client.Models.Codespace.CreateFromDiscriminatorValue)?.AsList(); } }, + { "total_count", n => { TotalCount = n.GetIntValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteCollectionOfObjectValues("codespaces", Codespaces); + writer.WriteIntValue("total_count", TotalCount); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Codespaces/CodespacesPostRequestBody.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Codespaces/CodespacesPostRequestBody.cs new file mode 100644 index 0000000..1f702b9 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Codespaces/CodespacesPostRequestBody.cs @@ -0,0 +1,141 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.Codespaces +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class CodespacesPostRequestBody : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// IP for location auto-detection when proxying a request +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? ClientIp { get; set; } +#nullable restore +#else + public string ClientIp { get; set; } +#endif + /// Path to devcontainer.json config to use for this codespace +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? DevcontainerPath { get; set; } +#nullable restore +#else + public string DevcontainerPath { get; set; } +#endif + /// Display name for this codespace +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? DisplayName { get; set; } +#nullable restore +#else + public string DisplayName { get; set; } +#endif + /// The geographic area for this codespace. If not specified, the value is assigned by IP. This property replaces `location`, which is closing down. + public global::Ayllu.Github.Client.Repos.Item.Item.Codespaces.CodespacesPostRequestBody_geo? Geo { get; set; } + /// Time in minutes before codespace stops from inactivity + public int? IdleTimeoutMinutes { get; set; } + /// The requested location for a new codespace. Best efforts are made to respect this upon creation. Assigned by IP if not provided. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Location { get; set; } +#nullable restore +#else + public string Location { get; set; } +#endif + /// Machine type to use for this codespace +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Machine { get; set; } +#nullable restore +#else + public string Machine { get; set; } +#endif + /// Whether to authorize requested permissions from devcontainer.json + public bool? MultiRepoPermissionsOptOut { get; set; } + /// Git ref (typically a branch name) for this codespace +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Ref { get; set; } +#nullable restore +#else + public string Ref { get; set; } +#endif + /// Duration in minutes after codespace has gone idle in which it will be deleted. Must be integer minutes between 0 and 43200 (30 days). + public int? RetentionPeriodMinutes { get; set; } + /// Working directory for this codespace +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? WorkingDirectory { get; set; } +#nullable restore +#else + public string WorkingDirectory { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public CodespacesPostRequestBody() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Repos.Item.Item.Codespaces.CodespacesPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Repos.Item.Item.Codespaces.CodespacesPostRequestBody(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "client_ip", n => { ClientIp = n.GetStringValue(); } }, + { "devcontainer_path", n => { DevcontainerPath = n.GetStringValue(); } }, + { "display_name", n => { DisplayName = n.GetStringValue(); } }, + { "geo", n => { Geo = n.GetEnumValue(); } }, + { "idle_timeout_minutes", n => { IdleTimeoutMinutes = n.GetIntValue(); } }, + { "location", n => { Location = n.GetStringValue(); } }, + { "machine", n => { Machine = n.GetStringValue(); } }, + { "multi_repo_permissions_opt_out", n => { MultiRepoPermissionsOptOut = n.GetBoolValue(); } }, + { "ref", n => { Ref = n.GetStringValue(); } }, + { "retention_period_minutes", n => { RetentionPeriodMinutes = n.GetIntValue(); } }, + { "working_directory", n => { WorkingDirectory = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("client_ip", ClientIp); + writer.WriteStringValue("devcontainer_path", DevcontainerPath); + writer.WriteStringValue("display_name", DisplayName); + writer.WriteEnumValue("geo", Geo); + writer.WriteIntValue("idle_timeout_minutes", IdleTimeoutMinutes); + writer.WriteStringValue("location", Location); + writer.WriteStringValue("machine", Machine); + writer.WriteBoolValue("multi_repo_permissions_opt_out", MultiRepoPermissionsOptOut); + writer.WriteStringValue("ref", Ref); + writer.WriteIntValue("retention_period_minutes", RetentionPeriodMinutes); + writer.WriteStringValue("working_directory", WorkingDirectory); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Codespaces/CodespacesPostRequestBody_geo.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Codespaces/CodespacesPostRequestBody_geo.cs new file mode 100644 index 0000000..0e95036 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Codespaces/CodespacesPostRequestBody_geo.cs @@ -0,0 +1,27 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.Codespaces +{ + /// The geographic area for this codespace. If not specified, the value is assigned by IP. This property replaces `location`, which is closing down. + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public enum CodespacesPostRequestBody_geo + { + [EnumMember(Value = "EuropeWest")] + #pragma warning disable CS1591 + EuropeWest, + #pragma warning restore CS1591 + [EnumMember(Value = "SoutheastAsia")] + #pragma warning disable CS1591 + SoutheastAsia, + #pragma warning restore CS1591 + [EnumMember(Value = "UsEast")] + #pragma warning disable CS1591 + UsEast, + #pragma warning restore CS1591 + [EnumMember(Value = "UsWest")] + #pragma warning disable CS1591 + UsWest, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Codespaces/CodespacesRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Codespaces/CodespacesRequestBuilder.cs new file mode 100644 index 0000000..c186130 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Codespaces/CodespacesRequestBuilder.cs @@ -0,0 +1,242 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Ayllu.Github.Client.Repos.Item.Item.Codespaces.Devcontainers; +using Ayllu.Github.Client.Repos.Item.Item.Codespaces.Machines; +using Ayllu.Github.Client.Repos.Item.Item.Codespaces.New; +using Ayllu.Github.Client.Repos.Item.Item.Codespaces.Permissions_check; +using Ayllu.Github.Client.Repos.Item.Item.Codespaces.Secrets; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.Codespaces +{ + /// + /// Builds and executes requests for operations under \repos\{owner-id}\{repo-id}\codespaces + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class CodespacesRequestBuilder : BaseRequestBuilder + { + /// The devcontainers property + public global::Ayllu.Github.Client.Repos.Item.Item.Codespaces.Devcontainers.DevcontainersRequestBuilder Devcontainers + { + get => new global::Ayllu.Github.Client.Repos.Item.Item.Codespaces.Devcontainers.DevcontainersRequestBuilder(PathParameters, RequestAdapter); + } + /// The machines property + public global::Ayllu.Github.Client.Repos.Item.Item.Codespaces.Machines.MachinesRequestBuilder Machines + { + get => new global::Ayllu.Github.Client.Repos.Item.Item.Codespaces.Machines.MachinesRequestBuilder(PathParameters, RequestAdapter); + } + /// The new property + public global::Ayllu.Github.Client.Repos.Item.Item.Codespaces.New.NewRequestBuilder New + { + get => new global::Ayllu.Github.Client.Repos.Item.Item.Codespaces.New.NewRequestBuilder(PathParameters, RequestAdapter); + } + /// The permissions_check property + public global::Ayllu.Github.Client.Repos.Item.Item.Codespaces.Permissions_check.Permissions_checkRequestBuilder Permissions_check + { + get => new global::Ayllu.Github.Client.Repos.Item.Item.Codespaces.Permissions_check.Permissions_checkRequestBuilder(PathParameters, RequestAdapter); + } + /// The secrets property + public global::Ayllu.Github.Client.Repos.Item.Item.Codespaces.Secrets.SecretsRequestBuilder Secrets + { + get => new global::Ayllu.Github.Client.Repos.Item.Item.Codespaces.Secrets.SecretsRequestBuilder(PathParameters, RequestAdapter); + } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public CodespacesRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/codespaces{?page*,per_page*}", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public CodespacesRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/codespaces{?page*,per_page*}", rawUrl) + { + } + /// + /// 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. + /// API method documentation + /// + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 401 status code + /// When receiving a 403 status code + /// When receiving a 404 status code + /// When receiving a 500 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsCodespacesGetResponseAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task GetAsCodespacesGetResponseAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "401", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "403", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "404", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "500", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Repos.Item.Item.Codespaces.CodespacesGetResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// 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. + /// API method documentation + /// + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 401 status code + /// When receiving a 403 status code + /// When receiving a 404 status code + /// When receiving a 500 status code + [Obsolete("This method is obsolete. Use GetAsCodespacesGetResponseAsync instead.")] +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "401", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "403", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "404", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "500", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Repos.Item.Item.Codespaces.CodespacesResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// 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. + /// API method documentation + /// + /// A + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 400 status code + /// When receiving a 401 status code + /// When receiving a 403 status code + /// When receiving a 404 status code + /// When receiving a 503 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PostAsync(global::Ayllu.Github.Client.Repos.Item.Item.Codespaces.CodespacesPostRequestBody body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task PostAsync(global::Ayllu.Github.Client.Repos.Item.Item.Codespaces.CodespacesPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPostRequestInformation(body, requestConfiguration); + var errorMapping = new Dictionary> + { + { "400", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "401", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "403", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "404", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "503", global::Ayllu.Github.Client.Models.Codespace503Error.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Models.Codespace.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// 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. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// 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. + /// + /// A + /// The request body + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPostRequestInformation(global::Ayllu.Github.Client.Repos.Item.Item.Codespaces.CodespacesPostRequestBody body, Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToPostRequestInformation(global::Ayllu.Github.Client.Repos.Item.Item.Codespaces.CodespacesPostRequestBody body, Action> requestConfiguration = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.Repos.Item.Item.Codespaces.CodespacesRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Repos.Item.Item.Codespaces.CodespacesRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// 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. + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class CodespacesRequestBuilderGetQueryParameters + { + /// The page number of the results to fetch. For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." + [QueryParameter("page")] + public int? Page { get; set; } + /// The number of results per page (max 100). For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." + [QueryParameter("per_page")] + public int? PerPage { get; set; } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class CodespacesRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class CodespacesRequestBuilderPostRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Codespaces/CodespacesResponse.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Codespaces/CodespacesResponse.cs new file mode 100644 index 0000000..3915faf --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Codespaces/CodespacesResponse.cs @@ -0,0 +1,28 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.Codespaces +{ + [Obsolete("This class is obsolete. Use CodespacesGetResponse instead.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class CodespacesResponse : global::Ayllu.Github.Client.Repos.Item.Item.Codespaces.CodespacesGetResponse, IParsable + #pragma warning restore CS1591 + { + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static new global::Ayllu.Github.Client.Repos.Item.Item.Codespaces.CodespacesResponse CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Repos.Item.Item.Codespaces.CodespacesResponse(); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Codespaces/Devcontainers/DevcontainersGetResponse.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Codespaces/Devcontainers/DevcontainersGetResponse.cs new file mode 100644 index 0000000..f1612ec --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Codespaces/Devcontainers/DevcontainersGetResponse.cs @@ -0,0 +1,69 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.Codespaces.Devcontainers +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class DevcontainersGetResponse : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The devcontainers property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? Devcontainers { get; set; } +#nullable restore +#else + public List Devcontainers { get; set; } +#endif + /// The total_count property + public int? TotalCount { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public DevcontainersGetResponse() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Repos.Item.Item.Codespaces.Devcontainers.DevcontainersGetResponse CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Repos.Item.Item.Codespaces.Devcontainers.DevcontainersGetResponse(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "devcontainers", n => { Devcontainers = n.GetCollectionOfObjectValues(global::Ayllu.Github.Client.Repos.Item.Item.Codespaces.Devcontainers.DevcontainersGetResponse_devcontainers.CreateFromDiscriminatorValue)?.AsList(); } }, + { "total_count", n => { TotalCount = n.GetIntValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteCollectionOfObjectValues("devcontainers", Devcontainers); + writer.WriteIntValue("total_count", TotalCount); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Codespaces/Devcontainers/DevcontainersGetResponse_devcontainers.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Codespaces/Devcontainers/DevcontainersGetResponse_devcontainers.cs new file mode 100644 index 0000000..407bc0a --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Codespaces/Devcontainers/DevcontainersGetResponse_devcontainers.cs @@ -0,0 +1,85 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.Codespaces.Devcontainers +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class DevcontainersGetResponse_devcontainers : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The display_name property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? DisplayName { get; set; } +#nullable restore +#else + public string DisplayName { get; set; } +#endif + /// The name property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Name { get; set; } +#nullable restore +#else + public string Name { get; set; } +#endif + /// The path property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Path { get; set; } +#nullable restore +#else + public string Path { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public DevcontainersGetResponse_devcontainers() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Repos.Item.Item.Codespaces.Devcontainers.DevcontainersGetResponse_devcontainers CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Repos.Item.Item.Codespaces.Devcontainers.DevcontainersGetResponse_devcontainers(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "display_name", n => { DisplayName = n.GetStringValue(); } }, + { "name", n => { Name = n.GetStringValue(); } }, + { "path", n => { Path = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("display_name", DisplayName); + writer.WriteStringValue("name", Name); + writer.WriteStringValue("path", Path); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Codespaces/Devcontainers/DevcontainersRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Codespaces/Devcontainers/DevcontainersRequestBuilder.cs new file mode 100644 index 0000000..a7d6753 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Codespaces/Devcontainers/DevcontainersRequestBuilder.cs @@ -0,0 +1,152 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.Codespaces.Devcontainers +{ + /// + /// Builds and executes requests for operations under \repos\{owner-id}\{repo-id}\codespaces\devcontainers + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class DevcontainersRequestBuilder : BaseRequestBuilder + { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public DevcontainersRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/codespaces/devcontainers{?page*,per_page*}", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public DevcontainersRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/codespaces/devcontainers{?page*,per_page*}", rawUrl) + { + } + /// + /// 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. + /// API method documentation + /// + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 400 status code + /// When receiving a 401 status code + /// When receiving a 403 status code + /// When receiving a 404 status code + /// When receiving a 500 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsDevcontainersGetResponseAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task GetAsDevcontainersGetResponseAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "400", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "401", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "403", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "404", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "500", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Repos.Item.Item.Codespaces.Devcontainers.DevcontainersGetResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// 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. + /// API method documentation + /// + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 400 status code + /// When receiving a 401 status code + /// When receiving a 403 status code + /// When receiving a 404 status code + /// When receiving a 500 status code + [Obsolete("This method is obsolete. Use GetAsDevcontainersGetResponseAsync instead.")] +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "400", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "401", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "403", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "404", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "500", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Repos.Item.Item.Codespaces.Devcontainers.DevcontainersResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// 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. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.Repos.Item.Item.Codespaces.Devcontainers.DevcontainersRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Repos.Item.Item.Codespaces.Devcontainers.DevcontainersRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// 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. + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class DevcontainersRequestBuilderGetQueryParameters + { + /// The page number of the results to fetch. For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." + [QueryParameter("page")] + public int? Page { get; set; } + /// The number of results per page (max 100). For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." + [QueryParameter("per_page")] + public int? PerPage { get; set; } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class DevcontainersRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Codespaces/Devcontainers/DevcontainersResponse.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Codespaces/Devcontainers/DevcontainersResponse.cs new file mode 100644 index 0000000..0824f0e --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Codespaces/Devcontainers/DevcontainersResponse.cs @@ -0,0 +1,28 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.Codespaces.Devcontainers +{ + [Obsolete("This class is obsolete. Use DevcontainersGetResponse instead.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class DevcontainersResponse : global::Ayllu.Github.Client.Repos.Item.Item.Codespaces.Devcontainers.DevcontainersGetResponse, IParsable + #pragma warning restore CS1591 + { + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static new global::Ayllu.Github.Client.Repos.Item.Item.Codespaces.Devcontainers.DevcontainersResponse CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Repos.Item.Item.Codespaces.Devcontainers.DevcontainersResponse(); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Codespaces/Machines/MachinesGetResponse.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Codespaces/Machines/MachinesGetResponse.cs new file mode 100644 index 0000000..a9a3f39 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Codespaces/Machines/MachinesGetResponse.cs @@ -0,0 +1,70 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.Codespaces.Machines +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class MachinesGetResponse : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The machines property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? Machines { get; set; } +#nullable restore +#else + public List Machines { get; set; } +#endif + /// The total_count property + public int? TotalCount { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public MachinesGetResponse() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Repos.Item.Item.Codespaces.Machines.MachinesGetResponse CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Repos.Item.Item.Codespaces.Machines.MachinesGetResponse(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "machines", n => { Machines = n.GetCollectionOfObjectValues(global::Ayllu.Github.Client.Models.CodespaceMachine.CreateFromDiscriminatorValue)?.AsList(); } }, + { "total_count", n => { TotalCount = n.GetIntValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteCollectionOfObjectValues("machines", Machines); + writer.WriteIntValue("total_count", TotalCount); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Codespaces/Machines/MachinesRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Codespaces/Machines/MachinesRequestBuilder.cs new file mode 100644 index 0000000..2dc0afc --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Codespaces/Machines/MachinesRequestBuilder.cs @@ -0,0 +1,172 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.Codespaces.Machines +{ + /// + /// Builds and executes requests for operations under \repos\{owner-id}\{repo-id}\codespaces\machines + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class MachinesRequestBuilder : BaseRequestBuilder + { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public MachinesRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/codespaces/machines{?client_ip*,location*,ref*}", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public MachinesRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/codespaces/machines{?client_ip*,location*,ref*}", rawUrl) + { + } + /// + /// 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. + /// API method documentation + /// + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 401 status code + /// When receiving a 403 status code + /// When receiving a 404 status code + /// When receiving a 500 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsMachinesGetResponseAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task GetAsMachinesGetResponseAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "401", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "403", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "404", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "500", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Repos.Item.Item.Codespaces.Machines.MachinesGetResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// 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. + /// API method documentation + /// + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 401 status code + /// When receiving a 403 status code + /// When receiving a 404 status code + /// When receiving a 500 status code + [Obsolete("This method is obsolete. Use GetAsMachinesGetResponseAsync instead.")] +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "401", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "403", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "404", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "500", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Repos.Item.Item.Codespaces.Machines.MachinesResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// 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. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.Repos.Item.Item.Codespaces.Machines.MachinesRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Repos.Item.Item.Codespaces.Machines.MachinesRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// 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. + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class MachinesRequestBuilderGetQueryParameters + { + /// IP for location auto-detection when proxying a request +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("client_ip")] + public string? ClientIp { get; set; } +#nullable restore +#else + [QueryParameter("client_ip")] + public string ClientIp { get; set; } +#endif + /// The location to check for available machines. Assigned by IP if not provided. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("location")] + public string? Location { get; set; } +#nullable restore +#else + [QueryParameter("location")] + public string Location { get; set; } +#endif + /// The branch or commit to check for prebuild availability and devcontainer restrictions. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("ref")] + public string? Ref { get; set; } +#nullable restore +#else + [QueryParameter("ref")] + public string Ref { get; set; } +#endif + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class MachinesRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Codespaces/Machines/MachinesResponse.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Codespaces/Machines/MachinesResponse.cs new file mode 100644 index 0000000..16332e3 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Codespaces/Machines/MachinesResponse.cs @@ -0,0 +1,28 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.Codespaces.Machines +{ + [Obsolete("This class is obsolete. Use MachinesGetResponse instead.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class MachinesResponse : global::Ayllu.Github.Client.Repos.Item.Item.Codespaces.Machines.MachinesGetResponse, IParsable + #pragma warning restore CS1591 + { + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static new global::Ayllu.Github.Client.Repos.Item.Item.Codespaces.Machines.MachinesResponse CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Repos.Item.Item.Codespaces.Machines.MachinesResponse(); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Codespaces/New/NewGetResponse.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Codespaces/New/NewGetResponse.cs new file mode 100644 index 0000000..49d7b2b --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Codespaces/New/NewGetResponse.cs @@ -0,0 +1,76 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.Codespaces.New +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class NewGetResponse : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// A GitHub user. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.SimpleUser? BillableOwner { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.SimpleUser BillableOwner { get; set; } +#endif + /// The defaults property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Repos.Item.Item.Codespaces.New.NewGetResponse_defaults? Defaults { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Repos.Item.Item.Codespaces.New.NewGetResponse_defaults Defaults { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public NewGetResponse() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Repos.Item.Item.Codespaces.New.NewGetResponse CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Repos.Item.Item.Codespaces.New.NewGetResponse(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "billable_owner", n => { BillableOwner = n.GetObjectValue(global::Ayllu.Github.Client.Models.SimpleUser.CreateFromDiscriminatorValue); } }, + { "defaults", n => { Defaults = n.GetObjectValue(global::Ayllu.Github.Client.Repos.Item.Item.Codespaces.New.NewGetResponse_defaults.CreateFromDiscriminatorValue); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteObjectValue("billable_owner", BillableOwner); + writer.WriteObjectValue("defaults", Defaults); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Codespaces/New/NewGetResponse_defaults.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Codespaces/New/NewGetResponse_defaults.cs new file mode 100644 index 0000000..53444e8 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Codespaces/New/NewGetResponse_defaults.cs @@ -0,0 +1,75 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.Codespaces.New +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class NewGetResponse_defaults : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The devcontainer_path property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? DevcontainerPath { get; set; } +#nullable restore +#else + public string DevcontainerPath { get; set; } +#endif + /// The location property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Location { get; set; } +#nullable restore +#else + public string Location { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public NewGetResponse_defaults() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Repos.Item.Item.Codespaces.New.NewGetResponse_defaults CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Repos.Item.Item.Codespaces.New.NewGetResponse_defaults(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "devcontainer_path", n => { DevcontainerPath = n.GetStringValue(); } }, + { "location", n => { Location = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("devcontainer_path", DevcontainerPath); + writer.WriteStringValue("location", Location); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Codespaces/New/NewRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Codespaces/New/NewRequestBuilder.cs new file mode 100644 index 0000000..d6da5ce --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Codespaces/New/NewRequestBuilder.cs @@ -0,0 +1,158 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.Codespaces.New +{ + /// + /// Builds and executes requests for operations under \repos\{owner-id}\{repo-id}\codespaces\new + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class NewRequestBuilder : BaseRequestBuilder + { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public NewRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/codespaces/new{?client_ip*,ref*}", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public NewRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/codespaces/new{?client_ip*,ref*}", rawUrl) + { + } + /// + /// 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. + /// API method documentation + /// + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 401 status code + /// When receiving a 403 status code + /// When receiving a 404 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsNewGetResponseAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task GetAsNewGetResponseAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "401", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "403", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "404", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Repos.Item.Item.Codespaces.New.NewGetResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// 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. + /// API method documentation + /// + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 401 status code + /// When receiving a 403 status code + /// When receiving a 404 status code + [Obsolete("This method is obsolete. Use GetAsNewGetResponseAsync instead.")] +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "401", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "403", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "404", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Repos.Item.Item.Codespaces.New.NewResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// 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. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.Repos.Item.Item.Codespaces.New.NewRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Repos.Item.Item.Codespaces.New.NewRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// 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. + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class NewRequestBuilderGetQueryParameters + { + /// An alternative IP for default location auto-detection, such as when proxying a request. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("client_ip")] + public string? ClientIp { get; set; } +#nullable restore +#else + [QueryParameter("client_ip")] + public string ClientIp { get; set; } +#endif + /// The branch or commit to check for a default devcontainer path. If not specified, the default branch will be checked. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("ref")] + public string? Ref { get; set; } +#nullable restore +#else + [QueryParameter("ref")] + public string Ref { get; set; } +#endif + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class NewRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Codespaces/New/NewResponse.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Codespaces/New/NewResponse.cs new file mode 100644 index 0000000..102b65d --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Codespaces/New/NewResponse.cs @@ -0,0 +1,28 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.Codespaces.New +{ + [Obsolete("This class is obsolete. Use NewGetResponse instead.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class NewResponse : global::Ayllu.Github.Client.Repos.Item.Item.Codespaces.New.NewGetResponse, IParsable + #pragma warning restore CS1591 + { + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static new global::Ayllu.Github.Client.Repos.Item.Item.Codespaces.New.NewResponse CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Repos.Item.Item.Codespaces.New.NewResponse(); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Codespaces/Permissions_check/Permissions_checkRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Codespaces/Permissions_check/Permissions_checkRequestBuilder.cs new file mode 100644 index 0000000..3af6b50 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Codespaces/Permissions_check/Permissions_checkRequestBuilder.cs @@ -0,0 +1,133 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.Codespaces.Permissions_check +{ + /// + /// Builds and executes requests for operations under \repos\{owner-id}\{repo-id}\codespaces\permissions_check + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class Permissions_checkRequestBuilder : BaseRequestBuilder + { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public Permissions_checkRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/codespaces/permissions_check?devcontainer_path={devcontainer_path}&ref={ref}", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public Permissions_checkRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/codespaces/permissions_check?devcontainer_path={devcontainer_path}&ref={ref}", rawUrl) + { + } + /// + /// 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. + /// API method documentation + /// + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 401 status code + /// When receiving a 403 status code + /// When receiving a 404 status code + /// When receiving a 422 status code + /// When receiving a 503 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "401", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "403", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "404", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "422", global::Ayllu.Github.Client.Models.ValidationError.CreateFromDiscriminatorValue }, + { "503", global::Ayllu.Github.Client.Models.CodespacesPermissionsCheckForDevcontainer503Error.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Models.CodespacesPermissionsCheckForDevcontainer.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// 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. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.Repos.Item.Item.Codespaces.Permissions_check.Permissions_checkRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Repos.Item.Item.Codespaces.Permissions_check.Permissions_checkRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// 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. + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class Permissions_checkRequestBuilderGetQueryParameters + { + /// Path to the devcontainer.json configuration to use for the permission check. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("devcontainer_path")] + public string? DevcontainerPath { get; set; } +#nullable restore +#else + [QueryParameter("devcontainer_path")] + public string DevcontainerPath { get; set; } +#endif + /// 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. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("ref")] + public string? Ref { get; set; } +#nullable restore +#else + [QueryParameter("ref")] + public string Ref { get; set; } +#endif + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class Permissions_checkRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Codespaces/Secrets/Item/WithSecret_nameItemRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Codespaces/Secrets/Item/WithSecret_nameItemRequestBuilder.cs new file mode 100644 index 0000000..954f33c --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Codespaces/Secrets/Item/WithSecret_nameItemRequestBuilder.cs @@ -0,0 +1,188 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.Codespaces.Secrets.Item +{ + /// + /// Builds and executes requests for operations under \repos\{owner-id}\{repo-id}\codespaces\secrets\{secret_name} + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithSecret_nameItemRequestBuilder : BaseRequestBuilder + { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public WithSecret_nameItemRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/codespaces/secrets/{secret_name}", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public WithSecret_nameItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/codespaces/secrets/{secret_name}", rawUrl) + { + } + /// + /// 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. The associated user must be a repository admin. + /// API method documentation + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task DeleteAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task DeleteAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToDeleteRequestInformation(requestConfiguration); + await RequestAdapter.SendNoContentAsync(requestInfo, default, cancellationToken).ConfigureAwait(false); + } + /// + /// 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. + /// API method documentation + /// + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Models.RepoCodespacesSecret.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false); + } + /// + /// 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/rest/guides/encrypting-secrets-for-the-rest-api)."OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. The associated user must be a repository admin. + /// API method documentation + /// + /// A + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PutAsync(global::Ayllu.Github.Client.Repos.Item.Item.Codespaces.Secrets.Item.WithSecret_namePutRequestBody body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task PutAsync(global::Ayllu.Github.Client.Repos.Item.Item.Codespaces.Secrets.Item.WithSecret_namePutRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPutRequestInformation(body, requestConfiguration); + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Models.EmptyObject.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false); + } + /// + /// 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. The associated user must be a repository admin. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToDeleteRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToDeleteRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.DELETE, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + return requestInfo; + } + /// + /// 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. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// 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/rest/guides/encrypting-secrets-for-the-rest-api)."OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. The associated user must be a repository admin. + /// + /// A + /// The request body + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPutRequestInformation(global::Ayllu.Github.Client.Repos.Item.Item.Codespaces.Secrets.Item.WithSecret_namePutRequestBody body, Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToPutRequestInformation(global::Ayllu.Github.Client.Repos.Item.Item.Codespaces.Secrets.Item.WithSecret_namePutRequestBody body, Action> requestConfiguration = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation(Method.PUT, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.Repos.Item.Item.Codespaces.Secrets.Item.WithSecret_nameItemRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Repos.Item.Item.Codespaces.Secrets.Item.WithSecret_nameItemRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithSecret_nameItemRequestBuilderDeleteRequestConfiguration : RequestConfiguration + { + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithSecret_nameItemRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithSecret_nameItemRequestBuilderPutRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Codespaces/Secrets/Item/WithSecret_namePutRequestBody.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Codespaces/Secrets/Item/WithSecret_namePutRequestBody.cs new file mode 100644 index 0000000..26c34fc --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Codespaces/Secrets/Item/WithSecret_namePutRequestBody.cs @@ -0,0 +1,75 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.Codespaces.Secrets.Item +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class WithSecret_namePutRequestBody : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// 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/rest/codespaces/repository-secrets#get-a-repository-public-key) endpoint. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? EncryptedValue { get; set; } +#nullable restore +#else + public string EncryptedValue { get; set; } +#endif + /// ID of the key you used to encrypt the secret. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? KeyId { get; set; } +#nullable restore +#else + public string KeyId { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public WithSecret_namePutRequestBody() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Repos.Item.Item.Codespaces.Secrets.Item.WithSecret_namePutRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Repos.Item.Item.Codespaces.Secrets.Item.WithSecret_namePutRequestBody(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "encrypted_value", n => { EncryptedValue = n.GetStringValue(); } }, + { "key_id", n => { KeyId = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("encrypted_value", EncryptedValue); + writer.WriteStringValue("key_id", KeyId); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Codespaces/Secrets/PublicKey/PublicKeyRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Codespaces/Secrets/PublicKey/PublicKeyRequestBuilder.cs new file mode 100644 index 0000000..354dc37 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Codespaces/Secrets/PublicKey/PublicKeyRequestBuilder.cs @@ -0,0 +1,93 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.Codespaces.Secrets.PublicKey +{ + /// + /// Builds and executes requests for operations under \repos\{owner-id}\{repo-id}\codespaces\secrets\public-key + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class PublicKeyRequestBuilder : BaseRequestBuilder + { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public PublicKeyRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/codespaces/secrets/public-key", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public PublicKeyRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/codespaces/secrets/public-key", rawUrl) + { + } + /// + /// Gets your public key, which you need to encrypt secrets. You need toencrypt a secret before you can create or update secrets.If the repository is private, OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. + /// API method documentation + /// + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Models.CodespacesPublicKey.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false); + } + /// + /// Gets your public key, which you need to encrypt secrets. You need toencrypt a secret before you can create or update secrets.If the repository is private, OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.Repos.Item.Item.Codespaces.Secrets.PublicKey.PublicKeyRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Repos.Item.Item.Codespaces.Secrets.PublicKey.PublicKeyRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class PublicKeyRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Codespaces/Secrets/SecretsGetResponse.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Codespaces/Secrets/SecretsGetResponse.cs new file mode 100644 index 0000000..f9d9889 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Codespaces/Secrets/SecretsGetResponse.cs @@ -0,0 +1,70 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.Codespaces.Secrets +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class SecretsGetResponse : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The secrets property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? Secrets { get; set; } +#nullable restore +#else + public List Secrets { get; set; } +#endif + /// The total_count property + public int? TotalCount { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public SecretsGetResponse() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Repos.Item.Item.Codespaces.Secrets.SecretsGetResponse CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Repos.Item.Item.Codespaces.Secrets.SecretsGetResponse(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "secrets", n => { Secrets = n.GetCollectionOfObjectValues(global::Ayllu.Github.Client.Models.RepoCodespacesSecret.CreateFromDiscriminatorValue)?.AsList(); } }, + { "total_count", n => { TotalCount = n.GetIntValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteCollectionOfObjectValues("secrets", Secrets); + writer.WriteIntValue("total_count", TotalCount); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Codespaces/Secrets/SecretsRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Codespaces/Secrets/SecretsRequestBuilder.cs new file mode 100644 index 0000000..b5487b5 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Codespaces/Secrets/SecretsRequestBuilder.cs @@ -0,0 +1,144 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Repos.Item.Item.Codespaces.Secrets.Item; +using Ayllu.Github.Client.Repos.Item.Item.Codespaces.Secrets.PublicKey; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.Codespaces.Secrets +{ + /// + /// Builds and executes requests for operations under \repos\{owner-id}\{repo-id}\codespaces\secrets + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class SecretsRequestBuilder : BaseRequestBuilder + { + /// The publicKey property + public global::Ayllu.Github.Client.Repos.Item.Item.Codespaces.Secrets.PublicKey.PublicKeyRequestBuilder PublicKey + { + get => new global::Ayllu.Github.Client.Repos.Item.Item.Codespaces.Secrets.PublicKey.PublicKeyRequestBuilder(PathParameters, RequestAdapter); + } + /// Gets an item from the Ayllu.Github.Client.repos.item.item.codespaces.secrets.item collection + /// The name of the secret. + /// A + public global::Ayllu.Github.Client.Repos.Item.Item.Codespaces.Secrets.Item.WithSecret_nameItemRequestBuilder this[string position] + { + get + { + var urlTplParams = new Dictionary(PathParameters); + urlTplParams.Add("secret_name", position); + return new global::Ayllu.Github.Client.Repos.Item.Item.Codespaces.Secrets.Item.WithSecret_nameItemRequestBuilder(urlTplParams, RequestAdapter); + } + } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public SecretsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/codespaces/secrets{?page*,per_page*}", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public SecretsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/codespaces/secrets{?page*,per_page*}", rawUrl) + { + } + /// + /// 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. + /// API method documentation + /// + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsSecretsGetResponseAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task GetAsSecretsGetResponseAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Repos.Item.Item.Codespaces.Secrets.SecretsGetResponse.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false); + } + /// + /// 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. + /// API method documentation + /// + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + [Obsolete("This method is obsolete. Use GetAsSecretsGetResponseAsync instead.")] +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Repos.Item.Item.Codespaces.Secrets.SecretsResponse.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false); + } + /// + /// 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. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.Repos.Item.Item.Codespaces.Secrets.SecretsRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Repos.Item.Item.Codespaces.Secrets.SecretsRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// 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. + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class SecretsRequestBuilderGetQueryParameters + { + /// The page number of the results to fetch. For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." + [QueryParameter("page")] + public int? Page { get; set; } + /// The number of results per page (max 100). For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." + [QueryParameter("per_page")] + public int? PerPage { get; set; } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class SecretsRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Codespaces/Secrets/SecretsResponse.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Codespaces/Secrets/SecretsResponse.cs new file mode 100644 index 0000000..cb34f8d --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Codespaces/Secrets/SecretsResponse.cs @@ -0,0 +1,28 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.Codespaces.Secrets +{ + [Obsolete("This class is obsolete. Use SecretsGetResponse instead.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class SecretsResponse : global::Ayllu.Github.Client.Repos.Item.Item.Codespaces.Secrets.SecretsGetResponse, IParsable + #pragma warning restore CS1591 + { + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static new global::Ayllu.Github.Client.Repos.Item.Item.Codespaces.Secrets.SecretsResponse CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Repos.Item.Item.Codespaces.Secrets.SecretsResponse(); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Collaborators/CollaboratorsRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Collaborators/CollaboratorsRequestBuilder.cs new file mode 100644 index 0000000..2e486d3 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Collaborators/CollaboratorsRequestBuilder.cs @@ -0,0 +1,153 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Ayllu.Github.Client.Repos.Item.Item.Collaborators.Item; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.Collaborators +{ + /// + /// Builds and executes requests for operations under \repos\{owner-id}\{repo-id}\collaborators + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class CollaboratorsRequestBuilder : BaseRequestBuilder + { + /// Gets an item from the Ayllu.Github.Client.repos.item.item.collaborators.item collection + /// The handle for the GitHub user account. + /// A + public global::Ayllu.Github.Client.Repos.Item.Item.Collaborators.Item.WithUsernameItemRequestBuilder this[string position] + { + get + { + var urlTplParams = new Dictionary(PathParameters); + urlTplParams.Add("username", position); + return new global::Ayllu.Github.Client.Repos.Item.Item.Collaborators.Item.WithUsernameItemRequestBuilder(urlTplParams, RequestAdapter); + } + } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public CollaboratorsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/collaborators{?affiliation*,page*,per_page*,permission*}", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public CollaboratorsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/collaborators{?affiliation*,page*,per_page*,permission*}", rawUrl) + { + } + /// + /// 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.The `permissions` hash returned in the response contains the base role permissions of the collaborator. The `role_name` is the highest role assigned to the collaborator after considering all sources of grants, including: repo, teams, organization, and enterprise.There is presently not a way to differentiate between an organization level grant and a repository level grant from this endpoint response.Team members will include the members of child teams.The authenticated user must have write, maintain, or admin privileges on the repository to use this endpoint. For organization-owned repositories, the authenticated user needs to be a member of the organization.OAuth app tokens and personal access tokens (classic) need the `read:org` and `repo` scopes to use this endpoint. + /// API method documentation + /// + /// A List<global::Ayllu.Github.Client.Models.Collaborator> + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 404 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task?> GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task> GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "404", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + }; + var collectionResult = await RequestAdapter.SendCollectionAsync(requestInfo, global::Ayllu.Github.Client.Models.Collaborator.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + return collectionResult?.AsList(); + } + /// + /// 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.The `permissions` hash returned in the response contains the base role permissions of the collaborator. The `role_name` is the highest role assigned to the collaborator after considering all sources of grants, including: repo, teams, organization, and enterprise.There is presently not a way to differentiate between an organization level grant and a repository level grant from this endpoint response.Team members will include the members of child teams.The authenticated user must have write, maintain, or admin privileges on the repository to use this endpoint. For organization-owned repositories, the authenticated user needs to be a member of the organization.OAuth app tokens and personal access tokens (classic) need the `read:org` and `repo` scopes to use this endpoint. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.Repos.Item.Item.Collaborators.CollaboratorsRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Repos.Item.Item.Collaborators.CollaboratorsRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// 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.The `permissions` hash returned in the response contains the base role permissions of the collaborator. The `role_name` is the highest role assigned to the collaborator after considering all sources of grants, including: repo, teams, organization, and enterprise.There is presently not a way to differentiate between an organization level grant and a repository level grant from this endpoint response.Team members will include the members of child teams.The authenticated user must have write, maintain, or admin privileges on the repository to use this endpoint. For organization-owned repositories, the authenticated user needs to be a member of the organization.OAuth app tokens and personal access tokens (classic) need the `read:org` and `repo` scopes to use this endpoint. + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class CollaboratorsRequestBuilderGetQueryParameters + { + /// 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. + [Obsolete("This property is deprecated, use AffiliationAsGetAffiliationQueryParameterType instead")] +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("affiliation")] + public string? Affiliation { get; set; } +#nullable restore +#else + [QueryParameter("affiliation")] + public string Affiliation { get; set; } +#endif + /// 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. + [QueryParameter("affiliation")] + public global::Ayllu.Github.Client.Repos.Item.Item.Collaborators.GetAffiliationQueryParameterType? AffiliationAsGetAffiliationQueryParameterType { get; set; } + /// The page number of the results to fetch. For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." + [QueryParameter("page")] + public int? Page { get; set; } + /// Filter collaborators by the permissions they have on the repository. If not specified, all collaborators will be returned. + [Obsolete("This property is deprecated, use PermissionAsGetPermissionQueryParameterType instead")] +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("permission")] + public string? Permission { get; set; } +#nullable restore +#else + [QueryParameter("permission")] + public string Permission { get; set; } +#endif + /// Filter collaborators by the permissions they have on the repository. If not specified, all collaborators will be returned. + [QueryParameter("permission")] + public global::Ayllu.Github.Client.Repos.Item.Item.Collaborators.GetPermissionQueryParameterType? PermissionAsGetPermissionQueryParameterType { get; set; } + /// The number of results per page (max 100). For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." + [QueryParameter("per_page")] + public int? PerPage { get; set; } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class CollaboratorsRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Collaborators/GetAffiliationQueryParameterType.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Collaborators/GetAffiliationQueryParameterType.cs new file mode 100644 index 0000000..ad38ec1 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Collaborators/GetAffiliationQueryParameterType.cs @@ -0,0 +1,24 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.Collaborators +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public enum GetAffiliationQueryParameterType + #pragma warning restore CS1591 + { + [EnumMember(Value = "outside")] + #pragma warning disable CS1591 + Outside, + #pragma warning restore CS1591 + [EnumMember(Value = "direct")] + #pragma warning disable CS1591 + Direct, + #pragma warning restore CS1591 + [EnumMember(Value = "all")] + #pragma warning disable CS1591 + All, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Collaborators/GetPermissionQueryParameterType.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Collaborators/GetPermissionQueryParameterType.cs new file mode 100644 index 0000000..45f2bca --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Collaborators/GetPermissionQueryParameterType.cs @@ -0,0 +1,32 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.Collaborators +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public enum GetPermissionQueryParameterType + #pragma warning restore CS1591 + { + [EnumMember(Value = "pull")] + #pragma warning disable CS1591 + Pull, + #pragma warning restore CS1591 + [EnumMember(Value = "triage")] + #pragma warning disable CS1591 + Triage, + #pragma warning restore CS1591 + [EnumMember(Value = "push")] + #pragma warning disable CS1591 + Push, + #pragma warning restore CS1591 + [EnumMember(Value = "maintain")] + #pragma warning disable CS1591 + Maintain, + #pragma warning restore CS1591 + [EnumMember(Value = "admin")] + #pragma warning disable CS1591 + Admin, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Collaborators/Item/Permission/PermissionRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Collaborators/Item/Permission/PermissionRequestBuilder.cs new file mode 100644 index 0000000..06bb861 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Collaborators/Item/Permission/PermissionRequestBuilder.cs @@ -0,0 +1,98 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.Collaborators.Item.Permission +{ + /// + /// Builds and executes requests for operations under \repos\{owner-id}\{repo-id}\collaborators\{username}\permission + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class PermissionRequestBuilder : BaseRequestBuilder + { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public PermissionRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/collaborators/{username}/permission", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public PermissionRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/collaborators/{username}/permission", rawUrl) + { + } + /// + /// Checks the repository permission and role of a collaborator.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`.The `role_name` attribute provides the name of the assigned role, including custom roles. The`permission` can also be used to determine which base level of access the collaborator has to the repository.The calculated permissions are the highest role assigned to the collaborator after considering all sources of grants, including: repo, teams, organization, and enterprise.There is presently not a way to differentiate between an organization level grant and a repository level grant from this endpoint response. + /// API method documentation + /// + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 404 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "404", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Models.RepositoryCollaboratorPermission.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// Checks the repository permission and role of a collaborator.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`.The `role_name` attribute provides the name of the assigned role, including custom roles. The`permission` can also be used to determine which base level of access the collaborator has to the repository.The calculated permissions are the highest role assigned to the collaborator after considering all sources of grants, including: repo, teams, organization, and enterprise.There is presently not a way to differentiate between an organization level grant and a repository level grant from this endpoint response. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.Repos.Item.Item.Collaborators.Item.Permission.PermissionRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Repos.Item.Item.Collaborators.Item.Permission.PermissionRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class PermissionRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Collaborators/Item/WithUsernameItemRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Collaborators/Item/WithUsernameItemRequestBuilder.cs new file mode 100644 index 0000000..314a956 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Collaborators/Item/WithUsernameItemRequestBuilder.cs @@ -0,0 +1,207 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Ayllu.Github.Client.Repos.Item.Item.Collaborators.Item.Permission; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.Collaborators.Item +{ + /// + /// Builds and executes requests for operations under \repos\{owner-id}\{repo-id}\collaborators\{username} + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithUsernameItemRequestBuilder : BaseRequestBuilder + { + /// The permission property + public global::Ayllu.Github.Client.Repos.Item.Item.Collaborators.Item.Permission.PermissionRequestBuilder Permission + { + get => new global::Ayllu.Github.Client.Repos.Item.Item.Collaborators.Item.Permission.PermissionRequestBuilder(PathParameters, RequestAdapter); + } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public WithUsernameItemRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/collaborators/{username}", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public WithUsernameItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/collaborators/{username}", rawUrl) + { + } + /// + /// 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 sent by the collaborator- Unassigns 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/pull-requests/collaborating-with-pull-requests/working-with-forks/about-permissions-and-visibility-of-forks)". + /// API method documentation + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 403 status code + /// When receiving a 422 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task DeleteAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task DeleteAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToDeleteRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "403", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "422", global::Ayllu.Github.Client.Models.ValidationError.CreateFromDiscriminatorValue }, + }; + await RequestAdapter.SendNoContentAsync(requestInfo, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// 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 + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + await RequestAdapter.SendNoContentAsync(requestInfo, default, cancellationToken).ConfigureAwait(false); + } + /// + /// Add a user to a repository with a specified level of access. If the repository is owned by an organization, this API does not add the user to the organization - a user that has repository access without being an organization member is called an "outside collaborator" (if they are not an Enterprise Managed User) or a "repository collaborator" if they are an Enterprise Managed User. These users are exempt from some organization policies - see "[Adding outside collaborators to repositories](https://docs.github.com/organizations/managing-user-access-to-your-organizations-repositories/managing-outside-collaborators/adding-outside-collaborators-to-repositories-in-your-organization)" to learn more about these collaborator types.This endpoint triggers [notifications](https://docs.github.com/github/managing-subscriptions-and-notifications-on-github/about-notifications).Adding an outside collaborator may be restricted by enterprise and organization administrators. For more information, see "[Enforcing repository management policies in your enterprise](https://docs.github.com/admin/policies/enforcing-policies-for-your-enterprise/enforcing-repository-management-policies-in-your-enterprise#enforcing-a-policy-for-inviting-outside-collaborators-to-repositories)" and "[Setting permissions for adding outside collaborators](https://docs.github.com/organizations/managing-organization-settings/setting-permissions-for-adding-outside-collaborators)" for organization settings.For more information on permission levels, see "[Repository permission levels for an organization](https://docs.github.com/github/setting-up-and-managing-organizations-and-teams/repository-permission-levels-for-an-organization#permission-levels-for-repositories-owned-by-an-organization)". There are restrictions on which permissions can be granted to organization members when an organization base role is in place. In this case, the role being given must be equal to or higher than the org base permission. Otherwise, the request will fail with:```Cannot assign {member} permission of {role name}```Note that, if you choose not to pass any parameters, you'll need to set `Content-Length` to zero when calling out to this endpoint. For more information, see "[HTTP method](https://docs.github.com/rest/guides/getting-started-with-the-rest-api#http-method)."The invitee will receive a notification that they have been invited to the repository, which they must accept or decline. They may do this via the notifications page, the email they receive, or by using the [API](https://docs.github.com/rest/collaborators/invitations).For Enterprise Managed Users, this endpoint does not send invitations - these users are automatically added to organizations and repositories. Enterprise Managed Users can only be added to organizations and repositories within their enterprise.**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. + /// API method documentation + /// + /// A + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 403 status code + /// When receiving a 422 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PutAsync(global::Ayllu.Github.Client.Repos.Item.Item.Collaborators.Item.WithUsernamePutRequestBody body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task PutAsync(global::Ayllu.Github.Client.Repos.Item.Item.Collaborators.Item.WithUsernamePutRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPutRequestInformation(body, requestConfiguration); + var errorMapping = new Dictionary> + { + { "403", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "422", global::Ayllu.Github.Client.Models.ValidationError.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Models.RepositoryInvitation.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// 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 sent by the collaborator- Unassigns 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/pull-requests/collaborating-with-pull-requests/working-with-forks/about-permissions-and-visibility-of-forks)". + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToDeleteRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToDeleteRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.DELETE, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// 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. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + return requestInfo; + } + /// + /// Add a user to a repository with a specified level of access. If the repository is owned by an organization, this API does not add the user to the organization - a user that has repository access without being an organization member is called an "outside collaborator" (if they are not an Enterprise Managed User) or a "repository collaborator" if they are an Enterprise Managed User. These users are exempt from some organization policies - see "[Adding outside collaborators to repositories](https://docs.github.com/organizations/managing-user-access-to-your-organizations-repositories/managing-outside-collaborators/adding-outside-collaborators-to-repositories-in-your-organization)" to learn more about these collaborator types.This endpoint triggers [notifications](https://docs.github.com/github/managing-subscriptions-and-notifications-on-github/about-notifications).Adding an outside collaborator may be restricted by enterprise and organization administrators. For more information, see "[Enforcing repository management policies in your enterprise](https://docs.github.com/admin/policies/enforcing-policies-for-your-enterprise/enforcing-repository-management-policies-in-your-enterprise#enforcing-a-policy-for-inviting-outside-collaborators-to-repositories)" and "[Setting permissions for adding outside collaborators](https://docs.github.com/organizations/managing-organization-settings/setting-permissions-for-adding-outside-collaborators)" for organization settings.For more information on permission levels, see "[Repository permission levels for an organization](https://docs.github.com/github/setting-up-and-managing-organizations-and-teams/repository-permission-levels-for-an-organization#permission-levels-for-repositories-owned-by-an-organization)". There are restrictions on which permissions can be granted to organization members when an organization base role is in place. In this case, the role being given must be equal to or higher than the org base permission. Otherwise, the request will fail with:```Cannot assign {member} permission of {role name}```Note that, if you choose not to pass any parameters, you'll need to set `Content-Length` to zero when calling out to this endpoint. For more information, see "[HTTP method](https://docs.github.com/rest/guides/getting-started-with-the-rest-api#http-method)."The invitee will receive a notification that they have been invited to the repository, which they must accept or decline. They may do this via the notifications page, the email they receive, or by using the [API](https://docs.github.com/rest/collaborators/invitations).For Enterprise Managed Users, this endpoint does not send invitations - these users are automatically added to organizations and repositories. Enterprise Managed Users can only be added to organizations and repositories within their enterprise.**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. + /// + /// A + /// The request body + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPutRequestInformation(global::Ayllu.Github.Client.Repos.Item.Item.Collaborators.Item.WithUsernamePutRequestBody body, Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToPutRequestInformation(global::Ayllu.Github.Client.Repos.Item.Item.Collaborators.Item.WithUsernamePutRequestBody body, Action> requestConfiguration = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation(Method.PUT, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.Repos.Item.Item.Collaborators.Item.WithUsernameItemRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Repos.Item.Item.Collaborators.Item.WithUsernameItemRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithUsernameItemRequestBuilderDeleteRequestConfiguration : RequestConfiguration + { + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithUsernameItemRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithUsernameItemRequestBuilderPutRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Collaborators/Item/WithUsernamePutRequestBody.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Collaborators/Item/WithUsernamePutRequestBody.cs new file mode 100644 index 0000000..693fe0f --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Collaborators/Item/WithUsernamePutRequestBody.cs @@ -0,0 +1,66 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.Collaborators.Item +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class WithUsernamePutRequestBody : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// 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. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Permission { get; set; } +#nullable restore +#else + public string Permission { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public WithUsernamePutRequestBody() + { + AdditionalData = new Dictionary(); + Permission = "push"; + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Repos.Item.Item.Collaborators.Item.WithUsernamePutRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Repos.Item.Item.Collaborators.Item.WithUsernamePutRequestBody(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "permission", n => { Permission = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("permission", Permission); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Comments/CommentsRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Comments/CommentsRequestBuilder.cs new file mode 100644 index 0000000..0249970 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Comments/CommentsRequestBuilder.cs @@ -0,0 +1,133 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Ayllu.Github.Client.Repos.Item.Item.Comments.Item; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.Comments +{ + /// + /// Builds and executes requests for operations under \repos\{owner-id}\{repo-id}\comments + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class CommentsRequestBuilder : BaseRequestBuilder + { + /// Gets an item from the Ayllu.Github.Client.repos.item.item.comments.item collection + /// The unique identifier of the comment. + /// A + public global::Ayllu.Github.Client.Repos.Item.Item.Comments.Item.WithComment_ItemRequestBuilder this[long position] + { + get + { + var urlTplParams = new Dictionary(PathParameters); + urlTplParams.Add("comment_id", position); + return new global::Ayllu.Github.Client.Repos.Item.Item.Comments.Item.WithComment_ItemRequestBuilder(urlTplParams, RequestAdapter); + } + } + /// Gets an item from the Ayllu.Github.Client.repos.item.item.comments.item collection + /// The unique identifier of the comment. + /// A + [Obsolete("This indexer is deprecated and will be removed in the next major version. Use the one with the typed parameter instead.")] + public global::Ayllu.Github.Client.Repos.Item.Item.Comments.Item.WithComment_ItemRequestBuilder this[string position] + { + get + { + var urlTplParams = new Dictionary(PathParameters); + if (!string.IsNullOrWhiteSpace(position)) urlTplParams.Add("comment_id", position); + return new global::Ayllu.Github.Client.Repos.Item.Item.Comments.Item.WithComment_ItemRequestBuilder(urlTplParams, RequestAdapter); + } + } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public CommentsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/comments{?page*,per_page*}", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public CommentsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/comments{?page*,per_page*}", rawUrl) + { + } + /// + /// 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/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`. + /// API method documentation + /// + /// A List<global::Ayllu.Github.Client.Models.CommitComment> + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task?> GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task> GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var collectionResult = await RequestAdapter.SendCollectionAsync(requestInfo, global::Ayllu.Github.Client.Models.CommitComment.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false); + return collectionResult?.AsList(); + } + /// + /// 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/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`. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.Repos.Item.Item.Comments.CommentsRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Repos.Item.Item.Comments.CommentsRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// 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/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`. + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class CommentsRequestBuilderGetQueryParameters + { + /// The page number of the results to fetch. For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." + [QueryParameter("page")] + public int? Page { get; set; } + /// The number of results per page (max 100). For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." + [QueryParameter("per_page")] + public int? PerPage { get; set; } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class CommentsRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Comments/Item/Reactions/GetContentQueryParameterType.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Comments/Item/Reactions/GetContentQueryParameterType.cs new file mode 100644 index 0000000..ec6354b --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Comments/Item/Reactions/GetContentQueryParameterType.cs @@ -0,0 +1,44 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.Comments.Item.Reactions +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public enum GetContentQueryParameterType + #pragma warning restore CS1591 + { + [EnumMember(Value = "+1")] + #pragma warning disable CS1591 + Plus_1, + #pragma warning restore CS1591 + [EnumMember(Value = "-1")] + #pragma warning disable CS1591 + Minus_1, + #pragma warning restore CS1591 + [EnumMember(Value = "laugh")] + #pragma warning disable CS1591 + Laugh, + #pragma warning restore CS1591 + [EnumMember(Value = "confused")] + #pragma warning disable CS1591 + Confused, + #pragma warning restore CS1591 + [EnumMember(Value = "heart")] + #pragma warning disable CS1591 + Heart, + #pragma warning restore CS1591 + [EnumMember(Value = "hooray")] + #pragma warning disable CS1591 + Hooray, + #pragma warning restore CS1591 + [EnumMember(Value = "rocket")] + #pragma warning disable CS1591 + Rocket, + #pragma warning restore CS1591 + [EnumMember(Value = "eyes")] + #pragma warning disable CS1591 + Eyes, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Comments/Item/Reactions/Item/WithReaction_ItemRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Comments/Item/Reactions/Item/WithReaction_ItemRequestBuilder.cs new file mode 100644 index 0000000..b876210 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Comments/Item/Reactions/Item/WithReaction_ItemRequestBuilder.cs @@ -0,0 +1,90 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.Comments.Item.Reactions.Item +{ + /// + /// Builds and executes requests for operations under \repos\{owner-id}\{repo-id}\comments\{comment_id}\reactions\{reaction_id} + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithReaction_ItemRequestBuilder : BaseRequestBuilder + { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public WithReaction_ItemRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/comments/{comment_id}/reactions/{reaction_id}", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public WithReaction_ItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/comments/{comment_id}/reactions/{reaction_id}", rawUrl) + { + } + /// + /// > [!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/rest/commits/comments#get-a-commit-comment). + /// API method documentation + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task DeleteAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task DeleteAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToDeleteRequestInformation(requestConfiguration); + await RequestAdapter.SendNoContentAsync(requestInfo, default, cancellationToken).ConfigureAwait(false); + } + /// + /// > [!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/rest/commits/comments#get-a-commit-comment). + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToDeleteRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToDeleteRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.DELETE, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.Repos.Item.Item.Comments.Item.Reactions.Item.WithReaction_ItemRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Repos.Item.Item.Comments.Item.Reactions.Item.WithReaction_ItemRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithReaction_ItemRequestBuilderDeleteRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Comments/Item/Reactions/ReactionsPostRequestBody.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Comments/Item/Reactions/ReactionsPostRequestBody.cs new file mode 100644 index 0000000..e7978d3 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Comments/Item/Reactions/ReactionsPostRequestBody.cs @@ -0,0 +1,59 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.Comments.Item.Reactions +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class ReactionsPostRequestBody : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The [reaction type](https://docs.github.com/rest/reactions/reactions#about-reactions) to add to the commit comment. + public global::Ayllu.Github.Client.Repos.Item.Item.Comments.Item.Reactions.ReactionsPostRequestBody_content? Content { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public ReactionsPostRequestBody() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Repos.Item.Item.Comments.Item.Reactions.ReactionsPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Repos.Item.Item.Comments.Item.Reactions.ReactionsPostRequestBody(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "content", n => { Content = n.GetEnumValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteEnumValue("content", Content); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Comments/Item/Reactions/ReactionsPostRequestBody_content.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Comments/Item/Reactions/ReactionsPostRequestBody_content.cs new file mode 100644 index 0000000..71e129c --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Comments/Item/Reactions/ReactionsPostRequestBody_content.cs @@ -0,0 +1,43 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.Comments.Item.Reactions +{ + /// The [reaction type](https://docs.github.com/rest/reactions/reactions#about-reactions) to add to the commit comment. + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public enum ReactionsPostRequestBody_content + { + [EnumMember(Value = "+1")] + #pragma warning disable CS1591 + Plus_1, + #pragma warning restore CS1591 + [EnumMember(Value = "-1")] + #pragma warning disable CS1591 + Minus_1, + #pragma warning restore CS1591 + [EnumMember(Value = "laugh")] + #pragma warning disable CS1591 + Laugh, + #pragma warning restore CS1591 + [EnumMember(Value = "confused")] + #pragma warning disable CS1591 + Confused, + #pragma warning restore CS1591 + [EnumMember(Value = "heart")] + #pragma warning disable CS1591 + Heart, + #pragma warning restore CS1591 + [EnumMember(Value = "hooray")] + #pragma warning disable CS1591 + Hooray, + #pragma warning restore CS1591 + [EnumMember(Value = "rocket")] + #pragma warning disable CS1591 + Rocket, + #pragma warning restore CS1591 + [EnumMember(Value = "eyes")] + #pragma warning disable CS1591 + Eyes, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Comments/Item/Reactions/ReactionsRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Comments/Item/Reactions/ReactionsRequestBuilder.cs new file mode 100644 index 0000000..3ed334b --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Comments/Item/Reactions/ReactionsRequestBuilder.cs @@ -0,0 +1,208 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Ayllu.Github.Client.Repos.Item.Item.Comments.Item.Reactions.Item; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.Comments.Item.Reactions +{ + /// + /// Builds and executes requests for operations under \repos\{owner-id}\{repo-id}\comments\{comment_id}\reactions + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class ReactionsRequestBuilder : BaseRequestBuilder + { + /// Gets an item from the Ayllu.Github.Client.repos.item.item.comments.item.reactions.item collection + /// The unique identifier of the reaction. + /// A + public global::Ayllu.Github.Client.Repos.Item.Item.Comments.Item.Reactions.Item.WithReaction_ItemRequestBuilder this[int position] + { + get + { + var urlTplParams = new Dictionary(PathParameters); + urlTplParams.Add("reaction_id", position); + return new global::Ayllu.Github.Client.Repos.Item.Item.Comments.Item.Reactions.Item.WithReaction_ItemRequestBuilder(urlTplParams, RequestAdapter); + } + } + /// Gets an item from the Ayllu.Github.Client.repos.item.item.comments.item.reactions.item collection + /// The unique identifier of the reaction. + /// A + [Obsolete("This indexer is deprecated and will be removed in the next major version. Use the one with the typed parameter instead.")] + public global::Ayllu.Github.Client.Repos.Item.Item.Comments.Item.Reactions.Item.WithReaction_ItemRequestBuilder this[string position] + { + get + { + var urlTplParams = new Dictionary(PathParameters); + if (!string.IsNullOrWhiteSpace(position)) urlTplParams.Add("reaction_id", position); + return new global::Ayllu.Github.Client.Repos.Item.Item.Comments.Item.Reactions.Item.WithReaction_ItemRequestBuilder(urlTplParams, RequestAdapter); + } + } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public ReactionsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/comments/{comment_id}/reactions{?content*,page*,per_page*}", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public ReactionsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/comments/{comment_id}/reactions{?content*,page*,per_page*}", rawUrl) + { + } + /// + /// List the reactions to a [commit comment](https://docs.github.com/rest/commits/comments#get-a-commit-comment). + /// API method documentation + /// + /// A List<global::Ayllu.Github.Client.Models.Reaction> + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 404 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task?> GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task> GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "404", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + }; + var collectionResult = await RequestAdapter.SendCollectionAsync(requestInfo, global::Ayllu.Github.Client.Models.Reaction.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + return collectionResult?.AsList(); + } + /// + /// Create a reaction to a [commit comment](https://docs.github.com/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. + /// API method documentation + /// + /// A + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 422 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PostAsync(global::Ayllu.Github.Client.Repos.Item.Item.Comments.Item.Reactions.ReactionsPostRequestBody body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task PostAsync(global::Ayllu.Github.Client.Repos.Item.Item.Comments.Item.Reactions.ReactionsPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPostRequestInformation(body, requestConfiguration); + var errorMapping = new Dictionary> + { + { "422", global::Ayllu.Github.Client.Models.ValidationError.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Models.Reaction.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// List the reactions to a [commit comment](https://docs.github.com/rest/commits/comments#get-a-commit-comment). + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Create a reaction to a [commit comment](https://docs.github.com/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. + /// + /// A + /// The request body + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPostRequestInformation(global::Ayllu.Github.Client.Repos.Item.Item.Comments.Item.Reactions.ReactionsPostRequestBody body, Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToPostRequestInformation(global::Ayllu.Github.Client.Repos.Item.Item.Comments.Item.Reactions.ReactionsPostRequestBody body, Action> requestConfiguration = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.Repos.Item.Item.Comments.Item.Reactions.ReactionsRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Repos.Item.Item.Comments.Item.Reactions.ReactionsRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// List the reactions to a [commit comment](https://docs.github.com/rest/commits/comments#get-a-commit-comment). + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class ReactionsRequestBuilderGetQueryParameters + { + /// Returns a single [reaction type](https://docs.github.com/rest/reactions/reactions#about-reactions). Omit this parameter to list all reactions to a commit comment. + [Obsolete("This property is deprecated, use ContentAsGetContentQueryParameterType instead")] +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("content")] + public string? Content { get; set; } +#nullable restore +#else + [QueryParameter("content")] + public string Content { get; set; } +#endif + /// Returns a single [reaction type](https://docs.github.com/rest/reactions/reactions#about-reactions). Omit this parameter to list all reactions to a commit comment. + [QueryParameter("content")] + public global::Ayllu.Github.Client.Repos.Item.Item.Comments.Item.Reactions.GetContentQueryParameterType? ContentAsGetContentQueryParameterType { get; set; } + /// The page number of the results to fetch. For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." + [QueryParameter("page")] + public int? Page { get; set; } + /// The number of results per page (max 100). For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." + [QueryParameter("per_page")] + public int? PerPage { get; set; } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class ReactionsRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class ReactionsRequestBuilderPostRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Comments/Item/WithComment_ItemRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Comments/Item/WithComment_ItemRequestBuilder.cs new file mode 100644 index 0000000..a47f053 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Comments/Item/WithComment_ItemRequestBuilder.cs @@ -0,0 +1,207 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Ayllu.Github.Client.Repos.Item.Item.Comments.Item.Reactions; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.Comments.Item +{ + /// + /// Builds and executes requests for operations under \repos\{owner-id}\{repo-id}\comments\{comment_id} + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithComment_ItemRequestBuilder : BaseRequestBuilder + { + /// The reactions property + public global::Ayllu.Github.Client.Repos.Item.Item.Comments.Item.Reactions.ReactionsRequestBuilder Reactions + { + get => new global::Ayllu.Github.Client.Repos.Item.Item.Comments.Item.Reactions.ReactionsRequestBuilder(PathParameters, RequestAdapter); + } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public WithComment_ItemRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/comments/{comment_id}", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public WithComment_ItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/comments/{comment_id}", rawUrl) + { + } + /// + /// Delete a commit comment + /// API method documentation + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 404 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task DeleteAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task DeleteAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToDeleteRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "404", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + }; + await RequestAdapter.SendNoContentAsync(requestInfo, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// Gets a specified commit comment.This endpoint supports the following custom media types. For more information, see "[Media types](https://docs.github.com/rest/using-the-rest-api/getting-started-with-the-rest-api#media-types)."- **`application/vnd.github-commitcomment.raw+json`**: Returns the raw markdown body. Response will include `body`. This is the default if you do not pass any specific media type.- **`application/vnd.github-commitcomment.text+json`**: Returns a text only representation of the markdown body. Response will include `body_text`.- **`application/vnd.github-commitcomment.html+json`**: Returns HTML rendered from the body's markdown. Response will include `body_html`.- **`application/vnd.github-commitcomment.full+json`**: Returns raw, text, and HTML representations. Response will include `body`, `body_text`, and `body_html`. + /// API method documentation + /// + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 404 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "404", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Models.CommitComment.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// 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/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`. + /// API method documentation + /// + /// A + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 404 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PatchAsync(global::Ayllu.Github.Client.Repos.Item.Item.Comments.Item.WithComment_PatchRequestBody body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task PatchAsync(global::Ayllu.Github.Client.Repos.Item.Item.Comments.Item.WithComment_PatchRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPatchRequestInformation(body, requestConfiguration); + var errorMapping = new Dictionary> + { + { "404", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Models.CommitComment.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToDeleteRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToDeleteRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.DELETE, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Gets a specified commit comment.This endpoint supports the following custom media types. For more information, see "[Media types](https://docs.github.com/rest/using-the-rest-api/getting-started-with-the-rest-api#media-types)."- **`application/vnd.github-commitcomment.raw+json`**: Returns the raw markdown body. Response will include `body`. This is the default if you do not pass any specific media type.- **`application/vnd.github-commitcomment.text+json`**: Returns a text only representation of the markdown body. Response will include `body_text`.- **`application/vnd.github-commitcomment.html+json`**: Returns HTML rendered from the body's markdown. Response will include `body_html`.- **`application/vnd.github-commitcomment.full+json`**: Returns raw, text, and HTML representations. Response will include `body`, `body_text`, and `body_html`. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// 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/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`. + /// + /// A + /// The request body + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPatchRequestInformation(global::Ayllu.Github.Client.Repos.Item.Item.Comments.Item.WithComment_PatchRequestBody body, Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToPatchRequestInformation(global::Ayllu.Github.Client.Repos.Item.Item.Comments.Item.WithComment_PatchRequestBody body, Action> requestConfiguration = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.Repos.Item.Item.Comments.Item.WithComment_ItemRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Repos.Item.Item.Comments.Item.WithComment_ItemRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithComment_ItemRequestBuilderDeleteRequestConfiguration : RequestConfiguration + { + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithComment_ItemRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithComment_ItemRequestBuilderPatchRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Comments/Item/WithComment_PatchRequestBody.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Comments/Item/WithComment_PatchRequestBody.cs new file mode 100644 index 0000000..8a31940 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Comments/Item/WithComment_PatchRequestBody.cs @@ -0,0 +1,65 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.Comments.Item +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class WithComment_PatchRequestBody : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The contents of the comment +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Body { get; set; } +#nullable restore +#else + public string Body { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public WithComment_PatchRequestBody() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Repos.Item.Item.Comments.Item.WithComment_PatchRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Repos.Item.Item.Comments.Item.WithComment_PatchRequestBody(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "body", n => { Body = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("body", Body); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Commits/CommitsRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Commits/CommitsRequestBuilder.cs new file mode 100644 index 0000000..b3cf597 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Commits/CommitsRequestBuilder.cs @@ -0,0 +1,177 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Ayllu.Github.Client.Repos.Item.Item.Commits.Item; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.Commits +{ + /// + /// Builds and executes requests for operations under \repos\{owner-id}\{repo-id}\commits + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class CommitsRequestBuilder : BaseRequestBuilder + { + /// Gets an item from the Ayllu.Github.Client.repos.item.item.commits.item collection + /// The commit reference. Can be a commit SHA, branch name (`heads/BRANCH_NAME`), or tag name (`tags/TAG_NAME`). For more information, see "[Git References](https://git-scm.com/book/en/v2/Git-Internals-Git-References)" in the Git documentation. + /// A + public global::Ayllu.Github.Client.Repos.Item.Item.Commits.Item.Commit_shaItemRequestBuilder this[string position] + { + get + { + var urlTplParams = new Dictionary(PathParameters); + urlTplParams.Add("commit_sha%2Did", position); + return new global::Ayllu.Github.Client.Repos.Item.Item.Commits.Item.Commit_shaItemRequestBuilder(urlTplParams, RequestAdapter); + } + } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public CommitsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/commits{?author*,committer*,page*,path*,per_page*,sha*,since*,until*}", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public CommitsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/commits{?author*,committer*,page*,path*,per_page*,sha*,since*,until*}", rawUrl) + { + } + /// + /// **Signature verification object**The response will include a `verification` object that describes the result of verifying the commit's signature. The following fields are included in the `verification` object:| Name | Type | Description || ---- | ---- | ----------- || `verified` | `boolean` | Indicates whether GitHub considers the signature in this commit to be verified. || `reason` | `string` | The reason for verified value. Possible values and their meanings are enumerated in table below. || `signature` | `string` | The signature that was extracted from the commit. || `payload` | `string` | The value that was signed. || `verified_at` | `string` | The date the signature was verified by GitHub. |These are the possible values for `reason` in the `verification` object:| Value | Description || ----- | ----------- || `expired_key` | The key that made the signature is expired. || `not_signing_key` | The "signing" flag is not among the usage flags in the GPG key that made the signature. || `gpgverify_error` | There was an error communicating with the signature verification service. || `gpgverify_unavailable` | The signature verification service is currently unavailable. || `unsigned` | The object does not include a signature. || `unknown_signature_type` | A non-PGP signature was found in the commit. || `no_user` | No user was associated with the `committer` email address in the commit. || `unverified_email` | The `committer` email address in the commit was associated with a user, but the email address is not verified on their account. || `bad_email` | The `committer` email address in the commit is not included in the identities of the PGP key that made the signature. || `unknown_key` | The key that made the signature has not been registered with any user's account. || `malformed_signature` | There was an error parsing the signature. || `invalid` | The signature could not be cryptographically verified using the key whose key-id was found in the signature. || `valid` | None of the above errors applied, so the signature is considered to be verified. | + /// API method documentation + /// + /// A List<global::Ayllu.Github.Client.Models.Commit> + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 400 status code + /// When receiving a 404 status code + /// When receiving a 409 status code + /// When receiving a 500 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task?> GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task> GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "400", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "404", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "409", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "500", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + }; + var collectionResult = await RequestAdapter.SendCollectionAsync(requestInfo, global::Ayllu.Github.Client.Models.Commit.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + return collectionResult?.AsList(); + } + /// + /// **Signature verification object**The response will include a `verification` object that describes the result of verifying the commit's signature. The following fields are included in the `verification` object:| Name | Type | Description || ---- | ---- | ----------- || `verified` | `boolean` | Indicates whether GitHub considers the signature in this commit to be verified. || `reason` | `string` | The reason for verified value. Possible values and their meanings are enumerated in table below. || `signature` | `string` | The signature that was extracted from the commit. || `payload` | `string` | The value that was signed. || `verified_at` | `string` | The date the signature was verified by GitHub. |These are the possible values for `reason` in the `verification` object:| Value | Description || ----- | ----------- || `expired_key` | The key that made the signature is expired. || `not_signing_key` | The "signing" flag is not among the usage flags in the GPG key that made the signature. || `gpgverify_error` | There was an error communicating with the signature verification service. || `gpgverify_unavailable` | The signature verification service is currently unavailable. || `unsigned` | The object does not include a signature. || `unknown_signature_type` | A non-PGP signature was found in the commit. || `no_user` | No user was associated with the `committer` email address in the commit. || `unverified_email` | The `committer` email address in the commit was associated with a user, but the email address is not verified on their account. || `bad_email` | The `committer` email address in the commit is not included in the identities of the PGP key that made the signature. || `unknown_key` | The key that made the signature has not been registered with any user's account. || `malformed_signature` | There was an error parsing the signature. || `invalid` | The signature could not be cryptographically verified using the key whose key-id was found in the signature. || `valid` | None of the above errors applied, so the signature is considered to be verified. | + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.Repos.Item.Item.Commits.CommitsRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Repos.Item.Item.Commits.CommitsRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// **Signature verification object**The response will include a `verification` object that describes the result of verifying the commit's signature. The following fields are included in the `verification` object:| Name | Type | Description || ---- | ---- | ----------- || `verified` | `boolean` | Indicates whether GitHub considers the signature in this commit to be verified. || `reason` | `string` | The reason for verified value. Possible values and their meanings are enumerated in table below. || `signature` | `string` | The signature that was extracted from the commit. || `payload` | `string` | The value that was signed. || `verified_at` | `string` | The date the signature was verified by GitHub. |These are the possible values for `reason` in the `verification` object:| Value | Description || ----- | ----------- || `expired_key` | The key that made the signature is expired. || `not_signing_key` | The "signing" flag is not among the usage flags in the GPG key that made the signature. || `gpgverify_error` | There was an error communicating with the signature verification service. || `gpgverify_unavailable` | The signature verification service is currently unavailable. || `unsigned` | The object does not include a signature. || `unknown_signature_type` | A non-PGP signature was found in the commit. || `no_user` | No user was associated with the `committer` email address in the commit. || `unverified_email` | The `committer` email address in the commit was associated with a user, but the email address is not verified on their account. || `bad_email` | The `committer` email address in the commit is not included in the identities of the PGP key that made the signature. || `unknown_key` | The key that made the signature has not been registered with any user's account. || `malformed_signature` | There was an error parsing the signature. || `invalid` | The signature could not be cryptographically verified using the key whose key-id was found in the signature. || `valid` | None of the above errors applied, so the signature is considered to be verified. | + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class CommitsRequestBuilderGetQueryParameters + { + /// GitHub username or email address to use to filter by commit author. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("author")] + public string? Author { get; set; } +#nullable restore +#else + [QueryParameter("author")] + public string Author { get; set; } +#endif + /// GitHub username or email address to use to filter by commit committer. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("committer")] + public string? Committer { get; set; } +#nullable restore +#else + [QueryParameter("committer")] + public string Committer { get; set; } +#endif + /// The page number of the results to fetch. For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." + [QueryParameter("page")] + public int? Page { get; set; } + /// Only commits containing this file path will be returned. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("path")] + public string? Path { get; set; } +#nullable restore +#else + [QueryParameter("path")] + public string Path { get; set; } +#endif + /// The number of results per page (max 100). For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." + [QueryParameter("per_page")] + public int? PerPage { get; set; } + /// SHA or branch to start listing commits from. Default: the repository’s default branch (usually `main`). +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("sha")] + public string? Sha { get; set; } +#nullable restore +#else + [QueryParameter("sha")] + public string Sha { get; set; } +#endif + /// 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. + [QueryParameter("since")] + public DateTimeOffset? Since { get; set; } + /// 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. + [QueryParameter("until")] + public DateTimeOffset? Until { get; set; } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class CommitsRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Commits/Item/BranchesWhereHead/BranchesWhereHeadRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Commits/Item/BranchesWhereHead/BranchesWhereHeadRequestBuilder.cs new file mode 100644 index 0000000..a989633 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Commits/Item/BranchesWhereHead/BranchesWhereHeadRequestBuilder.cs @@ -0,0 +1,101 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.Commits.Item.BranchesWhereHead +{ + /// + /// Builds and executes requests for operations under \repos\{owner-id}\{repo-id}\commits\{commit_sha-id}\branches-where-head + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class BranchesWhereHeadRequestBuilder : BaseRequestBuilder + { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public BranchesWhereHeadRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/commits/{commit_sha%2Did}/branches-where-head", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public BranchesWhereHeadRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/commits/{commit_sha%2Did}/branches-where-head", rawUrl) + { + } + /// + /// 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/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. + /// API method documentation + /// + /// A List<global::Ayllu.Github.Client.Models.BranchShort> + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 409 status code + /// When receiving a 422 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task?> GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task> GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "409", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "422", global::Ayllu.Github.Client.Models.ValidationError.CreateFromDiscriminatorValue }, + }; + var collectionResult = await RequestAdapter.SendCollectionAsync(requestInfo, global::Ayllu.Github.Client.Models.BranchShort.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + return collectionResult?.AsList(); + } + /// + /// 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/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. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.Repos.Item.Item.Commits.Item.BranchesWhereHead.BranchesWhereHeadRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Repos.Item.Item.Commits.Item.BranchesWhereHead.BranchesWhereHeadRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class BranchesWhereHeadRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Commits/Item/CheckRuns/CheckRunsGetResponse.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Commits/Item/CheckRuns/CheckRunsGetResponse.cs new file mode 100644 index 0000000..d30cbab --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Commits/Item/CheckRuns/CheckRunsGetResponse.cs @@ -0,0 +1,70 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.Commits.Item.CheckRuns +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class CheckRunsGetResponse : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The check_runs property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? CheckRuns { get; set; } +#nullable restore +#else + public List CheckRuns { get; set; } +#endif + /// The total_count property + public int? TotalCount { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public CheckRunsGetResponse() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Repos.Item.Item.Commits.Item.CheckRuns.CheckRunsGetResponse CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Repos.Item.Item.Commits.Item.CheckRuns.CheckRunsGetResponse(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "check_runs", n => { CheckRuns = n.GetCollectionOfObjectValues(global::Ayllu.Github.Client.Models.CheckRun.CreateFromDiscriminatorValue)?.AsList(); } }, + { "total_count", n => { TotalCount = n.GetIntValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteCollectionOfObjectValues("check_runs", CheckRuns); + writer.WriteIntValue("total_count", TotalCount); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Commits/Item/CheckRuns/CheckRunsRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Commits/Item/CheckRuns/CheckRunsRequestBuilder.cs new file mode 100644 index 0000000..c3c6e02 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Commits/Item/CheckRuns/CheckRunsRequestBuilder.cs @@ -0,0 +1,165 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.Commits.Item.CheckRuns +{ + /// + /// Builds and executes requests for operations under \repos\{owner-id}\{repo-id}\commits\{commit_sha-id}\check-runs + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class CheckRunsRequestBuilder : BaseRequestBuilder + { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public CheckRunsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/commits/{commit_sha%2Did}/check-runs{?app_id*,check_name*,filter*,page*,per_page*,status*}", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public CheckRunsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/commits/{commit_sha%2Did}/check-runs{?app_id*,check_name*,filter*,page*,per_page*,status*}", rawUrl) + { + } + /// + /// 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/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/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. + /// API method documentation + /// + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsCheckRunsGetResponseAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task GetAsCheckRunsGetResponseAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Repos.Item.Item.Commits.Item.CheckRuns.CheckRunsGetResponse.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false); + } + /// + /// 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/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/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. + /// API method documentation + /// + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + [Obsolete("This method is obsolete. Use GetAsCheckRunsGetResponseAsync instead.")] +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Repos.Item.Item.Commits.Item.CheckRuns.CheckRunsResponse.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false); + } + /// + /// 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/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/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. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.Repos.Item.Item.Commits.Item.CheckRuns.CheckRunsRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Repos.Item.Item.Commits.Item.CheckRuns.CheckRunsRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// 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/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/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. + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class CheckRunsRequestBuilderGetQueryParameters + { + [QueryParameter("app_id")] + public int? AppId { get; set; } + /// Returns check runs with the specified `name`. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("check_name")] + public string? CheckName { get; set; } +#nullable restore +#else + [QueryParameter("check_name")] + public string CheckName { get; set; } +#endif + /// Filters check runs by their `completed_at` timestamp. `latest` returns the most recent check runs. + [Obsolete("This property is deprecated, use FilterAsGetFilterQueryParameterType instead")] +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("filter")] + public string? Filter { get; set; } +#nullable restore +#else + [QueryParameter("filter")] + public string Filter { get; set; } +#endif + /// Filters check runs by their `completed_at` timestamp. `latest` returns the most recent check runs. + [QueryParameter("filter")] + public global::Ayllu.Github.Client.Repos.Item.Item.Commits.Item.CheckRuns.GetFilterQueryParameterType? FilterAsGetFilterQueryParameterType { get; set; } + /// The page number of the results to fetch. For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." + [QueryParameter("page")] + public int? Page { get; set; } + /// The number of results per page (max 100). For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." + [QueryParameter("per_page")] + public int? PerPage { get; set; } + /// Returns check runs with the specified `status`. + [Obsolete("This property is deprecated, use StatusAsGetStatusQueryParameterType instead")] +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("status")] + public string? Status { get; set; } +#nullable restore +#else + [QueryParameter("status")] + public string Status { get; set; } +#endif + /// Returns check runs with the specified `status`. + [QueryParameter("status")] + public global::Ayllu.Github.Client.Repos.Item.Item.Commits.Item.CheckRuns.GetStatusQueryParameterType? StatusAsGetStatusQueryParameterType { get; set; } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class CheckRunsRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Commits/Item/CheckRuns/CheckRunsResponse.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Commits/Item/CheckRuns/CheckRunsResponse.cs new file mode 100644 index 0000000..021b504 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Commits/Item/CheckRuns/CheckRunsResponse.cs @@ -0,0 +1,28 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.Commits.Item.CheckRuns +{ + [Obsolete("This class is obsolete. Use CheckRunsGetResponse instead.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class CheckRunsResponse : global::Ayllu.Github.Client.Repos.Item.Item.Commits.Item.CheckRuns.CheckRunsGetResponse, IParsable + #pragma warning restore CS1591 + { + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static new global::Ayllu.Github.Client.Repos.Item.Item.Commits.Item.CheckRuns.CheckRunsResponse CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Repos.Item.Item.Commits.Item.CheckRuns.CheckRunsResponse(); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Commits/Item/CheckRuns/GetFilterQueryParameterType.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Commits/Item/CheckRuns/GetFilterQueryParameterType.cs new file mode 100644 index 0000000..aabf6f4 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Commits/Item/CheckRuns/GetFilterQueryParameterType.cs @@ -0,0 +1,20 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.Commits.Item.CheckRuns +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public enum GetFilterQueryParameterType + #pragma warning restore CS1591 + { + [EnumMember(Value = "latest")] + #pragma warning disable CS1591 + Latest, + #pragma warning restore CS1591 + [EnumMember(Value = "all")] + #pragma warning disable CS1591 + All, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Commits/Item/CheckRuns/GetStatusQueryParameterType.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Commits/Item/CheckRuns/GetStatusQueryParameterType.cs new file mode 100644 index 0000000..399943f --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Commits/Item/CheckRuns/GetStatusQueryParameterType.cs @@ -0,0 +1,24 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.Commits.Item.CheckRuns +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public enum GetStatusQueryParameterType + #pragma warning restore CS1591 + { + [EnumMember(Value = "queued")] + #pragma warning disable CS1591 + Queued, + #pragma warning restore CS1591 + [EnumMember(Value = "in_progress")] + #pragma warning disable CS1591 + In_progress, + #pragma warning restore CS1591 + [EnumMember(Value = "completed")] + #pragma warning disable CS1591 + Completed, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Commits/Item/CheckSuites/CheckSuitesGetResponse.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Commits/Item/CheckSuites/CheckSuitesGetResponse.cs new file mode 100644 index 0000000..54ba4a9 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Commits/Item/CheckSuites/CheckSuitesGetResponse.cs @@ -0,0 +1,70 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.Commits.Item.CheckSuites +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class CheckSuitesGetResponse : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The check_suites property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? CheckSuites { get; set; } +#nullable restore +#else + public List CheckSuites { get; set; } +#endif + /// The total_count property + public int? TotalCount { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public CheckSuitesGetResponse() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Repos.Item.Item.Commits.Item.CheckSuites.CheckSuitesGetResponse CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Repos.Item.Item.Commits.Item.CheckSuites.CheckSuitesGetResponse(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "check_suites", n => { CheckSuites = n.GetCollectionOfObjectValues(global::Ayllu.Github.Client.Models.CheckSuite.CreateFromDiscriminatorValue)?.AsList(); } }, + { "total_count", n => { TotalCount = n.GetIntValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteCollectionOfObjectValues("check_suites", CheckSuites); + writer.WriteIntValue("total_count", TotalCount); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Commits/Item/CheckSuites/CheckSuitesRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Commits/Item/CheckSuites/CheckSuitesRequestBuilder.cs new file mode 100644 index 0000000..0458745 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Commits/Item/CheckSuites/CheckSuitesRequestBuilder.cs @@ -0,0 +1,138 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.Commits.Item.CheckSuites +{ + /// + /// Builds and executes requests for operations under \repos\{owner-id}\{repo-id}\commits\{commit_sha-id}\check-suites + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class CheckSuitesRequestBuilder : BaseRequestBuilder + { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public CheckSuitesRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/commits/{commit_sha%2Did}/check-suites{?app_id*,check_name*,page*,per_page*}", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public CheckSuitesRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/commits/{commit_sha%2Did}/check-suites{?app_id*,check_name*,page*,per_page*}", rawUrl) + { + } + /// + /// 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. + /// API method documentation + /// + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsCheckSuitesGetResponseAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task GetAsCheckSuitesGetResponseAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Repos.Item.Item.Commits.Item.CheckSuites.CheckSuitesGetResponse.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false); + } + /// + /// 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. + /// API method documentation + /// + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + [Obsolete("This method is obsolete. Use GetAsCheckSuitesGetResponseAsync instead.")] +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Repos.Item.Item.Commits.Item.CheckSuites.CheckSuitesResponse.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false); + } + /// + /// 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. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.Repos.Item.Item.Commits.Item.CheckSuites.CheckSuitesRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Repos.Item.Item.Commits.Item.CheckSuites.CheckSuitesRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// 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. + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class CheckSuitesRequestBuilderGetQueryParameters + { + /// Filters check suites by GitHub App `id`. + [QueryParameter("app_id")] + public int? AppId { get; set; } + /// Returns check runs with the specified `name`. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("check_name")] + public string? CheckName { get; set; } +#nullable restore +#else + [QueryParameter("check_name")] + public string CheckName { get; set; } +#endif + /// The page number of the results to fetch. For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." + [QueryParameter("page")] + public int? Page { get; set; } + /// The number of results per page (max 100). For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." + [QueryParameter("per_page")] + public int? PerPage { get; set; } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class CheckSuitesRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Commits/Item/CheckSuites/CheckSuitesResponse.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Commits/Item/CheckSuites/CheckSuitesResponse.cs new file mode 100644 index 0000000..4b8af9b --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Commits/Item/CheckSuites/CheckSuitesResponse.cs @@ -0,0 +1,28 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.Commits.Item.CheckSuites +{ + [Obsolete("This class is obsolete. Use CheckSuitesGetResponse instead.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class CheckSuitesResponse : global::Ayllu.Github.Client.Repos.Item.Item.Commits.Item.CheckSuites.CheckSuitesGetResponse, IParsable + #pragma warning restore CS1591 + { + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static new global::Ayllu.Github.Client.Repos.Item.Item.Commits.Item.CheckSuites.CheckSuitesResponse CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Repos.Item.Item.Commits.Item.CheckSuites.CheckSuitesResponse(); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Commits/Item/Comments/CommentsPostRequestBody.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Commits/Item/Comments/CommentsPostRequestBody.cs new file mode 100644 index 0000000..a8a05f2 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Commits/Item/Comments/CommentsPostRequestBody.cs @@ -0,0 +1,83 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.Commits.Item.Comments +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class CommentsPostRequestBody : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The contents of the comment. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Body { get; set; } +#nullable restore +#else + public string Body { get; set; } +#endif + /// **Closing down notice**. Use **position** parameter instead. Line number in the file to comment on. + public int? Line { get; set; } + /// Relative path of the file to comment on. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Path { get; set; } +#nullable restore +#else + public string Path { get; set; } +#endif + /// Line index in the diff to comment on. + public int? Position { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public CommentsPostRequestBody() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Repos.Item.Item.Commits.Item.Comments.CommentsPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Repos.Item.Item.Commits.Item.Comments.CommentsPostRequestBody(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "body", n => { Body = n.GetStringValue(); } }, + { "line", n => { Line = n.GetIntValue(); } }, + { "path", n => { Path = n.GetStringValue(); } }, + { "position", n => { Position = n.GetIntValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("body", Body); + writer.WriteIntValue("line", Line); + writer.WriteStringValue("path", Path); + writer.WriteIntValue("position", Position); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Commits/Item/Comments/CommentsRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Commits/Item/Comments/CommentsRequestBuilder.cs new file mode 100644 index 0000000..cc4ec0b --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Commits/Item/Comments/CommentsRequestBuilder.cs @@ -0,0 +1,165 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.Commits.Item.Comments +{ + /// + /// Builds and executes requests for operations under \repos\{owner-id}\{repo-id}\commits\{commit_sha-id}\comments + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class CommentsRequestBuilder : BaseRequestBuilder + { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public CommentsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/commits/{commit_sha%2Did}/comments{?page*,per_page*}", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public CommentsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/commits/{commit_sha%2Did}/comments{?page*,per_page*}", rawUrl) + { + } + /// + /// 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/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`. + /// API method documentation + /// + /// A List<global::Ayllu.Github.Client.Models.CommitComment> + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task?> GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task> GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var collectionResult = await RequestAdapter.SendCollectionAsync(requestInfo, global::Ayllu.Github.Client.Models.CommitComment.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false); + return collectionResult?.AsList(); + } + /// + /// Create a comment for a commit using its `:commit_sha`.This endpoint triggers [notifications](https://docs.github.com/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. For more information, see "[Rate limits for the API](https://docs.github.com/rest/using-the-rest-api/rate-limits-for-the-rest-api#about-secondary-rate-limits)" and "[Best practices for using the REST API](https://docs.github.com/rest/guides/best-practices-for-using-the-rest-api)."This endpoint supports the following custom media types. For more information, see "[Media types](https://docs.github.com/rest/using-the-rest-api/getting-started-with-the-rest-api#media-types)."- **`application/vnd.github-commitcomment.raw+json`**: Returns the raw markdown body. Response will include `body`. This is the default if you do not pass any specific media type.- **`application/vnd.github-commitcomment.text+json`**: Returns a text only representation of the markdown body. Response will include `body_text`.- **`application/vnd.github-commitcomment.html+json`**: Returns HTML rendered from the body's markdown. Response will include `body_html`.- **`application/vnd.github-commitcomment.full+json`**: Returns raw, text, and HTML representations. Response will include `body`, `body_text`, and `body_html`. + /// API method documentation + /// + /// A + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 403 status code + /// When receiving a 422 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PostAsync(global::Ayllu.Github.Client.Repos.Item.Item.Commits.Item.Comments.CommentsPostRequestBody body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task PostAsync(global::Ayllu.Github.Client.Repos.Item.Item.Commits.Item.Comments.CommentsPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPostRequestInformation(body, requestConfiguration); + var errorMapping = new Dictionary> + { + { "403", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "422", global::Ayllu.Github.Client.Models.ValidationError.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Models.CommitComment.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// 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/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`. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Create a comment for a commit using its `:commit_sha`.This endpoint triggers [notifications](https://docs.github.com/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. For more information, see "[Rate limits for the API](https://docs.github.com/rest/using-the-rest-api/rate-limits-for-the-rest-api#about-secondary-rate-limits)" and "[Best practices for using the REST API](https://docs.github.com/rest/guides/best-practices-for-using-the-rest-api)."This endpoint supports the following custom media types. For more information, see "[Media types](https://docs.github.com/rest/using-the-rest-api/getting-started-with-the-rest-api#media-types)."- **`application/vnd.github-commitcomment.raw+json`**: Returns the raw markdown body. Response will include `body`. This is the default if you do not pass any specific media type.- **`application/vnd.github-commitcomment.text+json`**: Returns a text only representation of the markdown body. Response will include `body_text`.- **`application/vnd.github-commitcomment.html+json`**: Returns HTML rendered from the body's markdown. Response will include `body_html`.- **`application/vnd.github-commitcomment.full+json`**: Returns raw, text, and HTML representations. Response will include `body`, `body_text`, and `body_html`. + /// + /// A + /// The request body + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPostRequestInformation(global::Ayllu.Github.Client.Repos.Item.Item.Commits.Item.Comments.CommentsPostRequestBody body, Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToPostRequestInformation(global::Ayllu.Github.Client.Repos.Item.Item.Commits.Item.Comments.CommentsPostRequestBody body, Action> requestConfiguration = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.Repos.Item.Item.Commits.Item.Comments.CommentsRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Repos.Item.Item.Commits.Item.Comments.CommentsRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// 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/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`. + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class CommentsRequestBuilderGetQueryParameters + { + /// The page number of the results to fetch. For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." + [QueryParameter("page")] + public int? Page { get; set; } + /// The number of results per page (max 100). For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." + [QueryParameter("per_page")] + public int? PerPage { get; set; } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class CommentsRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class CommentsRequestBuilderPostRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Commits/Item/Commit_shaItemRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Commits/Item/Commit_shaItemRequestBuilder.cs new file mode 100644 index 0000000..4d308e4 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Commits/Item/Commit_shaItemRequestBuilder.cs @@ -0,0 +1,161 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Ayllu.Github.Client.Repos.Item.Item.Commits.Item.BranchesWhereHead; +using Ayllu.Github.Client.Repos.Item.Item.Commits.Item.CheckRuns; +using Ayllu.Github.Client.Repos.Item.Item.Commits.Item.CheckSuites; +using Ayllu.Github.Client.Repos.Item.Item.Commits.Item.Comments; +using Ayllu.Github.Client.Repos.Item.Item.Commits.Item.Pulls; +using Ayllu.Github.Client.Repos.Item.Item.Commits.Item.Status; +using Ayllu.Github.Client.Repos.Item.Item.Commits.Item.Statuses; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.Commits.Item +{ + /// + /// Builds and executes requests for operations under \repos\{owner-id}\{repo-id}\commits\{commit_sha-id} + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class Commit_shaItemRequestBuilder : BaseRequestBuilder + { + /// The branchesWhereHead property + public global::Ayllu.Github.Client.Repos.Item.Item.Commits.Item.BranchesWhereHead.BranchesWhereHeadRequestBuilder BranchesWhereHead + { + get => new global::Ayllu.Github.Client.Repos.Item.Item.Commits.Item.BranchesWhereHead.BranchesWhereHeadRequestBuilder(PathParameters, RequestAdapter); + } + /// The checkRuns property + public global::Ayllu.Github.Client.Repos.Item.Item.Commits.Item.CheckRuns.CheckRunsRequestBuilder CheckRuns + { + get => new global::Ayllu.Github.Client.Repos.Item.Item.Commits.Item.CheckRuns.CheckRunsRequestBuilder(PathParameters, RequestAdapter); + } + /// The checkSuites property + public global::Ayllu.Github.Client.Repos.Item.Item.Commits.Item.CheckSuites.CheckSuitesRequestBuilder CheckSuites + { + get => new global::Ayllu.Github.Client.Repos.Item.Item.Commits.Item.CheckSuites.CheckSuitesRequestBuilder(PathParameters, RequestAdapter); + } + /// The comments property + public global::Ayllu.Github.Client.Repos.Item.Item.Commits.Item.Comments.CommentsRequestBuilder Comments + { + get => new global::Ayllu.Github.Client.Repos.Item.Item.Commits.Item.Comments.CommentsRequestBuilder(PathParameters, RequestAdapter); + } + /// The pulls property + public global::Ayllu.Github.Client.Repos.Item.Item.Commits.Item.Pulls.PullsRequestBuilder Pulls + { + get => new global::Ayllu.Github.Client.Repos.Item.Item.Commits.Item.Pulls.PullsRequestBuilder(PathParameters, RequestAdapter); + } + /// The status property + public global::Ayllu.Github.Client.Repos.Item.Item.Commits.Item.Status.StatusRequestBuilder Status + { + get => new global::Ayllu.Github.Client.Repos.Item.Item.Commits.Item.Status.StatusRequestBuilder(PathParameters, RequestAdapter); + } + /// The statuses property + public global::Ayllu.Github.Client.Repos.Item.Item.Commits.Item.Statuses.StatusesRequestBuilder Statuses + { + get => new global::Ayllu.Github.Client.Repos.Item.Item.Commits.Item.Statuses.StatusesRequestBuilder(PathParameters, RequestAdapter); + } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public Commit_shaItemRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/commits/{commit_sha%2Did}{?page*,per_page*}", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public Commit_shaItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/commits/{commit_sha%2Did}{?page*,per_page*}", rawUrl) + { + } + /// + /// 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/rest/using-the-rest-api/getting-started-with-the-rest-api#media-types)." Pagination query parameters are not supported for these media types.- **`application/vnd.github.diff`**: Returns the diff of the commit. Larger diffs may time out and return a 5xx status code.- **`application/vnd.github.patch`**: Returns the patch of the commit. Diffs with binary data will have no `patch` property. Larger diffs may time out and return a 5xx status code.- **`application/vnd.github.sha`**: Returns the commit's SHA-1 hash. You can use this endpoint to check if a remote reference's SHA-1 hash is the same as your local reference's SHA-1 hash by providing the local SHA-1 reference as the ETag.**Signature verification object**The response will include a `verification` object that describes the result of verifying the commit's signature. The following fields are included in the `verification` object:| Name | Type | Description || ---- | ---- | ----------- || `verified` | `boolean` | Indicates whether GitHub considers the signature in this commit to be verified. || `reason` | `string` | The reason for verified value. Possible values and their meanings are enumerated in table below. || `signature` | `string` | The signature that was extracted from the commit. || `payload` | `string` | The value that was signed. || `verified_at` | `string` | The date the signature was verified by GitHub. |These are the possible values for `reason` in the `verification` object:| Value | Description || ----- | ----------- || `expired_key` | The key that made the signature is expired. || `not_signing_key` | The "signing" flag is not among the usage flags in the GPG key that made the signature. || `gpgverify_error` | There was an error communicating with the signature verification service. || `gpgverify_unavailable` | The signature verification service is currently unavailable. || `unsigned` | The object does not include a signature. || `unknown_signature_type` | A non-PGP signature was found in the commit. || `no_user` | No user was associated with the `committer` email address in the commit. || `unverified_email` | The `committer` email address in the commit was associated with a user, but the email address is not verified on their account. || `bad_email` | The `committer` email address in the commit is not included in the identities of the PGP key that made the signature. || `unknown_key` | The key that made the signature has not been registered with any user's account. || `malformed_signature` | There was an error parsing the signature. || `invalid` | The signature could not be cryptographically verified using the key whose key-id was found in the signature. || `valid` | None of the above errors applied, so the signature is considered to be verified. | + /// API method documentation + /// + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 404 status code + /// When receiving a 409 status code + /// When receiving a 422 status code + /// When receiving a 500 status code + /// When receiving a 503 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "404", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "409", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "422", global::Ayllu.Github.Client.Models.ValidationError.CreateFromDiscriminatorValue }, + { "500", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "503", global::Ayllu.Github.Client.Models.Commit503Error.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Models.Commit.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// 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/rest/using-the-rest-api/getting-started-with-the-rest-api#media-types)." Pagination query parameters are not supported for these media types.- **`application/vnd.github.diff`**: Returns the diff of the commit. Larger diffs may time out and return a 5xx status code.- **`application/vnd.github.patch`**: Returns the patch of the commit. Diffs with binary data will have no `patch` property. Larger diffs may time out and return a 5xx status code.- **`application/vnd.github.sha`**: Returns the commit's SHA-1 hash. You can use this endpoint to check if a remote reference's SHA-1 hash is the same as your local reference's SHA-1 hash by providing the local SHA-1 reference as the ETag.**Signature verification object**The response will include a `verification` object that describes the result of verifying the commit's signature. The following fields are included in the `verification` object:| Name | Type | Description || ---- | ---- | ----------- || `verified` | `boolean` | Indicates whether GitHub considers the signature in this commit to be verified. || `reason` | `string` | The reason for verified value. Possible values and their meanings are enumerated in table below. || `signature` | `string` | The signature that was extracted from the commit. || `payload` | `string` | The value that was signed. || `verified_at` | `string` | The date the signature was verified by GitHub. |These are the possible values for `reason` in the `verification` object:| Value | Description || ----- | ----------- || `expired_key` | The key that made the signature is expired. || `not_signing_key` | The "signing" flag is not among the usage flags in the GPG key that made the signature. || `gpgverify_error` | There was an error communicating with the signature verification service. || `gpgverify_unavailable` | The signature verification service is currently unavailable. || `unsigned` | The object does not include a signature. || `unknown_signature_type` | A non-PGP signature was found in the commit. || `no_user` | No user was associated with the `committer` email address in the commit. || `unverified_email` | The `committer` email address in the commit was associated with a user, but the email address is not verified on their account. || `bad_email` | The `committer` email address in the commit is not included in the identities of the PGP key that made the signature. || `unknown_key` | The key that made the signature has not been registered with any user's account. || `malformed_signature` | There was an error parsing the signature. || `invalid` | The signature could not be cryptographically verified using the key whose key-id was found in the signature. || `valid` | None of the above errors applied, so the signature is considered to be verified. | + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.Repos.Item.Item.Commits.Item.Commit_shaItemRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Repos.Item.Item.Commits.Item.Commit_shaItemRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// 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/rest/using-the-rest-api/getting-started-with-the-rest-api#media-types)." Pagination query parameters are not supported for these media types.- **`application/vnd.github.diff`**: Returns the diff of the commit. Larger diffs may time out and return a 5xx status code.- **`application/vnd.github.patch`**: Returns the patch of the commit. Diffs with binary data will have no `patch` property. Larger diffs may time out and return a 5xx status code.- **`application/vnd.github.sha`**: Returns the commit's SHA-1 hash. You can use this endpoint to check if a remote reference's SHA-1 hash is the same as your local reference's SHA-1 hash by providing the local SHA-1 reference as the ETag.**Signature verification object**The response will include a `verification` object that describes the result of verifying the commit's signature. The following fields are included in the `verification` object:| Name | Type | Description || ---- | ---- | ----------- || `verified` | `boolean` | Indicates whether GitHub considers the signature in this commit to be verified. || `reason` | `string` | The reason for verified value. Possible values and their meanings are enumerated in table below. || `signature` | `string` | The signature that was extracted from the commit. || `payload` | `string` | The value that was signed. || `verified_at` | `string` | The date the signature was verified by GitHub. |These are the possible values for `reason` in the `verification` object:| Value | Description || ----- | ----------- || `expired_key` | The key that made the signature is expired. || `not_signing_key` | The "signing" flag is not among the usage flags in the GPG key that made the signature. || `gpgverify_error` | There was an error communicating with the signature verification service. || `gpgverify_unavailable` | The signature verification service is currently unavailable. || `unsigned` | The object does not include a signature. || `unknown_signature_type` | A non-PGP signature was found in the commit. || `no_user` | No user was associated with the `committer` email address in the commit. || `unverified_email` | The `committer` email address in the commit was associated with a user, but the email address is not verified on their account. || `bad_email` | The `committer` email address in the commit is not included in the identities of the PGP key that made the signature. || `unknown_key` | The key that made the signature has not been registered with any user's account. || `malformed_signature` | There was an error parsing the signature. || `invalid` | The signature could not be cryptographically verified using the key whose key-id was found in the signature. || `valid` | None of the above errors applied, so the signature is considered to be verified. | + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class Commit_shaItemRequestBuilderGetQueryParameters + { + /// The page number of the results to fetch. For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." + [QueryParameter("page")] + public int? Page { get; set; } + /// The number of results per page (max 100). For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." + [QueryParameter("per_page")] + public int? PerPage { get; set; } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class Commit_shaItemRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Commits/Item/Pulls/PullsRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Commits/Item/Pulls/PullsRequestBuilder.cs new file mode 100644 index 0000000..8aa136a --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Commits/Item/Pulls/PullsRequestBuilder.cs @@ -0,0 +1,112 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.Commits.Item.Pulls +{ + /// + /// Builds and executes requests for operations under \repos\{owner-id}\{repo-id}\commits\{commit_sha-id}\pulls + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class PullsRequestBuilder : BaseRequestBuilder + { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public PullsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/commits/{commit_sha%2Did}/pulls{?page*,per_page*}", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public PullsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/commits/{commit_sha%2Did}/pulls{?page*,per_page*}", rawUrl) + { + } + /// + /// Lists the merged pull request that introduced the commit to the repository. If the commit is not present in the default branch, it will return merged and 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. + /// API method documentation + /// + /// A List<global::Ayllu.Github.Client.Models.PullRequestSimple> + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 409 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task?> GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task> GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "409", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + }; + var collectionResult = await RequestAdapter.SendCollectionAsync(requestInfo, global::Ayllu.Github.Client.Models.PullRequestSimple.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + return collectionResult?.AsList(); + } + /// + /// Lists the merged pull request that introduced the commit to the repository. If the commit is not present in the default branch, it will return merged and 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. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.Repos.Item.Item.Commits.Item.Pulls.PullsRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Repos.Item.Item.Commits.Item.Pulls.PullsRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Lists the merged pull request that introduced the commit to the repository. If the commit is not present in the default branch, it will return merged and 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. + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class PullsRequestBuilderGetQueryParameters + { + /// The page number of the results to fetch. For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." + [QueryParameter("page")] + public int? Page { get; set; } + /// The number of results per page (max 100). For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." + [QueryParameter("per_page")] + public int? PerPage { get; set; } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class PullsRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Commits/Item/Status/StatusRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Commits/Item/Status/StatusRequestBuilder.cs new file mode 100644 index 0000000..914df4a --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Commits/Item/Status/StatusRequestBuilder.cs @@ -0,0 +1,111 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.Commits.Item.Status +{ + /// + /// Builds and executes requests for operations under \repos\{owner-id}\{repo-id}\commits\{commit_sha-id}\status + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class StatusRequestBuilder : BaseRequestBuilder + { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public StatusRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/commits/{commit_sha%2Did}/status{?page*,per_page*}", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public StatusRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/commits/{commit_sha%2Did}/status{?page*,per_page*}", rawUrl) + { + } + /// + /// 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` + /// API method documentation + /// + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 404 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "404", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Models.CombinedCommitStatus.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// 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` + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.Repos.Item.Item.Commits.Item.Status.StatusRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Repos.Item.Item.Commits.Item.Status.StatusRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// 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` + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class StatusRequestBuilderGetQueryParameters + { + /// The page number of the results to fetch. For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." + [QueryParameter("page")] + public int? Page { get; set; } + /// The number of results per page (max 100). For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." + [QueryParameter("per_page")] + public int? PerPage { get; set; } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class StatusRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Commits/Item/Statuses/StatusesRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Commits/Item/Statuses/StatusesRequestBuilder.cs new file mode 100644 index 0000000..c1df6a9 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Commits/Item/Statuses/StatusesRequestBuilder.cs @@ -0,0 +1,107 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.Commits.Item.Statuses +{ + /// + /// Builds and executes requests for operations under \repos\{owner-id}\{repo-id}\commits\{commit_sha-id}\statuses + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class StatusesRequestBuilder : BaseRequestBuilder + { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public StatusesRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/commits/{commit_sha%2Did}/statuses{?page*,per_page*}", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public StatusesRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/commits/{commit_sha%2Did}/statuses{?page*,per_page*}", rawUrl) + { + } + /// + /// 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`. + /// API method documentation + /// + /// A List<global::Ayllu.Github.Client.Models.Status> + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task?> GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task> GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var collectionResult = await RequestAdapter.SendCollectionAsync(requestInfo, global::Ayllu.Github.Client.Models.Status.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false); + return collectionResult?.AsList(); + } + /// + /// 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`. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.Repos.Item.Item.Commits.Item.Statuses.StatusesRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Repos.Item.Item.Commits.Item.Statuses.StatusesRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// 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`. + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class StatusesRequestBuilderGetQueryParameters + { + /// The page number of the results to fetch. For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." + [QueryParameter("page")] + public int? Page { get; set; } + /// The number of results per page (max 100). For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." + [QueryParameter("per_page")] + public int? PerPage { get; set; } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class StatusesRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Community/CommunityRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Community/CommunityRequestBuilder.cs new file mode 100644 index 0000000..fb01792 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Community/CommunityRequestBuilder.cs @@ -0,0 +1,41 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Repos.Item.Item.Community.Profile; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.Community +{ + /// + /// Builds and executes requests for operations under \repos\{owner-id}\{repo-id}\community + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class CommunityRequestBuilder : BaseRequestBuilder + { + /// The profile property + public global::Ayllu.Github.Client.Repos.Item.Item.Community.Profile.ProfileRequestBuilder Profile + { + get => new global::Ayllu.Github.Client.Repos.Item.Item.Community.Profile.ProfileRequestBuilder(PathParameters, RequestAdapter); + } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public CommunityRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/community", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public CommunityRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/community", rawUrl) + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Community/Profile/ProfileRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Community/Profile/ProfileRequestBuilder.cs new file mode 100644 index 0000000..8f399e4 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Community/Profile/ProfileRequestBuilder.cs @@ -0,0 +1,93 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.Community.Profile +{ + /// + /// Builds and executes requests for operations under \repos\{owner-id}\{repo-id}\community\profile + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class ProfileRequestBuilder : BaseRequestBuilder + { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public ProfileRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/community/profile", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public ProfileRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/community/profile", rawUrl) + { + } + /// + /// 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/communities/setting-up-your-project-for-healthy-contributions/about-community-profiles-for-public-repositories)."`content_reports_enabled` is only returned for organization-owned repositories. + /// API method documentation + /// + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Models.CommunityProfile.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false); + } + /// + /// 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/communities/setting-up-your-project-for-healthy-contributions/about-community-profiles-for-public-repositories)."`content_reports_enabled` is only returned for organization-owned repositories. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.Repos.Item.Item.Community.Profile.ProfileRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Repos.Item.Item.Community.Profile.ProfileRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class ProfileRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Compare/CompareRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Compare/CompareRequestBuilder.cs new file mode 100644 index 0000000..c260159 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Compare/CompareRequestBuilder.cs @@ -0,0 +1,48 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Repos.Item.Item.Compare.Item; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.Compare +{ + /// + /// Builds and executes requests for operations under \repos\{owner-id}\{repo-id}\compare + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class CompareRequestBuilder : BaseRequestBuilder + { + /// Gets an item from the Ayllu.Github.Client.repos.item.item.compare.item collection + /// The base branch and head branch to compare. This parameter expects the format `BASE...HEAD`. Both must be branch names in `repo`. To compare with a branch that exists in a different repository in the same network as `repo`, the `basehead` parameter expects the format `USERNAME:BASE...USERNAME:HEAD`. + /// A + public global::Ayllu.Github.Client.Repos.Item.Item.Compare.Item.WithBaseheadItemRequestBuilder this[string position] + { + get + { + var urlTplParams = new Dictionary(PathParameters); + urlTplParams.Add("basehead", position); + return new global::Ayllu.Github.Client.Repos.Item.Item.Compare.Item.WithBaseheadItemRequestBuilder(urlTplParams, RequestAdapter); + } + } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public CompareRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/compare", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public CompareRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/compare", rawUrl) + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Compare/Item/WithBaseheadItemRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Compare/Item/WithBaseheadItemRequestBuilder.cs new file mode 100644 index 0000000..450e046 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Compare/Item/WithBaseheadItemRequestBuilder.cs @@ -0,0 +1,115 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.Compare.Item +{ + /// + /// Builds and executes requests for operations under \repos\{owner-id}\{repo-id}\compare\{basehead} + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithBaseheadItemRequestBuilder : BaseRequestBuilder + { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public WithBaseheadItemRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/compare/{basehead}{?page*,per_page*}", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public WithBaseheadItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/compare/{basehead}{?page*,per_page*}", rawUrl) + { + } + /// + /// Compares two commits against one another. You can compare refs (branches or tags) and commit SHAs in the same repository, or you can compare refs and commit SHAs that exist in different repositories within the same repository network, including fork branches. For more information about how to view a repository's network, see "[Understanding connections between repositories](https://docs.github.com/repositories/viewing-activity-and-data-for-your-repository/understanding-connections-between-repositories)."This endpoint is equivalent to running the `git log BASE..HEAD` command, but it returns commits in a different order. The `git log BASE..HEAD` command returns commits in reverse chronological order, whereas the API returns commits in chronological order.This endpoint supports the following custom media types. For more information, see "[Media types](https://docs.github.com/rest/using-the-rest-api/getting-started-with-the-rest-api#media-types)."- **`application/vnd.github.diff`**: Returns the diff of the commit.- **`application/vnd.github.patch`**: Returns the patch of the commit. Diffs with binary data will have no `patch` property.The API response includes details about the files that were changed between the two commits. This includes the status of the change (if a file was added, removed, modified, or renamed), and details of the change itself. For example, files with a `renamed` status have a `previous_filename` field showing the previous filename of the file, and files with a `modified` status have a `patch` field showing the changes made to the file.When calling this endpoint without any paging parameter (`per_page` or `page`), the returned list is limited to 250 commits, and the last commit in the list is the most recent of the entire comparison.**Working with large comparisons**To process a response with a large number of commits, use a query parameter (`per_page` or `page`) to paginate the results. When using pagination:- The list of changed files is only shown on the first page of results, and it includes up to 300 changed files for the entire comparison.- The results are returned in chronological order, but the last commit in the returned list may not be the most recent one in the entire set if there are more pages of results.For more information on working with pagination, see "[Using pagination in the REST API](https://docs.github.com/rest/guides/using-pagination-in-the-rest-api)."**Signature verification object**The response will include a `verification` object that describes the result of verifying the commit's signature. The `verification` object includes the following fields:| Name | Type | Description || ---- | ---- | ----------- || `verified` | `boolean` | Indicates whether GitHub considers the signature in this commit to be verified. || `reason` | `string` | The reason for verified value. Possible values and their meanings are enumerated in table below. || `signature` | `string` | The signature that was extracted from the commit. || `payload` | `string` | The value that was signed. || `verified_at` | `string` | The date the signature was verified by GitHub. |These are the possible values for `reason` in the `verification` object:| Value | Description || ----- | ----------- || `expired_key` | The key that made the signature is expired. || `not_signing_key` | The "signing" flag is not among the usage flags in the GPG key that made the signature. || `gpgverify_error` | There was an error communicating with the signature verification service. || `gpgverify_unavailable` | The signature verification service is currently unavailable. || `unsigned` | The object does not include a signature. || `unknown_signature_type` | A non-PGP signature was found in the commit. || `no_user` | No user was associated with the `committer` email address in the commit. || `unverified_email` | The `committer` email address in the commit was associated with a user, but the email address is not verified on their account. || `bad_email` | The `committer` email address in the commit is not included in the identities of the PGP key that made the signature. || `unknown_key` | The key that made the signature has not been registered with any user's account. || `malformed_signature` | There was an error parsing the signature. || `invalid` | The signature could not be cryptographically verified using the key whose key-id was found in the signature. || `valid` | None of the above errors applied, so the signature is considered to be verified. | + /// API method documentation + /// + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 404 status code + /// When receiving a 500 status code + /// When receiving a 503 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "404", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "500", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "503", global::Ayllu.Github.Client.Models.CommitComparison503Error.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Models.CommitComparison.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// Compares two commits against one another. You can compare refs (branches or tags) and commit SHAs in the same repository, or you can compare refs and commit SHAs that exist in different repositories within the same repository network, including fork branches. For more information about how to view a repository's network, see "[Understanding connections between repositories](https://docs.github.com/repositories/viewing-activity-and-data-for-your-repository/understanding-connections-between-repositories)."This endpoint is equivalent to running the `git log BASE..HEAD` command, but it returns commits in a different order. The `git log BASE..HEAD` command returns commits in reverse chronological order, whereas the API returns commits in chronological order.This endpoint supports the following custom media types. For more information, see "[Media types](https://docs.github.com/rest/using-the-rest-api/getting-started-with-the-rest-api#media-types)."- **`application/vnd.github.diff`**: Returns the diff of the commit.- **`application/vnd.github.patch`**: Returns the patch of the commit. Diffs with binary data will have no `patch` property.The API response includes details about the files that were changed between the two commits. This includes the status of the change (if a file was added, removed, modified, or renamed), and details of the change itself. For example, files with a `renamed` status have a `previous_filename` field showing the previous filename of the file, and files with a `modified` status have a `patch` field showing the changes made to the file.When calling this endpoint without any paging parameter (`per_page` or `page`), the returned list is limited to 250 commits, and the last commit in the list is the most recent of the entire comparison.**Working with large comparisons**To process a response with a large number of commits, use a query parameter (`per_page` or `page`) to paginate the results. When using pagination:- The list of changed files is only shown on the first page of results, and it includes up to 300 changed files for the entire comparison.- The results are returned in chronological order, but the last commit in the returned list may not be the most recent one in the entire set if there are more pages of results.For more information on working with pagination, see "[Using pagination in the REST API](https://docs.github.com/rest/guides/using-pagination-in-the-rest-api)."**Signature verification object**The response will include a `verification` object that describes the result of verifying the commit's signature. The `verification` object includes the following fields:| Name | Type | Description || ---- | ---- | ----------- || `verified` | `boolean` | Indicates whether GitHub considers the signature in this commit to be verified. || `reason` | `string` | The reason for verified value. Possible values and their meanings are enumerated in table below. || `signature` | `string` | The signature that was extracted from the commit. || `payload` | `string` | The value that was signed. || `verified_at` | `string` | The date the signature was verified by GitHub. |These are the possible values for `reason` in the `verification` object:| Value | Description || ----- | ----------- || `expired_key` | The key that made the signature is expired. || `not_signing_key` | The "signing" flag is not among the usage flags in the GPG key that made the signature. || `gpgverify_error` | There was an error communicating with the signature verification service. || `gpgverify_unavailable` | The signature verification service is currently unavailable. || `unsigned` | The object does not include a signature. || `unknown_signature_type` | A non-PGP signature was found in the commit. || `no_user` | No user was associated with the `committer` email address in the commit. || `unverified_email` | The `committer` email address in the commit was associated with a user, but the email address is not verified on their account. || `bad_email` | The `committer` email address in the commit is not included in the identities of the PGP key that made the signature. || `unknown_key` | The key that made the signature has not been registered with any user's account. || `malformed_signature` | There was an error parsing the signature. || `invalid` | The signature could not be cryptographically verified using the key whose key-id was found in the signature. || `valid` | None of the above errors applied, so the signature is considered to be verified. | + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.Repos.Item.Item.Compare.Item.WithBaseheadItemRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Repos.Item.Item.Compare.Item.WithBaseheadItemRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Compares two commits against one another. You can compare refs (branches or tags) and commit SHAs in the same repository, or you can compare refs and commit SHAs that exist in different repositories within the same repository network, including fork branches. For more information about how to view a repository's network, see "[Understanding connections between repositories](https://docs.github.com/repositories/viewing-activity-and-data-for-your-repository/understanding-connections-between-repositories)."This endpoint is equivalent to running the `git log BASE..HEAD` command, but it returns commits in a different order. The `git log BASE..HEAD` command returns commits in reverse chronological order, whereas the API returns commits in chronological order.This endpoint supports the following custom media types. For more information, see "[Media types](https://docs.github.com/rest/using-the-rest-api/getting-started-with-the-rest-api#media-types)."- **`application/vnd.github.diff`**: Returns the diff of the commit.- **`application/vnd.github.patch`**: Returns the patch of the commit. Diffs with binary data will have no `patch` property.The API response includes details about the files that were changed between the two commits. This includes the status of the change (if a file was added, removed, modified, or renamed), and details of the change itself. For example, files with a `renamed` status have a `previous_filename` field showing the previous filename of the file, and files with a `modified` status have a `patch` field showing the changes made to the file.When calling this endpoint without any paging parameter (`per_page` or `page`), the returned list is limited to 250 commits, and the last commit in the list is the most recent of the entire comparison.**Working with large comparisons**To process a response with a large number of commits, use a query parameter (`per_page` or `page`) to paginate the results. When using pagination:- The list of changed files is only shown on the first page of results, and it includes up to 300 changed files for the entire comparison.- The results are returned in chronological order, but the last commit in the returned list may not be the most recent one in the entire set if there are more pages of results.For more information on working with pagination, see "[Using pagination in the REST API](https://docs.github.com/rest/guides/using-pagination-in-the-rest-api)."**Signature verification object**The response will include a `verification` object that describes the result of verifying the commit's signature. The `verification` object includes the following fields:| Name | Type | Description || ---- | ---- | ----------- || `verified` | `boolean` | Indicates whether GitHub considers the signature in this commit to be verified. || `reason` | `string` | The reason for verified value. Possible values and their meanings are enumerated in table below. || `signature` | `string` | The signature that was extracted from the commit. || `payload` | `string` | The value that was signed. || `verified_at` | `string` | The date the signature was verified by GitHub. |These are the possible values for `reason` in the `verification` object:| Value | Description || ----- | ----------- || `expired_key` | The key that made the signature is expired. || `not_signing_key` | The "signing" flag is not among the usage flags in the GPG key that made the signature. || `gpgverify_error` | There was an error communicating with the signature verification service. || `gpgverify_unavailable` | The signature verification service is currently unavailable. || `unsigned` | The object does not include a signature. || `unknown_signature_type` | A non-PGP signature was found in the commit. || `no_user` | No user was associated with the `committer` email address in the commit. || `unverified_email` | The `committer` email address in the commit was associated with a user, but the email address is not verified on their account. || `bad_email` | The `committer` email address in the commit is not included in the identities of the PGP key that made the signature. || `unknown_key` | The key that made the signature has not been registered with any user's account. || `malformed_signature` | There was an error parsing the signature. || `invalid` | The signature could not be cryptographically verified using the key whose key-id was found in the signature. || `valid` | None of the above errors applied, so the signature is considered to be verified. | + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithBaseheadItemRequestBuilderGetQueryParameters + { + /// The page number of the results to fetch. For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." + [QueryParameter("page")] + public int? Page { get; set; } + /// The number of results per page (max 100). For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." + [QueryParameter("per_page")] + public int? PerPage { get; set; } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithBaseheadItemRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Contents/ContentsRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Contents/ContentsRequestBuilder.cs new file mode 100644 index 0000000..1720040 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Contents/ContentsRequestBuilder.cs @@ -0,0 +1,48 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Repos.Item.Item.Contents.Item; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.Contents +{ + /// + /// Builds and executes requests for operations under \repos\{owner-id}\{repo-id}\contents + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class ContentsRequestBuilder : BaseRequestBuilder + { + /// Gets an item from the Ayllu.Github.Client.repos.item.item.contents.item collection + /// path parameter + /// A + public global::Ayllu.Github.Client.Repos.Item.Item.Contents.Item.WithPathItemRequestBuilder this[string position] + { + get + { + var urlTplParams = new Dictionary(PathParameters); + urlTplParams.Add("path", position); + return new global::Ayllu.Github.Client.Repos.Item.Item.Contents.Item.WithPathItemRequestBuilder(urlTplParams, RequestAdapter); + } + } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public ContentsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/contents", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public ContentsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/contents", rawUrl) + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Contents/Item/WithPathDeleteRequestBody.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Contents/Item/WithPathDeleteRequestBody.cs new file mode 100644 index 0000000..c9abb44 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Contents/Item/WithPathDeleteRequestBody.cs @@ -0,0 +1,105 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.Contents.Item +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class WithPathDeleteRequestBody : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// object containing information about the author. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Repos.Item.Item.Contents.Item.WithPathDeleteRequestBody_author? Author { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Repos.Item.Item.Contents.Item.WithPathDeleteRequestBody_author Author { get; set; } +#endif + /// The branch name. Default: the repository’s default branch +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Branch { get; set; } +#nullable restore +#else + public string Branch { get; set; } +#endif + /// object containing information about the committer. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Repos.Item.Item.Contents.Item.WithPathDeleteRequestBody_committer? Committer { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Repos.Item.Item.Contents.Item.WithPathDeleteRequestBody_committer Committer { get; set; } +#endif + /// The commit message. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Message { get; set; } +#nullable restore +#else + public string Message { get; set; } +#endif + /// The blob SHA of the file being deleted. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Sha { get; set; } +#nullable restore +#else + public string Sha { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public WithPathDeleteRequestBody() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Repos.Item.Item.Contents.Item.WithPathDeleteRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Repos.Item.Item.Contents.Item.WithPathDeleteRequestBody(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "author", n => { Author = n.GetObjectValue(global::Ayllu.Github.Client.Repos.Item.Item.Contents.Item.WithPathDeleteRequestBody_author.CreateFromDiscriminatorValue); } }, + { "branch", n => { Branch = n.GetStringValue(); } }, + { "committer", n => { Committer = n.GetObjectValue(global::Ayllu.Github.Client.Repos.Item.Item.Contents.Item.WithPathDeleteRequestBody_committer.CreateFromDiscriminatorValue); } }, + { "message", n => { Message = n.GetStringValue(); } }, + { "sha", n => { Sha = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteObjectValue("author", Author); + writer.WriteStringValue("branch", Branch); + writer.WriteObjectValue("committer", Committer); + writer.WriteStringValue("message", Message); + writer.WriteStringValue("sha", Sha); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Contents/Item/WithPathDeleteRequestBody_author.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Contents/Item/WithPathDeleteRequestBody_author.cs new file mode 100644 index 0000000..79fe778 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Contents/Item/WithPathDeleteRequestBody_author.cs @@ -0,0 +1,76 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.Contents.Item +{ + /// + /// object containing information about the author. + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithPathDeleteRequestBody_author : IAdditionalDataHolder, IParsable + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The email of the author (or committer) of the commit +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Email { get; set; } +#nullable restore +#else + public string Email { get; set; } +#endif + /// The name of the author (or committer) of the commit +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Name { get; set; } +#nullable restore +#else + public string Name { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public WithPathDeleteRequestBody_author() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Repos.Item.Item.Contents.Item.WithPathDeleteRequestBody_author CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Repos.Item.Item.Contents.Item.WithPathDeleteRequestBody_author(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "email", n => { Email = n.GetStringValue(); } }, + { "name", n => { Name = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("email", Email); + writer.WriteStringValue("name", Name); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Contents/Item/WithPathDeleteRequestBody_committer.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Contents/Item/WithPathDeleteRequestBody_committer.cs new file mode 100644 index 0000000..966d576 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Contents/Item/WithPathDeleteRequestBody_committer.cs @@ -0,0 +1,76 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.Contents.Item +{ + /// + /// object containing information about the committer. + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithPathDeleteRequestBody_committer : IAdditionalDataHolder, IParsable + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The email of the author (or committer) of the commit +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Email { get; set; } +#nullable restore +#else + public string Email { get; set; } +#endif + /// The name of the author (or committer) of the commit +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Name { get; set; } +#nullable restore +#else + public string Name { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public WithPathDeleteRequestBody_committer() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Repos.Item.Item.Contents.Item.WithPathDeleteRequestBody_committer CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Repos.Item.Item.Contents.Item.WithPathDeleteRequestBody_committer(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "email", n => { Email = n.GetStringValue(); } }, + { "name", n => { Name = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("email", Email); + writer.WriteStringValue("name", Name); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Contents/Item/WithPathItemRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Contents/Item/WithPathItemRequestBuilder.cs new file mode 100644 index 0000000..8f5ed35 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Contents/Item/WithPathItemRequestBuilder.cs @@ -0,0 +1,486 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.Contents.Item +{ + /// + /// Builds and executes requests for operations under \repos\{owner-id}\{repo-id}\contents\{path} + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithPathItemRequestBuilder : BaseRequestBuilder + { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public WithPathItemRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/contents/{path}{?ref*}", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public WithPathItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/contents/{path}{?ref*}", rawUrl) + { + } + /// + /// 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/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. + /// API method documentation + /// + /// A + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 404 status code + /// When receiving a 409 status code + /// When receiving a 422 status code + /// When receiving a 503 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task DeleteAsync(global::Ayllu.Github.Client.Repos.Item.Item.Contents.Item.WithPathDeleteRequestBody body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task DeleteAsync(global::Ayllu.Github.Client.Repos.Item.Item.Contents.Item.WithPathDeleteRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = ToDeleteRequestInformation(body, requestConfiguration); + var errorMapping = new Dictionary> + { + { "404", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "409", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "422", global::Ayllu.Github.Client.Models.ValidationError.CreateFromDiscriminatorValue }, + { "503", global::Ayllu.Github.Client.Models.FileCommit503Error.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Models.FileCommit.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// 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/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/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/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. + /// API method documentation + /// + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 403 status code + /// When receiving a 404 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsWithPathGetResponseAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task GetAsWithPathGetResponseAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "403", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "404", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Repos.Item.Item.Contents.Item.WithPathItemRequestBuilder.WithPathGetResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// 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/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/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/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. + /// API method documentation + /// + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 403 status code + /// When receiving a 404 status code + [Obsolete("This method is obsolete. Use GetAsWithPathGetResponseAsync instead.")] +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "403", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "404", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Repos.Item.Item.Contents.Item.WithPathItemRequestBuilder.WithPathResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// 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/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. + /// API method documentation + /// + /// A + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 404 status code + /// When receiving a 422 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PutAsync(global::Ayllu.Github.Client.Repos.Item.Item.Contents.Item.WithPathPutRequestBody body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task PutAsync(global::Ayllu.Github.Client.Repos.Item.Item.Contents.Item.WithPathPutRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPutRequestInformation(body, requestConfiguration); + var errorMapping = new Dictionary> + { + { "404", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "422", global::Ayllu.Github.Client.Models.ValidationError.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Models.FileCommit.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// 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/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. + /// + /// A + /// The request body + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToDeleteRequestInformation(global::Ayllu.Github.Client.Repos.Item.Item.Contents.Item.WithPathDeleteRequestBody body, Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToDeleteRequestInformation(global::Ayllu.Github.Client.Repos.Item.Item.Contents.Item.WithPathDeleteRequestBody body, Action> requestConfiguration = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation(Method.DELETE, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + return requestInfo; + } + /// + /// 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/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/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/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. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// 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/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. + /// + /// A + /// The request body + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPutRequestInformation(global::Ayllu.Github.Client.Repos.Item.Item.Contents.Item.WithPathPutRequestBody body, Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToPutRequestInformation(global::Ayllu.Github.Client.Repos.Item.Item.Contents.Item.WithPathPutRequestBody body, Action> requestConfiguration = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation(Method.PUT, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.Repos.Item.Item.Contents.Item.WithPathItemRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Repos.Item.Item.Contents.Item.WithPathItemRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Composed type wrapper for classes , , , List<global::Ayllu.Github.Client.Models.WithPathGetResponseMember1> + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithPathGetResponse : IComposedTypeWrapper, IParsable + { + /// Composed type representation for type +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.ContentFile? ContentFile { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.ContentFile ContentFile { get; set; } +#endif + /// Composed type representation for type +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.ContentSubmodule? ContentSubmodule { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.ContentSubmodule ContentSubmodule { get; set; } +#endif + /// Composed type representation for type +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.ContentSymlink? ContentSymlink { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.ContentSymlink ContentSymlink { get; set; } +#endif + /// Composed type representation for type List<global::Ayllu.Github.Client.Models.WithPathGetResponseMember1> +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? WithPathGetResponseMember1 { get; set; } +#nullable restore +#else + public List WithPathGetResponseMember1 { get; set; } +#endif + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Repos.Item.Item.Contents.Item.WithPathItemRequestBuilder.WithPathGetResponse CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + var mappingValue = parseNode.GetChildNode("type")?.GetStringValue(); + var result = new global::Ayllu.Github.Client.Repos.Item.Item.Contents.Item.WithPathItemRequestBuilder.WithPathGetResponse(); + if("file".Equals(mappingValue, StringComparison.OrdinalIgnoreCase)) + { + result.ContentFile = new global::Ayllu.Github.Client.Models.ContentFile(); + } + else if("submodule".Equals(mappingValue, StringComparison.OrdinalIgnoreCase)) + { + result.ContentSubmodule = new global::Ayllu.Github.Client.Models.ContentSubmodule(); + } + else if("symlink".Equals(mappingValue, StringComparison.OrdinalIgnoreCase)) + { + result.ContentSymlink = new global::Ayllu.Github.Client.Models.ContentSymlink(); + } + else if(parseNode.GetCollectionOfObjectValues(global::Ayllu.Github.Client.Models.WithPathGetResponseMember1.CreateFromDiscriminatorValue)?.AsList() is List withPathGetResponseMember1Value) + { + result.WithPathGetResponseMember1 = withPathGetResponseMember1Value; + } + return result; + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + if(ContentFile != null) + { + return ContentFile.GetFieldDeserializers(); + } + else if(ContentSubmodule != null) + { + return ContentSubmodule.GetFieldDeserializers(); + } + else if(ContentSymlink != null) + { + return ContentSymlink.GetFieldDeserializers(); + } + return new Dictionary>(); + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ContentFile != null) + { + writer.WriteObjectValue(null, ContentFile); + } + else if(ContentSubmodule != null) + { + writer.WriteObjectValue(null, ContentSubmodule); + } + else if(ContentSymlink != null) + { + writer.WriteObjectValue(null, ContentSymlink); + } + else if(WithPathGetResponseMember1 != null) + { + writer.WriteCollectionOfObjectValues(null, WithPathGetResponseMember1); + } + } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithPathItemRequestBuilderDeleteRequestConfiguration : RequestConfiguration + { + } + /// + /// 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/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/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/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. + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithPathItemRequestBuilderGetQueryParameters + { + /// The name of the commit/branch/tag. Default: the repository’s default branch. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("ref")] + public string? Ref { get; set; } +#nullable restore +#else + [QueryParameter("ref")] + public string Ref { get; set; } +#endif + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithPathItemRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithPathItemRequestBuilderPutRequestConfiguration : RequestConfiguration + { + } + /// + /// Composed type wrapper for classes , , , List<global::Ayllu.Github.Client.Models.WithPathGetResponseMember1> + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithPathResponse : IComposedTypeWrapper, IParsable + { + /// Composed type representation for type +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.ContentFile? ContentFile { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.ContentFile ContentFile { get; set; } +#endif + /// Composed type representation for type +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.ContentSubmodule? ContentSubmodule { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.ContentSubmodule ContentSubmodule { get; set; } +#endif + /// Composed type representation for type +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.ContentSymlink? ContentSymlink { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.ContentSymlink ContentSymlink { get; set; } +#endif + /// Composed type representation for type List<global::Ayllu.Github.Client.Models.WithPathGetResponseMember1> +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? WithPathGetResponseMember1 { get; set; } +#nullable restore +#else + public List WithPathGetResponseMember1 { get; set; } +#endif + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Repos.Item.Item.Contents.Item.WithPathItemRequestBuilder.WithPathResponse CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + var mappingValue = parseNode.GetChildNode("type")?.GetStringValue(); + var result = new global::Ayllu.Github.Client.Repos.Item.Item.Contents.Item.WithPathItemRequestBuilder.WithPathResponse(); + if("file".Equals(mappingValue, StringComparison.OrdinalIgnoreCase)) + { + result.ContentFile = new global::Ayllu.Github.Client.Models.ContentFile(); + } + else if("submodule".Equals(mappingValue, StringComparison.OrdinalIgnoreCase)) + { + result.ContentSubmodule = new global::Ayllu.Github.Client.Models.ContentSubmodule(); + } + else if("symlink".Equals(mappingValue, StringComparison.OrdinalIgnoreCase)) + { + result.ContentSymlink = new global::Ayllu.Github.Client.Models.ContentSymlink(); + } + else if(parseNode.GetCollectionOfObjectValues(global::Ayllu.Github.Client.Models.WithPathGetResponseMember1.CreateFromDiscriminatorValue)?.AsList() is List withPathGetResponseMember1Value) + { + result.WithPathGetResponseMember1 = withPathGetResponseMember1Value; + } + return result; + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + if(ContentFile != null) + { + return ContentFile.GetFieldDeserializers(); + } + else if(ContentSubmodule != null) + { + return ContentSubmodule.GetFieldDeserializers(); + } + else if(ContentSymlink != null) + { + return ContentSymlink.GetFieldDeserializers(); + } + return new Dictionary>(); + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ContentFile != null) + { + writer.WriteObjectValue(null, ContentFile); + } + else if(ContentSubmodule != null) + { + writer.WriteObjectValue(null, ContentSubmodule); + } + else if(ContentSymlink != null) + { + writer.WriteObjectValue(null, ContentSymlink); + } + else if(WithPathGetResponseMember1 != null) + { + writer.WriteCollectionOfObjectValues(null, WithPathGetResponseMember1); + } + } + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Contents/Item/WithPathPutRequestBody.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Contents/Item/WithPathPutRequestBody.cs new file mode 100644 index 0000000..51870f0 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Contents/Item/WithPathPutRequestBody.cs @@ -0,0 +1,115 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.Contents.Item +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class WithPathPutRequestBody : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The author of the file. Default: The `committer` or the authenticated user if you omit `committer`. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Repos.Item.Item.Contents.Item.WithPathPutRequestBody_author? Author { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Repos.Item.Item.Contents.Item.WithPathPutRequestBody_author Author { get; set; } +#endif + /// The branch name. Default: the repository’s default branch. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Branch { get; set; } +#nullable restore +#else + public string Branch { get; set; } +#endif + /// The person that committed the file. Default: the authenticated user. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Repos.Item.Item.Contents.Item.WithPathPutRequestBody_committer? Committer { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Repos.Item.Item.Contents.Item.WithPathPutRequestBody_committer Committer { get; set; } +#endif + /// The new file content, using Base64 encoding. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Content { get; set; } +#nullable restore +#else + public string Content { get; set; } +#endif + /// The commit message. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Message { get; set; } +#nullable restore +#else + public string Message { get; set; } +#endif + /// **Required if you are updating a file**. The blob SHA of the file being replaced. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Sha { get; set; } +#nullable restore +#else + public string Sha { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public WithPathPutRequestBody() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Repos.Item.Item.Contents.Item.WithPathPutRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Repos.Item.Item.Contents.Item.WithPathPutRequestBody(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "author", n => { Author = n.GetObjectValue(global::Ayllu.Github.Client.Repos.Item.Item.Contents.Item.WithPathPutRequestBody_author.CreateFromDiscriminatorValue); } }, + { "branch", n => { Branch = n.GetStringValue(); } }, + { "committer", n => { Committer = n.GetObjectValue(global::Ayllu.Github.Client.Repos.Item.Item.Contents.Item.WithPathPutRequestBody_committer.CreateFromDiscriminatorValue); } }, + { "content", n => { Content = n.GetStringValue(); } }, + { "message", n => { Message = n.GetStringValue(); } }, + { "sha", n => { Sha = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteObjectValue("author", Author); + writer.WriteStringValue("branch", Branch); + writer.WriteObjectValue("committer", Committer); + writer.WriteStringValue("content", Content); + writer.WriteStringValue("message", Message); + writer.WriteStringValue("sha", Sha); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Contents/Item/WithPathPutRequestBody_author.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Contents/Item/WithPathPutRequestBody_author.cs new file mode 100644 index 0000000..71e2f30 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Contents/Item/WithPathPutRequestBody_author.cs @@ -0,0 +1,86 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.Contents.Item +{ + /// + /// The author of the file. Default: The `committer` or the authenticated user if you omit `committer`. + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithPathPutRequestBody_author : IAdditionalDataHolder, IParsable + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The date property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Date { get; set; } +#nullable restore +#else + public string Date { get; set; } +#endif + /// The email of the author or committer of the commit. You'll receive a `422` status code if `email` is omitted. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Email { get; set; } +#nullable restore +#else + public string Email { get; set; } +#endif + /// The name of the author or committer of the commit. You'll receive a `422` status code if `name` is omitted. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Name { get; set; } +#nullable restore +#else + public string Name { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public WithPathPutRequestBody_author() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Repos.Item.Item.Contents.Item.WithPathPutRequestBody_author CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Repos.Item.Item.Contents.Item.WithPathPutRequestBody_author(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "date", n => { Date = n.GetStringValue(); } }, + { "email", n => { Email = n.GetStringValue(); } }, + { "name", n => { Name = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("date", Date); + writer.WriteStringValue("email", Email); + writer.WriteStringValue("name", Name); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Contents/Item/WithPathPutRequestBody_committer.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Contents/Item/WithPathPutRequestBody_committer.cs new file mode 100644 index 0000000..3a0cb6b --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Contents/Item/WithPathPutRequestBody_committer.cs @@ -0,0 +1,86 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.Contents.Item +{ + /// + /// The person that committed the file. Default: the authenticated user. + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithPathPutRequestBody_committer : IAdditionalDataHolder, IParsable + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The date property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Date { get; set; } +#nullable restore +#else + public string Date { get; set; } +#endif + /// The email of the author or committer of the commit. You'll receive a `422` status code if `email` is omitted. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Email { get; set; } +#nullable restore +#else + public string Email { get; set; } +#endif + /// The name of the author or committer of the commit. You'll receive a `422` status code if `name` is omitted. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Name { get; set; } +#nullable restore +#else + public string Name { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public WithPathPutRequestBody_committer() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Repos.Item.Item.Contents.Item.WithPathPutRequestBody_committer CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Repos.Item.Item.Contents.Item.WithPathPutRequestBody_committer(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "date", n => { Date = n.GetStringValue(); } }, + { "email", n => { Email = n.GetStringValue(); } }, + { "name", n => { Name = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("date", Date); + writer.WriteStringValue("email", Email); + writer.WriteStringValue("name", Name); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Contributors/ContributorsRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Contributors/ContributorsRequestBuilder.cs new file mode 100644 index 0000000..a723385 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Contributors/ContributorsRequestBuilder.cs @@ -0,0 +1,124 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.Contributors +{ + /// + /// Builds and executes requests for operations under \repos\{owner-id}\{repo-id}\contributors + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class ContributorsRequestBuilder : BaseRequestBuilder + { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public ContributorsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/contributors{?anon*,page*,per_page*}", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public ContributorsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/contributors{?anon*,page*,per_page*}", rawUrl) + { + } + /// + /// 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. + /// API method documentation + /// + /// A List<global::Ayllu.Github.Client.Models.Contributor> + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 403 status code + /// When receiving a 404 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task?> GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task> GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "403", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "404", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + }; + var collectionResult = await RequestAdapter.SendCollectionAsync(requestInfo, global::Ayllu.Github.Client.Models.Contributor.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + return collectionResult?.AsList(); + } + /// + /// 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. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.Repos.Item.Item.Contributors.ContributorsRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Repos.Item.Item.Contributors.ContributorsRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// 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. + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class ContributorsRequestBuilderGetQueryParameters + { + /// Set to `1` or `true` to include anonymous contributors in results. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("anon")] + public string? Anon { get; set; } +#nullable restore +#else + [QueryParameter("anon")] + public string Anon { get; set; } +#endif + /// The page number of the results to fetch. For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." + [QueryParameter("page")] + public int? Page { get; set; } + /// The number of results per page (max 100). For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." + [QueryParameter("per_page")] + public int? PerPage { get; set; } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class ContributorsRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Dependabot/Alerts/AlertsRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Dependabot/Alerts/AlertsRequestBuilder.cs new file mode 100644 index 0000000..a1fbb72 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Dependabot/Alerts/AlertsRequestBuilder.cs @@ -0,0 +1,284 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Ayllu.Github.Client.Repos.Item.Item.Dependabot.Alerts.Item; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.Dependabot.Alerts +{ + /// + /// Builds and executes requests for operations under \repos\{owner-id}\{repo-id}\dependabot\alerts + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class AlertsRequestBuilder : BaseRequestBuilder + { + /// Gets an item from the Ayllu.Github.Client.repos.item.item.dependabot.alerts.item collection + /// The number that identifies a Dependabot alert in its repository.You can find this at the end of the URL for a Dependabot alert within GitHub,or in `number` fields in the response from the`GET /repos/{owner}/{repo}/dependabot/alerts` operation. + /// A + public global::Ayllu.Github.Client.Repos.Item.Item.Dependabot.Alerts.Item.WithAlert_numberItemRequestBuilder this[int position] + { + get + { + var urlTplParams = new Dictionary(PathParameters); + urlTplParams.Add("alert_number", position); + return new global::Ayllu.Github.Client.Repos.Item.Item.Dependabot.Alerts.Item.WithAlert_numberItemRequestBuilder(urlTplParams, RequestAdapter); + } + } + /// Gets an item from the Ayllu.Github.Client.repos.item.item.dependabot.alerts.item collection + /// The number that identifies a Dependabot alert in its repository.You can find this at the end of the URL for a Dependabot alert within GitHub,or in `number` fields in the response from the`GET /repos/{owner}/{repo}/dependabot/alerts` operation. + /// A + [Obsolete("This indexer is deprecated and will be removed in the next major version. Use the one with the typed parameter instead.")] + public global::Ayllu.Github.Client.Repos.Item.Item.Dependabot.Alerts.Item.WithAlert_numberItemRequestBuilder this[string position] + { + get + { + var urlTplParams = new Dictionary(PathParameters); + if (!string.IsNullOrWhiteSpace(position)) urlTplParams.Add("alert_number", position); + return new global::Ayllu.Github.Client.Repos.Item.Item.Dependabot.Alerts.Item.WithAlert_numberItemRequestBuilder(urlTplParams, RequestAdapter); + } + } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public AlertsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/dependabot/alerts{?after*,before*,direction*,ecosystem*,epss_percentage*,first*,has*,last*,manifest*,package*,page*,per_page*,scope*,severity*,sort*,state*}", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public AlertsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/dependabot/alerts{?after*,before*,direction*,ecosystem*,epss_percentage*,first*,has*,last*,manifest*,package*,page*,per_page*,scope*,severity*,sort*,state*}", rawUrl) + { + } + /// + /// 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. + /// API method documentation + /// + /// A List<global::Ayllu.Github.Client.Models.DependabotAlert> + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 400 status code + /// When receiving a 403 status code + /// When receiving a 404 status code + /// When receiving a 422 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task?> GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task> GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "400", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "403", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "404", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "422", global::Ayllu.Github.Client.Models.ValidationErrorSimple.CreateFromDiscriminatorValue }, + }; + var collectionResult = await RequestAdapter.SendCollectionAsync(requestInfo, global::Ayllu.Github.Client.Models.DependabotAlert.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + return collectionResult?.AsList(); + } + /// + /// 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. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.Repos.Item.Item.Dependabot.Alerts.AlertsRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Repos.Item.Item.Dependabot.Alerts.AlertsRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// 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. + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class AlertsRequestBuilderGetQueryParameters + { + /// A cursor, as given in the [Link header](https://docs.github.com/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/rest/using-the-rest-api/using-pagination-in-the-rest-api)." +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("after")] + public string? After { get; set; } +#nullable restore +#else + [QueryParameter("after")] + public string After { get; set; } +#endif + /// A cursor, as given in the [Link header](https://docs.github.com/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/rest/using-the-rest-api/using-pagination-in-the-rest-api)." +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("before")] + public string? Before { get; set; } +#nullable restore +#else + [QueryParameter("before")] + public string Before { get; set; } +#endif + /// The direction to sort the results by. + [Obsolete("This property is deprecated, use DirectionAsGetDirectionQueryParameterType instead")] +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("direction")] + public string? Direction { get; set; } +#nullable restore +#else + [QueryParameter("direction")] + public string Direction { get; set; } +#endif + /// The direction to sort the results by. + [QueryParameter("direction")] + public global::Ayllu.Github.Client.Repos.Item.Item.Dependabot.Alerts.GetDirectionQueryParameterType? DirectionAsGetDirectionQueryParameterType { get; set; } + /// 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` +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("ecosystem")] + public string? Ecosystem { get; set; } +#nullable restore +#else + [QueryParameter("ecosystem")] + public string Ecosystem { get; set; } +#endif + /// CVE Exploit Prediction Scoring System (EPSS) percentage. Can be specified as:- An exact number (`n`)- Comparators such as `>n`, `<n`, `>=n`, `<=n`- A range like `n..n`, where `n` is a number from 0.0 to 1.0Filters the list of alerts based on EPSS percentages. If specified, only alerts with the provided EPSS percentages will be returned. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("epss_percentage")] + public string? EpssPercentage { get; set; } +#nullable restore +#else + [QueryParameter("epss_percentage")] + public string EpssPercentage { get; set; } +#endif + /// **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. + [QueryParameter("first")] + public int? First { get; set; } + /// Filters the list of alerts based on whether the alert has the given value. If specified, only alerts meeting this criterion will be returned.Multiple `has` filters can be passed to filter for alerts that have all of the values. Currently, only `patch` is supported. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("has")] + public string? Has { get; set; } +#nullable restore +#else + [QueryParameter("has")] + public string Has { get; set; } +#endif + /// **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. + [QueryParameter("last")] + public int? Last { get; set; } + /// A comma-separated list of full manifest paths. If specified, only alerts for these manifests will be returned. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("manifest")] + public string? Manifest { get; set; } +#nullable restore +#else + [QueryParameter("manifest")] + public string Manifest { get; set; } +#endif + /// A comma-separated list of package names. If specified, only alerts for these packages will be returned. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("package")] + public string? Package { get; set; } +#nullable restore +#else + [QueryParameter("package")] + public string Package { get; set; } +#endif + /// **Closing down notice**. Page number of the results to fetch. Use cursor-based pagination with `before` or `after` instead. + [Obsolete("")] + [QueryParameter("page")] + public int? Page { get; set; } + /// The number of results per page (max 100). For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." + [Obsolete("")] + [QueryParameter("per_page")] + public int? PerPage { get; set; } + /// The scope of the vulnerable dependency. If specified, only alerts with this scope will be returned. + [Obsolete("This property is deprecated, use ScopeAsGetScopeQueryParameterType instead")] +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("scope")] + public string? Scope { get; set; } +#nullable restore +#else + [QueryParameter("scope")] + public string Scope { get; set; } +#endif + /// The scope of the vulnerable dependency. If specified, only alerts with this scope will be returned. + [QueryParameter("scope")] + public global::Ayllu.Github.Client.Repos.Item.Item.Dependabot.Alerts.GetScopeQueryParameterType? ScopeAsGetScopeQueryParameterType { get; set; } + /// A comma-separated list of severities. If specified, only alerts with these severities will be returned.Can be: `low`, `medium`, `high`, `critical` +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("severity")] + public string? Severity { get; set; } +#nullable restore +#else + [QueryParameter("severity")] + public string Severity { get; set; } +#endif + /// The property by which to sort the results.`created` means when the alert was created.`updated` means when the alert's state last changed.`epss_percentage` sorts alerts by the Exploit Prediction Scoring System (EPSS) percentage. + [Obsolete("This property is deprecated, use SortAsGetSortQueryParameterType instead")] +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("sort")] + public string? Sort { get; set; } +#nullable restore +#else + [QueryParameter("sort")] + public string Sort { get; set; } +#endif + /// The property by which to sort the results.`created` means when the alert was created.`updated` means when the alert's state last changed.`epss_percentage` sorts alerts by the Exploit Prediction Scoring System (EPSS) percentage. + [QueryParameter("sort")] + public global::Ayllu.Github.Client.Repos.Item.Item.Dependabot.Alerts.GetSortQueryParameterType? SortAsGetSortQueryParameterType { get; set; } + /// A comma-separated list of states. If specified, only alerts with these states will be returned.Can be: `auto_dismissed`, `dismissed`, `fixed`, `open` +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("state")] + public string? State { get; set; } +#nullable restore +#else + [QueryParameter("state")] + public string State { get; set; } +#endif + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class AlertsRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Dependabot/Alerts/GetDirectionQueryParameterType.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Dependabot/Alerts/GetDirectionQueryParameterType.cs new file mode 100644 index 0000000..9c1c22f --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Dependabot/Alerts/GetDirectionQueryParameterType.cs @@ -0,0 +1,20 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.Dependabot.Alerts +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public enum GetDirectionQueryParameterType + #pragma warning restore CS1591 + { + [EnumMember(Value = "asc")] + #pragma warning disable CS1591 + Asc, + #pragma warning restore CS1591 + [EnumMember(Value = "desc")] + #pragma warning disable CS1591 + Desc, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Dependabot/Alerts/GetScopeQueryParameterType.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Dependabot/Alerts/GetScopeQueryParameterType.cs new file mode 100644 index 0000000..560f348 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Dependabot/Alerts/GetScopeQueryParameterType.cs @@ -0,0 +1,20 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.Dependabot.Alerts +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public enum GetScopeQueryParameterType + #pragma warning restore CS1591 + { + [EnumMember(Value = "development")] + #pragma warning disable CS1591 + Development, + #pragma warning restore CS1591 + [EnumMember(Value = "runtime")] + #pragma warning disable CS1591 + Runtime, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Dependabot/Alerts/GetSortQueryParameterType.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Dependabot/Alerts/GetSortQueryParameterType.cs new file mode 100644 index 0000000..d9d1abf --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Dependabot/Alerts/GetSortQueryParameterType.cs @@ -0,0 +1,24 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.Dependabot.Alerts +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public enum GetSortQueryParameterType + #pragma warning restore CS1591 + { + [EnumMember(Value = "created")] + #pragma warning disable CS1591 + Created, + #pragma warning restore CS1591 + [EnumMember(Value = "updated")] + #pragma warning disable CS1591 + Updated, + #pragma warning restore CS1591 + [EnumMember(Value = "epss_percentage")] + #pragma warning disable CS1591 + Epss_percentage, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Dependabot/Alerts/Item/WithAlert_numberItemRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Dependabot/Alerts/Item/WithAlert_numberItemRequestBuilder.cs new file mode 100644 index 0000000..e4cb0de --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Dependabot/Alerts/Item/WithAlert_numberItemRequestBuilder.cs @@ -0,0 +1,164 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.Dependabot.Alerts.Item +{ + /// + /// Builds and executes requests for operations under \repos\{owner-id}\{repo-id}\dependabot\alerts\{alert_number} + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithAlert_numberItemRequestBuilder : BaseRequestBuilder + { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public WithAlert_numberItemRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/dependabot/alerts/{alert_number}", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public WithAlert_numberItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/dependabot/alerts/{alert_number}", rawUrl) + { + } + /// + /// 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. + /// API method documentation + /// + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 403 status code + /// When receiving a 404 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "403", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "404", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Models.DependabotAlert.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// 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/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. + /// API method documentation + /// + /// A + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 400 status code + /// When receiving a 403 status code + /// When receiving a 404 status code + /// When receiving a 409 status code + /// When receiving a 422 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PatchAsync(global::Ayllu.Github.Client.Repos.Item.Item.Dependabot.Alerts.Item.WithAlert_numberPatchRequestBody body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task PatchAsync(global::Ayllu.Github.Client.Repos.Item.Item.Dependabot.Alerts.Item.WithAlert_numberPatchRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPatchRequestInformation(body, requestConfiguration); + var errorMapping = new Dictionary> + { + { "400", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "403", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "404", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "409", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "422", global::Ayllu.Github.Client.Models.ValidationErrorSimple.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Models.DependabotAlert.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// 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. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// 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/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. + /// + /// A + /// The request body + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPatchRequestInformation(global::Ayllu.Github.Client.Repos.Item.Item.Dependabot.Alerts.Item.WithAlert_numberPatchRequestBody body, Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToPatchRequestInformation(global::Ayllu.Github.Client.Repos.Item.Item.Dependabot.Alerts.Item.WithAlert_numberPatchRequestBody body, Action> requestConfiguration = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.Repos.Item.Item.Dependabot.Alerts.Item.WithAlert_numberItemRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Repos.Item.Item.Dependabot.Alerts.Item.WithAlert_numberItemRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithAlert_numberItemRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithAlert_numberItemRequestBuilderPatchRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Dependabot/Alerts/Item/WithAlert_numberPatchRequestBody.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Dependabot/Alerts/Item/WithAlert_numberPatchRequestBody.cs new file mode 100644 index 0000000..88949cb --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Dependabot/Alerts/Item/WithAlert_numberPatchRequestBody.cs @@ -0,0 +1,63 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.Dependabot.Alerts.Item +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class WithAlert_numberPatchRequestBody : IParsable + #pragma warning restore CS1591 + { + /// An optional comment associated with dismissing the alert. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? DismissedComment { get; set; } +#nullable restore +#else + public string DismissedComment { get; set; } +#endif + /// **Required when `state` is `dismissed`.** A reason for dismissing the alert. + public global::Ayllu.Github.Client.Repos.Item.Item.Dependabot.Alerts.Item.WithAlert_numberPatchRequestBody_dismissed_reason? DismissedReason { get; set; } + /// The state of the Dependabot alert.A `dismissed_reason` must be provided when setting the state to `dismissed`. + public global::Ayllu.Github.Client.Repos.Item.Item.Dependabot.Alerts.Item.WithAlert_numberPatchRequestBody_state? State { get; set; } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Repos.Item.Item.Dependabot.Alerts.Item.WithAlert_numberPatchRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Repos.Item.Item.Dependabot.Alerts.Item.WithAlert_numberPatchRequestBody(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "dismissed_comment", n => { DismissedComment = n.GetStringValue(); } }, + { "dismissed_reason", n => { DismissedReason = n.GetEnumValue(); } }, + { "state", n => { State = n.GetEnumValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("dismissed_comment", DismissedComment); + writer.WriteEnumValue("dismissed_reason", DismissedReason); + writer.WriteEnumValue("state", State); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Dependabot/Alerts/Item/WithAlert_numberPatchRequestBody_dismissed_reason.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Dependabot/Alerts/Item/WithAlert_numberPatchRequestBody_dismissed_reason.cs new file mode 100644 index 0000000..928b9d6 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Dependabot/Alerts/Item/WithAlert_numberPatchRequestBody_dismissed_reason.cs @@ -0,0 +1,31 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.Dependabot.Alerts.Item +{ + /// **Required when `state` is `dismissed`.** A reason for dismissing the alert. + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public enum WithAlert_numberPatchRequestBody_dismissed_reason + { + [EnumMember(Value = "fix_started")] + #pragma warning disable CS1591 + Fix_started, + #pragma warning restore CS1591 + [EnumMember(Value = "inaccurate")] + #pragma warning disable CS1591 + Inaccurate, + #pragma warning restore CS1591 + [EnumMember(Value = "no_bandwidth")] + #pragma warning disable CS1591 + No_bandwidth, + #pragma warning restore CS1591 + [EnumMember(Value = "not_used")] + #pragma warning disable CS1591 + Not_used, + #pragma warning restore CS1591 + [EnumMember(Value = "tolerable_risk")] + #pragma warning disable CS1591 + Tolerable_risk, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Dependabot/Alerts/Item/WithAlert_numberPatchRequestBody_state.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Dependabot/Alerts/Item/WithAlert_numberPatchRequestBody_state.cs new file mode 100644 index 0000000..8acb36e --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Dependabot/Alerts/Item/WithAlert_numberPatchRequestBody_state.cs @@ -0,0 +1,19 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.Dependabot.Alerts.Item +{ + /// The state of the Dependabot alert.A `dismissed_reason` must be provided when setting the state to `dismissed`. + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public enum WithAlert_numberPatchRequestBody_state + { + [EnumMember(Value = "dismissed")] + #pragma warning disable CS1591 + Dismissed, + #pragma warning restore CS1591 + [EnumMember(Value = "open")] + #pragma warning disable CS1591 + Open, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Dependabot/DependabotRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Dependabot/DependabotRequestBuilder.cs new file mode 100644 index 0000000..45d84fe --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Dependabot/DependabotRequestBuilder.cs @@ -0,0 +1,47 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Repos.Item.Item.Dependabot.Alerts; +using Ayllu.Github.Client.Repos.Item.Item.Dependabot.Secrets; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.Dependabot +{ + /// + /// Builds and executes requests for operations under \repos\{owner-id}\{repo-id}\dependabot + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class DependabotRequestBuilder : BaseRequestBuilder + { + /// The alerts property + public global::Ayllu.Github.Client.Repos.Item.Item.Dependabot.Alerts.AlertsRequestBuilder Alerts + { + get => new global::Ayllu.Github.Client.Repos.Item.Item.Dependabot.Alerts.AlertsRequestBuilder(PathParameters, RequestAdapter); + } + /// The secrets property + public global::Ayllu.Github.Client.Repos.Item.Item.Dependabot.Secrets.SecretsRequestBuilder Secrets + { + get => new global::Ayllu.Github.Client.Repos.Item.Item.Dependabot.Secrets.SecretsRequestBuilder(PathParameters, RequestAdapter); + } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public DependabotRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/dependabot", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public DependabotRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/dependabot", rawUrl) + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Dependabot/Secrets/Item/WithSecret_nameItemRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Dependabot/Secrets/Item/WithSecret_nameItemRequestBuilder.cs new file mode 100644 index 0000000..c0cc7cc --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Dependabot/Secrets/Item/WithSecret_nameItemRequestBuilder.cs @@ -0,0 +1,188 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.Dependabot.Secrets.Item +{ + /// + /// Builds and executes requests for operations under \repos\{owner-id}\{repo-id}\dependabot\secrets\{secret_name} + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithSecret_nameItemRequestBuilder : BaseRequestBuilder + { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public WithSecret_nameItemRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/dependabot/secrets/{secret_name}", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public WithSecret_nameItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/dependabot/secrets/{secret_name}", rawUrl) + { + } + /// + /// 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 + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task DeleteAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task DeleteAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToDeleteRequestInformation(requestConfiguration); + await RequestAdapter.SendNoContentAsync(requestInfo, default, cancellationToken).ConfigureAwait(false); + } + /// + /// 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. + /// API method documentation + /// + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Models.DependabotSecret.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false); + } + /// + /// 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/rest/guides/encrypting-secrets-for-the-rest-api)."OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. + /// API method documentation + /// + /// A + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PutAsync(global::Ayllu.Github.Client.Repos.Item.Item.Dependabot.Secrets.Item.WithSecret_namePutRequestBody body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task PutAsync(global::Ayllu.Github.Client.Repos.Item.Item.Dependabot.Secrets.Item.WithSecret_namePutRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPutRequestInformation(body, requestConfiguration); + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Models.EmptyObject.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false); + } + /// + /// 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. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToDeleteRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToDeleteRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.DELETE, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + return requestInfo; + } + /// + /// 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. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// 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/rest/guides/encrypting-secrets-for-the-rest-api)."OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. + /// + /// A + /// The request body + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPutRequestInformation(global::Ayllu.Github.Client.Repos.Item.Item.Dependabot.Secrets.Item.WithSecret_namePutRequestBody body, Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToPutRequestInformation(global::Ayllu.Github.Client.Repos.Item.Item.Dependabot.Secrets.Item.WithSecret_namePutRequestBody body, Action> requestConfiguration = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation(Method.PUT, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.Repos.Item.Item.Dependabot.Secrets.Item.WithSecret_nameItemRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Repos.Item.Item.Dependabot.Secrets.Item.WithSecret_nameItemRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithSecret_nameItemRequestBuilderDeleteRequestConfiguration : RequestConfiguration + { + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithSecret_nameItemRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithSecret_nameItemRequestBuilderPutRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Dependabot/Secrets/Item/WithSecret_namePutRequestBody.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Dependabot/Secrets/Item/WithSecret_namePutRequestBody.cs new file mode 100644 index 0000000..40123fa --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Dependabot/Secrets/Item/WithSecret_namePutRequestBody.cs @@ -0,0 +1,75 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.Dependabot.Secrets.Item +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class WithSecret_namePutRequestBody : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// 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/rest/dependabot/secrets#get-a-repository-public-key) endpoint. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? EncryptedValue { get; set; } +#nullable restore +#else + public string EncryptedValue { get; set; } +#endif + /// ID of the key you used to encrypt the secret. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? KeyId { get; set; } +#nullable restore +#else + public string KeyId { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public WithSecret_namePutRequestBody() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Repos.Item.Item.Dependabot.Secrets.Item.WithSecret_namePutRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Repos.Item.Item.Dependabot.Secrets.Item.WithSecret_namePutRequestBody(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "encrypted_value", n => { EncryptedValue = n.GetStringValue(); } }, + { "key_id", n => { KeyId = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("encrypted_value", EncryptedValue); + writer.WriteStringValue("key_id", KeyId); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Dependabot/Secrets/PublicKey/PublicKeyRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Dependabot/Secrets/PublicKey/PublicKeyRequestBuilder.cs new file mode 100644 index 0000000..b40d298 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Dependabot/Secrets/PublicKey/PublicKeyRequestBuilder.cs @@ -0,0 +1,93 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.Dependabot.Secrets.PublicKey +{ + /// + /// Builds and executes requests for operations under \repos\{owner-id}\{repo-id}\dependabot\secrets\public-key + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class PublicKeyRequestBuilder : BaseRequestBuilder + { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public PublicKeyRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/dependabot/secrets/public-key", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public PublicKeyRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/dependabot/secrets/public-key", rawUrl) + { + } + /// + /// 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. + /// API method documentation + /// + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Models.DependabotPublicKey.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false); + } + /// + /// 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. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.Repos.Item.Item.Dependabot.Secrets.PublicKey.PublicKeyRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Repos.Item.Item.Dependabot.Secrets.PublicKey.PublicKeyRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class PublicKeyRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Dependabot/Secrets/SecretsGetResponse.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Dependabot/Secrets/SecretsGetResponse.cs new file mode 100644 index 0000000..8590447 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Dependabot/Secrets/SecretsGetResponse.cs @@ -0,0 +1,70 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.Dependabot.Secrets +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class SecretsGetResponse : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The secrets property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? Secrets { get; set; } +#nullable restore +#else + public List Secrets { get; set; } +#endif + /// The total_count property + public int? TotalCount { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public SecretsGetResponse() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Repos.Item.Item.Dependabot.Secrets.SecretsGetResponse CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Repos.Item.Item.Dependabot.Secrets.SecretsGetResponse(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "secrets", n => { Secrets = n.GetCollectionOfObjectValues(global::Ayllu.Github.Client.Models.DependabotSecret.CreateFromDiscriminatorValue)?.AsList(); } }, + { "total_count", n => { TotalCount = n.GetIntValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteCollectionOfObjectValues("secrets", Secrets); + writer.WriteIntValue("total_count", TotalCount); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Dependabot/Secrets/SecretsRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Dependabot/Secrets/SecretsRequestBuilder.cs new file mode 100644 index 0000000..a780a05 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Dependabot/Secrets/SecretsRequestBuilder.cs @@ -0,0 +1,144 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Repos.Item.Item.Dependabot.Secrets.Item; +using Ayllu.Github.Client.Repos.Item.Item.Dependabot.Secrets.PublicKey; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.Dependabot.Secrets +{ + /// + /// Builds and executes requests for operations under \repos\{owner-id}\{repo-id}\dependabot\secrets + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class SecretsRequestBuilder : BaseRequestBuilder + { + /// The publicKey property + public global::Ayllu.Github.Client.Repos.Item.Item.Dependabot.Secrets.PublicKey.PublicKeyRequestBuilder PublicKey + { + get => new global::Ayllu.Github.Client.Repos.Item.Item.Dependabot.Secrets.PublicKey.PublicKeyRequestBuilder(PathParameters, RequestAdapter); + } + /// Gets an item from the Ayllu.Github.Client.repos.item.item.dependabot.secrets.item collection + /// The name of the secret. + /// A + public global::Ayllu.Github.Client.Repos.Item.Item.Dependabot.Secrets.Item.WithSecret_nameItemRequestBuilder this[string position] + { + get + { + var urlTplParams = new Dictionary(PathParameters); + urlTplParams.Add("secret_name", position); + return new global::Ayllu.Github.Client.Repos.Item.Item.Dependabot.Secrets.Item.WithSecret_nameItemRequestBuilder(urlTplParams, RequestAdapter); + } + } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public SecretsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/dependabot/secrets{?page*,per_page*}", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public SecretsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/dependabot/secrets{?page*,per_page*}", rawUrl) + { + } + /// + /// 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. + /// API method documentation + /// + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsSecretsGetResponseAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task GetAsSecretsGetResponseAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Repos.Item.Item.Dependabot.Secrets.SecretsGetResponse.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false); + } + /// + /// 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. + /// API method documentation + /// + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + [Obsolete("This method is obsolete. Use GetAsSecretsGetResponseAsync instead.")] +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Repos.Item.Item.Dependabot.Secrets.SecretsResponse.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false); + } + /// + /// 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. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.Repos.Item.Item.Dependabot.Secrets.SecretsRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Repos.Item.Item.Dependabot.Secrets.SecretsRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// 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. + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class SecretsRequestBuilderGetQueryParameters + { + /// The page number of the results to fetch. For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." + [QueryParameter("page")] + public int? Page { get; set; } + /// The number of results per page (max 100). For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." + [QueryParameter("per_page")] + public int? PerPage { get; set; } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class SecretsRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Dependabot/Secrets/SecretsResponse.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Dependabot/Secrets/SecretsResponse.cs new file mode 100644 index 0000000..bfabe27 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Dependabot/Secrets/SecretsResponse.cs @@ -0,0 +1,28 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.Dependabot.Secrets +{ + [Obsolete("This class is obsolete. Use SecretsGetResponse instead.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class SecretsResponse : global::Ayllu.Github.Client.Repos.Item.Item.Dependabot.Secrets.SecretsGetResponse, IParsable + #pragma warning restore CS1591 + { + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static new global::Ayllu.Github.Client.Repos.Item.Item.Dependabot.Secrets.SecretsResponse CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Repos.Item.Item.Dependabot.Secrets.SecretsResponse(); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/DependencyGraph/Compare/CompareRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/DependencyGraph/Compare/CompareRequestBuilder.cs new file mode 100644 index 0000000..4cc0ee7 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/DependencyGraph/Compare/CompareRequestBuilder.cs @@ -0,0 +1,48 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Repos.Item.Item.DependencyGraph.Compare.Item; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.DependencyGraph.Compare +{ + /// + /// Builds and executes requests for operations under \repos\{owner-id}\{repo-id}\dependency-graph\compare + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class CompareRequestBuilder : BaseRequestBuilder + { + /// Gets an item from the Ayllu.Github.Client.repos.item.item.dependencyGraph.compare.item collection + /// The base and head Git revisions to compare. The Git revisions will be resolved to commit SHAs. Named revisions will be resolved to their corresponding HEAD commits, and an appropriate merge base will be determined. This parameter expects the format `{base}...{head}`. + /// A + public global::Ayllu.Github.Client.Repos.Item.Item.DependencyGraph.Compare.Item.WithBaseheadItemRequestBuilder this[string position] + { + get + { + var urlTplParams = new Dictionary(PathParameters); + urlTplParams.Add("basehead", position); + return new global::Ayllu.Github.Client.Repos.Item.Item.DependencyGraph.Compare.Item.WithBaseheadItemRequestBuilder(urlTplParams, RequestAdapter); + } + } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public CompareRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/dependency-graph/compare", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public CompareRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/dependency-graph/compare", rawUrl) + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/DependencyGraph/Compare/Item/WithBaseheadItemRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/DependencyGraph/Compare/Item/WithBaseheadItemRequestBuilder.cs new file mode 100644 index 0000000..9814672 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/DependencyGraph/Compare/Item/WithBaseheadItemRequestBuilder.cs @@ -0,0 +1,118 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.DependencyGraph.Compare.Item +{ + /// + /// Builds and executes requests for operations under \repos\{owner-id}\{repo-id}\dependency-graph\compare\{basehead} + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithBaseheadItemRequestBuilder : BaseRequestBuilder + { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public WithBaseheadItemRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/dependency-graph/compare/{basehead}{?name*}", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public WithBaseheadItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/dependency-graph/compare/{basehead}{?name*}", rawUrl) + { + } + /// + /// 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. + /// API method documentation + /// + /// A List<global::Ayllu.Github.Client.Models.DependencyGraphDiff> + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 403 status code + /// When receiving a 404 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task?> GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task> GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "403", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "404", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + }; + var collectionResult = await RequestAdapter.SendCollectionAsync(requestInfo, global::Ayllu.Github.Client.Models.DependencyGraphDiff.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + return collectionResult?.AsList(); + } + /// + /// 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. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.Repos.Item.Item.DependencyGraph.Compare.Item.WithBaseheadItemRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Repos.Item.Item.DependencyGraph.Compare.Item.WithBaseheadItemRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// 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. + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithBaseheadItemRequestBuilderGetQueryParameters + { + /// The full path, relative to the repository root, of the dependency manifest file. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("name")] + public string? Name { get; set; } +#nullable restore +#else + [QueryParameter("name")] + public string Name { get; set; } +#endif + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithBaseheadItemRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/DependencyGraph/DependencyGraphRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/DependencyGraph/DependencyGraphRequestBuilder.cs new file mode 100644 index 0000000..c11fcd0 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/DependencyGraph/DependencyGraphRequestBuilder.cs @@ -0,0 +1,53 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Repos.Item.Item.DependencyGraph.Compare; +using Ayllu.Github.Client.Repos.Item.Item.DependencyGraph.Sbom; +using Ayllu.Github.Client.Repos.Item.Item.DependencyGraph.Snapshots; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.DependencyGraph +{ + /// + /// Builds and executes requests for operations under \repos\{owner-id}\{repo-id}\dependency-graph + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class DependencyGraphRequestBuilder : BaseRequestBuilder + { + /// The compare property + public global::Ayllu.Github.Client.Repos.Item.Item.DependencyGraph.Compare.CompareRequestBuilder Compare + { + get => new global::Ayllu.Github.Client.Repos.Item.Item.DependencyGraph.Compare.CompareRequestBuilder(PathParameters, RequestAdapter); + } + /// The sbom property + public global::Ayllu.Github.Client.Repos.Item.Item.DependencyGraph.Sbom.SbomRequestBuilder Sbom + { + get => new global::Ayllu.Github.Client.Repos.Item.Item.DependencyGraph.Sbom.SbomRequestBuilder(PathParameters, RequestAdapter); + } + /// The snapshots property + public global::Ayllu.Github.Client.Repos.Item.Item.DependencyGraph.Snapshots.SnapshotsRequestBuilder Snapshots + { + get => new global::Ayllu.Github.Client.Repos.Item.Item.DependencyGraph.Snapshots.SnapshotsRequestBuilder(PathParameters, RequestAdapter); + } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public DependencyGraphRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/dependency-graph", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public DependencyGraphRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/dependency-graph", rawUrl) + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/DependencyGraph/Sbom/SbomRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/DependencyGraph/Sbom/SbomRequestBuilder.cs new file mode 100644 index 0000000..6ef3c86 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/DependencyGraph/Sbom/SbomRequestBuilder.cs @@ -0,0 +1,100 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.DependencyGraph.Sbom +{ + /// + /// Builds and executes requests for operations under \repos\{owner-id}\{repo-id}\dependency-graph\sbom + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class SbomRequestBuilder : BaseRequestBuilder + { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public SbomRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/dependency-graph/sbom", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public SbomRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/dependency-graph/sbom", rawUrl) + { + } + /// + /// Exports the software bill of materials (SBOM) for a repository in SPDX JSON format. + /// API method documentation + /// + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 403 status code + /// When receiving a 404 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "403", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "404", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Models.DependencyGraphSpdxSbom.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// Exports the software bill of materials (SBOM) for a repository in SPDX JSON format. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.Repos.Item.Item.DependencyGraph.Sbom.SbomRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Repos.Item.Item.DependencyGraph.Sbom.SbomRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class SbomRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/DependencyGraph/Snapshots/SnapshotsPostResponse.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/DependencyGraph/Snapshots/SnapshotsPostResponse.cs new file mode 100644 index 0000000..014f03f --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/DependencyGraph/Snapshots/SnapshotsPostResponse.cs @@ -0,0 +1,89 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.DependencyGraph.Snapshots +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class SnapshotsPostResponse : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The time at which the snapshot was created. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? CreatedAt { get; set; } +#nullable restore +#else + public string CreatedAt { get; set; } +#endif + /// ID of the created snapshot. + public int? Id { get; set; } + /// A message providing further details about the result, such as why the dependencies were not updated. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Message { get; set; } +#nullable restore +#else + public string Message { get; set; } +#endif + /// 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. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Result { get; set; } +#nullable restore +#else + public string Result { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public SnapshotsPostResponse() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Repos.Item.Item.DependencyGraph.Snapshots.SnapshotsPostResponse CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Repos.Item.Item.DependencyGraph.Snapshots.SnapshotsPostResponse(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "created_at", n => { CreatedAt = n.GetStringValue(); } }, + { "id", n => { Id = n.GetIntValue(); } }, + { "message", n => { Message = n.GetStringValue(); } }, + { "result", n => { Result = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("created_at", CreatedAt); + writer.WriteIntValue("id", Id); + writer.WriteStringValue("message", Message); + writer.WriteStringValue("result", Result); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/DependencyGraph/Snapshots/SnapshotsRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/DependencyGraph/Snapshots/SnapshotsRequestBuilder.cs new file mode 100644 index 0000000..dc472d2 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/DependencyGraph/Snapshots/SnapshotsRequestBuilder.cs @@ -0,0 +1,120 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.DependencyGraph.Snapshots +{ + /// + /// Builds and executes requests for operations under \repos\{owner-id}\{repo-id}\dependency-graph\snapshots + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class SnapshotsRequestBuilder : BaseRequestBuilder + { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public SnapshotsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/dependency-graph/snapshots", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public SnapshotsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/dependency-graph/snapshots", rawUrl) + { + } + /// + /// 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. + /// API method documentation + /// + /// A + /// Create a new snapshot of a repository's dependencies. + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PostAsSnapshotsPostResponseAsync(global::Ayllu.Github.Client.Models.Snapshot body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task PostAsSnapshotsPostResponseAsync(global::Ayllu.Github.Client.Models.Snapshot body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPostRequestInformation(body, requestConfiguration); + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Repos.Item.Item.DependencyGraph.Snapshots.SnapshotsPostResponse.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false); + } + /// + /// 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. + /// API method documentation + /// + /// A + /// Create a new snapshot of a repository's dependencies. + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + [Obsolete("This method is obsolete. Use PostAsSnapshotsPostResponseAsync instead.")] +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PostAsync(global::Ayllu.Github.Client.Models.Snapshot body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task PostAsync(global::Ayllu.Github.Client.Models.Snapshot body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPostRequestInformation(body, requestConfiguration); + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Repos.Item.Item.DependencyGraph.Snapshots.SnapshotsResponse.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false); + } + /// + /// 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. + /// + /// A + /// Create a new snapshot of a repository's dependencies. + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPostRequestInformation(global::Ayllu.Github.Client.Models.Snapshot body, Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToPostRequestInformation(global::Ayllu.Github.Client.Models.Snapshot body, Action> requestConfiguration = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.Repos.Item.Item.DependencyGraph.Snapshots.SnapshotsRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Repos.Item.Item.DependencyGraph.Snapshots.SnapshotsRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class SnapshotsRequestBuilderPostRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/DependencyGraph/Snapshots/SnapshotsResponse.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/DependencyGraph/Snapshots/SnapshotsResponse.cs new file mode 100644 index 0000000..8ef675b --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/DependencyGraph/Snapshots/SnapshotsResponse.cs @@ -0,0 +1,28 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.DependencyGraph.Snapshots +{ + [Obsolete("This class is obsolete. Use SnapshotsPostResponse instead.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class SnapshotsResponse : global::Ayllu.Github.Client.Repos.Item.Item.DependencyGraph.Snapshots.SnapshotsPostResponse, IParsable + #pragma warning restore CS1591 + { + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static new global::Ayllu.Github.Client.Repos.Item.Item.DependencyGraph.Snapshots.SnapshotsResponse CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Repos.Item.Item.DependencyGraph.Snapshots.SnapshotsResponse(); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Deployments/DeploymentsPostRequestBody.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Deployments/DeploymentsPostRequestBody.cs new file mode 100644 index 0000000..b3b9130 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Deployments/DeploymentsPostRequestBody.cs @@ -0,0 +1,129 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.Deployments +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class DeploymentsPostRequestBody : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// Attempts to automatically merge the default branch into the requested ref, if it's behind the default branch. + public bool? AutoMerge { get; set; } + /// Short description of the deployment. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Description { get; set; } +#nullable restore +#else + public string Description { get; set; } +#endif + /// Name for the target deployment environment (e.g., `production`, `staging`, `qa`). +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Environment { get; set; } +#nullable restore +#else + public string Environment { get; set; } +#endif + /// The payload property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Payload { get; set; } +#nullable restore +#else + public string Payload { get; set; } +#endif + /// Specifies if the given environment is one that end-users directly interact with. Default: `true` when `environment` is `production` and `false` otherwise. + public bool? ProductionEnvironment { get; set; } + /// The ref to deploy. This can be a branch, tag, or SHA. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Ref { get; set; } +#nullable restore +#else + public string Ref { get; set; } +#endif + /// The [status](https://docs.github.com/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. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? RequiredContexts { get; set; } +#nullable restore +#else + public List RequiredContexts { get; set; } +#endif + /// Specifies a task to execute (e.g., `deploy` or `deploy:migrations`). +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Task { get; set; } +#nullable restore +#else + public string Task { get; set; } +#endif + /// Specifies if the given environment is specific to the deployment and will no longer exist at some point in the future. Default: `false` + public bool? TransientEnvironment { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public DeploymentsPostRequestBody() + { + AdditionalData = new Dictionary(); + Environment = "production"; + Task = "deploy"; + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Repos.Item.Item.Deployments.DeploymentsPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Repos.Item.Item.Deployments.DeploymentsPostRequestBody(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "auto_merge", n => { AutoMerge = n.GetBoolValue(); } }, + { "description", n => { Description = n.GetStringValue(); } }, + { "environment", n => { Environment = n.GetStringValue(); } }, + { "payload", n => { Payload = n.GetStringValue(); } }, + { "production_environment", n => { ProductionEnvironment = n.GetBoolValue(); } }, + { "ref", n => { Ref = n.GetStringValue(); } }, + { "required_contexts", n => { RequiredContexts = n.GetCollectionOfPrimitiveValues()?.AsList(); } }, + { "task", n => { Task = n.GetStringValue(); } }, + { "transient_environment", n => { TransientEnvironment = n.GetBoolValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteBoolValue("auto_merge", AutoMerge); + writer.WriteStringValue("description", Description); + writer.WriteStringValue("environment", Environment); + writer.WriteStringValue("payload", Payload); + writer.WriteBoolValue("production_environment", ProductionEnvironment); + writer.WriteStringValue("ref", Ref); + writer.WriteCollectionOfPrimitiveValues("required_contexts", RequiredContexts); + writer.WriteStringValue("task", Task); + writer.WriteBoolValue("transient_environment", TransientEnvironment); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Deployments/DeploymentsRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Deployments/DeploymentsRequestBuilder.cs new file mode 100644 index 0000000..a3a5c5c --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Deployments/DeploymentsRequestBuilder.cs @@ -0,0 +1,229 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Ayllu.Github.Client.Repos.Item.Item.Deployments.Item; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.Deployments +{ + /// + /// Builds and executes requests for operations under \repos\{owner-id}\{repo-id}\deployments + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class DeploymentsRequestBuilder : BaseRequestBuilder + { + /// Gets an item from the Ayllu.Github.Client.repos.item.item.deployments.item collection + /// deployment_id parameter + /// A + public global::Ayllu.Github.Client.Repos.Item.Item.Deployments.Item.WithDeployment_ItemRequestBuilder this[int position] + { + get + { + var urlTplParams = new Dictionary(PathParameters); + urlTplParams.Add("deployment_id", position); + return new global::Ayllu.Github.Client.Repos.Item.Item.Deployments.Item.WithDeployment_ItemRequestBuilder(urlTplParams, RequestAdapter); + } + } + /// Gets an item from the Ayllu.Github.Client.repos.item.item.deployments.item collection + /// deployment_id parameter + /// A + [Obsolete("This indexer is deprecated and will be removed in the next major version. Use the one with the typed parameter instead.")] + public global::Ayllu.Github.Client.Repos.Item.Item.Deployments.Item.WithDeployment_ItemRequestBuilder this[string position] + { + get + { + var urlTplParams = new Dictionary(PathParameters); + if (!string.IsNullOrWhiteSpace(position)) urlTplParams.Add("deployment_id", position); + return new global::Ayllu.Github.Client.Repos.Item.Item.Deployments.Item.WithDeployment_ItemRequestBuilder(urlTplParams, RequestAdapter); + } + } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public DeploymentsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/deployments{?environment*,page*,per_page*,ref*,sha*,task*}", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public DeploymentsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/deployments{?environment*,page*,per_page*,ref*,sha*,task*}", rawUrl) + { + } + /// + /// Simple filtering of deployments is available via query parameters: + /// API method documentation + /// + /// A List<global::Ayllu.Github.Client.Models.Deployment> + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task?> GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task> GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var collectionResult = await RequestAdapter.SendCollectionAsync(requestInfo, global::Ayllu.Github.Client.Models.Deployment.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false); + return collectionResult?.AsList(); + } + /// + /// Deployments offer a few configurable parameters with certain defaults.The `ref` parameter can be any named branch, tag, or SHA. At GitHub 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/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. + /// API method documentation + /// + /// A + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 422 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PostAsync(global::Ayllu.Github.Client.Repos.Item.Item.Deployments.DeploymentsPostRequestBody body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task PostAsync(global::Ayllu.Github.Client.Repos.Item.Item.Deployments.DeploymentsPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPostRequestInformation(body, requestConfiguration); + var errorMapping = new Dictionary> + { + { "422", global::Ayllu.Github.Client.Models.ValidationError.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Models.Deployment.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// Simple filtering of deployments is available via query parameters: + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Deployments offer a few configurable parameters with certain defaults.The `ref` parameter can be any named branch, tag, or SHA. At GitHub 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/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. + /// + /// A + /// The request body + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPostRequestInformation(global::Ayllu.Github.Client.Repos.Item.Item.Deployments.DeploymentsPostRequestBody body, Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToPostRequestInformation(global::Ayllu.Github.Client.Repos.Item.Item.Deployments.DeploymentsPostRequestBody body, Action> requestConfiguration = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.Repos.Item.Item.Deployments.DeploymentsRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Repos.Item.Item.Deployments.DeploymentsRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Simple filtering of deployments is available via query parameters: + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class DeploymentsRequestBuilderGetQueryParameters + { + /// The name of the environment that was deployed to (e.g., `staging` or `production`). +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("environment")] + public string? Environment { get; set; } +#nullable restore +#else + [QueryParameter("environment")] + public string Environment { get; set; } +#endif + /// The page number of the results to fetch. For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." + [QueryParameter("page")] + public int? Page { get; set; } + /// The number of results per page (max 100). For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." + [QueryParameter("per_page")] + public int? PerPage { get; set; } + /// The name of the ref. This can be a branch, tag, or SHA. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("ref")] + public string? Ref { get; set; } +#nullable restore +#else + [QueryParameter("ref")] + public string Ref { get; set; } +#endif + /// The SHA recorded at creation time. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("sha")] + public string? Sha { get; set; } +#nullable restore +#else + [QueryParameter("sha")] + public string Sha { get; set; } +#endif + /// The name of the task for the deployment (e.g., `deploy` or `deploy:migrations`). +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("task")] + public string? Task { get; set; } +#nullable restore +#else + [QueryParameter("task")] + public string Task { get; set; } +#endif + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class DeploymentsRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class DeploymentsRequestBuilderPostRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Deployments/Item/Statuses/Item/WithStatus_ItemRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Deployments/Item/Statuses/Item/WithStatus_ItemRequestBuilder.cs new file mode 100644 index 0000000..df8bc89 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Deployments/Item/Statuses/Item/WithStatus_ItemRequestBuilder.cs @@ -0,0 +1,98 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.Deployments.Item.Statuses.Item +{ + /// + /// Builds and executes requests for operations under \repos\{owner-id}\{repo-id}\deployments\{deployment_id}\statuses\{status_id} + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithStatus_ItemRequestBuilder : BaseRequestBuilder + { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public WithStatus_ItemRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/deployments/{deployment_id}/statuses/{status_id}", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public WithStatus_ItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/deployments/{deployment_id}/statuses/{status_id}", rawUrl) + { + } + /// + /// Users with pull access can view a deployment status for a deployment: + /// API method documentation + /// + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 404 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "404", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Models.DeploymentStatus.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// Users with pull access can view a deployment status for a deployment: + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.Repos.Item.Item.Deployments.Item.Statuses.Item.WithStatus_ItemRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Repos.Item.Item.Deployments.Item.Statuses.Item.WithStatus_ItemRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithStatus_ItemRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Deployments/Item/Statuses/StatusesPostRequestBody.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Deployments/Item/Statuses/StatusesPostRequestBody.cs new file mode 100644 index 0000000..0b83bf2 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Deployments/Item/Statuses/StatusesPostRequestBody.cs @@ -0,0 +1,113 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.Deployments.Item.Statuses +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class StatusesPostRequestBody : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// 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` + public bool? AutoInactive { get; set; } + /// A short description of the status. The maximum description length is 140 characters. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Description { get; set; } +#nullable restore +#else + public string Description { get; set; } +#endif + /// 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. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Environment { get; set; } +#nullable restore +#else + public string Environment { get; set; } +#endif + /// Sets the URL for accessing your environment. Default: `""` +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? EnvironmentUrl { get; set; } +#nullable restore +#else + public string EnvironmentUrl { get; set; } +#endif + /// 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: `""` +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? LogUrl { get; set; } +#nullable restore +#else + public string LogUrl { get; set; } +#endif + /// The state of the status. When you set a transient deployment to `inactive`, the deployment will be shown as `destroyed` in GitHub. + public global::Ayllu.Github.Client.Repos.Item.Item.Deployments.Item.Statuses.StatusesPostRequestBody_state? State { get; set; } + /// 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`. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? TargetUrl { get; set; } +#nullable restore +#else + public string TargetUrl { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public StatusesPostRequestBody() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Repos.Item.Item.Deployments.Item.Statuses.StatusesPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Repos.Item.Item.Deployments.Item.Statuses.StatusesPostRequestBody(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "auto_inactive", n => { AutoInactive = n.GetBoolValue(); } }, + { "description", n => { Description = n.GetStringValue(); } }, + { "environment", n => { Environment = n.GetStringValue(); } }, + { "environment_url", n => { EnvironmentUrl = n.GetStringValue(); } }, + { "log_url", n => { LogUrl = n.GetStringValue(); } }, + { "state", n => { State = n.GetEnumValue(); } }, + { "target_url", n => { TargetUrl = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteBoolValue("auto_inactive", AutoInactive); + writer.WriteStringValue("description", Description); + writer.WriteStringValue("environment", Environment); + writer.WriteStringValue("environment_url", EnvironmentUrl); + writer.WriteStringValue("log_url", LogUrl); + writer.WriteEnumValue("state", State); + writer.WriteStringValue("target_url", TargetUrl); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Deployments/Item/Statuses/StatusesPostRequestBody_state.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Deployments/Item/Statuses/StatusesPostRequestBody_state.cs new file mode 100644 index 0000000..bf446d6 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Deployments/Item/Statuses/StatusesPostRequestBody_state.cs @@ -0,0 +1,39 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.Deployments.Item.Statuses +{ + /// The state of the status. When you set a transient deployment to `inactive`, the deployment will be shown as `destroyed` in GitHub. + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public enum StatusesPostRequestBody_state + { + [EnumMember(Value = "error")] + #pragma warning disable CS1591 + Error, + #pragma warning restore CS1591 + [EnumMember(Value = "failure")] + #pragma warning disable CS1591 + Failure, + #pragma warning restore CS1591 + [EnumMember(Value = "inactive")] + #pragma warning disable CS1591 + Inactive, + #pragma warning restore CS1591 + [EnumMember(Value = "in_progress")] + #pragma warning disable CS1591 + In_progress, + #pragma warning restore CS1591 + [EnumMember(Value = "queued")] + #pragma warning disable CS1591 + Queued, + #pragma warning restore CS1591 + [EnumMember(Value = "pending")] + #pragma warning disable CS1591 + Pending, + #pragma warning restore CS1591 + [EnumMember(Value = "success")] + #pragma warning disable CS1591 + Success, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Deployments/Item/Statuses/StatusesRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Deployments/Item/Statuses/StatusesRequestBuilder.cs new file mode 100644 index 0000000..55533cb --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Deployments/Item/Statuses/StatusesRequestBuilder.cs @@ -0,0 +1,194 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Ayllu.Github.Client.Repos.Item.Item.Deployments.Item.Statuses.Item; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.Deployments.Item.Statuses +{ + /// + /// Builds and executes requests for operations under \repos\{owner-id}\{repo-id}\deployments\{deployment_id}\statuses + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class StatusesRequestBuilder : BaseRequestBuilder + { + /// Gets an item from the Ayllu.Github.Client.repos.item.item.deployments.item.statuses.item collection + /// Unique identifier of the item + /// A + public global::Ayllu.Github.Client.Repos.Item.Item.Deployments.Item.Statuses.Item.WithStatus_ItemRequestBuilder this[int position] + { + get + { + var urlTplParams = new Dictionary(PathParameters); + urlTplParams.Add("status_id", position); + return new global::Ayllu.Github.Client.Repos.Item.Item.Deployments.Item.Statuses.Item.WithStatus_ItemRequestBuilder(urlTplParams, RequestAdapter); + } + } + /// Gets an item from the Ayllu.Github.Client.repos.item.item.deployments.item.statuses.item collection + /// Unique identifier of the item + /// A + [Obsolete("This indexer is deprecated and will be removed in the next major version. Use the one with the typed parameter instead.")] + public global::Ayllu.Github.Client.Repos.Item.Item.Deployments.Item.Statuses.Item.WithStatus_ItemRequestBuilder this[string position] + { + get + { + var urlTplParams = new Dictionary(PathParameters); + if (!string.IsNullOrWhiteSpace(position)) urlTplParams.Add("status_id", position); + return new global::Ayllu.Github.Client.Repos.Item.Item.Deployments.Item.Statuses.Item.WithStatus_ItemRequestBuilder(urlTplParams, RequestAdapter); + } + } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public StatusesRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/deployments/{deployment_id}/statuses{?page*,per_page*}", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public StatusesRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/deployments/{deployment_id}/statuses{?page*,per_page*}", rawUrl) + { + } + /// + /// Users with pull access can view deployment statuses for a deployment: + /// API method documentation + /// + /// A List<global::Ayllu.Github.Client.Models.DeploymentStatus> + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 404 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task?> GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task> GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "404", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + }; + var collectionResult = await RequestAdapter.SendCollectionAsync(requestInfo, global::Ayllu.Github.Client.Models.DeploymentStatus.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + return collectionResult?.AsList(); + } + /// + /// 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. + /// API method documentation + /// + /// A + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 422 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PostAsync(global::Ayllu.Github.Client.Repos.Item.Item.Deployments.Item.Statuses.StatusesPostRequestBody body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task PostAsync(global::Ayllu.Github.Client.Repos.Item.Item.Deployments.Item.Statuses.StatusesPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPostRequestInformation(body, requestConfiguration); + var errorMapping = new Dictionary> + { + { "422", global::Ayllu.Github.Client.Models.ValidationError.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Models.DeploymentStatus.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// Users with pull access can view deployment statuses for a deployment: + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// 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. + /// + /// A + /// The request body + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPostRequestInformation(global::Ayllu.Github.Client.Repos.Item.Item.Deployments.Item.Statuses.StatusesPostRequestBody body, Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToPostRequestInformation(global::Ayllu.Github.Client.Repos.Item.Item.Deployments.Item.Statuses.StatusesPostRequestBody body, Action> requestConfiguration = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.Repos.Item.Item.Deployments.Item.Statuses.StatusesRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Repos.Item.Item.Deployments.Item.Statuses.StatusesRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Users with pull access can view deployment statuses for a deployment: + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class StatusesRequestBuilderGetQueryParameters + { + /// The page number of the results to fetch. For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." + [QueryParameter("page")] + public int? Page { get; set; } + /// The number of results per page (max 100). For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." + [QueryParameter("per_page")] + public int? PerPage { get; set; } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class StatusesRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class StatusesRequestBuilderPostRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Deployments/Item/WithDeployment_ItemRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Deployments/Item/WithDeployment_ItemRequestBuilder.cs new file mode 100644 index 0000000..b1fb301 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Deployments/Item/WithDeployment_ItemRequestBuilder.cs @@ -0,0 +1,153 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Ayllu.Github.Client.Repos.Item.Item.Deployments.Item.Statuses; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.Deployments.Item +{ + /// + /// Builds and executes requests for operations under \repos\{owner-id}\{repo-id}\deployments\{deployment_id} + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithDeployment_ItemRequestBuilder : BaseRequestBuilder + { + /// The statuses property + public global::Ayllu.Github.Client.Repos.Item.Item.Deployments.Item.Statuses.StatusesRequestBuilder Statuses + { + get => new global::Ayllu.Github.Client.Repos.Item.Item.Deployments.Item.Statuses.StatusesRequestBuilder(PathParameters, RequestAdapter); + } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public WithDeployment_ItemRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/deployments/{deployment_id}", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public WithDeployment_ItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/deployments/{deployment_id}", rawUrl) + { + } + /// + /// 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/rest/deployments/deployments/#create-a-deployment)" and "[Create a deployment status](https://docs.github.com/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. + /// API method documentation + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 404 status code + /// When receiving a 422 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task DeleteAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task DeleteAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToDeleteRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "404", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "422", global::Ayllu.Github.Client.Models.ValidationErrorSimple.CreateFromDiscriminatorValue }, + }; + await RequestAdapter.SendNoContentAsync(requestInfo, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// Get a deployment + /// API method documentation + /// + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 404 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "404", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Models.Deployment.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// 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/rest/deployments/deployments/#create-a-deployment)" and "[Create a deployment status](https://docs.github.com/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. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToDeleteRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToDeleteRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.DELETE, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.Repos.Item.Item.Deployments.Item.WithDeployment_ItemRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Repos.Item.Item.Deployments.Item.WithDeployment_ItemRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithDeployment_ItemRequestBuilderDeleteRequestConfiguration : RequestConfiguration + { + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithDeployment_ItemRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Dispatches/DispatchesPostRequestBody.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Dispatches/DispatchesPostRequestBody.cs new file mode 100644 index 0000000..1c6c897 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Dispatches/DispatchesPostRequestBody.cs @@ -0,0 +1,75 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.Dispatches +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class DispatchesPostRequestBody : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// 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. The total size of the JSON payload must be less than 64KB. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Repos.Item.Item.Dispatches.DispatchesPostRequestBody_client_payload? ClientPayload { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Repos.Item.Item.Dispatches.DispatchesPostRequestBody_client_payload ClientPayload { get; set; } +#endif + /// A custom webhook event name. Must be 100 characters or fewer. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? EventType { get; set; } +#nullable restore +#else + public string EventType { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public DispatchesPostRequestBody() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Repos.Item.Item.Dispatches.DispatchesPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Repos.Item.Item.Dispatches.DispatchesPostRequestBody(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "client_payload", n => { ClientPayload = n.GetObjectValue(global::Ayllu.Github.Client.Repos.Item.Item.Dispatches.DispatchesPostRequestBody_client_payload.CreateFromDiscriminatorValue); } }, + { "event_type", n => { EventType = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteObjectValue("client_payload", ClientPayload); + writer.WriteStringValue("event_type", EventType); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Dispatches/DispatchesPostRequestBody_client_payload.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Dispatches/DispatchesPostRequestBody_client_payload.cs new file mode 100644 index 0000000..db4e166 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Dispatches/DispatchesPostRequestBody_client_payload.cs @@ -0,0 +1,56 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.Dispatches +{ + /// + /// 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. The total size of the JSON payload must be less than 64KB. + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class DispatchesPostRequestBody_client_payload : IAdditionalDataHolder, IParsable + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public DispatchesPostRequestBody_client_payload() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Repos.Item.Item.Dispatches.DispatchesPostRequestBody_client_payload CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Repos.Item.Item.Dispatches.DispatchesPostRequestBody_client_payload(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Dispatches/DispatchesRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Dispatches/DispatchesRequestBuilder.cs new file mode 100644 index 0000000..66f4c52 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Dispatches/DispatchesRequestBuilder.cs @@ -0,0 +1,104 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.Dispatches +{ + /// + /// Builds and executes requests for operations under \repos\{owner-id}\{repo-id}\dispatches + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class DispatchesRequestBuilder : BaseRequestBuilder + { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public DispatchesRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/dispatches", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public DispatchesRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/dispatches", rawUrl) + { + } + /// + /// You can use this endpoint to trigger a webhook event called `repository_dispatch` when you want activity that happens outside of GitHub 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/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. + /// API method documentation + /// + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 404 status code + /// When receiving a 422 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PostAsync(global::Ayllu.Github.Client.Repos.Item.Item.Dispatches.DispatchesPostRequestBody body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task PostAsync(global::Ayllu.Github.Client.Repos.Item.Item.Dispatches.DispatchesPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPostRequestInformation(body, requestConfiguration); + var errorMapping = new Dictionary> + { + { "404", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "422", global::Ayllu.Github.Client.Models.ValidationError.CreateFromDiscriminatorValue }, + }; + await RequestAdapter.SendNoContentAsync(requestInfo, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// You can use this endpoint to trigger a webhook event called `repository_dispatch` when you want activity that happens outside of GitHub 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/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. + /// + /// A + /// The request body + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPostRequestInformation(global::Ayllu.Github.Client.Repos.Item.Item.Dispatches.DispatchesPostRequestBody body, Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToPostRequestInformation(global::Ayllu.Github.Client.Repos.Item.Item.Dispatches.DispatchesPostRequestBody body, Action> requestConfiguration = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.Repos.Item.Item.Dispatches.DispatchesRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Repos.Item.Item.Dispatches.DispatchesRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class DispatchesRequestBuilderPostRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Environments/EnvironmentsGetResponse.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Environments/EnvironmentsGetResponse.cs new file mode 100644 index 0000000..150b18e --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Environments/EnvironmentsGetResponse.cs @@ -0,0 +1,70 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.Environments +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class EnvironmentsGetResponse : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The environments property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? Environments { get; set; } +#nullable restore +#else + public List Environments { get; set; } +#endif + /// The number of environments in this repository + public int? TotalCount { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public EnvironmentsGetResponse() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Repos.Item.Item.Environments.EnvironmentsGetResponse CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Repos.Item.Item.Environments.EnvironmentsGetResponse(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "environments", n => { Environments = n.GetCollectionOfObjectValues(global::Ayllu.Github.Client.Models.EnvironmentObject.CreateFromDiscriminatorValue)?.AsList(); } }, + { "total_count", n => { TotalCount = n.GetIntValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteCollectionOfObjectValues("environments", Environments); + writer.WriteIntValue("total_count", TotalCount); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Environments/EnvironmentsRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Environments/EnvironmentsRequestBuilder.cs new file mode 100644 index 0000000..fdd9c3f --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Environments/EnvironmentsRequestBuilder.cs @@ -0,0 +1,138 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Repos.Item.Item.Environments.Item; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.Environments +{ + /// + /// Builds and executes requests for operations under \repos\{owner-id}\{repo-id}\environments + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class EnvironmentsRequestBuilder : BaseRequestBuilder + { + /// Gets an item from the Ayllu.Github.Client.repos.item.item.environments.item collection + /// The name of the environment. The name must be URL encoded. For example, any slashes in the name must be replaced with `%2F`. + /// A + public global::Ayllu.Github.Client.Repos.Item.Item.Environments.Item.WithEnvironment_nameItemRequestBuilder this[string position] + { + get + { + var urlTplParams = new Dictionary(PathParameters); + urlTplParams.Add("environment_name", position); + return new global::Ayllu.Github.Client.Repos.Item.Item.Environments.Item.WithEnvironment_nameItemRequestBuilder(urlTplParams, RequestAdapter); + } + } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public EnvironmentsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/environments{?page*,per_page*}", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public EnvironmentsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/environments{?page*,per_page*}", rawUrl) + { + } + /// + /// 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. + /// API method documentation + /// + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsEnvironmentsGetResponseAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task GetAsEnvironmentsGetResponseAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Repos.Item.Item.Environments.EnvironmentsGetResponse.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false); + } + /// + /// 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. + /// API method documentation + /// + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + [Obsolete("This method is obsolete. Use GetAsEnvironmentsGetResponseAsync instead.")] +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Repos.Item.Item.Environments.EnvironmentsResponse.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false); + } + /// + /// 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. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.Repos.Item.Item.Environments.EnvironmentsRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Repos.Item.Item.Environments.EnvironmentsRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// 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. + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class EnvironmentsRequestBuilderGetQueryParameters + { + /// The page number of the results to fetch. For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." + [QueryParameter("page")] + public int? Page { get; set; } + /// The number of results per page (max 100). For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." + [QueryParameter("per_page")] + public int? PerPage { get; set; } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class EnvironmentsRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Environments/EnvironmentsResponse.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Environments/EnvironmentsResponse.cs new file mode 100644 index 0000000..847731f --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Environments/EnvironmentsResponse.cs @@ -0,0 +1,28 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.Environments +{ + [Obsolete("This class is obsolete. Use EnvironmentsGetResponse instead.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class EnvironmentsResponse : global::Ayllu.Github.Client.Repos.Item.Item.Environments.EnvironmentsGetResponse, IParsable + #pragma warning restore CS1591 + { + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static new global::Ayllu.Github.Client.Repos.Item.Item.Environments.EnvironmentsResponse CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Repos.Item.Item.Environments.EnvironmentsResponse(); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Environments/Item/DeploymentBranchPolicies/DeploymentBranchPoliciesGetResponse.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Environments/Item/DeploymentBranchPolicies/DeploymentBranchPoliciesGetResponse.cs new file mode 100644 index 0000000..73fdd57 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Environments/Item/DeploymentBranchPolicies/DeploymentBranchPoliciesGetResponse.cs @@ -0,0 +1,70 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.Environments.Item.DeploymentBranchPolicies +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class DeploymentBranchPoliciesGetResponse : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The branch_policies property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? BranchPolicies { get; set; } +#nullable restore +#else + public List BranchPolicies { get; set; } +#endif + /// The number of deployment branch policies for the environment. + public int? TotalCount { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public DeploymentBranchPoliciesGetResponse() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Repos.Item.Item.Environments.Item.DeploymentBranchPolicies.DeploymentBranchPoliciesGetResponse CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Repos.Item.Item.Environments.Item.DeploymentBranchPolicies.DeploymentBranchPoliciesGetResponse(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "branch_policies", n => { BranchPolicies = n.GetCollectionOfObjectValues(global::Ayllu.Github.Client.Models.DeploymentBranchPolicy.CreateFromDiscriminatorValue)?.AsList(); } }, + { "total_count", n => { TotalCount = n.GetIntValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteCollectionOfObjectValues("branch_policies", BranchPolicies); + writer.WriteIntValue("total_count", TotalCount); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Environments/Item/DeploymentBranchPolicies/DeploymentBranchPoliciesRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Environments/Item/DeploymentBranchPolicies/DeploymentBranchPoliciesRequestBuilder.cs new file mode 100644 index 0000000..60dfde5 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Environments/Item/DeploymentBranchPolicies/DeploymentBranchPoliciesRequestBuilder.cs @@ -0,0 +1,203 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Ayllu.Github.Client.Repos.Item.Item.Environments.Item.DeploymentBranchPolicies.Item; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.Environments.Item.DeploymentBranchPolicies +{ + /// + /// Builds and executes requests for operations under \repos\{owner-id}\{repo-id}\environments\{environment_name}\deployment-branch-policies + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class DeploymentBranchPoliciesRequestBuilder : BaseRequestBuilder + { + /// Gets an item from the Ayllu.Github.Client.repos.item.item.environments.item.deploymentBranchPolicies.item collection + /// The unique identifier of the branch policy. + /// A + public global::Ayllu.Github.Client.Repos.Item.Item.Environments.Item.DeploymentBranchPolicies.Item.WithBranch_policy_ItemRequestBuilder this[int position] + { + get + { + var urlTplParams = new Dictionary(PathParameters); + urlTplParams.Add("branch_policy_id", position); + return new global::Ayllu.Github.Client.Repos.Item.Item.Environments.Item.DeploymentBranchPolicies.Item.WithBranch_policy_ItemRequestBuilder(urlTplParams, RequestAdapter); + } + } + /// Gets an item from the Ayllu.Github.Client.repos.item.item.environments.item.deploymentBranchPolicies.item collection + /// The unique identifier of the branch policy. + /// A + [Obsolete("This indexer is deprecated and will be removed in the next major version. Use the one with the typed parameter instead.")] + public global::Ayllu.Github.Client.Repos.Item.Item.Environments.Item.DeploymentBranchPolicies.Item.WithBranch_policy_ItemRequestBuilder this[string position] + { + get + { + var urlTplParams = new Dictionary(PathParameters); + if (!string.IsNullOrWhiteSpace(position)) urlTplParams.Add("branch_policy_id", position); + return new global::Ayllu.Github.Client.Repos.Item.Item.Environments.Item.DeploymentBranchPolicies.Item.WithBranch_policy_ItemRequestBuilder(urlTplParams, RequestAdapter); + } + } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public DeploymentBranchPoliciesRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/environments/{environment_name}/deployment-branch-policies{?page*,per_page*}", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public DeploymentBranchPoliciesRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/environments/{environment_name}/deployment-branch-policies{?page*,per_page*}", rawUrl) + { + } + /// + /// 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. + /// API method documentation + /// + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsDeploymentBranchPoliciesGetResponseAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task GetAsDeploymentBranchPoliciesGetResponseAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Repos.Item.Item.Environments.Item.DeploymentBranchPolicies.DeploymentBranchPoliciesGetResponse.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false); + } + /// + /// 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. + /// API method documentation + /// + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + [Obsolete("This method is obsolete. Use GetAsDeploymentBranchPoliciesGetResponseAsync instead.")] +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Repos.Item.Item.Environments.Item.DeploymentBranchPolicies.DeploymentBranchPoliciesResponse.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false); + } + /// + /// 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. + /// API method documentation + /// + /// A + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PostAsync(global::Ayllu.Github.Client.Models.DeploymentBranchPolicyNamePatternWithType body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task PostAsync(global::Ayllu.Github.Client.Models.DeploymentBranchPolicyNamePatternWithType body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPostRequestInformation(body, requestConfiguration); + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Models.DeploymentBranchPolicy.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false); + } + /// + /// 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. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// 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. + /// + /// A + /// The request body + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPostRequestInformation(global::Ayllu.Github.Client.Models.DeploymentBranchPolicyNamePatternWithType body, Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToPostRequestInformation(global::Ayllu.Github.Client.Models.DeploymentBranchPolicyNamePatternWithType body, Action> requestConfiguration = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.Repos.Item.Item.Environments.Item.DeploymentBranchPolicies.DeploymentBranchPoliciesRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Repos.Item.Item.Environments.Item.DeploymentBranchPolicies.DeploymentBranchPoliciesRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// 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. + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class DeploymentBranchPoliciesRequestBuilderGetQueryParameters + { + /// The page number of the results to fetch. For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." + [QueryParameter("page")] + public int? Page { get; set; } + /// The number of results per page (max 100). For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." + [QueryParameter("per_page")] + public int? PerPage { get; set; } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class DeploymentBranchPoliciesRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class DeploymentBranchPoliciesRequestBuilderPostRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Environments/Item/DeploymentBranchPolicies/DeploymentBranchPoliciesResponse.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Environments/Item/DeploymentBranchPolicies/DeploymentBranchPoliciesResponse.cs new file mode 100644 index 0000000..234e7cf --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Environments/Item/DeploymentBranchPolicies/DeploymentBranchPoliciesResponse.cs @@ -0,0 +1,28 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.Environments.Item.DeploymentBranchPolicies +{ + [Obsolete("This class is obsolete. Use DeploymentBranchPoliciesGetResponse instead.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class DeploymentBranchPoliciesResponse : global::Ayllu.Github.Client.Repos.Item.Item.Environments.Item.DeploymentBranchPolicies.DeploymentBranchPoliciesGetResponse, IParsable + #pragma warning restore CS1591 + { + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static new global::Ayllu.Github.Client.Repos.Item.Item.Environments.Item.DeploymentBranchPolicies.DeploymentBranchPoliciesResponse CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Repos.Item.Item.Environments.Item.DeploymentBranchPolicies.DeploymentBranchPoliciesResponse(); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Environments/Item/DeploymentBranchPolicies/Item/WithBranch_policy_ItemRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Environments/Item/DeploymentBranchPolicies/Item/WithBranch_policy_ItemRequestBuilder.cs new file mode 100644 index 0000000..b8af052 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Environments/Item/DeploymentBranchPolicies/Item/WithBranch_policy_ItemRequestBuilder.cs @@ -0,0 +1,188 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.Environments.Item.DeploymentBranchPolicies.Item +{ + /// + /// Builds and executes requests for operations under \repos\{owner-id}\{repo-id}\environments\{environment_name}\deployment-branch-policies\{branch_policy_id} + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithBranch_policy_ItemRequestBuilder : BaseRequestBuilder + { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public WithBranch_policy_ItemRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/environments/{environment_name}/deployment-branch-policies/{branch_policy_id}", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public WithBranch_policy_ItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/environments/{environment_name}/deployment-branch-policies/{branch_policy_id}", rawUrl) + { + } + /// + /// 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 + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task DeleteAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task DeleteAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToDeleteRequestInformation(requestConfiguration); + await RequestAdapter.SendNoContentAsync(requestInfo, default, cancellationToken).ConfigureAwait(false); + } + /// + /// 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. + /// API method documentation + /// + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Models.DeploymentBranchPolicy.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false); + } + /// + /// 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. + /// API method documentation + /// + /// A + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PutAsync(global::Ayllu.Github.Client.Models.DeploymentBranchPolicyNamePattern body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task PutAsync(global::Ayllu.Github.Client.Models.DeploymentBranchPolicyNamePattern body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPutRequestInformation(body, requestConfiguration); + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Models.DeploymentBranchPolicy.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false); + } + /// + /// 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. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToDeleteRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToDeleteRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.DELETE, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + return requestInfo; + } + /// + /// 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. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// 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. + /// + /// A + /// The request body + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPutRequestInformation(global::Ayllu.Github.Client.Models.DeploymentBranchPolicyNamePattern body, Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToPutRequestInformation(global::Ayllu.Github.Client.Models.DeploymentBranchPolicyNamePattern body, Action> requestConfiguration = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation(Method.PUT, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.Repos.Item.Item.Environments.Item.DeploymentBranchPolicies.Item.WithBranch_policy_ItemRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Repos.Item.Item.Environments.Item.DeploymentBranchPolicies.Item.WithBranch_policy_ItemRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithBranch_policy_ItemRequestBuilderDeleteRequestConfiguration : RequestConfiguration + { + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithBranch_policy_ItemRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithBranch_policy_ItemRequestBuilderPutRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Environments/Item/Deployment_protection_rules/Apps/AppsGetResponse.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Environments/Item/Deployment_protection_rules/Apps/AppsGetResponse.cs new file mode 100644 index 0000000..ba2a019 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Environments/Item/Deployment_protection_rules/Apps/AppsGetResponse.cs @@ -0,0 +1,70 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.Environments.Item.Deployment_protection_rules.Apps +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class AppsGetResponse : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The available_custom_deployment_protection_rule_integrations property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? AvailableCustomDeploymentProtectionRuleIntegrations { get; set; } +#nullable restore +#else + public List AvailableCustomDeploymentProtectionRuleIntegrations { get; set; } +#endif + /// The total number of custom deployment protection rule integrations available for this environment. + public int? TotalCount { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public AppsGetResponse() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Repos.Item.Item.Environments.Item.Deployment_protection_rules.Apps.AppsGetResponse CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Repos.Item.Item.Environments.Item.Deployment_protection_rules.Apps.AppsGetResponse(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "available_custom_deployment_protection_rule_integrations", n => { AvailableCustomDeploymentProtectionRuleIntegrations = n.GetCollectionOfObjectValues(global::Ayllu.Github.Client.Models.CustomDeploymentRuleApp.CreateFromDiscriminatorValue)?.AsList(); } }, + { "total_count", n => { TotalCount = n.GetIntValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteCollectionOfObjectValues("available_custom_deployment_protection_rule_integrations", AvailableCustomDeploymentProtectionRuleIntegrations); + writer.WriteIntValue("total_count", TotalCount); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Environments/Item/Deployment_protection_rules/Apps/AppsRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Environments/Item/Deployment_protection_rules/Apps/AppsRequestBuilder.cs new file mode 100644 index 0000000..7625314 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Environments/Item/Deployment_protection_rules/Apps/AppsRequestBuilder.cs @@ -0,0 +1,125 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.Environments.Item.Deployment_protection_rules.Apps +{ + /// + /// Builds and executes requests for operations under \repos\{owner-id}\{repo-id}\environments\{environment_name}\deployment_protection_rules\apps + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class AppsRequestBuilder : BaseRequestBuilder + { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public AppsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/environments/{environment_name}/deployment_protection_rules/apps{?page*,per_page*}", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public AppsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/environments/{environment_name}/deployment_protection_rules/apps{?page*,per_page*}", rawUrl) + { + } + /// + /// Gets all custom deployment protection rule integrations that are available for an environment.The authenticated user must have admin or owner permissions to the repository to use this endpoint.For more information about environments, see "[Using environments for deployment](https://docs.github.com/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/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. + /// API method documentation + /// + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsAppsGetResponseAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task GetAsAppsGetResponseAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Repos.Item.Item.Environments.Item.Deployment_protection_rules.Apps.AppsGetResponse.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false); + } + /// + /// Gets all custom deployment protection rule integrations that are available for an environment.The authenticated user must have admin or owner permissions to the repository to use this endpoint.For more information about environments, see "[Using environments for deployment](https://docs.github.com/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/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. + /// API method documentation + /// + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + [Obsolete("This method is obsolete. Use GetAsAppsGetResponseAsync instead.")] +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Repos.Item.Item.Environments.Item.Deployment_protection_rules.Apps.AppsResponse.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false); + } + /// + /// Gets all custom deployment protection rule integrations that are available for an environment.The authenticated user must have admin or owner permissions to the repository to use this endpoint.For more information about environments, see "[Using environments for deployment](https://docs.github.com/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/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. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.Repos.Item.Item.Environments.Item.Deployment_protection_rules.Apps.AppsRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Repos.Item.Item.Environments.Item.Deployment_protection_rules.Apps.AppsRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Gets all custom deployment protection rule integrations that are available for an environment.The authenticated user must have admin or owner permissions to the repository to use this endpoint.For more information about environments, see "[Using environments for deployment](https://docs.github.com/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/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. + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class AppsRequestBuilderGetQueryParameters + { + /// The page number of the results to fetch. For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." + [QueryParameter("page")] + public int? Page { get; set; } + /// The number of results per page (max 100). For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." + [QueryParameter("per_page")] + public int? PerPage { get; set; } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class AppsRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Environments/Item/Deployment_protection_rules/Apps/AppsResponse.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Environments/Item/Deployment_protection_rules/Apps/AppsResponse.cs new file mode 100644 index 0000000..4610f14 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Environments/Item/Deployment_protection_rules/Apps/AppsResponse.cs @@ -0,0 +1,28 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.Environments.Item.Deployment_protection_rules.Apps +{ + [Obsolete("This class is obsolete. Use AppsGetResponse instead.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class AppsResponse : global::Ayllu.Github.Client.Repos.Item.Item.Environments.Item.Deployment_protection_rules.Apps.AppsGetResponse, IParsable + #pragma warning restore CS1591 + { + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static new global::Ayllu.Github.Client.Repos.Item.Item.Environments.Item.Deployment_protection_rules.Apps.AppsResponse CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Repos.Item.Item.Environments.Item.Deployment_protection_rules.Apps.AppsResponse(); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Environments/Item/Deployment_protection_rules/Deployment_protection_rulesGetResponse.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Environments/Item/Deployment_protection_rules/Deployment_protection_rulesGetResponse.cs new file mode 100644 index 0000000..207250f --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Environments/Item/Deployment_protection_rules/Deployment_protection_rulesGetResponse.cs @@ -0,0 +1,70 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.Environments.Item.Deployment_protection_rules +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class Deployment_protection_rulesGetResponse : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The custom_deployment_protection_rules property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? CustomDeploymentProtectionRules { get; set; } +#nullable restore +#else + public List CustomDeploymentProtectionRules { get; set; } +#endif + /// The number of enabled custom deployment protection rules for this environment + public int? TotalCount { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public Deployment_protection_rulesGetResponse() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Repos.Item.Item.Environments.Item.Deployment_protection_rules.Deployment_protection_rulesGetResponse CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Repos.Item.Item.Environments.Item.Deployment_protection_rules.Deployment_protection_rulesGetResponse(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "custom_deployment_protection_rules", n => { CustomDeploymentProtectionRules = n.GetCollectionOfObjectValues(global::Ayllu.Github.Client.Models.DeploymentProtectionRule.CreateFromDiscriminatorValue)?.AsList(); } }, + { "total_count", n => { TotalCount = n.GetIntValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteCollectionOfObjectValues("custom_deployment_protection_rules", CustomDeploymentProtectionRules); + writer.WriteIntValue("total_count", TotalCount); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Environments/Item/Deployment_protection_rules/Deployment_protection_rulesPostRequestBody.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Environments/Item/Deployment_protection_rules/Deployment_protection_rulesPostRequestBody.cs new file mode 100644 index 0000000..ad86436 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Environments/Item/Deployment_protection_rules/Deployment_protection_rulesPostRequestBody.cs @@ -0,0 +1,59 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.Environments.Item.Deployment_protection_rules +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class Deployment_protection_rulesPostRequestBody : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The ID of the custom app that will be enabled on the environment. + public int? IntegrationId { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public Deployment_protection_rulesPostRequestBody() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Repos.Item.Item.Environments.Item.Deployment_protection_rules.Deployment_protection_rulesPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Repos.Item.Item.Environments.Item.Deployment_protection_rules.Deployment_protection_rulesPostRequestBody(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "integration_id", n => { IntegrationId = n.GetIntValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteIntValue("integration_id", IntegrationId); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Environments/Item/Deployment_protection_rules/Deployment_protection_rulesRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Environments/Item/Deployment_protection_rules/Deployment_protection_rulesRequestBuilder.cs new file mode 100644 index 0000000..fdd1abd --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Environments/Item/Deployment_protection_rules/Deployment_protection_rulesRequestBuilder.cs @@ -0,0 +1,196 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Ayllu.Github.Client.Repos.Item.Item.Environments.Item.Deployment_protection_rules.Apps; +using Ayllu.Github.Client.Repos.Item.Item.Environments.Item.Deployment_protection_rules.Item; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.Environments.Item.Deployment_protection_rules +{ + /// + /// Builds and executes requests for operations under \repos\{owner-id}\{repo-id}\environments\{environment_name}\deployment_protection_rules + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class Deployment_protection_rulesRequestBuilder : BaseRequestBuilder + { + /// The apps property + public global::Ayllu.Github.Client.Repos.Item.Item.Environments.Item.Deployment_protection_rules.Apps.AppsRequestBuilder Apps + { + get => new global::Ayllu.Github.Client.Repos.Item.Item.Environments.Item.Deployment_protection_rules.Apps.AppsRequestBuilder(PathParameters, RequestAdapter); + } + /// Gets an item from the Ayllu.Github.Client.repos.item.item.environments.item.deployment_protection_rules.item collection + /// The unique identifier of the protection rule. + /// A + public global::Ayllu.Github.Client.Repos.Item.Item.Environments.Item.Deployment_protection_rules.Item.WithProtection_rule_ItemRequestBuilder this[int position] + { + get + { + var urlTplParams = new Dictionary(PathParameters); + urlTplParams.Add("protection_rule_id", position); + return new global::Ayllu.Github.Client.Repos.Item.Item.Environments.Item.Deployment_protection_rules.Item.WithProtection_rule_ItemRequestBuilder(urlTplParams, RequestAdapter); + } + } + /// Gets an item from the Ayllu.Github.Client.repos.item.item.environments.item.deployment_protection_rules.item collection + /// The unique identifier of the protection rule. + /// A + [Obsolete("This indexer is deprecated and will be removed in the next major version. Use the one with the typed parameter instead.")] + public global::Ayllu.Github.Client.Repos.Item.Item.Environments.Item.Deployment_protection_rules.Item.WithProtection_rule_ItemRequestBuilder this[string position] + { + get + { + var urlTplParams = new Dictionary(PathParameters); + if (!string.IsNullOrWhiteSpace(position)) urlTplParams.Add("protection_rule_id", position); + return new global::Ayllu.Github.Client.Repos.Item.Item.Environments.Item.Deployment_protection_rules.Item.WithProtection_rule_ItemRequestBuilder(urlTplParams, RequestAdapter); + } + } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public Deployment_protection_rulesRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/environments/{environment_name}/deployment_protection_rules", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public Deployment_protection_rulesRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/environments/{environment_name}/deployment_protection_rules", rawUrl) + { + } + /// + /// 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/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/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. + /// API method documentation + /// + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsDeployment_protection_rulesGetResponseAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task GetAsDeployment_protection_rulesGetResponseAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Repos.Item.Item.Environments.Item.Deployment_protection_rules.Deployment_protection_rulesGetResponse.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false); + } + /// + /// 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/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/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. + /// API method documentation + /// + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + [Obsolete("This method is obsolete. Use GetAsDeployment_protection_rulesGetResponseAsync instead.")] +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Repos.Item.Item.Environments.Item.Deployment_protection_rules.Deployment_protection_rulesResponse.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false); + } + /// + /// 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/rest/apps/apps#get-an-app), as well as the [guide to creating custom deployment protection rules](https://docs.github.com/actions/managing-workflow-runs-and-deployments/managing-deployments/creating-custom-deployment-protection-rules).OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. + /// API method documentation + /// + /// A + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PostAsync(global::Ayllu.Github.Client.Repos.Item.Item.Environments.Item.Deployment_protection_rules.Deployment_protection_rulesPostRequestBody body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task PostAsync(global::Ayllu.Github.Client.Repos.Item.Item.Environments.Item.Deployment_protection_rules.Deployment_protection_rulesPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPostRequestInformation(body, requestConfiguration); + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Models.DeploymentProtectionRule.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false); + } + /// + /// 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/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/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. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// 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/rest/apps/apps#get-an-app), as well as the [guide to creating custom deployment protection rules](https://docs.github.com/actions/managing-workflow-runs-and-deployments/managing-deployments/creating-custom-deployment-protection-rules).OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. + /// + /// A + /// The request body + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPostRequestInformation(global::Ayllu.Github.Client.Repos.Item.Item.Environments.Item.Deployment_protection_rules.Deployment_protection_rulesPostRequestBody body, Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToPostRequestInformation(global::Ayllu.Github.Client.Repos.Item.Item.Environments.Item.Deployment_protection_rules.Deployment_protection_rulesPostRequestBody body, Action> requestConfiguration = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.Repos.Item.Item.Environments.Item.Deployment_protection_rules.Deployment_protection_rulesRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Repos.Item.Item.Environments.Item.Deployment_protection_rules.Deployment_protection_rulesRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class Deployment_protection_rulesRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class Deployment_protection_rulesRequestBuilderPostRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Environments/Item/Deployment_protection_rules/Deployment_protection_rulesResponse.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Environments/Item/Deployment_protection_rules/Deployment_protection_rulesResponse.cs new file mode 100644 index 0000000..13273a3 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Environments/Item/Deployment_protection_rules/Deployment_protection_rulesResponse.cs @@ -0,0 +1,28 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.Environments.Item.Deployment_protection_rules +{ + [Obsolete("This class is obsolete. Use Deployment_protection_rulesGetResponse instead.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class Deployment_protection_rulesResponse : global::Ayllu.Github.Client.Repos.Item.Item.Environments.Item.Deployment_protection_rules.Deployment_protection_rulesGetResponse, IParsable + #pragma warning restore CS1591 + { + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static new global::Ayllu.Github.Client.Repos.Item.Item.Environments.Item.Deployment_protection_rules.Deployment_protection_rulesResponse CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Repos.Item.Item.Environments.Item.Deployment_protection_rules.Deployment_protection_rulesResponse(); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Environments/Item/Deployment_protection_rules/Item/WithProtection_rule_ItemRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Environments/Item/Deployment_protection_rules/Item/WithProtection_rule_ItemRequestBuilder.cs new file mode 100644 index 0000000..0f195b9 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Environments/Item/Deployment_protection_rules/Item/WithProtection_rule_ItemRequestBuilder.cs @@ -0,0 +1,137 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.Environments.Item.Deployment_protection_rules.Item +{ + /// + /// Builds and executes requests for operations under \repos\{owner-id}\{repo-id}\environments\{environment_name}\deployment_protection_rules\{protection_rule_id} + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithProtection_rule_ItemRequestBuilder : BaseRequestBuilder + { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public WithProtection_rule_ItemRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/environments/{environment_name}/deployment_protection_rules/{protection_rule_id}", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public WithProtection_rule_ItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/environments/{environment_name}/deployment_protection_rules/{protection_rule_id}", rawUrl) + { + } + /// + /// 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 + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task DeleteAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task DeleteAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToDeleteRequestInformation(requestConfiguration); + await RequestAdapter.SendNoContentAsync(requestInfo, default, cancellationToken).ConfigureAwait(false); + } + /// + /// 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/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/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. + /// API method documentation + /// + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Models.DeploymentProtectionRule.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false); + } + /// + /// 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. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToDeleteRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToDeleteRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.DELETE, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + return requestInfo; + } + /// + /// 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/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/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. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.Repos.Item.Item.Environments.Item.Deployment_protection_rules.Item.WithProtection_rule_ItemRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Repos.Item.Item.Environments.Item.Deployment_protection_rules.Item.WithProtection_rule_ItemRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithProtection_rule_ItemRequestBuilderDeleteRequestConfiguration : RequestConfiguration + { + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithProtection_rule_ItemRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Environments/Item/Secrets/Item/WithSecret_nameItemRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Environments/Item/Secrets/Item/WithSecret_nameItemRequestBuilder.cs new file mode 100644 index 0000000..88c0286 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Environments/Item/Secrets/Item/WithSecret_nameItemRequestBuilder.cs @@ -0,0 +1,188 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.Environments.Item.Secrets.Item +{ + /// + /// Builds and executes requests for operations under \repos\{owner-id}\{repo-id}\environments\{environment_name}\secrets\{secret_name} + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithSecret_nameItemRequestBuilder : BaseRequestBuilder + { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public WithSecret_nameItemRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/environments/{environment_name}/secrets/{secret_name}", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public WithSecret_nameItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/environments/{environment_name}/secrets/{secret_name}", rawUrl) + { + } + /// + /// 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 + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task DeleteAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task DeleteAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToDeleteRequestInformation(requestConfiguration); + await RequestAdapter.SendNoContentAsync(requestInfo, default, cancellationToken).ConfigureAwait(false); + } + /// + /// 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. + /// API method documentation + /// + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Models.ActionsSecret.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false); + } + /// + /// 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/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. + /// API method documentation + /// + /// A + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PutAsync(global::Ayllu.Github.Client.Repos.Item.Item.Environments.Item.Secrets.Item.WithSecret_namePutRequestBody body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task PutAsync(global::Ayllu.Github.Client.Repos.Item.Item.Environments.Item.Secrets.Item.WithSecret_namePutRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPutRequestInformation(body, requestConfiguration); + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Models.EmptyObject.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false); + } + /// + /// 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. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToDeleteRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToDeleteRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.DELETE, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + return requestInfo; + } + /// + /// 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. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// 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/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. + /// + /// A + /// The request body + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPutRequestInformation(global::Ayllu.Github.Client.Repos.Item.Item.Environments.Item.Secrets.Item.WithSecret_namePutRequestBody body, Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToPutRequestInformation(global::Ayllu.Github.Client.Repos.Item.Item.Environments.Item.Secrets.Item.WithSecret_namePutRequestBody body, Action> requestConfiguration = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation(Method.PUT, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.Repos.Item.Item.Environments.Item.Secrets.Item.WithSecret_nameItemRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Repos.Item.Item.Environments.Item.Secrets.Item.WithSecret_nameItemRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithSecret_nameItemRequestBuilderDeleteRequestConfiguration : RequestConfiguration + { + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithSecret_nameItemRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithSecret_nameItemRequestBuilderPutRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Environments/Item/Secrets/Item/WithSecret_namePutRequestBody.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Environments/Item/Secrets/Item/WithSecret_namePutRequestBody.cs new file mode 100644 index 0000000..f307376 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Environments/Item/Secrets/Item/WithSecret_namePutRequestBody.cs @@ -0,0 +1,75 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.Environments.Item.Secrets.Item +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class WithSecret_namePutRequestBody : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// 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/rest/actions/secrets#get-an-environment-public-key) endpoint. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? EncryptedValue { get; set; } +#nullable restore +#else + public string EncryptedValue { get; set; } +#endif + /// ID of the key you used to encrypt the secret. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? KeyId { get; set; } +#nullable restore +#else + public string KeyId { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public WithSecret_namePutRequestBody() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Repos.Item.Item.Environments.Item.Secrets.Item.WithSecret_namePutRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Repos.Item.Item.Environments.Item.Secrets.Item.WithSecret_namePutRequestBody(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "encrypted_value", n => { EncryptedValue = n.GetStringValue(); } }, + { "key_id", n => { KeyId = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("encrypted_value", EncryptedValue); + writer.WriteStringValue("key_id", KeyId); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Environments/Item/Secrets/PublicKey/PublicKeyRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Environments/Item/Secrets/PublicKey/PublicKeyRequestBuilder.cs new file mode 100644 index 0000000..26d15d1 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Environments/Item/Secrets/PublicKey/PublicKeyRequestBuilder.cs @@ -0,0 +1,93 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.Environments.Item.Secrets.PublicKey +{ + /// + /// Builds and executes requests for operations under \repos\{owner-id}\{repo-id}\environments\{environment_name}\secrets\public-key + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class PublicKeyRequestBuilder : BaseRequestBuilder + { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public PublicKeyRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/environments/{environment_name}/secrets/public-key", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public PublicKeyRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/environments/{environment_name}/secrets/public-key", rawUrl) + { + } + /// + /// 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. + /// API method documentation + /// + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Models.ActionsPublicKey.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false); + } + /// + /// 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. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.Repos.Item.Item.Environments.Item.Secrets.PublicKey.PublicKeyRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Repos.Item.Item.Environments.Item.Secrets.PublicKey.PublicKeyRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class PublicKeyRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Environments/Item/Secrets/SecretsGetResponse.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Environments/Item/Secrets/SecretsGetResponse.cs new file mode 100644 index 0000000..941d050 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Environments/Item/Secrets/SecretsGetResponse.cs @@ -0,0 +1,70 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.Environments.Item.Secrets +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class SecretsGetResponse : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The secrets property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? Secrets { get; set; } +#nullable restore +#else + public List Secrets { get; set; } +#endif + /// The total_count property + public int? TotalCount { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public SecretsGetResponse() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Repos.Item.Item.Environments.Item.Secrets.SecretsGetResponse CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Repos.Item.Item.Environments.Item.Secrets.SecretsGetResponse(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "secrets", n => { Secrets = n.GetCollectionOfObjectValues(global::Ayllu.Github.Client.Models.ActionsSecret.CreateFromDiscriminatorValue)?.AsList(); } }, + { "total_count", n => { TotalCount = n.GetIntValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteCollectionOfObjectValues("secrets", Secrets); + writer.WriteIntValue("total_count", TotalCount); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Environments/Item/Secrets/SecretsRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Environments/Item/Secrets/SecretsRequestBuilder.cs new file mode 100644 index 0000000..73ded03 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Environments/Item/Secrets/SecretsRequestBuilder.cs @@ -0,0 +1,144 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Repos.Item.Item.Environments.Item.Secrets.Item; +using Ayllu.Github.Client.Repos.Item.Item.Environments.Item.Secrets.PublicKey; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.Environments.Item.Secrets +{ + /// + /// Builds and executes requests for operations under \repos\{owner-id}\{repo-id}\environments\{environment_name}\secrets + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class SecretsRequestBuilder : BaseRequestBuilder + { + /// The publicKey property + public global::Ayllu.Github.Client.Repos.Item.Item.Environments.Item.Secrets.PublicKey.PublicKeyRequestBuilder PublicKey + { + get => new global::Ayllu.Github.Client.Repos.Item.Item.Environments.Item.Secrets.PublicKey.PublicKeyRequestBuilder(PathParameters, RequestAdapter); + } + /// Gets an item from the Ayllu.Github.Client.repos.item.item.environments.item.secrets.item collection + /// The name of the secret. + /// A + public global::Ayllu.Github.Client.Repos.Item.Item.Environments.Item.Secrets.Item.WithSecret_nameItemRequestBuilder this[string position] + { + get + { + var urlTplParams = new Dictionary(PathParameters); + urlTplParams.Add("secret_name", position); + return new global::Ayllu.Github.Client.Repos.Item.Item.Environments.Item.Secrets.Item.WithSecret_nameItemRequestBuilder(urlTplParams, RequestAdapter); + } + } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public SecretsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/environments/{environment_name}/secrets{?page*,per_page*}", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public SecretsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/environments/{environment_name}/secrets{?page*,per_page*}", rawUrl) + { + } + /// + /// 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. + /// API method documentation + /// + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsSecretsGetResponseAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task GetAsSecretsGetResponseAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Repos.Item.Item.Environments.Item.Secrets.SecretsGetResponse.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false); + } + /// + /// 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. + /// API method documentation + /// + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + [Obsolete("This method is obsolete. Use GetAsSecretsGetResponseAsync instead.")] +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Repos.Item.Item.Environments.Item.Secrets.SecretsResponse.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false); + } + /// + /// 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. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.Repos.Item.Item.Environments.Item.Secrets.SecretsRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Repos.Item.Item.Environments.Item.Secrets.SecretsRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// 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. + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class SecretsRequestBuilderGetQueryParameters + { + /// The page number of the results to fetch. For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." + [QueryParameter("page")] + public int? Page { get; set; } + /// The number of results per page (max 100). For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." + [QueryParameter("per_page")] + public int? PerPage { get; set; } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class SecretsRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Environments/Item/Secrets/SecretsResponse.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Environments/Item/Secrets/SecretsResponse.cs new file mode 100644 index 0000000..acf49a9 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Environments/Item/Secrets/SecretsResponse.cs @@ -0,0 +1,28 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.Environments.Item.Secrets +{ + [Obsolete("This class is obsolete. Use SecretsGetResponse instead.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class SecretsResponse : global::Ayllu.Github.Client.Repos.Item.Item.Environments.Item.Secrets.SecretsGetResponse, IParsable + #pragma warning restore CS1591 + { + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static new global::Ayllu.Github.Client.Repos.Item.Item.Environments.Item.Secrets.SecretsResponse CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Repos.Item.Item.Environments.Item.Secrets.SecretsResponse(); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Environments/Item/Variables/Item/WithNameItemRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Environments/Item/Variables/Item/WithNameItemRequestBuilder.cs new file mode 100644 index 0000000..aaacd12 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Environments/Item/Variables/Item/WithNameItemRequestBuilder.cs @@ -0,0 +1,186 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.Environments.Item.Variables.Item +{ + /// + /// Builds and executes requests for operations under \repos\{owner-id}\{repo-id}\environments\{environment_name}\variables\{name} + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithNameItemRequestBuilder : BaseRequestBuilder + { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public WithNameItemRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/environments/{environment_name}/variables/{name}", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public WithNameItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/environments/{environment_name}/variables/{name}", rawUrl) + { + } + /// + /// 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 + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task DeleteAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task DeleteAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToDeleteRequestInformation(requestConfiguration); + await RequestAdapter.SendNoContentAsync(requestInfo, default, cancellationToken).ConfigureAwait(false); + } + /// + /// 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. + /// API method documentation + /// + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Models.ActionsVariable.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false); + } + /// + /// 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 + /// + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PatchAsync(global::Ayllu.Github.Client.Repos.Item.Item.Environments.Item.Variables.Item.WithNamePatchRequestBody body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task PatchAsync(global::Ayllu.Github.Client.Repos.Item.Item.Environments.Item.Variables.Item.WithNamePatchRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPatchRequestInformation(body, requestConfiguration); + await RequestAdapter.SendNoContentAsync(requestInfo, default, cancellationToken).ConfigureAwait(false); + } + /// + /// 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. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToDeleteRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToDeleteRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.DELETE, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + return requestInfo; + } + /// + /// 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. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// 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. + /// + /// A + /// The request body + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPatchRequestInformation(global::Ayllu.Github.Client.Repos.Item.Item.Environments.Item.Variables.Item.WithNamePatchRequestBody body, Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToPatchRequestInformation(global::Ayllu.Github.Client.Repos.Item.Item.Environments.Item.Variables.Item.WithNamePatchRequestBody body, Action> requestConfiguration = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.Repos.Item.Item.Environments.Item.Variables.Item.WithNameItemRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Repos.Item.Item.Environments.Item.Variables.Item.WithNameItemRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithNameItemRequestBuilderDeleteRequestConfiguration : RequestConfiguration + { + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithNameItemRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithNameItemRequestBuilderPatchRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Environments/Item/Variables/Item/WithNamePatchRequestBody.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Environments/Item/Variables/Item/WithNamePatchRequestBody.cs new file mode 100644 index 0000000..3abe89b --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Environments/Item/Variables/Item/WithNamePatchRequestBody.cs @@ -0,0 +1,75 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.Environments.Item.Variables.Item +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class WithNamePatchRequestBody : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The name of the variable. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Name { get; set; } +#nullable restore +#else + public string Name { get; set; } +#endif + /// The value of the variable. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Value { get; set; } +#nullable restore +#else + public string Value { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public WithNamePatchRequestBody() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Repos.Item.Item.Environments.Item.Variables.Item.WithNamePatchRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Repos.Item.Item.Environments.Item.Variables.Item.WithNamePatchRequestBody(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "name", n => { Name = n.GetStringValue(); } }, + { "value", n => { Value = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("name", Name); + writer.WriteStringValue("value", Value); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Environments/Item/Variables/VariablesGetResponse.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Environments/Item/Variables/VariablesGetResponse.cs new file mode 100644 index 0000000..f79141a --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Environments/Item/Variables/VariablesGetResponse.cs @@ -0,0 +1,70 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.Environments.Item.Variables +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class VariablesGetResponse : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The total_count property + public int? TotalCount { get; set; } + /// The variables property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? Variables { get; set; } +#nullable restore +#else + public List Variables { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public VariablesGetResponse() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Repos.Item.Item.Environments.Item.Variables.VariablesGetResponse CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Repos.Item.Item.Environments.Item.Variables.VariablesGetResponse(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "total_count", n => { TotalCount = n.GetIntValue(); } }, + { "variables", n => { Variables = n.GetCollectionOfObjectValues(global::Ayllu.Github.Client.Models.ActionsVariable.CreateFromDiscriminatorValue)?.AsList(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteIntValue("total_count", TotalCount); + writer.WriteCollectionOfObjectValues("variables", Variables); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Environments/Item/Variables/VariablesPostRequestBody.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Environments/Item/Variables/VariablesPostRequestBody.cs new file mode 100644 index 0000000..35fdf41 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Environments/Item/Variables/VariablesPostRequestBody.cs @@ -0,0 +1,75 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.Environments.Item.Variables +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class VariablesPostRequestBody : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The name of the variable. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Name { get; set; } +#nullable restore +#else + public string Name { get; set; } +#endif + /// The value of the variable. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Value { get; set; } +#nullable restore +#else + public string Value { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public VariablesPostRequestBody() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Repos.Item.Item.Environments.Item.Variables.VariablesPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Repos.Item.Item.Environments.Item.Variables.VariablesPostRequestBody(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "name", n => { Name = n.GetStringValue(); } }, + { "value", n => { Value = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("name", Name); + writer.WriteStringValue("value", Value); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Environments/Item/Variables/VariablesRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Environments/Item/Variables/VariablesRequestBuilder.cs new file mode 100644 index 0000000..b18cd12 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Environments/Item/Variables/VariablesRequestBuilder.cs @@ -0,0 +1,190 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Ayllu.Github.Client.Repos.Item.Item.Environments.Item.Variables.Item; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.Environments.Item.Variables +{ + /// + /// Builds and executes requests for operations under \repos\{owner-id}\{repo-id}\environments\{environment_name}\variables + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class VariablesRequestBuilder : BaseRequestBuilder + { + /// Gets an item from the Ayllu.Github.Client.repos.item.item.environments.item.variables.item collection + /// The name of the variable. + /// A + public global::Ayllu.Github.Client.Repos.Item.Item.Environments.Item.Variables.Item.WithNameItemRequestBuilder this[string position] + { + get + { + var urlTplParams = new Dictionary(PathParameters); + urlTplParams.Add("name", position); + return new global::Ayllu.Github.Client.Repos.Item.Item.Environments.Item.Variables.Item.WithNameItemRequestBuilder(urlTplParams, RequestAdapter); + } + } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public VariablesRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/environments/{environment_name}/variables{?page*,per_page*}", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public VariablesRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/environments/{environment_name}/variables{?page*,per_page*}", rawUrl) + { + } + /// + /// 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. + /// API method documentation + /// + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsVariablesGetResponseAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task GetAsVariablesGetResponseAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Repos.Item.Item.Environments.Item.Variables.VariablesGetResponse.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false); + } + /// + /// 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. + /// API method documentation + /// + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + [Obsolete("This method is obsolete. Use GetAsVariablesGetResponseAsync instead.")] +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Repos.Item.Item.Environments.Item.Variables.VariablesResponse.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false); + } + /// + /// 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. + /// API method documentation + /// + /// A + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PostAsync(global::Ayllu.Github.Client.Repos.Item.Item.Environments.Item.Variables.VariablesPostRequestBody body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task PostAsync(global::Ayllu.Github.Client.Repos.Item.Item.Environments.Item.Variables.VariablesPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPostRequestInformation(body, requestConfiguration); + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Models.EmptyObject.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false); + } + /// + /// 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. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// 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. + /// + /// A + /// The request body + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPostRequestInformation(global::Ayllu.Github.Client.Repos.Item.Item.Environments.Item.Variables.VariablesPostRequestBody body, Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToPostRequestInformation(global::Ayllu.Github.Client.Repos.Item.Item.Environments.Item.Variables.VariablesPostRequestBody body, Action> requestConfiguration = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.Repos.Item.Item.Environments.Item.Variables.VariablesRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Repos.Item.Item.Environments.Item.Variables.VariablesRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// 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. + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class VariablesRequestBuilderGetQueryParameters + { + /// The page number of the results to fetch. For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." + [QueryParameter("page")] + public int? Page { get; set; } + /// The number of results per page (max 30). For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." + [QueryParameter("per_page")] + public int? PerPage { get; set; } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class VariablesRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class VariablesRequestBuilderPostRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Environments/Item/Variables/VariablesResponse.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Environments/Item/Variables/VariablesResponse.cs new file mode 100644 index 0000000..f59c402 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Environments/Item/Variables/VariablesResponse.cs @@ -0,0 +1,28 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.Environments.Item.Variables +{ + [Obsolete("This class is obsolete. Use VariablesGetResponse instead.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class VariablesResponse : global::Ayllu.Github.Client.Repos.Item.Item.Environments.Item.Variables.VariablesGetResponse, IParsable + #pragma warning restore CS1591 + { + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static new global::Ayllu.Github.Client.Repos.Item.Item.Environments.Item.Variables.VariablesResponse CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Repos.Item.Item.Environments.Item.Variables.VariablesResponse(); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Environments/Item/WithEnvironment_nameItemRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Environments/Item/WithEnvironment_nameItemRequestBuilder.cs new file mode 100644 index 0000000..50fcc8c --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Environments/Item/WithEnvironment_nameItemRequestBuilder.cs @@ -0,0 +1,217 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Ayllu.Github.Client.Repos.Item.Item.Environments.Item.DeploymentBranchPolicies; +using Ayllu.Github.Client.Repos.Item.Item.Environments.Item.Deployment_protection_rules; +using Ayllu.Github.Client.Repos.Item.Item.Environments.Item.Secrets; +using Ayllu.Github.Client.Repos.Item.Item.Environments.Item.Variables; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.Environments.Item +{ + /// + /// Builds and executes requests for operations under \repos\{owner-id}\{repo-id}\environments\{environment_name} + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithEnvironment_nameItemRequestBuilder : BaseRequestBuilder + { + /// The deployment_protection_rules property + public global::Ayllu.Github.Client.Repos.Item.Item.Environments.Item.Deployment_protection_rules.Deployment_protection_rulesRequestBuilder Deployment_protection_rules + { + get => new global::Ayllu.Github.Client.Repos.Item.Item.Environments.Item.Deployment_protection_rules.Deployment_protection_rulesRequestBuilder(PathParameters, RequestAdapter); + } + /// The deploymentBranchPolicies property + public global::Ayllu.Github.Client.Repos.Item.Item.Environments.Item.DeploymentBranchPolicies.DeploymentBranchPoliciesRequestBuilder DeploymentBranchPolicies + { + get => new global::Ayllu.Github.Client.Repos.Item.Item.Environments.Item.DeploymentBranchPolicies.DeploymentBranchPoliciesRequestBuilder(PathParameters, RequestAdapter); + } + /// The secrets property + public global::Ayllu.Github.Client.Repos.Item.Item.Environments.Item.Secrets.SecretsRequestBuilder Secrets + { + get => new global::Ayllu.Github.Client.Repos.Item.Item.Environments.Item.Secrets.SecretsRequestBuilder(PathParameters, RequestAdapter); + } + /// The variables property + public global::Ayllu.Github.Client.Repos.Item.Item.Environments.Item.Variables.VariablesRequestBuilder Variables + { + get => new global::Ayllu.Github.Client.Repos.Item.Item.Environments.Item.Variables.VariablesRequestBuilder(PathParameters, RequestAdapter); + } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public WithEnvironment_nameItemRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/environments/{environment_name}", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public WithEnvironment_nameItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/environments/{environment_name}", rawUrl) + { + } + /// + /// OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. + /// API method documentation + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task DeleteAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task DeleteAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToDeleteRequestInformation(requestConfiguration); + await RequestAdapter.SendNoContentAsync(requestInfo, default, cancellationToken).ConfigureAwait(false); + } + /// + /// > [!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. + /// API method documentation + /// + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Models.EnvironmentObject.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false); + } + /// + /// 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. + /// API method documentation + /// + /// A + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 422 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PutAsync(global::Ayllu.Github.Client.Repos.Item.Item.Environments.Item.WithEnvironment_namePutRequestBody body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task PutAsync(global::Ayllu.Github.Client.Repos.Item.Item.Environments.Item.WithEnvironment_namePutRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPutRequestInformation(body, requestConfiguration); + var errorMapping = new Dictionary> + { + { "422", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Models.EnvironmentObject.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToDeleteRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToDeleteRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.DELETE, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + return requestInfo; + } + /// + /// > [!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. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// 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. + /// + /// A + /// The request body + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPutRequestInformation(global::Ayllu.Github.Client.Repos.Item.Item.Environments.Item.WithEnvironment_namePutRequestBody body, Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToPutRequestInformation(global::Ayllu.Github.Client.Repos.Item.Item.Environments.Item.WithEnvironment_namePutRequestBody body, Action> requestConfiguration = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation(Method.PUT, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.Repos.Item.Item.Environments.Item.WithEnvironment_nameItemRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Repos.Item.Item.Environments.Item.WithEnvironment_nameItemRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithEnvironment_nameItemRequestBuilderDeleteRequestConfiguration : RequestConfiguration + { + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithEnvironment_nameItemRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithEnvironment_nameItemRequestBuilderPutRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Environments/Item/WithEnvironment_namePutRequestBody.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Environments/Item/WithEnvironment_namePutRequestBody.cs new file mode 100644 index 0000000..8fbb985 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Environments/Item/WithEnvironment_namePutRequestBody.cs @@ -0,0 +1,74 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.Environments.Item +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class WithEnvironment_namePutRequestBody : IParsable + #pragma warning restore CS1591 + { + /// The type of deployment branch policy for this environment. To allow all branches to deploy, set to `null`. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.DeploymentBranchPolicySettings? DeploymentBranchPolicy { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.DeploymentBranchPolicySettings DeploymentBranchPolicy { get; set; } +#endif + /// Whether or not a user who created the job is prevented from approving their own job. + public bool? PreventSelfReview { get; set; } + /// 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. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? Reviewers { get; set; } +#nullable restore +#else + public List Reviewers { get; set; } +#endif + /// 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). + public int? WaitTimer { get; set; } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Repos.Item.Item.Environments.Item.WithEnvironment_namePutRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Repos.Item.Item.Environments.Item.WithEnvironment_namePutRequestBody(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "deployment_branch_policy", n => { DeploymentBranchPolicy = n.GetObjectValue(global::Ayllu.Github.Client.Models.DeploymentBranchPolicySettings.CreateFromDiscriminatorValue); } }, + { "prevent_self_review", n => { PreventSelfReview = n.GetBoolValue(); } }, + { "reviewers", n => { Reviewers = n.GetCollectionOfObjectValues(global::Ayllu.Github.Client.Repos.Item.Item.Environments.Item.WithEnvironment_namePutRequestBody_reviewers.CreateFromDiscriminatorValue)?.AsList(); } }, + { "wait_timer", n => { WaitTimer = n.GetIntValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteObjectValue("deployment_branch_policy", DeploymentBranchPolicy); + writer.WriteBoolValue("prevent_self_review", PreventSelfReview); + writer.WriteCollectionOfObjectValues("reviewers", Reviewers); + writer.WriteIntValue("wait_timer", WaitTimer); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Environments/Item/WithEnvironment_namePutRequestBody_reviewers.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Environments/Item/WithEnvironment_namePutRequestBody_reviewers.cs new file mode 100644 index 0000000..4110e31 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Environments/Item/WithEnvironment_namePutRequestBody_reviewers.cs @@ -0,0 +1,64 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.Environments.Item +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class WithEnvironment_namePutRequestBody_reviewers : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The id of the user or team who can review the deployment + public int? Id { get; set; } + /// The type of reviewer. + public global::Ayllu.Github.Client.Models.DeploymentReviewerType? Type { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public WithEnvironment_namePutRequestBody_reviewers() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Repos.Item.Item.Environments.Item.WithEnvironment_namePutRequestBody_reviewers CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Repos.Item.Item.Environments.Item.WithEnvironment_namePutRequestBody_reviewers(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "id", n => { Id = n.GetIntValue(); } }, + { "type", n => { Type = n.GetEnumValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteIntValue("id", Id); + writer.WriteEnumValue("type", Type); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Events/EventsRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Events/EventsRequestBuilder.cs new file mode 100644 index 0000000..b99e4b4 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Events/EventsRequestBuilder.cs @@ -0,0 +1,107 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.Events +{ + /// + /// Builds and executes requests for operations under \repos\{owner-id}\{repo-id}\events + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class EventsRequestBuilder : BaseRequestBuilder + { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public EventsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/events{?page*,per_page*}", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public EventsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/events{?page*,per_page*}", rawUrl) + { + } + /// + /// > [!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. + /// API method documentation + /// + /// A List<global::Ayllu.Github.Client.Models.Event> + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task?> GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task> GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var collectionResult = await RequestAdapter.SendCollectionAsync(requestInfo, global::Ayllu.Github.Client.Models.Event.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false); + return collectionResult?.AsList(); + } + /// + /// > [!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. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.Repos.Item.Item.Events.EventsRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Repos.Item.Item.Events.EventsRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// > [!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. + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class EventsRequestBuilderGetQueryParameters + { + /// The page number of the results to fetch. For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." + [QueryParameter("page")] + public int? Page { get; set; } + /// The number of results per page (max 100). For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." + [QueryParameter("per_page")] + public int? PerPage { get; set; } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class EventsRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Forks/ForksPostRequestBody.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Forks/ForksPostRequestBody.cs new file mode 100644 index 0000000..d685938 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Forks/ForksPostRequestBody.cs @@ -0,0 +1,79 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.Forks +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class ForksPostRequestBody : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// When forking from an existing repository, fork with only the default branch. + public bool? DefaultBranchOnly { get; set; } + /// When forking from an existing repository, a new name for the fork. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Name { get; set; } +#nullable restore +#else + public string Name { get; set; } +#endif + /// Optional parameter to specify the organization name if forking into an organization. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Organization { get; set; } +#nullable restore +#else + public string Organization { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public ForksPostRequestBody() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Repos.Item.Item.Forks.ForksPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Repos.Item.Item.Forks.ForksPostRequestBody(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "default_branch_only", n => { DefaultBranchOnly = n.GetBoolValue(); } }, + { "name", n => { Name = n.GetStringValue(); } }, + { "organization", n => { Organization = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteBoolValue("default_branch_only", DefaultBranchOnly); + writer.WriteStringValue("name", Name); + writer.WriteStringValue("organization", Organization); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Forks/ForksRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Forks/ForksRequestBuilder.cs new file mode 100644 index 0000000..b479e27 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Forks/ForksRequestBuilder.cs @@ -0,0 +1,185 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.Forks +{ + /// + /// Builds and executes requests for operations under \repos\{owner-id}\{repo-id}\forks + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class ForksRequestBuilder : BaseRequestBuilder + { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public ForksRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/forks{?page*,per_page*,sort*}", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public ForksRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/forks{?page*,per_page*,sort*}", rawUrl) + { + } + /// + /// List forks + /// API method documentation + /// + /// A List<global::Ayllu.Github.Client.Models.MinimalRepository> + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 400 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task?> GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task> GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "400", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + }; + var collectionResult = await RequestAdapter.SendCollectionAsync(requestInfo, global::Ayllu.Github.Client.Models.MinimalRepository.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + return collectionResult?.AsList(); + } + /// + /// 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 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. + /// API method documentation + /// + /// A + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 400 status code + /// When receiving a 403 status code + /// When receiving a 404 status code + /// When receiving a 422 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PostAsync(global::Ayllu.Github.Client.Repos.Item.Item.Forks.ForksPostRequestBody body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task PostAsync(global::Ayllu.Github.Client.Repos.Item.Item.Forks.ForksPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPostRequestInformation(body, requestConfiguration); + var errorMapping = new Dictionary> + { + { "400", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "403", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "404", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "422", global::Ayllu.Github.Client.Models.ValidationError.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Models.FullRepository.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// 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 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. + /// + /// A + /// The request body + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPostRequestInformation(global::Ayllu.Github.Client.Repos.Item.Item.Forks.ForksPostRequestBody body, Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToPostRequestInformation(global::Ayllu.Github.Client.Repos.Item.Item.Forks.ForksPostRequestBody body, Action> requestConfiguration = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.Repos.Item.Item.Forks.ForksRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Repos.Item.Item.Forks.ForksRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// List forks + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class ForksRequestBuilderGetQueryParameters + { + /// The page number of the results to fetch. For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." + [QueryParameter("page")] + public int? Page { get; set; } + /// The number of results per page (max 100). For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." + [QueryParameter("per_page")] + public int? PerPage { get; set; } + /// The sort order. `stargazers` will sort by star count. + [Obsolete("This property is deprecated, use SortAsGetSortQueryParameterType instead")] +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("sort")] + public string? Sort { get; set; } +#nullable restore +#else + [QueryParameter("sort")] + public string Sort { get; set; } +#endif + /// The sort order. `stargazers` will sort by star count. + [QueryParameter("sort")] + public global::Ayllu.Github.Client.Repos.Item.Item.Forks.GetSortQueryParameterType? SortAsGetSortQueryParameterType { get; set; } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class ForksRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class ForksRequestBuilderPostRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Forks/GetSortQueryParameterType.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Forks/GetSortQueryParameterType.cs new file mode 100644 index 0000000..aa88eaa --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Forks/GetSortQueryParameterType.cs @@ -0,0 +1,28 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.Forks +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public enum GetSortQueryParameterType + #pragma warning restore CS1591 + { + [EnumMember(Value = "newest")] + #pragma warning disable CS1591 + Newest, + #pragma warning restore CS1591 + [EnumMember(Value = "oldest")] + #pragma warning disable CS1591 + Oldest, + #pragma warning restore CS1591 + [EnumMember(Value = "stargazers")] + #pragma warning disable CS1591 + Stargazers, + #pragma warning restore CS1591 + [EnumMember(Value = "watchers")] + #pragma warning disable CS1591 + Watchers, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Generate/GeneratePostRequestBody.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Generate/GeneratePostRequestBody.cs new file mode 100644 index 0000000..b50f1e9 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Generate/GeneratePostRequestBody.cs @@ -0,0 +1,93 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.Generate +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class GeneratePostRequestBody : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// A short description of the new repository. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Description { get; set; } +#nullable restore +#else + public string Description { get; set; } +#endif + /// 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`. + public bool? IncludeAllBranches { get; set; } + /// The name of the new repository. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Name { get; set; } +#nullable restore +#else + public string Name { get; set; } +#endif + /// 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. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Owner { get; set; } +#nullable restore +#else + public string Owner { get; set; } +#endif + /// Either `true` to create a new private repository or `false` to create a new public one. + public bool? Private { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public GeneratePostRequestBody() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Repos.Item.Item.Generate.GeneratePostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Repos.Item.Item.Generate.GeneratePostRequestBody(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "description", n => { Description = n.GetStringValue(); } }, + { "include_all_branches", n => { IncludeAllBranches = n.GetBoolValue(); } }, + { "name", n => { Name = n.GetStringValue(); } }, + { "owner", n => { Owner = n.GetStringValue(); } }, + { "private", n => { Private = n.GetBoolValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("description", Description); + writer.WriteBoolValue("include_all_branches", IncludeAllBranches); + writer.WriteStringValue("name", Name); + writer.WriteStringValue("owner", Owner); + writer.WriteBoolValue("private", Private); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Generate/GenerateRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Generate/GenerateRequestBuilder.cs new file mode 100644 index 0000000..7b33ac9 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Generate/GenerateRequestBuilder.cs @@ -0,0 +1,98 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.Generate +{ + /// + /// Builds and executes requests for operations under \repos\{owner-id}\{repo-id}\generate + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class GenerateRequestBuilder : BaseRequestBuilder + { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public GenerateRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/generate", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public GenerateRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/generate", rawUrl) + { + } + /// + /// 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/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. + /// API method documentation + /// + /// A + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PostAsync(global::Ayllu.Github.Client.Repos.Item.Item.Generate.GeneratePostRequestBody body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task PostAsync(global::Ayllu.Github.Client.Repos.Item.Item.Generate.GeneratePostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPostRequestInformation(body, requestConfiguration); + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Models.FullRepository.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false); + } + /// + /// 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/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. + /// + /// A + /// The request body + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPostRequestInformation(global::Ayllu.Github.Client.Repos.Item.Item.Generate.GeneratePostRequestBody body, Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToPostRequestInformation(global::Ayllu.Github.Client.Repos.Item.Item.Generate.GeneratePostRequestBody body, Action> requestConfiguration = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.Repos.Item.Item.Generate.GenerateRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Repos.Item.Item.Generate.GenerateRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class GenerateRequestBuilderPostRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Git/Blobs/BlobsPostRequestBody.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Git/Blobs/BlobsPostRequestBody.cs new file mode 100644 index 0000000..8041f6b --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Git/Blobs/BlobsPostRequestBody.cs @@ -0,0 +1,76 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.Git.Blobs +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class BlobsPostRequestBody : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The new blob's content. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Content { get; set; } +#nullable restore +#else + public string Content { get; set; } +#endif + /// The encoding used for `content`. Currently, `"utf-8"` and `"base64"` are supported. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Encoding { get; set; } +#nullable restore +#else + public string Encoding { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public BlobsPostRequestBody() + { + AdditionalData = new Dictionary(); + Encoding = "utf-8"; + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Repos.Item.Item.Git.Blobs.BlobsPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Repos.Item.Item.Git.Blobs.BlobsPostRequestBody(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "content", n => { Content = n.GetStringValue(); } }, + { "encoding", n => { Encoding = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("content", Content); + writer.WriteStringValue("encoding", Encoding); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Git/Blobs/BlobsRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Git/Blobs/BlobsRequestBuilder.cs new file mode 100644 index 0000000..4258d00 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Git/Blobs/BlobsRequestBuilder.cs @@ -0,0 +1,117 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Ayllu.Github.Client.Repos.Item.Item.Git.Blobs.Item; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.Git.Blobs +{ + /// + /// Builds and executes requests for operations under \repos\{owner-id}\{repo-id}\git\blobs + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class BlobsRequestBuilder : BaseRequestBuilder + { + /// Gets an item from the Ayllu.Github.Client.repos.item.item.git.blobs.item collection + /// Unique identifier of the item + /// A + public global::Ayllu.Github.Client.Repos.Item.Item.Git.Blobs.Item.WithFile_shaItemRequestBuilder this[string position] + { + get + { + var urlTplParams = new Dictionary(PathParameters); + urlTplParams.Add("file_sha", position); + return new global::Ayllu.Github.Client.Repos.Item.Item.Git.Blobs.Item.WithFile_shaItemRequestBuilder(urlTplParams, RequestAdapter); + } + } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public BlobsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/git/blobs", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public BlobsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/git/blobs", rawUrl) + { + } + /// + /// Create a blob + /// API method documentation + /// + /// A + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 403 status code + /// When receiving a 404 status code + /// When receiving a 409 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PostAsync(global::Ayllu.Github.Client.Repos.Item.Item.Git.Blobs.BlobsPostRequestBody body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task PostAsync(global::Ayllu.Github.Client.Repos.Item.Item.Git.Blobs.BlobsPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPostRequestInformation(body, requestConfiguration); + var errorMapping = new Dictionary> + { + { "403", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "404", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "409", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Models.ShortBlob.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// A + /// The request body + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPostRequestInformation(global::Ayllu.Github.Client.Repos.Item.Item.Git.Blobs.BlobsPostRequestBody body, Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToPostRequestInformation(global::Ayllu.Github.Client.Repos.Item.Item.Git.Blobs.BlobsPostRequestBody body, Action> requestConfiguration = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.Repos.Item.Item.Git.Blobs.BlobsRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Repos.Item.Item.Git.Blobs.BlobsRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class BlobsRequestBuilderPostRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Git/Blobs/Item/WithFile_shaItemRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Git/Blobs/Item/WithFile_shaItemRequestBuilder.cs new file mode 100644 index 0000000..1037209 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Git/Blobs/Item/WithFile_shaItemRequestBuilder.cs @@ -0,0 +1,104 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.Git.Blobs.Item +{ + /// + /// Builds and executes requests for operations under \repos\{owner-id}\{repo-id}\git\blobs\{file_sha} + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithFile_shaItemRequestBuilder : BaseRequestBuilder + { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public WithFile_shaItemRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/git/blobs/{file_sha}", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public WithFile_shaItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/git/blobs/{file_sha}", rawUrl) + { + } + /// + /// 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/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. + /// API method documentation + /// + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 403 status code + /// When receiving a 404 status code + /// When receiving a 409 status code + /// When receiving a 422 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "403", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "404", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "409", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "422", global::Ayllu.Github.Client.Models.ValidationError.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Models.Blob.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// 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/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. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.Repos.Item.Item.Git.Blobs.Item.WithFile_shaItemRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Repos.Item.Item.Git.Blobs.Item.WithFile_shaItemRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithFile_shaItemRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Git/Commits/CommitsPostRequestBody.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Git/Commits/CommitsPostRequestBody.cs new file mode 100644 index 0000000..3ad8848 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Git/Commits/CommitsPostRequestBody.cs @@ -0,0 +1,115 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.Git.Commits +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class CommitsPostRequestBody : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// 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. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Repos.Item.Item.Git.Commits.CommitsPostRequestBody_author? Author { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Repos.Item.Item.Git.Commits.CommitsPostRequestBody_author Author { get; set; } +#endif + /// 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. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Repos.Item.Item.Git.Commits.CommitsPostRequestBody_committer? Committer { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Repos.Item.Item.Git.Commits.CommitsPostRequestBody_committer Committer { get; set; } +#endif + /// The commit message +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Message { get; set; } +#nullable restore +#else + public string Message { get; set; } +#endif + /// The full 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. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? Parents { get; set; } +#nullable restore +#else + public List Parents { get; set; } +#endif + /// 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. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Signature { get; set; } +#nullable restore +#else + public string Signature { get; set; } +#endif + /// The SHA of the tree object this commit points to +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Tree { get; set; } +#nullable restore +#else + public string Tree { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public CommitsPostRequestBody() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Repos.Item.Item.Git.Commits.CommitsPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Repos.Item.Item.Git.Commits.CommitsPostRequestBody(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "author", n => { Author = n.GetObjectValue(global::Ayllu.Github.Client.Repos.Item.Item.Git.Commits.CommitsPostRequestBody_author.CreateFromDiscriminatorValue); } }, + { "committer", n => { Committer = n.GetObjectValue(global::Ayllu.Github.Client.Repos.Item.Item.Git.Commits.CommitsPostRequestBody_committer.CreateFromDiscriminatorValue); } }, + { "message", n => { Message = n.GetStringValue(); } }, + { "parents", n => { Parents = n.GetCollectionOfPrimitiveValues()?.AsList(); } }, + { "signature", n => { Signature = n.GetStringValue(); } }, + { "tree", n => { Tree = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteObjectValue("author", Author); + writer.WriteObjectValue("committer", Committer); + writer.WriteStringValue("message", Message); + writer.WriteCollectionOfPrimitiveValues("parents", Parents); + writer.WriteStringValue("signature", Signature); + writer.WriteStringValue("tree", Tree); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Git/Commits/CommitsPostRequestBody_author.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Git/Commits/CommitsPostRequestBody_author.cs new file mode 100644 index 0000000..13c1ed3 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Git/Commits/CommitsPostRequestBody_author.cs @@ -0,0 +1,80 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.Git.Commits +{ + /// + /// 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. + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class CommitsPostRequestBody_author : IAdditionalDataHolder, IParsable + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// 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`. + public DateTimeOffset? Date { get; set; } + /// The email of the author (or committer) of the commit +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Email { get; set; } +#nullable restore +#else + public string Email { get; set; } +#endif + /// The name of the author (or committer) of the commit +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Name { get; set; } +#nullable restore +#else + public string Name { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public CommitsPostRequestBody_author() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Repos.Item.Item.Git.Commits.CommitsPostRequestBody_author CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Repos.Item.Item.Git.Commits.CommitsPostRequestBody_author(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "date", n => { Date = n.GetDateTimeOffsetValue(); } }, + { "email", n => { Email = n.GetStringValue(); } }, + { "name", n => { Name = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteDateTimeOffsetValue("date", Date); + writer.WriteStringValue("email", Email); + writer.WriteStringValue("name", Name); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Git/Commits/CommitsPostRequestBody_committer.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Git/Commits/CommitsPostRequestBody_committer.cs new file mode 100644 index 0000000..1d34bb6 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Git/Commits/CommitsPostRequestBody_committer.cs @@ -0,0 +1,80 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.Git.Commits +{ + /// + /// 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. + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class CommitsPostRequestBody_committer : IAdditionalDataHolder, IParsable + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// 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`. + public DateTimeOffset? Date { get; set; } + /// The email of the author (or committer) of the commit +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Email { get; set; } +#nullable restore +#else + public string Email { get; set; } +#endif + /// The name of the author (or committer) of the commit +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Name { get; set; } +#nullable restore +#else + public string Name { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public CommitsPostRequestBody_committer() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Repos.Item.Item.Git.Commits.CommitsPostRequestBody_committer CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Repos.Item.Item.Git.Commits.CommitsPostRequestBody_committer(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "date", n => { Date = n.GetDateTimeOffsetValue(); } }, + { "email", n => { Email = n.GetStringValue(); } }, + { "name", n => { Name = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteDateTimeOffsetValue("date", Date); + writer.WriteStringValue("email", Email); + writer.WriteStringValue("name", Name); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Git/Commits/CommitsRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Git/Commits/CommitsRequestBuilder.cs new file mode 100644 index 0000000..3a23477 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Git/Commits/CommitsRequestBuilder.cs @@ -0,0 +1,120 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Ayllu.Github.Client.Repos.Item.Item.Git.Commits.Item; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.Git.Commits +{ + /// + /// Builds and executes requests for operations under \repos\{owner-id}\{repo-id}\git\commits + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class CommitsRequestBuilder : BaseRequestBuilder + { + /// Gets an item from the Ayllu.Github.Client.repos.item.item.git.commits.item collection + /// Unique identifier of the item + /// A + public global::Ayllu.Github.Client.Repos.Item.Item.Git.Commits.Item.WithCommit_shaItemRequestBuilder this[string position] + { + get + { + var urlTplParams = new Dictionary(PathParameters); + urlTplParams.Add("commit_sha", position); + return new global::Ayllu.Github.Client.Repos.Item.Item.Git.Commits.Item.WithCommit_shaItemRequestBuilder(urlTplParams, RequestAdapter); + } + } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public CommitsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/git/commits", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public CommitsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/git/commits", rawUrl) + { + } + /// + /// Creates a new Git [commit object](https://git-scm.com/book/en/v2/Git-Internals-Git-Objects).**Signature verification object**The response will include a `verification` object that describes the result of verifying the commit's signature. The following fields are included in the `verification` object:| Name | Type | Description || ---- | ---- | ----------- || `verified` | `boolean` | Indicates whether GitHub considers the signature in this commit to be verified. || `reason` | `string` | The reason for verified value. Possible values and their meanings are enumerated in the table below. || `signature` | `string` | The signature that was extracted from the commit. || `payload` | `string` | The value that was signed. || `verified_at` | `string` | The date the signature was verified by GitHub. |These are the possible values for `reason` in the `verification` object:| Value | Description || ----- | ----------- || `expired_key` | The key that made the signature is expired. || `not_signing_key` | The "signing" flag is not among the usage flags in the GPG key that made the signature. || `gpgverify_error` | There was an error communicating with the signature verification service. || `gpgverify_unavailable` | The signature verification service is currently unavailable. || `unsigned` | The object does not include a signature. || `unknown_signature_type` | A non-PGP signature was found in the commit. || `no_user` | No user was associated with the `committer` email address in the commit. || `unverified_email` | The `committer` email address in the commit was associated with a user, but the email address is not verified on their account. || `bad_email` | The `committer` email address in the commit is not included in the identities of the PGP key that made the signature. || `unknown_key` | The key that made the signature has not been registered with any user's account. || `malformed_signature` | There was an error parsing the signature. || `invalid` | The signature could not be cryptographically verified using the key whose key-id was found in the signature. || `valid` | None of the above errors applied, so the signature is considered to be verified. | + /// API method documentation + /// + /// A + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 404 status code + /// When receiving a 409 status code + /// When receiving a 422 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PostAsync(global::Ayllu.Github.Client.Repos.Item.Item.Git.Commits.CommitsPostRequestBody body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task PostAsync(global::Ayllu.Github.Client.Repos.Item.Item.Git.Commits.CommitsPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPostRequestInformation(body, requestConfiguration); + var errorMapping = new Dictionary> + { + { "404", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "409", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "422", global::Ayllu.Github.Client.Models.ValidationError.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Models.GitCommit.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// Creates a new Git [commit object](https://git-scm.com/book/en/v2/Git-Internals-Git-Objects).**Signature verification object**The response will include a `verification` object that describes the result of verifying the commit's signature. The following fields are included in the `verification` object:| Name | Type | Description || ---- | ---- | ----------- || `verified` | `boolean` | Indicates whether GitHub considers the signature in this commit to be verified. || `reason` | `string` | The reason for verified value. Possible values and their meanings are enumerated in the table below. || `signature` | `string` | The signature that was extracted from the commit. || `payload` | `string` | The value that was signed. || `verified_at` | `string` | The date the signature was verified by GitHub. |These are the possible values for `reason` in the `verification` object:| Value | Description || ----- | ----------- || `expired_key` | The key that made the signature is expired. || `not_signing_key` | The "signing" flag is not among the usage flags in the GPG key that made the signature. || `gpgverify_error` | There was an error communicating with the signature verification service. || `gpgverify_unavailable` | The signature verification service is currently unavailable. || `unsigned` | The object does not include a signature. || `unknown_signature_type` | A non-PGP signature was found in the commit. || `no_user` | No user was associated with the `committer` email address in the commit. || `unverified_email` | The `committer` email address in the commit was associated with a user, but the email address is not verified on their account. || `bad_email` | The `committer` email address in the commit is not included in the identities of the PGP key that made the signature. || `unknown_key` | The key that made the signature has not been registered with any user's account. || `malformed_signature` | There was an error parsing the signature. || `invalid` | The signature could not be cryptographically verified using the key whose key-id was found in the signature. || `valid` | None of the above errors applied, so the signature is considered to be verified. | + /// + /// A + /// The request body + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPostRequestInformation(global::Ayllu.Github.Client.Repos.Item.Item.Git.Commits.CommitsPostRequestBody body, Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToPostRequestInformation(global::Ayllu.Github.Client.Repos.Item.Item.Git.Commits.CommitsPostRequestBody body, Action> requestConfiguration = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.Repos.Item.Item.Git.Commits.CommitsRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Repos.Item.Item.Git.Commits.CommitsRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class CommitsRequestBuilderPostRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Git/Commits/Item/WithCommit_shaItemRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Git/Commits/Item/WithCommit_shaItemRequestBuilder.cs new file mode 100644 index 0000000..dc0c2aa --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Git/Commits/Item/WithCommit_shaItemRequestBuilder.cs @@ -0,0 +1,100 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.Git.Commits.Item +{ + /// + /// Builds and executes requests for operations under \repos\{owner-id}\{repo-id}\git\commits\{commit_sha} + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithCommit_shaItemRequestBuilder : BaseRequestBuilder + { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public WithCommit_shaItemRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/git/commits/{commit_sha}", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public WithCommit_shaItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/git/commits/{commit_sha}", rawUrl) + { + } + /// + /// Gets a Git [commit object](https://git-scm.com/book/en/v2/Git-Internals-Git-Objects).To get the contents of a commit, see "[Get a commit](/rest/commits/commits#get-a-commit)."**Signature verification object**The response will include a `verification` object that describes the result of verifying the commit's signature. The following fields are included in the `verification` object:| Name | Type | Description || ---- | ---- | ----------- || `verified` | `boolean` | Indicates whether GitHub considers the signature in this commit to be verified. || `reason` | `string` | The reason for verified value. Possible values and their meanings are enumerated in the table below. || `signature` | `string` | The signature that was extracted from the commit. || `payload` | `string` | The value that was signed. || `verified_at` | `string` | The date the signature was verified by GitHub. |These are the possible values for `reason` in the `verification` object:| Value | Description || ----- | ----------- || `expired_key` | The key that made the signature is expired. || `not_signing_key` | The "signing" flag is not among the usage flags in the GPG key that made the signature. || `gpgverify_error` | There was an error communicating with the signature verification service. || `gpgverify_unavailable` | The signature verification service is currently unavailable. || `unsigned` | The object does not include a signature. || `unknown_signature_type` | A non-PGP signature was found in the commit. || `no_user` | No user was associated with the `committer` email address in the commit. || `unverified_email` | The `committer` email address in the commit was associated with a user, but the email address is not verified on their account. || `bad_email` | The `committer` email address in the commit is not included in the identities of the PGP key that made the signature. || `unknown_key` | The key that made the signature has not been registered with any user's account. || `malformed_signature` | There was an error parsing the signature. || `invalid` | The signature could not be cryptographically verified using the key whose key-id was found in the signature. || `valid` | None of the above errors applied, so the signature is considered to be verified. | + /// API method documentation + /// + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 404 status code + /// When receiving a 409 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "404", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "409", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Models.GitCommit.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// Gets a Git [commit object](https://git-scm.com/book/en/v2/Git-Internals-Git-Objects).To get the contents of a commit, see "[Get a commit](/rest/commits/commits#get-a-commit)."**Signature verification object**The response will include a `verification` object that describes the result of verifying the commit's signature. The following fields are included in the `verification` object:| Name | Type | Description || ---- | ---- | ----------- || `verified` | `boolean` | Indicates whether GitHub considers the signature in this commit to be verified. || `reason` | `string` | The reason for verified value. Possible values and their meanings are enumerated in the table below. || `signature` | `string` | The signature that was extracted from the commit. || `payload` | `string` | The value that was signed. || `verified_at` | `string` | The date the signature was verified by GitHub. |These are the possible values for `reason` in the `verification` object:| Value | Description || ----- | ----------- || `expired_key` | The key that made the signature is expired. || `not_signing_key` | The "signing" flag is not among the usage flags in the GPG key that made the signature. || `gpgverify_error` | There was an error communicating with the signature verification service. || `gpgverify_unavailable` | The signature verification service is currently unavailable. || `unsigned` | The object does not include a signature. || `unknown_signature_type` | A non-PGP signature was found in the commit. || `no_user` | No user was associated with the `committer` email address in the commit. || `unverified_email` | The `committer` email address in the commit was associated with a user, but the email address is not verified on their account. || `bad_email` | The `committer` email address in the commit is not included in the identities of the PGP key that made the signature. || `unknown_key` | The key that made the signature has not been registered with any user's account. || `malformed_signature` | There was an error parsing the signature. || `invalid` | The signature could not be cryptographically verified using the key whose key-id was found in the signature. || `valid` | None of the above errors applied, so the signature is considered to be verified. | + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.Repos.Item.Item.Git.Commits.Item.WithCommit_shaItemRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Repos.Item.Item.Git.Commits.Item.WithCommit_shaItemRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithCommit_shaItemRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Git/GitRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Git/GitRequestBuilder.cs new file mode 100644 index 0000000..55a5513 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Git/GitRequestBuilder.cs @@ -0,0 +1,77 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Repos.Item.Item.Git.Blobs; +using Ayllu.Github.Client.Repos.Item.Item.Git.Commits; +using Ayllu.Github.Client.Repos.Item.Item.Git.MatchingRefs; +using Ayllu.Github.Client.Repos.Item.Item.Git.Ref; +using Ayllu.Github.Client.Repos.Item.Item.Git.Refs; +using Ayllu.Github.Client.Repos.Item.Item.Git.Tags; +using Ayllu.Github.Client.Repos.Item.Item.Git.Trees; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.Git +{ + /// + /// Builds and executes requests for operations under \repos\{owner-id}\{repo-id}\git + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class GitRequestBuilder : BaseRequestBuilder + { + /// The blobs property + public global::Ayllu.Github.Client.Repos.Item.Item.Git.Blobs.BlobsRequestBuilder Blobs + { + get => new global::Ayllu.Github.Client.Repos.Item.Item.Git.Blobs.BlobsRequestBuilder(PathParameters, RequestAdapter); + } + /// The commits property + public global::Ayllu.Github.Client.Repos.Item.Item.Git.Commits.CommitsRequestBuilder Commits + { + get => new global::Ayllu.Github.Client.Repos.Item.Item.Git.Commits.CommitsRequestBuilder(PathParameters, RequestAdapter); + } + /// The matchingRefs property + public global::Ayllu.Github.Client.Repos.Item.Item.Git.MatchingRefs.MatchingRefsRequestBuilder MatchingRefs + { + get => new global::Ayllu.Github.Client.Repos.Item.Item.Git.MatchingRefs.MatchingRefsRequestBuilder(PathParameters, RequestAdapter); + } + /// The ref property + public global::Ayllu.Github.Client.Repos.Item.Item.Git.Ref.RefRequestBuilder Ref + { + get => new global::Ayllu.Github.Client.Repos.Item.Item.Git.Ref.RefRequestBuilder(PathParameters, RequestAdapter); + } + /// The refs property + public global::Ayllu.Github.Client.Repos.Item.Item.Git.Refs.RefsRequestBuilder Refs + { + get => new global::Ayllu.Github.Client.Repos.Item.Item.Git.Refs.RefsRequestBuilder(PathParameters, RequestAdapter); + } + /// The tags property + public global::Ayllu.Github.Client.Repos.Item.Item.Git.Tags.TagsRequestBuilder Tags + { + get => new global::Ayllu.Github.Client.Repos.Item.Item.Git.Tags.TagsRequestBuilder(PathParameters, RequestAdapter); + } + /// The trees property + public global::Ayllu.Github.Client.Repos.Item.Item.Git.Trees.TreesRequestBuilder Trees + { + get => new global::Ayllu.Github.Client.Repos.Item.Item.Git.Trees.TreesRequestBuilder(PathParameters, RequestAdapter); + } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public GitRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/git", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public GitRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/git", rawUrl) + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Git/MatchingRefs/Item/WithRefItemRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Git/MatchingRefs/Item/WithRefItemRequestBuilder.cs new file mode 100644 index 0000000..7912035 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Git/MatchingRefs/Item/WithRefItemRequestBuilder.cs @@ -0,0 +1,99 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.Git.MatchingRefs.Item +{ + /// + /// Builds and executes requests for operations under \repos\{owner-id}\{repo-id}\git\matching-refs\{ref} + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithRefItemRequestBuilder : BaseRequestBuilder + { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public WithRefItemRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/git/matching-refs/{ref}", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public WithRefItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/git/matching-refs/{ref}", rawUrl) + { + } + /// + /// Returns an array of references from your Git database that match the supplied name. The `:ref` in the URL must be formatted as `heads/<branch name>` for branches and `tags/<tag name>` 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/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/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`. + /// API method documentation + /// + /// A List<global::Ayllu.Github.Client.Models.GitRef> + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 409 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task?> GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task> GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "409", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + }; + var collectionResult = await RequestAdapter.SendCollectionAsync(requestInfo, global::Ayllu.Github.Client.Models.GitRef.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + return collectionResult?.AsList(); + } + /// + /// Returns an array of references from your Git database that match the supplied name. The `:ref` in the URL must be formatted as `heads/<branch name>` for branches and `tags/<tag name>` 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/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/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`. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.Repos.Item.Item.Git.MatchingRefs.Item.WithRefItemRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Repos.Item.Item.Git.MatchingRefs.Item.WithRefItemRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithRefItemRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Git/MatchingRefs/MatchingRefsRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Git/MatchingRefs/MatchingRefsRequestBuilder.cs new file mode 100644 index 0000000..0eaa67e --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Git/MatchingRefs/MatchingRefsRequestBuilder.cs @@ -0,0 +1,48 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Repos.Item.Item.Git.MatchingRefs.Item; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.Git.MatchingRefs +{ + /// + /// Builds and executes requests for operations under \repos\{owner-id}\{repo-id}\git\matching-refs + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class MatchingRefsRequestBuilder : BaseRequestBuilder + { + /// Gets an item from the Ayllu.Github.Client.repos.item.item.git.matchingRefs.item collection + /// The Git reference. For more information, see "[Git References](https://git-scm.com/book/en/v2/Git-Internals-Git-References)" in the Git documentation. + /// A + public global::Ayllu.Github.Client.Repos.Item.Item.Git.MatchingRefs.Item.WithRefItemRequestBuilder this[string position] + { + get + { + var urlTplParams = new Dictionary(PathParameters); + urlTplParams.Add("ref", position); + return new global::Ayllu.Github.Client.Repos.Item.Item.Git.MatchingRefs.Item.WithRefItemRequestBuilder(urlTplParams, RequestAdapter); + } + } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public MatchingRefsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/git/matching-refs", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public MatchingRefsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/git/matching-refs", rawUrl) + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Git/Ref/Item/WithRefItemRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Git/Ref/Item/WithRefItemRequestBuilder.cs new file mode 100644 index 0000000..cbc16cb --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Git/Ref/Item/WithRefItemRequestBuilder.cs @@ -0,0 +1,100 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.Git.Ref.Item +{ + /// + /// Builds and executes requests for operations under \repos\{owner-id}\{repo-id}\git\ref\{ref} + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithRefItemRequestBuilder : BaseRequestBuilder + { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public WithRefItemRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/git/ref/{ref}", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public WithRefItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/git/ref/{ref}", rawUrl) + { + } + /// + /// Returns a single reference from your Git database. The `:ref` in the URL must be formatted as `heads/<branch name>` for branches and `tags/<tag name>` 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/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/rest/guides/getting-started-with-the-git-database-api#checking-mergeability-of-pull-requests)". + /// API method documentation + /// + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 404 status code + /// When receiving a 409 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "404", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "409", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Models.GitRef.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// Returns a single reference from your Git database. The `:ref` in the URL must be formatted as `heads/<branch name>` for branches and `tags/<tag name>` 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/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/rest/guides/getting-started-with-the-git-database-api#checking-mergeability-of-pull-requests)". + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.Repos.Item.Item.Git.Ref.Item.WithRefItemRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Repos.Item.Item.Git.Ref.Item.WithRefItemRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithRefItemRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Git/Ref/RefRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Git/Ref/RefRequestBuilder.cs new file mode 100644 index 0000000..c09de65 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Git/Ref/RefRequestBuilder.cs @@ -0,0 +1,48 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Repos.Item.Item.Git.Ref.Item; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.Git.Ref +{ + /// + /// Builds and executes requests for operations under \repos\{owner-id}\{repo-id}\git\ref + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class RefRequestBuilder : BaseRequestBuilder + { + /// Gets an item from the Ayllu.Github.Client.repos.item.item.git.ref.item collection + /// The Git reference. For more information, see "[Git References](https://git-scm.com/book/en/v2/Git-Internals-Git-References)" in the Git documentation. + /// A + public global::Ayllu.Github.Client.Repos.Item.Item.Git.Ref.Item.WithRefItemRequestBuilder this[string position] + { + get + { + var urlTplParams = new Dictionary(PathParameters); + urlTplParams.Add("ref", position); + return new global::Ayllu.Github.Client.Repos.Item.Item.Git.Ref.Item.WithRefItemRequestBuilder(urlTplParams, RequestAdapter); + } + } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public RefRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/git/ref", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public RefRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/git/ref", rawUrl) + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Git/Refs/Item/WithRefItemRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Git/Refs/Item/WithRefItemRequestBuilder.cs new file mode 100644 index 0000000..1a41e1d --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Git/Refs/Item/WithRefItemRequestBuilder.cs @@ -0,0 +1,155 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.Git.Refs.Item +{ + /// + /// Builds and executes requests for operations under \repos\{owner-id}\{repo-id}\git\refs\{ref} + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithRefItemRequestBuilder : BaseRequestBuilder + { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public WithRefItemRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/git/refs/{ref}", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public WithRefItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/git/refs/{ref}", rawUrl) + { + } + /// + /// Deletes the provided reference. + /// API method documentation + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 409 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task DeleteAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task DeleteAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToDeleteRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "409", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + }; + await RequestAdapter.SendNoContentAsync(requestInfo, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// 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. + /// API method documentation + /// + /// A + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 409 status code + /// When receiving a 422 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PatchAsync(global::Ayllu.Github.Client.Repos.Item.Item.Git.Refs.Item.WithRefPatchRequestBody body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task PatchAsync(global::Ayllu.Github.Client.Repos.Item.Item.Git.Refs.Item.WithRefPatchRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPatchRequestInformation(body, requestConfiguration); + var errorMapping = new Dictionary> + { + { "409", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "422", global::Ayllu.Github.Client.Models.ValidationError.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Models.GitRef.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// Deletes the provided reference. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToDeleteRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToDeleteRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.DELETE, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// 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. + /// + /// A + /// The request body + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPatchRequestInformation(global::Ayllu.Github.Client.Repos.Item.Item.Git.Refs.Item.WithRefPatchRequestBody body, Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToPatchRequestInformation(global::Ayllu.Github.Client.Repos.Item.Item.Git.Refs.Item.WithRefPatchRequestBody body, Action> requestConfiguration = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.Repos.Item.Item.Git.Refs.Item.WithRefItemRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Repos.Item.Item.Git.Refs.Item.WithRefItemRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithRefItemRequestBuilderDeleteRequestConfiguration : RequestConfiguration + { + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithRefItemRequestBuilderPatchRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Git/Refs/Item/WithRefPatchRequestBody.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Git/Refs/Item/WithRefPatchRequestBody.cs new file mode 100644 index 0000000..c58d4f4 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Git/Refs/Item/WithRefPatchRequestBody.cs @@ -0,0 +1,69 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.Git.Refs.Item +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class WithRefPatchRequestBody : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// 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. + public bool? Force { get; set; } + /// The SHA1 value to set this reference to +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Sha { get; set; } +#nullable restore +#else + public string Sha { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public WithRefPatchRequestBody() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Repos.Item.Item.Git.Refs.Item.WithRefPatchRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Repos.Item.Item.Git.Refs.Item.WithRefPatchRequestBody(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "force", n => { Force = n.GetBoolValue(); } }, + { "sha", n => { Sha = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteBoolValue("force", Force); + writer.WriteStringValue("sha", Sha); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Git/Refs/RefsPostRequestBody.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Git/Refs/RefsPostRequestBody.cs new file mode 100644 index 0000000..04c3c62 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Git/Refs/RefsPostRequestBody.cs @@ -0,0 +1,75 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.Git.Refs +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class RefsPostRequestBody : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// 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. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Ref { get; set; } +#nullable restore +#else + public string Ref { get; set; } +#endif + /// The SHA1 value for this reference. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Sha { get; set; } +#nullable restore +#else + public string Sha { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public RefsPostRequestBody() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Repos.Item.Item.Git.Refs.RefsPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Repos.Item.Item.Git.Refs.RefsPostRequestBody(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "ref", n => { Ref = n.GetStringValue(); } }, + { "sha", n => { Sha = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("ref", Ref); + writer.WriteStringValue("sha", Sha); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Git/Refs/RefsRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Git/Refs/RefsRequestBuilder.cs new file mode 100644 index 0000000..beb4094 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Git/Refs/RefsRequestBuilder.cs @@ -0,0 +1,118 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Ayllu.Github.Client.Repos.Item.Item.Git.Refs.Item; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.Git.Refs +{ + /// + /// Builds and executes requests for operations under \repos\{owner-id}\{repo-id}\git\refs + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class RefsRequestBuilder : BaseRequestBuilder + { + /// Gets an item from the Ayllu.Github.Client.repos.item.item.git.refs.item collection + /// The Git reference. For more information, see "[Git References](https://git-scm.com/book/en/v2/Git-Internals-Git-References)" in the Git documentation. + /// A + public global::Ayllu.Github.Client.Repos.Item.Item.Git.Refs.Item.WithRefItemRequestBuilder this[string position] + { + get + { + var urlTplParams = new Dictionary(PathParameters); + urlTplParams.Add("ref", position); + return new global::Ayllu.Github.Client.Repos.Item.Item.Git.Refs.Item.WithRefItemRequestBuilder(urlTplParams, RequestAdapter); + } + } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public RefsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/git/refs", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public RefsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/git/refs", rawUrl) + { + } + /// + /// 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. + /// API method documentation + /// + /// A + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 409 status code + /// When receiving a 422 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PostAsync(global::Ayllu.Github.Client.Repos.Item.Item.Git.Refs.RefsPostRequestBody body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task PostAsync(global::Ayllu.Github.Client.Repos.Item.Item.Git.Refs.RefsPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPostRequestInformation(body, requestConfiguration); + var errorMapping = new Dictionary> + { + { "409", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "422", global::Ayllu.Github.Client.Models.ValidationError.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Models.GitRef.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// 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. + /// + /// A + /// The request body + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPostRequestInformation(global::Ayllu.Github.Client.Repos.Item.Item.Git.Refs.RefsPostRequestBody body, Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToPostRequestInformation(global::Ayllu.Github.Client.Repos.Item.Item.Git.Refs.RefsPostRequestBody body, Action> requestConfiguration = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.Repos.Item.Item.Git.Refs.RefsRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Repos.Item.Item.Git.Refs.RefsRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class RefsRequestBuilderPostRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Git/Tags/Item/WithTag_shaItemRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Git/Tags/Item/WithTag_shaItemRequestBuilder.cs new file mode 100644 index 0000000..c07b9be --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Git/Tags/Item/WithTag_shaItemRequestBuilder.cs @@ -0,0 +1,100 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.Git.Tags.Item +{ + /// + /// Builds and executes requests for operations under \repos\{owner-id}\{repo-id}\git\tags\{tag_sha} + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithTag_shaItemRequestBuilder : BaseRequestBuilder + { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public WithTag_shaItemRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/git/tags/{tag_sha}", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public WithTag_shaItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/git/tags/{tag_sha}", rawUrl) + { + } + /// + /// **Signature verification object**The response will include a `verification` object that describes the result of verifying the commit's signature. The following fields are included in the `verification` object:| Name | Type | Description || ---- | ---- | ----------- || `verified` | `boolean` | Indicates whether GitHub considers the signature in this commit to be verified. || `reason` | `string` | The reason for verified value. Possible values and their meanings are enumerated in table below. || `signature` | `string` | The signature that was extracted from the commit. || `payload` | `string` | The value that was signed. || `verified_at` | `string` | The date the signature was verified by GitHub. |These are the possible values for `reason` in the `verification` object:| Value | Description || ----- | ----------- || `expired_key` | The key that made the signature is expired. || `not_signing_key` | The "signing" flag is not among the usage flags in the GPG key that made the signature. || `gpgverify_error` | There was an error communicating with the signature verification service. || `gpgverify_unavailable` | The signature verification service is currently unavailable. || `unsigned` | The object does not include a signature. || `unknown_signature_type` | A non-PGP signature was found in the commit. || `no_user` | No user was associated with the `committer` email address in the commit. || `unverified_email` | The `committer` email address in the commit was associated with a user, but the email address is not verified on their account. || `bad_email` | The `committer` email address in the commit is not included in the identities of the PGP key that made the signature. || `unknown_key` | The key that made the signature has not been registered with any user's account. || `malformed_signature` | There was an error parsing the signature. || `invalid` | The signature could not be cryptographically verified using the key whose key-id was found in the signature. || `valid` | None of the above errors applied, so the signature is considered to be verified. | + /// API method documentation + /// + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 404 status code + /// When receiving a 409 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "404", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "409", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Models.GitTag.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// **Signature verification object**The response will include a `verification` object that describes the result of verifying the commit's signature. The following fields are included in the `verification` object:| Name | Type | Description || ---- | ---- | ----------- || `verified` | `boolean` | Indicates whether GitHub considers the signature in this commit to be verified. || `reason` | `string` | The reason for verified value. Possible values and their meanings are enumerated in table below. || `signature` | `string` | The signature that was extracted from the commit. || `payload` | `string` | The value that was signed. || `verified_at` | `string` | The date the signature was verified by GitHub. |These are the possible values for `reason` in the `verification` object:| Value | Description || ----- | ----------- || `expired_key` | The key that made the signature is expired. || `not_signing_key` | The "signing" flag is not among the usage flags in the GPG key that made the signature. || `gpgverify_error` | There was an error communicating with the signature verification service. || `gpgverify_unavailable` | The signature verification service is currently unavailable. || `unsigned` | The object does not include a signature. || `unknown_signature_type` | A non-PGP signature was found in the commit. || `no_user` | No user was associated with the `committer` email address in the commit. || `unverified_email` | The `committer` email address in the commit was associated with a user, but the email address is not verified on their account. || `bad_email` | The `committer` email address in the commit is not included in the identities of the PGP key that made the signature. || `unknown_key` | The key that made the signature has not been registered with any user's account. || `malformed_signature` | There was an error parsing the signature. || `invalid` | The signature could not be cryptographically verified using the key whose key-id was found in the signature. || `valid` | None of the above errors applied, so the signature is considered to be verified. | + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.Repos.Item.Item.Git.Tags.Item.WithTag_shaItemRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Repos.Item.Item.Git.Tags.Item.WithTag_shaItemRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithTag_shaItemRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Git/Tags/TagsPostRequestBody.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Git/Tags/TagsPostRequestBody.cs new file mode 100644 index 0000000..c8ecee8 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Git/Tags/TagsPostRequestBody.cs @@ -0,0 +1,99 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.Git.Tags +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class TagsPostRequestBody : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The tag message. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Message { get; set; } +#nullable restore +#else + public string Message { get; set; } +#endif + /// The SHA of the git object this is tagging. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Object { get; set; } +#nullable restore +#else + public string Object { get; set; } +#endif + /// The tag's name. This is typically a version (e.g., "v0.0.1"). +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Tag { get; set; } +#nullable restore +#else + public string Tag { get; set; } +#endif + /// An object with information about the individual creating the tag. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Repos.Item.Item.Git.Tags.TagsPostRequestBody_tagger? Tagger { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Repos.Item.Item.Git.Tags.TagsPostRequestBody_tagger Tagger { get; set; } +#endif + /// The type of the object we're tagging. Normally this is a `commit` but it can also be a `tree` or a `blob`. + public global::Ayllu.Github.Client.Repos.Item.Item.Git.Tags.TagsPostRequestBody_type? Type { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public TagsPostRequestBody() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Repos.Item.Item.Git.Tags.TagsPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Repos.Item.Item.Git.Tags.TagsPostRequestBody(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "message", n => { Message = n.GetStringValue(); } }, + { "object", n => { Object = n.GetStringValue(); } }, + { "tag", n => { Tag = n.GetStringValue(); } }, + { "tagger", n => { Tagger = n.GetObjectValue(global::Ayllu.Github.Client.Repos.Item.Item.Git.Tags.TagsPostRequestBody_tagger.CreateFromDiscriminatorValue); } }, + { "type", n => { Type = n.GetEnumValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("message", Message); + writer.WriteStringValue("object", Object); + writer.WriteStringValue("tag", Tag); + writer.WriteObjectValue("tagger", Tagger); + writer.WriteEnumValue("type", Type); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Git/Tags/TagsPostRequestBody_tagger.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Git/Tags/TagsPostRequestBody_tagger.cs new file mode 100644 index 0000000..51cbabb --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Git/Tags/TagsPostRequestBody_tagger.cs @@ -0,0 +1,80 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.Git.Tags +{ + /// + /// An object with information about the individual creating the tag. + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class TagsPostRequestBody_tagger : IAdditionalDataHolder, IParsable + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// 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`. + public DateTimeOffset? Date { get; set; } + /// The email of the author of the tag +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Email { get; set; } +#nullable restore +#else + public string Email { get; set; } +#endif + /// The name of the author of the tag +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Name { get; set; } +#nullable restore +#else + public string Name { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public TagsPostRequestBody_tagger() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Repos.Item.Item.Git.Tags.TagsPostRequestBody_tagger CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Repos.Item.Item.Git.Tags.TagsPostRequestBody_tagger(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "date", n => { Date = n.GetDateTimeOffsetValue(); } }, + { "email", n => { Email = n.GetStringValue(); } }, + { "name", n => { Name = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteDateTimeOffsetValue("date", Date); + writer.WriteStringValue("email", Email); + writer.WriteStringValue("name", Name); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Git/Tags/TagsPostRequestBody_type.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Git/Tags/TagsPostRequestBody_type.cs new file mode 100644 index 0000000..d5c6e36 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Git/Tags/TagsPostRequestBody_type.cs @@ -0,0 +1,23 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.Git.Tags +{ + /// The type of the object we're tagging. Normally this is a `commit` but it can also be a `tree` or a `blob`. + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public enum TagsPostRequestBody_type + { + [EnumMember(Value = "commit")] + #pragma warning disable CS1591 + Commit, + #pragma warning restore CS1591 + [EnumMember(Value = "tree")] + #pragma warning disable CS1591 + Tree, + #pragma warning restore CS1591 + [EnumMember(Value = "blob")] + #pragma warning disable CS1591 + Blob, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Git/Tags/TagsRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Git/Tags/TagsRequestBuilder.cs new file mode 100644 index 0000000..b64f1da --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Git/Tags/TagsRequestBuilder.cs @@ -0,0 +1,118 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Ayllu.Github.Client.Repos.Item.Item.Git.Tags.Item; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.Git.Tags +{ + /// + /// Builds and executes requests for operations under \repos\{owner-id}\{repo-id}\git\tags + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class TagsRequestBuilder : BaseRequestBuilder + { + /// Gets an item from the Ayllu.Github.Client.repos.item.item.git.tags.item collection + /// Unique identifier of the item + /// A + public global::Ayllu.Github.Client.Repos.Item.Item.Git.Tags.Item.WithTag_shaItemRequestBuilder this[string position] + { + get + { + var urlTplParams = new Dictionary(PathParameters); + urlTplParams.Add("tag_sha", position); + return new global::Ayllu.Github.Client.Repos.Item.Item.Git.Tags.Item.WithTag_shaItemRequestBuilder(urlTplParams, RequestAdapter); + } + } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public TagsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/git/tags", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public TagsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/git/tags", rawUrl) + { + } + /// + /// 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/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/rest/git/refs#create-a-reference) the tag reference - this call would be unnecessary.**Signature verification object**The response will include a `verification` object that describes the result of verifying the commit's signature. The following fields are included in the `verification` object:| Name | Type | Description || ---- | ---- | ----------- || `verified` | `boolean` | Indicates whether GitHub considers the signature in this commit to be verified. || `reason` | `string` | The reason for verified value. Possible values and their meanings are enumerated in table below. || `signature` | `string` | The signature that was extracted from the commit. || `payload` | `string` | The value that was signed. || `verified_at` | `string` | The date the signature was verified by GitHub. |These are the possible values for `reason` in the `verification` object:| Value | Description || ----- | ----------- || `expired_key` | The key that made the signature is expired. || `not_signing_key` | The "signing" flag is not among the usage flags in the GPG key that made the signature. || `gpgverify_error` | There was an error communicating with the signature verification service. || `gpgverify_unavailable` | The signature verification service is currently unavailable. || `unsigned` | The object does not include a signature. || `unknown_signature_type` | A non-PGP signature was found in the commit. || `no_user` | No user was associated with the `committer` email address in the commit. || `unverified_email` | The `committer` email address in the commit was associated with a user, but the email address is not verified on their account. || `bad_email` | The `committer` email address in the commit is not included in the identities of the PGP key that made the signature. || `unknown_key` | The key that made the signature has not been registered with any user's account. || `malformed_signature` | There was an error parsing the signature. || `invalid` | The signature could not be cryptographically verified using the key whose key-id was found in the signature. || `valid` | None of the above errors applied, so the signature is considered to be verified. | + /// API method documentation + /// + /// A + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 409 status code + /// When receiving a 422 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PostAsync(global::Ayllu.Github.Client.Repos.Item.Item.Git.Tags.TagsPostRequestBody body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task PostAsync(global::Ayllu.Github.Client.Repos.Item.Item.Git.Tags.TagsPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPostRequestInformation(body, requestConfiguration); + var errorMapping = new Dictionary> + { + { "409", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "422", global::Ayllu.Github.Client.Models.ValidationError.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Models.GitTag.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// 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/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/rest/git/refs#create-a-reference) the tag reference - this call would be unnecessary.**Signature verification object**The response will include a `verification` object that describes the result of verifying the commit's signature. The following fields are included in the `verification` object:| Name | Type | Description || ---- | ---- | ----------- || `verified` | `boolean` | Indicates whether GitHub considers the signature in this commit to be verified. || `reason` | `string` | The reason for verified value. Possible values and their meanings are enumerated in table below. || `signature` | `string` | The signature that was extracted from the commit. || `payload` | `string` | The value that was signed. || `verified_at` | `string` | The date the signature was verified by GitHub. |These are the possible values for `reason` in the `verification` object:| Value | Description || ----- | ----------- || `expired_key` | The key that made the signature is expired. || `not_signing_key` | The "signing" flag is not among the usage flags in the GPG key that made the signature. || `gpgverify_error` | There was an error communicating with the signature verification service. || `gpgverify_unavailable` | The signature verification service is currently unavailable. || `unsigned` | The object does not include a signature. || `unknown_signature_type` | A non-PGP signature was found in the commit. || `no_user` | No user was associated with the `committer` email address in the commit. || `unverified_email` | The `committer` email address in the commit was associated with a user, but the email address is not verified on their account. || `bad_email` | The `committer` email address in the commit is not included in the identities of the PGP key that made the signature. || `unknown_key` | The key that made the signature has not been registered with any user's account. || `malformed_signature` | There was an error parsing the signature. || `invalid` | The signature could not be cryptographically verified using the key whose key-id was found in the signature. || `valid` | None of the above errors applied, so the signature is considered to be verified. | + /// + /// A + /// The request body + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPostRequestInformation(global::Ayllu.Github.Client.Repos.Item.Item.Git.Tags.TagsPostRequestBody body, Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToPostRequestInformation(global::Ayllu.Github.Client.Repos.Item.Item.Git.Tags.TagsPostRequestBody body, Action> requestConfiguration = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.Repos.Item.Item.Git.Tags.TagsRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Repos.Item.Item.Git.Tags.TagsRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class TagsRequestBuilderPostRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Git/Trees/Item/WithTree_shaItemRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Git/Trees/Item/WithTree_shaItemRequestBuilder.cs new file mode 100644 index 0000000..557d046 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Git/Trees/Item/WithTree_shaItemRequestBuilder.cs @@ -0,0 +1,119 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.Git.Trees.Item +{ + /// + /// Builds and executes requests for operations under \repos\{owner-id}\{repo-id}\git\trees\{tree_sha} + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithTree_shaItemRequestBuilder : BaseRequestBuilder + { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public WithTree_shaItemRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/git/trees/{tree_sha}{?recursive*}", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public WithTree_shaItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/git/trees/{tree_sha}{?recursive*}", rawUrl) + { + } + /// + /// 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. + /// API method documentation + /// + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 404 status code + /// When receiving a 409 status code + /// When receiving a 422 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "404", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "409", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "422", global::Ayllu.Github.Client.Models.ValidationError.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Models.GitTree.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// 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. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.Repos.Item.Item.Git.Trees.Item.WithTree_shaItemRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Repos.Item.Item.Git.Trees.Item.WithTree_shaItemRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// 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. + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithTree_shaItemRequestBuilderGetQueryParameters + { + /// 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. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("recursive")] + public string? Recursive { get; set; } +#nullable restore +#else + [QueryParameter("recursive")] + public string Recursive { get; set; } +#endif + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithTree_shaItemRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Git/Trees/TreesPostRequestBody.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Git/Trees/TreesPostRequestBody.cs new file mode 100644 index 0000000..163e4c6 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Git/Trees/TreesPostRequestBody.cs @@ -0,0 +1,75 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.Git.Trees +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class TreesPostRequestBody : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// 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. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? BaseTree { get; set; } +#nullable restore +#else + public string BaseTree { get; set; } +#endif + /// Objects (of `path`, `mode`, `type`, and `sha`) specifying a tree structure. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? Tree { get; set; } +#nullable restore +#else + public List Tree { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public TreesPostRequestBody() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Repos.Item.Item.Git.Trees.TreesPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Repos.Item.Item.Git.Trees.TreesPostRequestBody(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "base_tree", n => { BaseTree = n.GetStringValue(); } }, + { "tree", n => { Tree = n.GetCollectionOfObjectValues(global::Ayllu.Github.Client.Repos.Item.Item.Git.Trees.TreesPostRequestBody_tree.CreateFromDiscriminatorValue)?.AsList(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("base_tree", BaseTree); + writer.WriteCollectionOfObjectValues("tree", Tree); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Git/Trees/TreesPostRequestBody_tree.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Git/Trees/TreesPostRequestBody_tree.cs new file mode 100644 index 0000000..d9adc92 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Git/Trees/TreesPostRequestBody_tree.cs @@ -0,0 +1,93 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.Git.Trees +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class TreesPostRequestBody_tree : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// 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. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Content { get; set; } +#nullable restore +#else + public string Content { get; set; } +#endif + /// 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. + public global::Ayllu.Github.Client.Repos.Item.Item.Git.Trees.TreesPostRequestBody_tree_mode? Mode { get; set; } + /// The file referenced in the tree. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Path { get; set; } +#nullable restore +#else + public string Path { get; set; } +#endif + /// 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. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Sha { get; set; } +#nullable restore +#else + public string Sha { get; set; } +#endif + /// Either `blob`, `tree`, or `commit`. + public global::Ayllu.Github.Client.Repos.Item.Item.Git.Trees.TreesPostRequestBody_tree_type? Type { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public TreesPostRequestBody_tree() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Repos.Item.Item.Git.Trees.TreesPostRequestBody_tree CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Repos.Item.Item.Git.Trees.TreesPostRequestBody_tree(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "content", n => { Content = n.GetStringValue(); } }, + { "mode", n => { Mode = n.GetEnumValue(); } }, + { "path", n => { Path = n.GetStringValue(); } }, + { "sha", n => { Sha = n.GetStringValue(); } }, + { "type", n => { Type = n.GetEnumValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("content", Content); + writer.WriteEnumValue("mode", Mode); + writer.WriteStringValue("path", Path); + writer.WriteStringValue("sha", Sha); + writer.WriteEnumValue("type", Type); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Git/Trees/TreesPostRequestBody_tree_mode.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Git/Trees/TreesPostRequestBody_tree_mode.cs new file mode 100644 index 0000000..efb55ba --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Git/Trees/TreesPostRequestBody_tree_mode.cs @@ -0,0 +1,31 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.Git.Trees +{ + /// 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. + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public enum TreesPostRequestBody_tree_mode + { + [EnumMember(Value = "100644")] + #pragma warning disable CS1591 + OneZeroZeroSixFourFour, + #pragma warning restore CS1591 + [EnumMember(Value = "100755")] + #pragma warning disable CS1591 + OneZeroZeroSevenFiveFive, + #pragma warning restore CS1591 + [EnumMember(Value = "040000")] + #pragma warning disable CS1591 + ZeroFourZeroZeroZeroZero, + #pragma warning restore CS1591 + [EnumMember(Value = "160000")] + #pragma warning disable CS1591 + OneSixZeroZeroZeroZero, + #pragma warning restore CS1591 + [EnumMember(Value = "120000")] + #pragma warning disable CS1591 + OneTwoZeroZeroZeroZero, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Git/Trees/TreesPostRequestBody_tree_type.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Git/Trees/TreesPostRequestBody_tree_type.cs new file mode 100644 index 0000000..feb1214 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Git/Trees/TreesPostRequestBody_tree_type.cs @@ -0,0 +1,23 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.Git.Trees +{ + /// Either `blob`, `tree`, or `commit`. + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public enum TreesPostRequestBody_tree_type + { + [EnumMember(Value = "blob")] + #pragma warning disable CS1591 + Blob, + #pragma warning restore CS1591 + [EnumMember(Value = "tree")] + #pragma warning disable CS1591 + Tree, + #pragma warning restore CS1591 + [EnumMember(Value = "commit")] + #pragma warning disable CS1591 + Commit, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Git/Trees/TreesRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Git/Trees/TreesRequestBuilder.cs new file mode 100644 index 0000000..0eaba85 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Git/Trees/TreesRequestBuilder.cs @@ -0,0 +1,122 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Ayllu.Github.Client.Repos.Item.Item.Git.Trees.Item; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.Git.Trees +{ + /// + /// Builds and executes requests for operations under \repos\{owner-id}\{repo-id}\git\trees + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class TreesRequestBuilder : BaseRequestBuilder + { + /// Gets an item from the Ayllu.Github.Client.repos.item.item.git.trees.item collection + /// The SHA1 value or ref (branch or tag) name of the tree. + /// A + public global::Ayllu.Github.Client.Repos.Item.Item.Git.Trees.Item.WithTree_shaItemRequestBuilder this[string position] + { + get + { + var urlTplParams = new Dictionary(PathParameters); + urlTplParams.Add("tree_sha", position); + return new global::Ayllu.Github.Client.Repos.Item.Item.Git.Trees.Item.WithTree_shaItemRequestBuilder(urlTplParams, RequestAdapter); + } + } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public TreesRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/git/trees", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public TreesRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/git/trees", rawUrl) + { + } + /// + /// 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/rest/git/commits#create-a-commit)" and "[Update a reference](https://docs.github.com/rest/git/refs#update-a-reference)."Returns an error if you try to delete a file that does not exist. + /// API method documentation + /// + /// A + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 403 status code + /// When receiving a 404 status code + /// When receiving a 409 status code + /// When receiving a 422 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PostAsync(global::Ayllu.Github.Client.Repos.Item.Item.Git.Trees.TreesPostRequestBody body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task PostAsync(global::Ayllu.Github.Client.Repos.Item.Item.Git.Trees.TreesPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPostRequestInformation(body, requestConfiguration); + var errorMapping = new Dictionary> + { + { "403", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "404", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "409", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "422", global::Ayllu.Github.Client.Models.ValidationError.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Models.GitTree.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// 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/rest/git/commits#create-a-commit)" and "[Update a reference](https://docs.github.com/rest/git/refs#update-a-reference)."Returns an error if you try to delete a file that does not exist. + /// + /// A + /// The request body + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPostRequestInformation(global::Ayllu.Github.Client.Repos.Item.Item.Git.Trees.TreesPostRequestBody body, Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToPostRequestInformation(global::Ayllu.Github.Client.Repos.Item.Item.Git.Trees.TreesPostRequestBody body, Action> requestConfiguration = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.Repos.Item.Item.Git.Trees.TreesRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Repos.Item.Item.Git.Trees.TreesRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class TreesRequestBuilderPostRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Hooks/HooksPostRequestBody.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Hooks/HooksPostRequestBody.cs new file mode 100644 index 0000000..e277fa5 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Hooks/HooksPostRequestBody.cs @@ -0,0 +1,79 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.Hooks +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class HooksPostRequestBody : IParsable + #pragma warning restore CS1591 + { + /// Determines if notifications are sent when the webhook is triggered. Set to `true` to send notifications. + public bool? Active { get; set; } + /// Key/value pairs to provide settings for this webhook. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Repos.Item.Item.Hooks.HooksPostRequestBody_config? Config { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Repos.Item.Item.Hooks.HooksPostRequestBody_config Config { get; set; } +#endif + /// Determines what [events](https://docs.github.com/webhooks/event-payloads) the hook is triggered for. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? Events { get; set; } +#nullable restore +#else + public List Events { get; set; } +#endif + /// Use `web` to create a webhook. Default: `web`. This parameter only accepts the value `web`. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Name { get; set; } +#nullable restore +#else + public string Name { get; set; } +#endif + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Repos.Item.Item.Hooks.HooksPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Repos.Item.Item.Hooks.HooksPostRequestBody(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "active", n => { Active = n.GetBoolValue(); } }, + { "config", n => { Config = n.GetObjectValue(global::Ayllu.Github.Client.Repos.Item.Item.Hooks.HooksPostRequestBody_config.CreateFromDiscriminatorValue); } }, + { "events", n => { Events = n.GetCollectionOfPrimitiveValues()?.AsList(); } }, + { "name", n => { Name = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteBoolValue("active", Active); + writer.WriteObjectValue("config", Config); + writer.WriteCollectionOfPrimitiveValues("events", Events); + writer.WriteStringValue("name", Name); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Hooks/HooksPostRequestBody_config.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Hooks/HooksPostRequestBody_config.cs new file mode 100644 index 0000000..a68615c --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Hooks/HooksPostRequestBody_config.cs @@ -0,0 +1,97 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.Hooks +{ + /// + /// Key/value pairs to provide settings for this webhook. + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class HooksPostRequestBody_config : IAdditionalDataHolder, IParsable + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The media type used to serialize the payloads. Supported values include `json` and `form`. The default is `form`. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? ContentType { get; set; } +#nullable restore +#else + public string ContentType { get; set; } +#endif + /// The insecure_ssl property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.WebhookConfigInsecureSsl? InsecureSsl { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.WebhookConfigInsecureSsl InsecureSsl { get; set; } +#endif + /// 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/webhooks/event-payloads/#delivery-headers). +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Secret { get; set; } +#nullable restore +#else + public string Secret { get; set; } +#endif + /// The URL to which the payloads will be delivered. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Url { get; set; } +#nullable restore +#else + public string Url { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public HooksPostRequestBody_config() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Repos.Item.Item.Hooks.HooksPostRequestBody_config CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Repos.Item.Item.Hooks.HooksPostRequestBody_config(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "content_type", n => { ContentType = n.GetStringValue(); } }, + { "insecure_ssl", n => { InsecureSsl = n.GetObjectValue(global::Ayllu.Github.Client.Models.WebhookConfigInsecureSsl.CreateFromDiscriminatorValue); } }, + { "secret", n => { Secret = n.GetStringValue(); } }, + { "url", n => { Url = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("content_type", ContentType); + writer.WriteObjectValue("insecure_ssl", InsecureSsl); + writer.WriteStringValue("secret", Secret); + writer.WriteStringValue("url", Url); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Hooks/HooksRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Hooks/HooksRequestBuilder.cs new file mode 100644 index 0000000..206f907 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Hooks/HooksRequestBuilder.cs @@ -0,0 +1,198 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Ayllu.Github.Client.Repos.Item.Item.Hooks.Item; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.Hooks +{ + /// + /// Builds and executes requests for operations under \repos\{owner-id}\{repo-id}\hooks + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class HooksRequestBuilder : BaseRequestBuilder + { + /// Gets an item from the Ayllu.Github.Client.repos.item.item.hooks.item collection + /// The unique identifier of the hook. You can find this value in the `X-GitHub-Hook-ID` header of a webhook delivery. + /// A + public global::Ayllu.Github.Client.Repos.Item.Item.Hooks.Item.WithHook_ItemRequestBuilder this[int position] + { + get + { + var urlTplParams = new Dictionary(PathParameters); + urlTplParams.Add("hook_id", position); + return new global::Ayllu.Github.Client.Repos.Item.Item.Hooks.Item.WithHook_ItemRequestBuilder(urlTplParams, RequestAdapter); + } + } + /// Gets an item from the Ayllu.Github.Client.repos.item.item.hooks.item collection + /// The unique identifier of the hook. You can find this value in the `X-GitHub-Hook-ID` header of a webhook delivery. + /// A + [Obsolete("This indexer is deprecated and will be removed in the next major version. Use the one with the typed parameter instead.")] + public global::Ayllu.Github.Client.Repos.Item.Item.Hooks.Item.WithHook_ItemRequestBuilder this[string position] + { + get + { + var urlTplParams = new Dictionary(PathParameters); + if (!string.IsNullOrWhiteSpace(position)) urlTplParams.Add("hook_id", position); + return new global::Ayllu.Github.Client.Repos.Item.Item.Hooks.Item.WithHook_ItemRequestBuilder(urlTplParams, RequestAdapter); + } + } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public HooksRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/hooks{?page*,per_page*}", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public HooksRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/hooks{?page*,per_page*}", rawUrl) + { + } + /// + /// Lists webhooks for a repository. `last response` may return null if there have not been any deliveries within 30 days. + /// API method documentation + /// + /// A List<global::Ayllu.Github.Client.Models.Hook> + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 404 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task?> GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task> GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "404", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + }; + var collectionResult = await RequestAdapter.SendCollectionAsync(requestInfo, global::Ayllu.Github.Client.Models.Hook.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + return collectionResult?.AsList(); + } + /// + /// 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. + /// API method documentation + /// + /// A + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 403 status code + /// When receiving a 404 status code + /// When receiving a 422 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PostAsync(global::Ayllu.Github.Client.Repos.Item.Item.Hooks.HooksPostRequestBody body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task PostAsync(global::Ayllu.Github.Client.Repos.Item.Item.Hooks.HooksPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPostRequestInformation(body, requestConfiguration); + var errorMapping = new Dictionary> + { + { "403", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "404", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "422", global::Ayllu.Github.Client.Models.ValidationError.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Models.Hook.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// Lists webhooks for a repository. `last response` may return null if there have not been any deliveries within 30 days. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// 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. + /// + /// A + /// The request body + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPostRequestInformation(global::Ayllu.Github.Client.Repos.Item.Item.Hooks.HooksPostRequestBody body, Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToPostRequestInformation(global::Ayllu.Github.Client.Repos.Item.Item.Hooks.HooksPostRequestBody body, Action> requestConfiguration = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.Repos.Item.Item.Hooks.HooksRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Repos.Item.Item.Hooks.HooksRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Lists webhooks for a repository. `last response` may return null if there have not been any deliveries within 30 days. + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class HooksRequestBuilderGetQueryParameters + { + /// The page number of the results to fetch. For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." + [QueryParameter("page")] + public int? Page { get; set; } + /// The number of results per page (max 100). For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." + [QueryParameter("per_page")] + public int? PerPage { get; set; } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class HooksRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class HooksRequestBuilderPostRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Hooks/Item/Config/ConfigPatchRequestBody.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Hooks/Item/Config/ConfigPatchRequestBody.cs new file mode 100644 index 0000000..2282008 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Hooks/Item/Config/ConfigPatchRequestBody.cs @@ -0,0 +1,86 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.Hooks.Item.Config +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class ConfigPatchRequestBody : IParsable + #pragma warning restore CS1591 + { + /// The media type used to serialize the payloads. Supported values include `json` and `form`. The default is `form`. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? ContentType { get; set; } +#nullable restore +#else + public string ContentType { get; set; } +#endif + /// The insecure_ssl property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.WebhookConfigInsecureSsl? InsecureSsl { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.WebhookConfigInsecureSsl InsecureSsl { get; set; } +#endif + /// 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/webhooks/event-payloads/#delivery-headers). +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Secret { get; set; } +#nullable restore +#else + public string Secret { get; set; } +#endif + /// The URL to which the payloads will be delivered. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Url { get; set; } +#nullable restore +#else + public string Url { get; set; } +#endif + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Repos.Item.Item.Hooks.Item.Config.ConfigPatchRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Repos.Item.Item.Hooks.Item.Config.ConfigPatchRequestBody(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "content_type", n => { ContentType = n.GetStringValue(); } }, + { "insecure_ssl", n => { InsecureSsl = n.GetObjectValue(global::Ayllu.Github.Client.Models.WebhookConfigInsecureSsl.CreateFromDiscriminatorValue); } }, + { "secret", n => { Secret = n.GetStringValue(); } }, + { "url", n => { Url = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("content_type", ContentType); + writer.WriteObjectValue("insecure_ssl", InsecureSsl); + writer.WriteStringValue("secret", Secret); + writer.WriteStringValue("url", Url); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Hooks/Item/Config/ConfigRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Hooks/Item/Config/ConfigRequestBuilder.cs new file mode 100644 index 0000000..44a8cb4 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Hooks/Item/Config/ConfigRequestBuilder.cs @@ -0,0 +1,144 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.Hooks.Item.Config +{ + /// + /// Builds and executes requests for operations under \repos\{owner-id}\{repo-id}\hooks\{hook_id}\config + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class ConfigRequestBuilder : BaseRequestBuilder + { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public ConfigRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/hooks/{hook_id}/config", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public ConfigRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/hooks/{hook_id}/config", rawUrl) + { + } + /// + /// 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. + /// API method documentation + /// + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Models.WebhookConfig.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false); + } + /// + /// 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. + /// API method documentation + /// + /// A + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PatchAsync(global::Ayllu.Github.Client.Repos.Item.Item.Hooks.Item.Config.ConfigPatchRequestBody body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task PatchAsync(global::Ayllu.Github.Client.Repos.Item.Item.Hooks.Item.Config.ConfigPatchRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPatchRequestInformation(body, requestConfiguration); + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Models.WebhookConfig.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false); + } + /// + /// 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. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// 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. + /// + /// A + /// The request body + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPatchRequestInformation(global::Ayllu.Github.Client.Repos.Item.Item.Hooks.Item.Config.ConfigPatchRequestBody body, Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToPatchRequestInformation(global::Ayllu.Github.Client.Repos.Item.Item.Hooks.Item.Config.ConfigPatchRequestBody body, Action> requestConfiguration = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.Repos.Item.Item.Hooks.Item.Config.ConfigRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Repos.Item.Item.Hooks.Item.Config.ConfigRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class ConfigRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class ConfigRequestBuilderPatchRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Hooks/Item/Deliveries/DeliveriesRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Hooks/Item/Deliveries/DeliveriesRequestBuilder.cs new file mode 100644 index 0000000..6190467 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Hooks/Item/Deliveries/DeliveriesRequestBuilder.cs @@ -0,0 +1,147 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Ayllu.Github.Client.Repos.Item.Item.Hooks.Item.Deliveries.Item; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.Hooks.Item.Deliveries +{ + /// + /// Builds and executes requests for operations under \repos\{owner-id}\{repo-id}\hooks\{hook_id}\deliveries + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class DeliveriesRequestBuilder : BaseRequestBuilder + { + /// Gets an item from the Ayllu.Github.Client.repos.item.item.hooks.item.deliveries.item collection + /// Unique identifier of the item + /// A + public global::Ayllu.Github.Client.Repos.Item.Item.Hooks.Item.Deliveries.Item.WithDelivery_ItemRequestBuilder this[int position] + { + get + { + var urlTplParams = new Dictionary(PathParameters); + urlTplParams.Add("delivery_id", position); + return new global::Ayllu.Github.Client.Repos.Item.Item.Hooks.Item.Deliveries.Item.WithDelivery_ItemRequestBuilder(urlTplParams, RequestAdapter); + } + } + /// Gets an item from the Ayllu.Github.Client.repos.item.item.hooks.item.deliveries.item collection + /// Unique identifier of the item + /// A + [Obsolete("This indexer is deprecated and will be removed in the next major version. Use the one with the typed parameter instead.")] + public global::Ayllu.Github.Client.Repos.Item.Item.Hooks.Item.Deliveries.Item.WithDelivery_ItemRequestBuilder this[string position] + { + get + { + var urlTplParams = new Dictionary(PathParameters); + if (!string.IsNullOrWhiteSpace(position)) urlTplParams.Add("delivery_id", position); + return new global::Ayllu.Github.Client.Repos.Item.Item.Hooks.Item.Deliveries.Item.WithDelivery_ItemRequestBuilder(urlTplParams, RequestAdapter); + } + } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public DeliveriesRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/hooks/{hook_id}/deliveries{?cursor*,per_page*}", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public DeliveriesRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/hooks/{hook_id}/deliveries{?cursor*,per_page*}", rawUrl) + { + } + /// + /// Returns a list of webhook deliveries for a webhook configured in a repository. + /// API method documentation + /// + /// A List<global::Ayllu.Github.Client.Models.HookDeliveryItem> + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 400 status code + /// When receiving a 422 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task?> GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task> GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "400", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "422", global::Ayllu.Github.Client.Models.ValidationError.CreateFromDiscriminatorValue }, + }; + var collectionResult = await RequestAdapter.SendCollectionAsync(requestInfo, global::Ayllu.Github.Client.Models.HookDeliveryItem.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + return collectionResult?.AsList(); + } + /// + /// Returns a list of webhook deliveries for a webhook configured in a repository. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.Repos.Item.Item.Hooks.Item.Deliveries.DeliveriesRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Repos.Item.Item.Hooks.Item.Deliveries.DeliveriesRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Returns a list of webhook deliveries for a webhook configured in a repository. + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class DeliveriesRequestBuilderGetQueryParameters + { + /// 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. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("cursor")] + public string? Cursor { get; set; } +#nullable restore +#else + [QueryParameter("cursor")] + public string Cursor { get; set; } +#endif + /// The number of results per page (max 100). For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." + [QueryParameter("per_page")] + public int? PerPage { get; set; } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class DeliveriesRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Hooks/Item/Deliveries/Item/Attempts/AttemptsPostResponse.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Hooks/Item/Deliveries/Item/Attempts/AttemptsPostResponse.cs new file mode 100644 index 0000000..760e281 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Hooks/Item/Deliveries/Item/Attempts/AttemptsPostResponse.cs @@ -0,0 +1,55 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.Hooks.Item.Deliveries.Item.Attempts +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class AttemptsPostResponse : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public AttemptsPostResponse() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Repos.Item.Item.Hooks.Item.Deliveries.Item.Attempts.AttemptsPostResponse CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Repos.Item.Item.Hooks.Item.Deliveries.Item.Attempts.AttemptsPostResponse(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Hooks/Item/Deliveries/Item/Attempts/AttemptsRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Hooks/Item/Deliveries/Item/Attempts/AttemptsRequestBuilder.cs new file mode 100644 index 0000000..2fcc087 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Hooks/Item/Deliveries/Item/Attempts/AttemptsRequestBuilder.cs @@ -0,0 +1,127 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.Hooks.Item.Deliveries.Item.Attempts +{ + /// + /// Builds and executes requests for operations under \repos\{owner-id}\{repo-id}\hooks\{hook_id}\deliveries\{delivery_id}\attempts + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class AttemptsRequestBuilder : BaseRequestBuilder + { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public AttemptsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/hooks/{hook_id}/deliveries/{delivery_id}/attempts", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public AttemptsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/hooks/{hook_id}/deliveries/{delivery_id}/attempts", rawUrl) + { + } + /// + /// Redeliver a webhook delivery for a webhook configured in a repository. + /// API method documentation + /// + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 400 status code + /// When receiving a 422 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PostAsAttemptsPostResponseAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task PostAsAttemptsPostResponseAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToPostRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "400", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "422", global::Ayllu.Github.Client.Models.ValidationError.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Repos.Item.Item.Hooks.Item.Deliveries.Item.Attempts.AttemptsPostResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// Redeliver a webhook delivery for a webhook configured in a repository. + /// API method documentation + /// + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 400 status code + /// When receiving a 422 status code + [Obsolete("This method is obsolete. Use PostAsAttemptsPostResponseAsync instead.")] +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PostAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task PostAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToPostRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "400", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "422", global::Ayllu.Github.Client.Models.ValidationError.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Repos.Item.Item.Hooks.Item.Deliveries.Item.Attempts.AttemptsResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// Redeliver a webhook delivery for a webhook configured in a repository. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPostRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToPostRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.Repos.Item.Item.Hooks.Item.Deliveries.Item.Attempts.AttemptsRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Repos.Item.Item.Hooks.Item.Deliveries.Item.Attempts.AttemptsRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class AttemptsRequestBuilderPostRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Hooks/Item/Deliveries/Item/Attempts/AttemptsResponse.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Hooks/Item/Deliveries/Item/Attempts/AttemptsResponse.cs new file mode 100644 index 0000000..06987e2 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Hooks/Item/Deliveries/Item/Attempts/AttemptsResponse.cs @@ -0,0 +1,28 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.Hooks.Item.Deliveries.Item.Attempts +{ + [Obsolete("This class is obsolete. Use AttemptsPostResponse instead.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class AttemptsResponse : global::Ayllu.Github.Client.Repos.Item.Item.Hooks.Item.Deliveries.Item.Attempts.AttemptsPostResponse, IParsable + #pragma warning restore CS1591 + { + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static new global::Ayllu.Github.Client.Repos.Item.Item.Hooks.Item.Deliveries.Item.Attempts.AttemptsResponse CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Repos.Item.Item.Hooks.Item.Deliveries.Item.Attempts.AttemptsResponse(); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Hooks/Item/Deliveries/Item/WithDelivery_ItemRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Hooks/Item/Deliveries/Item/WithDelivery_ItemRequestBuilder.cs new file mode 100644 index 0000000..7fd0e13 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Hooks/Item/Deliveries/Item/WithDelivery_ItemRequestBuilder.cs @@ -0,0 +1,106 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Ayllu.Github.Client.Repos.Item.Item.Hooks.Item.Deliveries.Item.Attempts; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.Hooks.Item.Deliveries.Item +{ + /// + /// Builds and executes requests for operations under \repos\{owner-id}\{repo-id}\hooks\{hook_id}\deliveries\{delivery_id} + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithDelivery_ItemRequestBuilder : BaseRequestBuilder + { + /// The attempts property + public global::Ayllu.Github.Client.Repos.Item.Item.Hooks.Item.Deliveries.Item.Attempts.AttemptsRequestBuilder Attempts + { + get => new global::Ayllu.Github.Client.Repos.Item.Item.Hooks.Item.Deliveries.Item.Attempts.AttemptsRequestBuilder(PathParameters, RequestAdapter); + } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public WithDelivery_ItemRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/hooks/{hook_id}/deliveries/{delivery_id}", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public WithDelivery_ItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/hooks/{hook_id}/deliveries/{delivery_id}", rawUrl) + { + } + /// + /// Returns a delivery for a webhook configured in a repository. + /// API method documentation + /// + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 400 status code + /// When receiving a 422 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "400", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "422", global::Ayllu.Github.Client.Models.ValidationError.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Models.HookDelivery.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// Returns a delivery for a webhook configured in a repository. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.Repos.Item.Item.Hooks.Item.Deliveries.Item.WithDelivery_ItemRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Repos.Item.Item.Hooks.Item.Deliveries.Item.WithDelivery_ItemRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithDelivery_ItemRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Hooks/Item/Pings/PingsRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Hooks/Item/Pings/PingsRequestBuilder.cs new file mode 100644 index 0000000..10ecad6 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Hooks/Item/Pings/PingsRequestBuilder.cs @@ -0,0 +1,97 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.Hooks.Item.Pings +{ + /// + /// Builds and executes requests for operations under \repos\{owner-id}\{repo-id}\hooks\{hook_id}\pings + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class PingsRequestBuilder : BaseRequestBuilder + { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public PingsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/hooks/{hook_id}/pings", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public PingsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/hooks/{hook_id}/pings", rawUrl) + { + } + /// + /// This will trigger a [ping event](https://docs.github.com/webhooks/#ping-event) to be sent to the hook. + /// API method documentation + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 404 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PostAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task PostAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToPostRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "404", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + }; + await RequestAdapter.SendNoContentAsync(requestInfo, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// This will trigger a [ping event](https://docs.github.com/webhooks/#ping-event) to be sent to the hook. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPostRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToPostRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.Repos.Item.Item.Hooks.Item.Pings.PingsRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Repos.Item.Item.Hooks.Item.Pings.PingsRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class PingsRequestBuilderPostRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Hooks/Item/Tests/TestsRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Hooks/Item/Tests/TestsRequestBuilder.cs new file mode 100644 index 0000000..ba28d4a --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Hooks/Item/Tests/TestsRequestBuilder.cs @@ -0,0 +1,97 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.Hooks.Item.Tests +{ + /// + /// Builds and executes requests for operations under \repos\{owner-id}\{repo-id}\hooks\{hook_id}\tests + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class TestsRequestBuilder : BaseRequestBuilder + { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public TestsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/hooks/{hook_id}/tests", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public TestsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/hooks/{hook_id}/tests", rawUrl) + { + } + /// + /// 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` + /// API method documentation + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 404 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PostAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task PostAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToPostRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "404", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + }; + await RequestAdapter.SendNoContentAsync(requestInfo, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// 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` + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPostRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToPostRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.Repos.Item.Item.Hooks.Item.Tests.TestsRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Repos.Item.Item.Hooks.Item.Tests.TestsRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class TestsRequestBuilderPostRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Hooks/Item/WithHook_ItemRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Hooks/Item/WithHook_ItemRequestBuilder.cs new file mode 100644 index 0000000..b62fb66 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Hooks/Item/WithHook_ItemRequestBuilder.cs @@ -0,0 +1,230 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Ayllu.Github.Client.Repos.Item.Item.Hooks.Item.Config; +using Ayllu.Github.Client.Repos.Item.Item.Hooks.Item.Deliveries; +using Ayllu.Github.Client.Repos.Item.Item.Hooks.Item.Pings; +using Ayllu.Github.Client.Repos.Item.Item.Hooks.Item.Tests; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.Hooks.Item +{ + /// + /// Builds and executes requests for operations under \repos\{owner-id}\{repo-id}\hooks\{hook_id} + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithHook_ItemRequestBuilder : BaseRequestBuilder + { + /// The config property + public global::Ayllu.Github.Client.Repos.Item.Item.Hooks.Item.Config.ConfigRequestBuilder Config + { + get => new global::Ayllu.Github.Client.Repos.Item.Item.Hooks.Item.Config.ConfigRequestBuilder(PathParameters, RequestAdapter); + } + /// The deliveries property + public global::Ayllu.Github.Client.Repos.Item.Item.Hooks.Item.Deliveries.DeliveriesRequestBuilder Deliveries + { + get => new global::Ayllu.Github.Client.Repos.Item.Item.Hooks.Item.Deliveries.DeliveriesRequestBuilder(PathParameters, RequestAdapter); + } + /// The pings property + public global::Ayllu.Github.Client.Repos.Item.Item.Hooks.Item.Pings.PingsRequestBuilder Pings + { + get => new global::Ayllu.Github.Client.Repos.Item.Item.Hooks.Item.Pings.PingsRequestBuilder(PathParameters, RequestAdapter); + } + /// The tests property + public global::Ayllu.Github.Client.Repos.Item.Item.Hooks.Item.Tests.TestsRequestBuilder Tests + { + get => new global::Ayllu.Github.Client.Repos.Item.Item.Hooks.Item.Tests.TestsRequestBuilder(PathParameters, RequestAdapter); + } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public WithHook_ItemRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/hooks/{hook_id}", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public WithHook_ItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/hooks/{hook_id}", rawUrl) + { + } + /// + /// Delete a webhook for an organization.The authenticated user must be a repository owner, or have admin access in the repository, to delete the webhook. + /// API method documentation + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 404 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task DeleteAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task DeleteAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToDeleteRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "404", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + }; + await RequestAdapter.SendNoContentAsync(requestInfo, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// 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)." + /// API method documentation + /// + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 404 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "404", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Models.Hook.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// 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)." + /// API method documentation + /// + /// A + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 404 status code + /// When receiving a 422 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PatchAsync(global::Ayllu.Github.Client.Repos.Item.Item.Hooks.Item.WithHook_PatchRequestBody body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task PatchAsync(global::Ayllu.Github.Client.Repos.Item.Item.Hooks.Item.WithHook_PatchRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPatchRequestInformation(body, requestConfiguration); + var errorMapping = new Dictionary> + { + { "404", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "422", global::Ayllu.Github.Client.Models.ValidationError.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Models.Hook.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// Delete a webhook for an organization.The authenticated user must be a repository owner, or have admin access in the repository, to delete the webhook. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToDeleteRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToDeleteRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.DELETE, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// 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)." + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// 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)." + /// + /// A + /// The request body + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPatchRequestInformation(global::Ayllu.Github.Client.Repos.Item.Item.Hooks.Item.WithHook_PatchRequestBody body, Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToPatchRequestInformation(global::Ayllu.Github.Client.Repos.Item.Item.Hooks.Item.WithHook_PatchRequestBody body, Action> requestConfiguration = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.Repos.Item.Item.Hooks.Item.WithHook_ItemRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Repos.Item.Item.Hooks.Item.WithHook_ItemRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithHook_ItemRequestBuilderDeleteRequestConfiguration : RequestConfiguration + { + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithHook_ItemRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithHook_ItemRequestBuilderPatchRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Hooks/Item/WithHook_PatchRequestBody.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Hooks/Item/WithHook_PatchRequestBody.cs new file mode 100644 index 0000000..50f6b40 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Hooks/Item/WithHook_PatchRequestBody.cs @@ -0,0 +1,100 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.Hooks.Item +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class WithHook_PatchRequestBody : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Determines if notifications are sent when the webhook is triggered. Set to `true` to send notifications. + public bool? Active { get; set; } + /// Determines a list of events to be added to the list of events that the Hook triggers for. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? AddEvents { get; set; } +#nullable restore +#else + public List AddEvents { get; set; } +#endif + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// Configuration object of the webhook +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.WebhookConfig? Config { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.WebhookConfig Config { get; set; } +#endif + /// Determines what [events](https://docs.github.com/webhooks/event-payloads) the hook is triggered for. This replaces the entire array of events. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? Events { get; set; } +#nullable restore +#else + public List Events { get; set; } +#endif + /// Determines a list of events to be removed from the list of events that the Hook triggers for. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? RemoveEvents { get; set; } +#nullable restore +#else + public List RemoveEvents { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public WithHook_PatchRequestBody() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Repos.Item.Item.Hooks.Item.WithHook_PatchRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Repos.Item.Item.Hooks.Item.WithHook_PatchRequestBody(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "active", n => { Active = n.GetBoolValue(); } }, + { "add_events", n => { AddEvents = n.GetCollectionOfPrimitiveValues()?.AsList(); } }, + { "config", n => { Config = n.GetObjectValue(global::Ayllu.Github.Client.Models.WebhookConfig.CreateFromDiscriminatorValue); } }, + { "events", n => { Events = n.GetCollectionOfPrimitiveValues()?.AsList(); } }, + { "remove_events", n => { RemoveEvents = n.GetCollectionOfPrimitiveValues()?.AsList(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteBoolValue("active", Active); + writer.WriteCollectionOfPrimitiveValues("add_events", AddEvents); + writer.WriteObjectValue("config", Config); + writer.WriteCollectionOfPrimitiveValues("events", Events); + writer.WriteCollectionOfPrimitiveValues("remove_events", RemoveEvents); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Import/Authors/AuthorsRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Import/Authors/AuthorsRequestBuilder.cs new file mode 100644 index 0000000..3a7a495 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Import/Authors/AuthorsRequestBuilder.cs @@ -0,0 +1,141 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Ayllu.Github.Client.Repos.Item.Item.Import.Authors.Item; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.Import.Authors +{ + /// + /// Builds and executes requests for operations under \repos\{owner-id}\{repo-id}\import\authors + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class AuthorsRequestBuilder : BaseRequestBuilder + { + /// Gets an item from the Ayllu.Github.Client.repos.item.item.import.authors.item collection + /// Unique identifier of the item + /// A + [Obsolete("")] + public global::Ayllu.Github.Client.Repos.Item.Item.Import.Authors.Item.WithAuthor_ItemRequestBuilder this[int position] + { + get + { + var urlTplParams = new Dictionary(PathParameters); + urlTplParams.Add("author_id", position); + return new global::Ayllu.Github.Client.Repos.Item.Item.Import.Authors.Item.WithAuthor_ItemRequestBuilder(urlTplParams, RequestAdapter); + } + } + /// Gets an item from the Ayllu.Github.Client.repos.item.item.import.authors.item collection + /// Unique identifier of the item + /// A + [Obsolete("This indexer is deprecated and will be removed in the next major version. Use the one with the typed parameter instead.")] + public global::Ayllu.Github.Client.Repos.Item.Item.Import.Authors.Item.WithAuthor_ItemRequestBuilder this[string position] + { + get + { + var urlTplParams = new Dictionary(PathParameters); + if (!string.IsNullOrWhiteSpace(position)) urlTplParams.Add("author_id", position); + return new global::Ayllu.Github.Client.Repos.Item.Item.Import.Authors.Item.WithAuthor_ItemRequestBuilder(urlTplParams, RequestAdapter); + } + } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public AuthorsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/import/authors{?since*}", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public AuthorsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/import/authors{?since*}", rawUrl) + { + } + /// + /// 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 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 <hubot@12341234-abab-fefe-8787-fedcba987654>`.This endpoint and the [Map a commit author](https://docs.github.com/rest/migrations/source-imports#map-a-commit-author) endpoint allow you to provide correct Git author information.> [!WARNING]> **Endpoint closing down notice:** Due to very low levels of usage and available alternatives, this endpoint is closing down 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). + /// API method documentation + /// + /// A List<global::Ayllu.Github.Client.Models.PorterAuthor> + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 404 status code + /// When receiving a 503 status code + [Obsolete("")] +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task?> GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task> GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "404", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "503", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + }; + var collectionResult = await RequestAdapter.SendCollectionAsync(requestInfo, global::Ayllu.Github.Client.Models.PorterAuthor.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + return collectionResult?.AsList(); + } + /// + /// 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 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 <hubot@12341234-abab-fefe-8787-fedcba987654>`.This endpoint and the [Map a commit author](https://docs.github.com/rest/migrations/source-imports#map-a-commit-author) endpoint allow you to provide correct Git author information.> [!WARNING]> **Endpoint closing down notice:** Due to very low levels of usage and available alternatives, this endpoint is closing down 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). + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. + [Obsolete("")] +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + [Obsolete("")] + public global::Ayllu.Github.Client.Repos.Item.Item.Import.Authors.AuthorsRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Repos.Item.Item.Import.Authors.AuthorsRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// 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 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 <hubot@12341234-abab-fefe-8787-fedcba987654>`.This endpoint and the [Map a commit author](https://docs.github.com/rest/migrations/source-imports#map-a-commit-author) endpoint allow you to provide correct Git author information.> [!WARNING]> **Endpoint closing down notice:** Due to very low levels of usage and available alternatives, this endpoint is closing down 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). + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class AuthorsRequestBuilderGetQueryParameters + { + /// A user ID. Only return users with an ID greater than this ID. + [QueryParameter("since")] + public int? Since { get; set; } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class AuthorsRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Import/Authors/Item/WithAuthor_ItemRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Import/Authors/Item/WithAuthor_ItemRequestBuilder.cs new file mode 100644 index 0000000..3eb17d1 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Import/Authors/Item/WithAuthor_ItemRequestBuilder.cs @@ -0,0 +1,110 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.Import.Authors.Item +{ + /// + /// Builds and executes requests for operations under \repos\{owner-id}\{repo-id}\import\authors\{author_id} + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithAuthor_ItemRequestBuilder : BaseRequestBuilder + { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public WithAuthor_ItemRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/import/authors/{author_id}", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public WithAuthor_ItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/import/authors/{author_id}", rawUrl) + { + } + /// + /// Update an author's identity for the import. Your application can continue updating authors any time before you pushnew commits to the repository.> [!WARNING]> **Endpoint closing down notice:** Due to very low levels of usage and available alternatives, this endpoint is closing down 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). + /// API method documentation + /// + /// A + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 404 status code + /// When receiving a 422 status code + /// When receiving a 503 status code + [Obsolete("")] +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PatchAsync(global::Ayllu.Github.Client.Repos.Item.Item.Import.Authors.Item.WithAuthor_PatchRequestBody body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task PatchAsync(global::Ayllu.Github.Client.Repos.Item.Item.Import.Authors.Item.WithAuthor_PatchRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPatchRequestInformation(body, requestConfiguration); + var errorMapping = new Dictionary> + { + { "404", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "422", global::Ayllu.Github.Client.Models.ValidationError.CreateFromDiscriminatorValue }, + { "503", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Models.PorterAuthor.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// Update an author's identity for the import. Your application can continue updating authors any time before you pushnew commits to the repository.> [!WARNING]> **Endpoint closing down notice:** Due to very low levels of usage and available alternatives, this endpoint is closing down 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). + /// + /// A + /// The request body + /// Configuration for the request such as headers, query parameters, and middleware options. + [Obsolete("")] +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPatchRequestInformation(global::Ayllu.Github.Client.Repos.Item.Item.Import.Authors.Item.WithAuthor_PatchRequestBody body, Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToPatchRequestInformation(global::Ayllu.Github.Client.Repos.Item.Item.Import.Authors.Item.WithAuthor_PatchRequestBody body, Action> requestConfiguration = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + [Obsolete("")] + public global::Ayllu.Github.Client.Repos.Item.Item.Import.Authors.Item.WithAuthor_ItemRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Repos.Item.Item.Import.Authors.Item.WithAuthor_ItemRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithAuthor_ItemRequestBuilderPatchRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Import/Authors/Item/WithAuthor_PatchRequestBody.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Import/Authors/Item/WithAuthor_PatchRequestBody.cs new file mode 100644 index 0000000..40e221e --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Import/Authors/Item/WithAuthor_PatchRequestBody.cs @@ -0,0 +1,65 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.Import.Authors.Item +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class WithAuthor_PatchRequestBody : IParsable + #pragma warning restore CS1591 + { + /// The new Git author email. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Email { get; set; } +#nullable restore +#else + public string Email { get; set; } +#endif + /// The new Git author name. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Name { get; set; } +#nullable restore +#else + public string Name { get; set; } +#endif + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Repos.Item.Item.Import.Authors.Item.WithAuthor_PatchRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Repos.Item.Item.Import.Authors.Item.WithAuthor_PatchRequestBody(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "email", n => { Email = n.GetStringValue(); } }, + { "name", n => { Name = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("email", Email); + writer.WriteStringValue("name", Name); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Import/ImportPatchRequestBody.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Import/ImportPatchRequestBody.cs new file mode 100644 index 0000000..cf30e37 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Import/ImportPatchRequestBody.cs @@ -0,0 +1,89 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.Import +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class ImportPatchRequestBody : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// For a tfvc import, the name of the project that is being imported. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? TfvcProject { get; set; } +#nullable restore +#else + public string TfvcProject { get; set; } +#endif + /// The type of version control system you are migrating from. + public global::Ayllu.Github.Client.Repos.Item.Item.Import.ImportPatchRequestBody_vcs? Vcs { get; set; } + /// The password to provide to the originating repository. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? VcsPassword { get; set; } +#nullable restore +#else + public string VcsPassword { get; set; } +#endif + /// The username to provide to the originating repository. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? VcsUsername { get; set; } +#nullable restore +#else + public string VcsUsername { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public ImportPatchRequestBody() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Repos.Item.Item.Import.ImportPatchRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Repos.Item.Item.Import.ImportPatchRequestBody(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "tfvc_project", n => { TfvcProject = n.GetStringValue(); } }, + { "vcs", n => { Vcs = n.GetEnumValue(); } }, + { "vcs_password", n => { VcsPassword = n.GetStringValue(); } }, + { "vcs_username", n => { VcsUsername = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("tfvc_project", TfvcProject); + writer.WriteEnumValue("vcs", Vcs); + writer.WriteStringValue("vcs_password", VcsPassword); + writer.WriteStringValue("vcs_username", VcsUsername); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Import/ImportPatchRequestBody_vcs.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Import/ImportPatchRequestBody_vcs.cs new file mode 100644 index 0000000..f9041b1 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Import/ImportPatchRequestBody_vcs.cs @@ -0,0 +1,27 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.Import +{ + /// The type of version control system you are migrating from. + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public enum ImportPatchRequestBody_vcs + { + [EnumMember(Value = "subversion")] + #pragma warning disable CS1591 + Subversion, + #pragma warning restore CS1591 + [EnumMember(Value = "tfvc")] + #pragma warning disable CS1591 + Tfvc, + #pragma warning restore CS1591 + [EnumMember(Value = "git")] + #pragma warning disable CS1591 + Git, + #pragma warning restore CS1591 + [EnumMember(Value = "mercurial")] + #pragma warning disable CS1591 + Mercurial, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Import/ImportPutRequestBody.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Import/ImportPutRequestBody.cs new file mode 100644 index 0000000..3506198 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Import/ImportPutRequestBody.cs @@ -0,0 +1,99 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.Import +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class ImportPutRequestBody : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// For a tfvc import, the name of the project that is being imported. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? TfvcProject { get; set; } +#nullable restore +#else + public string TfvcProject { get; set; } +#endif + /// 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. + public global::Ayllu.Github.Client.Repos.Item.Item.Import.ImportPutRequestBody_vcs? Vcs { get; set; } + /// If authentication is required, the password to provide to `vcs_url`. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? VcsPassword { get; set; } +#nullable restore +#else + public string VcsPassword { get; set; } +#endif + /// The URL of the originating repository. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? VcsUrl { get; set; } +#nullable restore +#else + public string VcsUrl { get; set; } +#endif + /// If authentication is required, the username to provide to `vcs_url`. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? VcsUsername { get; set; } +#nullable restore +#else + public string VcsUsername { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public ImportPutRequestBody() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Repos.Item.Item.Import.ImportPutRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Repos.Item.Item.Import.ImportPutRequestBody(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "tfvc_project", n => { TfvcProject = n.GetStringValue(); } }, + { "vcs", n => { Vcs = n.GetEnumValue(); } }, + { "vcs_password", n => { VcsPassword = n.GetStringValue(); } }, + { "vcs_url", n => { VcsUrl = n.GetStringValue(); } }, + { "vcs_username", n => { VcsUsername = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("tfvc_project", TfvcProject); + writer.WriteEnumValue("vcs", Vcs); + writer.WriteStringValue("vcs_password", VcsPassword); + writer.WriteStringValue("vcs_url", VcsUrl); + writer.WriteStringValue("vcs_username", VcsUsername); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Import/ImportPutRequestBody_vcs.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Import/ImportPutRequestBody_vcs.cs new file mode 100644 index 0000000..472cbbc --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Import/ImportPutRequestBody_vcs.cs @@ -0,0 +1,27 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.Import +{ + /// 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. + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public enum ImportPutRequestBody_vcs + { + [EnumMember(Value = "subversion")] + #pragma warning disable CS1591 + Subversion, + #pragma warning restore CS1591 + [EnumMember(Value = "git")] + #pragma warning disable CS1591 + Git, + #pragma warning restore CS1591 + [EnumMember(Value = "mercurial")] + #pragma warning disable CS1591 + Mercurial, + #pragma warning restore CS1591 + [EnumMember(Value = "tfvc")] + #pragma warning disable CS1591 + Tfvc, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Import/ImportRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Import/ImportRequestBuilder.cs new file mode 100644 index 0000000..0fb7b9f --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Import/ImportRequestBuilder.cs @@ -0,0 +1,296 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Ayllu.Github.Client.Repos.Item.Item.Import.Authors; +using Ayllu.Github.Client.Repos.Item.Item.Import.Large_files; +using Ayllu.Github.Client.Repos.Item.Item.Import.Lfs; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.Import +{ + /// + /// Builds and executes requests for operations under \repos\{owner-id}\{repo-id}\import + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class ImportRequestBuilder : BaseRequestBuilder + { + /// The authors property + [Obsolete("")] + public global::Ayllu.Github.Client.Repos.Item.Item.Import.Authors.AuthorsRequestBuilder Authors + { + get => new global::Ayllu.Github.Client.Repos.Item.Item.Import.Authors.AuthorsRequestBuilder(PathParameters, RequestAdapter); + } + /// The large_files property + [Obsolete("")] + public global::Ayllu.Github.Client.Repos.Item.Item.Import.Large_files.Large_filesRequestBuilder Large_files + { + get => new global::Ayllu.Github.Client.Repos.Item.Item.Import.Large_files.Large_filesRequestBuilder(PathParameters, RequestAdapter); + } + /// The lfs property + [Obsolete("")] + public global::Ayllu.Github.Client.Repos.Item.Item.Import.Lfs.LfsRequestBuilder Lfs + { + get => new global::Ayllu.Github.Client.Repos.Item.Item.Import.Lfs.LfsRequestBuilder(PathParameters, RequestAdapter); + } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public ImportRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/import", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public ImportRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/import", rawUrl) + { + } + /// + /// Stop an import for a repository.> [!WARNING]> **Endpoint closing down notice:** Due to very low levels of usage and available alternatives, this endpoint is closing down 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). + /// API method documentation + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 503 status code + [Obsolete("")] +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task DeleteAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task DeleteAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToDeleteRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "503", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + }; + await RequestAdapter.SendNoContentAsync(requestInfo, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// View the progress of an import.> [!WARNING]> **Endpoint closing down notice:** Due to very low levels of usage and available alternatives, this endpoint is closing down 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. 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.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/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 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/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/rest/migrations/source-imports#cancel-an-import) and [retry](https://docs.github.com/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/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. + /// API method documentation + /// + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 404 status code + /// When receiving a 503 status code + [Obsolete("")] +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "404", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "503", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Models.Import.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// 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]> **Endpoint closing down notice:** Due to very low levels of usage and available alternatives, this endpoint is closing down 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). + /// API method documentation + /// + /// A + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 503 status code + [Obsolete("")] +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PatchAsync(global::Ayllu.Github.Client.Repos.Item.Item.Import.ImportPatchRequestBody body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task PatchAsync(global::Ayllu.Github.Client.Repos.Item.Item.Import.ImportPatchRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPatchRequestInformation(body, requestConfiguration); + var errorMapping = new Dictionary> + { + { "503", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Models.Import.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// Start a source import to a GitHub repository using GitHub Importer.Importing into a GitHub repository with GitHub Actions enabled is not supported and willreturn a status `422 Unprocessable Entity` response.> [!WARNING]> **Endpoint closing down notice:** Due to very low levels of usage and available alternatives, this endpoint is closing down 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). + /// API method documentation + /// + /// A + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 404 status code + /// When receiving a 422 status code + /// When receiving a 503 status code + [Obsolete("")] +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PutAsync(global::Ayllu.Github.Client.Repos.Item.Item.Import.ImportPutRequestBody body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task PutAsync(global::Ayllu.Github.Client.Repos.Item.Item.Import.ImportPutRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPutRequestInformation(body, requestConfiguration); + var errorMapping = new Dictionary> + { + { "404", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "422", global::Ayllu.Github.Client.Models.ValidationError.CreateFromDiscriminatorValue }, + { "503", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Models.Import.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// Stop an import for a repository.> [!WARNING]> **Endpoint closing down notice:** Due to very low levels of usage and available alternatives, this endpoint is closing down 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). + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. + [Obsolete("")] +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToDeleteRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToDeleteRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.DELETE, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// View the progress of an import.> [!WARNING]> **Endpoint closing down notice:** Due to very low levels of usage and available alternatives, this endpoint is closing down 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. 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.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/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 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/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/rest/migrations/source-imports#cancel-an-import) and [retry](https://docs.github.com/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/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. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. + [Obsolete("")] +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// 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]> **Endpoint closing down notice:** Due to very low levels of usage and available alternatives, this endpoint is closing down 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). + /// + /// A + /// The request body + /// Configuration for the request such as headers, query parameters, and middleware options. + [Obsolete("")] +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPatchRequestInformation(global::Ayllu.Github.Client.Repos.Item.Item.Import.ImportPatchRequestBody body, Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToPatchRequestInformation(global::Ayllu.Github.Client.Repos.Item.Item.Import.ImportPatchRequestBody body, Action> requestConfiguration = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + return requestInfo; + } + /// + /// Start a source import to a GitHub repository using GitHub Importer.Importing into a GitHub repository with GitHub Actions enabled is not supported and willreturn a status `422 Unprocessable Entity` response.> [!WARNING]> **Endpoint closing down notice:** Due to very low levels of usage and available alternatives, this endpoint is closing down 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). + /// + /// A + /// The request body + /// Configuration for the request such as headers, query parameters, and middleware options. + [Obsolete("")] +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPutRequestInformation(global::Ayllu.Github.Client.Repos.Item.Item.Import.ImportPutRequestBody body, Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToPutRequestInformation(global::Ayllu.Github.Client.Repos.Item.Item.Import.ImportPutRequestBody body, Action> requestConfiguration = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation(Method.PUT, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + [Obsolete("")] + public global::Ayllu.Github.Client.Repos.Item.Item.Import.ImportRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Repos.Item.Item.Import.ImportRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class ImportRequestBuilderDeleteRequestConfiguration : RequestConfiguration + { + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class ImportRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class ImportRequestBuilderPatchRequestConfiguration : RequestConfiguration + { + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class ImportRequestBuilderPutRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Import/Large_files/Large_filesRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Import/Large_files/Large_filesRequestBuilder.cs new file mode 100644 index 0000000..f7f7294 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Import/Large_files/Large_filesRequestBuilder.cs @@ -0,0 +1,102 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.Import.Large_files +{ + /// + /// Builds and executes requests for operations under \repos\{owner-id}\{repo-id}\import\large_files + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class Large_filesRequestBuilder : BaseRequestBuilder + { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public Large_filesRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/import/large_files", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public Large_filesRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/import/large_files", rawUrl) + { + } + /// + /// List files larger than 100MB found during the import> [!WARNING]> **Endpoint closing down notice:** Due to very low levels of usage and available alternatives, this endpoint is closing down 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). + /// API method documentation + /// + /// A List<global::Ayllu.Github.Client.Models.PorterLargeFile> + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 503 status code + [Obsolete("")] +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task?> GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task> GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "503", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + }; + var collectionResult = await RequestAdapter.SendCollectionAsync(requestInfo, global::Ayllu.Github.Client.Models.PorterLargeFile.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + return collectionResult?.AsList(); + } + /// + /// List files larger than 100MB found during the import> [!WARNING]> **Endpoint closing down notice:** Due to very low levels of usage and available alternatives, this endpoint is closing down 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). + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. + [Obsolete("")] +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + [Obsolete("")] + public global::Ayllu.Github.Client.Repos.Item.Item.Import.Large_files.Large_filesRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Repos.Item.Item.Import.Large_files.Large_filesRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class Large_filesRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Import/Lfs/LfsPatchRequestBody.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Import/Lfs/LfsPatchRequestBody.cs new file mode 100644 index 0000000..805b5d6 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Import/Lfs/LfsPatchRequestBody.cs @@ -0,0 +1,59 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.Import.Lfs +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class LfsPatchRequestBody : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// 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. + public global::Ayllu.Github.Client.Repos.Item.Item.Import.Lfs.LfsPatchRequestBody_use_lfs? UseLfs { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public LfsPatchRequestBody() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Repos.Item.Item.Import.Lfs.LfsPatchRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Repos.Item.Item.Import.Lfs.LfsPatchRequestBody(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "use_lfs", n => { UseLfs = n.GetEnumValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteEnumValue("use_lfs", UseLfs); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Import/Lfs/LfsPatchRequestBody_use_lfs.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Import/Lfs/LfsPatchRequestBody_use_lfs.cs new file mode 100644 index 0000000..011dc27 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Import/Lfs/LfsPatchRequestBody_use_lfs.cs @@ -0,0 +1,19 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.Import.Lfs +{ + /// 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. + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public enum LfsPatchRequestBody_use_lfs + { + [EnumMember(Value = "opt_in")] + #pragma warning disable CS1591 + Opt_in, + #pragma warning restore CS1591 + [EnumMember(Value = "opt_out")] + #pragma warning disable CS1591 + Opt_out, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Import/Lfs/LfsRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Import/Lfs/LfsRequestBuilder.cs new file mode 100644 index 0000000..410c340 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Import/Lfs/LfsRequestBuilder.cs @@ -0,0 +1,108 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.Import.Lfs +{ + /// + /// Builds and executes requests for operations under \repos\{owner-id}\{repo-id}\import\lfs + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class LfsRequestBuilder : BaseRequestBuilder + { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public LfsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/import/lfs", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public LfsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/import/lfs", rawUrl) + { + } + /// + /// 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/repositories/working-with-files/managing-large-files).> [!WARNING]> **Endpoint closing down notice:** Due to very low levels of usage and available alternatives, this endpoint is closing down 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). + /// API method documentation + /// + /// A + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 422 status code + /// When receiving a 503 status code + [Obsolete("")] +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PatchAsync(global::Ayllu.Github.Client.Repos.Item.Item.Import.Lfs.LfsPatchRequestBody body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task PatchAsync(global::Ayllu.Github.Client.Repos.Item.Item.Import.Lfs.LfsPatchRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPatchRequestInformation(body, requestConfiguration); + var errorMapping = new Dictionary> + { + { "422", global::Ayllu.Github.Client.Models.ValidationError.CreateFromDiscriminatorValue }, + { "503", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Models.Import.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// 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/repositories/working-with-files/managing-large-files).> [!WARNING]> **Endpoint closing down notice:** Due to very low levels of usage and available alternatives, this endpoint is closing down 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). + /// + /// A + /// The request body + /// Configuration for the request such as headers, query parameters, and middleware options. + [Obsolete("")] +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPatchRequestInformation(global::Ayllu.Github.Client.Repos.Item.Item.Import.Lfs.LfsPatchRequestBody body, Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToPatchRequestInformation(global::Ayllu.Github.Client.Repos.Item.Item.Import.Lfs.LfsPatchRequestBody body, Action> requestConfiguration = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + [Obsolete("")] + public global::Ayllu.Github.Client.Repos.Item.Item.Import.Lfs.LfsRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Repos.Item.Item.Import.Lfs.LfsRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class LfsRequestBuilderPatchRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Installation/InstallationRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Installation/InstallationRequestBuilder.cs new file mode 100644 index 0000000..26d355e --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Installation/InstallationRequestBuilder.cs @@ -0,0 +1,98 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.Installation +{ + /// + /// Builds and executes requests for operations under \repos\{owner-id}\{repo-id}\installation + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class InstallationRequestBuilder : BaseRequestBuilder + { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public InstallationRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/installation", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public InstallationRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/installation", rawUrl) + { + } + /// + /// 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/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. + /// API method documentation + /// + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 404 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "404", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Models.Installation.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// 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/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.Repos.Item.Item.Installation.InstallationRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Repos.Item.Item.Installation.InstallationRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class InstallationRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/InteractionLimits/InteractionLimitsRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/InteractionLimits/InteractionLimitsRequestBuilder.cs new file mode 100644 index 0000000..2d7d507 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/InteractionLimits/InteractionLimitsRequestBuilder.cs @@ -0,0 +1,188 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.InteractionLimits +{ + /// + /// Builds and executes requests for operations under \repos\{owner-id}\{repo-id}\interaction-limits + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class InteractionLimitsRequestBuilder : BaseRequestBuilder + { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public InteractionLimitsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/interaction-limits", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public InteractionLimitsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/interaction-limits", rawUrl) + { + } + /// + /// 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 + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task DeleteAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task DeleteAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToDeleteRequestInformation(requestConfiguration); + await RequestAdapter.SendNoContentAsync(requestInfo, default, cancellationToken).ConfigureAwait(false); + } + /// + /// 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. + /// API method documentation + /// + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Models.InteractionLimitResponse.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false); + } + /// + /// 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. + /// API method documentation + /// + /// A + /// Limit interactions to a specific type of user for a specified duration + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PutAsync(global::Ayllu.Github.Client.Models.InteractionLimit body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task PutAsync(global::Ayllu.Github.Client.Models.InteractionLimit body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPutRequestInformation(body, requestConfiguration); + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Models.InteractionLimitResponse.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false); + } + /// + /// 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. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToDeleteRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToDeleteRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.DELETE, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + return requestInfo; + } + /// + /// 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. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// 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. + /// + /// A + /// Limit interactions to a specific type of user for a specified duration + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPutRequestInformation(global::Ayllu.Github.Client.Models.InteractionLimit body, Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToPutRequestInformation(global::Ayllu.Github.Client.Models.InteractionLimit body, Action> requestConfiguration = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation(Method.PUT, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.Repos.Item.Item.InteractionLimits.InteractionLimitsRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Repos.Item.Item.InteractionLimits.InteractionLimitsRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class InteractionLimitsRequestBuilderDeleteRequestConfiguration : RequestConfiguration + { + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class InteractionLimitsRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class InteractionLimitsRequestBuilderPutRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Invitations/InvitationsRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Invitations/InvitationsRequestBuilder.cs new file mode 100644 index 0000000..a8a950b --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Invitations/InvitationsRequestBuilder.cs @@ -0,0 +1,133 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Ayllu.Github.Client.Repos.Item.Item.Invitations.Item; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.Invitations +{ + /// + /// Builds and executes requests for operations under \repos\{owner-id}\{repo-id}\invitations + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class InvitationsRequestBuilder : BaseRequestBuilder + { + /// Gets an item from the Ayllu.Github.Client.repos.item.item.invitations.item collection + /// The unique identifier of the invitation. + /// A + public global::Ayllu.Github.Client.Repos.Item.Item.Invitations.Item.WithInvitation_ItemRequestBuilder this[int position] + { + get + { + var urlTplParams = new Dictionary(PathParameters); + urlTplParams.Add("invitation_id", position); + return new global::Ayllu.Github.Client.Repos.Item.Item.Invitations.Item.WithInvitation_ItemRequestBuilder(urlTplParams, RequestAdapter); + } + } + /// Gets an item from the Ayllu.Github.Client.repos.item.item.invitations.item collection + /// The unique identifier of the invitation. + /// A + [Obsolete("This indexer is deprecated and will be removed in the next major version. Use the one with the typed parameter instead.")] + public global::Ayllu.Github.Client.Repos.Item.Item.Invitations.Item.WithInvitation_ItemRequestBuilder this[string position] + { + get + { + var urlTplParams = new Dictionary(PathParameters); + if (!string.IsNullOrWhiteSpace(position)) urlTplParams.Add("invitation_id", position); + return new global::Ayllu.Github.Client.Repos.Item.Item.Invitations.Item.WithInvitation_ItemRequestBuilder(urlTplParams, RequestAdapter); + } + } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public InvitationsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/invitations{?page*,per_page*}", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public InvitationsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/invitations{?page*,per_page*}", rawUrl) + { + } + /// + /// When authenticating as a user with admin rights to a repository, this endpoint will list all currently open repository invitations. + /// API method documentation + /// + /// A List<global::Ayllu.Github.Client.Models.RepositoryInvitation> + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task?> GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task> GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var collectionResult = await RequestAdapter.SendCollectionAsync(requestInfo, global::Ayllu.Github.Client.Models.RepositoryInvitation.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false); + return collectionResult?.AsList(); + } + /// + /// When authenticating as a user with admin rights to a repository, this endpoint will list all currently open repository invitations. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.Repos.Item.Item.Invitations.InvitationsRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Repos.Item.Item.Invitations.InvitationsRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// When authenticating as a user with admin rights to a repository, this endpoint will list all currently open repository invitations. + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class InvitationsRequestBuilderGetQueryParameters + { + /// The page number of the results to fetch. For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." + [QueryParameter("page")] + public int? Page { get; set; } + /// The number of results per page (max 100). For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." + [QueryParameter("per_page")] + public int? PerPage { get; set; } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class InvitationsRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Invitations/Item/WithInvitation_ItemRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Invitations/Item/WithInvitation_ItemRequestBuilder.cs new file mode 100644 index 0000000..bdc319a --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Invitations/Item/WithInvitation_ItemRequestBuilder.cs @@ -0,0 +1,136 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.Invitations.Item +{ + /// + /// Builds and executes requests for operations under \repos\{owner-id}\{repo-id}\invitations\{invitation_id} + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithInvitation_ItemRequestBuilder : BaseRequestBuilder + { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public WithInvitation_ItemRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/invitations/{invitation_id}", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public WithInvitation_ItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/invitations/{invitation_id}", rawUrl) + { + } + /// + /// Delete a repository invitation + /// API method documentation + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task DeleteAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task DeleteAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToDeleteRequestInformation(requestConfiguration); + await RequestAdapter.SendNoContentAsync(requestInfo, default, cancellationToken).ConfigureAwait(false); + } + /// + /// Update a repository invitation + /// API method documentation + /// + /// A + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PatchAsync(global::Ayllu.Github.Client.Repos.Item.Item.Invitations.Item.WithInvitation_PatchRequestBody body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task PatchAsync(global::Ayllu.Github.Client.Repos.Item.Item.Invitations.Item.WithInvitation_PatchRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPatchRequestInformation(body, requestConfiguration); + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Models.RepositoryInvitation.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false); + } + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToDeleteRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToDeleteRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.DELETE, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + return requestInfo; + } + /// A + /// The request body + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPatchRequestInformation(global::Ayllu.Github.Client.Repos.Item.Item.Invitations.Item.WithInvitation_PatchRequestBody body, Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToPatchRequestInformation(global::Ayllu.Github.Client.Repos.Item.Item.Invitations.Item.WithInvitation_PatchRequestBody body, Action> requestConfiguration = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.Repos.Item.Item.Invitations.Item.WithInvitation_ItemRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Repos.Item.Item.Invitations.Item.WithInvitation_ItemRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithInvitation_ItemRequestBuilderDeleteRequestConfiguration : RequestConfiguration + { + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithInvitation_ItemRequestBuilderPatchRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Invitations/Item/WithInvitation_PatchRequestBody.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Invitations/Item/WithInvitation_PatchRequestBody.cs new file mode 100644 index 0000000..512dd17 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Invitations/Item/WithInvitation_PatchRequestBody.cs @@ -0,0 +1,59 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.Invitations.Item +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class WithInvitation_PatchRequestBody : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The permissions that the associated user will have on the repository. Valid values are `read`, `write`, `maintain`, `triage`, and `admin`. + public global::Ayllu.Github.Client.Repos.Item.Item.Invitations.Item.WithInvitation_PatchRequestBody_permissions? Permissions { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public WithInvitation_PatchRequestBody() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Repos.Item.Item.Invitations.Item.WithInvitation_PatchRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Repos.Item.Item.Invitations.Item.WithInvitation_PatchRequestBody(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "permissions", n => { Permissions = n.GetEnumValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteEnumValue("permissions", Permissions); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Invitations/Item/WithInvitation_PatchRequestBody_permissions.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Invitations/Item/WithInvitation_PatchRequestBody_permissions.cs new file mode 100644 index 0000000..3c74ce1 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Invitations/Item/WithInvitation_PatchRequestBody_permissions.cs @@ -0,0 +1,31 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.Invitations.Item +{ + /// The permissions that the associated user will have on the repository. Valid values are `read`, `write`, `maintain`, `triage`, and `admin`. + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public enum WithInvitation_PatchRequestBody_permissions + { + [EnumMember(Value = "read")] + #pragma warning disable CS1591 + Read, + #pragma warning restore CS1591 + [EnumMember(Value = "write")] + #pragma warning disable CS1591 + Write, + #pragma warning restore CS1591 + [EnumMember(Value = "maintain")] + #pragma warning disable CS1591 + Maintain, + #pragma warning restore CS1591 + [EnumMember(Value = "triage")] + #pragma warning disable CS1591 + Triage, + #pragma warning restore CS1591 + [EnumMember(Value = "admin")] + #pragma warning disable CS1591 + Admin, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Issues/Comments/CommentsRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Issues/Comments/CommentsRequestBuilder.cs new file mode 100644 index 0000000..ed125fe --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Issues/Comments/CommentsRequestBuilder.cs @@ -0,0 +1,171 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Ayllu.Github.Client.Repos.Item.Item.Issues.Comments.Item; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.Issues.Comments +{ + /// + /// Builds and executes requests for operations under \repos\{owner-id}\{repo-id}\issues\comments + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class CommentsRequestBuilder : BaseRequestBuilder + { + /// Gets an item from the Ayllu.Github.Client.repos.item.item.issues.comments.item collection + /// The unique identifier of the comment. + /// A + public global::Ayllu.Github.Client.Repos.Item.Item.Issues.Comments.Item.WithComment_ItemRequestBuilder this[long position] + { + get + { + var urlTplParams = new Dictionary(PathParameters); + urlTplParams.Add("comment_id", position); + return new global::Ayllu.Github.Client.Repos.Item.Item.Issues.Comments.Item.WithComment_ItemRequestBuilder(urlTplParams, RequestAdapter); + } + } + /// Gets an item from the Ayllu.Github.Client.repos.item.item.issues.comments.item collection + /// The unique identifier of the comment. + /// A + [Obsolete("This indexer is deprecated and will be removed in the next major version. Use the one with the typed parameter instead.")] + public global::Ayllu.Github.Client.Repos.Item.Item.Issues.Comments.Item.WithComment_ItemRequestBuilder this[string position] + { + get + { + var urlTplParams = new Dictionary(PathParameters); + if (!string.IsNullOrWhiteSpace(position)) urlTplParams.Add("comment_id", position); + return new global::Ayllu.Github.Client.Repos.Item.Item.Issues.Comments.Item.WithComment_ItemRequestBuilder(urlTplParams, RequestAdapter); + } + } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public CommentsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/issues/comments{?direction*,page*,per_page*,since*,sort*}", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public CommentsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/issues/comments{?direction*,page*,per_page*,since*,sort*}", rawUrl) + { + } + /// + /// 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/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`. + /// API method documentation + /// + /// A List<global::Ayllu.Github.Client.Models.IssueComment> + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 404 status code + /// When receiving a 422 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task?> GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task> GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "404", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "422", global::Ayllu.Github.Client.Models.ValidationError.CreateFromDiscriminatorValue }, + }; + var collectionResult = await RequestAdapter.SendCollectionAsync(requestInfo, global::Ayllu.Github.Client.Models.IssueComment.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + return collectionResult?.AsList(); + } + /// + /// 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/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`. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.Repos.Item.Item.Issues.Comments.CommentsRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Repos.Item.Item.Issues.Comments.CommentsRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// 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/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`. + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class CommentsRequestBuilderGetQueryParameters + { + /// Either `asc` or `desc`. Ignored without the `sort` parameter. + [Obsolete("This property is deprecated, use DirectionAsGetDirectionQueryParameterType instead")] +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("direction")] + public string? Direction { get; set; } +#nullable restore +#else + [QueryParameter("direction")] + public string Direction { get; set; } +#endif + /// Either `asc` or `desc`. Ignored without the `sort` parameter. + [QueryParameter("direction")] + public global::Ayllu.Github.Client.Repos.Item.Item.Issues.Comments.GetDirectionQueryParameterType? DirectionAsGetDirectionQueryParameterType { get; set; } + /// The page number of the results to fetch. For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." + [QueryParameter("page")] + public int? Page { get; set; } + /// The number of results per page (max 100). For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." + [QueryParameter("per_page")] + public int? PerPage { get; set; } + /// 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`. + [QueryParameter("since")] + public DateTimeOffset? Since { get; set; } + /// The property to sort the results by. + [Obsolete("This property is deprecated, use SortAsGetSortQueryParameterType instead")] +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("sort")] + public string? Sort { get; set; } +#nullable restore +#else + [QueryParameter("sort")] + public string Sort { get; set; } +#endif + /// The property to sort the results by. + [QueryParameter("sort")] + public global::Ayllu.Github.Client.Repos.Item.Item.Issues.Comments.GetSortQueryParameterType? SortAsGetSortQueryParameterType { get; set; } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class CommentsRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Issues/Comments/GetDirectionQueryParameterType.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Issues/Comments/GetDirectionQueryParameterType.cs new file mode 100644 index 0000000..6e139a4 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Issues/Comments/GetDirectionQueryParameterType.cs @@ -0,0 +1,20 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.Issues.Comments +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public enum GetDirectionQueryParameterType + #pragma warning restore CS1591 + { + [EnumMember(Value = "asc")] + #pragma warning disable CS1591 + Asc, + #pragma warning restore CS1591 + [EnumMember(Value = "desc")] + #pragma warning disable CS1591 + Desc, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Issues/Comments/GetSortQueryParameterType.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Issues/Comments/GetSortQueryParameterType.cs new file mode 100644 index 0000000..df91c55 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Issues/Comments/GetSortQueryParameterType.cs @@ -0,0 +1,20 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.Issues.Comments +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public enum GetSortQueryParameterType + #pragma warning restore CS1591 + { + [EnumMember(Value = "created")] + #pragma warning disable CS1591 + Created, + #pragma warning restore CS1591 + [EnumMember(Value = "updated")] + #pragma warning disable CS1591 + Updated, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Issues/Comments/Item/Reactions/GetContentQueryParameterType.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Issues/Comments/Item/Reactions/GetContentQueryParameterType.cs new file mode 100644 index 0000000..7bfe2ac --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Issues/Comments/Item/Reactions/GetContentQueryParameterType.cs @@ -0,0 +1,44 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.Issues.Comments.Item.Reactions +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public enum GetContentQueryParameterType + #pragma warning restore CS1591 + { + [EnumMember(Value = "+1")] + #pragma warning disable CS1591 + Plus_1, + #pragma warning restore CS1591 + [EnumMember(Value = "-1")] + #pragma warning disable CS1591 + Minus_1, + #pragma warning restore CS1591 + [EnumMember(Value = "laugh")] + #pragma warning disable CS1591 + Laugh, + #pragma warning restore CS1591 + [EnumMember(Value = "confused")] + #pragma warning disable CS1591 + Confused, + #pragma warning restore CS1591 + [EnumMember(Value = "heart")] + #pragma warning disable CS1591 + Heart, + #pragma warning restore CS1591 + [EnumMember(Value = "hooray")] + #pragma warning disable CS1591 + Hooray, + #pragma warning restore CS1591 + [EnumMember(Value = "rocket")] + #pragma warning disable CS1591 + Rocket, + #pragma warning restore CS1591 + [EnumMember(Value = "eyes")] + #pragma warning disable CS1591 + Eyes, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Issues/Comments/Item/Reactions/Item/WithReaction_ItemRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Issues/Comments/Item/Reactions/Item/WithReaction_ItemRequestBuilder.cs new file mode 100644 index 0000000..3dca9c5 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Issues/Comments/Item/Reactions/Item/WithReaction_ItemRequestBuilder.cs @@ -0,0 +1,90 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.Issues.Comments.Item.Reactions.Item +{ + /// + /// Builds and executes requests for operations under \repos\{owner-id}\{repo-id}\issues\comments\{comment_id}\reactions\{reaction_id} + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithReaction_ItemRequestBuilder : BaseRequestBuilder + { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public WithReaction_ItemRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/issues/comments/{comment_id}/reactions/{reaction_id}", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public WithReaction_ItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/issues/comments/{comment_id}/reactions/{reaction_id}", rawUrl) + { + } + /// + /// > [!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/rest/issues/comments#get-an-issue-comment). + /// API method documentation + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task DeleteAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task DeleteAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToDeleteRequestInformation(requestConfiguration); + await RequestAdapter.SendNoContentAsync(requestInfo, default, cancellationToken).ConfigureAwait(false); + } + /// + /// > [!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/rest/issues/comments#get-an-issue-comment). + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToDeleteRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToDeleteRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.DELETE, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.Repos.Item.Item.Issues.Comments.Item.Reactions.Item.WithReaction_ItemRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Repos.Item.Item.Issues.Comments.Item.Reactions.Item.WithReaction_ItemRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithReaction_ItemRequestBuilderDeleteRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Issues/Comments/Item/Reactions/ReactionsPostRequestBody.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Issues/Comments/Item/Reactions/ReactionsPostRequestBody.cs new file mode 100644 index 0000000..821539b --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Issues/Comments/Item/Reactions/ReactionsPostRequestBody.cs @@ -0,0 +1,59 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.Issues.Comments.Item.Reactions +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class ReactionsPostRequestBody : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The [reaction type](https://docs.github.com/rest/reactions/reactions#about-reactions) to add to the issue comment. + public global::Ayllu.Github.Client.Repos.Item.Item.Issues.Comments.Item.Reactions.ReactionsPostRequestBody_content? Content { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public ReactionsPostRequestBody() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Repos.Item.Item.Issues.Comments.Item.Reactions.ReactionsPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Repos.Item.Item.Issues.Comments.Item.Reactions.ReactionsPostRequestBody(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "content", n => { Content = n.GetEnumValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteEnumValue("content", Content); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Issues/Comments/Item/Reactions/ReactionsPostRequestBody_content.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Issues/Comments/Item/Reactions/ReactionsPostRequestBody_content.cs new file mode 100644 index 0000000..8599fe1 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Issues/Comments/Item/Reactions/ReactionsPostRequestBody_content.cs @@ -0,0 +1,43 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.Issues.Comments.Item.Reactions +{ + /// The [reaction type](https://docs.github.com/rest/reactions/reactions#about-reactions) to add to the issue comment. + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public enum ReactionsPostRequestBody_content + { + [EnumMember(Value = "+1")] + #pragma warning disable CS1591 + Plus_1, + #pragma warning restore CS1591 + [EnumMember(Value = "-1")] + #pragma warning disable CS1591 + Minus_1, + #pragma warning restore CS1591 + [EnumMember(Value = "laugh")] + #pragma warning disable CS1591 + Laugh, + #pragma warning restore CS1591 + [EnumMember(Value = "confused")] + #pragma warning disable CS1591 + Confused, + #pragma warning restore CS1591 + [EnumMember(Value = "heart")] + #pragma warning disable CS1591 + Heart, + #pragma warning restore CS1591 + [EnumMember(Value = "hooray")] + #pragma warning disable CS1591 + Hooray, + #pragma warning restore CS1591 + [EnumMember(Value = "rocket")] + #pragma warning disable CS1591 + Rocket, + #pragma warning restore CS1591 + [EnumMember(Value = "eyes")] + #pragma warning disable CS1591 + Eyes, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Issues/Comments/Item/Reactions/ReactionsRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Issues/Comments/Item/Reactions/ReactionsRequestBuilder.cs new file mode 100644 index 0000000..c72f325 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Issues/Comments/Item/Reactions/ReactionsRequestBuilder.cs @@ -0,0 +1,208 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Ayllu.Github.Client.Repos.Item.Item.Issues.Comments.Item.Reactions.Item; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.Issues.Comments.Item.Reactions +{ + /// + /// Builds and executes requests for operations under \repos\{owner-id}\{repo-id}\issues\comments\{comment_id}\reactions + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class ReactionsRequestBuilder : BaseRequestBuilder + { + /// Gets an item from the Ayllu.Github.Client.repos.item.item.issues.comments.item.reactions.item collection + /// The unique identifier of the reaction. + /// A + public global::Ayllu.Github.Client.Repos.Item.Item.Issues.Comments.Item.Reactions.Item.WithReaction_ItemRequestBuilder this[int position] + { + get + { + var urlTplParams = new Dictionary(PathParameters); + urlTplParams.Add("reaction_id", position); + return new global::Ayllu.Github.Client.Repos.Item.Item.Issues.Comments.Item.Reactions.Item.WithReaction_ItemRequestBuilder(urlTplParams, RequestAdapter); + } + } + /// Gets an item from the Ayllu.Github.Client.repos.item.item.issues.comments.item.reactions.item collection + /// The unique identifier of the reaction. + /// A + [Obsolete("This indexer is deprecated and will be removed in the next major version. Use the one with the typed parameter instead.")] + public global::Ayllu.Github.Client.Repos.Item.Item.Issues.Comments.Item.Reactions.Item.WithReaction_ItemRequestBuilder this[string position] + { + get + { + var urlTplParams = new Dictionary(PathParameters); + if (!string.IsNullOrWhiteSpace(position)) urlTplParams.Add("reaction_id", position); + return new global::Ayllu.Github.Client.Repos.Item.Item.Issues.Comments.Item.Reactions.Item.WithReaction_ItemRequestBuilder(urlTplParams, RequestAdapter); + } + } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public ReactionsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/issues/comments/{comment_id}/reactions{?content*,page*,per_page*}", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public ReactionsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/issues/comments/{comment_id}/reactions{?content*,page*,per_page*}", rawUrl) + { + } + /// + /// List the reactions to an [issue comment](https://docs.github.com/rest/issues/comments#get-an-issue-comment). + /// API method documentation + /// + /// A List<global::Ayllu.Github.Client.Models.Reaction> + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 404 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task?> GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task> GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "404", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + }; + var collectionResult = await RequestAdapter.SendCollectionAsync(requestInfo, global::Ayllu.Github.Client.Models.Reaction.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + return collectionResult?.AsList(); + } + /// + /// Create a reaction to an [issue comment](https://docs.github.com/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. + /// API method documentation + /// + /// A + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 422 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PostAsync(global::Ayllu.Github.Client.Repos.Item.Item.Issues.Comments.Item.Reactions.ReactionsPostRequestBody body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task PostAsync(global::Ayllu.Github.Client.Repos.Item.Item.Issues.Comments.Item.Reactions.ReactionsPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPostRequestInformation(body, requestConfiguration); + var errorMapping = new Dictionary> + { + { "422", global::Ayllu.Github.Client.Models.ValidationError.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Models.Reaction.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// List the reactions to an [issue comment](https://docs.github.com/rest/issues/comments#get-an-issue-comment). + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Create a reaction to an [issue comment](https://docs.github.com/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. + /// + /// A + /// The request body + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPostRequestInformation(global::Ayllu.Github.Client.Repos.Item.Item.Issues.Comments.Item.Reactions.ReactionsPostRequestBody body, Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToPostRequestInformation(global::Ayllu.Github.Client.Repos.Item.Item.Issues.Comments.Item.Reactions.ReactionsPostRequestBody body, Action> requestConfiguration = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.Repos.Item.Item.Issues.Comments.Item.Reactions.ReactionsRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Repos.Item.Item.Issues.Comments.Item.Reactions.ReactionsRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// List the reactions to an [issue comment](https://docs.github.com/rest/issues/comments#get-an-issue-comment). + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class ReactionsRequestBuilderGetQueryParameters + { + /// Returns a single [reaction type](https://docs.github.com/rest/reactions/reactions#about-reactions). Omit this parameter to list all reactions to an issue comment. + [Obsolete("This property is deprecated, use ContentAsGetContentQueryParameterType instead")] +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("content")] + public string? Content { get; set; } +#nullable restore +#else + [QueryParameter("content")] + public string Content { get; set; } +#endif + /// Returns a single [reaction type](https://docs.github.com/rest/reactions/reactions#about-reactions). Omit this parameter to list all reactions to an issue comment. + [QueryParameter("content")] + public global::Ayllu.Github.Client.Repos.Item.Item.Issues.Comments.Item.Reactions.GetContentQueryParameterType? ContentAsGetContentQueryParameterType { get; set; } + /// The page number of the results to fetch. For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." + [QueryParameter("page")] + public int? Page { get; set; } + /// The number of results per page (max 100). For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." + [QueryParameter("per_page")] + public int? PerPage { get; set; } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class ReactionsRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class ReactionsRequestBuilderPostRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Issues/Comments/Item/WithComment_ItemRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Issues/Comments/Item/WithComment_ItemRequestBuilder.cs new file mode 100644 index 0000000..82fe0ff --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Issues/Comments/Item/WithComment_ItemRequestBuilder.cs @@ -0,0 +1,204 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Ayllu.Github.Client.Repos.Item.Item.Issues.Comments.Item.Reactions; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.Issues.Comments.Item +{ + /// + /// Builds and executes requests for operations under \repos\{owner-id}\{repo-id}\issues\comments\{comment_id} + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithComment_ItemRequestBuilder : BaseRequestBuilder + { + /// The reactions property + public global::Ayllu.Github.Client.Repos.Item.Item.Issues.Comments.Item.Reactions.ReactionsRequestBuilder Reactions + { + get => new global::Ayllu.Github.Client.Repos.Item.Item.Issues.Comments.Item.Reactions.ReactionsRequestBuilder(PathParameters, RequestAdapter); + } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public WithComment_ItemRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/issues/comments/{comment_id}", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public WithComment_ItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/issues/comments/{comment_id}", rawUrl) + { + } + /// + /// 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 + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task DeleteAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task DeleteAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToDeleteRequestInformation(requestConfiguration); + await RequestAdapter.SendNoContentAsync(requestInfo, default, cancellationToken).ConfigureAwait(false); + } + /// + /// 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/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`. + /// API method documentation + /// + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 404 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "404", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Models.IssueComment.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// 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/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`. + /// API method documentation + /// + /// A + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 422 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PatchAsync(global::Ayllu.Github.Client.Repos.Item.Item.Issues.Comments.Item.WithComment_PatchRequestBody body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task PatchAsync(global::Ayllu.Github.Client.Repos.Item.Item.Issues.Comments.Item.WithComment_PatchRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPatchRequestInformation(body, requestConfiguration); + var errorMapping = new Dictionary> + { + { "422", global::Ayllu.Github.Client.Models.ValidationError.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Models.IssueComment.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// 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. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToDeleteRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToDeleteRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.DELETE, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + return requestInfo; + } + /// + /// 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/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`. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// 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/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`. + /// + /// A + /// The request body + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPatchRequestInformation(global::Ayllu.Github.Client.Repos.Item.Item.Issues.Comments.Item.WithComment_PatchRequestBody body, Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToPatchRequestInformation(global::Ayllu.Github.Client.Repos.Item.Item.Issues.Comments.Item.WithComment_PatchRequestBody body, Action> requestConfiguration = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.Repos.Item.Item.Issues.Comments.Item.WithComment_ItemRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Repos.Item.Item.Issues.Comments.Item.WithComment_ItemRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithComment_ItemRequestBuilderDeleteRequestConfiguration : RequestConfiguration + { + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithComment_ItemRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithComment_ItemRequestBuilderPatchRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Issues/Comments/Item/WithComment_PatchRequestBody.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Issues/Comments/Item/WithComment_PatchRequestBody.cs new file mode 100644 index 0000000..a00025b --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Issues/Comments/Item/WithComment_PatchRequestBody.cs @@ -0,0 +1,65 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.Issues.Comments.Item +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class WithComment_PatchRequestBody : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The contents of the comment. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Body { get; set; } +#nullable restore +#else + public string Body { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public WithComment_PatchRequestBody() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Repos.Item.Item.Issues.Comments.Item.WithComment_PatchRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Repos.Item.Item.Issues.Comments.Item.WithComment_PatchRequestBody(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "body", n => { Body = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("body", Body); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Issues/Events/EventsRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Issues/Events/EventsRequestBuilder.cs new file mode 100644 index 0000000..e603b91 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Issues/Events/EventsRequestBuilder.cs @@ -0,0 +1,138 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Ayllu.Github.Client.Repos.Item.Item.Issues.Events.Item; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.Issues.Events +{ + /// + /// Builds and executes requests for operations under \repos\{owner-id}\{repo-id}\issues\events + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class EventsRequestBuilder : BaseRequestBuilder + { + /// Gets an item from the Ayllu.Github.Client.repos.item.item.issues.events.item collection + /// Unique identifier of the item + /// A + public global::Ayllu.Github.Client.Repos.Item.Item.Issues.Events.Item.WithEvent_ItemRequestBuilder this[int position] + { + get + { + var urlTplParams = new Dictionary(PathParameters); + urlTplParams.Add("event_id", position); + return new global::Ayllu.Github.Client.Repos.Item.Item.Issues.Events.Item.WithEvent_ItemRequestBuilder(urlTplParams, RequestAdapter); + } + } + /// Gets an item from the Ayllu.Github.Client.repos.item.item.issues.events.item collection + /// Unique identifier of the item + /// A + [Obsolete("This indexer is deprecated and will be removed in the next major version. Use the one with the typed parameter instead.")] + public global::Ayllu.Github.Client.Repos.Item.Item.Issues.Events.Item.WithEvent_ItemRequestBuilder this[string position] + { + get + { + var urlTplParams = new Dictionary(PathParameters); + if (!string.IsNullOrWhiteSpace(position)) urlTplParams.Add("event_id", position); + return new global::Ayllu.Github.Client.Repos.Item.Item.Issues.Events.Item.WithEvent_ItemRequestBuilder(urlTplParams, RequestAdapter); + } + } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public EventsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/issues/events{?page*,per_page*}", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public EventsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/issues/events{?page*,per_page*}", rawUrl) + { + } + /// + /// Lists events for a repository. + /// API method documentation + /// + /// A List<global::Ayllu.Github.Client.Models.IssueEvent> + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 422 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task?> GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task> GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "422", global::Ayllu.Github.Client.Models.ValidationError.CreateFromDiscriminatorValue }, + }; + var collectionResult = await RequestAdapter.SendCollectionAsync(requestInfo, global::Ayllu.Github.Client.Models.IssueEvent.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + return collectionResult?.AsList(); + } + /// + /// Lists events for a repository. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.Repos.Item.Item.Issues.Events.EventsRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Repos.Item.Item.Issues.Events.EventsRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Lists events for a repository. + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class EventsRequestBuilderGetQueryParameters + { + /// The page number of the results to fetch. For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." + [QueryParameter("page")] + public int? Page { get; set; } + /// The number of results per page (max 100). For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." + [QueryParameter("per_page")] + public int? PerPage { get; set; } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class EventsRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Issues/Events/Item/WithEvent_ItemRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Issues/Events/Item/WithEvent_ItemRequestBuilder.cs new file mode 100644 index 0000000..a784624 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Issues/Events/Item/WithEvent_ItemRequestBuilder.cs @@ -0,0 +1,102 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.Issues.Events.Item +{ + /// + /// Builds and executes requests for operations under \repos\{owner-id}\{repo-id}\issues\events\{event_id} + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithEvent_ItemRequestBuilder : BaseRequestBuilder + { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public WithEvent_ItemRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/issues/events/{event_id}", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public WithEvent_ItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/issues/events/{event_id}", rawUrl) + { + } + /// + /// Gets a single event by the event id. + /// API method documentation + /// + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 403 status code + /// When receiving a 404 status code + /// When receiving a 410 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "403", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "404", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "410", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Models.IssueEvent.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// Gets a single event by the event id. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.Repos.Item.Item.Issues.Events.Item.WithEvent_ItemRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Repos.Item.Item.Issues.Events.Item.WithEvent_ItemRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithEvent_ItemRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Issues/GetDirectionQueryParameterType.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Issues/GetDirectionQueryParameterType.cs new file mode 100644 index 0000000..f5a192e --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Issues/GetDirectionQueryParameterType.cs @@ -0,0 +1,20 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.Issues +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public enum GetDirectionQueryParameterType + #pragma warning restore CS1591 + { + [EnumMember(Value = "asc")] + #pragma warning disable CS1591 + Asc, + #pragma warning restore CS1591 + [EnumMember(Value = "desc")] + #pragma warning disable CS1591 + Desc, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Issues/GetSortQueryParameterType.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Issues/GetSortQueryParameterType.cs new file mode 100644 index 0000000..e9719f0 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Issues/GetSortQueryParameterType.cs @@ -0,0 +1,24 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.Issues +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public enum GetSortQueryParameterType + #pragma warning restore CS1591 + { + [EnumMember(Value = "created")] + #pragma warning disable CS1591 + Created, + #pragma warning restore CS1591 + [EnumMember(Value = "updated")] + #pragma warning disable CS1591 + Updated, + #pragma warning restore CS1591 + [EnumMember(Value = "comments")] + #pragma warning disable CS1591 + Comments, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Issues/GetStateQueryParameterType.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Issues/GetStateQueryParameterType.cs new file mode 100644 index 0000000..aef0891 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Issues/GetStateQueryParameterType.cs @@ -0,0 +1,24 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.Issues +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public enum GetStateQueryParameterType + #pragma warning restore CS1591 + { + [EnumMember(Value = "open")] + #pragma warning disable CS1591 + Open, + #pragma warning restore CS1591 + [EnumMember(Value = "closed")] + #pragma warning disable CS1591 + Closed, + #pragma warning restore CS1591 + [EnumMember(Value = "all")] + #pragma warning disable CS1591 + All, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Issues/IssuesPostRequestBody.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Issues/IssuesPostRequestBody.cs new file mode 100644 index 0000000..9150fe9 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Issues/IssuesPostRequestBody.cs @@ -0,0 +1,247 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.Issues +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class IssuesPostRequestBody : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// 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 closing down.**_ +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Assignee { get; set; } +#nullable restore +#else + public string Assignee { get; set; } +#endif + /// 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._ +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? Assignees { get; set; } +#nullable restore +#else + public List Assignees { get; set; } +#endif + /// The contents of the issue. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Body { get; set; } +#nullable restore +#else + public string Body { get; set; } +#endif + /// Labels to associate with this issue. _NOTE: Only users with push access can set labels for new issues. Labels are silently dropped otherwise._ +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? Labels { get; set; } +#nullable restore +#else + public List Labels { get; set; } +#endif + /// The milestone property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Repos.Item.Item.Issues.IssuesPostRequestBody.IssuesPostRequestBody_milestone? Milestone { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Repos.Item.Item.Issues.IssuesPostRequestBody.IssuesPostRequestBody_milestone Milestone { get; set; } +#endif + /// The title of the issue. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Repos.Item.Item.Issues.IssuesPostRequestBody.IssuesPostRequestBody_title? Title { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Repos.Item.Item.Issues.IssuesPostRequestBody.IssuesPostRequestBody_title Title { get; set; } +#endif + /// The name of the issue type to associate with this issue. _NOTE: Only users with push access can set the type for new issues. The type is silently dropped otherwise._ +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Type { get; set; } +#nullable restore +#else + public string Type { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public IssuesPostRequestBody() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Repos.Item.Item.Issues.IssuesPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Repos.Item.Item.Issues.IssuesPostRequestBody(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "assignee", n => { Assignee = n.GetStringValue(); } }, + { "assignees", n => { Assignees = n.GetCollectionOfPrimitiveValues()?.AsList(); } }, + { "body", n => { Body = n.GetStringValue(); } }, + { "labels", n => { Labels = n.GetCollectionOfPrimitiveValues()?.AsList(); } }, + { "milestone", n => { Milestone = n.GetObjectValue(global::Ayllu.Github.Client.Repos.Item.Item.Issues.IssuesPostRequestBody.IssuesPostRequestBody_milestone.CreateFromDiscriminatorValue); } }, + { "title", n => { Title = n.GetObjectValue(global::Ayllu.Github.Client.Repos.Item.Item.Issues.IssuesPostRequestBody.IssuesPostRequestBody_title.CreateFromDiscriminatorValue); } }, + { "type", n => { Type = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("assignee", Assignee); + writer.WriteCollectionOfPrimitiveValues("assignees", Assignees); + writer.WriteStringValue("body", Body); + writer.WriteCollectionOfPrimitiveValues("labels", Labels); + writer.WriteObjectValue("milestone", Milestone); + writer.WriteObjectValue("title", Title); + writer.WriteStringValue("type", Type); + writer.WriteAdditionalData(AdditionalData); + } + /// + /// Composed type wrapper for classes , + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class IssuesPostRequestBody_milestone : IComposedTypeWrapper, IParsable + { + /// Composed type representation for type + public int? Integer { get; set; } + /// Composed type representation for type +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? String { get; set; } +#nullable restore +#else + public string String { get; set; } +#endif + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Repos.Item.Item.Issues.IssuesPostRequestBody.IssuesPostRequestBody_milestone CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + var mappingValue = parseNode.GetChildNode("")?.GetStringValue(); + var result = new global::Ayllu.Github.Client.Repos.Item.Item.Issues.IssuesPostRequestBody.IssuesPostRequestBody_milestone(); + if(parseNode.GetIntValue() is int integerValue) + { + result.Integer = integerValue; + } + else if(parseNode.GetStringValue() is string stringValue) + { + result.String = stringValue; + } + return result; + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary>(); + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(Integer != null) + { + writer.WriteIntValue(null, Integer); + } + else if(String != null) + { + writer.WriteStringValue(null, String); + } + } + } + /// + /// Composed type wrapper for classes , + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class IssuesPostRequestBody_title : IComposedTypeWrapper, IParsable + { + /// Composed type representation for type + public int? Integer { get; set; } + /// Composed type representation for type +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? String { get; set; } +#nullable restore +#else + public string String { get; set; } +#endif + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Repos.Item.Item.Issues.IssuesPostRequestBody.IssuesPostRequestBody_title CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + var mappingValue = parseNode.GetChildNode("")?.GetStringValue(); + var result = new global::Ayllu.Github.Client.Repos.Item.Item.Issues.IssuesPostRequestBody.IssuesPostRequestBody_title(); + if(parseNode.GetIntValue() is int integerValue) + { + result.Integer = integerValue; + } + else if(parseNode.GetStringValue() is string stringValue) + { + result.String = stringValue; + } + return result; + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary>(); + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(Integer != null) + { + writer.WriteIntValue(null, Integer); + } + else if(String != null) + { + writer.WriteStringValue(null, String); + } + } + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Issues/IssuesRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Issues/IssuesRequestBuilder.cs new file mode 100644 index 0000000..7cb211d --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Issues/IssuesRequestBuilder.cs @@ -0,0 +1,323 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Ayllu.Github.Client.Repos.Item.Item.Issues.Comments; +using Ayllu.Github.Client.Repos.Item.Item.Issues.Events; +using Ayllu.Github.Client.Repos.Item.Item.Issues.Item; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.Issues +{ + /// + /// Builds and executes requests for operations under \repos\{owner-id}\{repo-id}\issues + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class IssuesRequestBuilder : BaseRequestBuilder + { + /// The comments property + public global::Ayllu.Github.Client.Repos.Item.Item.Issues.Comments.CommentsRequestBuilder Comments + { + get => new global::Ayllu.Github.Client.Repos.Item.Item.Issues.Comments.CommentsRequestBuilder(PathParameters, RequestAdapter); + } + /// The events property + public global::Ayllu.Github.Client.Repos.Item.Item.Issues.Events.EventsRequestBuilder Events + { + get => new global::Ayllu.Github.Client.Repos.Item.Item.Issues.Events.EventsRequestBuilder(PathParameters, RequestAdapter); + } + /// Gets an item from the Ayllu.Github.Client.repos.item.item.issues.item collection + /// The number that identifies the issue. + /// A + public global::Ayllu.Github.Client.Repos.Item.Item.Issues.Item.WithIssue_numberItemRequestBuilder this[int position] + { + get + { + var urlTplParams = new Dictionary(PathParameters); + urlTplParams.Add("issue_number", position); + return new global::Ayllu.Github.Client.Repos.Item.Item.Issues.Item.WithIssue_numberItemRequestBuilder(urlTplParams, RequestAdapter); + } + } + /// Gets an item from the Ayllu.Github.Client.repos.item.item.issues.item collection + /// The number that identifies the issue. + /// A + [Obsolete("This indexer is deprecated and will be removed in the next major version. Use the one with the typed parameter instead.")] + public global::Ayllu.Github.Client.Repos.Item.Item.Issues.Item.WithIssue_numberItemRequestBuilder this[string position] + { + get + { + var urlTplParams = new Dictionary(PathParameters); + if (!string.IsNullOrWhiteSpace(position)) urlTplParams.Add("issue_number", position); + return new global::Ayllu.Github.Client.Repos.Item.Item.Issues.Item.WithIssue_numberItemRequestBuilder(urlTplParams, RequestAdapter); + } + } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public IssuesRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/issues{?assignee*,creator*,direction*,labels*,mentioned*,milestone*,page*,per_page*,since*,sort*,state*,type*}", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public IssuesRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/issues{?assignee*,creator*,direction*,labels*,mentioned*,milestone*,page*,per_page*,since*,sort*,state*,type*}", rawUrl) + { + } + /// + /// 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 this reason, "Issues" endpoints may return both issues and pull requests in the response. You can identify pull requests by the `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 pull request id, use the "[List pull requests](https://docs.github.com/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/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`. + /// API method documentation + /// + /// A List<global::Ayllu.Github.Client.Models.Issue> + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 404 status code + /// When receiving a 422 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task?> GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task> GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "404", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "422", global::Ayllu.Github.Client.Models.ValidationError.CreateFromDiscriminatorValue }, + }; + var collectionResult = await RequestAdapter.SendCollectionAsync(requestInfo, global::Ayllu.Github.Client.Models.Issue.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + return collectionResult?.AsList(); + } + /// + /// Any user with pull access to a repository can create an issue. If [issues are disabled in the repository](https://docs.github.com/articles/disabling-issues/), the API returns a `410 Gone` status.This endpoint triggers [notifications](https://docs.github.com/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. For more information, see "[Rate limits for the API](https://docs.github.com/rest/using-the-rest-api/rate-limits-for-the-rest-api#about-secondary-rate-limits)"and "[Best practices for using the REST API](https://docs.github.com/rest/guides/best-practices-for-using-the-rest-api)."This endpoint supports the following custom media types. For more information, see "[Media types](https://docs.github.com/rest/using-the-rest-api/getting-started-with-the-rest-api#media-types)."- **`application/vnd.github.raw+json`**: Returns the raw markdown body. Response will include `body`. This is the default if you do not pass any specific media type.- **`application/vnd.github.text+json`**: Returns a text only representation of the markdown body. Response will include `body_text`.- **`application/vnd.github.html+json`**: Returns HTML rendered from the body's markdown. Response will include `body_html`.- **`application/vnd.github.full+json`**: Returns raw, text, and HTML representations. Response will include `body`, `body_text`, and `body_html`. + /// API method documentation + /// + /// A + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 400 status code + /// When receiving a 403 status code + /// When receiving a 404 status code + /// When receiving a 410 status code + /// When receiving a 422 status code + /// When receiving a 503 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PostAsync(global::Ayllu.Github.Client.Repos.Item.Item.Issues.IssuesPostRequestBody body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task PostAsync(global::Ayllu.Github.Client.Repos.Item.Item.Issues.IssuesPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPostRequestInformation(body, requestConfiguration); + var errorMapping = new Dictionary> + { + { "400", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "403", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "404", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "410", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "422", global::Ayllu.Github.Client.Models.ValidationError.CreateFromDiscriminatorValue }, + { "503", global::Ayllu.Github.Client.Models.Issue503Error.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Models.Issue.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// 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 this reason, "Issues" endpoints may return both issues and pull requests in the response. You can identify pull requests by the `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 pull request id, use the "[List pull requests](https://docs.github.com/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/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`. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Any user with pull access to a repository can create an issue. If [issues are disabled in the repository](https://docs.github.com/articles/disabling-issues/), the API returns a `410 Gone` status.This endpoint triggers [notifications](https://docs.github.com/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. For more information, see "[Rate limits for the API](https://docs.github.com/rest/using-the-rest-api/rate-limits-for-the-rest-api#about-secondary-rate-limits)"and "[Best practices for using the REST API](https://docs.github.com/rest/guides/best-practices-for-using-the-rest-api)."This endpoint supports the following custom media types. For more information, see "[Media types](https://docs.github.com/rest/using-the-rest-api/getting-started-with-the-rest-api#media-types)."- **`application/vnd.github.raw+json`**: Returns the raw markdown body. Response will include `body`. This is the default if you do not pass any specific media type.- **`application/vnd.github.text+json`**: Returns a text only representation of the markdown body. Response will include `body_text`.- **`application/vnd.github.html+json`**: Returns HTML rendered from the body's markdown. Response will include `body_html`.- **`application/vnd.github.full+json`**: Returns raw, text, and HTML representations. Response will include `body`, `body_text`, and `body_html`. + /// + /// A + /// The request body + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPostRequestInformation(global::Ayllu.Github.Client.Repos.Item.Item.Issues.IssuesPostRequestBody body, Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToPostRequestInformation(global::Ayllu.Github.Client.Repos.Item.Item.Issues.IssuesPostRequestBody body, Action> requestConfiguration = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.Repos.Item.Item.Issues.IssuesRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Repos.Item.Item.Issues.IssuesRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// 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 this reason, "Issues" endpoints may return both issues and pull requests in the response. You can identify pull requests by the `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 pull request id, use the "[List pull requests](https://docs.github.com/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/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`. + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class IssuesRequestBuilderGetQueryParameters + { + /// Can be the name of a user. Pass in `none` for issues with no assigned user, and `*` for issues assigned to any user. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("assignee")] + public string? Assignee { get; set; } +#nullable restore +#else + [QueryParameter("assignee")] + public string Assignee { get; set; } +#endif + /// The user that created the issue. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("creator")] + public string? Creator { get; set; } +#nullable restore +#else + [QueryParameter("creator")] + public string Creator { get; set; } +#endif + /// The direction to sort the results by. + [Obsolete("This property is deprecated, use DirectionAsGetDirectionQueryParameterType instead")] +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("direction")] + public string? Direction { get; set; } +#nullable restore +#else + [QueryParameter("direction")] + public string Direction { get; set; } +#endif + /// The direction to sort the results by. + [QueryParameter("direction")] + public global::Ayllu.Github.Client.Repos.Item.Item.Issues.GetDirectionQueryParameterType? DirectionAsGetDirectionQueryParameterType { get; set; } + /// A list of comma separated label names. Example: `bug,ui,@high` +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("labels")] + public string? Labels { get; set; } +#nullable restore +#else + [QueryParameter("labels")] + public string Labels { get; set; } +#endif + /// A user that's mentioned in the issue. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("mentioned")] + public string? Mentioned { get; set; } +#nullable restore +#else + [QueryParameter("mentioned")] + public string Mentioned { get; set; } +#endif + /// 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. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("milestone")] + public string? Milestone { get; set; } +#nullable restore +#else + [QueryParameter("milestone")] + public string Milestone { get; set; } +#endif + /// The page number of the results to fetch. For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." + [QueryParameter("page")] + public int? Page { get; set; } + /// The number of results per page (max 100). For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." + [QueryParameter("per_page")] + public int? PerPage { get; set; } + /// 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`. + [QueryParameter("since")] + public DateTimeOffset? Since { get; set; } + /// What to sort results by. + [Obsolete("This property is deprecated, use SortAsGetSortQueryParameterType instead")] +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("sort")] + public string? Sort { get; set; } +#nullable restore +#else + [QueryParameter("sort")] + public string Sort { get; set; } +#endif + /// What to sort results by. + [QueryParameter("sort")] + public global::Ayllu.Github.Client.Repos.Item.Item.Issues.GetSortQueryParameterType? SortAsGetSortQueryParameterType { get; set; } + /// Indicates the state of the issues to return. + [Obsolete("This property is deprecated, use StateAsGetStateQueryParameterType instead")] +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("state")] + public string? State { get; set; } +#nullable restore +#else + [QueryParameter("state")] + public string State { get; set; } +#endif + /// Indicates the state of the issues to return. + [QueryParameter("state")] + public global::Ayllu.Github.Client.Repos.Item.Item.Issues.GetStateQueryParameterType? StateAsGetStateQueryParameterType { get; set; } + /// Can be the name of an issue type. If the string `*` is passed, issues with any type are accepted. If the string `none` is passed, issues without type are returned. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("type")] + public string? Type { get; set; } +#nullable restore +#else + [QueryParameter("type")] + public string Type { get; set; } +#endif + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class IssuesRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class IssuesRequestBuilderPostRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Issues/Item/Assignees/AssigneesDeleteRequestBody.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Issues/Item/Assignees/AssigneesDeleteRequestBody.cs new file mode 100644 index 0000000..d630b57 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Issues/Item/Assignees/AssigneesDeleteRequestBody.cs @@ -0,0 +1,65 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.Issues.Item.Assignees +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class AssigneesDeleteRequestBody : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// 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._ +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? Assignees { get; set; } +#nullable restore +#else + public List Assignees { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public AssigneesDeleteRequestBody() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Repos.Item.Item.Issues.Item.Assignees.AssigneesDeleteRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Repos.Item.Item.Issues.Item.Assignees.AssigneesDeleteRequestBody(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "assignees", n => { Assignees = n.GetCollectionOfPrimitiveValues()?.AsList(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteCollectionOfPrimitiveValues("assignees", Assignees); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Issues/Item/Assignees/AssigneesPostRequestBody.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Issues/Item/Assignees/AssigneesPostRequestBody.cs new file mode 100644 index 0000000..13607ad --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Issues/Item/Assignees/AssigneesPostRequestBody.cs @@ -0,0 +1,65 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.Issues.Item.Assignees +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class AssigneesPostRequestBody : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// 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._ +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? Assignees { get; set; } +#nullable restore +#else + public List Assignees { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public AssigneesPostRequestBody() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Repos.Item.Item.Issues.Item.Assignees.AssigneesPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Repos.Item.Item.Issues.Item.Assignees.AssigneesPostRequestBody(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "assignees", n => { Assignees = n.GetCollectionOfPrimitiveValues()?.AsList(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteCollectionOfPrimitiveValues("assignees", Assignees); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Issues/Item/Assignees/AssigneesRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Issues/Item/Assignees/AssigneesRequestBuilder.cs new file mode 100644 index 0000000..db60848 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Issues/Item/Assignees/AssigneesRequestBuilder.cs @@ -0,0 +1,162 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Ayllu.Github.Client.Repos.Item.Item.Issues.Item.Assignees.Item; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.Issues.Item.Assignees +{ + /// + /// Builds and executes requests for operations under \repos\{owner-id}\{repo-id}\issues\{issue_number}\assignees + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class AssigneesRequestBuilder : BaseRequestBuilder + { + /// Gets an item from the Ayllu.Github.Client.repos.item.item.issues.item.assignees.item collection + /// Unique identifier of the item + /// A + public global::Ayllu.Github.Client.Repos.Item.Item.Issues.Item.Assignees.Item.WithAssigneeItemRequestBuilder this[string position] + { + get + { + var urlTplParams = new Dictionary(PathParameters); + urlTplParams.Add("assignee", position); + return new global::Ayllu.Github.Client.Repos.Item.Item.Issues.Item.Assignees.Item.WithAssigneeItemRequestBuilder(urlTplParams, RequestAdapter); + } + } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public AssigneesRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/issues/{issue_number}/assignees", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public AssigneesRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/issues/{issue_number}/assignees", rawUrl) + { + } + /// + /// Removes one or more assignees from an issue. + /// API method documentation + /// + /// A + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task DeleteAsync(global::Ayllu.Github.Client.Repos.Item.Item.Issues.Item.Assignees.AssigneesDeleteRequestBody body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task DeleteAsync(global::Ayllu.Github.Client.Repos.Item.Item.Issues.Item.Assignees.AssigneesDeleteRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = ToDeleteRequestInformation(body, requestConfiguration); + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Models.Issue.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false); + } + /// + /// Adds up to 10 assignees to an issue. Users already assigned to an issue are not replaced. + /// API method documentation + /// + /// A + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PostAsync(global::Ayllu.Github.Client.Repos.Item.Item.Issues.Item.Assignees.AssigneesPostRequestBody body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task PostAsync(global::Ayllu.Github.Client.Repos.Item.Item.Issues.Item.Assignees.AssigneesPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPostRequestInformation(body, requestConfiguration); + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Models.Issue.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false); + } + /// + /// Removes one or more assignees from an issue. + /// + /// A + /// The request body + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToDeleteRequestInformation(global::Ayllu.Github.Client.Repos.Item.Item.Issues.Item.Assignees.AssigneesDeleteRequestBody body, Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToDeleteRequestInformation(global::Ayllu.Github.Client.Repos.Item.Item.Issues.Item.Assignees.AssigneesDeleteRequestBody body, Action> requestConfiguration = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation(Method.DELETE, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + return requestInfo; + } + /// + /// Adds up to 10 assignees to an issue. Users already assigned to an issue are not replaced. + /// + /// A + /// The request body + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPostRequestInformation(global::Ayllu.Github.Client.Repos.Item.Item.Issues.Item.Assignees.AssigneesPostRequestBody body, Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToPostRequestInformation(global::Ayllu.Github.Client.Repos.Item.Item.Issues.Item.Assignees.AssigneesPostRequestBody body, Action> requestConfiguration = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.Repos.Item.Item.Issues.Item.Assignees.AssigneesRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Repos.Item.Item.Issues.Item.Assignees.AssigneesRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class AssigneesRequestBuilderDeleteRequestConfiguration : RequestConfiguration + { + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class AssigneesRequestBuilderPostRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Issues/Item/Assignees/Item/WithAssigneeItemRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Issues/Item/Assignees/Item/WithAssigneeItemRequestBuilder.cs new file mode 100644 index 0000000..33986ae --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Issues/Item/Assignees/Item/WithAssigneeItemRequestBuilder.cs @@ -0,0 +1,97 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.Issues.Item.Assignees.Item +{ + /// + /// Builds and executes requests for operations under \repos\{owner-id}\{repo-id}\issues\{issue_number}\assignees\{assignee} + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithAssigneeItemRequestBuilder : BaseRequestBuilder + { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public WithAssigneeItemRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/issues/{issue_number}/assignees/{assignee}", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public WithAssigneeItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/issues/{issue_number}/assignees/{assignee}", rawUrl) + { + } + /// + /// 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. + /// API method documentation + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 404 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "404", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + }; + await RequestAdapter.SendNoContentAsync(requestInfo, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// 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. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.Repos.Item.Item.Issues.Item.Assignees.Item.WithAssigneeItemRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Repos.Item.Item.Issues.Item.Assignees.Item.WithAssigneeItemRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithAssigneeItemRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Issues/Item/Comments/CommentsPostRequestBody.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Issues/Item/Comments/CommentsPostRequestBody.cs new file mode 100644 index 0000000..6d615e1 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Issues/Item/Comments/CommentsPostRequestBody.cs @@ -0,0 +1,65 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.Issues.Item.Comments +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class CommentsPostRequestBody : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The contents of the comment. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Body { get; set; } +#nullable restore +#else + public string Body { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public CommentsPostRequestBody() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Repos.Item.Item.Issues.Item.Comments.CommentsPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Repos.Item.Item.Issues.Item.Comments.CommentsPostRequestBody(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "body", n => { Body = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("body", Body); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Issues/Item/Comments/CommentsRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Issues/Item/Comments/CommentsRequestBuilder.cs new file mode 100644 index 0000000..198c482 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Issues/Item/Comments/CommentsRequestBuilder.cs @@ -0,0 +1,179 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.Issues.Item.Comments +{ + /// + /// Builds and executes requests for operations under \repos\{owner-id}\{repo-id}\issues\{issue_number}\comments + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class CommentsRequestBuilder : BaseRequestBuilder + { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public CommentsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/issues/{issue_number}/comments{?page*,per_page*,since*}", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public CommentsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/issues/{issue_number}/comments{?page*,per_page*,since*}", rawUrl) + { + } + /// + /// 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/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`. + /// API method documentation + /// + /// A List<global::Ayllu.Github.Client.Models.IssueComment> + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 404 status code + /// When receiving a 410 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task?> GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task> GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "404", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "410", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + }; + var collectionResult = await RequestAdapter.SendCollectionAsync(requestInfo, global::Ayllu.Github.Client.Models.IssueComment.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + return collectionResult?.AsList(); + } + /// + /// You can use the REST API to create comments on issues and pull requests. Every pull request is an issue, but not every issue is a pull request.This endpoint triggers [notifications](https://docs.github.com/github/managing-subscriptions-and-notifications-on-github/about-notifications).Creating content too quickly using this endpoint may result in secondary rate limiting.For more information, see "[Rate limits for the API](https://docs.github.com/rest/using-the-rest-api/rate-limits-for-the-rest-api#about-secondary-rate-limits)"and "[Best practices for using the REST API](https://docs.github.com/rest/guides/best-practices-for-using-the-rest-api)."This endpoint supports the following custom media types. For more information, see "[Media types](https://docs.github.com/rest/using-the-rest-api/getting-started-with-the-rest-api#media-types)."- **`application/vnd.github.raw+json`**: Returns the raw markdown body. Response will include `body`. This is the default if you do not pass any specific media type.- **`application/vnd.github.text+json`**: Returns a text only representation of the markdown body. Response will include `body_text`.- **`application/vnd.github.html+json`**: Returns HTML rendered from the body's markdown. Response will include `body_html`.- **`application/vnd.github.full+json`**: Returns raw, text, and HTML representations. Response will include `body`, `body_text`, and `body_html`. + /// API method documentation + /// + /// A + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 403 status code + /// When receiving a 404 status code + /// When receiving a 410 status code + /// When receiving a 422 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PostAsync(global::Ayllu.Github.Client.Repos.Item.Item.Issues.Item.Comments.CommentsPostRequestBody body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task PostAsync(global::Ayllu.Github.Client.Repos.Item.Item.Issues.Item.Comments.CommentsPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPostRequestInformation(body, requestConfiguration); + var errorMapping = new Dictionary> + { + { "403", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "404", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "410", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "422", global::Ayllu.Github.Client.Models.ValidationError.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Models.IssueComment.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// 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/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`. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// You can use the REST API to create comments on issues and pull requests. Every pull request is an issue, but not every issue is a pull request.This endpoint triggers [notifications](https://docs.github.com/github/managing-subscriptions-and-notifications-on-github/about-notifications).Creating content too quickly using this endpoint may result in secondary rate limiting.For more information, see "[Rate limits for the API](https://docs.github.com/rest/using-the-rest-api/rate-limits-for-the-rest-api#about-secondary-rate-limits)"and "[Best practices for using the REST API](https://docs.github.com/rest/guides/best-practices-for-using-the-rest-api)."This endpoint supports the following custom media types. For more information, see "[Media types](https://docs.github.com/rest/using-the-rest-api/getting-started-with-the-rest-api#media-types)."- **`application/vnd.github.raw+json`**: Returns the raw markdown body. Response will include `body`. This is the default if you do not pass any specific media type.- **`application/vnd.github.text+json`**: Returns a text only representation of the markdown body. Response will include `body_text`.- **`application/vnd.github.html+json`**: Returns HTML rendered from the body's markdown. Response will include `body_html`.- **`application/vnd.github.full+json`**: Returns raw, text, and HTML representations. Response will include `body`, `body_text`, and `body_html`. + /// + /// A + /// The request body + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPostRequestInformation(global::Ayllu.Github.Client.Repos.Item.Item.Issues.Item.Comments.CommentsPostRequestBody body, Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToPostRequestInformation(global::Ayllu.Github.Client.Repos.Item.Item.Issues.Item.Comments.CommentsPostRequestBody body, Action> requestConfiguration = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.Repos.Item.Item.Issues.Item.Comments.CommentsRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Repos.Item.Item.Issues.Item.Comments.CommentsRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// 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/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`. + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class CommentsRequestBuilderGetQueryParameters + { + /// The page number of the results to fetch. For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." + [QueryParameter("page")] + public int? Page { get; set; } + /// The number of results per page (max 100). For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." + [QueryParameter("per_page")] + public int? PerPage { get; set; } + /// 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`. + [QueryParameter("since")] + public DateTimeOffset? Since { get; set; } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class CommentsRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class CommentsRequestBuilderPostRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Issues/Item/Dependencies/Blocked_by/Blocked_byPostRequestBody.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Issues/Item/Dependencies/Blocked_by/Blocked_byPostRequestBody.cs new file mode 100644 index 0000000..49682e4 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Issues/Item/Dependencies/Blocked_by/Blocked_byPostRequestBody.cs @@ -0,0 +1,59 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.Issues.Item.Dependencies.Blocked_by +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class Blocked_byPostRequestBody : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The id of the issue that blocks the current issue + public int? IssueId { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public Blocked_byPostRequestBody() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Repos.Item.Item.Issues.Item.Dependencies.Blocked_by.Blocked_byPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Repos.Item.Item.Issues.Item.Dependencies.Blocked_by.Blocked_byPostRequestBody(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "issue_id", n => { IssueId = n.GetIntValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteIntValue("issue_id", IssueId); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Issues/Item/Dependencies/Blocked_by/Blocked_byRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Issues/Item/Dependencies/Blocked_by/Blocked_byRequestBuilder.cs new file mode 100644 index 0000000..9b1ea94 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Issues/Item/Dependencies/Blocked_by/Blocked_byRequestBuilder.cs @@ -0,0 +1,202 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Ayllu.Github.Client.Repos.Item.Item.Issues.Item.Dependencies.Blocked_by.Item; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.Issues.Item.Dependencies.Blocked_by +{ + /// + /// Builds and executes requests for operations under \repos\{owner-id}\{repo-id}\issues\{issue_number}\dependencies\blocked_by + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class Blocked_byRequestBuilder : BaseRequestBuilder + { + /// Gets an item from the Ayllu.Github.Client.repos.item.item.issues.item.dependencies.blocked_by.item collection + /// The id of the blocking issue to remove as a dependency + /// A + public global::Ayllu.Github.Client.Repos.Item.Item.Issues.Item.Dependencies.Blocked_by.Item.WithIssue_ItemRequestBuilder this[int position] + { + get + { + var urlTplParams = new Dictionary(PathParameters); + urlTplParams.Add("issue_id", position); + return new global::Ayllu.Github.Client.Repos.Item.Item.Issues.Item.Dependencies.Blocked_by.Item.WithIssue_ItemRequestBuilder(urlTplParams, RequestAdapter); + } + } + /// Gets an item from the Ayllu.Github.Client.repos.item.item.issues.item.dependencies.blocked_by.item collection + /// The id of the blocking issue to remove as a dependency + /// A + [Obsolete("This indexer is deprecated and will be removed in the next major version. Use the one with the typed parameter instead.")] + public global::Ayllu.Github.Client.Repos.Item.Item.Issues.Item.Dependencies.Blocked_by.Item.WithIssue_ItemRequestBuilder this[string position] + { + get + { + var urlTplParams = new Dictionary(PathParameters); + if (!string.IsNullOrWhiteSpace(position)) urlTplParams.Add("issue_id", position); + return new global::Ayllu.Github.Client.Repos.Item.Item.Issues.Item.Dependencies.Blocked_by.Item.WithIssue_ItemRequestBuilder(urlTplParams, RequestAdapter); + } + } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public Blocked_byRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/issues/{issue_number}/dependencies/blocked_by{?page*,per_page*}", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public Blocked_byRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/issues/{issue_number}/dependencies/blocked_by{?page*,per_page*}", rawUrl) + { + } + /// + /// You can use the REST API to list the dependencies an issue is blocked by.This endpoint supports the following custom media types. For more information, see [Media types](https://docs.github.com/rest/using-the-rest-api/getting-started-with-the-rest-api#media-types).- **`application/vnd.github.raw+json`**: Returns the raw Markdown body. Response will include `body`. This is the default if you do not pass any specific media type.- **`application/vnd.github.text+json`**: Returns a text only representation of the Markdown body. Response will include `body_text`.- **`application/vnd.github.html+json`**: Returns HTML rendered from the body's Markdown. Response will include `body_html`.- **`application/vnd.github.full+json`**: Returns raw, text, and HTML representations. Response will include `body`, `body_text`, and `body_html`. + /// API method documentation + /// + /// A List<global::Ayllu.Github.Client.Models.Issue> + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 404 status code + /// When receiving a 410 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task?> GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task> GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "404", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "410", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + }; + var collectionResult = await RequestAdapter.SendCollectionAsync(requestInfo, global::Ayllu.Github.Client.Models.Issue.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + return collectionResult?.AsList(); + } + /// + /// You can use the REST API to add a 'blocked by' relationship to an issue.Creating content too quickly using this endpoint may result in secondary rate limiting.For more information, see [Rate limits for the API](https://docs.github.com/rest/using-the-rest-api/rate-limits-for-the-rest-api#about-secondary-rate-limits)and [Best practices for using the REST API](https://docs.github.com/rest/guides/best-practices-for-using-the-rest-api).This endpoint supports the following custom media types. For more information, see [Media types](https://docs.github.com/rest/using-the-rest-api/getting-started-with-the-rest-api#media-types).- **`application/vnd.github.raw+json`**: Returns the raw Markdown body. Response will include `body`. This is the default if you do not pass any specific media type.- **`application/vnd.github.text+json`**: Returns a text only representation of the Markdown body. Response will include `body_text`.- **`application/vnd.github.html+json`**: Returns HTML rendered from the body's Markdown. Response will include `body_html`.- **`application/vnd.github.full+json`**: Returns raw, text, and HTML representations. Response will include `body`, `body_text`, and `body_html`. + /// API method documentation + /// + /// A + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 403 status code + /// When receiving a 404 status code + /// When receiving a 410 status code + /// When receiving a 422 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PostAsync(global::Ayllu.Github.Client.Repos.Item.Item.Issues.Item.Dependencies.Blocked_by.Blocked_byPostRequestBody body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task PostAsync(global::Ayllu.Github.Client.Repos.Item.Item.Issues.Item.Dependencies.Blocked_by.Blocked_byPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPostRequestInformation(body, requestConfiguration); + var errorMapping = new Dictionary> + { + { "403", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "404", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "410", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "422", global::Ayllu.Github.Client.Models.ValidationError.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Models.Issue.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// You can use the REST API to list the dependencies an issue is blocked by.This endpoint supports the following custom media types. For more information, see [Media types](https://docs.github.com/rest/using-the-rest-api/getting-started-with-the-rest-api#media-types).- **`application/vnd.github.raw+json`**: Returns the raw Markdown body. Response will include `body`. This is the default if you do not pass any specific media type.- **`application/vnd.github.text+json`**: Returns a text only representation of the Markdown body. Response will include `body_text`.- **`application/vnd.github.html+json`**: Returns HTML rendered from the body's Markdown. Response will include `body_html`.- **`application/vnd.github.full+json`**: Returns raw, text, and HTML representations. Response will include `body`, `body_text`, and `body_html`. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// You can use the REST API to add a 'blocked by' relationship to an issue.Creating content too quickly using this endpoint may result in secondary rate limiting.For more information, see [Rate limits for the API](https://docs.github.com/rest/using-the-rest-api/rate-limits-for-the-rest-api#about-secondary-rate-limits)and [Best practices for using the REST API](https://docs.github.com/rest/guides/best-practices-for-using-the-rest-api).This endpoint supports the following custom media types. For more information, see [Media types](https://docs.github.com/rest/using-the-rest-api/getting-started-with-the-rest-api#media-types).- **`application/vnd.github.raw+json`**: Returns the raw Markdown body. Response will include `body`. This is the default if you do not pass any specific media type.- **`application/vnd.github.text+json`**: Returns a text only representation of the Markdown body. Response will include `body_text`.- **`application/vnd.github.html+json`**: Returns HTML rendered from the body's Markdown. Response will include `body_html`.- **`application/vnd.github.full+json`**: Returns raw, text, and HTML representations. Response will include `body`, `body_text`, and `body_html`. + /// + /// A + /// The request body + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPostRequestInformation(global::Ayllu.Github.Client.Repos.Item.Item.Issues.Item.Dependencies.Blocked_by.Blocked_byPostRequestBody body, Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToPostRequestInformation(global::Ayllu.Github.Client.Repos.Item.Item.Issues.Item.Dependencies.Blocked_by.Blocked_byPostRequestBody body, Action> requestConfiguration = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.Repos.Item.Item.Issues.Item.Dependencies.Blocked_by.Blocked_byRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Repos.Item.Item.Issues.Item.Dependencies.Blocked_by.Blocked_byRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// You can use the REST API to list the dependencies an issue is blocked by.This endpoint supports the following custom media types. For more information, see [Media types](https://docs.github.com/rest/using-the-rest-api/getting-started-with-the-rest-api#media-types).- **`application/vnd.github.raw+json`**: Returns the raw Markdown body. Response will include `body`. This is the default if you do not pass any specific media type.- **`application/vnd.github.text+json`**: Returns a text only representation of the Markdown body. Response will include `body_text`.- **`application/vnd.github.html+json`**: Returns HTML rendered from the body's Markdown. Response will include `body_html`.- **`application/vnd.github.full+json`**: Returns raw, text, and HTML representations. Response will include `body`, `body_text`, and `body_html`. + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class Blocked_byRequestBuilderGetQueryParameters + { + /// The page number of the results to fetch. For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." + [QueryParameter("page")] + public int? Page { get; set; } + /// The number of results per page (max 100). For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." + [QueryParameter("per_page")] + public int? PerPage { get; set; } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class Blocked_byRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class Blocked_byRequestBuilderPostRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Issues/Item/Dependencies/Blocked_by/Item/WithIssue_ItemRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Issues/Item/Dependencies/Blocked_by/Item/WithIssue_ItemRequestBuilder.cs new file mode 100644 index 0000000..5aa8656 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Issues/Item/Dependencies/Blocked_by/Item/WithIssue_ItemRequestBuilder.cs @@ -0,0 +1,106 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.Issues.Item.Dependencies.Blocked_by.Item +{ + /// + /// Builds and executes requests for operations under \repos\{owner-id}\{repo-id}\issues\{issue_number}\dependencies\blocked_by\{issue_id} + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithIssue_ItemRequestBuilder : BaseRequestBuilder + { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public WithIssue_ItemRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/issues/{issue_number}/dependencies/blocked_by/{issue_id}", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public WithIssue_ItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/issues/{issue_number}/dependencies/blocked_by/{issue_id}", rawUrl) + { + } + /// + /// You can use the REST API to remove a dependency that an issue is blocked by.Removing content too quickly using this endpoint may result in secondary rate limiting.For more information, see [Rate limits for the API](https://docs.github.com/rest/using-the-rest-api/rate-limits-for-the-rest-api#about-secondary-rate-limits)and [Best practices for using the REST API](https://docs.github.com/rest/guides/best-practices-for-using-the-rest-api).This endpoint supports the following custom media types. For more information, see [Media types](https://docs.github.com/rest/using-the-rest-api/getting-started-with-the-rest-api#media-types).- **`application/vnd.github.raw+json`**: Returns the raw Markdown body. Response will include `body`. This is the default if you do not pass a 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`. + /// API method documentation + /// + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 400 status code + /// When receiving a 401 status code + /// When receiving a 403 status code + /// When receiving a 404 status code + /// When receiving a 410 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task DeleteAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task DeleteAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToDeleteRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "400", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "401", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "403", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "404", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "410", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Models.Issue.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// You can use the REST API to remove a dependency that an issue is blocked by.Removing content too quickly using this endpoint may result in secondary rate limiting.For more information, see [Rate limits for the API](https://docs.github.com/rest/using-the-rest-api/rate-limits-for-the-rest-api#about-secondary-rate-limits)and [Best practices for using the REST API](https://docs.github.com/rest/guides/best-practices-for-using-the-rest-api).This endpoint supports the following custom media types. For more information, see [Media types](https://docs.github.com/rest/using-the-rest-api/getting-started-with-the-rest-api#media-types).- **`application/vnd.github.raw+json`**: Returns the raw Markdown body. Response will include `body`. This is the default if you do not pass a 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`. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToDeleteRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToDeleteRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.DELETE, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.Repos.Item.Item.Issues.Item.Dependencies.Blocked_by.Item.WithIssue_ItemRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Repos.Item.Item.Issues.Item.Dependencies.Blocked_by.Item.WithIssue_ItemRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithIssue_ItemRequestBuilderDeleteRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Issues/Item/Dependencies/Blocking/BlockingRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Issues/Item/Dependencies/Blocking/BlockingRequestBuilder.cs new file mode 100644 index 0000000..7dfc610 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Issues/Item/Dependencies/Blocking/BlockingRequestBuilder.cs @@ -0,0 +1,114 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.Issues.Item.Dependencies.Blocking +{ + /// + /// Builds and executes requests for operations under \repos\{owner-id}\{repo-id}\issues\{issue_number}\dependencies\blocking + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class BlockingRequestBuilder : BaseRequestBuilder + { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public BlockingRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/issues/{issue_number}/dependencies/blocking{?page*,per_page*}", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public BlockingRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/issues/{issue_number}/dependencies/blocking{?page*,per_page*}", rawUrl) + { + } + /// + /// You can use the REST API to list the dependencies an issue is blocking.This endpoint supports the following custom media types. For more information, see [Media types](https://docs.github.com/rest/using-the-rest-api/getting-started-with-the-rest-api#media-types).- **`application/vnd.github.raw+json`**: Returns the raw Markdown body. Response will include `body`. This is the default if you do not pass any specific media type.- **`application/vnd.github.text+json`**: Returns a text only representation of the Markdown body. Response will include `body_text`.- **`application/vnd.github.html+json`**: Returns HTML rendered from the body's Markdown. Response will include `body_html`.- **`application/vnd.github.full+json`**: Returns raw, text, and HTML representations. Response will include `body`, `body_text`, and `body_html`. + /// API method documentation + /// + /// A List<global::Ayllu.Github.Client.Models.Issue> + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 404 status code + /// When receiving a 410 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task?> GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task> GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "404", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "410", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + }; + var collectionResult = await RequestAdapter.SendCollectionAsync(requestInfo, global::Ayllu.Github.Client.Models.Issue.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + return collectionResult?.AsList(); + } + /// + /// You can use the REST API to list the dependencies an issue is blocking.This endpoint supports the following custom media types. For more information, see [Media types](https://docs.github.com/rest/using-the-rest-api/getting-started-with-the-rest-api#media-types).- **`application/vnd.github.raw+json`**: Returns the raw Markdown body. Response will include `body`. This is the default if you do not pass any specific media type.- **`application/vnd.github.text+json`**: Returns a text only representation of the Markdown body. Response will include `body_text`.- **`application/vnd.github.html+json`**: Returns HTML rendered from the body's Markdown. Response will include `body_html`.- **`application/vnd.github.full+json`**: Returns raw, text, and HTML representations. Response will include `body`, `body_text`, and `body_html`. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.Repos.Item.Item.Issues.Item.Dependencies.Blocking.BlockingRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Repos.Item.Item.Issues.Item.Dependencies.Blocking.BlockingRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// You can use the REST API to list the dependencies an issue is blocking.This endpoint supports the following custom media types. For more information, see [Media types](https://docs.github.com/rest/using-the-rest-api/getting-started-with-the-rest-api#media-types).- **`application/vnd.github.raw+json`**: Returns the raw Markdown body. Response will include `body`. This is the default if you do not pass any specific media type.- **`application/vnd.github.text+json`**: Returns a text only representation of the Markdown body. Response will include `body_text`.- **`application/vnd.github.html+json`**: Returns HTML rendered from the body's Markdown. Response will include `body_html`.- **`application/vnd.github.full+json`**: Returns raw, text, and HTML representations. Response will include `body`, `body_text`, and `body_html`. + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class BlockingRequestBuilderGetQueryParameters + { + /// The page number of the results to fetch. For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." + [QueryParameter("page")] + public int? Page { get; set; } + /// The number of results per page (max 100). For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." + [QueryParameter("per_page")] + public int? PerPage { get; set; } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class BlockingRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Issues/Item/Dependencies/DependenciesRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Issues/Item/Dependencies/DependenciesRequestBuilder.cs new file mode 100644 index 0000000..c200116 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Issues/Item/Dependencies/DependenciesRequestBuilder.cs @@ -0,0 +1,47 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Repos.Item.Item.Issues.Item.Dependencies.Blocked_by; +using Ayllu.Github.Client.Repos.Item.Item.Issues.Item.Dependencies.Blocking; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.Issues.Item.Dependencies +{ + /// + /// Builds and executes requests for operations under \repos\{owner-id}\{repo-id}\issues\{issue_number}\dependencies + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class DependenciesRequestBuilder : BaseRequestBuilder + { + /// The blocked_by property + public global::Ayllu.Github.Client.Repos.Item.Item.Issues.Item.Dependencies.Blocked_by.Blocked_byRequestBuilder Blocked_by + { + get => new global::Ayllu.Github.Client.Repos.Item.Item.Issues.Item.Dependencies.Blocked_by.Blocked_byRequestBuilder(PathParameters, RequestAdapter); + } + /// The blocking property + public global::Ayllu.Github.Client.Repos.Item.Item.Issues.Item.Dependencies.Blocking.BlockingRequestBuilder Blocking + { + get => new global::Ayllu.Github.Client.Repos.Item.Item.Issues.Item.Dependencies.Blocking.BlockingRequestBuilder(PathParameters, RequestAdapter); + } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public DependenciesRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/issues/{issue_number}/dependencies", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public DependenciesRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/issues/{issue_number}/dependencies", rawUrl) + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Issues/Item/Events/EventsRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Issues/Item/Events/EventsRequestBuilder.cs new file mode 100644 index 0000000..34f81a4 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Issues/Item/Events/EventsRequestBuilder.cs @@ -0,0 +1,112 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.Issues.Item.Events +{ + /// + /// Builds and executes requests for operations under \repos\{owner-id}\{repo-id}\issues\{issue_number}\events + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class EventsRequestBuilder : BaseRequestBuilder + { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public EventsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/issues/{issue_number}/events{?page*,per_page*}", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public EventsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/issues/{issue_number}/events{?page*,per_page*}", rawUrl) + { + } + /// + /// Lists all events for an issue. + /// API method documentation + /// + /// A List<global::Ayllu.Github.Client.Models.IssueEventForIssue> + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 410 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task?> GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task> GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "410", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + }; + var collectionResult = await RequestAdapter.SendCollectionAsync(requestInfo, global::Ayllu.Github.Client.Models.IssueEventForIssue.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + return collectionResult?.AsList(); + } + /// + /// Lists all events for an issue. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.Repos.Item.Item.Issues.Item.Events.EventsRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Repos.Item.Item.Issues.Item.Events.EventsRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Lists all events for an issue. + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class EventsRequestBuilderGetQueryParameters + { + /// The page number of the results to fetch. For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." + [QueryParameter("page")] + public int? Page { get; set; } + /// The number of results per page (max 100). For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." + [QueryParameter("per_page")] + public int? PerPage { get; set; } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class EventsRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Issues/Item/Labels/Item/WithNameItemRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Issues/Item/Labels/Item/WithNameItemRequestBuilder.cs new file mode 100644 index 0000000..d541b0b --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Issues/Item/Labels/Item/WithNameItemRequestBuilder.cs @@ -0,0 +1,101 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.Issues.Item.Labels.Item +{ + /// + /// Builds and executes requests for operations under \repos\{owner-id}\{repo-id}\issues\{issue_number}\labels\{name} + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithNameItemRequestBuilder : BaseRequestBuilder + { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public WithNameItemRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/issues/{issue_number}/labels/{name}", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public WithNameItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/issues/{issue_number}/labels/{name}", rawUrl) + { + } + /// + /// 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. + /// API method documentation + /// + /// A List<global::Ayllu.Github.Client.Models.Label> + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 404 status code + /// When receiving a 410 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task?> DeleteAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task> DeleteAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToDeleteRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "404", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "410", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + }; + var collectionResult = await RequestAdapter.SendCollectionAsync(requestInfo, global::Ayllu.Github.Client.Models.Label.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + return collectionResult?.AsList(); + } + /// + /// 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. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToDeleteRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToDeleteRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.DELETE, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.Repos.Item.Item.Issues.Item.Labels.Item.WithNameItemRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Repos.Item.Item.Issues.Item.Labels.Item.WithNameItemRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithNameItemRequestBuilderDeleteRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Issues/Item/Labels/LabelsPostRequestBodyMember1.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Issues/Item/Labels/LabelsPostRequestBodyMember1.cs new file mode 100644 index 0000000..9f8b63f --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Issues/Item/Labels/LabelsPostRequestBodyMember1.cs @@ -0,0 +1,65 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.Issues.Item.Labels +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class LabelsPostRequestBodyMember1 : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// 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/rest/issues/labels#set-labels-for-an-issue)." +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? Labels { get; set; } +#nullable restore +#else + public List Labels { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public LabelsPostRequestBodyMember1() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Repos.Item.Item.Issues.Item.Labels.LabelsPostRequestBodyMember1 CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Repos.Item.Item.Issues.Item.Labels.LabelsPostRequestBodyMember1(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "labels", n => { Labels = n.GetCollectionOfPrimitiveValues()?.AsList(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteCollectionOfPrimitiveValues("labels", Labels); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Issues/Item/Labels/LabelsPostRequestBodyMember2.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Issues/Item/Labels/LabelsPostRequestBodyMember2.cs new file mode 100644 index 0000000..be36a00 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Issues/Item/Labels/LabelsPostRequestBodyMember2.cs @@ -0,0 +1,65 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.Issues.Item.Labels +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class LabelsPostRequestBodyMember2 : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The labels property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? Labels { get; set; } +#nullable restore +#else + public List Labels { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public LabelsPostRequestBodyMember2() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Repos.Item.Item.Issues.Item.Labels.LabelsPostRequestBodyMember2 CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Repos.Item.Item.Issues.Item.Labels.LabelsPostRequestBodyMember2(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "labels", n => { Labels = n.GetCollectionOfObjectValues(global::Ayllu.Github.Client.Repos.Item.Item.Issues.Item.Labels.LabelsPostRequestBodyMember2_labels.CreateFromDiscriminatorValue)?.AsList(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteCollectionOfObjectValues("labels", Labels); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Issues/Item/Labels/LabelsPostRequestBodyMember2_labels.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Issues/Item/Labels/LabelsPostRequestBodyMember2_labels.cs new file mode 100644 index 0000000..1f66a78 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Issues/Item/Labels/LabelsPostRequestBodyMember2_labels.cs @@ -0,0 +1,65 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.Issues.Item.Labels +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class LabelsPostRequestBodyMember2_labels : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The name property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Name { get; set; } +#nullable restore +#else + public string Name { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public LabelsPostRequestBodyMember2_labels() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Repos.Item.Item.Issues.Item.Labels.LabelsPostRequestBodyMember2_labels CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Repos.Item.Item.Issues.Item.Labels.LabelsPostRequestBodyMember2_labels(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "name", n => { Name = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("name", Name); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Issues/Item/Labels/LabelsPostRequestBodyMember3.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Issues/Item/Labels/LabelsPostRequestBodyMember3.cs new file mode 100644 index 0000000..bfa4d38 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Issues/Item/Labels/LabelsPostRequestBodyMember3.cs @@ -0,0 +1,55 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.Issues.Item.Labels +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class LabelsPostRequestBodyMember3 : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public LabelsPostRequestBodyMember3() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Repos.Item.Item.Issues.Item.Labels.LabelsPostRequestBodyMember3 CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Repos.Item.Item.Issues.Item.Labels.LabelsPostRequestBodyMember3(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Issues/Item/Labels/LabelsPutRequestBodyMember1.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Issues/Item/Labels/LabelsPutRequestBodyMember1.cs new file mode 100644 index 0000000..1aa66dc --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Issues/Item/Labels/LabelsPutRequestBodyMember1.cs @@ -0,0 +1,65 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.Issues.Item.Labels +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class LabelsPutRequestBodyMember1 : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// 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/rest/issues/labels#add-labels-to-an-issue)." +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? Labels { get; set; } +#nullable restore +#else + public List Labels { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public LabelsPutRequestBodyMember1() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Repos.Item.Item.Issues.Item.Labels.LabelsPutRequestBodyMember1 CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Repos.Item.Item.Issues.Item.Labels.LabelsPutRequestBodyMember1(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "labels", n => { Labels = n.GetCollectionOfPrimitiveValues()?.AsList(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteCollectionOfPrimitiveValues("labels", Labels); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Issues/Item/Labels/LabelsPutRequestBodyMember2.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Issues/Item/Labels/LabelsPutRequestBodyMember2.cs new file mode 100644 index 0000000..2ba03a4 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Issues/Item/Labels/LabelsPutRequestBodyMember2.cs @@ -0,0 +1,65 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.Issues.Item.Labels +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class LabelsPutRequestBodyMember2 : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The labels property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? Labels { get; set; } +#nullable restore +#else + public List Labels { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public LabelsPutRequestBodyMember2() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Repos.Item.Item.Issues.Item.Labels.LabelsPutRequestBodyMember2 CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Repos.Item.Item.Issues.Item.Labels.LabelsPutRequestBodyMember2(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "labels", n => { Labels = n.GetCollectionOfObjectValues(global::Ayllu.Github.Client.Repos.Item.Item.Issues.Item.Labels.LabelsPutRequestBodyMember2_labels.CreateFromDiscriminatorValue)?.AsList(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteCollectionOfObjectValues("labels", Labels); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Issues/Item/Labels/LabelsPutRequestBodyMember2_labels.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Issues/Item/Labels/LabelsPutRequestBodyMember2_labels.cs new file mode 100644 index 0000000..e774b03 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Issues/Item/Labels/LabelsPutRequestBodyMember2_labels.cs @@ -0,0 +1,65 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.Issues.Item.Labels +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class LabelsPutRequestBodyMember2_labels : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The name property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Name { get; set; } +#nullable restore +#else + public string Name { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public LabelsPutRequestBodyMember2_labels() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Repos.Item.Item.Issues.Item.Labels.LabelsPutRequestBodyMember2_labels CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Repos.Item.Item.Issues.Item.Labels.LabelsPutRequestBodyMember2_labels(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "name", n => { Name = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("name", Name); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Issues/Item/Labels/LabelsPutRequestBodyMember3.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Issues/Item/Labels/LabelsPutRequestBodyMember3.cs new file mode 100644 index 0000000..6a8408e --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Issues/Item/Labels/LabelsPutRequestBodyMember3.cs @@ -0,0 +1,55 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.Issues.Item.Labels +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class LabelsPutRequestBodyMember3 : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public LabelsPutRequestBodyMember3() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Repos.Item.Item.Issues.Item.Labels.LabelsPutRequestBodyMember3 CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Repos.Item.Item.Issues.Item.Labels.LabelsPutRequestBodyMember3(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Issues/Item/Labels/LabelsRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Issues/Item/Labels/LabelsRequestBuilder.cs new file mode 100644 index 0000000..da7477e --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Issues/Item/Labels/LabelsRequestBuilder.cs @@ -0,0 +1,547 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Ayllu.Github.Client.Repos.Item.Item.Issues.Item.Labels.Item; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.Issues.Item.Labels +{ + /// + /// Builds and executes requests for operations under \repos\{owner-id}\{repo-id}\issues\{issue_number}\labels + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class LabelsRequestBuilder : BaseRequestBuilder + { + /// Gets an item from the Ayllu.Github.Client.repos.item.item.issues.item.labels.item collection + /// Unique identifier of the item + /// A + public global::Ayllu.Github.Client.Repos.Item.Item.Issues.Item.Labels.Item.WithNameItemRequestBuilder this[string position] + { + get + { + var urlTplParams = new Dictionary(PathParameters); + urlTplParams.Add("name", position); + return new global::Ayllu.Github.Client.Repos.Item.Item.Issues.Item.Labels.Item.WithNameItemRequestBuilder(urlTplParams, RequestAdapter); + } + } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public LabelsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/issues/{issue_number}/labels{?page*,per_page*}", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public LabelsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/issues/{issue_number}/labels{?page*,per_page*}", rawUrl) + { + } + /// + /// Removes all labels from an issue. + /// API method documentation + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 404 status code + /// When receiving a 410 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task DeleteAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task DeleteAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToDeleteRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "404", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "410", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + }; + await RequestAdapter.SendNoContentAsync(requestInfo, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// Lists all labels for an issue. + /// API method documentation + /// + /// A List<global::Ayllu.Github.Client.Models.Label> + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 404 status code + /// When receiving a 410 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task?> GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task> GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "404", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "410", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + }; + var collectionResult = await RequestAdapter.SendCollectionAsync(requestInfo, global::Ayllu.Github.Client.Models.Label.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + return collectionResult?.AsList(); + } + /// + /// Adds labels to an issue. If you provide an empty array of labels, all labels are removed from the issue. + /// API method documentation + /// + /// A List<global::Ayllu.Github.Client.Models.Label> + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 404 status code + /// When receiving a 410 status code + /// When receiving a 422 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task?> PostAsync(global::Ayllu.Github.Client.Repos.Item.Item.Issues.Item.Labels.LabelsRequestBuilder.LabelsPostRequestBody body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task> PostAsync(global::Ayllu.Github.Client.Repos.Item.Item.Issues.Item.Labels.LabelsRequestBuilder.LabelsPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPostRequestInformation(body, requestConfiguration); + var errorMapping = new Dictionary> + { + { "404", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "410", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "422", global::Ayllu.Github.Client.Models.ValidationError.CreateFromDiscriminatorValue }, + }; + var collectionResult = await RequestAdapter.SendCollectionAsync(requestInfo, global::Ayllu.Github.Client.Models.Label.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + return collectionResult?.AsList(); + } + /// + /// Removes any previous labels and sets the new labels for an issue. + /// API method documentation + /// + /// A List<global::Ayllu.Github.Client.Models.Label> + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 404 status code + /// When receiving a 410 status code + /// When receiving a 422 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task?> PutAsync(global::Ayllu.Github.Client.Repos.Item.Item.Issues.Item.Labels.LabelsRequestBuilder.LabelsPutRequestBody body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task> PutAsync(global::Ayllu.Github.Client.Repos.Item.Item.Issues.Item.Labels.LabelsRequestBuilder.LabelsPutRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPutRequestInformation(body, requestConfiguration); + var errorMapping = new Dictionary> + { + { "404", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "410", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "422", global::Ayllu.Github.Client.Models.ValidationError.CreateFromDiscriminatorValue }, + }; + var collectionResult = await RequestAdapter.SendCollectionAsync(requestInfo, global::Ayllu.Github.Client.Models.Label.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + return collectionResult?.AsList(); + } + /// + /// Removes all labels from an issue. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToDeleteRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToDeleteRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.DELETE, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Lists all labels for an issue. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Adds labels to an issue. If you provide an empty array of labels, all labels are removed from the issue. + /// + /// A + /// The request body + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPostRequestInformation(global::Ayllu.Github.Client.Repos.Item.Item.Issues.Item.Labels.LabelsRequestBuilder.LabelsPostRequestBody body, Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToPostRequestInformation(global::Ayllu.Github.Client.Repos.Item.Item.Issues.Item.Labels.LabelsRequestBuilder.LabelsPostRequestBody body, Action> requestConfiguration = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + return requestInfo; + } + /// + /// Removes any previous labels and sets the new labels for an issue. + /// + /// A + /// The request body + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPutRequestInformation(global::Ayllu.Github.Client.Repos.Item.Item.Issues.Item.Labels.LabelsRequestBuilder.LabelsPutRequestBody body, Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToPutRequestInformation(global::Ayllu.Github.Client.Repos.Item.Item.Issues.Item.Labels.LabelsRequestBuilder.LabelsPutRequestBody body, Action> requestConfiguration = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation(Method.PUT, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.Repos.Item.Item.Issues.Item.Labels.LabelsRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Repos.Item.Item.Issues.Item.Labels.LabelsRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Composed type wrapper for classes , , , List<global::Ayllu.Github.Client.Repos.Item.Item.Issues.Item.Labels.LabelsPostRequestBodyMember3>, List<string> + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class LabelsPostRequestBody : IComposedTypeWrapper, IParsable + { + /// Composed type representation for type +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Repos.Item.Item.Issues.Item.Labels.LabelsPostRequestBodyMember1? LabelsPostRequestBodyMember1 { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Repos.Item.Item.Issues.Item.Labels.LabelsPostRequestBodyMember1 LabelsPostRequestBodyMember1 { get; set; } +#endif + /// Composed type representation for type +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Repos.Item.Item.Issues.Item.Labels.LabelsPostRequestBodyMember2? LabelsPostRequestBodyMember2 { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Repos.Item.Item.Issues.Item.Labels.LabelsPostRequestBodyMember2 LabelsPostRequestBodyMember2 { get; set; } +#endif + /// Composed type representation for type List<global::Ayllu.Github.Client.Repos.Item.Item.Issues.Item.Labels.LabelsPostRequestBodyMember3> +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? LabelsPostRequestBodyMember3 { get; set; } +#nullable restore +#else + public List LabelsPostRequestBodyMember3 { get; set; } +#endif + /// Composed type representation for type +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? LabelsPostRequestBodyString { get; set; } +#nullable restore +#else + public string LabelsPostRequestBodyString { get; set; } +#endif + /// Composed type representation for type List<string> +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? String { get; set; } +#nullable restore +#else + public List String { get; set; } +#endif + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Repos.Item.Item.Issues.Item.Labels.LabelsRequestBuilder.LabelsPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + var mappingValue = parseNode.GetChildNode("")?.GetStringValue(); + var result = new global::Ayllu.Github.Client.Repos.Item.Item.Issues.Item.Labels.LabelsRequestBuilder.LabelsPostRequestBody(); + if("".Equals(mappingValue, StringComparison.OrdinalIgnoreCase)) + { + result.LabelsPostRequestBodyMember1 = new global::Ayllu.Github.Client.Repos.Item.Item.Issues.Item.Labels.LabelsPostRequestBodyMember1(); + } + else if("".Equals(mappingValue, StringComparison.OrdinalIgnoreCase)) + { + result.LabelsPostRequestBodyMember2 = new global::Ayllu.Github.Client.Repos.Item.Item.Issues.Item.Labels.LabelsPostRequestBodyMember2(); + } + else if(parseNode.GetStringValue() is string labelsPostRequestBodyStringValue) + { + result.LabelsPostRequestBodyString = labelsPostRequestBodyStringValue; + } + else if(parseNode.GetCollectionOfObjectValues(global::Ayllu.Github.Client.Repos.Item.Item.Issues.Item.Labels.LabelsPostRequestBodyMember3.CreateFromDiscriminatorValue)?.AsList() is List labelsPostRequestBodyMember3Value) + { + result.LabelsPostRequestBodyMember3 = labelsPostRequestBodyMember3Value; + } + else if(parseNode.GetCollectionOfPrimitiveValues()?.AsList() is List stringValue) + { + result.String = stringValue; + } + return result; + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + if(LabelsPostRequestBodyMember1 != null) + { + return LabelsPostRequestBodyMember1.GetFieldDeserializers(); + } + else if(LabelsPostRequestBodyMember2 != null) + { + return LabelsPostRequestBodyMember2.GetFieldDeserializers(); + } + return new Dictionary>(); + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(LabelsPostRequestBodyMember1 != null) + { + writer.WriteObjectValue(null, LabelsPostRequestBodyMember1); + } + else if(LabelsPostRequestBodyMember2 != null) + { + writer.WriteObjectValue(null, LabelsPostRequestBodyMember2); + } + else if(LabelsPostRequestBodyString != null) + { + writer.WriteStringValue(null, LabelsPostRequestBodyString); + } + else if(LabelsPostRequestBodyMember3 != null) + { + writer.WriteCollectionOfObjectValues(null, LabelsPostRequestBodyMember3); + } + else if(String != null) + { + writer.WriteCollectionOfPrimitiveValues(null, String); + } + } + } + /// + /// Composed type wrapper for classes , , , List<global::Ayllu.Github.Client.Repos.Item.Item.Issues.Item.Labels.LabelsPutRequestBodyMember3>, List<string> + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class LabelsPutRequestBody : IComposedTypeWrapper, IParsable + { + /// Composed type representation for type +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Repos.Item.Item.Issues.Item.Labels.LabelsPutRequestBodyMember1? LabelsPutRequestBodyMember1 { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Repos.Item.Item.Issues.Item.Labels.LabelsPutRequestBodyMember1 LabelsPutRequestBodyMember1 { get; set; } +#endif + /// Composed type representation for type +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Repos.Item.Item.Issues.Item.Labels.LabelsPutRequestBodyMember2? LabelsPutRequestBodyMember2 { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Repos.Item.Item.Issues.Item.Labels.LabelsPutRequestBodyMember2 LabelsPutRequestBodyMember2 { get; set; } +#endif + /// Composed type representation for type List<global::Ayllu.Github.Client.Repos.Item.Item.Issues.Item.Labels.LabelsPutRequestBodyMember3> +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? LabelsPutRequestBodyMember3 { get; set; } +#nullable restore +#else + public List LabelsPutRequestBodyMember3 { get; set; } +#endif + /// Composed type representation for type +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? LabelsPutRequestBodyString { get; set; } +#nullable restore +#else + public string LabelsPutRequestBodyString { get; set; } +#endif + /// Composed type representation for type List<string> +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? String { get; set; } +#nullable restore +#else + public List String { get; set; } +#endif + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Repos.Item.Item.Issues.Item.Labels.LabelsRequestBuilder.LabelsPutRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + var mappingValue = parseNode.GetChildNode("")?.GetStringValue(); + var result = new global::Ayllu.Github.Client.Repos.Item.Item.Issues.Item.Labels.LabelsRequestBuilder.LabelsPutRequestBody(); + if("".Equals(mappingValue, StringComparison.OrdinalIgnoreCase)) + { + result.LabelsPutRequestBodyMember1 = new global::Ayllu.Github.Client.Repos.Item.Item.Issues.Item.Labels.LabelsPutRequestBodyMember1(); + } + else if("".Equals(mappingValue, StringComparison.OrdinalIgnoreCase)) + { + result.LabelsPutRequestBodyMember2 = new global::Ayllu.Github.Client.Repos.Item.Item.Issues.Item.Labels.LabelsPutRequestBodyMember2(); + } + else if(parseNode.GetStringValue() is string labelsPutRequestBodyStringValue) + { + result.LabelsPutRequestBodyString = labelsPutRequestBodyStringValue; + } + else if(parseNode.GetCollectionOfObjectValues(global::Ayllu.Github.Client.Repos.Item.Item.Issues.Item.Labels.LabelsPutRequestBodyMember3.CreateFromDiscriminatorValue)?.AsList() is List labelsPutRequestBodyMember3Value) + { + result.LabelsPutRequestBodyMember3 = labelsPutRequestBodyMember3Value; + } + else if(parseNode.GetCollectionOfPrimitiveValues()?.AsList() is List stringValue) + { + result.String = stringValue; + } + return result; + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + if(LabelsPutRequestBodyMember1 != null) + { + return LabelsPutRequestBodyMember1.GetFieldDeserializers(); + } + else if(LabelsPutRequestBodyMember2 != null) + { + return LabelsPutRequestBodyMember2.GetFieldDeserializers(); + } + return new Dictionary>(); + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(LabelsPutRequestBodyMember1 != null) + { + writer.WriteObjectValue(null, LabelsPutRequestBodyMember1); + } + else if(LabelsPutRequestBodyMember2 != null) + { + writer.WriteObjectValue(null, LabelsPutRequestBodyMember2); + } + else if(LabelsPutRequestBodyString != null) + { + writer.WriteStringValue(null, LabelsPutRequestBodyString); + } + else if(LabelsPutRequestBodyMember3 != null) + { + writer.WriteCollectionOfObjectValues(null, LabelsPutRequestBodyMember3); + } + else if(String != null) + { + writer.WriteCollectionOfPrimitiveValues(null, String); + } + } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class LabelsRequestBuilderDeleteRequestConfiguration : RequestConfiguration + { + } + /// + /// Lists all labels for an issue. + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class LabelsRequestBuilderGetQueryParameters + { + /// The page number of the results to fetch. For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." + [QueryParameter("page")] + public int? Page { get; set; } + /// The number of results per page (max 100). For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." + [QueryParameter("per_page")] + public int? PerPage { get; set; } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class LabelsRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class LabelsRequestBuilderPostRequestConfiguration : RequestConfiguration + { + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class LabelsRequestBuilderPutRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Issues/Item/Lock/LockPutRequestBody.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Issues/Item/Lock/LockPutRequestBody.cs new file mode 100644 index 0000000..7be60e9 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Issues/Item/Lock/LockPutRequestBody.cs @@ -0,0 +1,59 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.Issues.Item.Lock +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class LockPutRequestBody : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// 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` + public global::Ayllu.Github.Client.Repos.Item.Item.Issues.Item.Lock.LockPutRequestBody_lock_reason? LockReason { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public LockPutRequestBody() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Repos.Item.Item.Issues.Item.Lock.LockPutRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Repos.Item.Item.Issues.Item.Lock.LockPutRequestBody(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "lock_reason", n => { LockReason = n.GetEnumValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteEnumValue("lock_reason", LockReason); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Issues/Item/Lock/LockPutRequestBody_lock_reason.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Issues/Item/Lock/LockPutRequestBody_lock_reason.cs new file mode 100644 index 0000000..c97ecd5 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Issues/Item/Lock/LockPutRequestBody_lock_reason.cs @@ -0,0 +1,27 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.Issues.Item.Lock +{ + /// 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` + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public enum LockPutRequestBody_lock_reason + { + [EnumMember(Value = "off-topic")] + #pragma warning disable CS1591 + OffTopic, + #pragma warning restore CS1591 + [EnumMember(Value = "too heated")] + #pragma warning disable CS1591 + TooHeated, + #pragma warning restore CS1591 + [EnumMember(Value = "resolved")] + #pragma warning disable CS1591 + Resolved, + #pragma warning restore CS1591 + [EnumMember(Value = "spam")] + #pragma warning disable CS1591 + Spam, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Issues/Item/Lock/LockRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Issues/Item/Lock/LockRequestBuilder.cs new file mode 100644 index 0000000..5a4315a --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Issues/Item/Lock/LockRequestBuilder.cs @@ -0,0 +1,160 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.Issues.Item.Lock +{ + /// + /// Builds and executes requests for operations under \repos\{owner-id}\{repo-id}\issues\{issue_number}\lock + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class LockRequestBuilder : BaseRequestBuilder + { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public LockRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/issues/{issue_number}/lock", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public LockRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/issues/{issue_number}/lock", rawUrl) + { + } + /// + /// Users with push access can unlock an issue's conversation. + /// API method documentation + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 403 status code + /// When receiving a 404 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task DeleteAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task DeleteAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToDeleteRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "403", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "404", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + }; + await RequestAdapter.SendNoContentAsync(requestInfo, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// 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/rest/guides/getting-started-with-the-rest-api#http-method)." + /// API method documentation + /// + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 403 status code + /// When receiving a 404 status code + /// When receiving a 410 status code + /// When receiving a 422 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PutAsync(global::Ayllu.Github.Client.Repos.Item.Item.Issues.Item.Lock.LockPutRequestBody body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task PutAsync(global::Ayllu.Github.Client.Repos.Item.Item.Issues.Item.Lock.LockPutRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPutRequestInformation(body, requestConfiguration); + var errorMapping = new Dictionary> + { + { "403", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "404", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "410", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "422", global::Ayllu.Github.Client.Models.ValidationError.CreateFromDiscriminatorValue }, + }; + await RequestAdapter.SendNoContentAsync(requestInfo, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// Users with push access can unlock an issue's conversation. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToDeleteRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToDeleteRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.DELETE, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// 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/rest/guides/getting-started-with-the-rest-api#http-method)." + /// + /// A + /// The request body + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPutRequestInformation(global::Ayllu.Github.Client.Repos.Item.Item.Issues.Item.Lock.LockPutRequestBody body, Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToPutRequestInformation(global::Ayllu.Github.Client.Repos.Item.Item.Issues.Item.Lock.LockPutRequestBody body, Action> requestConfiguration = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation(Method.PUT, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.Repos.Item.Item.Issues.Item.Lock.LockRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Repos.Item.Item.Issues.Item.Lock.LockRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class LockRequestBuilderDeleteRequestConfiguration : RequestConfiguration + { + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class LockRequestBuilderPutRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Issues/Item/Reactions/GetContentQueryParameterType.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Issues/Item/Reactions/GetContentQueryParameterType.cs new file mode 100644 index 0000000..3a07212 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Issues/Item/Reactions/GetContentQueryParameterType.cs @@ -0,0 +1,44 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.Issues.Item.Reactions +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public enum GetContentQueryParameterType + #pragma warning restore CS1591 + { + [EnumMember(Value = "+1")] + #pragma warning disable CS1591 + Plus_1, + #pragma warning restore CS1591 + [EnumMember(Value = "-1")] + #pragma warning disable CS1591 + Minus_1, + #pragma warning restore CS1591 + [EnumMember(Value = "laugh")] + #pragma warning disable CS1591 + Laugh, + #pragma warning restore CS1591 + [EnumMember(Value = "confused")] + #pragma warning disable CS1591 + Confused, + #pragma warning restore CS1591 + [EnumMember(Value = "heart")] + #pragma warning disable CS1591 + Heart, + #pragma warning restore CS1591 + [EnumMember(Value = "hooray")] + #pragma warning disable CS1591 + Hooray, + #pragma warning restore CS1591 + [EnumMember(Value = "rocket")] + #pragma warning disable CS1591 + Rocket, + #pragma warning restore CS1591 + [EnumMember(Value = "eyes")] + #pragma warning disable CS1591 + Eyes, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Issues/Item/Reactions/Item/WithReaction_ItemRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Issues/Item/Reactions/Item/WithReaction_ItemRequestBuilder.cs new file mode 100644 index 0000000..1fee65d --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Issues/Item/Reactions/Item/WithReaction_ItemRequestBuilder.cs @@ -0,0 +1,90 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.Issues.Item.Reactions.Item +{ + /// + /// Builds and executes requests for operations under \repos\{owner-id}\{repo-id}\issues\{issue_number}\reactions\{reaction_id} + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithReaction_ItemRequestBuilder : BaseRequestBuilder + { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public WithReaction_ItemRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/issues/{issue_number}/reactions/{reaction_id}", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public WithReaction_ItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/issues/{issue_number}/reactions/{reaction_id}", rawUrl) + { + } + /// + /// > [!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/rest/issues/issues#get-an-issue). + /// API method documentation + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task DeleteAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task DeleteAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToDeleteRequestInformation(requestConfiguration); + await RequestAdapter.SendNoContentAsync(requestInfo, default, cancellationToken).ConfigureAwait(false); + } + /// + /// > [!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/rest/issues/issues#get-an-issue). + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToDeleteRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToDeleteRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.DELETE, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.Repos.Item.Item.Issues.Item.Reactions.Item.WithReaction_ItemRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Repos.Item.Item.Issues.Item.Reactions.Item.WithReaction_ItemRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithReaction_ItemRequestBuilderDeleteRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Issues/Item/Reactions/ReactionsPostRequestBody.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Issues/Item/Reactions/ReactionsPostRequestBody.cs new file mode 100644 index 0000000..241be2c --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Issues/Item/Reactions/ReactionsPostRequestBody.cs @@ -0,0 +1,59 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.Issues.Item.Reactions +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class ReactionsPostRequestBody : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The [reaction type](https://docs.github.com/rest/reactions/reactions#about-reactions) to add to the issue. + public global::Ayllu.Github.Client.Repos.Item.Item.Issues.Item.Reactions.ReactionsPostRequestBody_content? Content { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public ReactionsPostRequestBody() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Repos.Item.Item.Issues.Item.Reactions.ReactionsPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Repos.Item.Item.Issues.Item.Reactions.ReactionsPostRequestBody(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "content", n => { Content = n.GetEnumValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteEnumValue("content", Content); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Issues/Item/Reactions/ReactionsPostRequestBody_content.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Issues/Item/Reactions/ReactionsPostRequestBody_content.cs new file mode 100644 index 0000000..4673b55 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Issues/Item/Reactions/ReactionsPostRequestBody_content.cs @@ -0,0 +1,43 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.Issues.Item.Reactions +{ + /// The [reaction type](https://docs.github.com/rest/reactions/reactions#about-reactions) to add to the issue. + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public enum ReactionsPostRequestBody_content + { + [EnumMember(Value = "+1")] + #pragma warning disable CS1591 + Plus_1, + #pragma warning restore CS1591 + [EnumMember(Value = "-1")] + #pragma warning disable CS1591 + Minus_1, + #pragma warning restore CS1591 + [EnumMember(Value = "laugh")] + #pragma warning disable CS1591 + Laugh, + #pragma warning restore CS1591 + [EnumMember(Value = "confused")] + #pragma warning disable CS1591 + Confused, + #pragma warning restore CS1591 + [EnumMember(Value = "heart")] + #pragma warning disable CS1591 + Heart, + #pragma warning restore CS1591 + [EnumMember(Value = "hooray")] + #pragma warning disable CS1591 + Hooray, + #pragma warning restore CS1591 + [EnumMember(Value = "rocket")] + #pragma warning disable CS1591 + Rocket, + #pragma warning restore CS1591 + [EnumMember(Value = "eyes")] + #pragma warning disable CS1591 + Eyes, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Issues/Item/Reactions/ReactionsRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Issues/Item/Reactions/ReactionsRequestBuilder.cs new file mode 100644 index 0000000..54cac1a --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Issues/Item/Reactions/ReactionsRequestBuilder.cs @@ -0,0 +1,210 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Ayllu.Github.Client.Repos.Item.Item.Issues.Item.Reactions.Item; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.Issues.Item.Reactions +{ + /// + /// Builds and executes requests for operations under \repos\{owner-id}\{repo-id}\issues\{issue_number}\reactions + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class ReactionsRequestBuilder : BaseRequestBuilder + { + /// Gets an item from the Ayllu.Github.Client.repos.item.item.issues.item.reactions.item collection + /// The unique identifier of the reaction. + /// A + public global::Ayllu.Github.Client.Repos.Item.Item.Issues.Item.Reactions.Item.WithReaction_ItemRequestBuilder this[int position] + { + get + { + var urlTplParams = new Dictionary(PathParameters); + urlTplParams.Add("reaction_id", position); + return new global::Ayllu.Github.Client.Repos.Item.Item.Issues.Item.Reactions.Item.WithReaction_ItemRequestBuilder(urlTplParams, RequestAdapter); + } + } + /// Gets an item from the Ayllu.Github.Client.repos.item.item.issues.item.reactions.item collection + /// The unique identifier of the reaction. + /// A + [Obsolete("This indexer is deprecated and will be removed in the next major version. Use the one with the typed parameter instead.")] + public global::Ayllu.Github.Client.Repos.Item.Item.Issues.Item.Reactions.Item.WithReaction_ItemRequestBuilder this[string position] + { + get + { + var urlTplParams = new Dictionary(PathParameters); + if (!string.IsNullOrWhiteSpace(position)) urlTplParams.Add("reaction_id", position); + return new global::Ayllu.Github.Client.Repos.Item.Item.Issues.Item.Reactions.Item.WithReaction_ItemRequestBuilder(urlTplParams, RequestAdapter); + } + } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public ReactionsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/issues/{issue_number}/reactions{?content*,page*,per_page*}", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public ReactionsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/issues/{issue_number}/reactions{?content*,page*,per_page*}", rawUrl) + { + } + /// + /// List the reactions to an [issue](https://docs.github.com/rest/issues/issues#get-an-issue). + /// API method documentation + /// + /// A List<global::Ayllu.Github.Client.Models.Reaction> + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 404 status code + /// When receiving a 410 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task?> GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task> GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "404", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "410", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + }; + var collectionResult = await RequestAdapter.SendCollectionAsync(requestInfo, global::Ayllu.Github.Client.Models.Reaction.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + return collectionResult?.AsList(); + } + /// + /// Create a reaction to an [issue](https://docs.github.com/rest/issues/issues#get-an-issue). A response with an HTTP `200` status means that you already added the reaction type to this issue. + /// API method documentation + /// + /// A + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 422 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PostAsync(global::Ayllu.Github.Client.Repos.Item.Item.Issues.Item.Reactions.ReactionsPostRequestBody body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task PostAsync(global::Ayllu.Github.Client.Repos.Item.Item.Issues.Item.Reactions.ReactionsPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPostRequestInformation(body, requestConfiguration); + var errorMapping = new Dictionary> + { + { "422", global::Ayllu.Github.Client.Models.ValidationError.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Models.Reaction.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// List the reactions to an [issue](https://docs.github.com/rest/issues/issues#get-an-issue). + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Create a reaction to an [issue](https://docs.github.com/rest/issues/issues#get-an-issue). A response with an HTTP `200` status means that you already added the reaction type to this issue. + /// + /// A + /// The request body + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPostRequestInformation(global::Ayllu.Github.Client.Repos.Item.Item.Issues.Item.Reactions.ReactionsPostRequestBody body, Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToPostRequestInformation(global::Ayllu.Github.Client.Repos.Item.Item.Issues.Item.Reactions.ReactionsPostRequestBody body, Action> requestConfiguration = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.Repos.Item.Item.Issues.Item.Reactions.ReactionsRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Repos.Item.Item.Issues.Item.Reactions.ReactionsRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// List the reactions to an [issue](https://docs.github.com/rest/issues/issues#get-an-issue). + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class ReactionsRequestBuilderGetQueryParameters + { + /// Returns a single [reaction type](https://docs.github.com/rest/reactions/reactions#about-reactions). Omit this parameter to list all reactions to an issue. + [Obsolete("This property is deprecated, use ContentAsGetContentQueryParameterType instead")] +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("content")] + public string? Content { get; set; } +#nullable restore +#else + [QueryParameter("content")] + public string Content { get; set; } +#endif + /// Returns a single [reaction type](https://docs.github.com/rest/reactions/reactions#about-reactions). Omit this parameter to list all reactions to an issue. + [QueryParameter("content")] + public global::Ayllu.Github.Client.Repos.Item.Item.Issues.Item.Reactions.GetContentQueryParameterType? ContentAsGetContentQueryParameterType { get; set; } + /// The page number of the results to fetch. For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." + [QueryParameter("page")] + public int? Page { get; set; } + /// The number of results per page (max 100). For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." + [QueryParameter("per_page")] + public int? PerPage { get; set; } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class ReactionsRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class ReactionsRequestBuilderPostRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Issues/Item/Sub_issue/Sub_issueDeleteRequestBody.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Issues/Item/Sub_issue/Sub_issueDeleteRequestBody.cs new file mode 100644 index 0000000..68b7a49 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Issues/Item/Sub_issue/Sub_issueDeleteRequestBody.cs @@ -0,0 +1,59 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.Issues.Item.Sub_issue +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class Sub_issueDeleteRequestBody : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The id of the sub-issue to remove + public int? SubIssueId { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public Sub_issueDeleteRequestBody() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Repos.Item.Item.Issues.Item.Sub_issue.Sub_issueDeleteRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Repos.Item.Item.Issues.Item.Sub_issue.Sub_issueDeleteRequestBody(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "sub_issue_id", n => { SubIssueId = n.GetIntValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteIntValue("sub_issue_id", SubIssueId); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Issues/Item/Sub_issue/Sub_issueRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Issues/Item/Sub_issue/Sub_issueRequestBuilder.cs new file mode 100644 index 0000000..5fce07d --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Issues/Item/Sub_issue/Sub_issueRequestBuilder.cs @@ -0,0 +1,105 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.Issues.Item.Sub_issue +{ + /// + /// Builds and executes requests for operations under \repos\{owner-id}\{repo-id}\issues\{issue_number}\sub_issue + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class Sub_issueRequestBuilder : BaseRequestBuilder + { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public Sub_issueRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/issues/{issue_number}/sub_issue", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public Sub_issueRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/issues/{issue_number}/sub_issue", rawUrl) + { + } + /// + /// You can use the REST API to remove a sub-issue from an issue.Removing content too quickly using this endpoint may result in secondary rate limiting.For more information, see "[Rate limits for the API](https://docs.github.com/rest/using-the-rest-api/rate-limits-for-the-rest-api#about-secondary-rate-limits)"and "[Best practices for using the REST API](https://docs.github.com/rest/guides/best-practices-for-using-the-rest-api)."This endpoint supports the following custom media types. For more information, see "[Media types](https://docs.github.com/rest/using-the-rest-api/getting-started-with-the-rest-api#media-types)."- **`application/vnd.github.raw+json`**: Returns the raw markdown body. Response will include `body`. This is the default if you do not pass a 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`. + /// API method documentation + /// + /// A + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 400 status code + /// When receiving a 404 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task DeleteAsync(global::Ayllu.Github.Client.Repos.Item.Item.Issues.Item.Sub_issue.Sub_issueDeleteRequestBody body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task DeleteAsync(global::Ayllu.Github.Client.Repos.Item.Item.Issues.Item.Sub_issue.Sub_issueDeleteRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = ToDeleteRequestInformation(body, requestConfiguration); + var errorMapping = new Dictionary> + { + { "400", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "404", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Models.Issue.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// You can use the REST API to remove a sub-issue from an issue.Removing content too quickly using this endpoint may result in secondary rate limiting.For more information, see "[Rate limits for the API](https://docs.github.com/rest/using-the-rest-api/rate-limits-for-the-rest-api#about-secondary-rate-limits)"and "[Best practices for using the REST API](https://docs.github.com/rest/guides/best-practices-for-using-the-rest-api)."This endpoint supports the following custom media types. For more information, see "[Media types](https://docs.github.com/rest/using-the-rest-api/getting-started-with-the-rest-api#media-types)."- **`application/vnd.github.raw+json`**: Returns the raw markdown body. Response will include `body`. This is the default if you do not pass a 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`. + /// + /// A + /// The request body + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToDeleteRequestInformation(global::Ayllu.Github.Client.Repos.Item.Item.Issues.Item.Sub_issue.Sub_issueDeleteRequestBody body, Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToDeleteRequestInformation(global::Ayllu.Github.Client.Repos.Item.Item.Issues.Item.Sub_issue.Sub_issueDeleteRequestBody body, Action> requestConfiguration = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation(Method.DELETE, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.Repos.Item.Item.Issues.Item.Sub_issue.Sub_issueRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Repos.Item.Item.Issues.Item.Sub_issue.Sub_issueRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class Sub_issueRequestBuilderDeleteRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Issues/Item/Sub_issues/Priority/PriorityPatchRequestBody.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Issues/Item/Sub_issues/Priority/PriorityPatchRequestBody.cs new file mode 100644 index 0000000..8b89332 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Issues/Item/Sub_issues/Priority/PriorityPatchRequestBody.cs @@ -0,0 +1,67 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.Issues.Item.Sub_issues.Priority +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class PriorityPatchRequestBody : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The id of the sub-issue to be prioritized after (either positional argument after OR before should be specified). + public int? AfterId { get; set; } + /// The id of the sub-issue to be prioritized before (either positional argument after OR before should be specified). + public int? BeforeId { get; set; } + /// The id of the sub-issue to reprioritize + public int? SubIssueId { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public PriorityPatchRequestBody() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Repos.Item.Item.Issues.Item.Sub_issues.Priority.PriorityPatchRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Repos.Item.Item.Issues.Item.Sub_issues.Priority.PriorityPatchRequestBody(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "after_id", n => { AfterId = n.GetIntValue(); } }, + { "before_id", n => { BeforeId = n.GetIntValue(); } }, + { "sub_issue_id", n => { SubIssueId = n.GetIntValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteIntValue("after_id", AfterId); + writer.WriteIntValue("before_id", BeforeId); + writer.WriteIntValue("sub_issue_id", SubIssueId); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Issues/Item/Sub_issues/Priority/PriorityRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Issues/Item/Sub_issues/Priority/PriorityRequestBuilder.cs new file mode 100644 index 0000000..8f056e3 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Issues/Item/Sub_issues/Priority/PriorityRequestBuilder.cs @@ -0,0 +1,109 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.Issues.Item.Sub_issues.Priority +{ + /// + /// Builds and executes requests for operations under \repos\{owner-id}\{repo-id}\issues\{issue_number}\sub_issues\priority + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class PriorityRequestBuilder : BaseRequestBuilder + { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public PriorityRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/issues/{issue_number}/sub_issues/priority", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public PriorityRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/issues/{issue_number}/sub_issues/priority", rawUrl) + { + } + /// + /// You can use the REST API to reprioritize a sub-issue to a different position in the parent list. + /// API method documentation + /// + /// A + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 403 status code + /// When receiving a 404 status code + /// When receiving a 422 status code + /// When receiving a 503 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PatchAsync(global::Ayllu.Github.Client.Repos.Item.Item.Issues.Item.Sub_issues.Priority.PriorityPatchRequestBody body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task PatchAsync(global::Ayllu.Github.Client.Repos.Item.Item.Issues.Item.Sub_issues.Priority.PriorityPatchRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPatchRequestInformation(body, requestConfiguration); + var errorMapping = new Dictionary> + { + { "403", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "404", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "422", global::Ayllu.Github.Client.Models.ValidationErrorSimple.CreateFromDiscriminatorValue }, + { "503", global::Ayllu.Github.Client.Models.Issue503Error.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Models.Issue.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// You can use the REST API to reprioritize a sub-issue to a different position in the parent list. + /// + /// A + /// The request body + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPatchRequestInformation(global::Ayllu.Github.Client.Repos.Item.Item.Issues.Item.Sub_issues.Priority.PriorityPatchRequestBody body, Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToPatchRequestInformation(global::Ayllu.Github.Client.Repos.Item.Item.Issues.Item.Sub_issues.Priority.PriorityPatchRequestBody body, Action> requestConfiguration = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.Repos.Item.Item.Issues.Item.Sub_issues.Priority.PriorityRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Repos.Item.Item.Issues.Item.Sub_issues.Priority.PriorityRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class PriorityRequestBuilderPatchRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Issues/Item/Sub_issues/Sub_issuesPostRequestBody.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Issues/Item/Sub_issues/Sub_issuesPostRequestBody.cs new file mode 100644 index 0000000..dfc54a0 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Issues/Item/Sub_issues/Sub_issuesPostRequestBody.cs @@ -0,0 +1,63 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.Issues.Item.Sub_issues +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class Sub_issuesPostRequestBody : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// Option that, when true, instructs the operation to replace the sub-issues current parent issue + public bool? ReplaceParent { get; set; } + /// The id of the sub-issue to add. The sub-issue must belong to the same repository owner as the parent issue + public int? SubIssueId { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public Sub_issuesPostRequestBody() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Repos.Item.Item.Issues.Item.Sub_issues.Sub_issuesPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Repos.Item.Item.Issues.Item.Sub_issues.Sub_issuesPostRequestBody(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "replace_parent", n => { ReplaceParent = n.GetBoolValue(); } }, + { "sub_issue_id", n => { SubIssueId = n.GetIntValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteBoolValue("replace_parent", ReplaceParent); + writer.WriteIntValue("sub_issue_id", SubIssueId); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Issues/Item/Sub_issues/Sub_issuesRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Issues/Item/Sub_issues/Sub_issuesRequestBuilder.cs new file mode 100644 index 0000000..da1e9ab --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Issues/Item/Sub_issues/Sub_issuesRequestBuilder.cs @@ -0,0 +1,182 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Ayllu.Github.Client.Repos.Item.Item.Issues.Item.Sub_issues.Priority; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.Issues.Item.Sub_issues +{ + /// + /// Builds and executes requests for operations under \repos\{owner-id}\{repo-id}\issues\{issue_number}\sub_issues + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class Sub_issuesRequestBuilder : BaseRequestBuilder + { + /// The priority property + public global::Ayllu.Github.Client.Repos.Item.Item.Issues.Item.Sub_issues.Priority.PriorityRequestBuilder Priority + { + get => new global::Ayllu.Github.Client.Repos.Item.Item.Issues.Item.Sub_issues.Priority.PriorityRequestBuilder(PathParameters, RequestAdapter); + } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public Sub_issuesRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/issues/{issue_number}/sub_issues{?page*,per_page*}", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public Sub_issuesRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/issues/{issue_number}/sub_issues{?page*,per_page*}", rawUrl) + { + } + /// + /// You can use the REST API to list the sub-issues on an issue.This endpoint supports the following custom media types. For more information, see [Media types](https://docs.github.com/rest/using-the-rest-api/getting-started-with-the-rest-api#media-types).- **`application/vnd.github.raw+json`**: Returns the raw Markdown body. Response will include `body`. This is the default if you do not pass any specific media type.- **`application/vnd.github.text+json`**: Returns a text only representation of the Markdown body. Response will include `body_text`.- **`application/vnd.github.html+json`**: Returns HTML rendered from the body's Markdown. Response will include `body_html`.- **`application/vnd.github.full+json`**: Returns raw, text, and HTML representations. Response will include `body`, `body_text`, and `body_html`. + /// API method documentation + /// + /// A List<global::Ayllu.Github.Client.Models.Issue> + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 404 status code + /// When receiving a 410 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task?> GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task> GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "404", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "410", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + }; + var collectionResult = await RequestAdapter.SendCollectionAsync(requestInfo, global::Ayllu.Github.Client.Models.Issue.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + return collectionResult?.AsList(); + } + /// + /// You can use the REST API to add sub-issues to issues.Creating content too quickly using this endpoint may result in secondary rate limiting.For more information, see "[Rate limits for the API](https://docs.github.com/rest/using-the-rest-api/rate-limits-for-the-rest-api#about-secondary-rate-limits)"and "[Best practices for using the REST API](https://docs.github.com/rest/guides/best-practices-for-using-the-rest-api)."This endpoint supports the following custom media types. For more information, see "[Media types](https://docs.github.com/rest/using-the-rest-api/getting-started-with-the-rest-api#media-types)."- **`application/vnd.github.raw+json`**: Returns the raw markdown body. Response will include `body`. This is the default if you do not pass any specific media type.- **`application/vnd.github.text+json`**: Returns a text only representation of the markdown body. Response will include `body_text`.- **`application/vnd.github.html+json`**: Returns HTML rendered from the body's markdown. Response will include `body_html`.- **`application/vnd.github.full+json`**: Returns raw, text, and HTML representations. Response will include `body`, `body_text`, and `body_html`. + /// API method documentation + /// + /// A + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 403 status code + /// When receiving a 404 status code + /// When receiving a 410 status code + /// When receiving a 422 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PostAsync(global::Ayllu.Github.Client.Repos.Item.Item.Issues.Item.Sub_issues.Sub_issuesPostRequestBody body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task PostAsync(global::Ayllu.Github.Client.Repos.Item.Item.Issues.Item.Sub_issues.Sub_issuesPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPostRequestInformation(body, requestConfiguration); + var errorMapping = new Dictionary> + { + { "403", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "404", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "410", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "422", global::Ayllu.Github.Client.Models.ValidationError.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Models.Issue.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// You can use the REST API to list the sub-issues on an issue.This endpoint supports the following custom media types. For more information, see [Media types](https://docs.github.com/rest/using-the-rest-api/getting-started-with-the-rest-api#media-types).- **`application/vnd.github.raw+json`**: Returns the raw Markdown body. Response will include `body`. This is the default if you do not pass any specific media type.- **`application/vnd.github.text+json`**: Returns a text only representation of the Markdown body. Response will include `body_text`.- **`application/vnd.github.html+json`**: Returns HTML rendered from the body's Markdown. Response will include `body_html`.- **`application/vnd.github.full+json`**: Returns raw, text, and HTML representations. Response will include `body`, `body_text`, and `body_html`. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// You can use the REST API to add sub-issues to issues.Creating content too quickly using this endpoint may result in secondary rate limiting.For more information, see "[Rate limits for the API](https://docs.github.com/rest/using-the-rest-api/rate-limits-for-the-rest-api#about-secondary-rate-limits)"and "[Best practices for using the REST API](https://docs.github.com/rest/guides/best-practices-for-using-the-rest-api)."This endpoint supports the following custom media types. For more information, see "[Media types](https://docs.github.com/rest/using-the-rest-api/getting-started-with-the-rest-api#media-types)."- **`application/vnd.github.raw+json`**: Returns the raw markdown body. Response will include `body`. This is the default if you do not pass any specific media type.- **`application/vnd.github.text+json`**: Returns a text only representation of the markdown body. Response will include `body_text`.- **`application/vnd.github.html+json`**: Returns HTML rendered from the body's markdown. Response will include `body_html`.- **`application/vnd.github.full+json`**: Returns raw, text, and HTML representations. Response will include `body`, `body_text`, and `body_html`. + /// + /// A + /// The request body + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPostRequestInformation(global::Ayllu.Github.Client.Repos.Item.Item.Issues.Item.Sub_issues.Sub_issuesPostRequestBody body, Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToPostRequestInformation(global::Ayllu.Github.Client.Repos.Item.Item.Issues.Item.Sub_issues.Sub_issuesPostRequestBody body, Action> requestConfiguration = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.Repos.Item.Item.Issues.Item.Sub_issues.Sub_issuesRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Repos.Item.Item.Issues.Item.Sub_issues.Sub_issuesRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// You can use the REST API to list the sub-issues on an issue.This endpoint supports the following custom media types. For more information, see [Media types](https://docs.github.com/rest/using-the-rest-api/getting-started-with-the-rest-api#media-types).- **`application/vnd.github.raw+json`**: Returns the raw Markdown body. Response will include `body`. This is the default if you do not pass any specific media type.- **`application/vnd.github.text+json`**: Returns a text only representation of the Markdown body. Response will include `body_text`.- **`application/vnd.github.html+json`**: Returns HTML rendered from the body's Markdown. Response will include `body_html`.- **`application/vnd.github.full+json`**: Returns raw, text, and HTML representations. Response will include `body`, `body_text`, and `body_html`. + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class Sub_issuesRequestBuilderGetQueryParameters + { + /// The page number of the results to fetch. For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." + [QueryParameter("page")] + public int? Page { get; set; } + /// The number of results per page (max 100). For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." + [QueryParameter("per_page")] + public int? PerPage { get; set; } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class Sub_issuesRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class Sub_issuesRequestBuilderPostRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Issues/Item/Timeline/TimelineRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Issues/Item/Timeline/TimelineRequestBuilder.cs new file mode 100644 index 0000000..c6b6733 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Issues/Item/Timeline/TimelineRequestBuilder.cs @@ -0,0 +1,114 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.Issues.Item.Timeline +{ + /// + /// Builds and executes requests for operations under \repos\{owner-id}\{repo-id}\issues\{issue_number}\timeline + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class TimelineRequestBuilder : BaseRequestBuilder + { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public TimelineRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/issues/{issue_number}/timeline{?page*,per_page*}", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public TimelineRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/issues/{issue_number}/timeline{?page*,per_page*}", rawUrl) + { + } + /// + /// List all timeline events for an issue. + /// API method documentation + /// + /// A List<global::Ayllu.Github.Client.Models.TimelineIssueEvents> + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 404 status code + /// When receiving a 410 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task?> GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task> GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "404", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "410", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + }; + var collectionResult = await RequestAdapter.SendCollectionAsync(requestInfo, global::Ayllu.Github.Client.Models.TimelineIssueEvents.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + return collectionResult?.AsList(); + } + /// + /// List all timeline events for an issue. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.Repos.Item.Item.Issues.Item.Timeline.TimelineRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Repos.Item.Item.Issues.Item.Timeline.TimelineRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// List all timeline events for an issue. + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class TimelineRequestBuilderGetQueryParameters + { + /// The page number of the results to fetch. For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." + [QueryParameter("page")] + public int? Page { get; set; } + /// The number of results per page (max 100). For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." + [QueryParameter("per_page")] + public int? PerPage { get; set; } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class TimelineRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Issues/Item/WithIssue_numberItemRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Issues/Item/WithIssue_numberItemRequestBuilder.cs new file mode 100644 index 0000000..812c3ce --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Issues/Item/WithIssue_numberItemRequestBuilder.cs @@ -0,0 +1,224 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Ayllu.Github.Client.Repos.Item.Item.Issues.Item.Assignees; +using Ayllu.Github.Client.Repos.Item.Item.Issues.Item.Comments; +using Ayllu.Github.Client.Repos.Item.Item.Issues.Item.Dependencies; +using Ayllu.Github.Client.Repos.Item.Item.Issues.Item.Events; +using Ayllu.Github.Client.Repos.Item.Item.Issues.Item.Labels; +using Ayllu.Github.Client.Repos.Item.Item.Issues.Item.Lock; +using Ayllu.Github.Client.Repos.Item.Item.Issues.Item.Reactions; +using Ayllu.Github.Client.Repos.Item.Item.Issues.Item.Sub_issue; +using Ayllu.Github.Client.Repos.Item.Item.Issues.Item.Sub_issues; +using Ayllu.Github.Client.Repos.Item.Item.Issues.Item.Timeline; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.Issues.Item +{ + /// + /// Builds and executes requests for operations under \repos\{owner-id}\{repo-id}\issues\{issue_number} + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithIssue_numberItemRequestBuilder : BaseRequestBuilder + { + /// The assignees property + public global::Ayllu.Github.Client.Repos.Item.Item.Issues.Item.Assignees.AssigneesRequestBuilder Assignees + { + get => new global::Ayllu.Github.Client.Repos.Item.Item.Issues.Item.Assignees.AssigneesRequestBuilder(PathParameters, RequestAdapter); + } + /// The comments property + public global::Ayllu.Github.Client.Repos.Item.Item.Issues.Item.Comments.CommentsRequestBuilder Comments + { + get => new global::Ayllu.Github.Client.Repos.Item.Item.Issues.Item.Comments.CommentsRequestBuilder(PathParameters, RequestAdapter); + } + /// The dependencies property + public global::Ayllu.Github.Client.Repos.Item.Item.Issues.Item.Dependencies.DependenciesRequestBuilder Dependencies + { + get => new global::Ayllu.Github.Client.Repos.Item.Item.Issues.Item.Dependencies.DependenciesRequestBuilder(PathParameters, RequestAdapter); + } + /// The events property + public global::Ayllu.Github.Client.Repos.Item.Item.Issues.Item.Events.EventsRequestBuilder Events + { + get => new global::Ayllu.Github.Client.Repos.Item.Item.Issues.Item.Events.EventsRequestBuilder(PathParameters, RequestAdapter); + } + /// The labels property + public global::Ayllu.Github.Client.Repos.Item.Item.Issues.Item.Labels.LabelsRequestBuilder Labels + { + get => new global::Ayllu.Github.Client.Repos.Item.Item.Issues.Item.Labels.LabelsRequestBuilder(PathParameters, RequestAdapter); + } + /// The lock property + public global::Ayllu.Github.Client.Repos.Item.Item.Issues.Item.Lock.LockRequestBuilder Lock + { + get => new global::Ayllu.Github.Client.Repos.Item.Item.Issues.Item.Lock.LockRequestBuilder(PathParameters, RequestAdapter); + } + /// The reactions property + public global::Ayllu.Github.Client.Repos.Item.Item.Issues.Item.Reactions.ReactionsRequestBuilder Reactions + { + get => new global::Ayllu.Github.Client.Repos.Item.Item.Issues.Item.Reactions.ReactionsRequestBuilder(PathParameters, RequestAdapter); + } + /// The sub_issue property + public global::Ayllu.Github.Client.Repos.Item.Item.Issues.Item.Sub_issue.Sub_issueRequestBuilder Sub_issue + { + get => new global::Ayllu.Github.Client.Repos.Item.Item.Issues.Item.Sub_issue.Sub_issueRequestBuilder(PathParameters, RequestAdapter); + } + /// The sub_issues property + public global::Ayllu.Github.Client.Repos.Item.Item.Issues.Item.Sub_issues.Sub_issuesRequestBuilder Sub_issues + { + get => new global::Ayllu.Github.Client.Repos.Item.Item.Issues.Item.Sub_issues.Sub_issuesRequestBuilder(PathParameters, RequestAdapter); + } + /// The timeline property + public global::Ayllu.Github.Client.Repos.Item.Item.Issues.Item.Timeline.TimelineRequestBuilder Timeline + { + get => new global::Ayllu.Github.Client.Repos.Item.Item.Issues.Item.Timeline.TimelineRequestBuilder(PathParameters, RequestAdapter); + } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public WithIssue_numberItemRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/issues/{issue_number}", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public WithIssue_numberItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/issues/{issue_number}", rawUrl) + { + } + /// + /// The API returns a [`301 Moved Permanently` status](https://docs.github.com/rest/guides/best-practices-for-using-the-rest-api#follow-redirects) if the issue was[transferred](https://docs.github.com/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/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 this reason, "Issues" endpoints may return both issues and pull requests in the response. You can identify pull requests by the `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 pull request id, use the "[List pull requests](https://docs.github.com/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/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`. + /// API method documentation + /// + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 404 status code + /// When receiving a 410 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "404", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "410", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Models.Issue.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// Issue owners and users with push access or Triage role can edit an issue.This endpoint supports the following custom media types. For more information, see "[Media types](https://docs.github.com/rest/using-the-rest-api/getting-started-with-the-rest-api#media-types)."- **`application/vnd.github.raw+json`**: Returns the raw markdown body. Response will include `body`. This is the default if you do not pass any specific media type.- **`application/vnd.github.text+json`**: Returns a text only representation of the markdown body. Response will include `body_text`.- **`application/vnd.github.html+json`**: Returns HTML rendered from the body's markdown. Response will include `body_html`.- **`application/vnd.github.full+json`**: Returns raw, text, and HTML representations. Response will include `body`, `body_text`, and `body_html`. + /// API method documentation + /// + /// A + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 403 status code + /// When receiving a 404 status code + /// When receiving a 410 status code + /// When receiving a 422 status code + /// When receiving a 503 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PatchAsync(global::Ayllu.Github.Client.Repos.Item.Item.Issues.Item.WithIssue_numberPatchRequestBody body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task PatchAsync(global::Ayllu.Github.Client.Repos.Item.Item.Issues.Item.WithIssue_numberPatchRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPatchRequestInformation(body, requestConfiguration); + var errorMapping = new Dictionary> + { + { "403", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "404", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "410", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "422", global::Ayllu.Github.Client.Models.ValidationError.CreateFromDiscriminatorValue }, + { "503", global::Ayllu.Github.Client.Models.Issue503Error.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Models.Issue.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// The API returns a [`301 Moved Permanently` status](https://docs.github.com/rest/guides/best-practices-for-using-the-rest-api#follow-redirects) if the issue was[transferred](https://docs.github.com/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/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 this reason, "Issues" endpoints may return both issues and pull requests in the response. You can identify pull requests by the `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 pull request id, use the "[List pull requests](https://docs.github.com/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/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`. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Issue owners and users with push access or Triage role can edit an issue.This endpoint supports the following custom media types. For more information, see "[Media types](https://docs.github.com/rest/using-the-rest-api/getting-started-with-the-rest-api#media-types)."- **`application/vnd.github.raw+json`**: Returns the raw markdown body. Response will include `body`. This is the default if you do not pass any specific media type.- **`application/vnd.github.text+json`**: Returns a text only representation of the markdown body. Response will include `body_text`.- **`application/vnd.github.html+json`**: Returns HTML rendered from the body's markdown. Response will include `body_html`.- **`application/vnd.github.full+json`**: Returns raw, text, and HTML representations. Response will include `body`, `body_text`, and `body_html`. + /// + /// A + /// The request body + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPatchRequestInformation(global::Ayllu.Github.Client.Repos.Item.Item.Issues.Item.WithIssue_numberPatchRequestBody body, Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToPatchRequestInformation(global::Ayllu.Github.Client.Repos.Item.Item.Issues.Item.WithIssue_numberPatchRequestBody body, Action> requestConfiguration = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.Repos.Item.Item.Issues.Item.WithIssue_numberItemRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Repos.Item.Item.Issues.Item.WithIssue_numberItemRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithIssue_numberItemRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithIssue_numberItemRequestBuilderPatchRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Issues/Item/WithIssue_numberPatchRequestBody.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Issues/Item/WithIssue_numberPatchRequestBody.cs new file mode 100644 index 0000000..0b6b0eb --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Issues/Item/WithIssue_numberPatchRequestBody.cs @@ -0,0 +1,255 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.Issues.Item +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class WithIssue_numberPatchRequestBody : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// Username to assign to this issue. **This field is closing down.** +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Assignee { get; set; } +#nullable restore +#else + public string Assignee { get; set; } +#endif + /// 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. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? Assignees { get; set; } +#nullable restore +#else + public List Assignees { get; set; } +#endif + /// The contents of the issue. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Body { get; set; } +#nullable restore +#else + public string Body { get; set; } +#endif + /// 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. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? Labels { get; set; } +#nullable restore +#else + public List Labels { get; set; } +#endif + /// The milestone property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Repos.Item.Item.Issues.Item.WithIssue_numberPatchRequestBody.WithIssue_numberPatchRequestBody_milestone? Milestone { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Repos.Item.Item.Issues.Item.WithIssue_numberPatchRequestBody.WithIssue_numberPatchRequestBody_milestone Milestone { get; set; } +#endif + /// The open or closed state of the issue. + public global::Ayllu.Github.Client.Repos.Item.Item.Issues.Item.WithIssue_numberPatchRequestBody_state? State { get; set; } + /// The reason for the state change. Ignored unless `state` is changed. + public global::Ayllu.Github.Client.Repos.Item.Item.Issues.Item.WithIssue_numberPatchRequestBody_state_reason? StateReason { get; set; } + /// The title of the issue. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Repos.Item.Item.Issues.Item.WithIssue_numberPatchRequestBody.WithIssue_numberPatchRequestBody_title? Title { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Repos.Item.Item.Issues.Item.WithIssue_numberPatchRequestBody.WithIssue_numberPatchRequestBody_title Title { get; set; } +#endif + /// The name of the issue type to associate with this issue or use `null` to remove the current issue type. Only users with push access can set the type for issues. Without push access to the repository, type changes are silently dropped. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Type { get; set; } +#nullable restore +#else + public string Type { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public WithIssue_numberPatchRequestBody() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Repos.Item.Item.Issues.Item.WithIssue_numberPatchRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Repos.Item.Item.Issues.Item.WithIssue_numberPatchRequestBody(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "assignee", n => { Assignee = n.GetStringValue(); } }, + { "assignees", n => { Assignees = n.GetCollectionOfPrimitiveValues()?.AsList(); } }, + { "body", n => { Body = n.GetStringValue(); } }, + { "labels", n => { Labels = n.GetCollectionOfPrimitiveValues()?.AsList(); } }, + { "milestone", n => { Milestone = n.GetObjectValue(global::Ayllu.Github.Client.Repos.Item.Item.Issues.Item.WithIssue_numberPatchRequestBody.WithIssue_numberPatchRequestBody_milestone.CreateFromDiscriminatorValue); } }, + { "state", n => { State = n.GetEnumValue(); } }, + { "state_reason", n => { StateReason = n.GetEnumValue(); } }, + { "title", n => { Title = n.GetObjectValue(global::Ayllu.Github.Client.Repos.Item.Item.Issues.Item.WithIssue_numberPatchRequestBody.WithIssue_numberPatchRequestBody_title.CreateFromDiscriminatorValue); } }, + { "type", n => { Type = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("assignee", Assignee); + writer.WriteCollectionOfPrimitiveValues("assignees", Assignees); + writer.WriteStringValue("body", Body); + writer.WriteCollectionOfPrimitiveValues("labels", Labels); + writer.WriteObjectValue("milestone", Milestone); + writer.WriteEnumValue("state", State); + writer.WriteEnumValue("state_reason", StateReason); + writer.WriteObjectValue("title", Title); + writer.WriteStringValue("type", Type); + writer.WriteAdditionalData(AdditionalData); + } + /// + /// Composed type wrapper for classes , + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithIssue_numberPatchRequestBody_milestone : IComposedTypeWrapper, IParsable + { + /// Composed type representation for type + public int? Integer { get; set; } + /// Composed type representation for type +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? String { get; set; } +#nullable restore +#else + public string String { get; set; } +#endif + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Repos.Item.Item.Issues.Item.WithIssue_numberPatchRequestBody.WithIssue_numberPatchRequestBody_milestone CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + var mappingValue = parseNode.GetChildNode("")?.GetStringValue(); + var result = new global::Ayllu.Github.Client.Repos.Item.Item.Issues.Item.WithIssue_numberPatchRequestBody.WithIssue_numberPatchRequestBody_milestone(); + if(parseNode.GetIntValue() is int integerValue) + { + result.Integer = integerValue; + } + else if(parseNode.GetStringValue() is string stringValue) + { + result.String = stringValue; + } + return result; + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary>(); + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(Integer != null) + { + writer.WriteIntValue(null, Integer); + } + else if(String != null) + { + writer.WriteStringValue(null, String); + } + } + } + /// + /// Composed type wrapper for classes , + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithIssue_numberPatchRequestBody_title : IComposedTypeWrapper, IParsable + { + /// Composed type representation for type + public int? Integer { get; set; } + /// Composed type representation for type +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? String { get; set; } +#nullable restore +#else + public string String { get; set; } +#endif + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Repos.Item.Item.Issues.Item.WithIssue_numberPatchRequestBody.WithIssue_numberPatchRequestBody_title CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + var mappingValue = parseNode.GetChildNode("")?.GetStringValue(); + var result = new global::Ayllu.Github.Client.Repos.Item.Item.Issues.Item.WithIssue_numberPatchRequestBody.WithIssue_numberPatchRequestBody_title(); + if(parseNode.GetIntValue() is int integerValue) + { + result.Integer = integerValue; + } + else if(parseNode.GetStringValue() is string stringValue) + { + result.String = stringValue; + } + return result; + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary>(); + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(Integer != null) + { + writer.WriteIntValue(null, Integer); + } + else if(String != null) + { + writer.WriteStringValue(null, String); + } + } + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Issues/Item/WithIssue_numberPatchRequestBody_state.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Issues/Item/WithIssue_numberPatchRequestBody_state.cs new file mode 100644 index 0000000..3a19f47 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Issues/Item/WithIssue_numberPatchRequestBody_state.cs @@ -0,0 +1,19 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.Issues.Item +{ + /// The open or closed state of the issue. + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public enum WithIssue_numberPatchRequestBody_state + { + [EnumMember(Value = "open")] + #pragma warning disable CS1591 + Open, + #pragma warning restore CS1591 + [EnumMember(Value = "closed")] + #pragma warning disable CS1591 + Closed, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Issues/Item/WithIssue_numberPatchRequestBody_state_reason.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Issues/Item/WithIssue_numberPatchRequestBody_state_reason.cs new file mode 100644 index 0000000..15f3602 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Issues/Item/WithIssue_numberPatchRequestBody_state_reason.cs @@ -0,0 +1,27 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.Issues.Item +{ + /// The reason for the state change. Ignored unless `state` is changed. + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public enum WithIssue_numberPatchRequestBody_state_reason + { + [EnumMember(Value = "completed")] + #pragma warning disable CS1591 + Completed, + #pragma warning restore CS1591 + [EnumMember(Value = "not_planned")] + #pragma warning disable CS1591 + Not_planned, + #pragma warning restore CS1591 + [EnumMember(Value = "duplicate")] + #pragma warning disable CS1591 + Duplicate, + #pragma warning restore CS1591 + [EnumMember(Value = "reopened")] + #pragma warning disable CS1591 + Reopened, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Keys/Item/WithKey_ItemRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Keys/Item/WithKey_ItemRequestBuilder.cs new file mode 100644 index 0000000..8d1e116 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Keys/Item/WithKey_ItemRequestBuilder.cs @@ -0,0 +1,139 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.Keys.Item +{ + /// + /// Builds and executes requests for operations under \repos\{owner-id}\{repo-id}\keys\{key_id} + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithKey_ItemRequestBuilder : BaseRequestBuilder + { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public WithKey_ItemRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/keys/{key_id}", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public WithKey_ItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/keys/{key_id}", rawUrl) + { + } + /// + /// Deploy keys are immutable. If you need to update a key, remove the key and create a new one instead. + /// API method documentation + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task DeleteAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task DeleteAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToDeleteRequestInformation(requestConfiguration); + await RequestAdapter.SendNoContentAsync(requestInfo, default, cancellationToken).ConfigureAwait(false); + } + /// + /// Get a deploy key + /// API method documentation + /// + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 404 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "404", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Models.DeployKey.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// Deploy keys are immutable. If you need to update a key, remove the key and create a new one instead. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToDeleteRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToDeleteRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.DELETE, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + return requestInfo; + } + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.Repos.Item.Item.Keys.Item.WithKey_ItemRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Repos.Item.Item.Keys.Item.WithKey_ItemRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithKey_ItemRequestBuilderDeleteRequestConfiguration : RequestConfiguration + { + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithKey_ItemRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Keys/KeysPostRequestBody.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Keys/KeysPostRequestBody.cs new file mode 100644 index 0000000..af0609c --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Keys/KeysPostRequestBody.cs @@ -0,0 +1,79 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.Keys +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class KeysPostRequestBody : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The contents of the key. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Key { get; set; } +#nullable restore +#else + public string Key { get; set; } +#endif + /// 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/articles/repository-permission-levels-for-an-organization/)" and "[Permission levels for a user account repository](https://docs.github.com/articles/permission-levels-for-a-user-account-repository/)." + public bool? ReadOnly { get; set; } + /// A name for the key. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Title { get; set; } +#nullable restore +#else + public string Title { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public KeysPostRequestBody() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Repos.Item.Item.Keys.KeysPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Repos.Item.Item.Keys.KeysPostRequestBody(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "key", n => { Key = n.GetStringValue(); } }, + { "read_only", n => { ReadOnly = n.GetBoolValue(); } }, + { "title", n => { Title = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("key", Key); + writer.WriteBoolValue("read_only", ReadOnly); + writer.WriteStringValue("title", Title); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Keys/KeysRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Keys/KeysRequestBuilder.cs new file mode 100644 index 0000000..e79e3f2 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Keys/KeysRequestBuilder.cs @@ -0,0 +1,186 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Ayllu.Github.Client.Repos.Item.Item.Keys.Item; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.Keys +{ + /// + /// Builds and executes requests for operations under \repos\{owner-id}\{repo-id}\keys + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class KeysRequestBuilder : BaseRequestBuilder + { + /// Gets an item from the Ayllu.Github.Client.repos.item.item.keys.item collection + /// The unique identifier of the key. + /// A + public global::Ayllu.Github.Client.Repos.Item.Item.Keys.Item.WithKey_ItemRequestBuilder this[int position] + { + get + { + var urlTplParams = new Dictionary(PathParameters); + urlTplParams.Add("key_id", position); + return new global::Ayllu.Github.Client.Repos.Item.Item.Keys.Item.WithKey_ItemRequestBuilder(urlTplParams, RequestAdapter); + } + } + /// Gets an item from the Ayllu.Github.Client.repos.item.item.keys.item collection + /// The unique identifier of the key. + /// A + [Obsolete("This indexer is deprecated and will be removed in the next major version. Use the one with the typed parameter instead.")] + public global::Ayllu.Github.Client.Repos.Item.Item.Keys.Item.WithKey_ItemRequestBuilder this[string position] + { + get + { + var urlTplParams = new Dictionary(PathParameters); + if (!string.IsNullOrWhiteSpace(position)) urlTplParams.Add("key_id", position); + return new global::Ayllu.Github.Client.Repos.Item.Item.Keys.Item.WithKey_ItemRequestBuilder(urlTplParams, RequestAdapter); + } + } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public KeysRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/keys{?page*,per_page*}", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public KeysRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/keys{?page*,per_page*}", rawUrl) + { + } + /// + /// List deploy keys + /// API method documentation + /// + /// A List<global::Ayllu.Github.Client.Models.DeployKey> + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task?> GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task> GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var collectionResult = await RequestAdapter.SendCollectionAsync(requestInfo, global::Ayllu.Github.Client.Models.DeployKey.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false); + return collectionResult?.AsList(); + } + /// + /// You can create a read-only deploy key. + /// API method documentation + /// + /// A + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 422 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PostAsync(global::Ayllu.Github.Client.Repos.Item.Item.Keys.KeysPostRequestBody body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task PostAsync(global::Ayllu.Github.Client.Repos.Item.Item.Keys.KeysPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPostRequestInformation(body, requestConfiguration); + var errorMapping = new Dictionary> + { + { "422", global::Ayllu.Github.Client.Models.ValidationError.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Models.DeployKey.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// You can create a read-only deploy key. + /// + /// A + /// The request body + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPostRequestInformation(global::Ayllu.Github.Client.Repos.Item.Item.Keys.KeysPostRequestBody body, Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToPostRequestInformation(global::Ayllu.Github.Client.Repos.Item.Item.Keys.KeysPostRequestBody body, Action> requestConfiguration = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.Repos.Item.Item.Keys.KeysRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Repos.Item.Item.Keys.KeysRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// List deploy keys + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class KeysRequestBuilderGetQueryParameters + { + /// The page number of the results to fetch. For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." + [QueryParameter("page")] + public int? Page { get; set; } + /// The number of results per page (max 100). For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." + [QueryParameter("per_page")] + public int? PerPage { get; set; } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class KeysRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class KeysRequestBuilderPostRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Labels/Item/WithNameItemRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Labels/Item/WithNameItemRequestBuilder.cs new file mode 100644 index 0000000..b024a8c --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Labels/Item/WithNameItemRequestBuilder.cs @@ -0,0 +1,193 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.Labels.Item +{ + /// + /// Builds and executes requests for operations under \repos\{owner-id}\{repo-id}\labels\{name} + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithNameItemRequestBuilder : BaseRequestBuilder + { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public WithNameItemRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/labels/{name}", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public WithNameItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/labels/{name}", rawUrl) + { + } + /// + /// Deletes a label using the given label name. + /// API method documentation + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task DeleteAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task DeleteAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToDeleteRequestInformation(requestConfiguration); + await RequestAdapter.SendNoContentAsync(requestInfo, default, cancellationToken).ConfigureAwait(false); + } + /// + /// Gets a label using the given name. + /// API method documentation + /// + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 404 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "404", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Models.Label.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// Updates a label using the given label name. + /// API method documentation + /// + /// A + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PatchAsync(global::Ayllu.Github.Client.Repos.Item.Item.Labels.Item.WithNamePatchRequestBody body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task PatchAsync(global::Ayllu.Github.Client.Repos.Item.Item.Labels.Item.WithNamePatchRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPatchRequestInformation(body, requestConfiguration); + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Models.Label.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false); + } + /// + /// Deletes a label using the given label name. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToDeleteRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToDeleteRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.DELETE, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + return requestInfo; + } + /// + /// Gets a label using the given name. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Updates a label using the given label name. + /// + /// A + /// The request body + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPatchRequestInformation(global::Ayllu.Github.Client.Repos.Item.Item.Labels.Item.WithNamePatchRequestBody body, Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToPatchRequestInformation(global::Ayllu.Github.Client.Repos.Item.Item.Labels.Item.WithNamePatchRequestBody body, Action> requestConfiguration = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.Repos.Item.Item.Labels.Item.WithNameItemRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Repos.Item.Item.Labels.Item.WithNameItemRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithNameItemRequestBuilderDeleteRequestConfiguration : RequestConfiguration + { + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithNameItemRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithNameItemRequestBuilderPatchRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Labels/Item/WithNamePatchRequestBody.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Labels/Item/WithNamePatchRequestBody.cs new file mode 100644 index 0000000..50acf1c --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Labels/Item/WithNamePatchRequestBody.cs @@ -0,0 +1,85 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.Labels.Item +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class WithNamePatchRequestBody : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The [hexadecimal color code](http://www.color-hex.com/) for the label, without the leading `#`. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Color { get; set; } +#nullable restore +#else + public string Color { get; set; } +#endif + /// A short description of the label. Must be 100 characters or fewer. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Description { get; set; } +#nullable restore +#else + public string Description { get; set; } +#endif + /// 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)." +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? NewName { get; set; } +#nullable restore +#else + public string NewName { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public WithNamePatchRequestBody() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Repos.Item.Item.Labels.Item.WithNamePatchRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Repos.Item.Item.Labels.Item.WithNamePatchRequestBody(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "color", n => { Color = n.GetStringValue(); } }, + { "description", n => { Description = n.GetStringValue(); } }, + { "new_name", n => { NewName = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("color", Color); + writer.WriteStringValue("description", Description); + writer.WriteStringValue("new_name", NewName); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Labels/LabelsPostRequestBody.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Labels/LabelsPostRequestBody.cs new file mode 100644 index 0000000..4bdf1bd --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Labels/LabelsPostRequestBody.cs @@ -0,0 +1,85 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.Labels +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class LabelsPostRequestBody : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The [hexadecimal color code](http://www.color-hex.com/) for the label, without the leading `#`. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Color { get; set; } +#nullable restore +#else + public string Color { get; set; } +#endif + /// A short description of the label. Must be 100 characters or fewer. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Description { get; set; } +#nullable restore +#else + public string Description { get; set; } +#endif + /// 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)." +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Name { get; set; } +#nullable restore +#else + public string Name { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public LabelsPostRequestBody() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Repos.Item.Item.Labels.LabelsPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Repos.Item.Item.Labels.LabelsPostRequestBody(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "color", n => { Color = n.GetStringValue(); } }, + { "description", n => { Description = n.GetStringValue(); } }, + { "name", n => { Name = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("color", Color); + writer.WriteStringValue("description", Description); + writer.WriteStringValue("name", Name); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Labels/LabelsRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Labels/LabelsRequestBuilder.cs new file mode 100644 index 0000000..ffb159f --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Labels/LabelsRequestBuilder.cs @@ -0,0 +1,183 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Ayllu.Github.Client.Repos.Item.Item.Labels.Item; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.Labels +{ + /// + /// Builds and executes requests for operations under \repos\{owner-id}\{repo-id}\labels + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class LabelsRequestBuilder : BaseRequestBuilder + { + /// Gets an item from the Ayllu.Github.Client.repos.item.item.labels.item collection + /// Unique identifier of the item + /// A + public global::Ayllu.Github.Client.Repos.Item.Item.Labels.Item.WithNameItemRequestBuilder this[string position] + { + get + { + var urlTplParams = new Dictionary(PathParameters); + urlTplParams.Add("name", position); + return new global::Ayllu.Github.Client.Repos.Item.Item.Labels.Item.WithNameItemRequestBuilder(urlTplParams, RequestAdapter); + } + } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public LabelsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/labels{?page*,per_page*}", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public LabelsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/labels{?page*,per_page*}", rawUrl) + { + } + /// + /// Lists all labels for a repository. + /// API method documentation + /// + /// A List<global::Ayllu.Github.Client.Models.Label> + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 404 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task?> GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task> GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "404", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + }; + var collectionResult = await RequestAdapter.SendCollectionAsync(requestInfo, global::Ayllu.Github.Client.Models.Label.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + return collectionResult?.AsList(); + } + /// + /// 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/). + /// API method documentation + /// + /// A + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 404 status code + /// When receiving a 422 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PostAsync(global::Ayllu.Github.Client.Repos.Item.Item.Labels.LabelsPostRequestBody body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task PostAsync(global::Ayllu.Github.Client.Repos.Item.Item.Labels.LabelsPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPostRequestInformation(body, requestConfiguration); + var errorMapping = new Dictionary> + { + { "404", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "422", global::Ayllu.Github.Client.Models.ValidationError.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Models.Label.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// Lists all labels for a repository. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// 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/). + /// + /// A + /// The request body + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPostRequestInformation(global::Ayllu.Github.Client.Repos.Item.Item.Labels.LabelsPostRequestBody body, Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToPostRequestInformation(global::Ayllu.Github.Client.Repos.Item.Item.Labels.LabelsPostRequestBody body, Action> requestConfiguration = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.Repos.Item.Item.Labels.LabelsRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Repos.Item.Item.Labels.LabelsRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Lists all labels for a repository. + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class LabelsRequestBuilderGetQueryParameters + { + /// The page number of the results to fetch. For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." + [QueryParameter("page")] + public int? Page { get; set; } + /// The number of results per page (max 100). For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." + [QueryParameter("per_page")] + public int? PerPage { get; set; } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class LabelsRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class LabelsRequestBuilderPostRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Languages/LanguagesRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Languages/LanguagesRequestBuilder.cs new file mode 100644 index 0000000..a9ff829 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Languages/LanguagesRequestBuilder.cs @@ -0,0 +1,93 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.Languages +{ + /// + /// Builds and executes requests for operations under \repos\{owner-id}\{repo-id}\languages + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class LanguagesRequestBuilder : BaseRequestBuilder + { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public LanguagesRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/languages", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public LanguagesRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/languages", rawUrl) + { + } + /// + /// Lists languages for the specified repository. The value shown for each language is the number of bytes of code written in that language. + /// API method documentation + /// + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Models.Language.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false); + } + /// + /// Lists languages for the specified repository. The value shown for each language is the number of bytes of code written in that language. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.Repos.Item.Item.Languages.LanguagesRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Repos.Item.Item.Languages.LanguagesRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class LanguagesRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/License/LicenseRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/License/LicenseRequestBuilder.cs new file mode 100644 index 0000000..97f9463 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/License/LicenseRequestBuilder.cs @@ -0,0 +1,115 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.License +{ + /// + /// Builds and executes requests for operations under \repos\{owner-id}\{repo-id}\license + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class LicenseRequestBuilder : BaseRequestBuilder + { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public LicenseRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/license{?ref*}", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public LicenseRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/license{?ref*}", rawUrl) + { + } + /// + /// 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/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). + /// API method documentation + /// + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 404 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "404", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Models.LicenseContent.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// 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/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). + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.Repos.Item.Item.License.LicenseRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Repos.Item.Item.License.LicenseRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// 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/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). + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class LicenseRequestBuilderGetQueryParameters + { + /// The Git reference for the results you want to list. The `ref` for a branch can be formatted either as `refs/heads/<branch name>` or simply `<branch name>`. To reference a pull request use `refs/pull/<number>/merge`. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("ref")] + public string? Ref { get; set; } +#nullable restore +#else + [QueryParameter("ref")] + public string Ref { get; set; } +#endif + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class LicenseRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/MergeUpstream/MergeUpstreamPostRequestBody.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/MergeUpstream/MergeUpstreamPostRequestBody.cs new file mode 100644 index 0000000..4c13bb3 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/MergeUpstream/MergeUpstreamPostRequestBody.cs @@ -0,0 +1,65 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.MergeUpstream +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class MergeUpstreamPostRequestBody : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The name of the branch which should be updated to match upstream. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Branch { get; set; } +#nullable restore +#else + public string Branch { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public MergeUpstreamPostRequestBody() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Repos.Item.Item.MergeUpstream.MergeUpstreamPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Repos.Item.Item.MergeUpstream.MergeUpstreamPostRequestBody(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "branch", n => { Branch = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("branch", Branch); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/MergeUpstream/MergeUpstreamRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/MergeUpstream/MergeUpstreamRequestBuilder.cs new file mode 100644 index 0000000..8fe8760 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/MergeUpstream/MergeUpstreamRequestBuilder.cs @@ -0,0 +1,98 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.MergeUpstream +{ + /// + /// Builds and executes requests for operations under \repos\{owner-id}\{repo-id}\merge-upstream + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class MergeUpstreamRequestBuilder : BaseRequestBuilder + { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public MergeUpstreamRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/merge-upstream", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public MergeUpstreamRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/merge-upstream", rawUrl) + { + } + /// + /// Sync a branch of a forked repository to keep it up-to-date with the upstream repository. + /// API method documentation + /// + /// A + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PostAsync(global::Ayllu.Github.Client.Repos.Item.Item.MergeUpstream.MergeUpstreamPostRequestBody body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task PostAsync(global::Ayllu.Github.Client.Repos.Item.Item.MergeUpstream.MergeUpstreamPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPostRequestInformation(body, requestConfiguration); + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Models.MergedUpstream.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false); + } + /// + /// Sync a branch of a forked repository to keep it up-to-date with the upstream repository. + /// + /// A + /// The request body + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPostRequestInformation(global::Ayllu.Github.Client.Repos.Item.Item.MergeUpstream.MergeUpstreamPostRequestBody body, Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToPostRequestInformation(global::Ayllu.Github.Client.Repos.Item.Item.MergeUpstream.MergeUpstreamPostRequestBody body, Action> requestConfiguration = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.Repos.Item.Item.MergeUpstream.MergeUpstreamRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Repos.Item.Item.MergeUpstream.MergeUpstreamRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class MergeUpstreamRequestBuilderPostRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Merges/MergesPostRequestBody.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Merges/MergesPostRequestBody.cs new file mode 100644 index 0000000..66fa970 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Merges/MergesPostRequestBody.cs @@ -0,0 +1,85 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.Merges +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class MergesPostRequestBody : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The name of the base branch that the head will be merged into. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Base { get; set; } +#nullable restore +#else + public string Base { get; set; } +#endif + /// Commit message to use for the merge commit. If omitted, a default message will be used. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? CommitMessage { get; set; } +#nullable restore +#else + public string CommitMessage { get; set; } +#endif + /// The head to merge. This can be a branch name or a commit SHA1. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Head { get; set; } +#nullable restore +#else + public string Head { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public MergesPostRequestBody() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Repos.Item.Item.Merges.MergesPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Repos.Item.Item.Merges.MergesPostRequestBody(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "base", n => { Base = n.GetStringValue(); } }, + { "commit_message", n => { CommitMessage = n.GetStringValue(); } }, + { "head", n => { Head = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("base", Base); + writer.WriteStringValue("commit_message", CommitMessage); + writer.WriteStringValue("head", Head); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Merges/MergesRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Merges/MergesRequestBuilder.cs new file mode 100644 index 0000000..64a55e2 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Merges/MergesRequestBuilder.cs @@ -0,0 +1,102 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.Merges +{ + /// + /// Builds and executes requests for operations under \repos\{owner-id}\{repo-id}\merges + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class MergesRequestBuilder : BaseRequestBuilder + { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public MergesRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/merges", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public MergesRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/merges", rawUrl) + { + } + /// + /// Merge a branch + /// API method documentation + /// + /// A + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 403 status code + /// When receiving a 422 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PostAsync(global::Ayllu.Github.Client.Repos.Item.Item.Merges.MergesPostRequestBody body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task PostAsync(global::Ayllu.Github.Client.Repos.Item.Item.Merges.MergesPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPostRequestInformation(body, requestConfiguration); + var errorMapping = new Dictionary> + { + { "403", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "422", global::Ayllu.Github.Client.Models.ValidationError.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Models.Commit.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// A + /// The request body + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPostRequestInformation(global::Ayllu.Github.Client.Repos.Item.Item.Merges.MergesPostRequestBody body, Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToPostRequestInformation(global::Ayllu.Github.Client.Repos.Item.Item.Merges.MergesPostRequestBody body, Action> requestConfiguration = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.Repos.Item.Item.Merges.MergesRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Repos.Item.Item.Merges.MergesRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class MergesRequestBuilderPostRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Milestones/GetDirectionQueryParameterType.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Milestones/GetDirectionQueryParameterType.cs new file mode 100644 index 0000000..77b9e3e --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Milestones/GetDirectionQueryParameterType.cs @@ -0,0 +1,20 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.Milestones +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public enum GetDirectionQueryParameterType + #pragma warning restore CS1591 + { + [EnumMember(Value = "asc")] + #pragma warning disable CS1591 + Asc, + #pragma warning restore CS1591 + [EnumMember(Value = "desc")] + #pragma warning disable CS1591 + Desc, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Milestones/GetSortQueryParameterType.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Milestones/GetSortQueryParameterType.cs new file mode 100644 index 0000000..d9214ef --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Milestones/GetSortQueryParameterType.cs @@ -0,0 +1,20 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.Milestones +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public enum GetSortQueryParameterType + #pragma warning restore CS1591 + { + [EnumMember(Value = "due_on")] + #pragma warning disable CS1591 + Due_on, + #pragma warning restore CS1591 + [EnumMember(Value = "completeness")] + #pragma warning disable CS1591 + Completeness, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Milestones/GetStateQueryParameterType.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Milestones/GetStateQueryParameterType.cs new file mode 100644 index 0000000..040d365 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Milestones/GetStateQueryParameterType.cs @@ -0,0 +1,24 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.Milestones +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public enum GetStateQueryParameterType + #pragma warning restore CS1591 + { + [EnumMember(Value = "open")] + #pragma warning disable CS1591 + Open, + #pragma warning restore CS1591 + [EnumMember(Value = "closed")] + #pragma warning disable CS1591 + Closed, + #pragma warning restore CS1591 + [EnumMember(Value = "all")] + #pragma warning disable CS1591 + All, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Milestones/Item/Labels/LabelsRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Milestones/Item/Labels/LabelsRequestBuilder.cs new file mode 100644 index 0000000..e86d0ef --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Milestones/Item/Labels/LabelsRequestBuilder.cs @@ -0,0 +1,107 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.Milestones.Item.Labels +{ + /// + /// Builds and executes requests for operations under \repos\{owner-id}\{repo-id}\milestones\{milestone_number}\labels + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class LabelsRequestBuilder : BaseRequestBuilder + { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public LabelsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/milestones/{milestone_number}/labels{?page*,per_page*}", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public LabelsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/milestones/{milestone_number}/labels{?page*,per_page*}", rawUrl) + { + } + /// + /// Lists labels for issues in a milestone. + /// API method documentation + /// + /// A List<global::Ayllu.Github.Client.Models.Label> + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task?> GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task> GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var collectionResult = await RequestAdapter.SendCollectionAsync(requestInfo, global::Ayllu.Github.Client.Models.Label.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false); + return collectionResult?.AsList(); + } + /// + /// Lists labels for issues in a milestone. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.Repos.Item.Item.Milestones.Item.Labels.LabelsRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Repos.Item.Item.Milestones.Item.Labels.LabelsRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Lists labels for issues in a milestone. + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class LabelsRequestBuilderGetQueryParameters + { + /// The page number of the results to fetch. For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." + [QueryParameter("page")] + public int? Page { get; set; } + /// The number of results per page (max 100). For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." + [QueryParameter("per_page")] + public int? PerPage { get; set; } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class LabelsRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Milestones/Item/WithMilestone_numberItemRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Milestones/Item/WithMilestone_numberItemRequestBuilder.cs new file mode 100644 index 0000000..48e493b --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Milestones/Item/WithMilestone_numberItemRequestBuilder.cs @@ -0,0 +1,202 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Ayllu.Github.Client.Repos.Item.Item.Milestones.Item.Labels; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.Milestones.Item +{ + /// + /// Builds and executes requests for operations under \repos\{owner-id}\{repo-id}\milestones\{milestone_number} + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithMilestone_numberItemRequestBuilder : BaseRequestBuilder + { + /// The labels property + public global::Ayllu.Github.Client.Repos.Item.Item.Milestones.Item.Labels.LabelsRequestBuilder Labels + { + get => new global::Ayllu.Github.Client.Repos.Item.Item.Milestones.Item.Labels.LabelsRequestBuilder(PathParameters, RequestAdapter); + } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public WithMilestone_numberItemRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/milestones/{milestone_number}", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public WithMilestone_numberItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/milestones/{milestone_number}", rawUrl) + { + } + /// + /// Deletes a milestone using the given milestone number. + /// API method documentation + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 404 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task DeleteAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task DeleteAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToDeleteRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "404", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + }; + await RequestAdapter.SendNoContentAsync(requestInfo, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// Gets a milestone using the given milestone number. + /// API method documentation + /// + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 404 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "404", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Models.Milestone.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// Update a milestone + /// API method documentation + /// + /// A + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PatchAsync(global::Ayllu.Github.Client.Repos.Item.Item.Milestones.Item.WithMilestone_numberPatchRequestBody body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task PatchAsync(global::Ayllu.Github.Client.Repos.Item.Item.Milestones.Item.WithMilestone_numberPatchRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPatchRequestInformation(body, requestConfiguration); + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Models.Milestone.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false); + } + /// + /// Deletes a milestone using the given milestone number. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToDeleteRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToDeleteRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.DELETE, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Gets a milestone using the given milestone number. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// A + /// The request body + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPatchRequestInformation(global::Ayllu.Github.Client.Repos.Item.Item.Milestones.Item.WithMilestone_numberPatchRequestBody body, Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToPatchRequestInformation(global::Ayllu.Github.Client.Repos.Item.Item.Milestones.Item.WithMilestone_numberPatchRequestBody body, Action> requestConfiguration = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.Repos.Item.Item.Milestones.Item.WithMilestone_numberItemRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Repos.Item.Item.Milestones.Item.WithMilestone_numberItemRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithMilestone_numberItemRequestBuilderDeleteRequestConfiguration : RequestConfiguration + { + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithMilestone_numberItemRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithMilestone_numberItemRequestBuilderPatchRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Milestones/Item/WithMilestone_numberPatchRequestBody.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Milestones/Item/WithMilestone_numberPatchRequestBody.cs new file mode 100644 index 0000000..c7196bd --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Milestones/Item/WithMilestone_numberPatchRequestBody.cs @@ -0,0 +1,84 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.Milestones.Item +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class WithMilestone_numberPatchRequestBody : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// A description of the milestone. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Description { get; set; } +#nullable restore +#else + public string Description { get; set; } +#endif + /// The milestone due date. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. + public DateTimeOffset? DueOn { get; set; } + /// The state of the milestone. Either `open` or `closed`. + public global::Ayllu.Github.Client.Repos.Item.Item.Milestones.Item.WithMilestone_numberPatchRequestBody_state? State { get; set; } + /// The title of the milestone. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Title { get; set; } +#nullable restore +#else + public string Title { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public WithMilestone_numberPatchRequestBody() + { + AdditionalData = new Dictionary(); + State = global::Ayllu.Github.Client.Repos.Item.Item.Milestones.Item.WithMilestone_numberPatchRequestBody_state.Open; + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Repos.Item.Item.Milestones.Item.WithMilestone_numberPatchRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Repos.Item.Item.Milestones.Item.WithMilestone_numberPatchRequestBody(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "description", n => { Description = n.GetStringValue(); } }, + { "due_on", n => { DueOn = n.GetDateTimeOffsetValue(); } }, + { "state", n => { State = n.GetEnumValue(); } }, + { "title", n => { Title = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("description", Description); + writer.WriteDateTimeOffsetValue("due_on", DueOn); + writer.WriteEnumValue("state", State); + writer.WriteStringValue("title", Title); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Milestones/Item/WithMilestone_numberPatchRequestBody_state.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Milestones/Item/WithMilestone_numberPatchRequestBody_state.cs new file mode 100644 index 0000000..6c1e7ea --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Milestones/Item/WithMilestone_numberPatchRequestBody_state.cs @@ -0,0 +1,19 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.Milestones.Item +{ + /// The state of the milestone. Either `open` or `closed`. + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public enum WithMilestone_numberPatchRequestBody_state + { + [EnumMember(Value = "open")] + #pragma warning disable CS1591 + Open, + #pragma warning restore CS1591 + [EnumMember(Value = "closed")] + #pragma warning disable CS1591 + Closed, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Milestones/MilestonesPostRequestBody.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Milestones/MilestonesPostRequestBody.cs new file mode 100644 index 0000000..2382ecc --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Milestones/MilestonesPostRequestBody.cs @@ -0,0 +1,84 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.Milestones +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class MilestonesPostRequestBody : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// A description of the milestone. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Description { get; set; } +#nullable restore +#else + public string Description { get; set; } +#endif + /// The milestone due date. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. + public DateTimeOffset? DueOn { get; set; } + /// The state of the milestone. Either `open` or `closed`. + public global::Ayllu.Github.Client.Repos.Item.Item.Milestones.MilestonesPostRequestBody_state? State { get; set; } + /// The title of the milestone. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Title { get; set; } +#nullable restore +#else + public string Title { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public MilestonesPostRequestBody() + { + AdditionalData = new Dictionary(); + State = global::Ayllu.Github.Client.Repos.Item.Item.Milestones.MilestonesPostRequestBody_state.Open; + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Repos.Item.Item.Milestones.MilestonesPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Repos.Item.Item.Milestones.MilestonesPostRequestBody(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "description", n => { Description = n.GetStringValue(); } }, + { "due_on", n => { DueOn = n.GetDateTimeOffsetValue(); } }, + { "state", n => { State = n.GetEnumValue(); } }, + { "title", n => { Title = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("description", Description); + writer.WriteDateTimeOffsetValue("due_on", DueOn); + writer.WriteEnumValue("state", State); + writer.WriteStringValue("title", Title); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Milestones/MilestonesPostRequestBody_state.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Milestones/MilestonesPostRequestBody_state.cs new file mode 100644 index 0000000..d4cb8e1 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Milestones/MilestonesPostRequestBody_state.cs @@ -0,0 +1,19 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.Milestones +{ + /// The state of the milestone. Either `open` or `closed`. + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public enum MilestonesPostRequestBody_state + { + [EnumMember(Value = "open")] + #pragma warning disable CS1591 + Open, + #pragma warning restore CS1591 + [EnumMember(Value = "closed")] + #pragma warning disable CS1591 + Closed, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Milestones/MilestonesRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Milestones/MilestonesRequestBuilder.cs new file mode 100644 index 0000000..9667090 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Milestones/MilestonesRequestBuilder.cs @@ -0,0 +1,238 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Ayllu.Github.Client.Repos.Item.Item.Milestones.Item; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.Milestones +{ + /// + /// Builds and executes requests for operations under \repos\{owner-id}\{repo-id}\milestones + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class MilestonesRequestBuilder : BaseRequestBuilder + { + /// Gets an item from the Ayllu.Github.Client.repos.item.item.milestones.item collection + /// The number that identifies the milestone. + /// A + public global::Ayllu.Github.Client.Repos.Item.Item.Milestones.Item.WithMilestone_numberItemRequestBuilder this[int position] + { + get + { + var urlTplParams = new Dictionary(PathParameters); + urlTplParams.Add("milestone_number", position); + return new global::Ayllu.Github.Client.Repos.Item.Item.Milestones.Item.WithMilestone_numberItemRequestBuilder(urlTplParams, RequestAdapter); + } + } + /// Gets an item from the Ayllu.Github.Client.repos.item.item.milestones.item collection + /// The number that identifies the milestone. + /// A + [Obsolete("This indexer is deprecated and will be removed in the next major version. Use the one with the typed parameter instead.")] + public global::Ayllu.Github.Client.Repos.Item.Item.Milestones.Item.WithMilestone_numberItemRequestBuilder this[string position] + { + get + { + var urlTplParams = new Dictionary(PathParameters); + if (!string.IsNullOrWhiteSpace(position)) urlTplParams.Add("milestone_number", position); + return new global::Ayllu.Github.Client.Repos.Item.Item.Milestones.Item.WithMilestone_numberItemRequestBuilder(urlTplParams, RequestAdapter); + } + } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public MilestonesRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/milestones{?direction*,page*,per_page*,sort*,state*}", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public MilestonesRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/milestones{?direction*,page*,per_page*,sort*,state*}", rawUrl) + { + } + /// + /// Lists milestones for a repository. + /// API method documentation + /// + /// A List<global::Ayllu.Github.Client.Models.Milestone> + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 404 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task?> GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task> GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "404", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + }; + var collectionResult = await RequestAdapter.SendCollectionAsync(requestInfo, global::Ayllu.Github.Client.Models.Milestone.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + return collectionResult?.AsList(); + } + /// + /// Creates a milestone. + /// API method documentation + /// + /// A + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 404 status code + /// When receiving a 422 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PostAsync(global::Ayllu.Github.Client.Repos.Item.Item.Milestones.MilestonesPostRequestBody body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task PostAsync(global::Ayllu.Github.Client.Repos.Item.Item.Milestones.MilestonesPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPostRequestInformation(body, requestConfiguration); + var errorMapping = new Dictionary> + { + { "404", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "422", global::Ayllu.Github.Client.Models.ValidationError.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Models.Milestone.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// Lists milestones for a repository. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Creates a milestone. + /// + /// A + /// The request body + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPostRequestInformation(global::Ayllu.Github.Client.Repos.Item.Item.Milestones.MilestonesPostRequestBody body, Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToPostRequestInformation(global::Ayllu.Github.Client.Repos.Item.Item.Milestones.MilestonesPostRequestBody body, Action> requestConfiguration = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.Repos.Item.Item.Milestones.MilestonesRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Repos.Item.Item.Milestones.MilestonesRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Lists milestones for a repository. + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class MilestonesRequestBuilderGetQueryParameters + { + /// The direction of the sort. Either `asc` or `desc`. + [Obsolete("This property is deprecated, use DirectionAsGetDirectionQueryParameterType instead")] +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("direction")] + public string? Direction { get; set; } +#nullable restore +#else + [QueryParameter("direction")] + public string Direction { get; set; } +#endif + /// The direction of the sort. Either `asc` or `desc`. + [QueryParameter("direction")] + public global::Ayllu.Github.Client.Repos.Item.Item.Milestones.GetDirectionQueryParameterType? DirectionAsGetDirectionQueryParameterType { get; set; } + /// The page number of the results to fetch. For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." + [QueryParameter("page")] + public int? Page { get; set; } + /// The number of results per page (max 100). For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." + [QueryParameter("per_page")] + public int? PerPage { get; set; } + /// What to sort results by. Either `due_on` or `completeness`. + [Obsolete("This property is deprecated, use SortAsGetSortQueryParameterType instead")] +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("sort")] + public string? Sort { get; set; } +#nullable restore +#else + [QueryParameter("sort")] + public string Sort { get; set; } +#endif + /// What to sort results by. Either `due_on` or `completeness`. + [QueryParameter("sort")] + public global::Ayllu.Github.Client.Repos.Item.Item.Milestones.GetSortQueryParameterType? SortAsGetSortQueryParameterType { get; set; } + /// The state of the milestone. Either `open`, `closed`, or `all`. + [Obsolete("This property is deprecated, use StateAsGetStateQueryParameterType instead")] +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("state")] + public string? State { get; set; } +#nullable restore +#else + [QueryParameter("state")] + public string State { get; set; } +#endif + /// The state of the milestone. Either `open`, `closed`, or `all`. + [QueryParameter("state")] + public global::Ayllu.Github.Client.Repos.Item.Item.Milestones.GetStateQueryParameterType? StateAsGetStateQueryParameterType { get; set; } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class MilestonesRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class MilestonesRequestBuilderPostRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Notifications/NotificationsPutRequestBody.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Notifications/NotificationsPutRequestBody.cs new file mode 100644 index 0000000..91bd6cc --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Notifications/NotificationsPutRequestBody.cs @@ -0,0 +1,59 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.Notifications +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class NotificationsPutRequestBody : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// 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. + public DateTimeOffset? LastReadAt { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public NotificationsPutRequestBody() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Repos.Item.Item.Notifications.NotificationsPutRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Repos.Item.Item.Notifications.NotificationsPutRequestBody(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "last_read_at", n => { LastReadAt = n.GetDateTimeOffsetValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteDateTimeOffsetValue("last_read_at", LastReadAt); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Notifications/NotificationsPutResponse.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Notifications/NotificationsPutResponse.cs new file mode 100644 index 0000000..8a7fb80 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Notifications/NotificationsPutResponse.cs @@ -0,0 +1,75 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.Notifications +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class NotificationsPutResponse : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The message property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Message { get; set; } +#nullable restore +#else + public string Message { get; set; } +#endif + /// The url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Url { get; set; } +#nullable restore +#else + public string Url { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public NotificationsPutResponse() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Repos.Item.Item.Notifications.NotificationsPutResponse CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Repos.Item.Item.Notifications.NotificationsPutResponse(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "message", n => { Message = n.GetStringValue(); } }, + { "url", n => { Url = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("message", Message); + writer.WriteStringValue("url", Url); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Notifications/NotificationsRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Notifications/NotificationsRequestBuilder.cs new file mode 100644 index 0000000..9f23840 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Notifications/NotificationsRequestBuilder.cs @@ -0,0 +1,192 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.Notifications +{ + /// + /// Builds and executes requests for operations under \repos\{owner-id}\{repo-id}\notifications + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class NotificationsRequestBuilder : BaseRequestBuilder + { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public NotificationsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/notifications{?all*,before*,page*,participating*,per_page*,since*}", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public NotificationsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/notifications{?all*,before*,page*,participating*,per_page*,since*}", rawUrl) + { + } + /// + /// Lists all notifications for the current user in the specified repository. + /// API method documentation + /// + /// A List<global::Ayllu.Github.Client.Models.ThreadObject> + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task?> GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task> GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var collectionResult = await RequestAdapter.SendCollectionAsync(requestInfo, global::Ayllu.Github.Client.Models.ThreadObject.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false); + return collectionResult?.AsList(); + } + /// + /// 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 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/rest/activity/notifications#list-repository-notifications-for-the-authenticated-user) endpoint and pass the query parameter `all=false`. + /// API method documentation + /// + /// A + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PutAsNotificationsPutResponseAsync(global::Ayllu.Github.Client.Repos.Item.Item.Notifications.NotificationsPutRequestBody body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task PutAsNotificationsPutResponseAsync(global::Ayllu.Github.Client.Repos.Item.Item.Notifications.NotificationsPutRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPutRequestInformation(body, requestConfiguration); + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Repos.Item.Item.Notifications.NotificationsPutResponse.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false); + } + /// + /// 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 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/rest/activity/notifications#list-repository-notifications-for-the-authenticated-user) endpoint and pass the query parameter `all=false`. + /// API method documentation + /// + /// A + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + [Obsolete("This method is obsolete. Use PutAsNotificationsPutResponseAsync instead.")] +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PutAsync(global::Ayllu.Github.Client.Repos.Item.Item.Notifications.NotificationsPutRequestBody body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task PutAsync(global::Ayllu.Github.Client.Repos.Item.Item.Notifications.NotificationsPutRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPutRequestInformation(body, requestConfiguration); + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Repos.Item.Item.Notifications.NotificationsResponse.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false); + } + /// + /// Lists all notifications for the current user in the specified repository. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// 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 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/rest/activity/notifications#list-repository-notifications-for-the-authenticated-user) endpoint and pass the query parameter `all=false`. + /// + /// A + /// The request body + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPutRequestInformation(global::Ayllu.Github.Client.Repos.Item.Item.Notifications.NotificationsPutRequestBody body, Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToPutRequestInformation(global::Ayllu.Github.Client.Repos.Item.Item.Notifications.NotificationsPutRequestBody body, Action> requestConfiguration = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation(Method.PUT, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.Repos.Item.Item.Notifications.NotificationsRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Repos.Item.Item.Notifications.NotificationsRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Lists all notifications for the current user in the specified repository. + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class NotificationsRequestBuilderGetQueryParameters + { + /// If `true`, show notifications marked as read. + [QueryParameter("all")] + public bool? All { get; set; } + /// 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`. + [QueryParameter("before")] + public DateTimeOffset? Before { get; set; } + /// The page number of the results to fetch. For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." + [QueryParameter("page")] + public int? Page { get; set; } + /// If `true`, only shows notifications in which the user is directly participating or mentioned. + [QueryParameter("participating")] + public bool? Participating { get; set; } + /// The number of results per page (max 100). For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." + [QueryParameter("per_page")] + public int? PerPage { get; set; } + /// 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`. + [QueryParameter("since")] + public DateTimeOffset? Since { get; set; } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class NotificationsRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class NotificationsRequestBuilderPutRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Notifications/NotificationsResponse.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Notifications/NotificationsResponse.cs new file mode 100644 index 0000000..abb91bd --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Notifications/NotificationsResponse.cs @@ -0,0 +1,28 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.Notifications +{ + [Obsolete("This class is obsolete. Use NotificationsPutResponse instead.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class NotificationsResponse : global::Ayllu.Github.Client.Repos.Item.Item.Notifications.NotificationsPutResponse, IParsable + #pragma warning restore CS1591 + { + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static new global::Ayllu.Github.Client.Repos.Item.Item.Notifications.NotificationsResponse CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Repos.Item.Item.Notifications.NotificationsResponse(); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Pages/Builds/BuildsRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Pages/Builds/BuildsRequestBuilder.cs new file mode 100644 index 0000000..4e3806a --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Pages/Builds/BuildsRequestBuilder.cs @@ -0,0 +1,185 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Ayllu.Github.Client.Repos.Item.Item.Pages.Builds.Item; +using Ayllu.Github.Client.Repos.Item.Item.Pages.Builds.Latest; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.Pages.Builds +{ + /// + /// Builds and executes requests for operations under \repos\{owner-id}\{repo-id}\pages\builds + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class BuildsRequestBuilder : BaseRequestBuilder + { + /// The latest property + public global::Ayllu.Github.Client.Repos.Item.Item.Pages.Builds.Latest.LatestRequestBuilder Latest + { + get => new global::Ayllu.Github.Client.Repos.Item.Item.Pages.Builds.Latest.LatestRequestBuilder(PathParameters, RequestAdapter); + } + /// Gets an item from the Ayllu.Github.Client.repos.item.item.pages.builds.item collection + /// Unique identifier of the item + /// A + public global::Ayllu.Github.Client.Repos.Item.Item.Pages.Builds.Item.WithBuild_ItemRequestBuilder this[int position] + { + get + { + var urlTplParams = new Dictionary(PathParameters); + urlTplParams.Add("build_id", position); + return new global::Ayllu.Github.Client.Repos.Item.Item.Pages.Builds.Item.WithBuild_ItemRequestBuilder(urlTplParams, RequestAdapter); + } + } + /// Gets an item from the Ayllu.Github.Client.repos.item.item.pages.builds.item collection + /// Unique identifier of the item + /// A + [Obsolete("This indexer is deprecated and will be removed in the next major version. Use the one with the typed parameter instead.")] + public global::Ayllu.Github.Client.Repos.Item.Item.Pages.Builds.Item.WithBuild_ItemRequestBuilder this[string position] + { + get + { + var urlTplParams = new Dictionary(PathParameters); + if (!string.IsNullOrWhiteSpace(position)) urlTplParams.Add("build_id", position); + return new global::Ayllu.Github.Client.Repos.Item.Item.Pages.Builds.Item.WithBuild_ItemRequestBuilder(urlTplParams, RequestAdapter); + } + } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public BuildsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/pages/builds{?page*,per_page*}", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public BuildsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/pages/builds{?page*,per_page*}", rawUrl) + { + } + /// + /// Lists builts of a GitHub Pages site.OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. + /// API method documentation + /// + /// A List<global::Ayllu.Github.Client.Models.PageBuild> + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task?> GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task> GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var collectionResult = await RequestAdapter.SendCollectionAsync(requestInfo, global::Ayllu.Github.Client.Models.PageBuild.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false); + return collectionResult?.AsList(); + } + /// + /// 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. + /// API method documentation + /// + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PostAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task PostAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToPostRequestInformation(requestConfiguration); + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Models.PageBuildStatus.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false); + } + /// + /// Lists builts of a GitHub Pages site.OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// 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. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPostRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToPostRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.Repos.Item.Item.Pages.Builds.BuildsRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Repos.Item.Item.Pages.Builds.BuildsRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Lists builts of a GitHub Pages site.OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class BuildsRequestBuilderGetQueryParameters + { + /// The page number of the results to fetch. For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." + [QueryParameter("page")] + public int? Page { get; set; } + /// The number of results per page (max 100). For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." + [QueryParameter("per_page")] + public int? PerPage { get; set; } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class BuildsRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class BuildsRequestBuilderPostRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Pages/Builds/Item/WithBuild_ItemRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Pages/Builds/Item/WithBuild_ItemRequestBuilder.cs new file mode 100644 index 0000000..482a270 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Pages/Builds/Item/WithBuild_ItemRequestBuilder.cs @@ -0,0 +1,93 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.Pages.Builds.Item +{ + /// + /// Builds and executes requests for operations under \repos\{owner-id}\{repo-id}\pages\builds\{build_id} + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithBuild_ItemRequestBuilder : BaseRequestBuilder + { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public WithBuild_ItemRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/pages/builds/{build_id}", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public WithBuild_ItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/pages/builds/{build_id}", rawUrl) + { + } + /// + /// Gets information about a GitHub Pages build.OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. + /// API method documentation + /// + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Models.PageBuild.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false); + } + /// + /// Gets information about a GitHub Pages build.OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.Repos.Item.Item.Pages.Builds.Item.WithBuild_ItemRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Repos.Item.Item.Pages.Builds.Item.WithBuild_ItemRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithBuild_ItemRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Pages/Builds/Latest/LatestRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Pages/Builds/Latest/LatestRequestBuilder.cs new file mode 100644 index 0000000..e161256 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Pages/Builds/Latest/LatestRequestBuilder.cs @@ -0,0 +1,93 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.Pages.Builds.Latest +{ + /// + /// Builds and executes requests for operations under \repos\{owner-id}\{repo-id}\pages\builds\latest + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class LatestRequestBuilder : BaseRequestBuilder + { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public LatestRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/pages/builds/latest", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public LatestRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/pages/builds/latest", rawUrl) + { + } + /// + /// Gets information about the single most recent build of a GitHub Pages site.OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. + /// API method documentation + /// + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Models.PageBuild.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false); + } + /// + /// Gets information about the single most recent build of a GitHub Pages site.OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.Repos.Item.Item.Pages.Builds.Latest.LatestRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Repos.Item.Item.Pages.Builds.Latest.LatestRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class LatestRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Pages/Deployments/DeploymentsPostRequestBody.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Pages/Deployments/DeploymentsPostRequestBody.cs new file mode 100644 index 0000000..4de4d79 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Pages/Deployments/DeploymentsPostRequestBody.cs @@ -0,0 +1,102 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.Pages.Deployments +{ + /// + /// The object used to create GitHub Pages deployment + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class DeploymentsPostRequestBody : IAdditionalDataHolder, IParsable + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// 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. + public double? ArtifactId { get; set; } + /// 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. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? ArtifactUrl { get; set; } +#nullable restore +#else + public string ArtifactUrl { get; set; } +#endif + /// The target environment for this GitHub Pages deployment. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Environment { get; set; } +#nullable restore +#else + public string Environment { get; set; } +#endif + /// The OIDC token issued by GitHub Actions certifying the origin of the deployment. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? OidcToken { get; set; } +#nullable restore +#else + public string OidcToken { get; set; } +#endif + /// A unique string that represents the version of the build for this deployment. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? PagesBuildVersion { get; set; } +#nullable restore +#else + public string PagesBuildVersion { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public DeploymentsPostRequestBody() + { + AdditionalData = new Dictionary(); + Environment = "github-pages"; + PagesBuildVersion = "GITHUB_SHA"; + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Repos.Item.Item.Pages.Deployments.DeploymentsPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Repos.Item.Item.Pages.Deployments.DeploymentsPostRequestBody(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "artifact_id", n => { ArtifactId = n.GetDoubleValue(); } }, + { "artifact_url", n => { ArtifactUrl = n.GetStringValue(); } }, + { "environment", n => { Environment = n.GetStringValue(); } }, + { "oidc_token", n => { OidcToken = n.GetStringValue(); } }, + { "pages_build_version", n => { PagesBuildVersion = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteDoubleValue("artifact_id", ArtifactId); + writer.WriteStringValue("artifact_url", ArtifactUrl); + writer.WriteStringValue("environment", Environment); + writer.WriteStringValue("oidc_token", OidcToken); + writer.WriteStringValue("pages_build_version", PagesBuildVersion); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Pages/Deployments/DeploymentsRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Pages/Deployments/DeploymentsRequestBuilder.cs new file mode 100644 index 0000000..c9b24e8 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Pages/Deployments/DeploymentsRequestBuilder.cs @@ -0,0 +1,133 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Ayllu.Github.Client.Repos.Item.Item.Pages.Deployments.Item; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.Pages.Deployments +{ + /// + /// Builds and executes requests for operations under \repos\{owner-id}\{repo-id}\pages\deployments + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class DeploymentsRequestBuilder : BaseRequestBuilder + { + /// Gets an item from the Ayllu.Github.Client.repos.item.item.pages.deployments.item collection + /// The ID of the Pages deployment. You can also give the commit SHA of the deployment. + /// A + public global::Ayllu.Github.Client.Repos.Item.Item.Pages.Deployments.Item.WithPages_deployment_ItemRequestBuilder this[int position] + { + get + { + var urlTplParams = new Dictionary(PathParameters); + urlTplParams.Add("pages_deployment_id", position); + return new global::Ayllu.Github.Client.Repos.Item.Item.Pages.Deployments.Item.WithPages_deployment_ItemRequestBuilder(urlTplParams, RequestAdapter); + } + } + /// Gets an item from the Ayllu.Github.Client.repos.item.item.pages.deployments.item collection + /// The ID of the Pages deployment. You can also give the commit SHA of the deployment. + /// A + [Obsolete("This indexer is deprecated and will be removed in the next major version. Use the one with the typed parameter instead.")] + public global::Ayllu.Github.Client.Repos.Item.Item.Pages.Deployments.Item.WithPages_deployment_ItemRequestBuilder this[string position] + { + get + { + var urlTplParams = new Dictionary(PathParameters); + if (!string.IsNullOrWhiteSpace(position)) urlTplParams.Add("pages_deployment_id", position); + return new global::Ayllu.Github.Client.Repos.Item.Item.Pages.Deployments.Item.WithPages_deployment_ItemRequestBuilder(urlTplParams, RequestAdapter); + } + } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public DeploymentsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/pages/deployments", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public DeploymentsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/pages/deployments", rawUrl) + { + } + /// + /// Create a GitHub Pages deployment for a repository.The authenticated user must have write permission to the repository. + /// API method documentation + /// + /// A + /// The object used to create GitHub Pages deployment + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 400 status code + /// When receiving a 404 status code + /// When receiving a 422 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PostAsync(global::Ayllu.Github.Client.Repos.Item.Item.Pages.Deployments.DeploymentsPostRequestBody body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task PostAsync(global::Ayllu.Github.Client.Repos.Item.Item.Pages.Deployments.DeploymentsPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPostRequestInformation(body, requestConfiguration); + var errorMapping = new Dictionary> + { + { "400", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "404", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "422", global::Ayllu.Github.Client.Models.ValidationError.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Models.PageDeployment.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// Create a GitHub Pages deployment for a repository.The authenticated user must have write permission to the repository. + /// + /// A + /// The object used to create GitHub Pages deployment + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPostRequestInformation(global::Ayllu.Github.Client.Repos.Item.Item.Pages.Deployments.DeploymentsPostRequestBody body, Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToPostRequestInformation(global::Ayllu.Github.Client.Repos.Item.Item.Pages.Deployments.DeploymentsPostRequestBody body, Action> requestConfiguration = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.Repos.Item.Item.Pages.Deployments.DeploymentsRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Repos.Item.Item.Pages.Deployments.DeploymentsRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class DeploymentsRequestBuilderPostRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Pages/Deployments/Item/Cancel/CancelRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Pages/Deployments/Item/Cancel/CancelRequestBuilder.cs new file mode 100644 index 0000000..82b42b2 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Pages/Deployments/Item/Cancel/CancelRequestBuilder.cs @@ -0,0 +1,97 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.Pages.Deployments.Item.Cancel +{ + /// + /// Builds and executes requests for operations under \repos\{owner-id}\{repo-id}\pages\deployments\{pages_deployment_id}\cancel + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class CancelRequestBuilder : BaseRequestBuilder + { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public CancelRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/pages/deployments/{pages_deployment_id}/cancel", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public CancelRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/pages/deployments/{pages_deployment_id}/cancel", rawUrl) + { + } + /// + /// Cancels a GitHub Pages deployment.The authenticated user must have write permissions for the GitHub Pages site. + /// API method documentation + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 404 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PostAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task PostAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToPostRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "404", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + }; + await RequestAdapter.SendNoContentAsync(requestInfo, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// Cancels a GitHub Pages deployment.The authenticated user must have write permissions for the GitHub Pages site. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPostRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToPostRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.Repos.Item.Item.Pages.Deployments.Item.Cancel.CancelRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Repos.Item.Item.Pages.Deployments.Item.Cancel.CancelRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class CancelRequestBuilderPostRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Pages/Deployments/Item/WithPages_deployment_ItemRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Pages/Deployments/Item/WithPages_deployment_ItemRequestBuilder.cs new file mode 100644 index 0000000..0fda413 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Pages/Deployments/Item/WithPages_deployment_ItemRequestBuilder.cs @@ -0,0 +1,104 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Ayllu.Github.Client.Repos.Item.Item.Pages.Deployments.Item.Cancel; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.Pages.Deployments.Item +{ + /// + /// Builds and executes requests for operations under \repos\{owner-id}\{repo-id}\pages\deployments\{pages_deployment_id} + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithPages_deployment_ItemRequestBuilder : BaseRequestBuilder + { + /// The cancel property + public global::Ayllu.Github.Client.Repos.Item.Item.Pages.Deployments.Item.Cancel.CancelRequestBuilder Cancel + { + get => new global::Ayllu.Github.Client.Repos.Item.Item.Pages.Deployments.Item.Cancel.CancelRequestBuilder(PathParameters, RequestAdapter); + } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public WithPages_deployment_ItemRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/pages/deployments/{pages_deployment_id}", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public WithPages_deployment_ItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/pages/deployments/{pages_deployment_id}", rawUrl) + { + } + /// + /// Gets the current status of a GitHub Pages deployment.The authenticated user must have read permission for the GitHub Pages site. + /// API method documentation + /// + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 404 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "404", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Models.PagesDeploymentStatus.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// Gets the current status of a GitHub Pages deployment.The authenticated user must have read permission for the GitHub Pages site. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.Repos.Item.Item.Pages.Deployments.Item.WithPages_deployment_ItemRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Repos.Item.Item.Pages.Deployments.Item.WithPages_deployment_ItemRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithPages_deployment_ItemRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Pages/Health/HealthRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Pages/Health/HealthRequestBuilder.cs new file mode 100644 index 0000000..0adfb0b --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Pages/Health/HealthRequestBuilder.cs @@ -0,0 +1,98 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.Pages.Health +{ + /// + /// Builds and executes requests for operations under \repos\{owner-id}\{repo-id}\pages\health + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class HealthRequestBuilder : BaseRequestBuilder + { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public HealthRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/pages/health", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public HealthRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/pages/health", rawUrl) + { + } + /// + /// 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. + /// API method documentation + /// + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 404 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "404", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Models.PagesHealthCheck.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// 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. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.Repos.Item.Item.Pages.Health.HealthRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Repos.Item.Item.Pages.Health.HealthRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class HealthRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Pages/PagesPostRequestBody.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Pages/PagesPostRequestBody.cs new file mode 100644 index 0000000..47807e3 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Pages/PagesPostRequestBody.cs @@ -0,0 +1,70 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.Pages +{ + /// + /// The source branch and directory used to publish your Pages site. + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class PagesPostRequestBody : IAdditionalDataHolder, IParsable + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The process in which the Page will be built. Possible values are `"legacy"` and `"workflow"`. + public global::Ayllu.Github.Client.Repos.Item.Item.Pages.PagesPostRequestBody_build_type? BuildType { get; set; } + /// The source branch and directory used to publish your Pages site. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Repos.Item.Item.Pages.PagesPostRequestBody_source? Source { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Repos.Item.Item.Pages.PagesPostRequestBody_source Source { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public PagesPostRequestBody() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Repos.Item.Item.Pages.PagesPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Repos.Item.Item.Pages.PagesPostRequestBody(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "build_type", n => { BuildType = n.GetEnumValue(); } }, + { "source", n => { Source = n.GetObjectValue(global::Ayllu.Github.Client.Repos.Item.Item.Pages.PagesPostRequestBody_source.CreateFromDiscriminatorValue); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteEnumValue("build_type", BuildType); + writer.WriteObjectValue("source", Source); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Pages/PagesPostRequestBody_build_type.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Pages/PagesPostRequestBody_build_type.cs new file mode 100644 index 0000000..9fb1587 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Pages/PagesPostRequestBody_build_type.cs @@ -0,0 +1,19 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.Pages +{ + /// The process in which the Page will be built. Possible values are `"legacy"` and `"workflow"`. + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public enum PagesPostRequestBody_build_type + { + [EnumMember(Value = "legacy")] + #pragma warning disable CS1591 + Legacy, + #pragma warning restore CS1591 + [EnumMember(Value = "workflow")] + #pragma warning disable CS1591 + Workflow, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Pages/PagesPostRequestBody_source.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Pages/PagesPostRequestBody_source.cs new file mode 100644 index 0000000..2413d12 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Pages/PagesPostRequestBody_source.cs @@ -0,0 +1,71 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.Pages +{ + /// + /// The source branch and directory used to publish your Pages site. + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class PagesPostRequestBody_source : IAdditionalDataHolder, IParsable + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The repository branch used to publish your site's source files. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Branch { get; set; } +#nullable restore +#else + public string Branch { get; set; } +#endif + /// The repository directory that includes the source files for the Pages site. Allowed paths are `/` or `/docs`. Default: `/` + public global::Ayllu.Github.Client.Repos.Item.Item.Pages.PagesPostRequestBody_source_path? Path { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public PagesPostRequestBody_source() + { + AdditionalData = new Dictionary(); + Path = global::Ayllu.Github.Client.Repos.Item.Item.Pages.PagesPostRequestBody_source_path.Slash; + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Repos.Item.Item.Pages.PagesPostRequestBody_source CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Repos.Item.Item.Pages.PagesPostRequestBody_source(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "branch", n => { Branch = n.GetStringValue(); } }, + { "path", n => { Path = n.GetEnumValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("branch", Branch); + writer.WriteEnumValue("path", Path); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Pages/PagesPostRequestBody_source_path.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Pages/PagesPostRequestBody_source_path.cs new file mode 100644 index 0000000..c15a24e --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Pages/PagesPostRequestBody_source_path.cs @@ -0,0 +1,19 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.Pages +{ + /// The repository directory that includes the source files for the Pages site. Allowed paths are `/` or `/docs`. Default: `/` + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public enum PagesPostRequestBody_source_path + { + [EnumMember(Value = "/")] + #pragma warning disable CS1591 + Slash, + #pragma warning restore CS1591 + [EnumMember(Value = "/docs")] + #pragma warning disable CS1591 + Docs, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Pages/PagesPutRequestBody.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Pages/PagesPutRequestBody.cs new file mode 100644 index 0000000..d1ac04a --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Pages/PagesPutRequestBody.cs @@ -0,0 +1,151 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.Pages +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class PagesPutRequestBody : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// 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. + public global::Ayllu.Github.Client.Repos.Item.Item.Pages.PagesPutRequestBody_build_type? BuildType { get; set; } + /// Specify a custom domain for the repository. Sending a `null` value will remove the custom domain. For more about custom domains, see "[Using a custom domain with GitHub Pages](https://docs.github.com/pages/configuring-a-custom-domain-for-your-github-pages-site)." +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Cname { get; set; } +#nullable restore +#else + public string Cname { get; set; } +#endif + /// Specify whether HTTPS should be enforced for the repository. + public bool? HttpsEnforced { get; set; } + /// The source property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Repos.Item.Item.Pages.PagesPutRequestBody.PagesPutRequestBody_source? Source { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Repos.Item.Item.Pages.PagesPutRequestBody.PagesPutRequestBody_source Source { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public PagesPutRequestBody() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Repos.Item.Item.Pages.PagesPutRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Repos.Item.Item.Pages.PagesPutRequestBody(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "build_type", n => { BuildType = n.GetEnumValue(); } }, + { "cname", n => { Cname = n.GetStringValue(); } }, + { "https_enforced", n => { HttpsEnforced = n.GetBoolValue(); } }, + { "source", n => { Source = n.GetObjectValue(global::Ayllu.Github.Client.Repos.Item.Item.Pages.PagesPutRequestBody.PagesPutRequestBody_source.CreateFromDiscriminatorValue); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteEnumValue("build_type", BuildType); + writer.WriteStringValue("cname", Cname); + writer.WriteBoolValue("https_enforced", HttpsEnforced); + writer.WriteObjectValue("source", Source); + writer.WriteAdditionalData(AdditionalData); + } + /// + /// Composed type wrapper for classes , + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class PagesPutRequestBody_source : IComposedTypeWrapper, IParsable + { + /// Composed type representation for type +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Repos.Item.Item.Pages.PagesPutRequestBody_sourceMember1? PagesPutRequestBodySourceMember1 { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Repos.Item.Item.Pages.PagesPutRequestBody_sourceMember1 PagesPutRequestBodySourceMember1 { get; set; } +#endif + /// Composed type representation for type +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? String { get; set; } +#nullable restore +#else + public string String { get; set; } +#endif + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Repos.Item.Item.Pages.PagesPutRequestBody.PagesPutRequestBody_source CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + var result = new global::Ayllu.Github.Client.Repos.Item.Item.Pages.PagesPutRequestBody.PagesPutRequestBody_source(); + if(parseNode.GetStringValue() is string stringValue) + { + result.String = stringValue; + } + else { + result.PagesPutRequestBodySourceMember1 = new global::Ayllu.Github.Client.Repos.Item.Item.Pages.PagesPutRequestBody_sourceMember1(); + } + return result; + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + if(PagesPutRequestBodySourceMember1 != null) + { + return ParseNodeHelper.MergeDeserializersForIntersectionWrapper(PagesPutRequestBodySourceMember1); + } + return new Dictionary>(); + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(String != null) + { + writer.WriteStringValue(null, String); + } + else { + writer.WriteObjectValue(null, PagesPutRequestBodySourceMember1); + } + } + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Pages/PagesPutRequestBody_build_type.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Pages/PagesPutRequestBody_build_type.cs new file mode 100644 index 0000000..9be26d9 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Pages/PagesPutRequestBody_build_type.cs @@ -0,0 +1,19 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.Pages +{ + /// 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. + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public enum PagesPutRequestBody_build_type + { + [EnumMember(Value = "legacy")] + #pragma warning disable CS1591 + Legacy, + #pragma warning restore CS1591 + [EnumMember(Value = "workflow")] + #pragma warning disable CS1591 + Workflow, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Pages/PagesPutRequestBody_sourceMember1.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Pages/PagesPutRequestBody_sourceMember1.cs new file mode 100644 index 0000000..ed7c731 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Pages/PagesPutRequestBody_sourceMember1.cs @@ -0,0 +1,70 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.Pages +{ + /// + /// Update the source for the repository. Must include the branch name and path. + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class PagesPutRequestBody_sourceMember1 : IAdditionalDataHolder, IParsable + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The repository branch used to publish your site's source files. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Branch { get; set; } +#nullable restore +#else + public string Branch { get; set; } +#endif + /// The repository directory that includes the source files for the Pages site. Allowed paths are `/` or `/docs`. + public global::Ayllu.Github.Client.Repos.Item.Item.Pages.PagesPutRequestBody_sourceMember1_path? Path { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public PagesPutRequestBody_sourceMember1() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Repos.Item.Item.Pages.PagesPutRequestBody_sourceMember1 CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Repos.Item.Item.Pages.PagesPutRequestBody_sourceMember1(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "branch", n => { Branch = n.GetStringValue(); } }, + { "path", n => { Path = n.GetEnumValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("branch", Branch); + writer.WriteEnumValue("path", Path); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Pages/PagesPutRequestBody_sourceMember1_path.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Pages/PagesPutRequestBody_sourceMember1_path.cs new file mode 100644 index 0000000..ccaa2f7 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Pages/PagesPutRequestBody_sourceMember1_path.cs @@ -0,0 +1,19 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.Pages +{ + /// The repository directory that includes the source files for the Pages site. Allowed paths are `/` or `/docs`. + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public enum PagesPutRequestBody_sourceMember1_path + { + [EnumMember(Value = "/")] + #pragma warning disable CS1591 + Slash, + #pragma warning restore CS1591 + [EnumMember(Value = "/docs")] + #pragma warning disable CS1591 + Docs, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Pages/PagesRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Pages/PagesRequestBuilder.cs new file mode 100644 index 0000000..9141a34 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Pages/PagesRequestBuilder.cs @@ -0,0 +1,287 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Ayllu.Github.Client.Repos.Item.Item.Pages.Builds; +using Ayllu.Github.Client.Repos.Item.Item.Pages.Deployments; +using Ayllu.Github.Client.Repos.Item.Item.Pages.Health; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.Pages +{ + /// + /// Builds and executes requests for operations under \repos\{owner-id}\{repo-id}\pages + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class PagesRequestBuilder : BaseRequestBuilder + { + /// The builds property + public global::Ayllu.Github.Client.Repos.Item.Item.Pages.Builds.BuildsRequestBuilder Builds + { + get => new global::Ayllu.Github.Client.Repos.Item.Item.Pages.Builds.BuildsRequestBuilder(PathParameters, RequestAdapter); + } + /// The deployments property + public global::Ayllu.Github.Client.Repos.Item.Item.Pages.Deployments.DeploymentsRequestBuilder Deployments + { + get => new global::Ayllu.Github.Client.Repos.Item.Item.Pages.Deployments.DeploymentsRequestBuilder(PathParameters, RequestAdapter); + } + /// The health property + public global::Ayllu.Github.Client.Repos.Item.Item.Pages.Health.HealthRequestBuilder Health + { + get => new global::Ayllu.Github.Client.Repos.Item.Item.Pages.Health.HealthRequestBuilder(PathParameters, RequestAdapter); + } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public PagesRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/pages", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public PagesRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/pages", rawUrl) + { + } + /// + /// Deletes a GitHub 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. + /// API method documentation + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 404 status code + /// When receiving a 409 status code + /// When receiving a 422 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task DeleteAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task DeleteAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToDeleteRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "404", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "409", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "422", global::Ayllu.Github.Client.Models.ValidationError.CreateFromDiscriminatorValue }, + }; + await RequestAdapter.SendNoContentAsync(requestInfo, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// Gets information about a GitHub Pages site.OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. + /// API method documentation + /// + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 404 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "404", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Models.Page.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// Configures a GitHub 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. + /// API method documentation + /// + /// A + /// The source branch and directory used to publish your Pages site. + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 409 status code + /// When receiving a 422 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PostAsync(global::Ayllu.Github.Client.Repos.Item.Item.Pages.PagesPostRequestBody body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task PostAsync(global::Ayllu.Github.Client.Repos.Item.Item.Pages.PagesPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPostRequestInformation(body, requestConfiguration); + var errorMapping = new Dictionary> + { + { "409", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "422", global::Ayllu.Github.Client.Models.ValidationError.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Models.Page.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// Updates information for a GitHub 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. + /// API method documentation + /// + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 400 status code + /// When receiving a 409 status code + /// When receiving a 422 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PutAsync(global::Ayllu.Github.Client.Repos.Item.Item.Pages.PagesPutRequestBody body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task PutAsync(global::Ayllu.Github.Client.Repos.Item.Item.Pages.PagesPutRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPutRequestInformation(body, requestConfiguration); + var errorMapping = new Dictionary> + { + { "400", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "409", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "422", global::Ayllu.Github.Client.Models.ValidationError.CreateFromDiscriminatorValue }, + }; + await RequestAdapter.SendNoContentAsync(requestInfo, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// Deletes a GitHub 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. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToDeleteRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToDeleteRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.DELETE, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Gets information about a GitHub Pages site.OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Configures a GitHub 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. + /// + /// A + /// The source branch and directory used to publish your Pages site. + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPostRequestInformation(global::Ayllu.Github.Client.Repos.Item.Item.Pages.PagesPostRequestBody body, Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToPostRequestInformation(global::Ayllu.Github.Client.Repos.Item.Item.Pages.PagesPostRequestBody body, Action> requestConfiguration = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + return requestInfo; + } + /// + /// Updates information for a GitHub 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. + /// + /// A + /// The request body + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPutRequestInformation(global::Ayllu.Github.Client.Repos.Item.Item.Pages.PagesPutRequestBody body, Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToPutRequestInformation(global::Ayllu.Github.Client.Repos.Item.Item.Pages.PagesPutRequestBody body, Action> requestConfiguration = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation(Method.PUT, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json, application/scim+json"); + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.Repos.Item.Item.Pages.PagesRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Repos.Item.Item.Pages.PagesRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class PagesRequestBuilderDeleteRequestConfiguration : RequestConfiguration + { + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class PagesRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class PagesRequestBuilderPostRequestConfiguration : RequestConfiguration + { + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class PagesRequestBuilderPutRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/PrivateVulnerabilityReporting/PrivateVulnerabilityReportingGetResponse.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/PrivateVulnerabilityReporting/PrivateVulnerabilityReportingGetResponse.cs new file mode 100644 index 0000000..eabca90 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/PrivateVulnerabilityReporting/PrivateVulnerabilityReportingGetResponse.cs @@ -0,0 +1,59 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.PrivateVulnerabilityReporting +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class PrivateVulnerabilityReportingGetResponse : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// Whether or not private vulnerability reporting is enabled for the repository. + public bool? Enabled { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public PrivateVulnerabilityReportingGetResponse() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Repos.Item.Item.PrivateVulnerabilityReporting.PrivateVulnerabilityReportingGetResponse CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Repos.Item.Item.PrivateVulnerabilityReporting.PrivateVulnerabilityReportingGetResponse(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "enabled", n => { Enabled = n.GetBoolValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteBoolValue("enabled", Enabled); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/PrivateVulnerabilityReporting/PrivateVulnerabilityReportingRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/PrivateVulnerabilityReporting/PrivateVulnerabilityReportingRequestBuilder.cs new file mode 100644 index 0000000..4c13e30 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/PrivateVulnerabilityReporting/PrivateVulnerabilityReportingRequestBuilder.cs @@ -0,0 +1,223 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.PrivateVulnerabilityReporting +{ + /// + /// Builds and executes requests for operations under \repos\{owner-id}\{repo-id}\private-vulnerability-reporting + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class PrivateVulnerabilityReportingRequestBuilder : BaseRequestBuilder + { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public PrivateVulnerabilityReportingRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/private-vulnerability-reporting", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public PrivateVulnerabilityReportingRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/private-vulnerability-reporting", rawUrl) + { + } + /// + /// 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/code-security/security-advisories/guidance-on-reporting-and-writing/privately-reporting-a-security-vulnerability)". + /// API method documentation + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 422 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task DeleteAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task DeleteAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToDeleteRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "422", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + }; + await RequestAdapter.SendNoContentAsync(requestInfo, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// 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/code-security/security-advisories/working-with-repository-security-advisories/evaluating-the-security-settings-of-a-repository)". + /// API method documentation + /// + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 422 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsPrivateVulnerabilityReportingGetResponseAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task GetAsPrivateVulnerabilityReportingGetResponseAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "422", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Repos.Item.Item.PrivateVulnerabilityReporting.PrivateVulnerabilityReportingGetResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// 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/code-security/security-advisories/working-with-repository-security-advisories/evaluating-the-security-settings-of-a-repository)". + /// API method documentation + /// + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 422 status code + [Obsolete("This method is obsolete. Use GetAsPrivateVulnerabilityReportingGetResponseAsync instead.")] +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "422", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Repos.Item.Item.PrivateVulnerabilityReporting.PrivateVulnerabilityReportingResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// 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/code-security/security-advisories/guidance-on-reporting-and-writing/privately-reporting-a-security-vulnerability)." + /// API method documentation + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 422 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PutAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task PutAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToPutRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "422", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + }; + await RequestAdapter.SendNoContentAsync(requestInfo, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// 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/code-security/security-advisories/guidance-on-reporting-and-writing/privately-reporting-a-security-vulnerability)". + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToDeleteRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToDeleteRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.DELETE, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json, application/scim+json"); + return requestInfo; + } + /// + /// 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/code-security/security-advisories/working-with-repository-security-advisories/evaluating-the-security-settings-of-a-repository)". + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// 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/code-security/security-advisories/guidance-on-reporting-and-writing/privately-reporting-a-security-vulnerability)." + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPutRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToPutRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.PUT, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json, application/scim+json"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.Repos.Item.Item.PrivateVulnerabilityReporting.PrivateVulnerabilityReportingRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Repos.Item.Item.PrivateVulnerabilityReporting.PrivateVulnerabilityReportingRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class PrivateVulnerabilityReportingRequestBuilderDeleteRequestConfiguration : RequestConfiguration + { + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class PrivateVulnerabilityReportingRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class PrivateVulnerabilityReportingRequestBuilderPutRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/PrivateVulnerabilityReporting/PrivateVulnerabilityReportingResponse.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/PrivateVulnerabilityReporting/PrivateVulnerabilityReportingResponse.cs new file mode 100644 index 0000000..8b41a37 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/PrivateVulnerabilityReporting/PrivateVulnerabilityReportingResponse.cs @@ -0,0 +1,28 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.PrivateVulnerabilityReporting +{ + [Obsolete("This class is obsolete. Use PrivateVulnerabilityReportingGetResponse instead.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class PrivateVulnerabilityReportingResponse : global::Ayllu.Github.Client.Repos.Item.Item.PrivateVulnerabilityReporting.PrivateVulnerabilityReportingGetResponse, IParsable + #pragma warning restore CS1591 + { + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static new global::Ayllu.Github.Client.Repos.Item.Item.PrivateVulnerabilityReporting.PrivateVulnerabilityReportingResponse CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Repos.Item.Item.PrivateVulnerabilityReporting.PrivateVulnerabilityReportingResponse(); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Projects/GetStateQueryParameterType.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Projects/GetStateQueryParameterType.cs new file mode 100644 index 0000000..2d63817 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Projects/GetStateQueryParameterType.cs @@ -0,0 +1,24 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.Projects +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public enum GetStateQueryParameterType + #pragma warning restore CS1591 + { + [EnumMember(Value = "open")] + #pragma warning disable CS1591 + Open, + #pragma warning restore CS1591 + [EnumMember(Value = "closed")] + #pragma warning disable CS1591 + Closed, + #pragma warning restore CS1591 + [EnumMember(Value = "all")] + #pragma warning disable CS1591 + All, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Projects/ProjectsPostRequestBody.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Projects/ProjectsPostRequestBody.cs new file mode 100644 index 0000000..304123b --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Projects/ProjectsPostRequestBody.cs @@ -0,0 +1,75 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.Projects +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class ProjectsPostRequestBody : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The description of the project. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Body { get; set; } +#nullable restore +#else + public string Body { get; set; } +#endif + /// The name of the project. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Name { get; set; } +#nullable restore +#else + public string Name { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public ProjectsPostRequestBody() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Repos.Item.Item.Projects.ProjectsPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Repos.Item.Item.Projects.ProjectsPostRequestBody(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "body", n => { Body = n.GetStringValue(); } }, + { "name", n => { Name = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("body", Body); + writer.WriteStringValue("name", Name); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Projects/ProjectsRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Projects/ProjectsRequestBuilder.cs new file mode 100644 index 0000000..84b2376 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Projects/ProjectsRequestBuilder.cs @@ -0,0 +1,203 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.Projects +{ + /// + /// Builds and executes requests for operations under \repos\{owner-id}\{repo-id}\projects + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class ProjectsRequestBuilder : BaseRequestBuilder + { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public ProjectsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/projects{?page*,per_page*,state*}", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public ProjectsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/projects{?page*,per_page*,state*}", rawUrl) + { + } + /// + /// > [!WARNING]> **Closing down notice:** Projects (classic) is being deprecated in favor of the new Projects experience.> See the [changelog](https://github.blog/changelog/2024-05-23-sunset-notice-projects-classic/) for more information. + /// API method documentation + /// + /// A List<global::Ayllu.Github.Client.Models.Project> + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 401 status code + /// When receiving a 403 status code + /// When receiving a 404 status code + /// When receiving a 410 status code + /// When receiving a 422 status code + [Obsolete("")] +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task?> GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task> GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "401", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "403", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "404", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "410", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "422", global::Ayllu.Github.Client.Models.ValidationErrorSimple.CreateFromDiscriminatorValue }, + }; + var collectionResult = await RequestAdapter.SendCollectionAsync(requestInfo, global::Ayllu.Github.Client.Models.Project.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + return collectionResult?.AsList(); + } + /// + /// > [!WARNING]> **Closing down notice:** Projects (classic) is being deprecated in favor of the new Projects experience.> See the [changelog](https://github.blog/changelog/2024-05-23-sunset-notice-projects-classic/) for more information. + /// API method documentation + /// + /// A + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 401 status code + /// When receiving a 403 status code + /// When receiving a 404 status code + /// When receiving a 410 status code + /// When receiving a 422 status code + [Obsolete("")] +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PostAsync(global::Ayllu.Github.Client.Repos.Item.Item.Projects.ProjectsPostRequestBody body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task PostAsync(global::Ayllu.Github.Client.Repos.Item.Item.Projects.ProjectsPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPostRequestInformation(body, requestConfiguration); + var errorMapping = new Dictionary> + { + { "401", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "403", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "404", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "410", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "422", global::Ayllu.Github.Client.Models.ValidationErrorSimple.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Models.Project.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// > [!WARNING]> **Closing down notice:** Projects (classic) is being deprecated in favor of the new Projects experience.> See the [changelog](https://github.blog/changelog/2024-05-23-sunset-notice-projects-classic/) for more information. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. + [Obsolete("")] +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// > [!WARNING]> **Closing down notice:** Projects (classic) is being deprecated in favor of the new Projects experience.> See the [changelog](https://github.blog/changelog/2024-05-23-sunset-notice-projects-classic/) for more information. + /// + /// A + /// The request body + /// Configuration for the request such as headers, query parameters, and middleware options. + [Obsolete("")] +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPostRequestInformation(global::Ayllu.Github.Client.Repos.Item.Item.Projects.ProjectsPostRequestBody body, Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToPostRequestInformation(global::Ayllu.Github.Client.Repos.Item.Item.Projects.ProjectsPostRequestBody body, Action> requestConfiguration = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + [Obsolete("")] + public global::Ayllu.Github.Client.Repos.Item.Item.Projects.ProjectsRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Repos.Item.Item.Projects.ProjectsRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// > [!WARNING]> **Closing down notice:** Projects (classic) is being deprecated in favor of the new Projects experience.> See the [changelog](https://github.blog/changelog/2024-05-23-sunset-notice-projects-classic/) for more information. + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class ProjectsRequestBuilderGetQueryParameters + { + /// The page number of the results to fetch. For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." + [QueryParameter("page")] + public int? Page { get; set; } + /// The number of results per page (max 100). For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." + [QueryParameter("per_page")] + public int? PerPage { get; set; } + /// Indicates the state of the projects to return. + [Obsolete("This property is deprecated, use StateAsGetStateQueryParameterType instead")] +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("state")] + public string? State { get; set; } +#nullable restore +#else + [QueryParameter("state")] + public string State { get; set; } +#endif + /// Indicates the state of the projects to return. + [QueryParameter("state")] + public global::Ayllu.Github.Client.Repos.Item.Item.Projects.GetStateQueryParameterType? StateAsGetStateQueryParameterType { get; set; } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class ProjectsRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class ProjectsRequestBuilderPostRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Properties/PropertiesRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Properties/PropertiesRequestBuilder.cs new file mode 100644 index 0000000..f47391e --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Properties/PropertiesRequestBuilder.cs @@ -0,0 +1,41 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Repos.Item.Item.Properties.Values; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.Properties +{ + /// + /// Builds and executes requests for operations under \repos\{owner-id}\{repo-id}\properties + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class PropertiesRequestBuilder : BaseRequestBuilder + { + /// The values property + public global::Ayllu.Github.Client.Repos.Item.Item.Properties.Values.ValuesRequestBuilder Values + { + get => new global::Ayllu.Github.Client.Repos.Item.Item.Properties.Values.ValuesRequestBuilder(PathParameters, RequestAdapter); + } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public PropertiesRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/properties", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public PropertiesRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/properties", rawUrl) + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Properties/Values/ValuesPatchRequestBody.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Properties/Values/ValuesPatchRequestBody.cs new file mode 100644 index 0000000..23775b2 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Properties/Values/ValuesPatchRequestBody.cs @@ -0,0 +1,66 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.Properties.Values +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class ValuesPatchRequestBody : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// A list of custom property names and associated values to apply to the repositories. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? Properties { get; set; } +#nullable restore +#else + public List Properties { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public ValuesPatchRequestBody() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Repos.Item.Item.Properties.Values.ValuesPatchRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Repos.Item.Item.Properties.Values.ValuesPatchRequestBody(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "properties", n => { Properties = n.GetCollectionOfObjectValues(global::Ayllu.Github.Client.Models.CustomPropertyValue.CreateFromDiscriminatorValue)?.AsList(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteCollectionOfObjectValues("properties", Properties); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Properties/Values/ValuesRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Properties/Values/ValuesRequestBuilder.cs new file mode 100644 index 0000000..76359fa --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Properties/Values/ValuesRequestBuilder.cs @@ -0,0 +1,160 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.Properties.Values +{ + /// + /// Builds and executes requests for operations under \repos\{owner-id}\{repo-id}\properties\values + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class ValuesRequestBuilder : BaseRequestBuilder + { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public ValuesRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/properties/values", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public ValuesRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/properties/values", rawUrl) + { + } + /// + /// Gets all custom property values that are set for a repository.Users with read access to the repository can use this endpoint. + /// API method documentation + /// + /// A List<global::Ayllu.Github.Client.Models.CustomPropertyValue> + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 403 status code + /// When receiving a 404 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task?> GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task> GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "403", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "404", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + }; + var collectionResult = await RequestAdapter.SendCollectionAsync(requestInfo, global::Ayllu.Github.Client.Models.CustomPropertyValue.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + return collectionResult?.AsList(); + } + /// + /// 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. + /// API method documentation + /// + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 403 status code + /// When receiving a 404 status code + /// When receiving a 422 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PatchAsync(global::Ayllu.Github.Client.Repos.Item.Item.Properties.Values.ValuesPatchRequestBody body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task PatchAsync(global::Ayllu.Github.Client.Repos.Item.Item.Properties.Values.ValuesPatchRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPatchRequestInformation(body, requestConfiguration); + var errorMapping = new Dictionary> + { + { "403", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "404", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "422", global::Ayllu.Github.Client.Models.ValidationError.CreateFromDiscriminatorValue }, + }; + await RequestAdapter.SendNoContentAsync(requestInfo, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// Gets all custom property values that are set for a repository.Users with read access to the repository can use this endpoint. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// 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. + /// + /// A + /// The request body + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPatchRequestInformation(global::Ayllu.Github.Client.Repos.Item.Item.Properties.Values.ValuesPatchRequestBody body, Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToPatchRequestInformation(global::Ayllu.Github.Client.Repos.Item.Item.Properties.Values.ValuesPatchRequestBody body, Action> requestConfiguration = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.Repos.Item.Item.Properties.Values.ValuesRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Repos.Item.Item.Properties.Values.ValuesRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class ValuesRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class ValuesRequestBuilderPatchRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Pulls/Comments/CommentsRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Pulls/Comments/CommentsRequestBuilder.cs new file mode 100644 index 0000000..1382685 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Pulls/Comments/CommentsRequestBuilder.cs @@ -0,0 +1,162 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Ayllu.Github.Client.Repos.Item.Item.Pulls.Comments.Item; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.Pulls.Comments +{ + /// + /// Builds and executes requests for operations under \repos\{owner-id}\{repo-id}\pulls\comments + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class CommentsRequestBuilder : BaseRequestBuilder + { + /// Gets an item from the Ayllu.Github.Client.repos.item.item.pulls.comments.item collection + /// The unique identifier of the comment. + /// A + public global::Ayllu.Github.Client.Repos.Item.Item.Pulls.Comments.Item.WithComment_ItemRequestBuilder this[long position] + { + get + { + var urlTplParams = new Dictionary(PathParameters); + urlTplParams.Add("comment_id", position); + return new global::Ayllu.Github.Client.Repos.Item.Item.Pulls.Comments.Item.WithComment_ItemRequestBuilder(urlTplParams, RequestAdapter); + } + } + /// Gets an item from the Ayllu.Github.Client.repos.item.item.pulls.comments.item collection + /// The unique identifier of the comment. + /// A + [Obsolete("This indexer is deprecated and will be removed in the next major version. Use the one with the typed parameter instead.")] + public global::Ayllu.Github.Client.Repos.Item.Item.Pulls.Comments.Item.WithComment_ItemRequestBuilder this[string position] + { + get + { + var urlTplParams = new Dictionary(PathParameters); + if (!string.IsNullOrWhiteSpace(position)) urlTplParams.Add("comment_id", position); + return new global::Ayllu.Github.Client.Repos.Item.Item.Pulls.Comments.Item.WithComment_ItemRequestBuilder(urlTplParams, RequestAdapter); + } + } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public CommentsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/pulls/comments{?direction*,page*,per_page*,since*,sort*}", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public CommentsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/pulls/comments{?direction*,page*,per_page*,since*,sort*}", rawUrl) + { + } + /// + /// 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/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`. + /// API method documentation + /// + /// A List<global::Ayllu.Github.Client.Models.PullRequestReviewComment> + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task?> GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task> GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var collectionResult = await RequestAdapter.SendCollectionAsync(requestInfo, global::Ayllu.Github.Client.Models.PullRequestReviewComment.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false); + return collectionResult?.AsList(); + } + /// + /// 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/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`. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.Repos.Item.Item.Pulls.Comments.CommentsRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Repos.Item.Item.Pulls.Comments.CommentsRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// 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/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`. + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class CommentsRequestBuilderGetQueryParameters + { + /// The direction to sort results. Ignored without `sort` parameter. + [Obsolete("This property is deprecated, use DirectionAsGetDirectionQueryParameterType instead")] +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("direction")] + public string? Direction { get; set; } +#nullable restore +#else + [QueryParameter("direction")] + public string Direction { get; set; } +#endif + /// The direction to sort results. Ignored without `sort` parameter. + [QueryParameter("direction")] + public global::Ayllu.Github.Client.Repos.Item.Item.Pulls.Comments.GetDirectionQueryParameterType? DirectionAsGetDirectionQueryParameterType { get; set; } + /// The page number of the results to fetch. For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." + [QueryParameter("page")] + public int? Page { get; set; } + /// The number of results per page (max 100). For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." + [QueryParameter("per_page")] + public int? PerPage { get; set; } + /// 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`. + [QueryParameter("since")] + public DateTimeOffset? Since { get; set; } + [Obsolete("This property is deprecated, use SortAsGetSortQueryParameterType instead")] +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("sort")] + public string? Sort { get; set; } +#nullable restore +#else + [QueryParameter("sort")] + public string Sort { get; set; } +#endif + [QueryParameter("sort")] + public global::Ayllu.Github.Client.Repos.Item.Item.Pulls.Comments.GetSortQueryParameterType? SortAsGetSortQueryParameterType { get; set; } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class CommentsRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Pulls/Comments/GetDirectionQueryParameterType.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Pulls/Comments/GetDirectionQueryParameterType.cs new file mode 100644 index 0000000..2cbbefe --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Pulls/Comments/GetDirectionQueryParameterType.cs @@ -0,0 +1,20 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.Pulls.Comments +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public enum GetDirectionQueryParameterType + #pragma warning restore CS1591 + { + [EnumMember(Value = "asc")] + #pragma warning disable CS1591 + Asc, + #pragma warning restore CS1591 + [EnumMember(Value = "desc")] + #pragma warning disable CS1591 + Desc, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Pulls/Comments/GetSortQueryParameterType.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Pulls/Comments/GetSortQueryParameterType.cs new file mode 100644 index 0000000..284eee0 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Pulls/Comments/GetSortQueryParameterType.cs @@ -0,0 +1,24 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.Pulls.Comments +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public enum GetSortQueryParameterType + #pragma warning restore CS1591 + { + [EnumMember(Value = "created")] + #pragma warning disable CS1591 + Created, + #pragma warning restore CS1591 + [EnumMember(Value = "updated")] + #pragma warning disable CS1591 + Updated, + #pragma warning restore CS1591 + [EnumMember(Value = "created_at")] + #pragma warning disable CS1591 + Created_at, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Pulls/Comments/Item/Reactions/GetContentQueryParameterType.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Pulls/Comments/Item/Reactions/GetContentQueryParameterType.cs new file mode 100644 index 0000000..d9d8e4c --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Pulls/Comments/Item/Reactions/GetContentQueryParameterType.cs @@ -0,0 +1,44 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.Pulls.Comments.Item.Reactions +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public enum GetContentQueryParameterType + #pragma warning restore CS1591 + { + [EnumMember(Value = "+1")] + #pragma warning disable CS1591 + Plus_1, + #pragma warning restore CS1591 + [EnumMember(Value = "-1")] + #pragma warning disable CS1591 + Minus_1, + #pragma warning restore CS1591 + [EnumMember(Value = "laugh")] + #pragma warning disable CS1591 + Laugh, + #pragma warning restore CS1591 + [EnumMember(Value = "confused")] + #pragma warning disable CS1591 + Confused, + #pragma warning restore CS1591 + [EnumMember(Value = "heart")] + #pragma warning disable CS1591 + Heart, + #pragma warning restore CS1591 + [EnumMember(Value = "hooray")] + #pragma warning disable CS1591 + Hooray, + #pragma warning restore CS1591 + [EnumMember(Value = "rocket")] + #pragma warning disable CS1591 + Rocket, + #pragma warning restore CS1591 + [EnumMember(Value = "eyes")] + #pragma warning disable CS1591 + Eyes, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Pulls/Comments/Item/Reactions/Item/WithReaction_ItemRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Pulls/Comments/Item/Reactions/Item/WithReaction_ItemRequestBuilder.cs new file mode 100644 index 0000000..f40050b --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Pulls/Comments/Item/Reactions/Item/WithReaction_ItemRequestBuilder.cs @@ -0,0 +1,90 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.Pulls.Comments.Item.Reactions.Item +{ + /// + /// Builds and executes requests for operations under \repos\{owner-id}\{repo-id}\pulls\comments\{comment_id}\reactions\{reaction_id} + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithReaction_ItemRequestBuilder : BaseRequestBuilder + { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public WithReaction_ItemRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/pulls/comments/{comment_id}/reactions/{reaction_id}", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public WithReaction_ItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/pulls/comments/{comment_id}/reactions/{reaction_id}", rawUrl) + { + } + /// + /// > [!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/rest/pulls/comments#get-a-review-comment-for-a-pull-request). + /// API method documentation + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task DeleteAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task DeleteAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToDeleteRequestInformation(requestConfiguration); + await RequestAdapter.SendNoContentAsync(requestInfo, default, cancellationToken).ConfigureAwait(false); + } + /// + /// > [!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/rest/pulls/comments#get-a-review-comment-for-a-pull-request). + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToDeleteRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToDeleteRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.DELETE, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.Repos.Item.Item.Pulls.Comments.Item.Reactions.Item.WithReaction_ItemRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Repos.Item.Item.Pulls.Comments.Item.Reactions.Item.WithReaction_ItemRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithReaction_ItemRequestBuilderDeleteRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Pulls/Comments/Item/Reactions/ReactionsPostRequestBody.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Pulls/Comments/Item/Reactions/ReactionsPostRequestBody.cs new file mode 100644 index 0000000..14c2f01 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Pulls/Comments/Item/Reactions/ReactionsPostRequestBody.cs @@ -0,0 +1,59 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.Pulls.Comments.Item.Reactions +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class ReactionsPostRequestBody : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The [reaction type](https://docs.github.com/rest/reactions/reactions#about-reactions) to add to the pull request review comment. + public global::Ayllu.Github.Client.Repos.Item.Item.Pulls.Comments.Item.Reactions.ReactionsPostRequestBody_content? Content { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public ReactionsPostRequestBody() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Repos.Item.Item.Pulls.Comments.Item.Reactions.ReactionsPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Repos.Item.Item.Pulls.Comments.Item.Reactions.ReactionsPostRequestBody(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "content", n => { Content = n.GetEnumValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteEnumValue("content", Content); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Pulls/Comments/Item/Reactions/ReactionsPostRequestBody_content.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Pulls/Comments/Item/Reactions/ReactionsPostRequestBody_content.cs new file mode 100644 index 0000000..80c435f --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Pulls/Comments/Item/Reactions/ReactionsPostRequestBody_content.cs @@ -0,0 +1,43 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.Pulls.Comments.Item.Reactions +{ + /// The [reaction type](https://docs.github.com/rest/reactions/reactions#about-reactions) to add to the pull request review comment. + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public enum ReactionsPostRequestBody_content + { + [EnumMember(Value = "+1")] + #pragma warning disable CS1591 + Plus_1, + #pragma warning restore CS1591 + [EnumMember(Value = "-1")] + #pragma warning disable CS1591 + Minus_1, + #pragma warning restore CS1591 + [EnumMember(Value = "laugh")] + #pragma warning disable CS1591 + Laugh, + #pragma warning restore CS1591 + [EnumMember(Value = "confused")] + #pragma warning disable CS1591 + Confused, + #pragma warning restore CS1591 + [EnumMember(Value = "heart")] + #pragma warning disable CS1591 + Heart, + #pragma warning restore CS1591 + [EnumMember(Value = "hooray")] + #pragma warning disable CS1591 + Hooray, + #pragma warning restore CS1591 + [EnumMember(Value = "rocket")] + #pragma warning disable CS1591 + Rocket, + #pragma warning restore CS1591 + [EnumMember(Value = "eyes")] + #pragma warning disable CS1591 + Eyes, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Pulls/Comments/Item/Reactions/ReactionsRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Pulls/Comments/Item/Reactions/ReactionsRequestBuilder.cs new file mode 100644 index 0000000..a92b4ad --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Pulls/Comments/Item/Reactions/ReactionsRequestBuilder.cs @@ -0,0 +1,208 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Ayllu.Github.Client.Repos.Item.Item.Pulls.Comments.Item.Reactions.Item; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.Pulls.Comments.Item.Reactions +{ + /// + /// Builds and executes requests for operations under \repos\{owner-id}\{repo-id}\pulls\comments\{comment_id}\reactions + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class ReactionsRequestBuilder : BaseRequestBuilder + { + /// Gets an item from the Ayllu.Github.Client.repos.item.item.pulls.comments.item.reactions.item collection + /// The unique identifier of the reaction. + /// A + public global::Ayllu.Github.Client.Repos.Item.Item.Pulls.Comments.Item.Reactions.Item.WithReaction_ItemRequestBuilder this[int position] + { + get + { + var urlTplParams = new Dictionary(PathParameters); + urlTplParams.Add("reaction_id", position); + return new global::Ayllu.Github.Client.Repos.Item.Item.Pulls.Comments.Item.Reactions.Item.WithReaction_ItemRequestBuilder(urlTplParams, RequestAdapter); + } + } + /// Gets an item from the Ayllu.Github.Client.repos.item.item.pulls.comments.item.reactions.item collection + /// The unique identifier of the reaction. + /// A + [Obsolete("This indexer is deprecated and will be removed in the next major version. Use the one with the typed parameter instead.")] + public global::Ayllu.Github.Client.Repos.Item.Item.Pulls.Comments.Item.Reactions.Item.WithReaction_ItemRequestBuilder this[string position] + { + get + { + var urlTplParams = new Dictionary(PathParameters); + if (!string.IsNullOrWhiteSpace(position)) urlTplParams.Add("reaction_id", position); + return new global::Ayllu.Github.Client.Repos.Item.Item.Pulls.Comments.Item.Reactions.Item.WithReaction_ItemRequestBuilder(urlTplParams, RequestAdapter); + } + } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public ReactionsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/pulls/comments/{comment_id}/reactions{?content*,page*,per_page*}", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public ReactionsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/pulls/comments/{comment_id}/reactions{?content*,page*,per_page*}", rawUrl) + { + } + /// + /// List the reactions to a [pull request review comment](https://docs.github.com/rest/pulls/comments#get-a-review-comment-for-a-pull-request). + /// API method documentation + /// + /// A List<global::Ayllu.Github.Client.Models.Reaction> + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 404 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task?> GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task> GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "404", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + }; + var collectionResult = await RequestAdapter.SendCollectionAsync(requestInfo, global::Ayllu.Github.Client.Models.Reaction.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + return collectionResult?.AsList(); + } + /// + /// Create a reaction to a [pull request review comment](https://docs.github.com/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. + /// API method documentation + /// + /// A + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 422 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PostAsync(global::Ayllu.Github.Client.Repos.Item.Item.Pulls.Comments.Item.Reactions.ReactionsPostRequestBody body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task PostAsync(global::Ayllu.Github.Client.Repos.Item.Item.Pulls.Comments.Item.Reactions.ReactionsPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPostRequestInformation(body, requestConfiguration); + var errorMapping = new Dictionary> + { + { "422", global::Ayllu.Github.Client.Models.ValidationError.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Models.Reaction.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// List the reactions to a [pull request review comment](https://docs.github.com/rest/pulls/comments#get-a-review-comment-for-a-pull-request). + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Create a reaction to a [pull request review comment](https://docs.github.com/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. + /// + /// A + /// The request body + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPostRequestInformation(global::Ayllu.Github.Client.Repos.Item.Item.Pulls.Comments.Item.Reactions.ReactionsPostRequestBody body, Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToPostRequestInformation(global::Ayllu.Github.Client.Repos.Item.Item.Pulls.Comments.Item.Reactions.ReactionsPostRequestBody body, Action> requestConfiguration = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.Repos.Item.Item.Pulls.Comments.Item.Reactions.ReactionsRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Repos.Item.Item.Pulls.Comments.Item.Reactions.ReactionsRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// List the reactions to a [pull request review comment](https://docs.github.com/rest/pulls/comments#get-a-review-comment-for-a-pull-request). + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class ReactionsRequestBuilderGetQueryParameters + { + /// Returns a single [reaction type](https://docs.github.com/rest/reactions/reactions#about-reactions). Omit this parameter to list all reactions to a pull request review comment. + [Obsolete("This property is deprecated, use ContentAsGetContentQueryParameterType instead")] +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("content")] + public string? Content { get; set; } +#nullable restore +#else + [QueryParameter("content")] + public string Content { get; set; } +#endif + /// Returns a single [reaction type](https://docs.github.com/rest/reactions/reactions#about-reactions). Omit this parameter to list all reactions to a pull request review comment. + [QueryParameter("content")] + public global::Ayllu.Github.Client.Repos.Item.Item.Pulls.Comments.Item.Reactions.GetContentQueryParameterType? ContentAsGetContentQueryParameterType { get; set; } + /// The page number of the results to fetch. For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." + [QueryParameter("page")] + public int? Page { get; set; } + /// The number of results per page (max 100). For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." + [QueryParameter("per_page")] + public int? PerPage { get; set; } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class ReactionsRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class ReactionsRequestBuilderPostRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Pulls/Comments/Item/WithComment_ItemRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Pulls/Comments/Item/WithComment_ItemRequestBuilder.cs new file mode 100644 index 0000000..9ec81df --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Pulls/Comments/Item/WithComment_ItemRequestBuilder.cs @@ -0,0 +1,205 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Ayllu.Github.Client.Repos.Item.Item.Pulls.Comments.Item.Reactions; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.Pulls.Comments.Item +{ + /// + /// Builds and executes requests for operations under \repos\{owner-id}\{repo-id}\pulls\comments\{comment_id} + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithComment_ItemRequestBuilder : BaseRequestBuilder + { + /// The reactions property + public global::Ayllu.Github.Client.Repos.Item.Item.Pulls.Comments.Item.Reactions.ReactionsRequestBuilder Reactions + { + get => new global::Ayllu.Github.Client.Repos.Item.Item.Pulls.Comments.Item.Reactions.ReactionsRequestBuilder(PathParameters, RequestAdapter); + } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public WithComment_ItemRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/pulls/comments/{comment_id}", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public WithComment_ItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/pulls/comments/{comment_id}", rawUrl) + { + } + /// + /// Deletes a review comment. + /// API method documentation + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 404 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task DeleteAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task DeleteAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToDeleteRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "404", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + }; + await RequestAdapter.SendNoContentAsync(requestInfo, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// 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/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`. + /// API method documentation + /// + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 404 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "404", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Models.PullRequestReviewComment.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// 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/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`. + /// API method documentation + /// + /// A + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PatchAsync(global::Ayllu.Github.Client.Repos.Item.Item.Pulls.Comments.Item.WithComment_PatchRequestBody body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task PatchAsync(global::Ayllu.Github.Client.Repos.Item.Item.Pulls.Comments.Item.WithComment_PatchRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPatchRequestInformation(body, requestConfiguration); + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Models.PullRequestReviewComment.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false); + } + /// + /// Deletes a review comment. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToDeleteRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToDeleteRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.DELETE, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// 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/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`. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// 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/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`. + /// + /// A + /// The request body + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPatchRequestInformation(global::Ayllu.Github.Client.Repos.Item.Item.Pulls.Comments.Item.WithComment_PatchRequestBody body, Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToPatchRequestInformation(global::Ayllu.Github.Client.Repos.Item.Item.Pulls.Comments.Item.WithComment_PatchRequestBody body, Action> requestConfiguration = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.Repos.Item.Item.Pulls.Comments.Item.WithComment_ItemRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Repos.Item.Item.Pulls.Comments.Item.WithComment_ItemRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithComment_ItemRequestBuilderDeleteRequestConfiguration : RequestConfiguration + { + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithComment_ItemRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithComment_ItemRequestBuilderPatchRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Pulls/Comments/Item/WithComment_PatchRequestBody.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Pulls/Comments/Item/WithComment_PatchRequestBody.cs new file mode 100644 index 0000000..9b6dc45 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Pulls/Comments/Item/WithComment_PatchRequestBody.cs @@ -0,0 +1,65 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.Pulls.Comments.Item +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class WithComment_PatchRequestBody : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The text of the reply to the review comment. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Body { get; set; } +#nullable restore +#else + public string Body { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public WithComment_PatchRequestBody() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Repos.Item.Item.Pulls.Comments.Item.WithComment_PatchRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Repos.Item.Item.Pulls.Comments.Item.WithComment_PatchRequestBody(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "body", n => { Body = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("body", Body); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Pulls/GetDirectionQueryParameterType.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Pulls/GetDirectionQueryParameterType.cs new file mode 100644 index 0000000..6714fae --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Pulls/GetDirectionQueryParameterType.cs @@ -0,0 +1,20 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.Pulls +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public enum GetDirectionQueryParameterType + #pragma warning restore CS1591 + { + [EnumMember(Value = "asc")] + #pragma warning disable CS1591 + Asc, + #pragma warning restore CS1591 + [EnumMember(Value = "desc")] + #pragma warning disable CS1591 + Desc, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Pulls/GetSortQueryParameterType.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Pulls/GetSortQueryParameterType.cs new file mode 100644 index 0000000..0075988 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Pulls/GetSortQueryParameterType.cs @@ -0,0 +1,28 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.Pulls +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public enum GetSortQueryParameterType + #pragma warning restore CS1591 + { + [EnumMember(Value = "created")] + #pragma warning disable CS1591 + Created, + #pragma warning restore CS1591 + [EnumMember(Value = "updated")] + #pragma warning disable CS1591 + Updated, + #pragma warning restore CS1591 + [EnumMember(Value = "popularity")] + #pragma warning disable CS1591 + Popularity, + #pragma warning restore CS1591 + [EnumMember(Value = "long-running")] + #pragma warning disable CS1591 + LongRunning, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Pulls/GetStateQueryParameterType.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Pulls/GetStateQueryParameterType.cs new file mode 100644 index 0000000..57fbcde --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Pulls/GetStateQueryParameterType.cs @@ -0,0 +1,24 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.Pulls +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public enum GetStateQueryParameterType + #pragma warning restore CS1591 + { + [EnumMember(Value = "open")] + #pragma warning disable CS1591 + Open, + #pragma warning restore CS1591 + [EnumMember(Value = "closed")] + #pragma warning disable CS1591 + Closed, + #pragma warning restore CS1591 + [EnumMember(Value = "all")] + #pragma warning disable CS1591 + All, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Pulls/Item/Codespaces/CodespacesPostRequestBody.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Pulls/Item/Codespaces/CodespacesPostRequestBody.cs new file mode 100644 index 0000000..d8bd9a4 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Pulls/Item/Codespaces/CodespacesPostRequestBody.cs @@ -0,0 +1,131 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.Pulls.Item.Codespaces +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class CodespacesPostRequestBody : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// IP for location auto-detection when proxying a request +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? ClientIp { get; set; } +#nullable restore +#else + public string ClientIp { get; set; } +#endif + /// Path to devcontainer.json config to use for this codespace +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? DevcontainerPath { get; set; } +#nullable restore +#else + public string DevcontainerPath { get; set; } +#endif + /// Display name for this codespace +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? DisplayName { get; set; } +#nullable restore +#else + public string DisplayName { get; set; } +#endif + /// The geographic area for this codespace. If not specified, the value is assigned by IP. This property replaces `location`, which is closing down. + public global::Ayllu.Github.Client.Repos.Item.Item.Pulls.Item.Codespaces.CodespacesPostRequestBody_geo? Geo { get; set; } + /// Time in minutes before codespace stops from inactivity + public int? IdleTimeoutMinutes { get; set; } + /// The requested location for a new codespace. Best efforts are made to respect this upon creation. Assigned by IP if not provided. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Location { get; set; } +#nullable restore +#else + public string Location { get; set; } +#endif + /// Machine type to use for this codespace +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Machine { get; set; } +#nullable restore +#else + public string Machine { get; set; } +#endif + /// Whether to authorize requested permissions from devcontainer.json + public bool? MultiRepoPermissionsOptOut { get; set; } + /// Duration in minutes after codespace has gone idle in which it will be deleted. Must be integer minutes between 0 and 43200 (30 days). + public int? RetentionPeriodMinutes { get; set; } + /// Working directory for this codespace +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? WorkingDirectory { get; set; } +#nullable restore +#else + public string WorkingDirectory { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public CodespacesPostRequestBody() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Repos.Item.Item.Pulls.Item.Codespaces.CodespacesPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Repos.Item.Item.Pulls.Item.Codespaces.CodespacesPostRequestBody(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "client_ip", n => { ClientIp = n.GetStringValue(); } }, + { "devcontainer_path", n => { DevcontainerPath = n.GetStringValue(); } }, + { "display_name", n => { DisplayName = n.GetStringValue(); } }, + { "geo", n => { Geo = n.GetEnumValue(); } }, + { "idle_timeout_minutes", n => { IdleTimeoutMinutes = n.GetIntValue(); } }, + { "location", n => { Location = n.GetStringValue(); } }, + { "machine", n => { Machine = n.GetStringValue(); } }, + { "multi_repo_permissions_opt_out", n => { MultiRepoPermissionsOptOut = n.GetBoolValue(); } }, + { "retention_period_minutes", n => { RetentionPeriodMinutes = n.GetIntValue(); } }, + { "working_directory", n => { WorkingDirectory = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("client_ip", ClientIp); + writer.WriteStringValue("devcontainer_path", DevcontainerPath); + writer.WriteStringValue("display_name", DisplayName); + writer.WriteEnumValue("geo", Geo); + writer.WriteIntValue("idle_timeout_minutes", IdleTimeoutMinutes); + writer.WriteStringValue("location", Location); + writer.WriteStringValue("machine", Machine); + writer.WriteBoolValue("multi_repo_permissions_opt_out", MultiRepoPermissionsOptOut); + writer.WriteIntValue("retention_period_minutes", RetentionPeriodMinutes); + writer.WriteStringValue("working_directory", WorkingDirectory); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Pulls/Item/Codespaces/CodespacesPostRequestBody_geo.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Pulls/Item/Codespaces/CodespacesPostRequestBody_geo.cs new file mode 100644 index 0000000..c64cf0c --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Pulls/Item/Codespaces/CodespacesPostRequestBody_geo.cs @@ -0,0 +1,27 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.Pulls.Item.Codespaces +{ + /// The geographic area for this codespace. If not specified, the value is assigned by IP. This property replaces `location`, which is closing down. + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public enum CodespacesPostRequestBody_geo + { + [EnumMember(Value = "EuropeWest")] + #pragma warning disable CS1591 + EuropeWest, + #pragma warning restore CS1591 + [EnumMember(Value = "SoutheastAsia")] + #pragma warning disable CS1591 + SoutheastAsia, + #pragma warning restore CS1591 + [EnumMember(Value = "UsEast")] + #pragma warning disable CS1591 + UsEast, + #pragma warning restore CS1591 + [EnumMember(Value = "UsWest")] + #pragma warning disable CS1591 + UsWest, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Pulls/Item/Codespaces/CodespacesRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Pulls/Item/Codespaces/CodespacesRequestBuilder.cs new file mode 100644 index 0000000..d771882 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Pulls/Item/Codespaces/CodespacesRequestBuilder.cs @@ -0,0 +1,109 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.Pulls.Item.Codespaces +{ + /// + /// Builds and executes requests for operations under \repos\{owner-id}\{repo-id}\pulls\{pull_number}\codespaces + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class CodespacesRequestBuilder : BaseRequestBuilder + { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public CodespacesRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/pulls/{pull_number}/codespaces", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public CodespacesRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/pulls/{pull_number}/codespaces", rawUrl) + { + } + /// + /// 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. + /// API method documentation + /// + /// A + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 401 status code + /// When receiving a 403 status code + /// When receiving a 404 status code + /// When receiving a 503 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PostAsync(global::Ayllu.Github.Client.Repos.Item.Item.Pulls.Item.Codespaces.CodespacesPostRequestBody body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task PostAsync(global::Ayllu.Github.Client.Repos.Item.Item.Pulls.Item.Codespaces.CodespacesPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPostRequestInformation(body, requestConfiguration); + var errorMapping = new Dictionary> + { + { "401", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "403", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "404", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "503", global::Ayllu.Github.Client.Models.Codespace503Error.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Models.Codespace.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// 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. + /// + /// A + /// The request body + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPostRequestInformation(global::Ayllu.Github.Client.Repos.Item.Item.Pulls.Item.Codespaces.CodespacesPostRequestBody body, Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToPostRequestInformation(global::Ayllu.Github.Client.Repos.Item.Item.Pulls.Item.Codespaces.CodespacesPostRequestBody body, Action> requestConfiguration = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.Repos.Item.Item.Pulls.Item.Codespaces.CodespacesRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Repos.Item.Item.Pulls.Item.Codespaces.CodespacesRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class CodespacesRequestBuilderPostRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Pulls/Item/Comments/CommentsPostRequestBody.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Pulls/Item/Comments/CommentsPostRequestBody.cs new file mode 100644 index 0000000..699bd07 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Pulls/Item/Comments/CommentsPostRequestBody.cs @@ -0,0 +1,114 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.Pulls.Item.Comments +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class CommentsPostRequestBody : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The text of the review comment. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Body { get; set; } +#nullable restore +#else + public string Body { get; set; } +#endif + /// 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`. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? CommitId { get; set; } +#nullable restore +#else + public string CommitId { get; set; } +#endif + /// 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. + public int? InReplyTo { get; set; } + /// **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. + public int? Line { get; set; } + /// The relative path to the file that necessitates a comment. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Path { get; set; } +#nullable restore +#else + public string Path { get; set; } +#endif + /// **This parameter is closing down. 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. + [Obsolete("")] + public int? Position { get; set; } + /// In a split diff view, the side of the diff that the pull request's changes appear on. Can be `LEFT` or `RIGHT`. Use `LEFT` for deletions that appear in red. Use `RIGHT` for additions that appear in green or unchanged lines that appear in white and are shown for context. For a multi-line comment, side represents whether the last line of the comment range is a deletion or addition. For more information, see "[Diff view options](https://docs.github.com/articles/about-comparing-branches-in-pull-requests#diff-view-options)" in the GitHub Help documentation. + public global::Ayllu.Github.Client.Repos.Item.Item.Pulls.Item.Comments.CommentsPostRequestBody_side? Side { get; set; } + /// **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/articles/commenting-on-a-pull-request#adding-line-comments-to-a-pull-request)" in the GitHub Help documentation. + public int? StartLine { get; set; } + /// **Required when using multi-line comments unless using `in_reply_to`**. The `start_side` is the starting side of the diff that the comment applies to. Can be `LEFT` or `RIGHT`. To learn more about multi-line comments, see "[Commenting on a pull request](https://docs.github.com/articles/commenting-on-a-pull-request#adding-line-comments-to-a-pull-request)" in the GitHub Help documentation. See `side` in this table for additional context. + public global::Ayllu.Github.Client.Repos.Item.Item.Pulls.Item.Comments.CommentsPostRequestBody_start_side? StartSide { get; set; } + /// The level at which the comment is targeted. + public global::Ayllu.Github.Client.Repos.Item.Item.Pulls.Item.Comments.CommentsPostRequestBody_subject_type? SubjectType { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public CommentsPostRequestBody() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Repos.Item.Item.Pulls.Item.Comments.CommentsPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Repos.Item.Item.Pulls.Item.Comments.CommentsPostRequestBody(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "body", n => { Body = n.GetStringValue(); } }, + { "commit_id", n => { CommitId = n.GetStringValue(); } }, + { "in_reply_to", n => { InReplyTo = n.GetIntValue(); } }, + { "line", n => { Line = n.GetIntValue(); } }, + { "path", n => { Path = n.GetStringValue(); } }, + { "position", n => { Position = n.GetIntValue(); } }, + { "side", n => { Side = n.GetEnumValue(); } }, + { "start_line", n => { StartLine = n.GetIntValue(); } }, + { "start_side", n => { StartSide = n.GetEnumValue(); } }, + { "subject_type", n => { SubjectType = n.GetEnumValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("body", Body); + writer.WriteStringValue("commit_id", CommitId); + writer.WriteIntValue("in_reply_to", InReplyTo); + writer.WriteIntValue("line", Line); + writer.WriteStringValue("path", Path); + writer.WriteIntValue("position", Position); + writer.WriteEnumValue("side", Side); + writer.WriteIntValue("start_line", StartLine); + writer.WriteEnumValue("start_side", StartSide); + writer.WriteEnumValue("subject_type", SubjectType); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Pulls/Item/Comments/CommentsPostRequestBody_side.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Pulls/Item/Comments/CommentsPostRequestBody_side.cs new file mode 100644 index 0000000..895932b --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Pulls/Item/Comments/CommentsPostRequestBody_side.cs @@ -0,0 +1,19 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.Pulls.Item.Comments +{ + /// In a split diff view, the side of the diff that the pull request's changes appear on. Can be `LEFT` or `RIGHT`. Use `LEFT` for deletions that appear in red. Use `RIGHT` for additions that appear in green or unchanged lines that appear in white and are shown for context. For a multi-line comment, side represents whether the last line of the comment range is a deletion or addition. For more information, see "[Diff view options](https://docs.github.com/articles/about-comparing-branches-in-pull-requests#diff-view-options)" in the GitHub Help documentation. + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public enum CommentsPostRequestBody_side + { + [EnumMember(Value = "LEFT")] + #pragma warning disable CS1591 + LEFT, + #pragma warning restore CS1591 + [EnumMember(Value = "RIGHT")] + #pragma warning disable CS1591 + RIGHT, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Pulls/Item/Comments/CommentsPostRequestBody_start_side.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Pulls/Item/Comments/CommentsPostRequestBody_start_side.cs new file mode 100644 index 0000000..822f11e --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Pulls/Item/Comments/CommentsPostRequestBody_start_side.cs @@ -0,0 +1,23 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.Pulls.Item.Comments +{ + /// **Required when using multi-line comments unless using `in_reply_to`**. The `start_side` is the starting side of the diff that the comment applies to. Can be `LEFT` or `RIGHT`. To learn more about multi-line comments, see "[Commenting on a pull request](https://docs.github.com/articles/commenting-on-a-pull-request#adding-line-comments-to-a-pull-request)" in the GitHub Help documentation. See `side` in this table for additional context. + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public enum CommentsPostRequestBody_start_side + { + [EnumMember(Value = "LEFT")] + #pragma warning disable CS1591 + LEFT, + #pragma warning restore CS1591 + [EnumMember(Value = "RIGHT")] + #pragma warning disable CS1591 + RIGHT, + #pragma warning restore CS1591 + [EnumMember(Value = "side")] + #pragma warning disable CS1591 + Side, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Pulls/Item/Comments/CommentsPostRequestBody_subject_type.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Pulls/Item/Comments/CommentsPostRequestBody_subject_type.cs new file mode 100644 index 0000000..8d66ee1 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Pulls/Item/Comments/CommentsPostRequestBody_subject_type.cs @@ -0,0 +1,19 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.Pulls.Item.Comments +{ + /// The level at which the comment is targeted. + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public enum CommentsPostRequestBody_subject_type + { + [EnumMember(Value = "line")] + #pragma warning disable CS1591 + Line, + #pragma warning restore CS1591 + [EnumMember(Value = "file")] + #pragma warning disable CS1591 + File, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Pulls/Item/Comments/CommentsRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Pulls/Item/Comments/CommentsRequestBuilder.cs new file mode 100644 index 0000000..9b8c764 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Pulls/Item/Comments/CommentsRequestBuilder.cs @@ -0,0 +1,222 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Ayllu.Github.Client.Repos.Item.Item.Pulls.Item.Comments.Item; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.Pulls.Item.Comments +{ + /// + /// Builds and executes requests for operations under \repos\{owner-id}\{repo-id}\pulls\{pull_number}\comments + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class CommentsRequestBuilder : BaseRequestBuilder + { + /// Gets an item from the Ayllu.Github.Client.repos.item.item.pulls.item.comments.item collection + /// The unique identifier of the comment. + /// A + public global::Ayllu.Github.Client.Repos.Item.Item.Pulls.Item.Comments.Item.WithComment_ItemRequestBuilder this[long position] + { + get + { + var urlTplParams = new Dictionary(PathParameters); + urlTplParams.Add("comment_id", position); + return new global::Ayllu.Github.Client.Repos.Item.Item.Pulls.Item.Comments.Item.WithComment_ItemRequestBuilder(urlTplParams, RequestAdapter); + } + } + /// Gets an item from the Ayllu.Github.Client.repos.item.item.pulls.item.comments.item collection + /// The unique identifier of the comment. + /// A + [Obsolete("This indexer is deprecated and will be removed in the next major version. Use the one with the typed parameter instead.")] + public global::Ayllu.Github.Client.Repos.Item.Item.Pulls.Item.Comments.Item.WithComment_ItemRequestBuilder this[string position] + { + get + { + var urlTplParams = new Dictionary(PathParameters); + if (!string.IsNullOrWhiteSpace(position)) urlTplParams.Add("comment_id", position); + return new global::Ayllu.Github.Client.Repos.Item.Item.Pulls.Item.Comments.Item.WithComment_ItemRequestBuilder(urlTplParams, RequestAdapter); + } + } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public CommentsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/pulls/{pull_number}/comments{?direction*,page*,per_page*,since*,sort*}", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public CommentsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/pulls/{pull_number}/comments{?direction*,page*,per_page*,since*,sort*}", rawUrl) + { + } + /// + /// 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/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`. + /// API method documentation + /// + /// A List<global::Ayllu.Github.Client.Models.PullRequestReviewComment> + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task?> GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task> GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var collectionResult = await RequestAdapter.SendCollectionAsync(requestInfo, global::Ayllu.Github.Client.Models.PullRequestReviewComment.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false); + return collectionResult?.AsList(); + } + /// + /// Creates a review comment on the diff of a specified pull request. To add a regular comment to a pull request timeline, see "[Create an issue comment](https://docs.github.com/rest/issues/comments#create-an-issue-comment)."If your comment applies to more than one line in the pull request diff, you should use the parameters `line`, `side`, and optionally `start_line` and `start_side` in your request.The `position` parameter is closing down. If you use `position`, the `line`, `side`, `start_line`, and `start_side` parameters are not required.This endpoint triggers [notifications](https://docs.github.com/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. For more information, see "[Rate limits for the API](https://docs.github.com/rest/using-the-rest-api/rate-limits-for-the-rest-api#about-secondary-rate-limits)"and "[Best practices for using the REST API](https://docs.github.com/rest/guides/best-practices-for-using-the-rest-api)."This endpoint supports the following custom media types. For more information, see "[Media types](https://docs.github.com/rest/using-the-rest-api/getting-started-with-the-rest-api#media-types)."- **`application/vnd.github-commitcomment.raw+json`**: Returns the raw markdown body. Response will include `body`. This is the default if you do not pass any specific media type.- **`application/vnd.github-commitcomment.text+json`**: Returns a text only representation of the markdown body. Response will include `body_text`.- **`application/vnd.github-commitcomment.html+json`**: Returns HTML rendered from the body's markdown. Response will include `body_html`.- **`application/vnd.github-commitcomment.full+json`**: Returns raw, text, and HTML representations. Response will include `body`, `body_text`, and `body_html`. + /// API method documentation + /// + /// A + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 403 status code + /// When receiving a 422 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PostAsync(global::Ayllu.Github.Client.Repos.Item.Item.Pulls.Item.Comments.CommentsPostRequestBody body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task PostAsync(global::Ayllu.Github.Client.Repos.Item.Item.Pulls.Item.Comments.CommentsPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPostRequestInformation(body, requestConfiguration); + var errorMapping = new Dictionary> + { + { "403", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "422", global::Ayllu.Github.Client.Models.ValidationError.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Models.PullRequestReviewComment.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// 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/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`. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Creates a review comment on the diff of a specified pull request. To add a regular comment to a pull request timeline, see "[Create an issue comment](https://docs.github.com/rest/issues/comments#create-an-issue-comment)."If your comment applies to more than one line in the pull request diff, you should use the parameters `line`, `side`, and optionally `start_line` and `start_side` in your request.The `position` parameter is closing down. If you use `position`, the `line`, `side`, `start_line`, and `start_side` parameters are not required.This endpoint triggers [notifications](https://docs.github.com/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. For more information, see "[Rate limits for the API](https://docs.github.com/rest/using-the-rest-api/rate-limits-for-the-rest-api#about-secondary-rate-limits)"and "[Best practices for using the REST API](https://docs.github.com/rest/guides/best-practices-for-using-the-rest-api)."This endpoint supports the following custom media types. For more information, see "[Media types](https://docs.github.com/rest/using-the-rest-api/getting-started-with-the-rest-api#media-types)."- **`application/vnd.github-commitcomment.raw+json`**: Returns the raw markdown body. Response will include `body`. This is the default if you do not pass any specific media type.- **`application/vnd.github-commitcomment.text+json`**: Returns a text only representation of the markdown body. Response will include `body_text`.- **`application/vnd.github-commitcomment.html+json`**: Returns HTML rendered from the body's markdown. Response will include `body_html`.- **`application/vnd.github-commitcomment.full+json`**: Returns raw, text, and HTML representations. Response will include `body`, `body_text`, and `body_html`. + /// + /// A + /// The request body + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPostRequestInformation(global::Ayllu.Github.Client.Repos.Item.Item.Pulls.Item.Comments.CommentsPostRequestBody body, Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToPostRequestInformation(global::Ayllu.Github.Client.Repos.Item.Item.Pulls.Item.Comments.CommentsPostRequestBody body, Action> requestConfiguration = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.Repos.Item.Item.Pulls.Item.Comments.CommentsRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Repos.Item.Item.Pulls.Item.Comments.CommentsRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// 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/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`. + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class CommentsRequestBuilderGetQueryParameters + { + /// The direction to sort results. Ignored without `sort` parameter. + [Obsolete("This property is deprecated, use DirectionAsGetDirectionQueryParameterType instead")] +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("direction")] + public string? Direction { get; set; } +#nullable restore +#else + [QueryParameter("direction")] + public string Direction { get; set; } +#endif + /// The direction to sort results. Ignored without `sort` parameter. + [QueryParameter("direction")] + public global::Ayllu.Github.Client.Repos.Item.Item.Pulls.Item.Comments.GetDirectionQueryParameterType? DirectionAsGetDirectionQueryParameterType { get; set; } + /// The page number of the results to fetch. For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." + [QueryParameter("page")] + public int? Page { get; set; } + /// The number of results per page (max 100). For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." + [QueryParameter("per_page")] + public int? PerPage { get; set; } + /// 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`. + [QueryParameter("since")] + public DateTimeOffset? Since { get; set; } + /// The property to sort the results by. + [Obsolete("This property is deprecated, use SortAsGetSortQueryParameterType instead")] +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("sort")] + public string? Sort { get; set; } +#nullable restore +#else + [QueryParameter("sort")] + public string Sort { get; set; } +#endif + /// The property to sort the results by. + [QueryParameter("sort")] + public global::Ayllu.Github.Client.Repos.Item.Item.Pulls.Item.Comments.GetSortQueryParameterType? SortAsGetSortQueryParameterType { get; set; } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class CommentsRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class CommentsRequestBuilderPostRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Pulls/Item/Comments/GetDirectionQueryParameterType.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Pulls/Item/Comments/GetDirectionQueryParameterType.cs new file mode 100644 index 0000000..71c7e38 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Pulls/Item/Comments/GetDirectionQueryParameterType.cs @@ -0,0 +1,20 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.Pulls.Item.Comments +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public enum GetDirectionQueryParameterType + #pragma warning restore CS1591 + { + [EnumMember(Value = "asc")] + #pragma warning disable CS1591 + Asc, + #pragma warning restore CS1591 + [EnumMember(Value = "desc")] + #pragma warning disable CS1591 + Desc, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Pulls/Item/Comments/GetSortQueryParameterType.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Pulls/Item/Comments/GetSortQueryParameterType.cs new file mode 100644 index 0000000..627b8a3 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Pulls/Item/Comments/GetSortQueryParameterType.cs @@ -0,0 +1,20 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.Pulls.Item.Comments +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public enum GetSortQueryParameterType + #pragma warning restore CS1591 + { + [EnumMember(Value = "created")] + #pragma warning disable CS1591 + Created, + #pragma warning restore CS1591 + [EnumMember(Value = "updated")] + #pragma warning disable CS1591 + Updated, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Pulls/Item/Comments/Item/Replies/RepliesPostRequestBody.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Pulls/Item/Comments/Item/Replies/RepliesPostRequestBody.cs new file mode 100644 index 0000000..be50d4b --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Pulls/Item/Comments/Item/Replies/RepliesPostRequestBody.cs @@ -0,0 +1,65 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.Pulls.Item.Comments.Item.Replies +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class RepliesPostRequestBody : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The text of the review comment. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Body { get; set; } +#nullable restore +#else + public string Body { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public RepliesPostRequestBody() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Repos.Item.Item.Pulls.Item.Comments.Item.Replies.RepliesPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Repos.Item.Item.Pulls.Item.Comments.Item.Replies.RepliesPostRequestBody(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "body", n => { Body = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("body", Body); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Pulls/Item/Comments/Item/Replies/RepliesRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Pulls/Item/Comments/Item/Replies/RepliesRequestBuilder.cs new file mode 100644 index 0000000..0e6ee0c --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Pulls/Item/Comments/Item/Replies/RepliesRequestBuilder.cs @@ -0,0 +1,103 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.Pulls.Item.Comments.Item.Replies +{ + /// + /// Builds and executes requests for operations under \repos\{owner-id}\{repo-id}\pulls\{pull_number}\comments\{comment_id}\replies + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class RepliesRequestBuilder : BaseRequestBuilder + { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public RepliesRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/pulls/{pull_number}/comments/{comment_id}/replies", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public RepliesRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/pulls/{pull_number}/comments/{comment_id}/replies", rawUrl) + { + } + /// + /// Creates a reply to a review comment for a pull request. For the `comment_id`, provide the ID of the review comment you are replying to. This must be the ID of a _top-level review comment_, not a reply to that comment. Replies to replies are not supported.This endpoint triggers [notifications](https://docs.github.com/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. For more information, see "[Rate limits for the API](https://docs.github.com/rest/using-the-rest-api/rate-limits-for-the-rest-api#about-secondary-rate-limits)"and "[Best practices for using the REST API](https://docs.github.com/rest/guides/best-practices-for-using-the-rest-api)."This endpoint supports the following custom media types. For more information, see "[Media types](https://docs.github.com/rest/using-the-rest-api/getting-started-with-the-rest-api#media-types)."- **`application/vnd.github-commitcomment.raw+json`**: Returns the raw markdown body. Response will include `body`. This is the default if you do not pass any specific media type.- **`application/vnd.github-commitcomment.text+json`**: Returns a text only representation of the markdown body. Response will include `body_text`.- **`application/vnd.github-commitcomment.html+json`**: Returns HTML rendered from the body's markdown. Response will include `body_html`.- **`application/vnd.github-commitcomment.full+json`**: Returns raw, text, and HTML representations. Response will include `body`, `body_text`, and `body_html`. + /// API method documentation + /// + /// A + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 404 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PostAsync(global::Ayllu.Github.Client.Repos.Item.Item.Pulls.Item.Comments.Item.Replies.RepliesPostRequestBody body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task PostAsync(global::Ayllu.Github.Client.Repos.Item.Item.Pulls.Item.Comments.Item.Replies.RepliesPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPostRequestInformation(body, requestConfiguration); + var errorMapping = new Dictionary> + { + { "404", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Models.PullRequestReviewComment.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// Creates a reply to a review comment for a pull request. For the `comment_id`, provide the ID of the review comment you are replying to. This must be the ID of a _top-level review comment_, not a reply to that comment. Replies to replies are not supported.This endpoint triggers [notifications](https://docs.github.com/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. For more information, see "[Rate limits for the API](https://docs.github.com/rest/using-the-rest-api/rate-limits-for-the-rest-api#about-secondary-rate-limits)"and "[Best practices for using the REST API](https://docs.github.com/rest/guides/best-practices-for-using-the-rest-api)."This endpoint supports the following custom media types. For more information, see "[Media types](https://docs.github.com/rest/using-the-rest-api/getting-started-with-the-rest-api#media-types)."- **`application/vnd.github-commitcomment.raw+json`**: Returns the raw markdown body. Response will include `body`. This is the default if you do not pass any specific media type.- **`application/vnd.github-commitcomment.text+json`**: Returns a text only representation of the markdown body. Response will include `body_text`.- **`application/vnd.github-commitcomment.html+json`**: Returns HTML rendered from the body's markdown. Response will include `body_html`.- **`application/vnd.github-commitcomment.full+json`**: Returns raw, text, and HTML representations. Response will include `body`, `body_text`, and `body_html`. + /// + /// A + /// The request body + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPostRequestInformation(global::Ayllu.Github.Client.Repos.Item.Item.Pulls.Item.Comments.Item.Replies.RepliesPostRequestBody body, Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToPostRequestInformation(global::Ayllu.Github.Client.Repos.Item.Item.Pulls.Item.Comments.Item.Replies.RepliesPostRequestBody body, Action> requestConfiguration = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.Repos.Item.Item.Pulls.Item.Comments.Item.Replies.RepliesRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Repos.Item.Item.Pulls.Item.Comments.Item.Replies.RepliesRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class RepliesRequestBuilderPostRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Pulls/Item/Comments/Item/WithComment_ItemRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Pulls/Item/Comments/Item/WithComment_ItemRequestBuilder.cs new file mode 100644 index 0000000..a23f5c4 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Pulls/Item/Comments/Item/WithComment_ItemRequestBuilder.cs @@ -0,0 +1,41 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Repos.Item.Item.Pulls.Item.Comments.Item.Replies; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.Pulls.Item.Comments.Item +{ + /// + /// Builds and executes requests for operations under \repos\{owner-id}\{repo-id}\pulls\{pull_number}\comments\{comment_id} + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithComment_ItemRequestBuilder : BaseRequestBuilder + { + /// The replies property + public global::Ayllu.Github.Client.Repos.Item.Item.Pulls.Item.Comments.Item.Replies.RepliesRequestBuilder Replies + { + get => new global::Ayllu.Github.Client.Repos.Item.Item.Pulls.Item.Comments.Item.Replies.RepliesRequestBuilder(PathParameters, RequestAdapter); + } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public WithComment_ItemRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/pulls/{pull_number}/comments/{comment_id}", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public WithComment_ItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/pulls/{pull_number}/comments/{comment_id}", rawUrl) + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Pulls/Item/Commits/CommitsRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Pulls/Item/Commits/CommitsRequestBuilder.cs new file mode 100644 index 0000000..66bb130 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Pulls/Item/Commits/CommitsRequestBuilder.cs @@ -0,0 +1,107 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.Pulls.Item.Commits +{ + /// + /// Builds and executes requests for operations under \repos\{owner-id}\{repo-id}\pulls\{pull_number}\commits + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class CommitsRequestBuilder : BaseRequestBuilder + { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public CommitsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/pulls/{pull_number}/commits{?page*,per_page*}", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public CommitsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/pulls/{pull_number}/commits{?page*,per_page*}", rawUrl) + { + } + /// + /// 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/rest/commits/commits#list-commits)endpoint.This endpoint supports the following custom media types. For more information, see "[Media types](https://docs.github.com/rest/using-the-rest-api/getting-started-with-the-rest-api#media-types)."- **`application/vnd.github.raw+json`**: Returns the raw markdown body. Response will include `body`. This is the default if you do not pass any specific media type.- **`application/vnd.github.text+json`**: Returns a text only representation of the markdown body. Response will include `body_text`.- **`application/vnd.github.html+json`**: Returns HTML rendered from the body's markdown. Response will include `body_html`.- **`application/vnd.github.full+json`**: Returns raw, text, and HTML representations. Response will include `body`, `body_text`, and `body_html`. + /// API method documentation + /// + /// A List<global::Ayllu.Github.Client.Models.Commit> + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task?> GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task> GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var collectionResult = await RequestAdapter.SendCollectionAsync(requestInfo, global::Ayllu.Github.Client.Models.Commit.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false); + return collectionResult?.AsList(); + } + /// + /// 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/rest/commits/commits#list-commits)endpoint.This endpoint supports the following custom media types. For more information, see "[Media types](https://docs.github.com/rest/using-the-rest-api/getting-started-with-the-rest-api#media-types)."- **`application/vnd.github.raw+json`**: Returns the raw markdown body. Response will include `body`. This is the default if you do not pass any specific media type.- **`application/vnd.github.text+json`**: Returns a text only representation of the markdown body. Response will include `body_text`.- **`application/vnd.github.html+json`**: Returns HTML rendered from the body's markdown. Response will include `body_html`.- **`application/vnd.github.full+json`**: Returns raw, text, and HTML representations. Response will include `body`, `body_text`, and `body_html`. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.Repos.Item.Item.Pulls.Item.Commits.CommitsRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Repos.Item.Item.Pulls.Item.Commits.CommitsRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// 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/rest/commits/commits#list-commits)endpoint.This endpoint supports the following custom media types. For more information, see "[Media types](https://docs.github.com/rest/using-the-rest-api/getting-started-with-the-rest-api#media-types)."- **`application/vnd.github.raw+json`**: Returns the raw markdown body. Response will include `body`. This is the default if you do not pass any specific media type.- **`application/vnd.github.text+json`**: Returns a text only representation of the markdown body. Response will include `body_text`.- **`application/vnd.github.html+json`**: Returns HTML rendered from the body's markdown. Response will include `body_html`.- **`application/vnd.github.full+json`**: Returns raw, text, and HTML representations. Response will include `body`, `body_text`, and `body_html`. + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class CommitsRequestBuilderGetQueryParameters + { + /// The page number of the results to fetch. For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." + [QueryParameter("page")] + public int? Page { get; set; } + /// The number of results per page (max 100). For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." + [QueryParameter("per_page")] + public int? PerPage { get; set; } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class CommitsRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Pulls/Item/Files/FilesRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Pulls/Item/Files/FilesRequestBuilder.cs new file mode 100644 index 0000000..70d4e8f --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Pulls/Item/Files/FilesRequestBuilder.cs @@ -0,0 +1,116 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.Pulls.Item.Files +{ + /// + /// Builds and executes requests for operations under \repos\{owner-id}\{repo-id}\pulls\{pull_number}\files + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class FilesRequestBuilder : BaseRequestBuilder + { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public FilesRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/pulls/{pull_number}/files{?page*,per_page*}", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public FilesRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/pulls/{pull_number}/files{?page*,per_page*}", rawUrl) + { + } + /// + /// Lists the files in a specified pull request.> [!NOTE]> Responses include a maximum of 3000 files. The paginated response returns 30 files per page by default.This endpoint supports the following custom media types. For more information, see "[Media types](https://docs.github.com/rest/using-the-rest-api/getting-started-with-the-rest-api#media-types)."- **`application/vnd.github.raw+json`**: Returns the raw markdown body. Response will include `body`. This is the default if you do not pass any specific media type.- **`application/vnd.github.text+json`**: Returns a text only representation of the markdown body. Response will include `body_text`.- **`application/vnd.github.html+json`**: Returns HTML rendered from the body's markdown. Response will include `body_html`.- **`application/vnd.github.full+json`**: Returns raw, text, and HTML representations. Response will include `body`, `body_text`, and `body_html`. + /// API method documentation + /// + /// A List<global::Ayllu.Github.Client.Models.DiffEntry> + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 422 status code + /// When receiving a 500 status code + /// When receiving a 503 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task?> GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task> GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "422", global::Ayllu.Github.Client.Models.ValidationError.CreateFromDiscriminatorValue }, + { "500", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "503", global::Ayllu.Github.Client.Models.Files503Error.CreateFromDiscriminatorValue }, + }; + var collectionResult = await RequestAdapter.SendCollectionAsync(requestInfo, global::Ayllu.Github.Client.Models.DiffEntry.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + return collectionResult?.AsList(); + } + /// + /// Lists the files in a specified pull request.> [!NOTE]> Responses include a maximum of 3000 files. The paginated response returns 30 files per page by default.This endpoint supports the following custom media types. For more information, see "[Media types](https://docs.github.com/rest/using-the-rest-api/getting-started-with-the-rest-api#media-types)."- **`application/vnd.github.raw+json`**: Returns the raw markdown body. Response will include `body`. This is the default if you do not pass any specific media type.- **`application/vnd.github.text+json`**: Returns a text only representation of the markdown body. Response will include `body_text`.- **`application/vnd.github.html+json`**: Returns HTML rendered from the body's markdown. Response will include `body_html`.- **`application/vnd.github.full+json`**: Returns raw, text, and HTML representations. Response will include `body`, `body_text`, and `body_html`. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.Repos.Item.Item.Pulls.Item.Files.FilesRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Repos.Item.Item.Pulls.Item.Files.FilesRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Lists the files in a specified pull request.> [!NOTE]> Responses include a maximum of 3000 files. The paginated response returns 30 files per page by default.This endpoint supports the following custom media types. For more information, see "[Media types](https://docs.github.com/rest/using-the-rest-api/getting-started-with-the-rest-api#media-types)."- **`application/vnd.github.raw+json`**: Returns the raw markdown body. Response will include `body`. This is the default if you do not pass any specific media type.- **`application/vnd.github.text+json`**: Returns a text only representation of the markdown body. Response will include `body_text`.- **`application/vnd.github.html+json`**: Returns HTML rendered from the body's markdown. Response will include `body_html`.- **`application/vnd.github.full+json`**: Returns raw, text, and HTML representations. Response will include `body`, `body_text`, and `body_html`. + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class FilesRequestBuilderGetQueryParameters + { + /// The page number of the results to fetch. For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." + [QueryParameter("page")] + public int? Page { get; set; } + /// The number of results per page (max 100). For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." + [QueryParameter("per_page")] + public int? PerPage { get; set; } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class FilesRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Pulls/Item/Merge/MergePutRequestBody.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Pulls/Item/Merge/MergePutRequestBody.cs new file mode 100644 index 0000000..8b648d0 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Pulls/Item/Merge/MergePutRequestBody.cs @@ -0,0 +1,89 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.Pulls.Item.Merge +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class MergePutRequestBody : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// Extra detail to append to automatic commit message. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? CommitMessage { get; set; } +#nullable restore +#else + public string CommitMessage { get; set; } +#endif + /// Title for the automatic commit message. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? CommitTitle { get; set; } +#nullable restore +#else + public string CommitTitle { get; set; } +#endif + /// The merge method to use. + public global::Ayllu.Github.Client.Repos.Item.Item.Pulls.Item.Merge.MergePutRequestBody_merge_method? MergeMethod { get; set; } + /// SHA that pull request head must match to allow merge. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Sha { get; set; } +#nullable restore +#else + public string Sha { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public MergePutRequestBody() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Repos.Item.Item.Pulls.Item.Merge.MergePutRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Repos.Item.Item.Pulls.Item.Merge.MergePutRequestBody(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "commit_message", n => { CommitMessage = n.GetStringValue(); } }, + { "commit_title", n => { CommitTitle = n.GetStringValue(); } }, + { "merge_method", n => { MergeMethod = n.GetEnumValue(); } }, + { "sha", n => { Sha = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("commit_message", CommitMessage); + writer.WriteStringValue("commit_title", CommitTitle); + writer.WriteEnumValue("merge_method", MergeMethod); + writer.WriteStringValue("sha", Sha); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Pulls/Item/Merge/MergePutRequestBody_merge_method.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Pulls/Item/Merge/MergePutRequestBody_merge_method.cs new file mode 100644 index 0000000..3a39603 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Pulls/Item/Merge/MergePutRequestBody_merge_method.cs @@ -0,0 +1,23 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.Pulls.Item.Merge +{ + /// The merge method to use. + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public enum MergePutRequestBody_merge_method + { + [EnumMember(Value = "merge")] + #pragma warning disable CS1591 + Merge, + #pragma warning restore CS1591 + [EnumMember(Value = "squash")] + #pragma warning disable CS1591 + Squash, + #pragma warning restore CS1591 + [EnumMember(Value = "rebase")] + #pragma warning disable CS1591 + Rebase, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Pulls/Item/Merge/MergeRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Pulls/Item/Merge/MergeRequestBuilder.cs new file mode 100644 index 0000000..c2ab483 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Pulls/Item/Merge/MergeRequestBuilder.cs @@ -0,0 +1,155 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.Pulls.Item.Merge +{ + /// + /// Builds and executes requests for operations under \repos\{owner-id}\{repo-id}\pulls\{pull_number}\merge + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class MergeRequestBuilder : BaseRequestBuilder + { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public MergeRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/pulls/{pull_number}/merge", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public MergeRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/pulls/{pull_number}/merge", rawUrl) + { + } + /// + /// 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 + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + await RequestAdapter.SendNoContentAsync(requestInfo, default, cancellationToken).ConfigureAwait(false); + } + /// + /// Merges a pull request into the base branch.This endpoint triggers [notifications](https://docs.github.com/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. For more information, see "[Rate limits for the API](https://docs.github.com/rest/using-the-rest-api/rate-limits-for-the-rest-api#about-secondary-rate-limits)" and "[Best practices for using the REST API](https://docs.github.com/rest/guides/best-practices-for-using-the-rest-api)." + /// API method documentation + /// + /// A + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 403 status code + /// When receiving a 404 status code + /// When receiving a 405 status code + /// When receiving a 409 status code + /// When receiving a 422 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PutAsync(global::Ayllu.Github.Client.Repos.Item.Item.Pulls.Item.Merge.MergePutRequestBody body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task PutAsync(global::Ayllu.Github.Client.Repos.Item.Item.Pulls.Item.Merge.MergePutRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPutRequestInformation(body, requestConfiguration); + var errorMapping = new Dictionary> + { + { "403", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "404", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "405", global::Ayllu.Github.Client.Repos.Item.Item.Pulls.Item.Merge.PullRequestMergeResult405Error.CreateFromDiscriminatorValue }, + { "409", global::Ayllu.Github.Client.Repos.Item.Item.Pulls.Item.Merge.PullRequestMergeResult409Error.CreateFromDiscriminatorValue }, + { "422", global::Ayllu.Github.Client.Models.ValidationError.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Models.PullRequestMergeResult.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// 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. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + return requestInfo; + } + /// + /// Merges a pull request into the base branch.This endpoint triggers [notifications](https://docs.github.com/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. For more information, see "[Rate limits for the API](https://docs.github.com/rest/using-the-rest-api/rate-limits-for-the-rest-api#about-secondary-rate-limits)" and "[Best practices for using the REST API](https://docs.github.com/rest/guides/best-practices-for-using-the-rest-api)." + /// + /// A + /// The request body + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPutRequestInformation(global::Ayllu.Github.Client.Repos.Item.Item.Pulls.Item.Merge.MergePutRequestBody body, Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToPutRequestInformation(global::Ayllu.Github.Client.Repos.Item.Item.Pulls.Item.Merge.MergePutRequestBody body, Action> requestConfiguration = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation(Method.PUT, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.Repos.Item.Item.Pulls.Item.Merge.MergeRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Repos.Item.Item.Pulls.Item.Merge.MergeRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class MergeRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class MergeRequestBuilderPutRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Pulls/Item/Merge/PullRequestMergeResult405Error.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Pulls/Item/Merge/PullRequestMergeResult405Error.cs new file mode 100644 index 0000000..9d61e99 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Pulls/Item/Merge/PullRequestMergeResult405Error.cs @@ -0,0 +1,78 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.Pulls.Item.Merge +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class PullRequestMergeResult405Error : ApiException, IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The documentation_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? DocumentationUrl { get; set; } +#nullable restore +#else + public string DocumentationUrl { get; set; } +#endif + /// The primary error message. + public override string Message { get => MessageEscaped ?? string.Empty; } + /// The message property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? MessageEscaped { get; set; } +#nullable restore +#else + public string MessageEscaped { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public PullRequestMergeResult405Error() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Repos.Item.Item.Pulls.Item.Merge.PullRequestMergeResult405Error CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Repos.Item.Item.Pulls.Item.Merge.PullRequestMergeResult405Error(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "documentation_url", n => { DocumentationUrl = n.GetStringValue(); } }, + { "message", n => { MessageEscaped = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("documentation_url", DocumentationUrl); + writer.WriteStringValue("message", MessageEscaped); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Pulls/Item/Merge/PullRequestMergeResult409Error.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Pulls/Item/Merge/PullRequestMergeResult409Error.cs new file mode 100644 index 0000000..e480be4 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Pulls/Item/Merge/PullRequestMergeResult409Error.cs @@ -0,0 +1,78 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.Pulls.Item.Merge +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class PullRequestMergeResult409Error : ApiException, IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The documentation_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? DocumentationUrl { get; set; } +#nullable restore +#else + public string DocumentationUrl { get; set; } +#endif + /// The primary error message. + public override string Message { get => MessageEscaped ?? string.Empty; } + /// The message property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? MessageEscaped { get; set; } +#nullable restore +#else + public string MessageEscaped { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public PullRequestMergeResult409Error() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Repos.Item.Item.Pulls.Item.Merge.PullRequestMergeResult409Error CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Repos.Item.Item.Pulls.Item.Merge.PullRequestMergeResult409Error(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "documentation_url", n => { DocumentationUrl = n.GetStringValue(); } }, + { "message", n => { MessageEscaped = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("documentation_url", DocumentationUrl); + writer.WriteStringValue("message", MessageEscaped); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Pulls/Item/Requested_reviewers/Requested_reviewersDeleteRequestBody.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Pulls/Item/Requested_reviewers/Requested_reviewersDeleteRequestBody.cs new file mode 100644 index 0000000..72eb5c5 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Pulls/Item/Requested_reviewers/Requested_reviewersDeleteRequestBody.cs @@ -0,0 +1,75 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.Pulls.Item.Requested_reviewers +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class Requested_reviewersDeleteRequestBody : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// An array of user `login`s that will be removed. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? Reviewers { get; set; } +#nullable restore +#else + public List Reviewers { get; set; } +#endif + /// An array of team `slug`s that will be removed. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? TeamReviewers { get; set; } +#nullable restore +#else + public List TeamReviewers { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public Requested_reviewersDeleteRequestBody() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Repos.Item.Item.Pulls.Item.Requested_reviewers.Requested_reviewersDeleteRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Repos.Item.Item.Pulls.Item.Requested_reviewers.Requested_reviewersDeleteRequestBody(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "reviewers", n => { Reviewers = n.GetCollectionOfPrimitiveValues()?.AsList(); } }, + { "team_reviewers", n => { TeamReviewers = n.GetCollectionOfPrimitiveValues()?.AsList(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteCollectionOfPrimitiveValues("reviewers", Reviewers); + writer.WriteCollectionOfPrimitiveValues("team_reviewers", TeamReviewers); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Pulls/Item/Requested_reviewers/Requested_reviewersPostRequestBody.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Pulls/Item/Requested_reviewers/Requested_reviewersPostRequestBody.cs new file mode 100644 index 0000000..349f022 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Pulls/Item/Requested_reviewers/Requested_reviewersPostRequestBody.cs @@ -0,0 +1,75 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.Pulls.Item.Requested_reviewers +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class Requested_reviewersPostRequestBody : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// An array of user `login`s that will be requested. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? Reviewers { get; set; } +#nullable restore +#else + public List Reviewers { get; set; } +#endif + /// An array of team `slug`s that will be requested. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? TeamReviewers { get; set; } +#nullable restore +#else + public List TeamReviewers { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public Requested_reviewersPostRequestBody() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Repos.Item.Item.Pulls.Item.Requested_reviewers.Requested_reviewersPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Repos.Item.Item.Pulls.Item.Requested_reviewers.Requested_reviewersPostRequestBody(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "reviewers", n => { Reviewers = n.GetCollectionOfPrimitiveValues()?.AsList(); } }, + { "team_reviewers", n => { TeamReviewers = n.GetCollectionOfPrimitiveValues()?.AsList(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteCollectionOfPrimitiveValues("reviewers", Reviewers); + writer.WriteCollectionOfPrimitiveValues("team_reviewers", TeamReviewers); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Pulls/Item/Requested_reviewers/Requested_reviewersRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Pulls/Item/Requested_reviewers/Requested_reviewersRequestBuilder.cs new file mode 100644 index 0000000..20fda59 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Pulls/Item/Requested_reviewers/Requested_reviewersRequestBuilder.cs @@ -0,0 +1,205 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.Pulls.Item.Requested_reviewers +{ + /// + /// Builds and executes requests for operations under \repos\{owner-id}\{repo-id}\pulls\{pull_number}\requested_reviewers + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class Requested_reviewersRequestBuilder : BaseRequestBuilder + { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public Requested_reviewersRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/pulls/{pull_number}/requested_reviewers", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public Requested_reviewersRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/pulls/{pull_number}/requested_reviewers", rawUrl) + { + } + /// + /// Removes review requests from a pull request for a given set of users and/or teams. + /// API method documentation + /// + /// A + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 422 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task DeleteAsync(global::Ayllu.Github.Client.Repos.Item.Item.Pulls.Item.Requested_reviewers.Requested_reviewersDeleteRequestBody body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task DeleteAsync(global::Ayllu.Github.Client.Repos.Item.Item.Pulls.Item.Requested_reviewers.Requested_reviewersDeleteRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = ToDeleteRequestInformation(body, requestConfiguration); + var errorMapping = new Dictionary> + { + { "422", global::Ayllu.Github.Client.Models.ValidationError.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Models.PullRequestSimple.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// 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/rest/pulls/reviews#list-reviews-for-a-pull-request) operation. + /// API method documentation + /// + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Models.PullRequestReviewRequest.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false); + } + /// + /// Requests reviews for a pull request from a given set of users and/or teams.This endpoint triggers [notifications](https://docs.github.com/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. For more information, see "[Rate limits for the API](https://docs.github.com/rest/using-the-rest-api/rate-limits-for-the-rest-api#about-secondary-rate-limits)" and "[Best practices for using the REST API](https://docs.github.com/rest/guides/best-practices-for-using-the-rest-api)." + /// API method documentation + /// + /// A + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 403 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PostAsync(global::Ayllu.Github.Client.Repos.Item.Item.Pulls.Item.Requested_reviewers.Requested_reviewersPostRequestBody body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task PostAsync(global::Ayllu.Github.Client.Repos.Item.Item.Pulls.Item.Requested_reviewers.Requested_reviewersPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPostRequestInformation(body, requestConfiguration); + var errorMapping = new Dictionary> + { + { "403", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Models.PullRequestSimple.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// Removes review requests from a pull request for a given set of users and/or teams. + /// + /// A + /// The request body + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToDeleteRequestInformation(global::Ayllu.Github.Client.Repos.Item.Item.Pulls.Item.Requested_reviewers.Requested_reviewersDeleteRequestBody body, Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToDeleteRequestInformation(global::Ayllu.Github.Client.Repos.Item.Item.Pulls.Item.Requested_reviewers.Requested_reviewersDeleteRequestBody body, Action> requestConfiguration = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation(Method.DELETE, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + return requestInfo; + } + /// + /// 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/rest/pulls/reviews#list-reviews-for-a-pull-request) operation. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Requests reviews for a pull request from a given set of users and/or teams.This endpoint triggers [notifications](https://docs.github.com/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. For more information, see "[Rate limits for the API](https://docs.github.com/rest/using-the-rest-api/rate-limits-for-the-rest-api#about-secondary-rate-limits)" and "[Best practices for using the REST API](https://docs.github.com/rest/guides/best-practices-for-using-the-rest-api)." + /// + /// A + /// The request body + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPostRequestInformation(global::Ayllu.Github.Client.Repos.Item.Item.Pulls.Item.Requested_reviewers.Requested_reviewersPostRequestBody body, Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToPostRequestInformation(global::Ayllu.Github.Client.Repos.Item.Item.Pulls.Item.Requested_reviewers.Requested_reviewersPostRequestBody body, Action> requestConfiguration = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.Repos.Item.Item.Pulls.Item.Requested_reviewers.Requested_reviewersRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Repos.Item.Item.Pulls.Item.Requested_reviewers.Requested_reviewersRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class Requested_reviewersRequestBuilderDeleteRequestConfiguration : RequestConfiguration + { + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class Requested_reviewersRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class Requested_reviewersRequestBuilderPostRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Pulls/Item/Reviews/Item/Comments/CommentsRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Pulls/Item/Reviews/Item/Comments/CommentsRequestBuilder.cs new file mode 100644 index 0000000..09d6798 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Pulls/Item/Reviews/Item/Comments/CommentsRequestBuilder.cs @@ -0,0 +1,112 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.Pulls.Item.Reviews.Item.Comments +{ + /// + /// Builds and executes requests for operations under \repos\{owner-id}\{repo-id}\pulls\{pull_number}\reviews\{review_id}\comments + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class CommentsRequestBuilder : BaseRequestBuilder + { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public CommentsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/pulls/{pull_number}/reviews/{review_id}/comments{?page*,per_page*}", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public CommentsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/pulls/{pull_number}/reviews/{review_id}/comments{?page*,per_page*}", rawUrl) + { + } + /// + /// 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/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`. + /// API method documentation + /// + /// A List<global::Ayllu.Github.Client.Models.ReviewComment> + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 404 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task?> GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task> GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "404", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + }; + var collectionResult = await RequestAdapter.SendCollectionAsync(requestInfo, global::Ayllu.Github.Client.Models.ReviewComment.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + return collectionResult?.AsList(); + } + /// + /// 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/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`. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.Repos.Item.Item.Pulls.Item.Reviews.Item.Comments.CommentsRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Repos.Item.Item.Pulls.Item.Reviews.Item.Comments.CommentsRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// 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/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`. + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class CommentsRequestBuilderGetQueryParameters + { + /// The page number of the results to fetch. For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." + [QueryParameter("page")] + public int? Page { get; set; } + /// The number of results per page (max 100). For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." + [QueryParameter("per_page")] + public int? PerPage { get; set; } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class CommentsRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Pulls/Item/Reviews/Item/Dismissals/DismissalsPutRequestBody.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Pulls/Item/Reviews/Item/Dismissals/DismissalsPutRequestBody.cs new file mode 100644 index 0000000..afd7bc2 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Pulls/Item/Reviews/Item/Dismissals/DismissalsPutRequestBody.cs @@ -0,0 +1,69 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.Pulls.Item.Reviews.Item.Dismissals +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class DismissalsPutRequestBody : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The event property + public global::Ayllu.Github.Client.Repos.Item.Item.Pulls.Item.Reviews.Item.Dismissals.DismissalsPutRequestBody_event? Event { get; set; } + /// The message for the pull request review dismissal +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Message { get; set; } +#nullable restore +#else + public string Message { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public DismissalsPutRequestBody() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Repos.Item.Item.Pulls.Item.Reviews.Item.Dismissals.DismissalsPutRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Repos.Item.Item.Pulls.Item.Reviews.Item.Dismissals.DismissalsPutRequestBody(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "event", n => { Event = n.GetEnumValue(); } }, + { "message", n => { Message = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteEnumValue("event", Event); + writer.WriteStringValue("message", Message); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Pulls/Item/Reviews/Item/Dismissals/DismissalsPutRequestBody_event.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Pulls/Item/Reviews/Item/Dismissals/DismissalsPutRequestBody_event.cs new file mode 100644 index 0000000..87674b6 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Pulls/Item/Reviews/Item/Dismissals/DismissalsPutRequestBody_event.cs @@ -0,0 +1,16 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.Pulls.Item.Reviews.Item.Dismissals +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public enum DismissalsPutRequestBody_event + #pragma warning restore CS1591 + { + [EnumMember(Value = "DISMISS")] + #pragma warning disable CS1591 + DISMISS, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Pulls/Item/Reviews/Item/Dismissals/DismissalsRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Pulls/Item/Reviews/Item/Dismissals/DismissalsRequestBuilder.cs new file mode 100644 index 0000000..040fc0f --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Pulls/Item/Reviews/Item/Dismissals/DismissalsRequestBuilder.cs @@ -0,0 +1,105 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.Pulls.Item.Reviews.Item.Dismissals +{ + /// + /// Builds and executes requests for operations under \repos\{owner-id}\{repo-id}\pulls\{pull_number}\reviews\{review_id}\dismissals + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class DismissalsRequestBuilder : BaseRequestBuilder + { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public DismissalsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/pulls/{pull_number}/reviews/{review_id}/dismissals", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public DismissalsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/pulls/{pull_number}/reviews/{review_id}/dismissals", rawUrl) + { + } + /// + /// Dismisses a specified review on a pull request.> [!NOTE]> To dismiss a pull request review on a [protected branch](https://docs.github.com/rest/branches/branch-protection), you must be a repository administrator or be included in the list of people or teams who can dismiss pull request reviews.This endpoint supports the following custom media types. For more information, see "[Media types](https://docs.github.com/rest/using-the-rest-api/getting-started-with-the-rest-api#media-types)."- **`application/vnd.github-commitcomment.raw+json`**: Returns the raw markdown body. Response will include `body`. This is the default if you do not pass any specific media type.- **`application/vnd.github-commitcomment.text+json`**: Returns a text only representation of the markdown body. Response will include `body_text`.- **`application/vnd.github-commitcomment.html+json`**: Returns HTML rendered from the body's markdown. Response will include `body_html`.- **`application/vnd.github-commitcomment.full+json`**: Returns raw, text, and HTML representations. Response will include `body`, `body_text`, and `body_html`. + /// API method documentation + /// + /// A + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 404 status code + /// When receiving a 422 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PutAsync(global::Ayllu.Github.Client.Repos.Item.Item.Pulls.Item.Reviews.Item.Dismissals.DismissalsPutRequestBody body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task PutAsync(global::Ayllu.Github.Client.Repos.Item.Item.Pulls.Item.Reviews.Item.Dismissals.DismissalsPutRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPutRequestInformation(body, requestConfiguration); + var errorMapping = new Dictionary> + { + { "404", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "422", global::Ayllu.Github.Client.Models.ValidationErrorSimple.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Models.PullRequestReview.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// Dismisses a specified review on a pull request.> [!NOTE]> To dismiss a pull request review on a [protected branch](https://docs.github.com/rest/branches/branch-protection), you must be a repository administrator or be included in the list of people or teams who can dismiss pull request reviews.This endpoint supports the following custom media types. For more information, see "[Media types](https://docs.github.com/rest/using-the-rest-api/getting-started-with-the-rest-api#media-types)."- **`application/vnd.github-commitcomment.raw+json`**: Returns the raw markdown body. Response will include `body`. This is the default if you do not pass any specific media type.- **`application/vnd.github-commitcomment.text+json`**: Returns a text only representation of the markdown body. Response will include `body_text`.- **`application/vnd.github-commitcomment.html+json`**: Returns HTML rendered from the body's markdown. Response will include `body_html`.- **`application/vnd.github-commitcomment.full+json`**: Returns raw, text, and HTML representations. Response will include `body`, `body_text`, and `body_html`. + /// + /// A + /// The request body + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPutRequestInformation(global::Ayllu.Github.Client.Repos.Item.Item.Pulls.Item.Reviews.Item.Dismissals.DismissalsPutRequestBody body, Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToPutRequestInformation(global::Ayllu.Github.Client.Repos.Item.Item.Pulls.Item.Reviews.Item.Dismissals.DismissalsPutRequestBody body, Action> requestConfiguration = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation(Method.PUT, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.Repos.Item.Item.Pulls.Item.Reviews.Item.Dismissals.DismissalsRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Repos.Item.Item.Pulls.Item.Reviews.Item.Dismissals.DismissalsRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class DismissalsRequestBuilderPutRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Pulls/Item/Reviews/Item/Events/EventsPostRequestBody.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Pulls/Item/Reviews/Item/Events/EventsPostRequestBody.cs new file mode 100644 index 0000000..342d265 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Pulls/Item/Reviews/Item/Events/EventsPostRequestBody.cs @@ -0,0 +1,69 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.Pulls.Item.Reviews.Item.Events +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class EventsPostRequestBody : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The body text of the pull request review +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Body { get; set; } +#nullable restore +#else + public string Body { get; set; } +#endif + /// 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. + public global::Ayllu.Github.Client.Repos.Item.Item.Pulls.Item.Reviews.Item.Events.EventsPostRequestBody_event? Event { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public EventsPostRequestBody() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Repos.Item.Item.Pulls.Item.Reviews.Item.Events.EventsPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Repos.Item.Item.Pulls.Item.Reviews.Item.Events.EventsPostRequestBody(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "body", n => { Body = n.GetStringValue(); } }, + { "event", n => { Event = n.GetEnumValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("body", Body); + writer.WriteEnumValue("event", Event); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Pulls/Item/Reviews/Item/Events/EventsPostRequestBody_event.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Pulls/Item/Reviews/Item/Events/EventsPostRequestBody_event.cs new file mode 100644 index 0000000..3900027 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Pulls/Item/Reviews/Item/Events/EventsPostRequestBody_event.cs @@ -0,0 +1,23 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.Pulls.Item.Reviews.Item.Events +{ + /// 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. + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public enum EventsPostRequestBody_event + { + [EnumMember(Value = "APPROVE")] + #pragma warning disable CS1591 + APPROVE, + #pragma warning restore CS1591 + [EnumMember(Value = "REQUEST_CHANGES")] + #pragma warning disable CS1591 + REQUEST_CHANGES, + #pragma warning restore CS1591 + [EnumMember(Value = "COMMENT")] + #pragma warning disable CS1591 + COMMENT, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Pulls/Item/Reviews/Item/Events/EventsRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Pulls/Item/Reviews/Item/Events/EventsRequestBuilder.cs new file mode 100644 index 0000000..2132e4c --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Pulls/Item/Reviews/Item/Events/EventsRequestBuilder.cs @@ -0,0 +1,107 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.Pulls.Item.Reviews.Item.Events +{ + /// + /// Builds and executes requests for operations under \repos\{owner-id}\{repo-id}\pulls\{pull_number}\reviews\{review_id}\events + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class EventsRequestBuilder : BaseRequestBuilder + { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public EventsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/pulls/{pull_number}/reviews/{review_id}/events", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public EventsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/pulls/{pull_number}/reviews/{review_id}/events", rawUrl) + { + } + /// + /// 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/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/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`. + /// API method documentation + /// + /// A + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 403 status code + /// When receiving a 404 status code + /// When receiving a 422 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PostAsync(global::Ayllu.Github.Client.Repos.Item.Item.Pulls.Item.Reviews.Item.Events.EventsPostRequestBody body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task PostAsync(global::Ayllu.Github.Client.Repos.Item.Item.Pulls.Item.Reviews.Item.Events.EventsPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPostRequestInformation(body, requestConfiguration); + var errorMapping = new Dictionary> + { + { "403", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "404", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "422", global::Ayllu.Github.Client.Models.ValidationErrorSimple.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Models.PullRequestReview.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// 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/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/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`. + /// + /// A + /// The request body + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPostRequestInformation(global::Ayllu.Github.Client.Repos.Item.Item.Pulls.Item.Reviews.Item.Events.EventsPostRequestBody body, Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToPostRequestInformation(global::Ayllu.Github.Client.Repos.Item.Item.Pulls.Item.Reviews.Item.Events.EventsPostRequestBody body, Action> requestConfiguration = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.Repos.Item.Item.Pulls.Item.Reviews.Item.Events.EventsRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Repos.Item.Item.Pulls.Item.Reviews.Item.Events.EventsRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class EventsRequestBuilderPostRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Pulls/Item/Reviews/Item/WithReview_ItemRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Pulls/Item/Reviews/Item/WithReview_ItemRequestBuilder.cs new file mode 100644 index 0000000..f44fd0a --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Pulls/Item/Reviews/Item/WithReview_ItemRequestBuilder.cs @@ -0,0 +1,225 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Ayllu.Github.Client.Repos.Item.Item.Pulls.Item.Reviews.Item.Comments; +using Ayllu.Github.Client.Repos.Item.Item.Pulls.Item.Reviews.Item.Dismissals; +using Ayllu.Github.Client.Repos.Item.Item.Pulls.Item.Reviews.Item.Events; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.Pulls.Item.Reviews.Item +{ + /// + /// Builds and executes requests for operations under \repos\{owner-id}\{repo-id}\pulls\{pull_number}\reviews\{review_id} + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithReview_ItemRequestBuilder : BaseRequestBuilder + { + /// The comments property + public global::Ayllu.Github.Client.Repos.Item.Item.Pulls.Item.Reviews.Item.Comments.CommentsRequestBuilder Comments + { + get => new global::Ayllu.Github.Client.Repos.Item.Item.Pulls.Item.Reviews.Item.Comments.CommentsRequestBuilder(PathParameters, RequestAdapter); + } + /// The dismissals property + public global::Ayllu.Github.Client.Repos.Item.Item.Pulls.Item.Reviews.Item.Dismissals.DismissalsRequestBuilder Dismissals + { + get => new global::Ayllu.Github.Client.Repos.Item.Item.Pulls.Item.Reviews.Item.Dismissals.DismissalsRequestBuilder(PathParameters, RequestAdapter); + } + /// The events property + public global::Ayllu.Github.Client.Repos.Item.Item.Pulls.Item.Reviews.Item.Events.EventsRequestBuilder Events + { + get => new global::Ayllu.Github.Client.Repos.Item.Item.Pulls.Item.Reviews.Item.Events.EventsRequestBuilder(PathParameters, RequestAdapter); + } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public WithReview_ItemRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/pulls/{pull_number}/reviews/{review_id}", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public WithReview_ItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/pulls/{pull_number}/reviews/{review_id}", rawUrl) + { + } + /// + /// 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/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`. + /// API method documentation + /// + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 404 status code + /// When receiving a 422 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task DeleteAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task DeleteAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToDeleteRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "404", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "422", global::Ayllu.Github.Client.Models.ValidationErrorSimple.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Models.PullRequestReview.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// 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/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`. + /// API method documentation + /// + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 404 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "404", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Models.PullRequestReview.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// 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/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`. + /// API method documentation + /// + /// A + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 422 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PutAsync(global::Ayllu.Github.Client.Repos.Item.Item.Pulls.Item.Reviews.Item.WithReview_PutRequestBody body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task PutAsync(global::Ayllu.Github.Client.Repos.Item.Item.Pulls.Item.Reviews.Item.WithReview_PutRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPutRequestInformation(body, requestConfiguration); + var errorMapping = new Dictionary> + { + { "422", global::Ayllu.Github.Client.Models.ValidationErrorSimple.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Models.PullRequestReview.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// 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/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`. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToDeleteRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToDeleteRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.DELETE, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// 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/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`. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// 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/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`. + /// + /// A + /// The request body + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPutRequestInformation(global::Ayllu.Github.Client.Repos.Item.Item.Pulls.Item.Reviews.Item.WithReview_PutRequestBody body, Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToPutRequestInformation(global::Ayllu.Github.Client.Repos.Item.Item.Pulls.Item.Reviews.Item.WithReview_PutRequestBody body, Action> requestConfiguration = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation(Method.PUT, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.Repos.Item.Item.Pulls.Item.Reviews.Item.WithReview_ItemRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Repos.Item.Item.Pulls.Item.Reviews.Item.WithReview_ItemRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithReview_ItemRequestBuilderDeleteRequestConfiguration : RequestConfiguration + { + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithReview_ItemRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithReview_ItemRequestBuilderPutRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Pulls/Item/Reviews/Item/WithReview_PutRequestBody.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Pulls/Item/Reviews/Item/WithReview_PutRequestBody.cs new file mode 100644 index 0000000..d528f0b --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Pulls/Item/Reviews/Item/WithReview_PutRequestBody.cs @@ -0,0 +1,65 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.Pulls.Item.Reviews.Item +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class WithReview_PutRequestBody : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The body text of the pull request review. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Body { get; set; } +#nullable restore +#else + public string Body { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public WithReview_PutRequestBody() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Repos.Item.Item.Pulls.Item.Reviews.Item.WithReview_PutRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Repos.Item.Item.Pulls.Item.Reviews.Item.WithReview_PutRequestBody(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "body", n => { Body = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("body", Body); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Pulls/Item/Reviews/ReviewsPostRequestBody.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Pulls/Item/Reviews/ReviewsPostRequestBody.cs new file mode 100644 index 0000000..d2d54c0 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Pulls/Item/Reviews/ReviewsPostRequestBody.cs @@ -0,0 +1,89 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.Pulls.Item.Reviews +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class ReviewsPostRequestBody : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// **Required** when using `REQUEST_CHANGES` or `COMMENT` for the `event` parameter. The body text of the pull request review. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Body { get; set; } +#nullable restore +#else + public string Body { get; set; } +#endif + /// Use the following table to specify the location, destination, and contents of the draft review comment. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? Comments { get; set; } +#nullable restore +#else + public List Comments { get; set; } +#endif + /// 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. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? CommitId { get; set; } +#nullable restore +#else + public string CommitId { get; set; } +#endif + /// The review action you want to perform. The review actions include: `APPROVE`, `REQUEST_CHANGES`, or `COMMENT`. By leaving this blank, you set the review action state to `PENDING`, which means you will need to [submit the pull request review](https://docs.github.com/rest/pulls/reviews#submit-a-review-for-a-pull-request) when you are ready. + public global::Ayllu.Github.Client.Repos.Item.Item.Pulls.Item.Reviews.ReviewsPostRequestBody_event? Event { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public ReviewsPostRequestBody() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Repos.Item.Item.Pulls.Item.Reviews.ReviewsPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Repos.Item.Item.Pulls.Item.Reviews.ReviewsPostRequestBody(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "body", n => { Body = n.GetStringValue(); } }, + { "comments", n => { Comments = n.GetCollectionOfObjectValues(global::Ayllu.Github.Client.Repos.Item.Item.Pulls.Item.Reviews.ReviewsPostRequestBody_comments.CreateFromDiscriminatorValue)?.AsList(); } }, + { "commit_id", n => { CommitId = n.GetStringValue(); } }, + { "event", n => { Event = n.GetEnumValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("body", Body); + writer.WriteCollectionOfObjectValues("comments", Comments); + writer.WriteStringValue("commit_id", CommitId); + writer.WriteEnumValue("event", Event); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Pulls/Item/Reviews/ReviewsPostRequestBody_comments.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Pulls/Item/Reviews/ReviewsPostRequestBody_comments.cs new file mode 100644 index 0000000..dbd4894 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Pulls/Item/Reviews/ReviewsPostRequestBody_comments.cs @@ -0,0 +1,107 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.Pulls.Item.Reviews +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class ReviewsPostRequestBody_comments : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// Text of the review comment. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Body { get; set; } +#nullable restore +#else + public string Body { get; set; } +#endif + /// The line property + public int? Line { get; set; } + /// The relative path to the file that necessitates a review comment. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Path { get; set; } +#nullable restore +#else + public string Path { get; set; } +#endif + /// 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. + public int? Position { get; set; } + /// The side property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Side { get; set; } +#nullable restore +#else + public string Side { get; set; } +#endif + /// The start_line property + public int? StartLine { get; set; } + /// The start_side property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? StartSide { get; set; } +#nullable restore +#else + public string StartSide { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public ReviewsPostRequestBody_comments() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Repos.Item.Item.Pulls.Item.Reviews.ReviewsPostRequestBody_comments CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Repos.Item.Item.Pulls.Item.Reviews.ReviewsPostRequestBody_comments(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "body", n => { Body = n.GetStringValue(); } }, + { "line", n => { Line = n.GetIntValue(); } }, + { "path", n => { Path = n.GetStringValue(); } }, + { "position", n => { Position = n.GetIntValue(); } }, + { "side", n => { Side = n.GetStringValue(); } }, + { "start_line", n => { StartLine = n.GetIntValue(); } }, + { "start_side", n => { StartSide = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("body", Body); + writer.WriteIntValue("line", Line); + writer.WriteStringValue("path", Path); + writer.WriteIntValue("position", Position); + writer.WriteStringValue("side", Side); + writer.WriteIntValue("start_line", StartLine); + writer.WriteStringValue("start_side", StartSide); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Pulls/Item/Reviews/ReviewsPostRequestBody_event.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Pulls/Item/Reviews/ReviewsPostRequestBody_event.cs new file mode 100644 index 0000000..2a3fff3 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Pulls/Item/Reviews/ReviewsPostRequestBody_event.cs @@ -0,0 +1,23 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.Pulls.Item.Reviews +{ + /// The review action you want to perform. The review actions include: `APPROVE`, `REQUEST_CHANGES`, or `COMMENT`. By leaving this blank, you set the review action state to `PENDING`, which means you will need to [submit the pull request review](https://docs.github.com/rest/pulls/reviews#submit-a-review-for-a-pull-request) when you are ready. + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public enum ReviewsPostRequestBody_event + { + [EnumMember(Value = "APPROVE")] + #pragma warning disable CS1591 + APPROVE, + #pragma warning restore CS1591 + [EnumMember(Value = "REQUEST_CHANGES")] + #pragma warning disable CS1591 + REQUEST_CHANGES, + #pragma warning restore CS1591 + [EnumMember(Value = "COMMENT")] + #pragma warning disable CS1591 + COMMENT, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Pulls/Item/Reviews/ReviewsRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Pulls/Item/Reviews/ReviewsRequestBuilder.cs new file mode 100644 index 0000000..4215add --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Pulls/Item/Reviews/ReviewsRequestBuilder.cs @@ -0,0 +1,191 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Ayllu.Github.Client.Repos.Item.Item.Pulls.Item.Reviews.Item; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.Pulls.Item.Reviews +{ + /// + /// Builds and executes requests for operations under \repos\{owner-id}\{repo-id}\pulls\{pull_number}\reviews + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class ReviewsRequestBuilder : BaseRequestBuilder + { + /// Gets an item from the Ayllu.Github.Client.repos.item.item.pulls.item.reviews.item collection + /// The unique identifier of the review. + /// A + public global::Ayllu.Github.Client.Repos.Item.Item.Pulls.Item.Reviews.Item.WithReview_ItemRequestBuilder this[int position] + { + get + { + var urlTplParams = new Dictionary(PathParameters); + urlTplParams.Add("review_id", position); + return new global::Ayllu.Github.Client.Repos.Item.Item.Pulls.Item.Reviews.Item.WithReview_ItemRequestBuilder(urlTplParams, RequestAdapter); + } + } + /// Gets an item from the Ayllu.Github.Client.repos.item.item.pulls.item.reviews.item collection + /// The unique identifier of the review. + /// A + [Obsolete("This indexer is deprecated and will be removed in the next major version. Use the one with the typed parameter instead.")] + public global::Ayllu.Github.Client.Repos.Item.Item.Pulls.Item.Reviews.Item.WithReview_ItemRequestBuilder this[string position] + { + get + { + var urlTplParams = new Dictionary(PathParameters); + if (!string.IsNullOrWhiteSpace(position)) urlTplParams.Add("review_id", position); + return new global::Ayllu.Github.Client.Repos.Item.Item.Pulls.Item.Reviews.Item.WithReview_ItemRequestBuilder(urlTplParams, RequestAdapter); + } + } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public ReviewsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/pulls/{pull_number}/reviews{?page*,per_page*}", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public ReviewsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/pulls/{pull_number}/reviews{?page*,per_page*}", rawUrl) + { + } + /// + /// 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/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`. + /// API method documentation + /// + /// A List<global::Ayllu.Github.Client.Models.PullRequestReview> + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task?> GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task> GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var collectionResult = await RequestAdapter.SendCollectionAsync(requestInfo, global::Ayllu.Github.Client.Models.PullRequestReview.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false); + return collectionResult?.AsList(); + } + /// + /// Creates a review on a specified pull request.This endpoint triggers [notifications](https://docs.github.com/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. For more information, see "[Rate limits for the API](https://docs.github.com/rest/using-the-rest-api/rate-limits-for-the-rest-api#about-secondary-rate-limits)" and "[Best practices for using the REST API](https://docs.github.com/rest/guides/best-practices-for-using-the-rest-api)."Pull request reviews created in the `PENDING` state are not submitted and therefore do not include the `submitted_at` property in the response. To create a pending review for a pull request, leave the `event` parameter blank. For more information about submitting a `PENDING` review, see "[Submit a review for a pull request](https://docs.github.com/rest/pulls/reviews#submit-a-review-for-a-pull-request)."> [!NOTE]> To comment on a specific line in a file, you need to first determine the position of that line in the diff. To see a pull request diff, add the `application/vnd.github.v3.diff` media type to the `Accept` header of a call to the [Get a pull request](https://docs.github.com/rest/pulls/pulls#get-a-pull-request) endpoint.The `position` value equals the number of lines down from the first "@@" hunk header in the file you want to add a comment. The line just below the "@@" line is position 1, the next line is position 2, and so on. The position in the diff continues to increase through lines of whitespace and additional hunks until the beginning of a new file.This endpoint supports the following custom media types. For more information, see "[Media types](https://docs.github.com/rest/using-the-rest-api/getting-started-with-the-rest-api#media-types)."- **`application/vnd.github-commitcomment.raw+json`**: Returns the raw markdown body. Response will include `body`. This is the default if you do not pass any specific media type.- **`application/vnd.github-commitcomment.text+json`**: Returns a text only representation of the markdown body. Response will include `body_text`.- **`application/vnd.github-commitcomment.html+json`**: Returns HTML rendered from the body's markdown. Response will include `body_html`.- **`application/vnd.github-commitcomment.full+json`**: Returns raw, text, and HTML representations. Response will include `body`, `body_text`, and `body_html`. + /// API method documentation + /// + /// A + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 403 status code + /// When receiving a 422 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PostAsync(global::Ayllu.Github.Client.Repos.Item.Item.Pulls.Item.Reviews.ReviewsPostRequestBody body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task PostAsync(global::Ayllu.Github.Client.Repos.Item.Item.Pulls.Item.Reviews.ReviewsPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPostRequestInformation(body, requestConfiguration); + var errorMapping = new Dictionary> + { + { "403", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "422", global::Ayllu.Github.Client.Models.ValidationErrorSimple.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Models.PullRequestReview.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// 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/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`. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Creates a review on a specified pull request.This endpoint triggers [notifications](https://docs.github.com/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. For more information, see "[Rate limits for the API](https://docs.github.com/rest/using-the-rest-api/rate-limits-for-the-rest-api#about-secondary-rate-limits)" and "[Best practices for using the REST API](https://docs.github.com/rest/guides/best-practices-for-using-the-rest-api)."Pull request reviews created in the `PENDING` state are not submitted and therefore do not include the `submitted_at` property in the response. To create a pending review for a pull request, leave the `event` parameter blank. For more information about submitting a `PENDING` review, see "[Submit a review for a pull request](https://docs.github.com/rest/pulls/reviews#submit-a-review-for-a-pull-request)."> [!NOTE]> To comment on a specific line in a file, you need to first determine the position of that line in the diff. To see a pull request diff, add the `application/vnd.github.v3.diff` media type to the `Accept` header of a call to the [Get a pull request](https://docs.github.com/rest/pulls/pulls#get-a-pull-request) endpoint.The `position` value equals the number of lines down from the first "@@" hunk header in the file you want to add a comment. The line just below the "@@" line is position 1, the next line is position 2, and so on. The position in the diff continues to increase through lines of whitespace and additional hunks until the beginning of a new file.This endpoint supports the following custom media types. For more information, see "[Media types](https://docs.github.com/rest/using-the-rest-api/getting-started-with-the-rest-api#media-types)."- **`application/vnd.github-commitcomment.raw+json`**: Returns the raw markdown body. Response will include `body`. This is the default if you do not pass any specific media type.- **`application/vnd.github-commitcomment.text+json`**: Returns a text only representation of the markdown body. Response will include `body_text`.- **`application/vnd.github-commitcomment.html+json`**: Returns HTML rendered from the body's markdown. Response will include `body_html`.- **`application/vnd.github-commitcomment.full+json`**: Returns raw, text, and HTML representations. Response will include `body`, `body_text`, and `body_html`. + /// + /// A + /// The request body + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPostRequestInformation(global::Ayllu.Github.Client.Repos.Item.Item.Pulls.Item.Reviews.ReviewsPostRequestBody body, Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToPostRequestInformation(global::Ayllu.Github.Client.Repos.Item.Item.Pulls.Item.Reviews.ReviewsPostRequestBody body, Action> requestConfiguration = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.Repos.Item.Item.Pulls.Item.Reviews.ReviewsRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Repos.Item.Item.Pulls.Item.Reviews.ReviewsRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// 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/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`. + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class ReviewsRequestBuilderGetQueryParameters + { + /// The page number of the results to fetch. For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." + [QueryParameter("page")] + public int? Page { get; set; } + /// The number of results per page (max 100). For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." + [QueryParameter("per_page")] + public int? PerPage { get; set; } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class ReviewsRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class ReviewsRequestBuilderPostRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Pulls/Item/UpdateBranch/UpdateBranchPutRequestBody.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Pulls/Item/UpdateBranch/UpdateBranchPutRequestBody.cs new file mode 100644 index 0000000..d465bfc --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Pulls/Item/UpdateBranch/UpdateBranchPutRequestBody.cs @@ -0,0 +1,65 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.Pulls.Item.UpdateBranch +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class UpdateBranchPutRequestBody : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// 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/rest/commits/commits#list-commits)" endpoint to find the most recent commit SHA. Default: SHA of the pull request's current HEAD ref. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? ExpectedHeadSha { get; set; } +#nullable restore +#else + public string ExpectedHeadSha { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public UpdateBranchPutRequestBody() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Repos.Item.Item.Pulls.Item.UpdateBranch.UpdateBranchPutRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Repos.Item.Item.Pulls.Item.UpdateBranch.UpdateBranchPutRequestBody(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "expected_head_sha", n => { ExpectedHeadSha = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("expected_head_sha", ExpectedHeadSha); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Pulls/Item/UpdateBranch/UpdateBranchPutResponse.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Pulls/Item/UpdateBranch/UpdateBranchPutResponse.cs new file mode 100644 index 0000000..c3add59 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Pulls/Item/UpdateBranch/UpdateBranchPutResponse.cs @@ -0,0 +1,75 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.Pulls.Item.UpdateBranch +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class UpdateBranchPutResponse : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The message property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Message { get; set; } +#nullable restore +#else + public string Message { get; set; } +#endif + /// The url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Url { get; set; } +#nullable restore +#else + public string Url { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public UpdateBranchPutResponse() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Repos.Item.Item.Pulls.Item.UpdateBranch.UpdateBranchPutResponse CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Repos.Item.Item.Pulls.Item.UpdateBranch.UpdateBranchPutResponse(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "message", n => { Message = n.GetStringValue(); } }, + { "url", n => { Url = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("message", Message); + writer.WriteStringValue("url", Url); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Pulls/Item/UpdateBranch/UpdateBranchRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Pulls/Item/UpdateBranch/UpdateBranchRequestBuilder.cs new file mode 100644 index 0000000..1c87f85 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Pulls/Item/UpdateBranch/UpdateBranchRequestBuilder.cs @@ -0,0 +1,134 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.Pulls.Item.UpdateBranch +{ + /// + /// Builds and executes requests for operations under \repos\{owner-id}\{repo-id}\pulls\{pull_number}\update-branch + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class UpdateBranchRequestBuilder : BaseRequestBuilder + { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public UpdateBranchRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/pulls/{pull_number}/update-branch", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public UpdateBranchRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/pulls/{pull_number}/update-branch", rawUrl) + { + } + /// + /// Updates the pull request branch with the latest upstream changes by merging HEAD from the base branch into the pull request branch.Note: If making a request on behalf of a GitHub App you must also have permissions to write the contents of the head repository. + /// API method documentation + /// + /// A + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 403 status code + /// When receiving a 422 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PutAsUpdateBranchPutResponseAsync(global::Ayllu.Github.Client.Repos.Item.Item.Pulls.Item.UpdateBranch.UpdateBranchPutRequestBody body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task PutAsUpdateBranchPutResponseAsync(global::Ayllu.Github.Client.Repos.Item.Item.Pulls.Item.UpdateBranch.UpdateBranchPutRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPutRequestInformation(body, requestConfiguration); + var errorMapping = new Dictionary> + { + { "403", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "422", global::Ayllu.Github.Client.Models.ValidationError.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Repos.Item.Item.Pulls.Item.UpdateBranch.UpdateBranchPutResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// Updates the pull request branch with the latest upstream changes by merging HEAD from the base branch into the pull request branch.Note: If making a request on behalf of a GitHub App you must also have permissions to write the contents of the head repository. + /// API method documentation + /// + /// A + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 403 status code + /// When receiving a 422 status code + [Obsolete("This method is obsolete. Use PutAsUpdateBranchPutResponseAsync instead.")] +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PutAsync(global::Ayllu.Github.Client.Repos.Item.Item.Pulls.Item.UpdateBranch.UpdateBranchPutRequestBody body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task PutAsync(global::Ayllu.Github.Client.Repos.Item.Item.Pulls.Item.UpdateBranch.UpdateBranchPutRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPutRequestInformation(body, requestConfiguration); + var errorMapping = new Dictionary> + { + { "403", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "422", global::Ayllu.Github.Client.Models.ValidationError.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Repos.Item.Item.Pulls.Item.UpdateBranch.UpdateBranchResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// Updates the pull request branch with the latest upstream changes by merging HEAD from the base branch into the pull request branch.Note: If making a request on behalf of a GitHub App you must also have permissions to write the contents of the head repository. + /// + /// A + /// The request body + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPutRequestInformation(global::Ayllu.Github.Client.Repos.Item.Item.Pulls.Item.UpdateBranch.UpdateBranchPutRequestBody body, Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToPutRequestInformation(global::Ayllu.Github.Client.Repos.Item.Item.Pulls.Item.UpdateBranch.UpdateBranchPutRequestBody body, Action> requestConfiguration = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation(Method.PUT, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.Repos.Item.Item.Pulls.Item.UpdateBranch.UpdateBranchRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Repos.Item.Item.Pulls.Item.UpdateBranch.UpdateBranchRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class UpdateBranchRequestBuilderPutRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Pulls/Item/UpdateBranch/UpdateBranchResponse.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Pulls/Item/UpdateBranch/UpdateBranchResponse.cs new file mode 100644 index 0000000..ae610bf --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Pulls/Item/UpdateBranch/UpdateBranchResponse.cs @@ -0,0 +1,28 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.Pulls.Item.UpdateBranch +{ + [Obsolete("This class is obsolete. Use UpdateBranchPutResponse instead.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class UpdateBranchResponse : global::Ayllu.Github.Client.Repos.Item.Item.Pulls.Item.UpdateBranch.UpdateBranchPutResponse, IParsable + #pragma warning restore CS1591 + { + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static new global::Ayllu.Github.Client.Repos.Item.Item.Pulls.Item.UpdateBranch.UpdateBranchResponse CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Repos.Item.Item.Pulls.Item.UpdateBranch.UpdateBranchResponse(); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Pulls/Item/WithPull_numberItemRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Pulls/Item/WithPull_numberItemRequestBuilder.cs new file mode 100644 index 0000000..93509e3 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Pulls/Item/WithPull_numberItemRequestBuilder.cs @@ -0,0 +1,210 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Ayllu.Github.Client.Repos.Item.Item.Pulls.Item.Codespaces; +using Ayllu.Github.Client.Repos.Item.Item.Pulls.Item.Comments; +using Ayllu.Github.Client.Repos.Item.Item.Pulls.Item.Commits; +using Ayllu.Github.Client.Repos.Item.Item.Pulls.Item.Files; +using Ayllu.Github.Client.Repos.Item.Item.Pulls.Item.Merge; +using Ayllu.Github.Client.Repos.Item.Item.Pulls.Item.Requested_reviewers; +using Ayllu.Github.Client.Repos.Item.Item.Pulls.Item.Reviews; +using Ayllu.Github.Client.Repos.Item.Item.Pulls.Item.UpdateBranch; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.Pulls.Item +{ + /// + /// Builds and executes requests for operations under \repos\{owner-id}\{repo-id}\pulls\{pull_number} + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithPull_numberItemRequestBuilder : BaseRequestBuilder + { + /// The codespaces property + public global::Ayllu.Github.Client.Repos.Item.Item.Pulls.Item.Codespaces.CodespacesRequestBuilder Codespaces + { + get => new global::Ayllu.Github.Client.Repos.Item.Item.Pulls.Item.Codespaces.CodespacesRequestBuilder(PathParameters, RequestAdapter); + } + /// The comments property + public global::Ayllu.Github.Client.Repos.Item.Item.Pulls.Item.Comments.CommentsRequestBuilder Comments + { + get => new global::Ayllu.Github.Client.Repos.Item.Item.Pulls.Item.Comments.CommentsRequestBuilder(PathParameters, RequestAdapter); + } + /// The commits property + public global::Ayllu.Github.Client.Repos.Item.Item.Pulls.Item.Commits.CommitsRequestBuilder Commits + { + get => new global::Ayllu.Github.Client.Repos.Item.Item.Pulls.Item.Commits.CommitsRequestBuilder(PathParameters, RequestAdapter); + } + /// The files property + public global::Ayllu.Github.Client.Repos.Item.Item.Pulls.Item.Files.FilesRequestBuilder Files + { + get => new global::Ayllu.Github.Client.Repos.Item.Item.Pulls.Item.Files.FilesRequestBuilder(PathParameters, RequestAdapter); + } + /// The merge property + public global::Ayllu.Github.Client.Repos.Item.Item.Pulls.Item.Merge.MergeRequestBuilder Merge + { + get => new global::Ayllu.Github.Client.Repos.Item.Item.Pulls.Item.Merge.MergeRequestBuilder(PathParameters, RequestAdapter); + } + /// The requested_reviewers property + public global::Ayllu.Github.Client.Repos.Item.Item.Pulls.Item.Requested_reviewers.Requested_reviewersRequestBuilder Requested_reviewers + { + get => new global::Ayllu.Github.Client.Repos.Item.Item.Pulls.Item.Requested_reviewers.Requested_reviewersRequestBuilder(PathParameters, RequestAdapter); + } + /// The reviews property + public global::Ayllu.Github.Client.Repos.Item.Item.Pulls.Item.Reviews.ReviewsRequestBuilder Reviews + { + get => new global::Ayllu.Github.Client.Repos.Item.Item.Pulls.Item.Reviews.ReviewsRequestBuilder(PathParameters, RequestAdapter); + } + /// The updateBranch property + public global::Ayllu.Github.Client.Repos.Item.Item.Pulls.Item.UpdateBranch.UpdateBranchRequestBuilder UpdateBranch + { + get => new global::Ayllu.Github.Client.Repos.Item.Item.Pulls.Item.UpdateBranch.UpdateBranchRequestBuilder(PathParameters, RequestAdapter); + } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public WithPull_numberItemRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/pulls/{pull_number}", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public WithPull_numberItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/pulls/{pull_number}", rawUrl) + { + } + /// + /// Draft pull requests are available in public repositories with GitHub Free and GitHub Free for organizations, GitHub Pro, and legacy per-repository billing plans, and in public and private repositories with GitHub Team and GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation.Lists details of a pull request by providing its number.When you get, [create](https://docs.github.com/rest/pulls/pulls/#create-a-pull-request), or [edit](https://docs.github.com/rest/pulls/pulls#update-a-pull-request) a pull request, GitHub creates a merge commit to test whether the pull request can be automatically merged into the base branch. This test commit is not added to the base branch or the head branch. You can review the status of the test commit using the `mergeable` key. For more information, see "[Checking mergeability of pull requests](https://docs.github.com/rest/guides/getting-started-with-the-git-database-api#checking-mergeability-of-pull-requests)".The value of the `mergeable` attribute can be `true`, `false`, or `null`. If the value is `null`, then GitHub has started a background job to compute the mergeability. After giving the job time to complete, resubmit the request. When the job finishes, you will see a non-`null` value for the `mergeable` attribute in the response. If `mergeable` is `true`, then `merge_commit_sha` will be the SHA of the _test_ merge commit.The value of the `merge_commit_sha` attribute changes depending on the state of the pull request. Before merging a pull request, the `merge_commit_sha` attribute holds the SHA of the _test_ merge commit. After merging a pull request, the `merge_commit_sha` attribute changes depending on how you merged the pull request:* If merged as a [merge commit](https://docs.github.com/articles/about-merge-methods-on-github/), `merge_commit_sha` represents the SHA of the merge commit.* If merged via a [squash](https://docs.github.com/articles/about-merge-methods-on-github/#squashing-your-merge-commits), `merge_commit_sha` represents the SHA of the squashed commit on the base branch.* If [rebased](https://docs.github.com/articles/about-merge-methods-on-github/#rebasing-and-merging-your-commits), `merge_commit_sha` represents the commit that the base branch was updated to.Pass the appropriate [media type](https://docs.github.com/rest/using-the-rest-api/getting-started-with-the-rest-api#media-types) to fetch diff and patch formats.This endpoint supports the following custom media types. For more information, see "[Media types](https://docs.github.com/rest/using-the-rest-api/getting-started-with-the-rest-api#media-types)."- **`application/vnd.github.raw+json`**: Returns the raw markdown body. Response will include `body`. This is the default if you do not pass any specific media type.- **`application/vnd.github.text+json`**: Returns a text only representation of the markdown body. Response will include `body_text`.- **`application/vnd.github.html+json`**: Returns HTML rendered from the body's markdown. Response will include `body_html`.- **`application/vnd.github.full+json`**: Returns raw, text, and HTML representations. Response will include `body`, `body_text`, and `body_html`.- **`application/vnd.github.diff`**: For more information, see "[git-diff](https://git-scm.com/docs/git-diff)" in the Git documentation. If a diff is corrupt, contact us through the [GitHub Support portal](https://support.github.com/). Include the repository name and pull request ID in your message. + /// API method documentation + /// + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 404 status code + /// When receiving a 406 status code + /// When receiving a 500 status code + /// When receiving a 503 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "404", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "406", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "500", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "503", global::Ayllu.Github.Client.Models.PullRequest503Error.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Models.PullRequest.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// Draft pull requests are available in public repositories with GitHub Free and GitHub Free for organizations, GitHub Pro, and legacy per-repository billing plans, and in public and private repositories with GitHub Team and GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation.To open or update a pull request in a public repository, you must have write access to the head or the source branch. For organization-owned repositories, you must be a member of the organization that owns the repository to open or update a pull request.This endpoint supports the following custom media types. For more information, see "[Media types](https://docs.github.com/rest/using-the-rest-api/getting-started-with-the-rest-api#media-types)."- **`application/vnd.github.raw+json`**: Returns the raw markdown body. Response will include `body`. This is the default if you do not pass any specific media type.- **`application/vnd.github.text+json`**: Returns a text only representation of the markdown body. Response will include `body_text`.- **`application/vnd.github.html+json`**: Returns HTML rendered from the body's markdown. Response will include `body_html`.- **`application/vnd.github.full+json`**: Returns raw, text, and HTML representations. Response will include `body`, `body_text`, and `body_html`. + /// API method documentation + /// + /// A + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 403 status code + /// When receiving a 422 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PatchAsync(global::Ayllu.Github.Client.Repos.Item.Item.Pulls.Item.WithPull_numberPatchRequestBody body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task PatchAsync(global::Ayllu.Github.Client.Repos.Item.Item.Pulls.Item.WithPull_numberPatchRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPatchRequestInformation(body, requestConfiguration); + var errorMapping = new Dictionary> + { + { "403", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "422", global::Ayllu.Github.Client.Models.ValidationError.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Models.PullRequest.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// Draft pull requests are available in public repositories with GitHub Free and GitHub Free for organizations, GitHub Pro, and legacy per-repository billing plans, and in public and private repositories with GitHub Team and GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation.Lists details of a pull request by providing its number.When you get, [create](https://docs.github.com/rest/pulls/pulls/#create-a-pull-request), or [edit](https://docs.github.com/rest/pulls/pulls#update-a-pull-request) a pull request, GitHub creates a merge commit to test whether the pull request can be automatically merged into the base branch. This test commit is not added to the base branch or the head branch. You can review the status of the test commit using the `mergeable` key. For more information, see "[Checking mergeability of pull requests](https://docs.github.com/rest/guides/getting-started-with-the-git-database-api#checking-mergeability-of-pull-requests)".The value of the `mergeable` attribute can be `true`, `false`, or `null`. If the value is `null`, then GitHub has started a background job to compute the mergeability. After giving the job time to complete, resubmit the request. When the job finishes, you will see a non-`null` value for the `mergeable` attribute in the response. If `mergeable` is `true`, then `merge_commit_sha` will be the SHA of the _test_ merge commit.The value of the `merge_commit_sha` attribute changes depending on the state of the pull request. Before merging a pull request, the `merge_commit_sha` attribute holds the SHA of the _test_ merge commit. After merging a pull request, the `merge_commit_sha` attribute changes depending on how you merged the pull request:* If merged as a [merge commit](https://docs.github.com/articles/about-merge-methods-on-github/), `merge_commit_sha` represents the SHA of the merge commit.* If merged via a [squash](https://docs.github.com/articles/about-merge-methods-on-github/#squashing-your-merge-commits), `merge_commit_sha` represents the SHA of the squashed commit on the base branch.* If [rebased](https://docs.github.com/articles/about-merge-methods-on-github/#rebasing-and-merging-your-commits), `merge_commit_sha` represents the commit that the base branch was updated to.Pass the appropriate [media type](https://docs.github.com/rest/using-the-rest-api/getting-started-with-the-rest-api#media-types) to fetch diff and patch formats.This endpoint supports the following custom media types. For more information, see "[Media types](https://docs.github.com/rest/using-the-rest-api/getting-started-with-the-rest-api#media-types)."- **`application/vnd.github.raw+json`**: Returns the raw markdown body. Response will include `body`. This is the default if you do not pass any specific media type.- **`application/vnd.github.text+json`**: Returns a text only representation of the markdown body. Response will include `body_text`.- **`application/vnd.github.html+json`**: Returns HTML rendered from the body's markdown. Response will include `body_html`.- **`application/vnd.github.full+json`**: Returns raw, text, and HTML representations. Response will include `body`, `body_text`, and `body_html`.- **`application/vnd.github.diff`**: For more information, see "[git-diff](https://git-scm.com/docs/git-diff)" in the Git documentation. If a diff is corrupt, contact us through the [GitHub Support portal](https://support.github.com/). Include the repository name and pull request ID in your message. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Draft pull requests are available in public repositories with GitHub Free and GitHub Free for organizations, GitHub Pro, and legacy per-repository billing plans, and in public and private repositories with GitHub Team and GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation.To open or update a pull request in a public repository, you must have write access to the head or the source branch. For organization-owned repositories, you must be a member of the organization that owns the repository to open or update a pull request.This endpoint supports the following custom media types. For more information, see "[Media types](https://docs.github.com/rest/using-the-rest-api/getting-started-with-the-rest-api#media-types)."- **`application/vnd.github.raw+json`**: Returns the raw markdown body. Response will include `body`. This is the default if you do not pass any specific media type.- **`application/vnd.github.text+json`**: Returns a text only representation of the markdown body. Response will include `body_text`.- **`application/vnd.github.html+json`**: Returns HTML rendered from the body's markdown. Response will include `body_html`.- **`application/vnd.github.full+json`**: Returns raw, text, and HTML representations. Response will include `body`, `body_text`, and `body_html`. + /// + /// A + /// The request body + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPatchRequestInformation(global::Ayllu.Github.Client.Repos.Item.Item.Pulls.Item.WithPull_numberPatchRequestBody body, Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToPatchRequestInformation(global::Ayllu.Github.Client.Repos.Item.Item.Pulls.Item.WithPull_numberPatchRequestBody body, Action> requestConfiguration = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.Repos.Item.Item.Pulls.Item.WithPull_numberItemRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Repos.Item.Item.Pulls.Item.WithPull_numberItemRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithPull_numberItemRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithPull_numberItemRequestBuilderPatchRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Pulls/Item/WithPull_numberPatchRequestBody.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Pulls/Item/WithPull_numberPatchRequestBody.cs new file mode 100644 index 0000000..6f2bf00 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Pulls/Item/WithPull_numberPatchRequestBody.cs @@ -0,0 +1,93 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.Pulls.Item +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class WithPull_numberPatchRequestBody : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// 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. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Base { get; set; } +#nullable restore +#else + public string Base { get; set; } +#endif + /// The contents of the pull request. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Body { get; set; } +#nullable restore +#else + public string Body { get; set; } +#endif + /// Indicates whether [maintainers can modify](https://docs.github.com/articles/allowing-changes-to-a-pull-request-branch-created-from-a-fork/) the pull request. + public bool? MaintainerCanModify { get; set; } + /// State of this Pull Request. Either `open` or `closed`. + public global::Ayllu.Github.Client.Repos.Item.Item.Pulls.Item.WithPull_numberPatchRequestBody_state? State { get; set; } + /// The title of the pull request. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Title { get; set; } +#nullable restore +#else + public string Title { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public WithPull_numberPatchRequestBody() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Repos.Item.Item.Pulls.Item.WithPull_numberPatchRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Repos.Item.Item.Pulls.Item.WithPull_numberPatchRequestBody(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "base", n => { Base = n.GetStringValue(); } }, + { "body", n => { Body = n.GetStringValue(); } }, + { "maintainer_can_modify", n => { MaintainerCanModify = n.GetBoolValue(); } }, + { "state", n => { State = n.GetEnumValue(); } }, + { "title", n => { Title = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("base", Base); + writer.WriteStringValue("body", Body); + writer.WriteBoolValue("maintainer_can_modify", MaintainerCanModify); + writer.WriteEnumValue("state", State); + writer.WriteStringValue("title", Title); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Pulls/Item/WithPull_numberPatchRequestBody_state.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Pulls/Item/WithPull_numberPatchRequestBody_state.cs new file mode 100644 index 0000000..7000fa7 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Pulls/Item/WithPull_numberPatchRequestBody_state.cs @@ -0,0 +1,19 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.Pulls.Item +{ + /// State of this Pull Request. Either `open` or `closed`. + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public enum WithPull_numberPatchRequestBody_state + { + [EnumMember(Value = "open")] + #pragma warning disable CS1591 + Open, + #pragma warning restore CS1591 + [EnumMember(Value = "closed")] + #pragma warning disable CS1591 + Closed, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Pulls/PullsPostRequestBody.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Pulls/PullsPostRequestBody.cs new file mode 100644 index 0000000..43d3a6a --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Pulls/PullsPostRequestBody.cs @@ -0,0 +1,117 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.Pulls +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class PullsPostRequestBody : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// 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. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Base { get; set; } +#nullable restore +#else + public string Base { get; set; } +#endif + /// The contents of the pull request. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Body { get; set; } +#nullable restore +#else + public string Body { get; set; } +#endif + /// Indicates whether the pull request is a draft. See "[Draft Pull Requests](https://docs.github.com/articles/about-pull-requests#draft-pull-requests)" in the GitHub Help documentation to learn more. + public bool? Draft { get; set; } + /// 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`. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Head { get; set; } +#nullable restore +#else + public string Head { get; set; } +#endif + /// 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. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? HeadRepo { get; set; } +#nullable restore +#else + public string HeadRepo { get; set; } +#endif + /// 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. + public long? Issue { get; set; } + /// Indicates whether [maintainers can modify](https://docs.github.com/articles/allowing-changes-to-a-pull-request-branch-created-from-a-fork/) the pull request. + public bool? MaintainerCanModify { get; set; } + /// The title of the new pull request. Required unless `issue` is specified. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Title { get; set; } +#nullable restore +#else + public string Title { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public PullsPostRequestBody() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Repos.Item.Item.Pulls.PullsPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Repos.Item.Item.Pulls.PullsPostRequestBody(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "base", n => { Base = n.GetStringValue(); } }, + { "body", n => { Body = n.GetStringValue(); } }, + { "draft", n => { Draft = n.GetBoolValue(); } }, + { "head", n => { Head = n.GetStringValue(); } }, + { "head_repo", n => { HeadRepo = n.GetStringValue(); } }, + { "issue", n => { Issue = n.GetLongValue(); } }, + { "maintainer_can_modify", n => { MaintainerCanModify = n.GetBoolValue(); } }, + { "title", n => { Title = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("base", Base); + writer.WriteStringValue("body", Body); + writer.WriteBoolValue("draft", Draft); + writer.WriteStringValue("head", Head); + writer.WriteStringValue("head_repo", HeadRepo); + writer.WriteLongValue("issue", Issue); + writer.WriteBoolValue("maintainer_can_modify", MaintainerCanModify); + writer.WriteStringValue("title", Title); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Pulls/PullsRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Pulls/PullsRequestBuilder.cs new file mode 100644 index 0000000..847c419 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Pulls/PullsRequestBuilder.cs @@ -0,0 +1,264 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Ayllu.Github.Client.Repos.Item.Item.Pulls.Comments; +using Ayllu.Github.Client.Repos.Item.Item.Pulls.Item; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.Pulls +{ + /// + /// Builds and executes requests for operations under \repos\{owner-id}\{repo-id}\pulls + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class PullsRequestBuilder : BaseRequestBuilder + { + /// The comments property + public global::Ayllu.Github.Client.Repos.Item.Item.Pulls.Comments.CommentsRequestBuilder Comments + { + get => new global::Ayllu.Github.Client.Repos.Item.Item.Pulls.Comments.CommentsRequestBuilder(PathParameters, RequestAdapter); + } + /// Gets an item from the Ayllu.Github.Client.repos.item.item.pulls.item collection + /// The number that identifies the pull request. + /// A + public global::Ayllu.Github.Client.Repos.Item.Item.Pulls.Item.WithPull_numberItemRequestBuilder this[int position] + { + get + { + var urlTplParams = new Dictionary(PathParameters); + urlTplParams.Add("pull_number", position); + return new global::Ayllu.Github.Client.Repos.Item.Item.Pulls.Item.WithPull_numberItemRequestBuilder(urlTplParams, RequestAdapter); + } + } + /// Gets an item from the Ayllu.Github.Client.repos.item.item.pulls.item collection + /// The number that identifies the pull request. + /// A + [Obsolete("This indexer is deprecated and will be removed in the next major version. Use the one with the typed parameter instead.")] + public global::Ayllu.Github.Client.Repos.Item.Item.Pulls.Item.WithPull_numberItemRequestBuilder this[string position] + { + get + { + var urlTplParams = new Dictionary(PathParameters); + if (!string.IsNullOrWhiteSpace(position)) urlTplParams.Add("pull_number", position); + return new global::Ayllu.Github.Client.Repos.Item.Item.Pulls.Item.WithPull_numberItemRequestBuilder(urlTplParams, RequestAdapter); + } + } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public PullsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/pulls{?base*,direction*,head*,page*,per_page*,sort*,state*}", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public PullsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/pulls{?base*,direction*,head*,page*,per_page*,sort*,state*}", rawUrl) + { + } + /// + /// 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/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/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`. + /// API method documentation + /// + /// A List<global::Ayllu.Github.Client.Models.PullRequestSimple> + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 422 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task?> GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task> GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "422", global::Ayllu.Github.Client.Models.ValidationError.CreateFromDiscriminatorValue }, + }; + var collectionResult = await RequestAdapter.SendCollectionAsync(requestInfo, global::Ayllu.Github.Client.Models.PullRequestSimple.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + return collectionResult?.AsList(); + } + /// + /// Draft pull requests are available in public repositories with GitHub Free and GitHub Free for organizations, GitHub Pro, and legacy per-repository billing plans, and in public and private repositories with GitHub Team and GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation.To open or update a pull request in a public repository, you must have write access to the head or the source branch. For organization-owned repositories, you must be a member of the organization that owns the repository to open or update a pull request.This endpoint triggers [notifications](https://docs.github.com/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. For more information, see "[Rate limits for the API](https://docs.github.com/rest/using-the-rest-api/rate-limits-for-the-rest-api#about-secondary-rate-limits)" and "[Best practices for using the REST API](https://docs.github.com/rest/guides/best-practices-for-using-the-rest-api)."This endpoint supports the following custom media types. For more information, see "[Media types](https://docs.github.com/rest/using-the-rest-api/getting-started-with-the-rest-api#media-types)."- **`application/vnd.github.raw+json`**: Returns the raw markdown body. Response will include `body`. This is the default if you do not pass any specific media type.- **`application/vnd.github.text+json`**: Returns a text only representation of the markdown body. Response will include `body_text`.- **`application/vnd.github.html+json`**: Returns HTML rendered from the body's markdown. Response will include `body_html`.- **`application/vnd.github.full+json`**: Returns raw, text, and HTML representations. Response will include `body`, `body_text`, and `body_html`. + /// API method documentation + /// + /// A + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 403 status code + /// When receiving a 422 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PostAsync(global::Ayllu.Github.Client.Repos.Item.Item.Pulls.PullsPostRequestBody body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task PostAsync(global::Ayllu.Github.Client.Repos.Item.Item.Pulls.PullsPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPostRequestInformation(body, requestConfiguration); + var errorMapping = new Dictionary> + { + { "403", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "422", global::Ayllu.Github.Client.Models.ValidationError.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Models.PullRequest.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// 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/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/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`. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Draft pull requests are available in public repositories with GitHub Free and GitHub Free for organizations, GitHub Pro, and legacy per-repository billing plans, and in public and private repositories with GitHub Team and GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation.To open or update a pull request in a public repository, you must have write access to the head or the source branch. For organization-owned repositories, you must be a member of the organization that owns the repository to open or update a pull request.This endpoint triggers [notifications](https://docs.github.com/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. For more information, see "[Rate limits for the API](https://docs.github.com/rest/using-the-rest-api/rate-limits-for-the-rest-api#about-secondary-rate-limits)" and "[Best practices for using the REST API](https://docs.github.com/rest/guides/best-practices-for-using-the-rest-api)."This endpoint supports the following custom media types. For more information, see "[Media types](https://docs.github.com/rest/using-the-rest-api/getting-started-with-the-rest-api#media-types)."- **`application/vnd.github.raw+json`**: Returns the raw markdown body. Response will include `body`. This is the default if you do not pass any specific media type.- **`application/vnd.github.text+json`**: Returns a text only representation of the markdown body. Response will include `body_text`.- **`application/vnd.github.html+json`**: Returns HTML rendered from the body's markdown. Response will include `body_html`.- **`application/vnd.github.full+json`**: Returns raw, text, and HTML representations. Response will include `body`, `body_text`, and `body_html`. + /// + /// A + /// The request body + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPostRequestInformation(global::Ayllu.Github.Client.Repos.Item.Item.Pulls.PullsPostRequestBody body, Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToPostRequestInformation(global::Ayllu.Github.Client.Repos.Item.Item.Pulls.PullsPostRequestBody body, Action> requestConfiguration = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.Repos.Item.Item.Pulls.PullsRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Repos.Item.Item.Pulls.PullsRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// 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/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/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`. + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class PullsRequestBuilderGetQueryParameters + { + /// Filter pulls by base branch name. Example: `gh-pages`. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("base")] + public string? Base { get; set; } +#nullable restore +#else + [QueryParameter("base")] + public string Base { get; set; } +#endif + /// The direction of the sort. Default: `desc` when sort is `created` or sort is not specified, otherwise `asc`. + [Obsolete("This property is deprecated, use DirectionAsGetDirectionQueryParameterType instead")] +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("direction")] + public string? Direction { get; set; } +#nullable restore +#else + [QueryParameter("direction")] + public string Direction { get; set; } +#endif + /// The direction of the sort. Default: `desc` when sort is `created` or sort is not specified, otherwise `asc`. + [QueryParameter("direction")] + public global::Ayllu.Github.Client.Repos.Item.Item.Pulls.GetDirectionQueryParameterType? DirectionAsGetDirectionQueryParameterType { get; set; } + /// 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`. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("head")] + public string? Head { get; set; } +#nullable restore +#else + [QueryParameter("head")] + public string Head { get; set; } +#endif + /// The page number of the results to fetch. For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." + [QueryParameter("page")] + public int? Page { get; set; } + /// The number of results per page (max 100). For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." + [QueryParameter("per_page")] + public int? PerPage { get; set; } + /// 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. + [Obsolete("This property is deprecated, use SortAsGetSortQueryParameterType instead")] +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("sort")] + public string? Sort { get; set; } +#nullable restore +#else + [QueryParameter("sort")] + public string Sort { get; set; } +#endif + /// 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. + [QueryParameter("sort")] + public global::Ayllu.Github.Client.Repos.Item.Item.Pulls.GetSortQueryParameterType? SortAsGetSortQueryParameterType { get; set; } + /// Either `open`, `closed`, or `all` to filter by state. + [Obsolete("This property is deprecated, use StateAsGetStateQueryParameterType instead")] +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("state")] + public string? State { get; set; } +#nullable restore +#else + [QueryParameter("state")] + public string State { get; set; } +#endif + /// Either `open`, `closed`, or `all` to filter by state. + [QueryParameter("state")] + public global::Ayllu.Github.Client.Repos.Item.Item.Pulls.GetStateQueryParameterType? StateAsGetStateQueryParameterType { get; set; } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class PullsRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class PullsRequestBuilderPostRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Readme/Item/WithDirItemRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Readme/Item/WithDirItemRequestBuilder.cs new file mode 100644 index 0000000..36b8a38 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Readme/Item/WithDirItemRequestBuilder.cs @@ -0,0 +1,117 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.Readme.Item +{ + /// + /// Builds and executes requests for operations under \repos\{owner-id}\{repo-id}\readme\{dir} + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithDirItemRequestBuilder : BaseRequestBuilder + { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public WithDirItemRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/readme/{dir}{?ref*}", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public WithDirItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/readme/{dir}{?ref*}", rawUrl) + { + } + /// + /// 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/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). + /// API method documentation + /// + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 404 status code + /// When receiving a 422 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "404", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "422", global::Ayllu.Github.Client.Models.ValidationError.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Models.ContentFile.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// 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/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). + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.Repos.Item.Item.Readme.Item.WithDirItemRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Repos.Item.Item.Readme.Item.WithDirItemRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// 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/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). + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithDirItemRequestBuilderGetQueryParameters + { + /// The name of the commit/branch/tag. Default: the repository’s default branch. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("ref")] + public string? Ref { get; set; } +#nullable restore +#else + [QueryParameter("ref")] + public string Ref { get; set; } +#endif + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithDirItemRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Readme/ReadmeRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Readme/ReadmeRequestBuilder.cs new file mode 100644 index 0000000..3382a42 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Readme/ReadmeRequestBuilder.cs @@ -0,0 +1,130 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Ayllu.Github.Client.Repos.Item.Item.Readme.Item; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.Readme +{ + /// + /// Builds and executes requests for operations under \repos\{owner-id}\{repo-id}\readme + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class ReadmeRequestBuilder : BaseRequestBuilder + { + /// Gets an item from the Ayllu.Github.Client.repos.item.item.readme.item collection + /// The alternate path to look for a README file + /// A + public global::Ayllu.Github.Client.Repos.Item.Item.Readme.Item.WithDirItemRequestBuilder this[string position] + { + get + { + var urlTplParams = new Dictionary(PathParameters); + urlTplParams.Add("dir", position); + return new global::Ayllu.Github.Client.Repos.Item.Item.Readme.Item.WithDirItemRequestBuilder(urlTplParams, RequestAdapter); + } + } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public ReadmeRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/readme{?ref*}", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public ReadmeRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/readme{?ref*}", rawUrl) + { + } + /// + /// 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/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). + /// API method documentation + /// + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 404 status code + /// When receiving a 422 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "404", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "422", global::Ayllu.Github.Client.Models.ValidationError.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Models.ContentFile.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// 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/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). + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.Repos.Item.Item.Readme.ReadmeRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Repos.Item.Item.Readme.ReadmeRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// 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/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). + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class ReadmeRequestBuilderGetQueryParameters + { + /// The name of the commit/branch/tag. Default: the repository’s default branch. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("ref")] + public string? Ref { get; set; } +#nullable restore +#else + [QueryParameter("ref")] + public string Ref { get; set; } +#endif + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class ReadmeRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Releases/Assets/AssetsRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Releases/Assets/AssetsRequestBuilder.cs new file mode 100644 index 0000000..6e64211 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Releases/Assets/AssetsRequestBuilder.cs @@ -0,0 +1,61 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Repos.Item.Item.Releases.Assets.Item; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.Releases.Assets +{ + /// + /// Builds and executes requests for operations under \repos\{owner-id}\{repo-id}\releases\assets + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class AssetsRequestBuilder : BaseRequestBuilder + { + /// Gets an item from the Ayllu.Github.Client.repos.item.item.releases.assets.item collection + /// The unique identifier of the asset. + /// A + public global::Ayllu.Github.Client.Repos.Item.Item.Releases.Assets.Item.WithAsset_ItemRequestBuilder this[int position] + { + get + { + var urlTplParams = new Dictionary(PathParameters); + urlTplParams.Add("asset_id", position); + return new global::Ayllu.Github.Client.Repos.Item.Item.Releases.Assets.Item.WithAsset_ItemRequestBuilder(urlTplParams, RequestAdapter); + } + } + /// Gets an item from the Ayllu.Github.Client.repos.item.item.releases.assets.item collection + /// The unique identifier of the asset. + /// A + [Obsolete("This indexer is deprecated and will be removed in the next major version. Use the one with the typed parameter instead.")] + public global::Ayllu.Github.Client.Repos.Item.Item.Releases.Assets.Item.WithAsset_ItemRequestBuilder this[string position] + { + get + { + var urlTplParams = new Dictionary(PathParameters); + if (!string.IsNullOrWhiteSpace(position)) urlTplParams.Add("asset_id", position); + return new global::Ayllu.Github.Client.Repos.Item.Item.Releases.Assets.Item.WithAsset_ItemRequestBuilder(urlTplParams, RequestAdapter); + } + } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public AssetsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/releases/assets", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public AssetsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/releases/assets", rawUrl) + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Releases/Assets/Item/WithAsset_ItemRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Releases/Assets/Item/WithAsset_ItemRequestBuilder.cs new file mode 100644 index 0000000..4ae200c --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Releases/Assets/Item/WithAsset_ItemRequestBuilder.cs @@ -0,0 +1,190 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.Releases.Assets.Item +{ + /// + /// Builds and executes requests for operations under \repos\{owner-id}\{repo-id}\releases\assets\{asset_id} + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithAsset_ItemRequestBuilder : BaseRequestBuilder + { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public WithAsset_ItemRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/releases/assets/{asset_id}", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public WithAsset_ItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/releases/assets/{asset_id}", rawUrl) + { + } + /// + /// Delete a release asset + /// API method documentation + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task DeleteAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task DeleteAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToDeleteRequestInformation(requestConfiguration); + await RequestAdapter.SendNoContentAsync(requestInfo, default, cancellationToken).ConfigureAwait(false); + } + /// + /// To download the asset's binary content:- If within a browser, fetch the location specified in the `browser_download_url` key provided in the response.- Alternatively, set the `Accept` header of the request to [`application/octet-stream`](https://docs.github.com/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. + /// API method documentation + /// + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 404 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "404", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Models.ReleaseAsset.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// Users with push access to the repository can edit a release asset. + /// API method documentation + /// + /// A + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PatchAsync(global::Ayllu.Github.Client.Repos.Item.Item.Releases.Assets.Item.WithAsset_PatchRequestBody body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task PatchAsync(global::Ayllu.Github.Client.Repos.Item.Item.Releases.Assets.Item.WithAsset_PatchRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPatchRequestInformation(body, requestConfiguration); + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Models.ReleaseAsset.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false); + } + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToDeleteRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToDeleteRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.DELETE, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + return requestInfo; + } + /// + /// To download the asset's binary content:- If within a browser, fetch the location specified in the `browser_download_url` key provided in the response.- Alternatively, set the `Accept` header of the request to [`application/octet-stream`](https://docs.github.com/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. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Users with push access to the repository can edit a release asset. + /// + /// A + /// The request body + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPatchRequestInformation(global::Ayllu.Github.Client.Repos.Item.Item.Releases.Assets.Item.WithAsset_PatchRequestBody body, Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToPatchRequestInformation(global::Ayllu.Github.Client.Repos.Item.Item.Releases.Assets.Item.WithAsset_PatchRequestBody body, Action> requestConfiguration = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.Repos.Item.Item.Releases.Assets.Item.WithAsset_ItemRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Repos.Item.Item.Releases.Assets.Item.WithAsset_ItemRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithAsset_ItemRequestBuilderDeleteRequestConfiguration : RequestConfiguration + { + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithAsset_ItemRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithAsset_ItemRequestBuilderPatchRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Releases/Assets/Item/WithAsset_PatchRequestBody.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Releases/Assets/Item/WithAsset_PatchRequestBody.cs new file mode 100644 index 0000000..c5b994d --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Releases/Assets/Item/WithAsset_PatchRequestBody.cs @@ -0,0 +1,85 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.Releases.Assets.Item +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class WithAsset_PatchRequestBody : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// An alternate short description of the asset. Used in place of the filename. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Label { get; set; } +#nullable restore +#else + public string Label { get; set; } +#endif + /// The file name of the asset. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Name { get; set; } +#nullable restore +#else + public string Name { get; set; } +#endif + /// The state property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? State { get; set; } +#nullable restore +#else + public string State { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public WithAsset_PatchRequestBody() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Repos.Item.Item.Releases.Assets.Item.WithAsset_PatchRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Repos.Item.Item.Releases.Assets.Item.WithAsset_PatchRequestBody(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "label", n => { Label = n.GetStringValue(); } }, + { "name", n => { Name = n.GetStringValue(); } }, + { "state", n => { State = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("label", Label); + writer.WriteStringValue("name", Name); + writer.WriteStringValue("state", State); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Releases/GenerateNotes/GenerateNotesPostRequestBody.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Releases/GenerateNotes/GenerateNotesPostRequestBody.cs new file mode 100644 index 0000000..82a3ee7 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Releases/GenerateNotes/GenerateNotesPostRequestBody.cs @@ -0,0 +1,95 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.Releases.GenerateNotes +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class GenerateNotesPostRequestBody : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// 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. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? ConfigurationFilePath { get; set; } +#nullable restore +#else + public string ConfigurationFilePath { get; set; } +#endif + /// 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. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? PreviousTagName { get; set; } +#nullable restore +#else + public string PreviousTagName { get; set; } +#endif + /// The tag name for the release. This can be an existing tag or a new one. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? TagName { get; set; } +#nullable restore +#else + public string TagName { get; set; } +#endif + /// 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. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? TargetCommitish { get; set; } +#nullable restore +#else + public string TargetCommitish { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public GenerateNotesPostRequestBody() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Repos.Item.Item.Releases.GenerateNotes.GenerateNotesPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Repos.Item.Item.Releases.GenerateNotes.GenerateNotesPostRequestBody(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "configuration_file_path", n => { ConfigurationFilePath = n.GetStringValue(); } }, + { "previous_tag_name", n => { PreviousTagName = n.GetStringValue(); } }, + { "tag_name", n => { TagName = n.GetStringValue(); } }, + { "target_commitish", n => { TargetCommitish = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("configuration_file_path", ConfigurationFilePath); + writer.WriteStringValue("previous_tag_name", PreviousTagName); + writer.WriteStringValue("tag_name", TagName); + writer.WriteStringValue("target_commitish", TargetCommitish); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Releases/GenerateNotes/GenerateNotesRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Releases/GenerateNotes/GenerateNotesRequestBuilder.cs new file mode 100644 index 0000000..01a63da --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Releases/GenerateNotes/GenerateNotesRequestBuilder.cs @@ -0,0 +1,103 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.Releases.GenerateNotes +{ + /// + /// Builds and executes requests for operations under \repos\{owner-id}\{repo-id}\releases\generate-notes + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class GenerateNotesRequestBuilder : BaseRequestBuilder + { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public GenerateNotesRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/releases/generate-notes", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public GenerateNotesRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/releases/generate-notes", rawUrl) + { + } + /// + /// Generate a name and body describing a [release](https://docs.github.com/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. + /// API method documentation + /// + /// A + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 404 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PostAsync(global::Ayllu.Github.Client.Repos.Item.Item.Releases.GenerateNotes.GenerateNotesPostRequestBody body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task PostAsync(global::Ayllu.Github.Client.Repos.Item.Item.Releases.GenerateNotes.GenerateNotesPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPostRequestInformation(body, requestConfiguration); + var errorMapping = new Dictionary> + { + { "404", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Models.ReleaseNotesContent.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// Generate a name and body describing a [release](https://docs.github.com/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. + /// + /// A + /// The request body + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPostRequestInformation(global::Ayllu.Github.Client.Repos.Item.Item.Releases.GenerateNotes.GenerateNotesPostRequestBody body, Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToPostRequestInformation(global::Ayllu.Github.Client.Repos.Item.Item.Releases.GenerateNotes.GenerateNotesPostRequestBody body, Action> requestConfiguration = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.Repos.Item.Item.Releases.GenerateNotes.GenerateNotesRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Repos.Item.Item.Releases.GenerateNotes.GenerateNotesRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class GenerateNotesRequestBuilderPostRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Releases/Item/Assets/AssetsRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Releases/Item/Assets/AssetsRequestBuilder.cs new file mode 100644 index 0000000..701fa9d --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Releases/Item/Assets/AssetsRequestBuilder.cs @@ -0,0 +1,180 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.Releases.Item.Assets +{ + /// + /// Builds and executes requests for operations under \repos\{owner-id}\{repo-id}\releases\{release_id}\assets + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class AssetsRequestBuilder : BaseRequestBuilder + { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public AssetsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/releases/{release_id}/assets?name={name}{&label*,page*,per_page*}", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public AssetsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/releases/{release_id}/assets?name={name}{&label*,page*,per_page*}", rawUrl) + { + } + /// + /// List release assets + /// API method documentation + /// + /// A List<global::Ayllu.Github.Client.Models.ReleaseAsset> + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task?> GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task> GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var collectionResult = await RequestAdapter.SendCollectionAsync(requestInfo, global::Ayllu.Github.Client.Models.ReleaseAsset.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false); + return collectionResult?.AsList(); + } + /// + /// This endpoint makes use of a [Hypermedia relation](https://docs.github.com/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/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 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 renames asset filenames that have special characters, non-alphanumeric characters, and leading or trailing periods. The "[List release assets](https://docs.github.com/rest/releases/assets#list-release-assets)"endpoint lists the renamed filenames. For more information and help, contact [GitHub 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/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. + /// API method documentation + /// + /// A + /// Binary request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PostAsync(Stream body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task PostAsync(Stream body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPostRequestInformation(body, requestConfiguration); + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Models.ReleaseAsset.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false); + } + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/releases/{release_id}/assets{?page*,per_page*}", PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// This endpoint makes use of a [Hypermedia relation](https://docs.github.com/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/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 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 renames asset filenames that have special characters, non-alphanumeric characters, and leading or trailing periods. The "[List release assets](https://docs.github.com/rest/releases/assets#list-release-assets)"endpoint lists the renamed filenames. For more information and help, contact [GitHub 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/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. + /// + /// A + /// Binary request body + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPostRequestInformation(Stream body, Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToPostRequestInformation(Stream body, Action> requestConfiguration = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation(Method.POST, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/releases/{release_id}/assets?name={name}{&label*}", PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + requestInfo.SetStreamContent(body, "application/octet-stream"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.Repos.Item.Item.Releases.Item.Assets.AssetsRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Repos.Item.Item.Releases.Item.Assets.AssetsRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// List release assets + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class AssetsRequestBuilderGetQueryParameters + { + /// The page number of the results to fetch. For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." + [QueryParameter("page")] + public int? Page { get; set; } + /// The number of results per page (max 100). For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." + [QueryParameter("per_page")] + public int? PerPage { get; set; } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class AssetsRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + /// + /// This endpoint makes use of a [Hypermedia relation](https://docs.github.com/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/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 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 renames asset filenames that have special characters, non-alphanumeric characters, and leading or trailing periods. The "[List release assets](https://docs.github.com/rest/releases/assets#list-release-assets)"endpoint lists the renamed filenames. For more information and help, contact [GitHub 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/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. + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class AssetsRequestBuilderPostQueryParameters + { +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("label")] + public string? Label { get; set; } +#nullable restore +#else + [QueryParameter("label")] + public string Label { get; set; } +#endif +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("name")] + public string? Name { get; set; } +#nullable restore +#else + [QueryParameter("name")] + public string Name { get; set; } +#endif + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class AssetsRequestBuilderPostRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Releases/Item/Reactions/GetContentQueryParameterType.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Releases/Item/Reactions/GetContentQueryParameterType.cs new file mode 100644 index 0000000..46bab10 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Releases/Item/Reactions/GetContentQueryParameterType.cs @@ -0,0 +1,36 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.Releases.Item.Reactions +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public enum GetContentQueryParameterType + #pragma warning restore CS1591 + { + [EnumMember(Value = "+1")] + #pragma warning disable CS1591 + Plus_1, + #pragma warning restore CS1591 + [EnumMember(Value = "laugh")] + #pragma warning disable CS1591 + Laugh, + #pragma warning restore CS1591 + [EnumMember(Value = "heart")] + #pragma warning disable CS1591 + Heart, + #pragma warning restore CS1591 + [EnumMember(Value = "hooray")] + #pragma warning disable CS1591 + Hooray, + #pragma warning restore CS1591 + [EnumMember(Value = "rocket")] + #pragma warning disable CS1591 + Rocket, + #pragma warning restore CS1591 + [EnumMember(Value = "eyes")] + #pragma warning disable CS1591 + Eyes, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Releases/Item/Reactions/Item/WithReaction_ItemRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Releases/Item/Reactions/Item/WithReaction_ItemRequestBuilder.cs new file mode 100644 index 0000000..0410717 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Releases/Item/Reactions/Item/WithReaction_ItemRequestBuilder.cs @@ -0,0 +1,90 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.Releases.Item.Reactions.Item +{ + /// + /// Builds and executes requests for operations under \repos\{owner-id}\{repo-id}\releases\{release_id}\reactions\{reaction_id} + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithReaction_ItemRequestBuilder : BaseRequestBuilder + { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public WithReaction_ItemRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/releases/{release_id}/reactions/{reaction_id}", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public WithReaction_ItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/releases/{release_id}/reactions/{reaction_id}", rawUrl) + { + } + /// + /// > [!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/rest/releases/releases#get-a-release). + /// API method documentation + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task DeleteAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task DeleteAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToDeleteRequestInformation(requestConfiguration); + await RequestAdapter.SendNoContentAsync(requestInfo, default, cancellationToken).ConfigureAwait(false); + } + /// + /// > [!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/rest/releases/releases#get-a-release). + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToDeleteRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToDeleteRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.DELETE, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.Repos.Item.Item.Releases.Item.Reactions.Item.WithReaction_ItemRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Repos.Item.Item.Releases.Item.Reactions.Item.WithReaction_ItemRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithReaction_ItemRequestBuilderDeleteRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Releases/Item/Reactions/ReactionsPostRequestBody.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Releases/Item/Reactions/ReactionsPostRequestBody.cs new file mode 100644 index 0000000..b6e7c36 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Releases/Item/Reactions/ReactionsPostRequestBody.cs @@ -0,0 +1,59 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.Releases.Item.Reactions +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class ReactionsPostRequestBody : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The [reaction type](https://docs.github.com/rest/reactions/reactions#about-reactions) to add to the release. + public global::Ayllu.Github.Client.Repos.Item.Item.Releases.Item.Reactions.ReactionsPostRequestBody_content? Content { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public ReactionsPostRequestBody() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Repos.Item.Item.Releases.Item.Reactions.ReactionsPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Repos.Item.Item.Releases.Item.Reactions.ReactionsPostRequestBody(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "content", n => { Content = n.GetEnumValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteEnumValue("content", Content); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Releases/Item/Reactions/ReactionsPostRequestBody_content.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Releases/Item/Reactions/ReactionsPostRequestBody_content.cs new file mode 100644 index 0000000..456defc --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Releases/Item/Reactions/ReactionsPostRequestBody_content.cs @@ -0,0 +1,35 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.Releases.Item.Reactions +{ + /// The [reaction type](https://docs.github.com/rest/reactions/reactions#about-reactions) to add to the release. + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public enum ReactionsPostRequestBody_content + { + [EnumMember(Value = "+1")] + #pragma warning disable CS1591 + Plus_1, + #pragma warning restore CS1591 + [EnumMember(Value = "laugh")] + #pragma warning disable CS1591 + Laugh, + #pragma warning restore CS1591 + [EnumMember(Value = "heart")] + #pragma warning disable CS1591 + Heart, + #pragma warning restore CS1591 + [EnumMember(Value = "hooray")] + #pragma warning disable CS1591 + Hooray, + #pragma warning restore CS1591 + [EnumMember(Value = "rocket")] + #pragma warning disable CS1591 + Rocket, + #pragma warning restore CS1591 + [EnumMember(Value = "eyes")] + #pragma warning disable CS1591 + Eyes, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Releases/Item/Reactions/ReactionsRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Releases/Item/Reactions/ReactionsRequestBuilder.cs new file mode 100644 index 0000000..d40d62a --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Releases/Item/Reactions/ReactionsRequestBuilder.cs @@ -0,0 +1,208 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Ayllu.Github.Client.Repos.Item.Item.Releases.Item.Reactions.Item; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.Releases.Item.Reactions +{ + /// + /// Builds and executes requests for operations under \repos\{owner-id}\{repo-id}\releases\{release_id}\reactions + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class ReactionsRequestBuilder : BaseRequestBuilder + { + /// Gets an item from the Ayllu.Github.Client.repos.item.item.releases.item.reactions.item collection + /// The unique identifier of the reaction. + /// A + public global::Ayllu.Github.Client.Repos.Item.Item.Releases.Item.Reactions.Item.WithReaction_ItemRequestBuilder this[int position] + { + get + { + var urlTplParams = new Dictionary(PathParameters); + urlTplParams.Add("reaction_id", position); + return new global::Ayllu.Github.Client.Repos.Item.Item.Releases.Item.Reactions.Item.WithReaction_ItemRequestBuilder(urlTplParams, RequestAdapter); + } + } + /// Gets an item from the Ayllu.Github.Client.repos.item.item.releases.item.reactions.item collection + /// The unique identifier of the reaction. + /// A + [Obsolete("This indexer is deprecated and will be removed in the next major version. Use the one with the typed parameter instead.")] + public global::Ayllu.Github.Client.Repos.Item.Item.Releases.Item.Reactions.Item.WithReaction_ItemRequestBuilder this[string position] + { + get + { + var urlTplParams = new Dictionary(PathParameters); + if (!string.IsNullOrWhiteSpace(position)) urlTplParams.Add("reaction_id", position); + return new global::Ayllu.Github.Client.Repos.Item.Item.Releases.Item.Reactions.Item.WithReaction_ItemRequestBuilder(urlTplParams, RequestAdapter); + } + } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public ReactionsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/releases/{release_id}/reactions{?content*,page*,per_page*}", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public ReactionsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/releases/{release_id}/reactions{?content*,page*,per_page*}", rawUrl) + { + } + /// + /// List the reactions to a [release](https://docs.github.com/rest/releases/releases#get-a-release). + /// API method documentation + /// + /// A List<global::Ayllu.Github.Client.Models.Reaction> + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 404 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task?> GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task> GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "404", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + }; + var collectionResult = await RequestAdapter.SendCollectionAsync(requestInfo, global::Ayllu.Github.Client.Models.Reaction.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + return collectionResult?.AsList(); + } + /// + /// Create a reaction to a [release](https://docs.github.com/rest/releases/releases#get-a-release). A response with a `Status: 200 OK` means that you already added the reaction type to this release. + /// API method documentation + /// + /// A + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 422 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PostAsync(global::Ayllu.Github.Client.Repos.Item.Item.Releases.Item.Reactions.ReactionsPostRequestBody body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task PostAsync(global::Ayllu.Github.Client.Repos.Item.Item.Releases.Item.Reactions.ReactionsPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPostRequestInformation(body, requestConfiguration); + var errorMapping = new Dictionary> + { + { "422", global::Ayllu.Github.Client.Models.ValidationError.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Models.Reaction.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// List the reactions to a [release](https://docs.github.com/rest/releases/releases#get-a-release). + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Create a reaction to a [release](https://docs.github.com/rest/releases/releases#get-a-release). A response with a `Status: 200 OK` means that you already added the reaction type to this release. + /// + /// A + /// The request body + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPostRequestInformation(global::Ayllu.Github.Client.Repos.Item.Item.Releases.Item.Reactions.ReactionsPostRequestBody body, Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToPostRequestInformation(global::Ayllu.Github.Client.Repos.Item.Item.Releases.Item.Reactions.ReactionsPostRequestBody body, Action> requestConfiguration = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.Repos.Item.Item.Releases.Item.Reactions.ReactionsRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Repos.Item.Item.Releases.Item.Reactions.ReactionsRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// List the reactions to a [release](https://docs.github.com/rest/releases/releases#get-a-release). + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class ReactionsRequestBuilderGetQueryParameters + { + /// Returns a single [reaction type](https://docs.github.com/rest/reactions/reactions#about-reactions). Omit this parameter to list all reactions to a release. + [Obsolete("This property is deprecated, use ContentAsGetContentQueryParameterType instead")] +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("content")] + public string? Content { get; set; } +#nullable restore +#else + [QueryParameter("content")] + public string Content { get; set; } +#endif + /// Returns a single [reaction type](https://docs.github.com/rest/reactions/reactions#about-reactions). Omit this parameter to list all reactions to a release. + [QueryParameter("content")] + public global::Ayllu.Github.Client.Repos.Item.Item.Releases.Item.Reactions.GetContentQueryParameterType? ContentAsGetContentQueryParameterType { get; set; } + /// The page number of the results to fetch. For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." + [QueryParameter("page")] + public int? Page { get; set; } + /// The number of results per page (max 100). For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." + [QueryParameter("per_page")] + public int? PerPage { get; set; } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class ReactionsRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class ReactionsRequestBuilderPostRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Releases/Item/WithRelease_ItemRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Releases/Item/WithRelease_ItemRequestBuilder.cs new file mode 100644 index 0000000..1ebe0c4 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Releases/Item/WithRelease_ItemRequestBuilder.cs @@ -0,0 +1,205 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Ayllu.Github.Client.Repos.Item.Item.Releases.Item.Assets; +using Ayllu.Github.Client.Repos.Item.Item.Releases.Item.Reactions; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.Releases.Item +{ + /// + /// Builds and executes requests for operations under \repos\{owner-id}\{repo-id}\releases\{release_id} + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithRelease_ItemRequestBuilder : BaseRequestBuilder + { + /// The assets property + public global::Ayllu.Github.Client.Repos.Item.Item.Releases.Item.Assets.AssetsRequestBuilder Assets + { + get => new global::Ayllu.Github.Client.Repos.Item.Item.Releases.Item.Assets.AssetsRequestBuilder(PathParameters, RequestAdapter); + } + /// The reactions property + public global::Ayllu.Github.Client.Repos.Item.Item.Releases.Item.Reactions.ReactionsRequestBuilder Reactions + { + get => new global::Ayllu.Github.Client.Repos.Item.Item.Releases.Item.Reactions.ReactionsRequestBuilder(PathParameters, RequestAdapter); + } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public WithRelease_ItemRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/releases/{release_id}", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public WithRelease_ItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/releases/{release_id}", rawUrl) + { + } + /// + /// Users with push access to the repository can delete a release. + /// API method documentation + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task DeleteAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task DeleteAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToDeleteRequestInformation(requestConfiguration); + await RequestAdapter.SendNoContentAsync(requestInfo, default, cancellationToken).ConfigureAwait(false); + } + /// + /// Gets a public release with the specified release ID.> [!NOTE]> This returns an `upload_url` key corresponding to the endpoint for uploading release assets. This key is a hypermedia resource. For more information, see "[Getting started with the REST API](https://docs.github.com/rest/using-the-rest-api/getting-started-with-the-rest-api#hypermedia)." + /// API method documentation + /// + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Models.Release.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false); + } + /// + /// Users with push access to the repository can edit a release. + /// API method documentation + /// + /// A + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 404 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PatchAsync(global::Ayllu.Github.Client.Repos.Item.Item.Releases.Item.WithRelease_PatchRequestBody body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task PatchAsync(global::Ayllu.Github.Client.Repos.Item.Item.Releases.Item.WithRelease_PatchRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPatchRequestInformation(body, requestConfiguration); + var errorMapping = new Dictionary> + { + { "404", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Models.Release.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// Users with push access to the repository can delete a release. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToDeleteRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToDeleteRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.DELETE, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + return requestInfo; + } + /// + /// Gets a public release with the specified release ID.> [!NOTE]> This returns an `upload_url` key corresponding to the endpoint for uploading release assets. This key is a hypermedia resource. For more information, see "[Getting started with the REST API](https://docs.github.com/rest/using-the-rest-api/getting-started-with-the-rest-api#hypermedia)." + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Users with push access to the repository can edit a release. + /// + /// A + /// The request body + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPatchRequestInformation(global::Ayllu.Github.Client.Repos.Item.Item.Releases.Item.WithRelease_PatchRequestBody body, Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToPatchRequestInformation(global::Ayllu.Github.Client.Repos.Item.Item.Releases.Item.WithRelease_PatchRequestBody body, Action> requestConfiguration = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.Repos.Item.Item.Releases.Item.WithRelease_ItemRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Repos.Item.Item.Releases.Item.WithRelease_ItemRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithRelease_ItemRequestBuilderDeleteRequestConfiguration : RequestConfiguration + { + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithRelease_ItemRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithRelease_ItemRequestBuilderPatchRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Releases/Item/WithRelease_PatchRequestBody.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Releases/Item/WithRelease_PatchRequestBody.cs new file mode 100644 index 0000000..fbfe247 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Releases/Item/WithRelease_PatchRequestBody.cs @@ -0,0 +1,117 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.Releases.Item +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class WithRelease_PatchRequestBody : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// Text describing the contents of the tag. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Body { get; set; } +#nullable restore +#else + public string Body { get; set; } +#endif + /// 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/discussions/managing-discussions-for-your-community/managing-categories-for-discussions-in-your-repository)." +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? DiscussionCategoryName { get; set; } +#nullable restore +#else + public string DiscussionCategoryName { get; set; } +#endif + /// `true` makes the release a draft, and `false` publishes the release. + public bool? Draft { get; set; } + /// 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. + public global::Ayllu.Github.Client.Repos.Item.Item.Releases.Item.WithRelease_PatchRequestBody_make_latest? MakeLatest { get; set; } + /// The name of the release. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Name { get; set; } +#nullable restore +#else + public string Name { get; set; } +#endif + /// `true` to identify the release as a prerelease, `false` to identify the release as a full release. + public bool? Prerelease { get; set; } + /// The name of the tag. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? TagName { get; set; } +#nullable restore +#else + public string TagName { get; set; } +#endif + /// 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. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? TargetCommitish { get; set; } +#nullable restore +#else + public string TargetCommitish { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public WithRelease_PatchRequestBody() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Repos.Item.Item.Releases.Item.WithRelease_PatchRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Repos.Item.Item.Releases.Item.WithRelease_PatchRequestBody(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "body", n => { Body = n.GetStringValue(); } }, + { "discussion_category_name", n => { DiscussionCategoryName = n.GetStringValue(); } }, + { "draft", n => { Draft = n.GetBoolValue(); } }, + { "make_latest", n => { MakeLatest = n.GetEnumValue(); } }, + { "name", n => { Name = n.GetStringValue(); } }, + { "prerelease", n => { Prerelease = n.GetBoolValue(); } }, + { "tag_name", n => { TagName = n.GetStringValue(); } }, + { "target_commitish", n => { TargetCommitish = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("body", Body); + writer.WriteStringValue("discussion_category_name", DiscussionCategoryName); + writer.WriteBoolValue("draft", Draft); + writer.WriteEnumValue("make_latest", MakeLatest); + writer.WriteStringValue("name", Name); + writer.WriteBoolValue("prerelease", Prerelease); + writer.WriteStringValue("tag_name", TagName); + writer.WriteStringValue("target_commitish", TargetCommitish); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Releases/Item/WithRelease_PatchRequestBody_make_latest.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Releases/Item/WithRelease_PatchRequestBody_make_latest.cs new file mode 100644 index 0000000..0c984b3 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Releases/Item/WithRelease_PatchRequestBody_make_latest.cs @@ -0,0 +1,23 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.Releases.Item +{ + /// 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. + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public enum WithRelease_PatchRequestBody_make_latest + { + [EnumMember(Value = "true")] + #pragma warning disable CS1591 + True, + #pragma warning restore CS1591 + [EnumMember(Value = "false")] + #pragma warning disable CS1591 + False, + #pragma warning restore CS1591 + [EnumMember(Value = "legacy")] + #pragma warning disable CS1591 + Legacy, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Releases/Latest/LatestRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Releases/Latest/LatestRequestBuilder.cs new file mode 100644 index 0000000..ff36bab --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Releases/Latest/LatestRequestBuilder.cs @@ -0,0 +1,93 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.Releases.Latest +{ + /// + /// Builds and executes requests for operations under \repos\{owner-id}\{repo-id}\releases\latest + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class LatestRequestBuilder : BaseRequestBuilder + { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public LatestRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/releases/latest", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public LatestRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/releases/latest", rawUrl) + { + } + /// + /// 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. + /// API method documentation + /// + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Models.Release.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false); + } + /// + /// 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. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.Repos.Item.Item.Releases.Latest.LatestRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Repos.Item.Item.Releases.Latest.LatestRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class LatestRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Releases/ReleasesPostRequestBody.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Releases/ReleasesPostRequestBody.cs new file mode 100644 index 0000000..5f4013f --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Releases/ReleasesPostRequestBody.cs @@ -0,0 +1,122 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.Releases +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class ReleasesPostRequestBody : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// Text describing the contents of the tag. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Body { get; set; } +#nullable restore +#else + public string Body { get; set; } +#endif + /// 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/discussions/managing-discussions-for-your-community/managing-categories-for-discussions-in-your-repository)." +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? DiscussionCategoryName { get; set; } +#nullable restore +#else + public string DiscussionCategoryName { get; set; } +#endif + /// `true` to create a draft (unpublished) release, `false` to create a published one. + public bool? Draft { get; set; } + /// 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. + public bool? GenerateReleaseNotes { get; set; } + /// 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. + public global::Ayllu.Github.Client.Repos.Item.Item.Releases.ReleasesPostRequestBody_make_latest? MakeLatest { get; set; } + /// The name of the release. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Name { get; set; } +#nullable restore +#else + public string Name { get; set; } +#endif + /// `true` to identify the release as a prerelease. `false` to identify the release as a full release. + public bool? Prerelease { get; set; } + /// The name of the tag. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? TagName { get; set; } +#nullable restore +#else + public string TagName { get; set; } +#endif + /// 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. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? TargetCommitish { get; set; } +#nullable restore +#else + public string TargetCommitish { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public ReleasesPostRequestBody() + { + AdditionalData = new Dictionary(); + MakeLatest = global::Ayllu.Github.Client.Repos.Item.Item.Releases.ReleasesPostRequestBody_make_latest.True; + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Repos.Item.Item.Releases.ReleasesPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Repos.Item.Item.Releases.ReleasesPostRequestBody(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "body", n => { Body = n.GetStringValue(); } }, + { "discussion_category_name", n => { DiscussionCategoryName = n.GetStringValue(); } }, + { "draft", n => { Draft = n.GetBoolValue(); } }, + { "generate_release_notes", n => { GenerateReleaseNotes = n.GetBoolValue(); } }, + { "make_latest", n => { MakeLatest = n.GetEnumValue(); } }, + { "name", n => { Name = n.GetStringValue(); } }, + { "prerelease", n => { Prerelease = n.GetBoolValue(); } }, + { "tag_name", n => { TagName = n.GetStringValue(); } }, + { "target_commitish", n => { TargetCommitish = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("body", Body); + writer.WriteStringValue("discussion_category_name", DiscussionCategoryName); + writer.WriteBoolValue("draft", Draft); + writer.WriteBoolValue("generate_release_notes", GenerateReleaseNotes); + writer.WriteEnumValue("make_latest", MakeLatest); + writer.WriteStringValue("name", Name); + writer.WriteBoolValue("prerelease", Prerelease); + writer.WriteStringValue("tag_name", TagName); + writer.WriteStringValue("target_commitish", TargetCommitish); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Releases/ReleasesPostRequestBody_make_latest.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Releases/ReleasesPostRequestBody_make_latest.cs new file mode 100644 index 0000000..114bc7e --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Releases/ReleasesPostRequestBody_make_latest.cs @@ -0,0 +1,23 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.Releases +{ + /// 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. + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public enum ReleasesPostRequestBody_make_latest + { + [EnumMember(Value = "true")] + #pragma warning disable CS1591 + True, + #pragma warning restore CS1591 + [EnumMember(Value = "false")] + #pragma warning disable CS1591 + False, + #pragma warning restore CS1591 + [EnumMember(Value = "legacy")] + #pragma warning disable CS1591 + Legacy, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Releases/ReleasesRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Releases/ReleasesRequestBuilder.cs new file mode 100644 index 0000000..5008982 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Releases/ReleasesRequestBuilder.cs @@ -0,0 +1,220 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Ayllu.Github.Client.Repos.Item.Item.Releases.Assets; +using Ayllu.Github.Client.Repos.Item.Item.Releases.GenerateNotes; +using Ayllu.Github.Client.Repos.Item.Item.Releases.Item; +using Ayllu.Github.Client.Repos.Item.Item.Releases.Latest; +using Ayllu.Github.Client.Repos.Item.Item.Releases.Tags; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.Releases +{ + /// + /// Builds and executes requests for operations under \repos\{owner-id}\{repo-id}\releases + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class ReleasesRequestBuilder : BaseRequestBuilder + { + /// The assets property + public global::Ayllu.Github.Client.Repos.Item.Item.Releases.Assets.AssetsRequestBuilder Assets + { + get => new global::Ayllu.Github.Client.Repos.Item.Item.Releases.Assets.AssetsRequestBuilder(PathParameters, RequestAdapter); + } + /// The generateNotes property + public global::Ayllu.Github.Client.Repos.Item.Item.Releases.GenerateNotes.GenerateNotesRequestBuilder GenerateNotes + { + get => new global::Ayllu.Github.Client.Repos.Item.Item.Releases.GenerateNotes.GenerateNotesRequestBuilder(PathParameters, RequestAdapter); + } + /// The latest property + public global::Ayllu.Github.Client.Repos.Item.Item.Releases.Latest.LatestRequestBuilder Latest + { + get => new global::Ayllu.Github.Client.Repos.Item.Item.Releases.Latest.LatestRequestBuilder(PathParameters, RequestAdapter); + } + /// The tags property + public global::Ayllu.Github.Client.Repos.Item.Item.Releases.Tags.TagsRequestBuilder Tags + { + get => new global::Ayllu.Github.Client.Repos.Item.Item.Releases.Tags.TagsRequestBuilder(PathParameters, RequestAdapter); + } + /// Gets an item from the Ayllu.Github.Client.repos.item.item.releases.item collection + /// The unique identifier of the release. + /// A + public global::Ayllu.Github.Client.Repos.Item.Item.Releases.Item.WithRelease_ItemRequestBuilder this[int position] + { + get + { + var urlTplParams = new Dictionary(PathParameters); + urlTplParams.Add("release_id", position); + return new global::Ayllu.Github.Client.Repos.Item.Item.Releases.Item.WithRelease_ItemRequestBuilder(urlTplParams, RequestAdapter); + } + } + /// Gets an item from the Ayllu.Github.Client.repos.item.item.releases.item collection + /// The unique identifier of the release. + /// A + [Obsolete("This indexer is deprecated and will be removed in the next major version. Use the one with the typed parameter instead.")] + public global::Ayllu.Github.Client.Repos.Item.Item.Releases.Item.WithRelease_ItemRequestBuilder this[string position] + { + get + { + var urlTplParams = new Dictionary(PathParameters); + if (!string.IsNullOrWhiteSpace(position)) urlTplParams.Add("release_id", position); + return new global::Ayllu.Github.Client.Repos.Item.Item.Releases.Item.WithRelease_ItemRequestBuilder(urlTplParams, RequestAdapter); + } + } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public ReleasesRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/releases{?page*,per_page*}", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public ReleasesRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/releases{?page*,per_page*}", rawUrl) + { + } + /// + /// 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/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. + /// API method documentation + /// + /// A List<global::Ayllu.Github.Client.Models.Release> + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 404 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task?> GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task> GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "404", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + }; + var collectionResult = await RequestAdapter.SendCollectionAsync(requestInfo, global::Ayllu.Github.Client.Models.Release.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + return collectionResult?.AsList(); + } + /// + /// Users with push access to the repository can create a release.This endpoint triggers [notifications](https://docs.github.com/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. For more information, see "[Rate limits for the API](https://docs.github.com/rest/using-the-rest-api/rate-limits-for-the-rest-api#about-secondary-rate-limits)" and "[Best practices for using the REST API](https://docs.github.com/rest/guides/best-practices-for-using-the-rest-api)." + /// API method documentation + /// + /// A + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 404 status code + /// When receiving a 422 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PostAsync(global::Ayllu.Github.Client.Repos.Item.Item.Releases.ReleasesPostRequestBody body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task PostAsync(global::Ayllu.Github.Client.Repos.Item.Item.Releases.ReleasesPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPostRequestInformation(body, requestConfiguration); + var errorMapping = new Dictionary> + { + { "404", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "422", global::Ayllu.Github.Client.Models.ValidationError.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Models.Release.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// 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/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. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Users with push access to the repository can create a release.This endpoint triggers [notifications](https://docs.github.com/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. For more information, see "[Rate limits for the API](https://docs.github.com/rest/using-the-rest-api/rate-limits-for-the-rest-api#about-secondary-rate-limits)" and "[Best practices for using the REST API](https://docs.github.com/rest/guides/best-practices-for-using-the-rest-api)." + /// + /// A + /// The request body + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPostRequestInformation(global::Ayllu.Github.Client.Repos.Item.Item.Releases.ReleasesPostRequestBody body, Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToPostRequestInformation(global::Ayllu.Github.Client.Repos.Item.Item.Releases.ReleasesPostRequestBody body, Action> requestConfiguration = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.Repos.Item.Item.Releases.ReleasesRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Repos.Item.Item.Releases.ReleasesRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// 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/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. + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class ReleasesRequestBuilderGetQueryParameters + { + /// The page number of the results to fetch. For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." + [QueryParameter("page")] + public int? Page { get; set; } + /// The number of results per page (max 100). For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." + [QueryParameter("per_page")] + public int? PerPage { get; set; } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class ReleasesRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class ReleasesRequestBuilderPostRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Releases/Tags/Item/WithTagItemRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Releases/Tags/Item/WithTagItemRequestBuilder.cs new file mode 100644 index 0000000..d94d0cc --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Releases/Tags/Item/WithTagItemRequestBuilder.cs @@ -0,0 +1,98 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.Releases.Tags.Item +{ + /// + /// Builds and executes requests for operations under \repos\{owner-id}\{repo-id}\releases\tags\{tag} + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithTagItemRequestBuilder : BaseRequestBuilder + { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public WithTagItemRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/releases/tags/{tag}", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public WithTagItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/releases/tags/{tag}", rawUrl) + { + } + /// + /// Get a published release with the specified tag. + /// API method documentation + /// + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 404 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "404", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Models.Release.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// Get a published release with the specified tag. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.Repos.Item.Item.Releases.Tags.Item.WithTagItemRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Repos.Item.Item.Releases.Tags.Item.WithTagItemRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithTagItemRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Releases/Tags/TagsRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Releases/Tags/TagsRequestBuilder.cs new file mode 100644 index 0000000..6dfb5d3 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Releases/Tags/TagsRequestBuilder.cs @@ -0,0 +1,48 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Repos.Item.Item.Releases.Tags.Item; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.Releases.Tags +{ + /// + /// Builds and executes requests for operations under \repos\{owner-id}\{repo-id}\releases\tags + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class TagsRequestBuilder : BaseRequestBuilder + { + /// Gets an item from the Ayllu.Github.Client.repos.item.item.releases.tags.item collection + /// tag parameter + /// A + public global::Ayllu.Github.Client.Repos.Item.Item.Releases.Tags.Item.WithTagItemRequestBuilder this[string position] + { + get + { + var urlTplParams = new Dictionary(PathParameters); + urlTplParams.Add("tag", position); + return new global::Ayllu.Github.Client.Repos.Item.Item.Releases.Tags.Item.WithTagItemRequestBuilder(urlTplParams, RequestAdapter); + } + } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public TagsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/releases/tags", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public TagsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/releases/tags", rawUrl) + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Repo403Error.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Repo403Error.cs new file mode 100644 index 0000000..88640ae --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Repo403Error.cs @@ -0,0 +1,78 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class Repo403Error : ApiException, IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The documentation_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? DocumentationUrl { get; set; } +#nullable restore +#else + public string DocumentationUrl { get; set; } +#endif + /// The primary error message. + public override string Message { get => MessageEscaped ?? string.Empty; } + /// The message property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? MessageEscaped { get; set; } +#nullable restore +#else + public string MessageEscaped { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public Repo403Error() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Repos.Item.Item.Repo403Error CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Repos.Item.Item.Repo403Error(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "documentation_url", n => { DocumentationUrl = n.GetStringValue(); } }, + { "message", n => { MessageEscaped = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("documentation_url", DocumentationUrl); + writer.WriteStringValue("message", MessageEscaped); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/RepoItemRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/RepoItemRequestBuilder.cs new file mode 100644 index 0000000..43c81cf --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/RepoItemRequestBuilder.cs @@ -0,0 +1,616 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Ayllu.Github.Client.Repos.Item.Item.Actions; +using Ayllu.Github.Client.Repos.Item.Item.Activity; +using Ayllu.Github.Client.Repos.Item.Item.Assignees; +using Ayllu.Github.Client.Repos.Item.Item.Attestations; +using Ayllu.Github.Client.Repos.Item.Item.Autolinks; +using Ayllu.Github.Client.Repos.Item.Item.AutomatedSecurityFixes; +using Ayllu.Github.Client.Repos.Item.Item.Branches; +using Ayllu.Github.Client.Repos.Item.Item.CheckRuns; +using Ayllu.Github.Client.Repos.Item.Item.CheckSuites; +using Ayllu.Github.Client.Repos.Item.Item.CodeScanning; +using Ayllu.Github.Client.Repos.Item.Item.CodeSecurityConfiguration; +using Ayllu.Github.Client.Repos.Item.Item.Codeowners; +using Ayllu.Github.Client.Repos.Item.Item.Codespaces; +using Ayllu.Github.Client.Repos.Item.Item.Collaborators; +using Ayllu.Github.Client.Repos.Item.Item.Comments; +using Ayllu.Github.Client.Repos.Item.Item.Commits; +using Ayllu.Github.Client.Repos.Item.Item.Community; +using Ayllu.Github.Client.Repos.Item.Item.Compare; +using Ayllu.Github.Client.Repos.Item.Item.Contents; +using Ayllu.Github.Client.Repos.Item.Item.Contributors; +using Ayllu.Github.Client.Repos.Item.Item.Dependabot; +using Ayllu.Github.Client.Repos.Item.Item.DependencyGraph; +using Ayllu.Github.Client.Repos.Item.Item.Deployments; +using Ayllu.Github.Client.Repos.Item.Item.Dispatches; +using Ayllu.Github.Client.Repos.Item.Item.Environments; +using Ayllu.Github.Client.Repos.Item.Item.Events; +using Ayllu.Github.Client.Repos.Item.Item.Forks; +using Ayllu.Github.Client.Repos.Item.Item.Generate; +using Ayllu.Github.Client.Repos.Item.Item.Git; +using Ayllu.Github.Client.Repos.Item.Item.Hooks; +using Ayllu.Github.Client.Repos.Item.Item.Import; +using Ayllu.Github.Client.Repos.Item.Item.Installation; +using Ayllu.Github.Client.Repos.Item.Item.InteractionLimits; +using Ayllu.Github.Client.Repos.Item.Item.Invitations; +using Ayllu.Github.Client.Repos.Item.Item.Issues; +using Ayllu.Github.Client.Repos.Item.Item.Keys; +using Ayllu.Github.Client.Repos.Item.Item.Labels; +using Ayllu.Github.Client.Repos.Item.Item.Languages; +using Ayllu.Github.Client.Repos.Item.Item.License; +using Ayllu.Github.Client.Repos.Item.Item.MergeUpstream; +using Ayllu.Github.Client.Repos.Item.Item.Merges; +using Ayllu.Github.Client.Repos.Item.Item.Milestones; +using Ayllu.Github.Client.Repos.Item.Item.Notifications; +using Ayllu.Github.Client.Repos.Item.Item.Pages; +using Ayllu.Github.Client.Repos.Item.Item.PrivateVulnerabilityReporting; +using Ayllu.Github.Client.Repos.Item.Item.Projects; +using Ayllu.Github.Client.Repos.Item.Item.Properties; +using Ayllu.Github.Client.Repos.Item.Item.Pulls; +using Ayllu.Github.Client.Repos.Item.Item.Readme; +using Ayllu.Github.Client.Repos.Item.Item.Releases; +using Ayllu.Github.Client.Repos.Item.Item.Rules; +using Ayllu.Github.Client.Repos.Item.Item.Rulesets; +using Ayllu.Github.Client.Repos.Item.Item.SecretScanning; +using Ayllu.Github.Client.Repos.Item.Item.SecurityAdvisories; +using Ayllu.Github.Client.Repos.Item.Item.Stargazers; +using Ayllu.Github.Client.Repos.Item.Item.Stats; +using Ayllu.Github.Client.Repos.Item.Item.Statuses; +using Ayllu.Github.Client.Repos.Item.Item.Subscribers; +using Ayllu.Github.Client.Repos.Item.Item.Subscription; +using Ayllu.Github.Client.Repos.Item.Item.Tags; +using Ayllu.Github.Client.Repos.Item.Item.Tarball; +using Ayllu.Github.Client.Repos.Item.Item.Teams; +using Ayllu.Github.Client.Repos.Item.Item.Topics; +using Ayllu.Github.Client.Repos.Item.Item.Traffic; +using Ayllu.Github.Client.Repos.Item.Item.Transfer; +using Ayllu.Github.Client.Repos.Item.Item.VulnerabilityAlerts; +using Ayllu.Github.Client.Repos.Item.Item.Zipball; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item +{ + /// + /// Builds and executes requests for operations under \repos\{owner-id}\{repo-id} + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class RepoItemRequestBuilder : BaseRequestBuilder + { + /// The actions property + public global::Ayllu.Github.Client.Repos.Item.Item.Actions.ActionsRequestBuilder Actions + { + get => new global::Ayllu.Github.Client.Repos.Item.Item.Actions.ActionsRequestBuilder(PathParameters, RequestAdapter); + } + /// The activity property + public global::Ayllu.Github.Client.Repos.Item.Item.Activity.ActivityRequestBuilder Activity + { + get => new global::Ayllu.Github.Client.Repos.Item.Item.Activity.ActivityRequestBuilder(PathParameters, RequestAdapter); + } + /// The assignees property + public global::Ayllu.Github.Client.Repos.Item.Item.Assignees.AssigneesRequestBuilder Assignees + { + get => new global::Ayllu.Github.Client.Repos.Item.Item.Assignees.AssigneesRequestBuilder(PathParameters, RequestAdapter); + } + /// The attestations property + public global::Ayllu.Github.Client.Repos.Item.Item.Attestations.AttestationsRequestBuilder Attestations + { + get => new global::Ayllu.Github.Client.Repos.Item.Item.Attestations.AttestationsRequestBuilder(PathParameters, RequestAdapter); + } + /// The autolinks property + public global::Ayllu.Github.Client.Repos.Item.Item.Autolinks.AutolinksRequestBuilder Autolinks + { + get => new global::Ayllu.Github.Client.Repos.Item.Item.Autolinks.AutolinksRequestBuilder(PathParameters, RequestAdapter); + } + /// The automatedSecurityFixes property + public global::Ayllu.Github.Client.Repos.Item.Item.AutomatedSecurityFixes.AutomatedSecurityFixesRequestBuilder AutomatedSecurityFixes + { + get => new global::Ayllu.Github.Client.Repos.Item.Item.AutomatedSecurityFixes.AutomatedSecurityFixesRequestBuilder(PathParameters, RequestAdapter); + } + /// The branches property + public global::Ayllu.Github.Client.Repos.Item.Item.Branches.BranchesRequestBuilder Branches + { + get => new global::Ayllu.Github.Client.Repos.Item.Item.Branches.BranchesRequestBuilder(PathParameters, RequestAdapter); + } + /// The checkRuns property + public global::Ayllu.Github.Client.Repos.Item.Item.CheckRuns.CheckRunsRequestBuilder CheckRuns + { + get => new global::Ayllu.Github.Client.Repos.Item.Item.CheckRuns.CheckRunsRequestBuilder(PathParameters, RequestAdapter); + } + /// The checkSuites property + public global::Ayllu.Github.Client.Repos.Item.Item.CheckSuites.CheckSuitesRequestBuilder CheckSuites + { + get => new global::Ayllu.Github.Client.Repos.Item.Item.CheckSuites.CheckSuitesRequestBuilder(PathParameters, RequestAdapter); + } + /// The codeowners property + public global::Ayllu.Github.Client.Repos.Item.Item.Codeowners.CodeownersRequestBuilder Codeowners + { + get => new global::Ayllu.Github.Client.Repos.Item.Item.Codeowners.CodeownersRequestBuilder(PathParameters, RequestAdapter); + } + /// The codeScanning property + public global::Ayllu.Github.Client.Repos.Item.Item.CodeScanning.CodeScanningRequestBuilder CodeScanning + { + get => new global::Ayllu.Github.Client.Repos.Item.Item.CodeScanning.CodeScanningRequestBuilder(PathParameters, RequestAdapter); + } + /// The codeSecurityConfiguration property + public global::Ayllu.Github.Client.Repos.Item.Item.CodeSecurityConfiguration.CodeSecurityConfigurationRequestBuilder CodeSecurityConfiguration + { + get => new global::Ayllu.Github.Client.Repos.Item.Item.CodeSecurityConfiguration.CodeSecurityConfigurationRequestBuilder(PathParameters, RequestAdapter); + } + /// The codespaces property + public global::Ayllu.Github.Client.Repos.Item.Item.Codespaces.CodespacesRequestBuilder Codespaces + { + get => new global::Ayllu.Github.Client.Repos.Item.Item.Codespaces.CodespacesRequestBuilder(PathParameters, RequestAdapter); + } + /// The collaborators property + public global::Ayllu.Github.Client.Repos.Item.Item.Collaborators.CollaboratorsRequestBuilder Collaborators + { + get => new global::Ayllu.Github.Client.Repos.Item.Item.Collaborators.CollaboratorsRequestBuilder(PathParameters, RequestAdapter); + } + /// The comments property + public global::Ayllu.Github.Client.Repos.Item.Item.Comments.CommentsRequestBuilder Comments + { + get => new global::Ayllu.Github.Client.Repos.Item.Item.Comments.CommentsRequestBuilder(PathParameters, RequestAdapter); + } + /// The commits property + public global::Ayllu.Github.Client.Repos.Item.Item.Commits.CommitsRequestBuilder Commits + { + get => new global::Ayllu.Github.Client.Repos.Item.Item.Commits.CommitsRequestBuilder(PathParameters, RequestAdapter); + } + /// The community property + public global::Ayllu.Github.Client.Repos.Item.Item.Community.CommunityRequestBuilder Community + { + get => new global::Ayllu.Github.Client.Repos.Item.Item.Community.CommunityRequestBuilder(PathParameters, RequestAdapter); + } + /// The compare property + public global::Ayllu.Github.Client.Repos.Item.Item.Compare.CompareRequestBuilder Compare + { + get => new global::Ayllu.Github.Client.Repos.Item.Item.Compare.CompareRequestBuilder(PathParameters, RequestAdapter); + } + /// The contents property + public global::Ayllu.Github.Client.Repos.Item.Item.Contents.ContentsRequestBuilder Contents + { + get => new global::Ayllu.Github.Client.Repos.Item.Item.Contents.ContentsRequestBuilder(PathParameters, RequestAdapter); + } + /// The contributors property + public global::Ayllu.Github.Client.Repos.Item.Item.Contributors.ContributorsRequestBuilder Contributors + { + get => new global::Ayllu.Github.Client.Repos.Item.Item.Contributors.ContributorsRequestBuilder(PathParameters, RequestAdapter); + } + /// The dependabot property + public global::Ayllu.Github.Client.Repos.Item.Item.Dependabot.DependabotRequestBuilder Dependabot + { + get => new global::Ayllu.Github.Client.Repos.Item.Item.Dependabot.DependabotRequestBuilder(PathParameters, RequestAdapter); + } + /// The dependencyGraph property + public global::Ayllu.Github.Client.Repos.Item.Item.DependencyGraph.DependencyGraphRequestBuilder DependencyGraph + { + get => new global::Ayllu.Github.Client.Repos.Item.Item.DependencyGraph.DependencyGraphRequestBuilder(PathParameters, RequestAdapter); + } + /// The deployments property + public global::Ayllu.Github.Client.Repos.Item.Item.Deployments.DeploymentsRequestBuilder Deployments + { + get => new global::Ayllu.Github.Client.Repos.Item.Item.Deployments.DeploymentsRequestBuilder(PathParameters, RequestAdapter); + } + /// The dispatches property + public global::Ayllu.Github.Client.Repos.Item.Item.Dispatches.DispatchesRequestBuilder Dispatches + { + get => new global::Ayllu.Github.Client.Repos.Item.Item.Dispatches.DispatchesRequestBuilder(PathParameters, RequestAdapter); + } + /// The environments property + public global::Ayllu.Github.Client.Repos.Item.Item.Environments.EnvironmentsRequestBuilder Environments + { + get => new global::Ayllu.Github.Client.Repos.Item.Item.Environments.EnvironmentsRequestBuilder(PathParameters, RequestAdapter); + } + /// The events property + public global::Ayllu.Github.Client.Repos.Item.Item.Events.EventsRequestBuilder Events + { + get => new global::Ayllu.Github.Client.Repos.Item.Item.Events.EventsRequestBuilder(PathParameters, RequestAdapter); + } + /// The forks property + public global::Ayllu.Github.Client.Repos.Item.Item.Forks.ForksRequestBuilder Forks + { + get => new global::Ayllu.Github.Client.Repos.Item.Item.Forks.ForksRequestBuilder(PathParameters, RequestAdapter); + } + /// The generate property + public global::Ayllu.Github.Client.Repos.Item.Item.Generate.GenerateRequestBuilder Generate + { + get => new global::Ayllu.Github.Client.Repos.Item.Item.Generate.GenerateRequestBuilder(PathParameters, RequestAdapter); + } + /// The git property + public global::Ayllu.Github.Client.Repos.Item.Item.Git.GitRequestBuilder Git + { + get => new global::Ayllu.Github.Client.Repos.Item.Item.Git.GitRequestBuilder(PathParameters, RequestAdapter); + } + /// The hooks property + public global::Ayllu.Github.Client.Repos.Item.Item.Hooks.HooksRequestBuilder Hooks + { + get => new global::Ayllu.Github.Client.Repos.Item.Item.Hooks.HooksRequestBuilder(PathParameters, RequestAdapter); + } + /// The import property + public global::Ayllu.Github.Client.Repos.Item.Item.Import.ImportRequestBuilder Import + { + get => new global::Ayllu.Github.Client.Repos.Item.Item.Import.ImportRequestBuilder(PathParameters, RequestAdapter); + } + /// The installation property + public global::Ayllu.Github.Client.Repos.Item.Item.Installation.InstallationRequestBuilder Installation + { + get => new global::Ayllu.Github.Client.Repos.Item.Item.Installation.InstallationRequestBuilder(PathParameters, RequestAdapter); + } + /// The interactionLimits property + public global::Ayllu.Github.Client.Repos.Item.Item.InteractionLimits.InteractionLimitsRequestBuilder InteractionLimits + { + get => new global::Ayllu.Github.Client.Repos.Item.Item.InteractionLimits.InteractionLimitsRequestBuilder(PathParameters, RequestAdapter); + } + /// The invitations property + public global::Ayllu.Github.Client.Repos.Item.Item.Invitations.InvitationsRequestBuilder Invitations + { + get => new global::Ayllu.Github.Client.Repos.Item.Item.Invitations.InvitationsRequestBuilder(PathParameters, RequestAdapter); + } + /// The issues property + public global::Ayllu.Github.Client.Repos.Item.Item.Issues.IssuesRequestBuilder Issues + { + get => new global::Ayllu.Github.Client.Repos.Item.Item.Issues.IssuesRequestBuilder(PathParameters, RequestAdapter); + } + /// The keys property + public global::Ayllu.Github.Client.Repos.Item.Item.Keys.KeysRequestBuilder Keys + { + get => new global::Ayllu.Github.Client.Repos.Item.Item.Keys.KeysRequestBuilder(PathParameters, RequestAdapter); + } + /// The labels property + public global::Ayllu.Github.Client.Repos.Item.Item.Labels.LabelsRequestBuilder Labels + { + get => new global::Ayllu.Github.Client.Repos.Item.Item.Labels.LabelsRequestBuilder(PathParameters, RequestAdapter); + } + /// The languages property + public global::Ayllu.Github.Client.Repos.Item.Item.Languages.LanguagesRequestBuilder Languages + { + get => new global::Ayllu.Github.Client.Repos.Item.Item.Languages.LanguagesRequestBuilder(PathParameters, RequestAdapter); + } + /// The license property + public global::Ayllu.Github.Client.Repos.Item.Item.License.LicenseRequestBuilder License + { + get => new global::Ayllu.Github.Client.Repos.Item.Item.License.LicenseRequestBuilder(PathParameters, RequestAdapter); + } + /// The merges property + public global::Ayllu.Github.Client.Repos.Item.Item.Merges.MergesRequestBuilder Merges + { + get => new global::Ayllu.Github.Client.Repos.Item.Item.Merges.MergesRequestBuilder(PathParameters, RequestAdapter); + } + /// The mergeUpstream property + public global::Ayllu.Github.Client.Repos.Item.Item.MergeUpstream.MergeUpstreamRequestBuilder MergeUpstream + { + get => new global::Ayllu.Github.Client.Repos.Item.Item.MergeUpstream.MergeUpstreamRequestBuilder(PathParameters, RequestAdapter); + } + /// The milestones property + public global::Ayllu.Github.Client.Repos.Item.Item.Milestones.MilestonesRequestBuilder Milestones + { + get => new global::Ayllu.Github.Client.Repos.Item.Item.Milestones.MilestonesRequestBuilder(PathParameters, RequestAdapter); + } + /// The notifications property + public global::Ayllu.Github.Client.Repos.Item.Item.Notifications.NotificationsRequestBuilder Notifications + { + get => new global::Ayllu.Github.Client.Repos.Item.Item.Notifications.NotificationsRequestBuilder(PathParameters, RequestAdapter); + } + /// The pages property + public global::Ayllu.Github.Client.Repos.Item.Item.Pages.PagesRequestBuilder Pages + { + get => new global::Ayllu.Github.Client.Repos.Item.Item.Pages.PagesRequestBuilder(PathParameters, RequestAdapter); + } + /// The privateVulnerabilityReporting property + public global::Ayllu.Github.Client.Repos.Item.Item.PrivateVulnerabilityReporting.PrivateVulnerabilityReportingRequestBuilder PrivateVulnerabilityReporting + { + get => new global::Ayllu.Github.Client.Repos.Item.Item.PrivateVulnerabilityReporting.PrivateVulnerabilityReportingRequestBuilder(PathParameters, RequestAdapter); + } + /// The projects property + public global::Ayllu.Github.Client.Repos.Item.Item.Projects.ProjectsRequestBuilder Projects + { + get => new global::Ayllu.Github.Client.Repos.Item.Item.Projects.ProjectsRequestBuilder(PathParameters, RequestAdapter); + } + /// The properties property + public global::Ayllu.Github.Client.Repos.Item.Item.Properties.PropertiesRequestBuilder Properties + { + get => new global::Ayllu.Github.Client.Repos.Item.Item.Properties.PropertiesRequestBuilder(PathParameters, RequestAdapter); + } + /// The pulls property + public global::Ayllu.Github.Client.Repos.Item.Item.Pulls.PullsRequestBuilder Pulls + { + get => new global::Ayllu.Github.Client.Repos.Item.Item.Pulls.PullsRequestBuilder(PathParameters, RequestAdapter); + } + /// The readme property + public global::Ayllu.Github.Client.Repos.Item.Item.Readme.ReadmeRequestBuilder Readme + { + get => new global::Ayllu.Github.Client.Repos.Item.Item.Readme.ReadmeRequestBuilder(PathParameters, RequestAdapter); + } + /// The releases property + public global::Ayllu.Github.Client.Repos.Item.Item.Releases.ReleasesRequestBuilder Releases + { + get => new global::Ayllu.Github.Client.Repos.Item.Item.Releases.ReleasesRequestBuilder(PathParameters, RequestAdapter); + } + /// The rules property + public global::Ayllu.Github.Client.Repos.Item.Item.Rules.RulesRequestBuilder Rules + { + get => new global::Ayllu.Github.Client.Repos.Item.Item.Rules.RulesRequestBuilder(PathParameters, RequestAdapter); + } + /// The rulesets property + public global::Ayllu.Github.Client.Repos.Item.Item.Rulesets.RulesetsRequestBuilder Rulesets + { + get => new global::Ayllu.Github.Client.Repos.Item.Item.Rulesets.RulesetsRequestBuilder(PathParameters, RequestAdapter); + } + /// The secretScanning property + public global::Ayllu.Github.Client.Repos.Item.Item.SecretScanning.SecretScanningRequestBuilder SecretScanning + { + get => new global::Ayllu.Github.Client.Repos.Item.Item.SecretScanning.SecretScanningRequestBuilder(PathParameters, RequestAdapter); + } + /// The securityAdvisories property + public global::Ayllu.Github.Client.Repos.Item.Item.SecurityAdvisories.SecurityAdvisoriesRequestBuilder SecurityAdvisories + { + get => new global::Ayllu.Github.Client.Repos.Item.Item.SecurityAdvisories.SecurityAdvisoriesRequestBuilder(PathParameters, RequestAdapter); + } + /// The stargazers property + public global::Ayllu.Github.Client.Repos.Item.Item.Stargazers.StargazersRequestBuilder Stargazers + { + get => new global::Ayllu.Github.Client.Repos.Item.Item.Stargazers.StargazersRequestBuilder(PathParameters, RequestAdapter); + } + /// The stats property + public global::Ayllu.Github.Client.Repos.Item.Item.Stats.StatsRequestBuilder Stats + { + get => new global::Ayllu.Github.Client.Repos.Item.Item.Stats.StatsRequestBuilder(PathParameters, RequestAdapter); + } + /// The statuses property + public global::Ayllu.Github.Client.Repos.Item.Item.Statuses.StatusesRequestBuilder Statuses + { + get => new global::Ayllu.Github.Client.Repos.Item.Item.Statuses.StatusesRequestBuilder(PathParameters, RequestAdapter); + } + /// The subscribers property + public global::Ayllu.Github.Client.Repos.Item.Item.Subscribers.SubscribersRequestBuilder Subscribers + { + get => new global::Ayllu.Github.Client.Repos.Item.Item.Subscribers.SubscribersRequestBuilder(PathParameters, RequestAdapter); + } + /// The subscription property + public global::Ayllu.Github.Client.Repos.Item.Item.Subscription.SubscriptionRequestBuilder Subscription + { + get => new global::Ayllu.Github.Client.Repos.Item.Item.Subscription.SubscriptionRequestBuilder(PathParameters, RequestAdapter); + } + /// The tags property + public global::Ayllu.Github.Client.Repos.Item.Item.Tags.TagsRequestBuilder Tags + { + get => new global::Ayllu.Github.Client.Repos.Item.Item.Tags.TagsRequestBuilder(PathParameters, RequestAdapter); + } + /// The tarball property + public global::Ayllu.Github.Client.Repos.Item.Item.Tarball.TarballRequestBuilder Tarball + { + get => new global::Ayllu.Github.Client.Repos.Item.Item.Tarball.TarballRequestBuilder(PathParameters, RequestAdapter); + } + /// The teams property + public global::Ayllu.Github.Client.Repos.Item.Item.Teams.TeamsRequestBuilder Teams + { + get => new global::Ayllu.Github.Client.Repos.Item.Item.Teams.TeamsRequestBuilder(PathParameters, RequestAdapter); + } + /// The topics property + public global::Ayllu.Github.Client.Repos.Item.Item.Topics.TopicsRequestBuilder Topics + { + get => new global::Ayllu.Github.Client.Repos.Item.Item.Topics.TopicsRequestBuilder(PathParameters, RequestAdapter); + } + /// The traffic property + public global::Ayllu.Github.Client.Repos.Item.Item.Traffic.TrafficRequestBuilder Traffic + { + get => new global::Ayllu.Github.Client.Repos.Item.Item.Traffic.TrafficRequestBuilder(PathParameters, RequestAdapter); + } + /// The transfer property + public global::Ayllu.Github.Client.Repos.Item.Item.Transfer.TransferRequestBuilder Transfer + { + get => new global::Ayllu.Github.Client.Repos.Item.Item.Transfer.TransferRequestBuilder(PathParameters, RequestAdapter); + } + /// The vulnerabilityAlerts property + public global::Ayllu.Github.Client.Repos.Item.Item.VulnerabilityAlerts.VulnerabilityAlertsRequestBuilder VulnerabilityAlerts + { + get => new global::Ayllu.Github.Client.Repos.Item.Item.VulnerabilityAlerts.VulnerabilityAlertsRequestBuilder(PathParameters, RequestAdapter); + } + /// The zipball property + public global::Ayllu.Github.Client.Repos.Item.Item.Zipball.ZipballRequestBuilder Zipball + { + get => new global::Ayllu.Github.Client.Repos.Item.Item.Zipball.ZipballRequestBuilder(PathParameters, RequestAdapter); + } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public RepoItemRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public RepoItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}", rawUrl) + { + } + /// + /// 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. + /// API method documentation + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 403 status code + /// When receiving a 404 status code + /// When receiving a 409 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task DeleteAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task DeleteAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToDeleteRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "403", global::Ayllu.Github.Client.Repos.Item.Item.Repo403Error.CreateFromDiscriminatorValue }, + { "404", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "409", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + }; + await RequestAdapter.SendNoContentAsync(requestInfo, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// The `parent` and `source` objects are present when the repository is a fork. `parent` is the repository this repository was forked from, `source` is the ultimate source for the network.> [!NOTE]> In order to see the `security_and_analysis` block for a repository you must have admin permissions for the repository or be an owner or security manager for the organization that owns the repository. For more information, see "[Managing security managers in your organization](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/managing-security-managers-in-your-organization)." + /// API method documentation + /// + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 403 status code + /// When receiving a 404 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "403", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "404", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Models.FullRepository.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// **Note**: To edit a repository's topics, use the [Replace all repository topics](https://docs.github.com/rest/repos/repos#replace-all-repository-topics) endpoint. + /// API method documentation + /// + /// A + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 403 status code + /// When receiving a 404 status code + /// When receiving a 422 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PatchAsync(global::Ayllu.Github.Client.Repos.Item.Item.RepoPatchRequestBody body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task PatchAsync(global::Ayllu.Github.Client.Repos.Item.Item.RepoPatchRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPatchRequestInformation(body, requestConfiguration); + var errorMapping = new Dictionary> + { + { "403", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "404", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "422", global::Ayllu.Github.Client.Models.ValidationError.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Models.FullRepository.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// 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. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToDeleteRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToDeleteRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.DELETE, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// The `parent` and `source` objects are present when the repository is a fork. `parent` is the repository this repository was forked from, `source` is the ultimate source for the network.> [!NOTE]> In order to see the `security_and_analysis` block for a repository you must have admin permissions for the repository or be an owner or security manager for the organization that owns the repository. For more information, see "[Managing security managers in your organization](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/managing-security-managers-in-your-organization)." + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// **Note**: To edit a repository's topics, use the [Replace all repository topics](https://docs.github.com/rest/repos/repos#replace-all-repository-topics) endpoint. + /// + /// A + /// The request body + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPatchRequestInformation(global::Ayllu.Github.Client.Repos.Item.Item.RepoPatchRequestBody body, Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToPatchRequestInformation(global::Ayllu.Github.Client.Repos.Item.Item.RepoPatchRequestBody body, Action> requestConfiguration = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.Repos.Item.Item.RepoItemRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Repos.Item.Item.RepoItemRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class RepoItemRequestBuilderDeleteRequestConfiguration : RequestConfiguration + { + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class RepoItemRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class RepoItemRequestBuilderPatchRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/RepoPatchRequestBody.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/RepoPatchRequestBody.cs new file mode 100644 index 0000000..45d18d9 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/RepoPatchRequestBody.cs @@ -0,0 +1,186 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class RepoPatchRequestBody : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// Either `true` to allow auto-merge on pull requests, or `false` to disallow auto-merge. + public bool? AllowAutoMerge { get; set; } + /// Either `true` to allow private forks, or `false` to prevent private forks. + public bool? AllowForking { get; set; } + /// Either `true` to allow merging pull requests with a merge commit, or `false` to prevent merging pull requests with merge commits. + public bool? AllowMergeCommit { get; set; } + /// Either `true` to allow rebase-merging pull requests, or `false` to prevent rebase-merging. + public bool? AllowRebaseMerge { get; set; } + /// Either `true` to allow squash-merging pull requests, or `false` to prevent squash-merging. + public bool? AllowSquashMerge { get; set; } + /// 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. + public bool? AllowUpdateBranch { get; set; } + /// Whether to archive this repository. `false` will unarchive a previously archived repository. + public bool? Archived { get; set; } + /// Updates the default branch for this repository. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? DefaultBranch { get; set; } +#nullable restore +#else + public string DefaultBranch { get; set; } +#endif + /// Either `true` to allow automatically deleting head branches when pull requests are merged, or `false` to prevent automatic deletion. + public bool? DeleteBranchOnMerge { get; set; } + /// A short description of the repository. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Description { get; set; } +#nullable restore +#else + public string Description { get; set; } +#endif + /// Either `true` to enable issues for this repository or `false` to disable them. + public bool? HasIssues { get; set; } + /// 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. + public bool? HasProjects { get; set; } + /// Either `true` to enable the wiki for this repository or `false` to disable it. + public bool? HasWiki { get; set; } + /// A URL with more information about the repository. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Homepage { get; set; } +#nullable restore +#else + public string Homepage { get; set; } +#endif + /// Either `true` to make this repo available as a template repository or `false` to prevent it. + public bool? IsTemplate { get; set; } + /// 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. + public global::Ayllu.Github.Client.Repos.Item.Item.RepoPatchRequestBody_merge_commit_message? MergeCommitMessage { get; set; } + /// Required when using `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). + public global::Ayllu.Github.Client.Repos.Item.Item.RepoPatchRequestBody_merge_commit_title? MergeCommitTitle { get; set; } + /// The name of the repository. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Name { get; set; } +#nullable restore +#else + public string Name { get; set; } +#endif + /// Either `true` to make the repository private or `false` to make it public. Default: `false`. **Note**: You will get a `422` error if the organization restricts [changing repository visibility](https://docs.github.com/articles/repository-permission-levels-for-an-organization#changing-the-visibility-of-repositories) to organization owners and a non-owner tries to change the value of private. + public bool? Private { get; set; } + /// Specify which security and analysis features to enable or disable for the repository.To use this parameter, you must have admin permissions for the repository or be an owner or security manager for the organization that owns the repository. For more information, see "[Managing security managers in your organization](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/managing-security-managers-in-your-organization)."For example, to enable GitHub Advanced Security, use this data in the body of the `PATCH` request:`{ "security_and_analysis": {"advanced_security": { "status": "enabled" } } }`.You can check which security and analysis features are currently enabled by using a `GET /repos/{owner}/{repo}` request. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Repos.Item.Item.RepoPatchRequestBody_security_and_analysis? SecurityAndAnalysis { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Repos.Item.Item.RepoPatchRequestBody_security_and_analysis SecurityAndAnalysis { get; set; } +#endif + /// 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. + public global::Ayllu.Github.Client.Repos.Item.Item.RepoPatchRequestBody_squash_merge_commit_message? SquashMergeCommitMessage { get; set; } + /// Required when using `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). + public global::Ayllu.Github.Client.Repos.Item.Item.RepoPatchRequestBody_squash_merge_commit_title? SquashMergeCommitTitle { get; set; } + /// Either `true` to allow squash-merge commits to use pull request title, or `false` to use commit message. **This property is closing down. Please use `squash_merge_commit_title` instead. + [Obsolete("")] + public bool? UseSquashPrTitleAsDefault { get; set; } + /// The visibility of the repository. + public global::Ayllu.Github.Client.Repos.Item.Item.RepoPatchRequestBody_visibility? Visibility { get; set; } + /// 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. + public bool? WebCommitSignoffRequired { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public RepoPatchRequestBody() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Repos.Item.Item.RepoPatchRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Repos.Item.Item.RepoPatchRequestBody(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "allow_auto_merge", n => { AllowAutoMerge = n.GetBoolValue(); } }, + { "allow_forking", n => { AllowForking = n.GetBoolValue(); } }, + { "allow_merge_commit", n => { AllowMergeCommit = n.GetBoolValue(); } }, + { "allow_rebase_merge", n => { AllowRebaseMerge = n.GetBoolValue(); } }, + { "allow_squash_merge", n => { AllowSquashMerge = n.GetBoolValue(); } }, + { "allow_update_branch", n => { AllowUpdateBranch = n.GetBoolValue(); } }, + { "archived", n => { Archived = n.GetBoolValue(); } }, + { "default_branch", n => { DefaultBranch = n.GetStringValue(); } }, + { "delete_branch_on_merge", n => { DeleteBranchOnMerge = n.GetBoolValue(); } }, + { "description", n => { Description = n.GetStringValue(); } }, + { "has_issues", n => { HasIssues = n.GetBoolValue(); } }, + { "has_projects", n => { HasProjects = n.GetBoolValue(); } }, + { "has_wiki", n => { HasWiki = n.GetBoolValue(); } }, + { "homepage", n => { Homepage = n.GetStringValue(); } }, + { "is_template", n => { IsTemplate = n.GetBoolValue(); } }, + { "merge_commit_message", n => { MergeCommitMessage = n.GetEnumValue(); } }, + { "merge_commit_title", n => { MergeCommitTitle = n.GetEnumValue(); } }, + { "name", n => { Name = n.GetStringValue(); } }, + { "private", n => { Private = n.GetBoolValue(); } }, + { "security_and_analysis", n => { SecurityAndAnalysis = n.GetObjectValue(global::Ayllu.Github.Client.Repos.Item.Item.RepoPatchRequestBody_security_and_analysis.CreateFromDiscriminatorValue); } }, + { "squash_merge_commit_message", n => { SquashMergeCommitMessage = n.GetEnumValue(); } }, + { "squash_merge_commit_title", n => { SquashMergeCommitTitle = n.GetEnumValue(); } }, + { "use_squash_pr_title_as_default", n => { UseSquashPrTitleAsDefault = n.GetBoolValue(); } }, + { "visibility", n => { Visibility = n.GetEnumValue(); } }, + { "web_commit_signoff_required", n => { WebCommitSignoffRequired = n.GetBoolValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteBoolValue("allow_auto_merge", AllowAutoMerge); + writer.WriteBoolValue("allow_forking", AllowForking); + writer.WriteBoolValue("allow_merge_commit", AllowMergeCommit); + writer.WriteBoolValue("allow_rebase_merge", AllowRebaseMerge); + writer.WriteBoolValue("allow_squash_merge", AllowSquashMerge); + writer.WriteBoolValue("allow_update_branch", AllowUpdateBranch); + writer.WriteBoolValue("archived", Archived); + writer.WriteStringValue("default_branch", DefaultBranch); + writer.WriteBoolValue("delete_branch_on_merge", DeleteBranchOnMerge); + writer.WriteStringValue("description", Description); + writer.WriteBoolValue("has_issues", HasIssues); + writer.WriteBoolValue("has_projects", HasProjects); + writer.WriteBoolValue("has_wiki", HasWiki); + writer.WriteStringValue("homepage", Homepage); + writer.WriteBoolValue("is_template", IsTemplate); + writer.WriteEnumValue("merge_commit_message", MergeCommitMessage); + writer.WriteEnumValue("merge_commit_title", MergeCommitTitle); + writer.WriteStringValue("name", Name); + writer.WriteBoolValue("private", Private); + writer.WriteObjectValue("security_and_analysis", SecurityAndAnalysis); + writer.WriteEnumValue("squash_merge_commit_message", SquashMergeCommitMessage); + writer.WriteEnumValue("squash_merge_commit_title", SquashMergeCommitTitle); + writer.WriteBoolValue("use_squash_pr_title_as_default", UseSquashPrTitleAsDefault); + writer.WriteEnumValue("visibility", Visibility); + writer.WriteBoolValue("web_commit_signoff_required", WebCommitSignoffRequired); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/RepoPatchRequestBody_merge_commit_message.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/RepoPatchRequestBody_merge_commit_message.cs new file mode 100644 index 0000000..815df6a --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/RepoPatchRequestBody_merge_commit_message.cs @@ -0,0 +1,23 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item +{ + /// 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. + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public enum RepoPatchRequestBody_merge_commit_message + { + [EnumMember(Value = "PR_BODY")] + #pragma warning disable CS1591 + PR_BODY, + #pragma warning restore CS1591 + [EnumMember(Value = "PR_TITLE")] + #pragma warning disable CS1591 + PR_TITLE, + #pragma warning restore CS1591 + [EnumMember(Value = "BLANK")] + #pragma warning disable CS1591 + BLANK, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/RepoPatchRequestBody_merge_commit_title.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/RepoPatchRequestBody_merge_commit_title.cs new file mode 100644 index 0000000..48c20c3 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/RepoPatchRequestBody_merge_commit_title.cs @@ -0,0 +1,19 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item +{ + /// Required when using `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). + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public enum RepoPatchRequestBody_merge_commit_title + { + [EnumMember(Value = "PR_TITLE")] + #pragma warning disable CS1591 + PR_TITLE, + #pragma warning restore CS1591 + [EnumMember(Value = "MERGE_MESSAGE")] + #pragma warning disable CS1591 + MERGE_MESSAGE, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/RepoPatchRequestBody_security_and_analysis.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/RepoPatchRequestBody_security_and_analysis.cs new file mode 100644 index 0000000..0a9f368 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/RepoPatchRequestBody_security_and_analysis.cs @@ -0,0 +1,116 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item +{ + /// + /// Specify which security and analysis features to enable or disable for the repository.To use this parameter, you must have admin permissions for the repository or be an owner or security manager for the organization that owns the repository. For more information, see "[Managing security managers in your organization](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/managing-security-managers-in-your-organization)."For example, to enable GitHub Advanced Security, use this data in the body of the `PATCH` request:`{ "security_and_analysis": {"advanced_security": { "status": "enabled" } } }`.You can check which security and analysis features are currently enabled by using a `GET /repos/{owner}/{repo}` request. + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class RepoPatchRequestBody_security_and_analysis : IAdditionalDataHolder, IParsable + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// Use the `status` property to enable or disable GitHub Advanced Security for this repository.For more information, see "[About GitHub AdvancedSecurity](/github/getting-started-with-github/learning-about-github/about-github-advanced-security)."For standalone Code Scanning or Secret Protection products, this parameter cannot be used. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Repos.Item.Item.RepoPatchRequestBody_security_and_analysis_advanced_security? AdvancedSecurity { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Repos.Item.Item.RepoPatchRequestBody_security_and_analysis_advanced_security AdvancedSecurity { get; set; } +#endif + /// Use the `status` property to enable or disable GitHub Code Security for this repository. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Repos.Item.Item.RepoPatchRequestBody_security_and_analysis_code_security? CodeSecurity { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Repos.Item.Item.RepoPatchRequestBody_security_and_analysis_code_security CodeSecurity { get; set; } +#endif + /// 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)." +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Repos.Item.Item.RepoPatchRequestBody_security_and_analysis_secret_scanning? SecretScanning { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Repos.Item.Item.RepoPatchRequestBody_security_and_analysis_secret_scanning SecretScanning { get; set; } +#endif + /// Use the `status` property to enable or disable secret scanning AI detection for this repository. For more information, see "[Responsible detection of generic secrets with AI](https://docs.github.com/code-security/secret-scanning/using-advanced-secret-scanning-and-push-protection-features/generic-secret-detection/responsible-ai-generic-secrets)." +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Repos.Item.Item.RepoPatchRequestBody_security_and_analysis_secret_scanning_ai_detection? SecretScanningAiDetection { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Repos.Item.Item.RepoPatchRequestBody_security_and_analysis_secret_scanning_ai_detection SecretScanningAiDetection { get; set; } +#endif + /// Use the `status` property to enable or disable secret scanning non-provider patterns for this repository. For more information, see "[Supported secret scanning patterns](/code-security/secret-scanning/introduction/supported-secret-scanning-patterns#supported-secrets)." +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Repos.Item.Item.RepoPatchRequestBody_security_and_analysis_secret_scanning_non_provider_patterns? SecretScanningNonProviderPatterns { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Repos.Item.Item.RepoPatchRequestBody_security_and_analysis_secret_scanning_non_provider_patterns SecretScanningNonProviderPatterns { get; set; } +#endif + /// 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)." +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Repos.Item.Item.RepoPatchRequestBody_security_and_analysis_secret_scanning_push_protection? SecretScanningPushProtection { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Repos.Item.Item.RepoPatchRequestBody_security_and_analysis_secret_scanning_push_protection SecretScanningPushProtection { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public RepoPatchRequestBody_security_and_analysis() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Repos.Item.Item.RepoPatchRequestBody_security_and_analysis CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Repos.Item.Item.RepoPatchRequestBody_security_and_analysis(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "advanced_security", n => { AdvancedSecurity = n.GetObjectValue(global::Ayllu.Github.Client.Repos.Item.Item.RepoPatchRequestBody_security_and_analysis_advanced_security.CreateFromDiscriminatorValue); } }, + { "code_security", n => { CodeSecurity = n.GetObjectValue(global::Ayllu.Github.Client.Repos.Item.Item.RepoPatchRequestBody_security_and_analysis_code_security.CreateFromDiscriminatorValue); } }, + { "secret_scanning", n => { SecretScanning = n.GetObjectValue(global::Ayllu.Github.Client.Repos.Item.Item.RepoPatchRequestBody_security_and_analysis_secret_scanning.CreateFromDiscriminatorValue); } }, + { "secret_scanning_ai_detection", n => { SecretScanningAiDetection = n.GetObjectValue(global::Ayllu.Github.Client.Repos.Item.Item.RepoPatchRequestBody_security_and_analysis_secret_scanning_ai_detection.CreateFromDiscriminatorValue); } }, + { "secret_scanning_non_provider_patterns", n => { SecretScanningNonProviderPatterns = n.GetObjectValue(global::Ayllu.Github.Client.Repos.Item.Item.RepoPatchRequestBody_security_and_analysis_secret_scanning_non_provider_patterns.CreateFromDiscriminatorValue); } }, + { "secret_scanning_push_protection", n => { SecretScanningPushProtection = n.GetObjectValue(global::Ayllu.Github.Client.Repos.Item.Item.RepoPatchRequestBody_security_and_analysis_secret_scanning_push_protection.CreateFromDiscriminatorValue); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteObjectValue("advanced_security", AdvancedSecurity); + writer.WriteObjectValue("code_security", CodeSecurity); + writer.WriteObjectValue("secret_scanning", SecretScanning); + writer.WriteObjectValue("secret_scanning_ai_detection", SecretScanningAiDetection); + writer.WriteObjectValue("secret_scanning_non_provider_patterns", SecretScanningNonProviderPatterns); + writer.WriteObjectValue("secret_scanning_push_protection", SecretScanningPushProtection); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/RepoPatchRequestBody_security_and_analysis_advanced_security.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/RepoPatchRequestBody_security_and_analysis_advanced_security.cs new file mode 100644 index 0000000..e922938 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/RepoPatchRequestBody_security_and_analysis_advanced_security.cs @@ -0,0 +1,66 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item +{ + /// + /// Use the `status` property to enable or disable GitHub Advanced Security for this repository.For more information, see "[About GitHub AdvancedSecurity](/github/getting-started-with-github/learning-about-github/about-github-advanced-security)."For standalone Code Scanning or Secret Protection products, this parameter cannot be used. + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class RepoPatchRequestBody_security_and_analysis_advanced_security : IAdditionalDataHolder, IParsable + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// Can be `enabled` or `disabled`. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Status { get; set; } +#nullable restore +#else + public string Status { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public RepoPatchRequestBody_security_and_analysis_advanced_security() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Repos.Item.Item.RepoPatchRequestBody_security_and_analysis_advanced_security CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Repos.Item.Item.RepoPatchRequestBody_security_and_analysis_advanced_security(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "status", n => { Status = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("status", Status); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/RepoPatchRequestBody_security_and_analysis_code_security.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/RepoPatchRequestBody_security_and_analysis_code_security.cs new file mode 100644 index 0000000..b63f064 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/RepoPatchRequestBody_security_and_analysis_code_security.cs @@ -0,0 +1,66 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item +{ + /// + /// Use the `status` property to enable or disable GitHub Code Security for this repository. + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class RepoPatchRequestBody_security_and_analysis_code_security : IAdditionalDataHolder, IParsable + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// Can be `enabled` or `disabled`. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Status { get; set; } +#nullable restore +#else + public string Status { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public RepoPatchRequestBody_security_and_analysis_code_security() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Repos.Item.Item.RepoPatchRequestBody_security_and_analysis_code_security CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Repos.Item.Item.RepoPatchRequestBody_security_and_analysis_code_security(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "status", n => { Status = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("status", Status); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/RepoPatchRequestBody_security_and_analysis_secret_scanning.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/RepoPatchRequestBody_security_and_analysis_secret_scanning.cs new file mode 100644 index 0000000..0d46bfb --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/RepoPatchRequestBody_security_and_analysis_secret_scanning.cs @@ -0,0 +1,66 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item +{ + /// + /// 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)." + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class RepoPatchRequestBody_security_and_analysis_secret_scanning : IAdditionalDataHolder, IParsable + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// Can be `enabled` or `disabled`. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Status { get; set; } +#nullable restore +#else + public string Status { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public RepoPatchRequestBody_security_and_analysis_secret_scanning() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Repos.Item.Item.RepoPatchRequestBody_security_and_analysis_secret_scanning CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Repos.Item.Item.RepoPatchRequestBody_security_and_analysis_secret_scanning(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "status", n => { Status = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("status", Status); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/RepoPatchRequestBody_security_and_analysis_secret_scanning_ai_detection.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/RepoPatchRequestBody_security_and_analysis_secret_scanning_ai_detection.cs new file mode 100644 index 0000000..0210bf8 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/RepoPatchRequestBody_security_and_analysis_secret_scanning_ai_detection.cs @@ -0,0 +1,66 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item +{ + /// + /// Use the `status` property to enable or disable secret scanning AI detection for this repository. For more information, see "[Responsible detection of generic secrets with AI](https://docs.github.com/code-security/secret-scanning/using-advanced-secret-scanning-and-push-protection-features/generic-secret-detection/responsible-ai-generic-secrets)." + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class RepoPatchRequestBody_security_and_analysis_secret_scanning_ai_detection : IAdditionalDataHolder, IParsable + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// Can be `enabled` or `disabled`. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Status { get; set; } +#nullable restore +#else + public string Status { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public RepoPatchRequestBody_security_and_analysis_secret_scanning_ai_detection() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Repos.Item.Item.RepoPatchRequestBody_security_and_analysis_secret_scanning_ai_detection CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Repos.Item.Item.RepoPatchRequestBody_security_and_analysis_secret_scanning_ai_detection(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "status", n => { Status = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("status", Status); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/RepoPatchRequestBody_security_and_analysis_secret_scanning_non_provider_patterns.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/RepoPatchRequestBody_security_and_analysis_secret_scanning_non_provider_patterns.cs new file mode 100644 index 0000000..36c65bb --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/RepoPatchRequestBody_security_and_analysis_secret_scanning_non_provider_patterns.cs @@ -0,0 +1,66 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item +{ + /// + /// Use the `status` property to enable or disable secret scanning non-provider patterns for this repository. For more information, see "[Supported secret scanning patterns](/code-security/secret-scanning/introduction/supported-secret-scanning-patterns#supported-secrets)." + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class RepoPatchRequestBody_security_and_analysis_secret_scanning_non_provider_patterns : IAdditionalDataHolder, IParsable + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// Can be `enabled` or `disabled`. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Status { get; set; } +#nullable restore +#else + public string Status { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public RepoPatchRequestBody_security_and_analysis_secret_scanning_non_provider_patterns() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Repos.Item.Item.RepoPatchRequestBody_security_and_analysis_secret_scanning_non_provider_patterns CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Repos.Item.Item.RepoPatchRequestBody_security_and_analysis_secret_scanning_non_provider_patterns(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "status", n => { Status = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("status", Status); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/RepoPatchRequestBody_security_and_analysis_secret_scanning_push_protection.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/RepoPatchRequestBody_security_and_analysis_secret_scanning_push_protection.cs new file mode 100644 index 0000000..153d2d0 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/RepoPatchRequestBody_security_and_analysis_secret_scanning_push_protection.cs @@ -0,0 +1,66 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item +{ + /// + /// 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)." + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class RepoPatchRequestBody_security_and_analysis_secret_scanning_push_protection : IAdditionalDataHolder, IParsable + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// Can be `enabled` or `disabled`. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Status { get; set; } +#nullable restore +#else + public string Status { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public RepoPatchRequestBody_security_and_analysis_secret_scanning_push_protection() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Repos.Item.Item.RepoPatchRequestBody_security_and_analysis_secret_scanning_push_protection CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Repos.Item.Item.RepoPatchRequestBody_security_and_analysis_secret_scanning_push_protection(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "status", n => { Status = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("status", Status); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/RepoPatchRequestBody_squash_merge_commit_message.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/RepoPatchRequestBody_squash_merge_commit_message.cs new file mode 100644 index 0000000..8414fe4 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/RepoPatchRequestBody_squash_merge_commit_message.cs @@ -0,0 +1,23 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item +{ + /// 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. + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public enum RepoPatchRequestBody_squash_merge_commit_message + { + [EnumMember(Value = "PR_BODY")] + #pragma warning disable CS1591 + PR_BODY, + #pragma warning restore CS1591 + [EnumMember(Value = "COMMIT_MESSAGES")] + #pragma warning disable CS1591 + COMMIT_MESSAGES, + #pragma warning restore CS1591 + [EnumMember(Value = "BLANK")] + #pragma warning disable CS1591 + BLANK, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/RepoPatchRequestBody_squash_merge_commit_title.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/RepoPatchRequestBody_squash_merge_commit_title.cs new file mode 100644 index 0000000..c88a6be --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/RepoPatchRequestBody_squash_merge_commit_title.cs @@ -0,0 +1,19 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item +{ + /// Required when using `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). + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public enum RepoPatchRequestBody_squash_merge_commit_title + { + [EnumMember(Value = "PR_TITLE")] + #pragma warning disable CS1591 + PR_TITLE, + #pragma warning restore CS1591 + [EnumMember(Value = "COMMIT_OR_PR_TITLE")] + #pragma warning disable CS1591 + COMMIT_OR_PR_TITLE, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/RepoPatchRequestBody_visibility.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/RepoPatchRequestBody_visibility.cs new file mode 100644 index 0000000..796378d --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/RepoPatchRequestBody_visibility.cs @@ -0,0 +1,19 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item +{ + /// The visibility of the repository. + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public enum RepoPatchRequestBody_visibility + { + [EnumMember(Value = "public")] + #pragma warning disable CS1591 + Public, + #pragma warning restore CS1591 + [EnumMember(Value = "private")] + #pragma warning disable CS1591 + Private, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Rules/Branches/BranchesRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Rules/Branches/BranchesRequestBuilder.cs new file mode 100644 index 0000000..8d1b810 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Rules/Branches/BranchesRequestBuilder.cs @@ -0,0 +1,48 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Repos.Item.Item.Rules.Branches.Item; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.Rules.Branches +{ + /// + /// Builds and executes requests for operations under \repos\{owner-id}\{repo-id}\rules\branches + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class BranchesRequestBuilder : BaseRequestBuilder + { + /// Gets an item from the Ayllu.Github.Client.repos.item.item.rules.branches.item collection + /// The name of the branch. Cannot contain wildcard characters. To use wildcard characters in branch names, use [the GraphQL API](https://docs.github.com/graphql). + /// A + public global::Ayllu.Github.Client.Repos.Item.Item.Rules.Branches.Item.WithBranchItemRequestBuilder this[string position] + { + get + { + var urlTplParams = new Dictionary(PathParameters); + urlTplParams.Add("branch", position); + return new global::Ayllu.Github.Client.Repos.Item.Item.Rules.Branches.Item.WithBranchItemRequestBuilder(urlTplParams, RequestAdapter); + } + } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public BranchesRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/rules/branches", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public BranchesRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/rules/branches", rawUrl) + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Rules/Branches/Item/WithBranchItemRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Rules/Branches/Item/WithBranchItemRequestBuilder.cs new file mode 100644 index 0000000..9acc5ff --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Rules/Branches/Item/WithBranchItemRequestBuilder.cs @@ -0,0 +1,107 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.Rules.Branches.Item +{ + /// + /// Builds and executes requests for operations under \repos\{owner-id}\{repo-id}\rules\branches\{branch} + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithBranchItemRequestBuilder : BaseRequestBuilder + { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public WithBranchItemRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/rules/branches/{branch}{?page*,per_page*}", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public WithBranchItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/rules/branches/{branch}{?page*,per_page*}", rawUrl) + { + } + /// + /// 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. + /// API method documentation + /// + /// A List<global::Ayllu.Github.Client.Models.RepositoryRuleDetailed> + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task?> GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task> GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var collectionResult = await RequestAdapter.SendCollectionAsync(requestInfo, global::Ayllu.Github.Client.Models.RepositoryRuleDetailed.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false); + return collectionResult?.AsList(); + } + /// + /// 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. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.Repos.Item.Item.Rules.Branches.Item.WithBranchItemRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Repos.Item.Item.Rules.Branches.Item.WithBranchItemRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// 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. + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithBranchItemRequestBuilderGetQueryParameters + { + /// The page number of the results to fetch. For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." + [QueryParameter("page")] + public int? Page { get; set; } + /// The number of results per page (max 100). For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." + [QueryParameter("per_page")] + public int? PerPage { get; set; } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithBranchItemRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Rules/RulesRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Rules/RulesRequestBuilder.cs new file mode 100644 index 0000000..9761819 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Rules/RulesRequestBuilder.cs @@ -0,0 +1,41 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Repos.Item.Item.Rules.Branches; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.Rules +{ + /// + /// Builds and executes requests for operations under \repos\{owner-id}\{repo-id}\rules + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class RulesRequestBuilder : BaseRequestBuilder + { + /// The branches property + public global::Ayllu.Github.Client.Repos.Item.Item.Rules.Branches.BranchesRequestBuilder Branches + { + get => new global::Ayllu.Github.Client.Repos.Item.Item.Rules.Branches.BranchesRequestBuilder(PathParameters, RequestAdapter); + } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public RulesRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/rules", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public RulesRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/rules", rawUrl) + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Rulesets/Item/History/HistoryRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Rulesets/Item/History/HistoryRequestBuilder.cs new file mode 100644 index 0000000..1019d0a --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Rulesets/Item/History/HistoryRequestBuilder.cs @@ -0,0 +1,140 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Ayllu.Github.Client.Repos.Item.Item.Rulesets.Item.History.Item; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.Rulesets.Item.History +{ + /// + /// Builds and executes requests for operations under \repos\{owner-id}\{repo-id}\rulesets\{ruleset_id}\history + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class HistoryRequestBuilder : BaseRequestBuilder + { + /// Gets an item from the Ayllu.Github.Client.repos.item.item.rulesets.item.history.item collection + /// The ID of the version + /// A + public global::Ayllu.Github.Client.Repos.Item.Item.Rulesets.Item.History.Item.WithVersion_ItemRequestBuilder this[int position] + { + get + { + var urlTplParams = new Dictionary(PathParameters); + urlTplParams.Add("version_id", position); + return new global::Ayllu.Github.Client.Repos.Item.Item.Rulesets.Item.History.Item.WithVersion_ItemRequestBuilder(urlTplParams, RequestAdapter); + } + } + /// Gets an item from the Ayllu.Github.Client.repos.item.item.rulesets.item.history.item collection + /// The ID of the version + /// A + [Obsolete("This indexer is deprecated and will be removed in the next major version. Use the one with the typed parameter instead.")] + public global::Ayllu.Github.Client.Repos.Item.Item.Rulesets.Item.History.Item.WithVersion_ItemRequestBuilder this[string position] + { + get + { + var urlTplParams = new Dictionary(PathParameters); + if (!string.IsNullOrWhiteSpace(position)) urlTplParams.Add("version_id", position); + return new global::Ayllu.Github.Client.Repos.Item.Item.Rulesets.Item.History.Item.WithVersion_ItemRequestBuilder(urlTplParams, RequestAdapter); + } + } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public HistoryRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/rulesets/{ruleset_id}/history{?page*,per_page*}", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public HistoryRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/rulesets/{ruleset_id}/history{?page*,per_page*}", rawUrl) + { + } + /// + /// Get the history of a repository ruleset. + /// API method documentation + /// + /// A List<global::Ayllu.Github.Client.Models.RulesetVersion> + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 404 status code + /// When receiving a 500 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task?> GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task> GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "404", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "500", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + }; + var collectionResult = await RequestAdapter.SendCollectionAsync(requestInfo, global::Ayllu.Github.Client.Models.RulesetVersion.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + return collectionResult?.AsList(); + } + /// + /// Get the history of a repository ruleset. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.Repos.Item.Item.Rulesets.Item.History.HistoryRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Repos.Item.Item.Rulesets.Item.History.HistoryRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Get the history of a repository ruleset. + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class HistoryRequestBuilderGetQueryParameters + { + /// The page number of the results to fetch. For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." + [QueryParameter("page")] + public int? Page { get; set; } + /// The number of results per page (max 100). For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." + [QueryParameter("per_page")] + public int? PerPage { get; set; } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class HistoryRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Rulesets/Item/History/Item/WithVersion_ItemRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Rulesets/Item/History/Item/WithVersion_ItemRequestBuilder.cs new file mode 100644 index 0000000..d0d8fd0 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Rulesets/Item/History/Item/WithVersion_ItemRequestBuilder.cs @@ -0,0 +1,100 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.Rulesets.Item.History.Item +{ + /// + /// Builds and executes requests for operations under \repos\{owner-id}\{repo-id}\rulesets\{ruleset_id}\history\{version_id} + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithVersion_ItemRequestBuilder : BaseRequestBuilder + { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public WithVersion_ItemRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/rulesets/{ruleset_id}/history/{version_id}", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public WithVersion_ItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/rulesets/{ruleset_id}/history/{version_id}", rawUrl) + { + } + /// + /// Get a version of a repository ruleset. + /// API method documentation + /// + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 404 status code + /// When receiving a 500 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "404", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "500", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Models.RulesetVersionWithState.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// Get a version of a repository ruleset. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.Repos.Item.Item.Rulesets.Item.History.Item.WithVersion_ItemRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Repos.Item.Item.Rulesets.Item.History.Item.WithVersion_ItemRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithVersion_ItemRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Rulesets/Item/WithRuleset_ItemRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Rulesets/Item/WithRuleset_ItemRequestBuilder.cs new file mode 100644 index 0000000..b9b259a --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Rulesets/Item/WithRuleset_ItemRequestBuilder.cs @@ -0,0 +1,226 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Ayllu.Github.Client.Repos.Item.Item.Rulesets.Item.History; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.Rulesets.Item +{ + /// + /// Builds and executes requests for operations under \repos\{owner-id}\{repo-id}\rulesets\{ruleset_id} + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithRuleset_ItemRequestBuilder : BaseRequestBuilder + { + /// The history property + public global::Ayllu.Github.Client.Repos.Item.Item.Rulesets.Item.History.HistoryRequestBuilder History + { + get => new global::Ayllu.Github.Client.Repos.Item.Item.Rulesets.Item.History.HistoryRequestBuilder(PathParameters, RequestAdapter); + } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public WithRuleset_ItemRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/rulesets/{ruleset_id}{?includes_parents*}", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public WithRuleset_ItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/rulesets/{ruleset_id}{?includes_parents*}", rawUrl) + { + } + /// + /// Delete a ruleset for a repository. + /// API method documentation + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 404 status code + /// When receiving a 500 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task DeleteAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task DeleteAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToDeleteRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "404", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "500", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + }; + await RequestAdapter.SendNoContentAsync(requestInfo, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// Get a ruleset for a repository.**Note:** To prevent leaking sensitive information, the `bypass_actors` property is only returned if the usermaking the API request has write access to the ruleset. + /// API method documentation + /// + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 404 status code + /// When receiving a 500 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "404", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "500", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Models.RepositoryRuleset.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// Update a ruleset for a repository. + /// API method documentation + /// + /// A + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 404 status code + /// When receiving a 500 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PutAsync(global::Ayllu.Github.Client.Repos.Item.Item.Rulesets.Item.WithRuleset_PutRequestBody body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task PutAsync(global::Ayllu.Github.Client.Repos.Item.Item.Rulesets.Item.WithRuleset_PutRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPutRequestInformation(body, requestConfiguration); + var errorMapping = new Dictionary> + { + { "404", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "500", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Models.RepositoryRuleset.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// Delete a ruleset for a repository. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToDeleteRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToDeleteRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.DELETE, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Get a ruleset for a repository.**Note:** To prevent leaking sensitive information, the `bypass_actors` property is only returned if the usermaking the API request has write access to the ruleset. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Update a ruleset for a repository. + /// + /// A + /// The request body + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPutRequestInformation(global::Ayllu.Github.Client.Repos.Item.Item.Rulesets.Item.WithRuleset_PutRequestBody body, Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToPutRequestInformation(global::Ayllu.Github.Client.Repos.Item.Item.Rulesets.Item.WithRuleset_PutRequestBody body, Action> requestConfiguration = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation(Method.PUT, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.Repos.Item.Item.Rulesets.Item.WithRuleset_ItemRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Repos.Item.Item.Rulesets.Item.WithRuleset_ItemRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithRuleset_ItemRequestBuilderDeleteRequestConfiguration : RequestConfiguration + { + } + /// + /// Get a ruleset for a repository.**Note:** To prevent leaking sensitive information, the `bypass_actors` property is only returned if the usermaking the API request has write access to the ruleset. + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithRuleset_ItemRequestBuilderGetQueryParameters + { + /// Include rulesets configured at higher levels that apply to this repository + [QueryParameter("includes_parents")] + public bool? IncludesParents { get; set; } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithRuleset_ItemRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithRuleset_ItemRequestBuilderPutRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Rulesets/Item/WithRuleset_PutRequestBody.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Rulesets/Item/WithRuleset_PutRequestBody.cs new file mode 100644 index 0000000..3efc801 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Rulesets/Item/WithRuleset_PutRequestBody.cs @@ -0,0 +1,104 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.Rulesets.Item +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class WithRuleset_PutRequestBody : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The actors that can bypass the rules in this ruleset +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? BypassActors { get; set; } +#nullable restore +#else + public List BypassActors { get; set; } +#endif + /// Parameters for a repository ruleset ref name condition +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.RepositoryRulesetConditions? Conditions { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.RepositoryRulesetConditions Conditions { get; set; } +#endif + /// The enforcement level of the ruleset. `evaluate` allows admins to test rules before enforcing them. Admins can view insights on the Rule Insights page (`evaluate` is only available with GitHub Enterprise). + public global::Ayllu.Github.Client.Models.RepositoryRuleEnforcement? Enforcement { get; set; } + /// The name of the ruleset. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Name { get; set; } +#nullable restore +#else + public string Name { get; set; } +#endif + /// An array of rules within the ruleset. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? Rules { get; set; } +#nullable restore +#else + public List Rules { get; set; } +#endif + /// The target of the ruleset + public global::Ayllu.Github.Client.Repos.Item.Item.Rulesets.Item.WithRuleset_PutRequestBody_target? Target { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public WithRuleset_PutRequestBody() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Repos.Item.Item.Rulesets.Item.WithRuleset_PutRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Repos.Item.Item.Rulesets.Item.WithRuleset_PutRequestBody(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "bypass_actors", n => { BypassActors = n.GetCollectionOfObjectValues(global::Ayllu.Github.Client.Models.RepositoryRulesetBypassActor.CreateFromDiscriminatorValue)?.AsList(); } }, + { "conditions", n => { Conditions = n.GetObjectValue(global::Ayllu.Github.Client.Models.RepositoryRulesetConditions.CreateFromDiscriminatorValue); } }, + { "enforcement", n => { Enforcement = n.GetEnumValue(); } }, + { "name", n => { Name = n.GetStringValue(); } }, + { "rules", n => { Rules = n.GetCollectionOfObjectValues(global::Ayllu.Github.Client.Models.RepositoryRule.CreateFromDiscriminatorValue)?.AsList(); } }, + { "target", n => { Target = n.GetEnumValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteCollectionOfObjectValues("bypass_actors", BypassActors); + writer.WriteObjectValue("conditions", Conditions); + writer.WriteEnumValue("enforcement", Enforcement); + writer.WriteStringValue("name", Name); + writer.WriteCollectionOfObjectValues("rules", Rules); + writer.WriteEnumValue("target", Target); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Rulesets/Item/WithRuleset_PutRequestBody_target.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Rulesets/Item/WithRuleset_PutRequestBody_target.cs new file mode 100644 index 0000000..62ccd6e --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Rulesets/Item/WithRuleset_PutRequestBody_target.cs @@ -0,0 +1,23 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.Rulesets.Item +{ + /// The target of the ruleset + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public enum WithRuleset_PutRequestBody_target + { + [EnumMember(Value = "branch")] + #pragma warning disable CS1591 + Branch, + #pragma warning restore CS1591 + [EnumMember(Value = "tag")] + #pragma warning disable CS1591 + Tag, + #pragma warning restore CS1591 + [EnumMember(Value = "push")] + #pragma warning disable CS1591 + Push, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Rulesets/RuleSuites/GetRule_suite_resultQueryParameterType.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Rulesets/RuleSuites/GetRule_suite_resultQueryParameterType.cs new file mode 100644 index 0000000..82feedb --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Rulesets/RuleSuites/GetRule_suite_resultQueryParameterType.cs @@ -0,0 +1,28 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.Rulesets.RuleSuites +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public enum GetRule_suite_resultQueryParameterType + #pragma warning restore CS1591 + { + [EnumMember(Value = "pass")] + #pragma warning disable CS1591 + Pass, + #pragma warning restore CS1591 + [EnumMember(Value = "fail")] + #pragma warning disable CS1591 + Fail, + #pragma warning restore CS1591 + [EnumMember(Value = "bypass")] + #pragma warning disable CS1591 + Bypass, + #pragma warning restore CS1591 + [EnumMember(Value = "all")] + #pragma warning disable CS1591 + All, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Rulesets/RuleSuites/GetTime_periodQueryParameterType.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Rulesets/RuleSuites/GetTime_periodQueryParameterType.cs new file mode 100644 index 0000000..00b88a3 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Rulesets/RuleSuites/GetTime_periodQueryParameterType.cs @@ -0,0 +1,28 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.Rulesets.RuleSuites +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public enum GetTime_periodQueryParameterType + #pragma warning restore CS1591 + { + [EnumMember(Value = "hour")] + #pragma warning disable CS1591 + Hour, + #pragma warning restore CS1591 + [EnumMember(Value = "day")] + #pragma warning disable CS1591 + Day, + #pragma warning restore CS1591 + [EnumMember(Value = "week")] + #pragma warning disable CS1591 + Week, + #pragma warning restore CS1591 + [EnumMember(Value = "month")] + #pragma warning disable CS1591 + Month, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Rulesets/RuleSuites/Item/WithRule_suite_ItemRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Rulesets/RuleSuites/Item/WithRule_suite_ItemRequestBuilder.cs new file mode 100644 index 0000000..1268761 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Rulesets/RuleSuites/Item/WithRule_suite_ItemRequestBuilder.cs @@ -0,0 +1,100 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.Rulesets.RuleSuites.Item +{ + /// + /// Builds and executes requests for operations under \repos\{owner-id}\{repo-id}\rulesets\rule-suites\{rule_suite_id} + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithRule_suite_ItemRequestBuilder : BaseRequestBuilder + { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public WithRule_suite_ItemRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/rulesets/rule-suites/{rule_suite_id}", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public WithRule_suite_ItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/rulesets/rule-suites/{rule_suite_id}", rawUrl) + { + } + /// + /// 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/repositories/configuring-branches-and-merges-in-your-repository/managing-rulesets/managing-rulesets-for-a-repository#viewing-insights-for-rulesets)." + /// API method documentation + /// + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 404 status code + /// When receiving a 500 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "404", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "500", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Models.RuleSuite.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// 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/repositories/configuring-branches-and-merges-in-your-repository/managing-rulesets/managing-rulesets-for-a-repository#viewing-insights-for-rulesets)." + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.Repos.Item.Item.Rulesets.RuleSuites.Item.WithRule_suite_ItemRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Repos.Item.Item.Rulesets.RuleSuites.Item.WithRule_suite_ItemRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithRule_suite_ItemRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Rulesets/RuleSuites/RuleSuitesRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Rulesets/RuleSuites/RuleSuitesRequestBuilder.cs new file mode 100644 index 0000000..8eff1ac --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Rulesets/RuleSuites/RuleSuitesRequestBuilder.cs @@ -0,0 +1,188 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Ayllu.Github.Client.Repos.Item.Item.Rulesets.RuleSuites.Item; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.Rulesets.RuleSuites +{ + /// + /// Builds and executes requests for operations under \repos\{owner-id}\{repo-id}\rulesets\rule-suites + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class RuleSuitesRequestBuilder : BaseRequestBuilder + { + /// Gets an item from the Ayllu.Github.Client.repos.item.item.rulesets.ruleSuites.item collection + /// The unique identifier of the rule suite result.To get this ID, you can use [GET /repos/{owner}/{repo}/rulesets/rule-suites](https://docs.github.com/rest/repos/rule-suites#list-repository-rule-suites)for repositories and [GET /orgs/{org}/rulesets/rule-suites](https://docs.github.com/rest/orgs/rule-suites#list-organization-rule-suites)for organizations. + /// A + public global::Ayllu.Github.Client.Repos.Item.Item.Rulesets.RuleSuites.Item.WithRule_suite_ItemRequestBuilder this[int position] + { + get + { + var urlTplParams = new Dictionary(PathParameters); + urlTplParams.Add("rule_suite_id", position); + return new global::Ayllu.Github.Client.Repos.Item.Item.Rulesets.RuleSuites.Item.WithRule_suite_ItemRequestBuilder(urlTplParams, RequestAdapter); + } + } + /// Gets an item from the Ayllu.Github.Client.repos.item.item.rulesets.ruleSuites.item collection + /// The unique identifier of the rule suite result.To get this ID, you can use [GET /repos/{owner}/{repo}/rulesets/rule-suites](https://docs.github.com/rest/repos/rule-suites#list-repository-rule-suites)for repositories and [GET /orgs/{org}/rulesets/rule-suites](https://docs.github.com/rest/orgs/rule-suites#list-organization-rule-suites)for organizations. + /// A + [Obsolete("This indexer is deprecated and will be removed in the next major version. Use the one with the typed parameter instead.")] + public global::Ayllu.Github.Client.Repos.Item.Item.Rulesets.RuleSuites.Item.WithRule_suite_ItemRequestBuilder this[string position] + { + get + { + var urlTplParams = new Dictionary(PathParameters); + if (!string.IsNullOrWhiteSpace(position)) urlTplParams.Add("rule_suite_id", position); + return new global::Ayllu.Github.Client.Repos.Item.Item.Rulesets.RuleSuites.Item.WithRule_suite_ItemRequestBuilder(urlTplParams, RequestAdapter); + } + } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public RuleSuitesRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/rulesets/rule-suites{?actor_name*,page*,per_page*,ref*,rule_suite_result*,time_period*}", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public RuleSuitesRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/rulesets/rule-suites{?actor_name*,page*,per_page*,ref*,rule_suite_result*,time_period*}", rawUrl) + { + } + /// + /// Lists suites of rule evaluations at the repository level.For more information, see "[Managing rulesets for a repository](https://docs.github.com/repositories/configuring-branches-and-merges-in-your-repository/managing-rulesets/managing-rulesets-for-a-repository#viewing-insights-for-rulesets)." + /// API method documentation + /// + /// A List<global::Ayllu.Github.Client.Models.RuleSuites> + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 404 status code + /// When receiving a 500 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task?> GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task> GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "404", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "500", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + }; + var collectionResult = await RequestAdapter.SendCollectionAsync(requestInfo, global::Ayllu.Github.Client.Models.RuleSuites.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + return collectionResult?.AsList(); + } + /// + /// Lists suites of rule evaluations at the repository level.For more information, see "[Managing rulesets for a repository](https://docs.github.com/repositories/configuring-branches-and-merges-in-your-repository/managing-rulesets/managing-rulesets-for-a-repository#viewing-insights-for-rulesets)." + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.Repos.Item.Item.Rulesets.RuleSuites.RuleSuitesRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Repos.Item.Item.Rulesets.RuleSuites.RuleSuitesRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Lists suites of rule evaluations at the repository level.For more information, see "[Managing rulesets for a repository](https://docs.github.com/repositories/configuring-branches-and-merges-in-your-repository/managing-rulesets/managing-rulesets-for-a-repository#viewing-insights-for-rulesets)." + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class RuleSuitesRequestBuilderGetQueryParameters + { + /// The handle for the GitHub user account to filter on. When specified, only rule evaluations triggered by this actor will be returned. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("actor_name")] + public string? ActorName { get; set; } +#nullable restore +#else + [QueryParameter("actor_name")] + public string ActorName { get; set; } +#endif + /// The page number of the results to fetch. For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." + [QueryParameter("page")] + public int? Page { get; set; } + /// The number of results per page (max 100). For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." + [QueryParameter("per_page")] + public int? PerPage { get; set; } + /// The name of the ref. Cannot contain wildcard characters. Optionally prefix with `refs/heads/` to limit to branches or `refs/tags/` to limit to tags. Omit the prefix to search across all refs. When specified, only rule evaluations triggered for this ref will be returned. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("ref")] + public string? Ref { get; set; } +#nullable restore +#else + [QueryParameter("ref")] + public string Ref { get; set; } +#endif + /// The rule suite results to filter on. When specified, only suites with this result will be returned. + [Obsolete("This property is deprecated, use RuleSuiteResultAsGetRuleSuiteResultQueryParameterType instead")] +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("rule_suite_result")] + public string? RuleSuiteResult { get; set; } +#nullable restore +#else + [QueryParameter("rule_suite_result")] + public string RuleSuiteResult { get; set; } +#endif + /// The rule suite results to filter on. When specified, only suites with this result will be returned. + [QueryParameter("rule_suite_result")] + public global::Ayllu.Github.Client.Repos.Item.Item.Rulesets.RuleSuites.GetRule_suite_resultQueryParameterType? RuleSuiteResultAsGetRuleSuiteResultQueryParameterType { get; set; } + /// 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 rule suites that occurred in the past 7 days (168 hours). + [Obsolete("This property is deprecated, use TimePeriodAsGetTimePeriodQueryParameterType instead")] +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("time_period")] + public string? TimePeriod { get; set; } +#nullable restore +#else + [QueryParameter("time_period")] + public string TimePeriod { get; set; } +#endif + /// 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 rule suites that occurred in the past 7 days (168 hours). + [QueryParameter("time_period")] + public global::Ayllu.Github.Client.Repos.Item.Item.Rulesets.RuleSuites.GetTime_periodQueryParameterType? TimePeriodAsGetTimePeriodQueryParameterType { get; set; } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class RuleSuitesRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Rulesets/RulesetsPostRequestBody.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Rulesets/RulesetsPostRequestBody.cs new file mode 100644 index 0000000..4478208 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Rulesets/RulesetsPostRequestBody.cs @@ -0,0 +1,105 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.Rulesets +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class RulesetsPostRequestBody : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The actors that can bypass the rules in this ruleset +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? BypassActors { get; set; } +#nullable restore +#else + public List BypassActors { get; set; } +#endif + /// Parameters for a repository ruleset ref name condition +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.RepositoryRulesetConditions? Conditions { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.RepositoryRulesetConditions Conditions { get; set; } +#endif + /// The enforcement level of the ruleset. `evaluate` allows admins to test rules before enforcing them. Admins can view insights on the Rule Insights page (`evaluate` is only available with GitHub Enterprise). + public global::Ayllu.Github.Client.Models.RepositoryRuleEnforcement? Enforcement { get; set; } + /// The name of the ruleset. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Name { get; set; } +#nullable restore +#else + public string Name { get; set; } +#endif + /// An array of rules within the ruleset. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? Rules { get; set; } +#nullable restore +#else + public List Rules { get; set; } +#endif + /// The target of the ruleset + public global::Ayllu.Github.Client.Repos.Item.Item.Rulesets.RulesetsPostRequestBody_target? Target { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public RulesetsPostRequestBody() + { + AdditionalData = new Dictionary(); + Target = global::Ayllu.Github.Client.Repos.Item.Item.Rulesets.RulesetsPostRequestBody_target.Branch; + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Repos.Item.Item.Rulesets.RulesetsPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Repos.Item.Item.Rulesets.RulesetsPostRequestBody(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "bypass_actors", n => { BypassActors = n.GetCollectionOfObjectValues(global::Ayllu.Github.Client.Models.RepositoryRulesetBypassActor.CreateFromDiscriminatorValue)?.AsList(); } }, + { "conditions", n => { Conditions = n.GetObjectValue(global::Ayllu.Github.Client.Models.RepositoryRulesetConditions.CreateFromDiscriminatorValue); } }, + { "enforcement", n => { Enforcement = n.GetEnumValue(); } }, + { "name", n => { Name = n.GetStringValue(); } }, + { "rules", n => { Rules = n.GetCollectionOfObjectValues(global::Ayllu.Github.Client.Models.RepositoryRule.CreateFromDiscriminatorValue)?.AsList(); } }, + { "target", n => { Target = n.GetEnumValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteCollectionOfObjectValues("bypass_actors", BypassActors); + writer.WriteObjectValue("conditions", Conditions); + writer.WriteEnumValue("enforcement", Enforcement); + writer.WriteStringValue("name", Name); + writer.WriteCollectionOfObjectValues("rules", Rules); + writer.WriteEnumValue("target", Target); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Rulesets/RulesetsPostRequestBody_target.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Rulesets/RulesetsPostRequestBody_target.cs new file mode 100644 index 0000000..3323c6d --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Rulesets/RulesetsPostRequestBody_target.cs @@ -0,0 +1,23 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.Rulesets +{ + /// The target of the ruleset + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public enum RulesetsPostRequestBody_target + { + [EnumMember(Value = "branch")] + #pragma warning disable CS1591 + Branch, + #pragma warning restore CS1591 + [EnumMember(Value = "tag")] + #pragma warning disable CS1591 + Tag, + #pragma warning restore CS1591 + [EnumMember(Value = "push")] + #pragma warning disable CS1591 + Push, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Rulesets/RulesetsRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Rulesets/RulesetsRequestBuilder.cs new file mode 100644 index 0000000..3a3b354 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Rulesets/RulesetsRequestBuilder.cs @@ -0,0 +1,217 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Ayllu.Github.Client.Repos.Item.Item.Rulesets.Item; +using Ayllu.Github.Client.Repos.Item.Item.Rulesets.RuleSuites; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.Rulesets +{ + /// + /// Builds and executes requests for operations under \repos\{owner-id}\{repo-id}\rulesets + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class RulesetsRequestBuilder : BaseRequestBuilder + { + /// The ruleSuites property + public global::Ayllu.Github.Client.Repos.Item.Item.Rulesets.RuleSuites.RuleSuitesRequestBuilder RuleSuites + { + get => new global::Ayllu.Github.Client.Repos.Item.Item.Rulesets.RuleSuites.RuleSuitesRequestBuilder(PathParameters, RequestAdapter); + } + /// Gets an item from the Ayllu.Github.Client.repos.item.item.rulesets.item collection + /// The ID of the ruleset. + /// A + public global::Ayllu.Github.Client.Repos.Item.Item.Rulesets.Item.WithRuleset_ItemRequestBuilder this[int position] + { + get + { + var urlTplParams = new Dictionary(PathParameters); + urlTplParams.Add("ruleset_id", position); + return new global::Ayllu.Github.Client.Repos.Item.Item.Rulesets.Item.WithRuleset_ItemRequestBuilder(urlTplParams, RequestAdapter); + } + } + /// Gets an item from the Ayllu.Github.Client.repos.item.item.rulesets.item collection + /// The ID of the ruleset. + /// A + [Obsolete("This indexer is deprecated and will be removed in the next major version. Use the one with the typed parameter instead.")] + public global::Ayllu.Github.Client.Repos.Item.Item.Rulesets.Item.WithRuleset_ItemRequestBuilder this[string position] + { + get + { + var urlTplParams = new Dictionary(PathParameters); + if (!string.IsNullOrWhiteSpace(position)) urlTplParams.Add("ruleset_id", position); + return new global::Ayllu.Github.Client.Repos.Item.Item.Rulesets.Item.WithRuleset_ItemRequestBuilder(urlTplParams, RequestAdapter); + } + } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public RulesetsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/rulesets{?includes_parents*,page*,per_page*,targets*}", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public RulesetsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/rulesets{?includes_parents*,page*,per_page*,targets*}", rawUrl) + { + } + /// + /// Get all the rulesets for a repository. + /// API method documentation + /// + /// A List<global::Ayllu.Github.Client.Models.RepositoryRuleset> + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 404 status code + /// When receiving a 500 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task?> GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task> GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "404", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "500", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + }; + var collectionResult = await RequestAdapter.SendCollectionAsync(requestInfo, global::Ayllu.Github.Client.Models.RepositoryRuleset.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + return collectionResult?.AsList(); + } + /// + /// Create a ruleset for a repository. + /// API method documentation + /// + /// A + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 404 status code + /// When receiving a 500 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PostAsync(global::Ayllu.Github.Client.Repos.Item.Item.Rulesets.RulesetsPostRequestBody body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task PostAsync(global::Ayllu.Github.Client.Repos.Item.Item.Rulesets.RulesetsPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPostRequestInformation(body, requestConfiguration); + var errorMapping = new Dictionary> + { + { "404", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "500", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Models.RepositoryRuleset.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// Get all the rulesets for a repository. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Create a ruleset for a repository. + /// + /// A + /// The request body + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPostRequestInformation(global::Ayllu.Github.Client.Repos.Item.Item.Rulesets.RulesetsPostRequestBody body, Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToPostRequestInformation(global::Ayllu.Github.Client.Repos.Item.Item.Rulesets.RulesetsPostRequestBody body, Action> requestConfiguration = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.Repos.Item.Item.Rulesets.RulesetsRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Repos.Item.Item.Rulesets.RulesetsRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Get all the rulesets for a repository. + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class RulesetsRequestBuilderGetQueryParameters + { + /// Include rulesets configured at higher levels that apply to this repository + [QueryParameter("includes_parents")] + public bool? IncludesParents { get; set; } + /// The page number of the results to fetch. For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." + [QueryParameter("page")] + public int? Page { get; set; } + /// The number of results per page (max 100). For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." + [QueryParameter("per_page")] + public int? PerPage { get; set; } + /// A comma-separated list of rule targets to filter by.If provided, only rulesets that apply to the specified targets will be returned.For example, `branch,tag,push`. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("targets")] + public string? Targets { get; set; } +#nullable restore +#else + [QueryParameter("targets")] + public string Targets { get; set; } +#endif + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class RulesetsRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class RulesetsRequestBuilderPostRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/SecretScanning/Alerts/AlertsRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/SecretScanning/Alerts/AlertsRequestBuilder.cs new file mode 100644 index 0000000..b72dd61 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/SecretScanning/Alerts/AlertsRequestBuilder.cs @@ -0,0 +1,239 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Ayllu.Github.Client.Repos.Item.Item.SecretScanning.Alerts.Item; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.SecretScanning.Alerts +{ + /// + /// Builds and executes requests for operations under \repos\{owner-id}\{repo-id}\secret-scanning\alerts + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class AlertsRequestBuilder : BaseRequestBuilder + { + /// Gets an item from the Ayllu.Github.Client.repos.item.item.secretScanning.alerts.item collection + /// The number that identifies an alert. You can find this at the end of the URL for a code scanning alert within GitHub, and in the `number` field in the response from the `GET /repos/{owner}/{repo}/code-scanning/alerts` operation. + /// A + public global::Ayllu.Github.Client.Repos.Item.Item.SecretScanning.Alerts.Item.WithAlert_numberItemRequestBuilder this[int position] + { + get + { + var urlTplParams = new Dictionary(PathParameters); + urlTplParams.Add("alert_number", position); + return new global::Ayllu.Github.Client.Repos.Item.Item.SecretScanning.Alerts.Item.WithAlert_numberItemRequestBuilder(urlTplParams, RequestAdapter); + } + } + /// Gets an item from the Ayllu.Github.Client.repos.item.item.secretScanning.alerts.item collection + /// The number that identifies an alert. You can find this at the end of the URL for a code scanning alert within GitHub, and in the `number` field in the response from the `GET /repos/{owner}/{repo}/code-scanning/alerts` operation. + /// A + [Obsolete("This indexer is deprecated and will be removed in the next major version. Use the one with the typed parameter instead.")] + public global::Ayllu.Github.Client.Repos.Item.Item.SecretScanning.Alerts.Item.WithAlert_numberItemRequestBuilder this[string position] + { + get + { + var urlTplParams = new Dictionary(PathParameters); + if (!string.IsNullOrWhiteSpace(position)) urlTplParams.Add("alert_number", position); + return new global::Ayllu.Github.Client.Repos.Item.Item.SecretScanning.Alerts.Item.WithAlert_numberItemRequestBuilder(urlTplParams, RequestAdapter); + } + } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public AlertsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/secret-scanning/alerts{?after*,before*,direction*,hide_secret*,is_multi_repo*,is_publicly_leaked*,page*,per_page*,resolution*,secret_type*,sort*,state*,validity*}", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public AlertsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/secret-scanning/alerts{?after*,before*,direction*,hide_secret*,is_multi_repo*,is_publicly_leaked*,page*,per_page*,resolution*,secret_type*,sort*,state*,validity*}", rawUrl) + { + } + /// + /// 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. + /// API method documentation + /// + /// A List<global::Ayllu.Github.Client.Models.SecretScanningAlert> + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 503 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task?> GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task> GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "503", global::Ayllu.Github.Client.Models.Alerts503Error.CreateFromDiscriminatorValue }, + }; + var collectionResult = await RequestAdapter.SendCollectionAsync(requestInfo, global::Ayllu.Github.Client.Models.SecretScanningAlert.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + return collectionResult?.AsList(); + } + /// + /// 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. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.Repos.Item.Item.SecretScanning.Alerts.AlertsRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Repos.Item.Item.SecretScanning.Alerts.AlertsRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// 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. + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class AlertsRequestBuilderGetQueryParameters + { + /// A cursor, as given in the [Link header](https://docs.github.com/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. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("after")] + public string? After { get; set; } +#nullable restore +#else + [QueryParameter("after")] + public string After { get; set; } +#endif + /// A cursor, as given in the [Link header](https://docs.github.com/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. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("before")] + public string? Before { get; set; } +#nullable restore +#else + [QueryParameter("before")] + public string Before { get; set; } +#endif + /// The direction to sort the results by. + [Obsolete("This property is deprecated, use DirectionAsGetDirectionQueryParameterType instead")] +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("direction")] + public string? Direction { get; set; } +#nullable restore +#else + [QueryParameter("direction")] + public string Direction { get; set; } +#endif + /// The direction to sort the results by. + [QueryParameter("direction")] + public global::Ayllu.Github.Client.Repos.Item.Item.SecretScanning.Alerts.GetDirectionQueryParameterType? DirectionAsGetDirectionQueryParameterType { get; set; } + /// A boolean value representing whether or not to hide literal secrets in the results. + [QueryParameter("hide_secret")] + public bool? HideSecret { get; set; } + /// A boolean value representing whether or not to filter alerts by the multi-repo tag being present. + [QueryParameter("is_multi_repo")] + public bool? IsMultiRepo { get; set; } + /// A boolean value representing whether or not to filter alerts by the publicly-leaked tag being present. + [QueryParameter("is_publicly_leaked")] + public bool? IsPubliclyLeaked { get; set; } + /// The page number of the results to fetch. For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." + [QueryParameter("page")] + public int? Page { get; set; } + /// The number of results per page (max 100). For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." + [QueryParameter("per_page")] + public int? PerPage { get; set; } + /// 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`. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("resolution")] + public string? Resolution { get; set; } +#nullable restore +#else + [QueryParameter("resolution")] + public string Resolution { get; set; } +#endif + /// A comma-separated list of secret types to return. All default secret patterns are returned. To return generic patterns, pass the token name(s) in the parameter. See "[Supported secret scanning patterns](https://docs.github.com/code-security/secret-scanning/introduction/supported-secret-scanning-patterns#supported-secrets)" for a complete list of secret types. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("secret_type")] + public string? SecretType { get; set; } +#nullable restore +#else + [QueryParameter("secret_type")] + public string SecretType { get; set; } +#endif + /// The property to sort the results by. `created` means when the alert was created. `updated` means when the alert was updated or resolved. + [Obsolete("This property is deprecated, use SortAsGetSortQueryParameterType instead")] +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("sort")] + public string? Sort { get; set; } +#nullable restore +#else + [QueryParameter("sort")] + public string Sort { get; set; } +#endif + /// The property to sort the results by. `created` means when the alert was created. `updated` means when the alert was updated or resolved. + [QueryParameter("sort")] + public global::Ayllu.Github.Client.Repos.Item.Item.SecretScanning.Alerts.GetSortQueryParameterType? SortAsGetSortQueryParameterType { get; set; } + /// Set to `open` or `resolved` to only list secret scanning alerts in a specific state. + [Obsolete("This property is deprecated, use StateAsGetStateQueryParameterType instead")] +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("state")] + public string? State { get; set; } +#nullable restore +#else + [QueryParameter("state")] + public string State { get; set; } +#endif + /// Set to `open` or `resolved` to only list secret scanning alerts in a specific state. + [QueryParameter("state")] + public global::Ayllu.Github.Client.Repos.Item.Item.SecretScanning.Alerts.GetStateQueryParameterType? StateAsGetStateQueryParameterType { get; set; } + /// 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`. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("validity")] + public string? Validity { get; set; } +#nullable restore +#else + [QueryParameter("validity")] + public string Validity { get; set; } +#endif + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class AlertsRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/SecretScanning/Alerts/GetDirectionQueryParameterType.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/SecretScanning/Alerts/GetDirectionQueryParameterType.cs new file mode 100644 index 0000000..651c9c9 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/SecretScanning/Alerts/GetDirectionQueryParameterType.cs @@ -0,0 +1,20 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.SecretScanning.Alerts +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public enum GetDirectionQueryParameterType + #pragma warning restore CS1591 + { + [EnumMember(Value = "asc")] + #pragma warning disable CS1591 + Asc, + #pragma warning restore CS1591 + [EnumMember(Value = "desc")] + #pragma warning disable CS1591 + Desc, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/SecretScanning/Alerts/GetSortQueryParameterType.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/SecretScanning/Alerts/GetSortQueryParameterType.cs new file mode 100644 index 0000000..7f65f6a --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/SecretScanning/Alerts/GetSortQueryParameterType.cs @@ -0,0 +1,20 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.SecretScanning.Alerts +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public enum GetSortQueryParameterType + #pragma warning restore CS1591 + { + [EnumMember(Value = "created")] + #pragma warning disable CS1591 + Created, + #pragma warning restore CS1591 + [EnumMember(Value = "updated")] + #pragma warning disable CS1591 + Updated, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/SecretScanning/Alerts/GetStateQueryParameterType.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/SecretScanning/Alerts/GetStateQueryParameterType.cs new file mode 100644 index 0000000..5fbadc2 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/SecretScanning/Alerts/GetStateQueryParameterType.cs @@ -0,0 +1,20 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.SecretScanning.Alerts +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public enum GetStateQueryParameterType + #pragma warning restore CS1591 + { + [EnumMember(Value = "open")] + #pragma warning disable CS1591 + Open, + #pragma warning restore CS1591 + [EnumMember(Value = "resolved")] + #pragma warning disable CS1591 + Resolved, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/SecretScanning/Alerts/Item/Locations/LocationsRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/SecretScanning/Alerts/Item/Locations/LocationsRequestBuilder.cs new file mode 100644 index 0000000..6748cda --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/SecretScanning/Alerts/Item/Locations/LocationsRequestBuilder.cs @@ -0,0 +1,112 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.SecretScanning.Alerts.Item.Locations +{ + /// + /// Builds and executes requests for operations under \repos\{owner-id}\{repo-id}\secret-scanning\alerts\{alert_number}\locations + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class LocationsRequestBuilder : BaseRequestBuilder + { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public LocationsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/secret-scanning/alerts/{alert_number}/locations{?page*,per_page*}", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public LocationsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/secret-scanning/alerts/{alert_number}/locations{?page*,per_page*}", rawUrl) + { + } + /// + /// 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. + /// API method documentation + /// + /// A List<global::Ayllu.Github.Client.Models.SecretScanningLocation> + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 503 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task?> GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task> GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "503", global::Ayllu.Github.Client.Models.Locations503Error.CreateFromDiscriminatorValue }, + }; + var collectionResult = await RequestAdapter.SendCollectionAsync(requestInfo, global::Ayllu.Github.Client.Models.SecretScanningLocation.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + return collectionResult?.AsList(); + } + /// + /// 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. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.Repos.Item.Item.SecretScanning.Alerts.Item.Locations.LocationsRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Repos.Item.Item.SecretScanning.Alerts.Item.Locations.LocationsRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// 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. + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class LocationsRequestBuilderGetQueryParameters + { + /// The page number of the results to fetch. For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." + [QueryParameter("page")] + public int? Page { get; set; } + /// The number of results per page (max 100). For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." + [QueryParameter("per_page")] + public int? PerPage { get; set; } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class LocationsRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/SecretScanning/Alerts/Item/WithAlert_numberItemRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/SecretScanning/Alerts/Item/WithAlert_numberItemRequestBuilder.cs new file mode 100644 index 0000000..171053c --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/SecretScanning/Alerts/Item/WithAlert_numberItemRequestBuilder.cs @@ -0,0 +1,170 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Ayllu.Github.Client.Repos.Item.Item.SecretScanning.Alerts.Item.Locations; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.SecretScanning.Alerts.Item +{ + /// + /// Builds and executes requests for operations under \repos\{owner-id}\{repo-id}\secret-scanning\alerts\{alert_number} + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithAlert_numberItemRequestBuilder : BaseRequestBuilder + { + /// The locations property + public global::Ayllu.Github.Client.Repos.Item.Item.SecretScanning.Alerts.Item.Locations.LocationsRequestBuilder Locations + { + get => new global::Ayllu.Github.Client.Repos.Item.Item.SecretScanning.Alerts.Item.Locations.LocationsRequestBuilder(PathParameters, RequestAdapter); + } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public WithAlert_numberItemRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/secret-scanning/alerts/{alert_number}{?hide_secret*}", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public WithAlert_numberItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/secret-scanning/alerts/{alert_number}{?hide_secret*}", rawUrl) + { + } + /// + /// 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. + /// API method documentation + /// + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 503 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "503", global::Ayllu.Github.Client.Models.SecretScanningAlert503Error.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Models.SecretScanningAlert.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// 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. + /// API method documentation + /// + /// A + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 503 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PatchAsync(global::Ayllu.Github.Client.Repos.Item.Item.SecretScanning.Alerts.Item.WithAlert_numberPatchRequestBody body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task PatchAsync(global::Ayllu.Github.Client.Repos.Item.Item.SecretScanning.Alerts.Item.WithAlert_numberPatchRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPatchRequestInformation(body, requestConfiguration); + var errorMapping = new Dictionary> + { + { "503", global::Ayllu.Github.Client.Models.SecretScanningAlert503Error.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Models.SecretScanningAlert.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// 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. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// 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. + /// + /// A + /// The request body + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPatchRequestInformation(global::Ayllu.Github.Client.Repos.Item.Item.SecretScanning.Alerts.Item.WithAlert_numberPatchRequestBody body, Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToPatchRequestInformation(global::Ayllu.Github.Client.Repos.Item.Item.SecretScanning.Alerts.Item.WithAlert_numberPatchRequestBody body, Action> requestConfiguration = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.Repos.Item.Item.SecretScanning.Alerts.Item.WithAlert_numberItemRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Repos.Item.Item.SecretScanning.Alerts.Item.WithAlert_numberItemRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// 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. + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithAlert_numberItemRequestBuilderGetQueryParameters + { + /// A boolean value representing whether or not to hide literal secrets in the results. + [QueryParameter("hide_secret")] + public bool? HideSecret { get; set; } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithAlert_numberItemRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithAlert_numberItemRequestBuilderPatchRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/SecretScanning/Alerts/Item/WithAlert_numberPatchRequestBody.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/SecretScanning/Alerts/Item/WithAlert_numberPatchRequestBody.cs new file mode 100644 index 0000000..a67e497 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/SecretScanning/Alerts/Item/WithAlert_numberPatchRequestBody.cs @@ -0,0 +1,74 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.SecretScanning.Alerts.Item +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class WithAlert_numberPatchRequestBody : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// **Required when the `state` is `resolved`.** The reason for resolving the alert. + public global::Ayllu.Github.Client.Models.SecretScanningAlertResolution? Resolution { get; set; } + /// An optional comment when closing or reopening an alert. Cannot be updated or deleted. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? ResolutionComment { get; set; } +#nullable restore +#else + public string ResolutionComment { get; set; } +#endif + /// Sets the state of the secret scanning alert. You must provide `resolution` when you set the state to `resolved`. + public global::Ayllu.Github.Client.Models.SecretScanningAlertState? State { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public WithAlert_numberPatchRequestBody() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Repos.Item.Item.SecretScanning.Alerts.Item.WithAlert_numberPatchRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Repos.Item.Item.SecretScanning.Alerts.Item.WithAlert_numberPatchRequestBody(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "resolution", n => { Resolution = n.GetEnumValue(); } }, + { "resolution_comment", n => { ResolutionComment = n.GetStringValue(); } }, + { "state", n => { State = n.GetEnumValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteEnumValue("resolution", Resolution); + writer.WriteStringValue("resolution_comment", ResolutionComment); + writer.WriteEnumValue("state", State); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/SecretScanning/PushProtectionBypasses/PushProtectionBypassesPostRequestBody.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/SecretScanning/PushProtectionBypasses/PushProtectionBypassesPostRequestBody.cs new file mode 100644 index 0000000..62a06b9 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/SecretScanning/PushProtectionBypasses/PushProtectionBypassesPostRequestBody.cs @@ -0,0 +1,70 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.SecretScanning.PushProtectionBypasses +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class PushProtectionBypassesPostRequestBody : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The ID of the push protection bypass placeholder. This value is returned on any push protected routes. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? PlaceholderId { get; set; } +#nullable restore +#else + public string PlaceholderId { get; set; } +#endif + /// The reason for bypassing push protection. + public global::Ayllu.Github.Client.Models.SecretScanningPushProtectionBypassReason? Reason { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public PushProtectionBypassesPostRequestBody() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Repos.Item.Item.SecretScanning.PushProtectionBypasses.PushProtectionBypassesPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Repos.Item.Item.SecretScanning.PushProtectionBypasses.PushProtectionBypassesPostRequestBody(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "placeholder_id", n => { PlaceholderId = n.GetStringValue(); } }, + { "reason", n => { Reason = n.GetEnumValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("placeholder_id", PlaceholderId); + writer.WriteEnumValue("reason", Reason); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/SecretScanning/PushProtectionBypasses/PushProtectionBypassesRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/SecretScanning/PushProtectionBypasses/PushProtectionBypassesRequestBuilder.cs new file mode 100644 index 0000000..7b97fc0 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/SecretScanning/PushProtectionBypasses/PushProtectionBypassesRequestBuilder.cs @@ -0,0 +1,103 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.SecretScanning.PushProtectionBypasses +{ + /// + /// Builds and executes requests for operations under \repos\{owner-id}\{repo-id}\secret-scanning\push-protection-bypasses + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class PushProtectionBypassesRequestBuilder : BaseRequestBuilder + { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public PushProtectionBypassesRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/secret-scanning/push-protection-bypasses", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public PushProtectionBypassesRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/secret-scanning/push-protection-bypasses", rawUrl) + { + } + /// + /// Creates a bypass for a previously push protected secret.The authenticated user must be the original author of the committed secret.OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. + /// API method documentation + /// + /// A + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 503 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PostAsync(global::Ayllu.Github.Client.Repos.Item.Item.SecretScanning.PushProtectionBypasses.PushProtectionBypassesPostRequestBody body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task PostAsync(global::Ayllu.Github.Client.Repos.Item.Item.SecretScanning.PushProtectionBypasses.PushProtectionBypassesPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPostRequestInformation(body, requestConfiguration); + var errorMapping = new Dictionary> + { + { "503", global::Ayllu.Github.Client.Models.SecretScanningPushProtectionBypass503Error.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Models.SecretScanningPushProtectionBypass.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// Creates a bypass for a previously push protected secret.The authenticated user must be the original author of the committed secret.OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. + /// + /// A + /// The request body + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPostRequestInformation(global::Ayllu.Github.Client.Repos.Item.Item.SecretScanning.PushProtectionBypasses.PushProtectionBypassesPostRequestBody body, Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToPostRequestInformation(global::Ayllu.Github.Client.Repos.Item.Item.SecretScanning.PushProtectionBypasses.PushProtectionBypassesPostRequestBody body, Action> requestConfiguration = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.Repos.Item.Item.SecretScanning.PushProtectionBypasses.PushProtectionBypassesRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Repos.Item.Item.SecretScanning.PushProtectionBypasses.PushProtectionBypassesRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class PushProtectionBypassesRequestBuilderPostRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/SecretScanning/ScanHistory/ScanHistoryRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/SecretScanning/ScanHistory/ScanHistoryRequestBuilder.cs new file mode 100644 index 0000000..1127b10 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/SecretScanning/ScanHistory/ScanHistoryRequestBuilder.cs @@ -0,0 +1,98 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.SecretScanning.ScanHistory +{ + /// + /// Builds and executes requests for operations under \repos\{owner-id}\{repo-id}\secret-scanning\scan-history + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class ScanHistoryRequestBuilder : BaseRequestBuilder + { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public ScanHistoryRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/secret-scanning/scan-history", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public ScanHistoryRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/secret-scanning/scan-history", rawUrl) + { + } + /// + /// Lists the latest default incremental and backfill scans by type for a repository. Scans from Copilot Secret Scanning are not included.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. + /// API method documentation + /// + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 503 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "503", global::Ayllu.Github.Client.Models.SecretScanningScanHistory503Error.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Models.SecretScanningScanHistory.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// Lists the latest default incremental and backfill scans by type for a repository. Scans from Copilot Secret Scanning are not included.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. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.Repos.Item.Item.SecretScanning.ScanHistory.ScanHistoryRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Repos.Item.Item.SecretScanning.ScanHistory.ScanHistoryRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class ScanHistoryRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/SecretScanning/SecretScanningRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/SecretScanning/SecretScanningRequestBuilder.cs new file mode 100644 index 0000000..8ffc4af --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/SecretScanning/SecretScanningRequestBuilder.cs @@ -0,0 +1,53 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Repos.Item.Item.SecretScanning.Alerts; +using Ayllu.Github.Client.Repos.Item.Item.SecretScanning.PushProtectionBypasses; +using Ayllu.Github.Client.Repos.Item.Item.SecretScanning.ScanHistory; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.SecretScanning +{ + /// + /// Builds and executes requests for operations under \repos\{owner-id}\{repo-id}\secret-scanning + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class SecretScanningRequestBuilder : BaseRequestBuilder + { + /// The alerts property + public global::Ayllu.Github.Client.Repos.Item.Item.SecretScanning.Alerts.AlertsRequestBuilder Alerts + { + get => new global::Ayllu.Github.Client.Repos.Item.Item.SecretScanning.Alerts.AlertsRequestBuilder(PathParameters, RequestAdapter); + } + /// The pushProtectionBypasses property + public global::Ayllu.Github.Client.Repos.Item.Item.SecretScanning.PushProtectionBypasses.PushProtectionBypassesRequestBuilder PushProtectionBypasses + { + get => new global::Ayllu.Github.Client.Repos.Item.Item.SecretScanning.PushProtectionBypasses.PushProtectionBypassesRequestBuilder(PathParameters, RequestAdapter); + } + /// The scanHistory property + public global::Ayllu.Github.Client.Repos.Item.Item.SecretScanning.ScanHistory.ScanHistoryRequestBuilder ScanHistory + { + get => new global::Ayllu.Github.Client.Repos.Item.Item.SecretScanning.ScanHistory.ScanHistoryRequestBuilder(PathParameters, RequestAdapter); + } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public SecretScanningRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/secret-scanning", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public SecretScanningRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/secret-scanning", rawUrl) + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/SecurityAdvisories/GetDirectionQueryParameterType.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/SecurityAdvisories/GetDirectionQueryParameterType.cs new file mode 100644 index 0000000..20fa2ed --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/SecurityAdvisories/GetDirectionQueryParameterType.cs @@ -0,0 +1,20 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.SecurityAdvisories +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public enum GetDirectionQueryParameterType + #pragma warning restore CS1591 + { + [EnumMember(Value = "asc")] + #pragma warning disable CS1591 + Asc, + #pragma warning restore CS1591 + [EnumMember(Value = "desc")] + #pragma warning disable CS1591 + Desc, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/SecurityAdvisories/GetSortQueryParameterType.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/SecurityAdvisories/GetSortQueryParameterType.cs new file mode 100644 index 0000000..2a30594 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/SecurityAdvisories/GetSortQueryParameterType.cs @@ -0,0 +1,24 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.SecurityAdvisories +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public enum GetSortQueryParameterType + #pragma warning restore CS1591 + { + [EnumMember(Value = "created")] + #pragma warning disable CS1591 + Created, + #pragma warning restore CS1591 + [EnumMember(Value = "updated")] + #pragma warning disable CS1591 + Updated, + #pragma warning restore CS1591 + [EnumMember(Value = "published")] + #pragma warning disable CS1591 + Published, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/SecurityAdvisories/GetStateQueryParameterType.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/SecurityAdvisories/GetStateQueryParameterType.cs new file mode 100644 index 0000000..7c2a7df --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/SecurityAdvisories/GetStateQueryParameterType.cs @@ -0,0 +1,28 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.SecurityAdvisories +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public enum GetStateQueryParameterType + #pragma warning restore CS1591 + { + [EnumMember(Value = "triage")] + #pragma warning disable CS1591 + Triage, + #pragma warning restore CS1591 + [EnumMember(Value = "draft")] + #pragma warning disable CS1591 + Draft, + #pragma warning restore CS1591 + [EnumMember(Value = "published")] + #pragma warning disable CS1591 + Published, + #pragma warning restore CS1591 + [EnumMember(Value = "closed")] + #pragma warning disable CS1591 + Closed, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/SecurityAdvisories/Item/Cve/CvePostResponse.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/SecurityAdvisories/Item/Cve/CvePostResponse.cs new file mode 100644 index 0000000..5381d64 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/SecurityAdvisories/Item/Cve/CvePostResponse.cs @@ -0,0 +1,55 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.SecurityAdvisories.Item.Cve +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class CvePostResponse : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public CvePostResponse() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Repos.Item.Item.SecurityAdvisories.Item.Cve.CvePostResponse CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Repos.Item.Item.SecurityAdvisories.Item.Cve.CvePostResponse(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/SecurityAdvisories/Item/Cve/CveRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/SecurityAdvisories/Item/Cve/CveRequestBuilder.cs new file mode 100644 index 0000000..e4a6218 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/SecurityAdvisories/Item/Cve/CveRequestBuilder.cs @@ -0,0 +1,135 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.SecurityAdvisories.Item.Cve +{ + /// + /// Builds and executes requests for operations under \repos\{owner-id}\{repo-id}\security-advisories\{ghsa_id}\cve + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class CveRequestBuilder : BaseRequestBuilder + { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public CveRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/security-advisories/{ghsa_id}/cve", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public CveRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/security-advisories/{ghsa_id}/cve", rawUrl) + { + } + /// + /// 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/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. + /// API method documentation + /// + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 400 status code + /// When receiving a 403 status code + /// When receiving a 404 status code + /// When receiving a 422 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PostAsCvePostResponseAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task PostAsCvePostResponseAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToPostRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "400", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "403", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "404", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "422", global::Ayllu.Github.Client.Models.ValidationError.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Repos.Item.Item.SecurityAdvisories.Item.Cve.CvePostResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// 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/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. + /// API method documentation + /// + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 400 status code + /// When receiving a 403 status code + /// When receiving a 404 status code + /// When receiving a 422 status code + [Obsolete("This method is obsolete. Use PostAsCvePostResponseAsync instead.")] +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PostAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task PostAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToPostRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "400", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "403", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "404", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "422", global::Ayllu.Github.Client.Models.ValidationError.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Repos.Item.Item.SecurityAdvisories.Item.Cve.CveResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// 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/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. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPostRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToPostRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.Repos.Item.Item.SecurityAdvisories.Item.Cve.CveRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Repos.Item.Item.SecurityAdvisories.Item.Cve.CveRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class CveRequestBuilderPostRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/SecurityAdvisories/Item/Cve/CveResponse.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/SecurityAdvisories/Item/Cve/CveResponse.cs new file mode 100644 index 0000000..1eff981 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/SecurityAdvisories/Item/Cve/CveResponse.cs @@ -0,0 +1,28 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.SecurityAdvisories.Item.Cve +{ + [Obsolete("This class is obsolete. Use CvePostResponse instead.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class CveResponse : global::Ayllu.Github.Client.Repos.Item.Item.SecurityAdvisories.Item.Cve.CvePostResponse, IParsable + #pragma warning restore CS1591 + { + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static new global::Ayllu.Github.Client.Repos.Item.Item.SecurityAdvisories.Item.Cve.CveResponse CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Repos.Item.Item.SecurityAdvisories.Item.Cve.CveResponse(); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/SecurityAdvisories/Item/Forks/ForksRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/SecurityAdvisories/Item/Forks/ForksRequestBuilder.cs new file mode 100644 index 0000000..e54e71a --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/SecurityAdvisories/Item/Forks/ForksRequestBuilder.cs @@ -0,0 +1,104 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.SecurityAdvisories.Item.Forks +{ + /// + /// Builds and executes requests for operations under \repos\{owner-id}\{repo-id}\security-advisories\{ghsa_id}\forks + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class ForksRequestBuilder : BaseRequestBuilder + { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public ForksRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/security-advisories/{ghsa_id}/forks", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public ForksRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/security-advisories/{ghsa_id}/forks", rawUrl) + { + } + /// + /// 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. + /// API method documentation + /// + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 400 status code + /// When receiving a 403 status code + /// When receiving a 404 status code + /// When receiving a 422 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PostAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task PostAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToPostRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "400", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "403", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "404", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "422", global::Ayllu.Github.Client.Models.ValidationError.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Models.FullRepository.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// 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. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPostRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToPostRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.Repos.Item.Item.SecurityAdvisories.Item.Forks.ForksRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Repos.Item.Item.SecurityAdvisories.Item.Forks.ForksRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class ForksRequestBuilderPostRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/SecurityAdvisories/Item/WithGhsa_ItemRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/SecurityAdvisories/Item/WithGhsa_ItemRequestBuilder.cs new file mode 100644 index 0000000..6fd46c3 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/SecurityAdvisories/Item/WithGhsa_ItemRequestBuilder.cs @@ -0,0 +1,172 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Ayllu.Github.Client.Repos.Item.Item.SecurityAdvisories.Item.Cve; +using Ayllu.Github.Client.Repos.Item.Item.SecurityAdvisories.Item.Forks; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.SecurityAdvisories.Item +{ + /// + /// Builds and executes requests for operations under \repos\{owner-id}\{repo-id}\security-advisories\{ghsa_id} + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithGhsa_ItemRequestBuilder : BaseRequestBuilder + { + /// The cve property + public global::Ayllu.Github.Client.Repos.Item.Item.SecurityAdvisories.Item.Cve.CveRequestBuilder Cve + { + get => new global::Ayllu.Github.Client.Repos.Item.Item.SecurityAdvisories.Item.Cve.CveRequestBuilder(PathParameters, RequestAdapter); + } + /// The forks property + public global::Ayllu.Github.Client.Repos.Item.Item.SecurityAdvisories.Item.Forks.ForksRequestBuilder Forks + { + get => new global::Ayllu.Github.Client.Repos.Item.Item.SecurityAdvisories.Item.Forks.ForksRequestBuilder(PathParameters, RequestAdapter); + } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public WithGhsa_ItemRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/security-advisories/{ghsa_id}", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public WithGhsa_ItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/security-advisories/{ghsa_id}", rawUrl) + { + } + /// + /// 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. + /// API method documentation + /// + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 403 status code + /// When receiving a 404 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "403", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "404", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Models.RepositoryAdvisory.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// 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. + /// API method documentation + /// + /// A + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 403 status code + /// When receiving a 404 status code + /// When receiving a 422 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PatchAsync(global::Ayllu.Github.Client.Models.RepositoryAdvisoryUpdate body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task PatchAsync(global::Ayllu.Github.Client.Models.RepositoryAdvisoryUpdate body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPatchRequestInformation(body, requestConfiguration); + var errorMapping = new Dictionary> + { + { "403", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "404", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "422", global::Ayllu.Github.Client.Models.ValidationError.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Models.RepositoryAdvisory.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// 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. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// 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. + /// + /// A + /// The request body + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPatchRequestInformation(global::Ayllu.Github.Client.Models.RepositoryAdvisoryUpdate body, Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToPatchRequestInformation(global::Ayllu.Github.Client.Models.RepositoryAdvisoryUpdate body, Action> requestConfiguration = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.Repos.Item.Item.SecurityAdvisories.Item.WithGhsa_ItemRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Repos.Item.Item.SecurityAdvisories.Item.WithGhsa_ItemRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithGhsa_ItemRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithGhsa_ItemRequestBuilderPatchRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/SecurityAdvisories/Reports/ReportsRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/SecurityAdvisories/Reports/ReportsRequestBuilder.cs new file mode 100644 index 0000000..d8e9ad6 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/SecurityAdvisories/Reports/ReportsRequestBuilder.cs @@ -0,0 +1,107 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.SecurityAdvisories.Reports +{ + /// + /// Builds and executes requests for operations under \repos\{owner-id}\{repo-id}\security-advisories\reports + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class ReportsRequestBuilder : BaseRequestBuilder + { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public ReportsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/security-advisories/reports", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public ReportsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/security-advisories/reports", rawUrl) + { + } + /// + /// Report a security vulnerability to the maintainers of the repository.See "[Privately reporting a security vulnerability](https://docs.github.com/code-security/security-advisories/guidance-on-reporting-and-writing/privately-reporting-a-security-vulnerability)" for more information about private vulnerability reporting. + /// API method documentation + /// + /// A + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 403 status code + /// When receiving a 404 status code + /// When receiving a 422 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PostAsync(global::Ayllu.Github.Client.Models.PrivateVulnerabilityReportCreate body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task PostAsync(global::Ayllu.Github.Client.Models.PrivateVulnerabilityReportCreate body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPostRequestInformation(body, requestConfiguration); + var errorMapping = new Dictionary> + { + { "403", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "404", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "422", global::Ayllu.Github.Client.Models.ValidationError.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Models.RepositoryAdvisory.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// Report a security vulnerability to the maintainers of the repository.See "[Privately reporting a security vulnerability](https://docs.github.com/code-security/security-advisories/guidance-on-reporting-and-writing/privately-reporting-a-security-vulnerability)" for more information about private vulnerability reporting. + /// + /// A + /// The request body + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPostRequestInformation(global::Ayllu.Github.Client.Models.PrivateVulnerabilityReportCreate body, Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToPostRequestInformation(global::Ayllu.Github.Client.Models.PrivateVulnerabilityReportCreate body, Action> requestConfiguration = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.Repos.Item.Item.SecurityAdvisories.Reports.ReportsRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Repos.Item.Item.SecurityAdvisories.Reports.ReportsRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class ReportsRequestBuilderPostRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/SecurityAdvisories/SecurityAdvisoriesRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/SecurityAdvisories/SecurityAdvisoriesRequestBuilder.cs new file mode 100644 index 0000000..325b81f --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/SecurityAdvisories/SecurityAdvisoriesRequestBuilder.cs @@ -0,0 +1,252 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Ayllu.Github.Client.Repos.Item.Item.SecurityAdvisories.Item; +using Ayllu.Github.Client.Repos.Item.Item.SecurityAdvisories.Reports; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.SecurityAdvisories +{ + /// + /// Builds and executes requests for operations under \repos\{owner-id}\{repo-id}\security-advisories + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class SecurityAdvisoriesRequestBuilder : BaseRequestBuilder + { + /// The reports property + public global::Ayllu.Github.Client.Repos.Item.Item.SecurityAdvisories.Reports.ReportsRequestBuilder Reports + { + get => new global::Ayllu.Github.Client.Repos.Item.Item.SecurityAdvisories.Reports.ReportsRequestBuilder(PathParameters, RequestAdapter); + } + /// Gets an item from the Ayllu.Github.Client.repos.item.item.securityAdvisories.item collection + /// The GHSA (GitHub Security Advisory) identifier of the advisory. + /// A + public global::Ayllu.Github.Client.Repos.Item.Item.SecurityAdvisories.Item.WithGhsa_ItemRequestBuilder this[string position] + { + get + { + var urlTplParams = new Dictionary(PathParameters); + urlTplParams.Add("ghsa_id", position); + return new global::Ayllu.Github.Client.Repos.Item.Item.SecurityAdvisories.Item.WithGhsa_ItemRequestBuilder(urlTplParams, RequestAdapter); + } + } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public SecurityAdvisoriesRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/security-advisories{?after*,before*,direction*,per_page*,sort*,state*}", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public SecurityAdvisoriesRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/security-advisories{?after*,before*,direction*,per_page*,sort*,state*}", rawUrl) + { + } + /// + /// 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. + /// API method documentation + /// + /// A List<global::Ayllu.Github.Client.Models.RepositoryAdvisory> + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 400 status code + /// When receiving a 404 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task?> GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task> GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "400", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "404", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + }; + var collectionResult = await RequestAdapter.SendCollectionAsync(requestInfo, global::Ayllu.Github.Client.Models.RepositoryAdvisory.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + return collectionResult?.AsList(); + } + /// + /// 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. + /// API method documentation + /// + /// A + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 403 status code + /// When receiving a 404 status code + /// When receiving a 422 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PostAsync(global::Ayllu.Github.Client.Models.RepositoryAdvisoryCreate body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task PostAsync(global::Ayllu.Github.Client.Models.RepositoryAdvisoryCreate body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPostRequestInformation(body, requestConfiguration); + var errorMapping = new Dictionary> + { + { "403", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "404", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "422", global::Ayllu.Github.Client.Models.ValidationError.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Models.RepositoryAdvisory.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// 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. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// 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. + /// + /// A + /// The request body + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPostRequestInformation(global::Ayllu.Github.Client.Models.RepositoryAdvisoryCreate body, Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToPostRequestInformation(global::Ayllu.Github.Client.Models.RepositoryAdvisoryCreate body, Action> requestConfiguration = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.Repos.Item.Item.SecurityAdvisories.SecurityAdvisoriesRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Repos.Item.Item.SecurityAdvisories.SecurityAdvisoriesRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// 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. + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class SecurityAdvisoriesRequestBuilderGetQueryParameters + { + /// A cursor, as given in the [Link header](https://docs.github.com/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/rest/using-the-rest-api/using-pagination-in-the-rest-api)." +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("after")] + public string? After { get; set; } +#nullable restore +#else + [QueryParameter("after")] + public string After { get; set; } +#endif + /// A cursor, as given in the [Link header](https://docs.github.com/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/rest/using-the-rest-api/using-pagination-in-the-rest-api)." +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("before")] + public string? Before { get; set; } +#nullable restore +#else + [QueryParameter("before")] + public string Before { get; set; } +#endif + /// The direction to sort the results by. + [Obsolete("This property is deprecated, use DirectionAsGetDirectionQueryParameterType instead")] +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("direction")] + public string? Direction { get; set; } +#nullable restore +#else + [QueryParameter("direction")] + public string Direction { get; set; } +#endif + /// The direction to sort the results by. + [QueryParameter("direction")] + public global::Ayllu.Github.Client.Repos.Item.Item.SecurityAdvisories.GetDirectionQueryParameterType? DirectionAsGetDirectionQueryParameterType { get; set; } + /// The number of advisories to return per page. For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." + [QueryParameter("per_page")] + public int? PerPage { get; set; } + /// The property to sort the results by. + [Obsolete("This property is deprecated, use SortAsGetSortQueryParameterType instead")] +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("sort")] + public string? Sort { get; set; } +#nullable restore +#else + [QueryParameter("sort")] + public string Sort { get; set; } +#endif + /// The property to sort the results by. + [QueryParameter("sort")] + public global::Ayllu.Github.Client.Repos.Item.Item.SecurityAdvisories.GetSortQueryParameterType? SortAsGetSortQueryParameterType { get; set; } + /// Filter by state of the repository advisories. Only advisories of this state will be returned. + [Obsolete("This property is deprecated, use StateAsGetStateQueryParameterType instead")] +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("state")] + public string? State { get; set; } +#nullable restore +#else + [QueryParameter("state")] + public string State { get; set; } +#endif + /// Filter by state of the repository advisories. Only advisories of this state will be returned. + [QueryParameter("state")] + public global::Ayllu.Github.Client.Repos.Item.Item.SecurityAdvisories.GetStateQueryParameterType? StateAsGetStateQueryParameterType { get; set; } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class SecurityAdvisoriesRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class SecurityAdvisoriesRequestBuilderPostRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Stargazers/SimpleUser.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Stargazers/SimpleUser.cs new file mode 100644 index 0000000..6971d05 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Stargazers/SimpleUser.cs @@ -0,0 +1,55 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.Stargazers +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class SimpleUser : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public SimpleUser() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Repos.Item.Item.Stargazers.SimpleUser CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Repos.Item.Item.Stargazers.SimpleUser(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Stargazers/Stargazer.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Stargazers/Stargazer.cs new file mode 100644 index 0000000..b9eef00 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Stargazers/Stargazer.cs @@ -0,0 +1,55 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.Stargazers +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class Stargazer : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public Stargazer() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Repos.Item.Item.Stargazers.Stargazer CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Repos.Item.Item.Stargazers.Stargazer(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Stargazers/StargazersRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Stargazers/StargazersRequestBuilder.cs new file mode 100644 index 0000000..27f45c8 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Stargazers/StargazersRequestBuilder.cs @@ -0,0 +1,268 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.Stargazers +{ + /// + /// Builds and executes requests for operations under \repos\{owner-id}\{repo-id}\stargazers + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class StargazersRequestBuilder : BaseRequestBuilder + { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public StargazersRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/stargazers{?page*,per_page*}", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public StargazersRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/stargazers{?page*,per_page*}", rawUrl) + { + } + /// + /// 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/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. + /// API method documentation + /// + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 422 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsStargazersGetResponseAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task GetAsStargazersGetResponseAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "422", global::Ayllu.Github.Client.Models.ValidationError.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Repos.Item.Item.Stargazers.StargazersRequestBuilder.StargazersGetResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// 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/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. + /// API method documentation + /// + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 422 status code + [Obsolete("This method is obsolete. Use GetAsStargazersGetResponseAsync instead.")] +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "422", global::Ayllu.Github.Client.Models.ValidationError.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Repos.Item.Item.Stargazers.StargazersRequestBuilder.StargazersResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// 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/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. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.Repos.Item.Item.Stargazers.StargazersRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Repos.Item.Item.Stargazers.StargazersRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Composed type wrapper for classes List<global::Ayllu.Github.Client.Repos.Item.Item.Stargazers.SimpleUser>, List<global::Ayllu.Github.Client.Repos.Item.Item.Stargazers.Stargazer> + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class StargazersGetResponse : IComposedTypeWrapper, IParsable + { + /// Composed type representation for type List<global::Ayllu.Github.Client.Repos.Item.Item.Stargazers.SimpleUser> +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? SimpleUser { get; set; } +#nullable restore +#else + public List SimpleUser { get; set; } +#endif + /// Composed type representation for type List<global::Ayllu.Github.Client.Repos.Item.Item.Stargazers.Stargazer> +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? Stargazer { get; set; } +#nullable restore +#else + public List Stargazer { get; set; } +#endif + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Repos.Item.Item.Stargazers.StargazersRequestBuilder.StargazersGetResponse CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + var result = new global::Ayllu.Github.Client.Repos.Item.Item.Stargazers.StargazersRequestBuilder.StargazersGetResponse(); + if(parseNode.GetCollectionOfObjectValues(global::Ayllu.Github.Client.Repos.Item.Item.Stargazers.SimpleUser.CreateFromDiscriminatorValue)?.AsList() is List simpleUserValue) + { + result.SimpleUser = simpleUserValue; + } + else if(parseNode.GetCollectionOfObjectValues(global::Ayllu.Github.Client.Repos.Item.Item.Stargazers.Stargazer.CreateFromDiscriminatorValue)?.AsList() is List stargazerValue) + { + result.Stargazer = stargazerValue; + } + return result; + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary>(); + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(SimpleUser != null) + { + writer.WriteCollectionOfObjectValues(null, SimpleUser); + } + else if(Stargazer != null) + { + writer.WriteCollectionOfObjectValues(null, Stargazer); + } + } + } + /// + /// 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/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. + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class StargazersRequestBuilderGetQueryParameters + { + /// The page number of the results to fetch. For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." + [QueryParameter("page")] + public int? Page { get; set; } + /// The number of results per page (max 100). For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." + [QueryParameter("per_page")] + public int? PerPage { get; set; } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class StargazersRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + /// + /// Composed type wrapper for classes List<global::Ayllu.Github.Client.Repos.Item.Item.Stargazers.SimpleUser>, List<global::Ayllu.Github.Client.Repos.Item.Item.Stargazers.Stargazer> + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class StargazersResponse : IComposedTypeWrapper, IParsable + { + /// Composed type representation for type List<global::Ayllu.Github.Client.Repos.Item.Item.Stargazers.SimpleUser> +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? SimpleUser { get; set; } +#nullable restore +#else + public List SimpleUser { get; set; } +#endif + /// Composed type representation for type List<global::Ayllu.Github.Client.Repos.Item.Item.Stargazers.Stargazer> +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? Stargazer { get; set; } +#nullable restore +#else + public List Stargazer { get; set; } +#endif + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Repos.Item.Item.Stargazers.StargazersRequestBuilder.StargazersResponse CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + var result = new global::Ayllu.Github.Client.Repos.Item.Item.Stargazers.StargazersRequestBuilder.StargazersResponse(); + if(parseNode.GetCollectionOfObjectValues(global::Ayllu.Github.Client.Repos.Item.Item.Stargazers.SimpleUser.CreateFromDiscriminatorValue)?.AsList() is List simpleUserValue) + { + result.SimpleUser = simpleUserValue; + } + else if(parseNode.GetCollectionOfObjectValues(global::Ayllu.Github.Client.Repos.Item.Item.Stargazers.Stargazer.CreateFromDiscriminatorValue)?.AsList() is List stargazerValue) + { + result.Stargazer = stargazerValue; + } + return result; + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary>(); + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(SimpleUser != null) + { + writer.WriteCollectionOfObjectValues(null, SimpleUser); + } + else if(Stargazer != null) + { + writer.WriteCollectionOfObjectValues(null, Stargazer); + } + } + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Stats/Code_frequency/Code_frequencyRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Stats/Code_frequency/Code_frequencyRequestBuilder.cs new file mode 100644 index 0000000..68ffb3d --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Stats/Code_frequency/Code_frequencyRequestBuilder.cs @@ -0,0 +1,92 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.Stats.Code_frequency +{ + /// + /// Builds and executes requests for operations under \repos\{owner-id}\{repo-id}\stats\code_frequency + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class Code_frequencyRequestBuilder : BaseRequestBuilder + { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public Code_frequencyRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/stats/code_frequency", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public Code_frequencyRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/stats/code_frequency", rawUrl) + { + } + /// + /// 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 contains 10,000 or more commits, a 422 status code will be returned. + /// API method documentation + /// + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + return await RequestAdapter.SendAsync(requestInfo, UntypedNode.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false); + } + /// + /// 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 contains 10,000 or more commits, a 422 status code will be returned. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.Repos.Item.Item.Stats.Code_frequency.Code_frequencyRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Repos.Item.Item.Stats.Code_frequency.Code_frequencyRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class Code_frequencyRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Stats/Commit_activity/Commit_activityRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Stats/Commit_activity/Commit_activityRequestBuilder.cs new file mode 100644 index 0000000..ee9f29d --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Stats/Commit_activity/Commit_activityRequestBuilder.cs @@ -0,0 +1,94 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.Stats.Commit_activity +{ + /// + /// Builds and executes requests for operations under \repos\{owner-id}\{repo-id}\stats\commit_activity + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class Commit_activityRequestBuilder : BaseRequestBuilder + { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public Commit_activityRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/stats/commit_activity", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public Commit_activityRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/stats/commit_activity", rawUrl) + { + } + /// + /// Returns the last year of commit activity grouped by week. The `days` array is a group of commits per day, starting on `Sunday`. + /// API method documentation + /// + /// A List<global::Ayllu.Github.Client.Models.CommitActivity> + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task?> GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task> GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var collectionResult = await RequestAdapter.SendCollectionAsync(requestInfo, global::Ayllu.Github.Client.Models.CommitActivity.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false); + return collectionResult?.AsList(); + } + /// + /// Returns the last year of commit activity grouped by week. The `days` array is a group of commits per day, starting on `Sunday`. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.Repos.Item.Item.Stats.Commit_activity.Commit_activityRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Repos.Item.Item.Stats.Commit_activity.Commit_activityRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class Commit_activityRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Stats/Contributors/ContributorsRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Stats/Contributors/ContributorsRequestBuilder.cs new file mode 100644 index 0000000..8be1748 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Stats/Contributors/ContributorsRequestBuilder.cs @@ -0,0 +1,94 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.Stats.Contributors +{ + /// + /// Builds and executes requests for operations under \repos\{owner-id}\{repo-id}\stats\contributors + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class ContributorsRequestBuilder : BaseRequestBuilder + { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public ContributorsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/stats/contributors", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public ContributorsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/stats/contributors", rawUrl) + { + } + /// + /// 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. + /// API method documentation + /// + /// A List<global::Ayllu.Github.Client.Models.ContributorActivity> + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task?> GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task> GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var collectionResult = await RequestAdapter.SendCollectionAsync(requestInfo, global::Ayllu.Github.Client.Models.ContributorActivity.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false); + return collectionResult?.AsList(); + } + /// + /// 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. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.Repos.Item.Item.Stats.Contributors.ContributorsRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Repos.Item.Item.Stats.Contributors.ContributorsRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class ContributorsRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Stats/Participation/ParticipationRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Stats/Participation/ParticipationRequestBuilder.cs new file mode 100644 index 0000000..fe5ef8d --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Stats/Participation/ParticipationRequestBuilder.cs @@ -0,0 +1,98 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.Stats.Participation +{ + /// + /// Builds and executes requests for operations under \repos\{owner-id}\{repo-id}\stats\participation + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class ParticipationRequestBuilder : BaseRequestBuilder + { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public ParticipationRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/stats/participation", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public ParticipationRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/stats/participation", rawUrl) + { + } + /// + /// 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. + /// API method documentation + /// + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 404 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "404", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Models.ParticipationStats.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// 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. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.Repos.Item.Item.Stats.Participation.ParticipationRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Repos.Item.Item.Stats.Participation.ParticipationRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class ParticipationRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Stats/Punch_card/Punch_cardRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Stats/Punch_card/Punch_cardRequestBuilder.cs new file mode 100644 index 0000000..091648a --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Stats/Punch_card/Punch_cardRequestBuilder.cs @@ -0,0 +1,92 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.Stats.Punch_card +{ + /// + /// Builds and executes requests for operations under \repos\{owner-id}\{repo-id}\stats\punch_card + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class Punch_cardRequestBuilder : BaseRequestBuilder + { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public Punch_cardRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/stats/punch_card", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public Punch_cardRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/stats/punch_card", rawUrl) + { + } + /// + /// 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. + /// API method documentation + /// + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + return await RequestAdapter.SendAsync(requestInfo, UntypedNode.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false); + } + /// + /// 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. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.Repos.Item.Item.Stats.Punch_card.Punch_cardRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Repos.Item.Item.Stats.Punch_card.Punch_cardRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class Punch_cardRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Stats/StatsRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Stats/StatsRequestBuilder.cs new file mode 100644 index 0000000..e269b0a --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Stats/StatsRequestBuilder.cs @@ -0,0 +1,65 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Repos.Item.Item.Stats.Code_frequency; +using Ayllu.Github.Client.Repos.Item.Item.Stats.Commit_activity; +using Ayllu.Github.Client.Repos.Item.Item.Stats.Contributors; +using Ayllu.Github.Client.Repos.Item.Item.Stats.Participation; +using Ayllu.Github.Client.Repos.Item.Item.Stats.Punch_card; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.Stats +{ + /// + /// Builds and executes requests for operations under \repos\{owner-id}\{repo-id}\stats + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class StatsRequestBuilder : BaseRequestBuilder + { + /// The code_frequency property + public global::Ayllu.Github.Client.Repos.Item.Item.Stats.Code_frequency.Code_frequencyRequestBuilder Code_frequency + { + get => new global::Ayllu.Github.Client.Repos.Item.Item.Stats.Code_frequency.Code_frequencyRequestBuilder(PathParameters, RequestAdapter); + } + /// The commit_activity property + public global::Ayllu.Github.Client.Repos.Item.Item.Stats.Commit_activity.Commit_activityRequestBuilder Commit_activity + { + get => new global::Ayllu.Github.Client.Repos.Item.Item.Stats.Commit_activity.Commit_activityRequestBuilder(PathParameters, RequestAdapter); + } + /// The contributors property + public global::Ayllu.Github.Client.Repos.Item.Item.Stats.Contributors.ContributorsRequestBuilder Contributors + { + get => new global::Ayllu.Github.Client.Repos.Item.Item.Stats.Contributors.ContributorsRequestBuilder(PathParameters, RequestAdapter); + } + /// The participation property + public global::Ayllu.Github.Client.Repos.Item.Item.Stats.Participation.ParticipationRequestBuilder Participation + { + get => new global::Ayllu.Github.Client.Repos.Item.Item.Stats.Participation.ParticipationRequestBuilder(PathParameters, RequestAdapter); + } + /// The punch_card property + public global::Ayllu.Github.Client.Repos.Item.Item.Stats.Punch_card.Punch_cardRequestBuilder Punch_card + { + get => new global::Ayllu.Github.Client.Repos.Item.Item.Stats.Punch_card.Punch_cardRequestBuilder(PathParameters, RequestAdapter); + } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public StatsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/stats", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public StatsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/stats", rawUrl) + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Statuses/Item/WithShaItemRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Statuses/Item/WithShaItemRequestBuilder.cs new file mode 100644 index 0000000..6fc51f0 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Statuses/Item/WithShaItemRequestBuilder.cs @@ -0,0 +1,98 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.Statuses.Item +{ + /// + /// Builds and executes requests for operations under \repos\{owner-id}\{repo-id}\statuses\{sha} + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithShaItemRequestBuilder : BaseRequestBuilder + { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public WithShaItemRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/statuses/{sha}", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public WithShaItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/statuses/{sha}", rawUrl) + { + } + /// + /// 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. + /// API method documentation + /// + /// A + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PostAsync(global::Ayllu.Github.Client.Repos.Item.Item.Statuses.Item.WithShaPostRequestBody body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task PostAsync(global::Ayllu.Github.Client.Repos.Item.Item.Statuses.Item.WithShaPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPostRequestInformation(body, requestConfiguration); + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Models.Status.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false); + } + /// + /// 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. + /// + /// A + /// The request body + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPostRequestInformation(global::Ayllu.Github.Client.Repos.Item.Item.Statuses.Item.WithShaPostRequestBody body, Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToPostRequestInformation(global::Ayllu.Github.Client.Repos.Item.Item.Statuses.Item.WithShaPostRequestBody body, Action> requestConfiguration = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.Repos.Item.Item.Statuses.Item.WithShaItemRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Repos.Item.Item.Statuses.Item.WithShaItemRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithShaItemRequestBuilderPostRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Statuses/Item/WithShaPostRequestBody.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Statuses/Item/WithShaPostRequestBody.cs new file mode 100644 index 0000000..2e7e84d --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Statuses/Item/WithShaPostRequestBody.cs @@ -0,0 +1,90 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.Statuses.Item +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class WithShaPostRequestBody : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// A string label to differentiate this status from the status of other systems. This field is case-insensitive. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Context { get; set; } +#nullable restore +#else + public string Context { get; set; } +#endif + /// A short description of the status. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Description { get; set; } +#nullable restore +#else + public string Description { get; set; } +#endif + /// The state of the status. + public global::Ayllu.Github.Client.Repos.Item.Item.Statuses.Item.WithShaPostRequestBody_state? State { get; set; } + /// 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` +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? TargetUrl { get; set; } +#nullable restore +#else + public string TargetUrl { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public WithShaPostRequestBody() + { + AdditionalData = new Dictionary(); + Context = "default"; + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Repos.Item.Item.Statuses.Item.WithShaPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Repos.Item.Item.Statuses.Item.WithShaPostRequestBody(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "context", n => { Context = n.GetStringValue(); } }, + { "description", n => { Description = n.GetStringValue(); } }, + { "state", n => { State = n.GetEnumValue(); } }, + { "target_url", n => { TargetUrl = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("context", Context); + writer.WriteStringValue("description", Description); + writer.WriteEnumValue("state", State); + writer.WriteStringValue("target_url", TargetUrl); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Statuses/Item/WithShaPostRequestBody_state.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Statuses/Item/WithShaPostRequestBody_state.cs new file mode 100644 index 0000000..f1ff3ca --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Statuses/Item/WithShaPostRequestBody_state.cs @@ -0,0 +1,27 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.Statuses.Item +{ + /// The state of the status. + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public enum WithShaPostRequestBody_state + { + [EnumMember(Value = "error")] + #pragma warning disable CS1591 + Error, + #pragma warning restore CS1591 + [EnumMember(Value = "failure")] + #pragma warning disable CS1591 + Failure, + #pragma warning restore CS1591 + [EnumMember(Value = "pending")] + #pragma warning disable CS1591 + Pending, + #pragma warning restore CS1591 + [EnumMember(Value = "success")] + #pragma warning disable CS1591 + Success, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Statuses/StatusesRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Statuses/StatusesRequestBuilder.cs new file mode 100644 index 0000000..26001e5 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Statuses/StatusesRequestBuilder.cs @@ -0,0 +1,48 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Repos.Item.Item.Statuses.Item; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.Statuses +{ + /// + /// Builds and executes requests for operations under \repos\{owner-id}\{repo-id}\statuses + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class StatusesRequestBuilder : BaseRequestBuilder + { + /// Gets an item from the Ayllu.Github.Client.repos.item.item.statuses.item collection + /// Unique identifier of the item + /// A + public global::Ayllu.Github.Client.Repos.Item.Item.Statuses.Item.WithShaItemRequestBuilder this[string position] + { + get + { + var urlTplParams = new Dictionary(PathParameters); + urlTplParams.Add("sha", position); + return new global::Ayllu.Github.Client.Repos.Item.Item.Statuses.Item.WithShaItemRequestBuilder(urlTplParams, RequestAdapter); + } + } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public StatusesRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/statuses", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public StatusesRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/statuses", rawUrl) + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Subscribers/SubscribersRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Subscribers/SubscribersRequestBuilder.cs new file mode 100644 index 0000000..ae8e7ce --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Subscribers/SubscribersRequestBuilder.cs @@ -0,0 +1,107 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.Subscribers +{ + /// + /// Builds and executes requests for operations under \repos\{owner-id}\{repo-id}\subscribers + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class SubscribersRequestBuilder : BaseRequestBuilder + { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public SubscribersRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/subscribers{?page*,per_page*}", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public SubscribersRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/subscribers{?page*,per_page*}", rawUrl) + { + } + /// + /// Lists the people watching the specified repository. + /// API method documentation + /// + /// A List<global::Ayllu.Github.Client.Models.SimpleUser> + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task?> GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task> GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var collectionResult = await RequestAdapter.SendCollectionAsync(requestInfo, global::Ayllu.Github.Client.Models.SimpleUser.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false); + return collectionResult?.AsList(); + } + /// + /// Lists the people watching the specified repository. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.Repos.Item.Item.Subscribers.SubscribersRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Repos.Item.Item.Subscribers.SubscribersRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Lists the people watching the specified repository. + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class SubscribersRequestBuilderGetQueryParameters + { + /// The page number of the results to fetch. For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." + [QueryParameter("page")] + public int? Page { get; set; } + /// The number of results per page (max 100). For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." + [QueryParameter("per_page")] + public int? PerPage { get; set; } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class SubscribersRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Subscription/SubscriptionPutRequestBody.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Subscription/SubscriptionPutRequestBody.cs new file mode 100644 index 0000000..9f199bb --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Subscription/SubscriptionPutRequestBody.cs @@ -0,0 +1,63 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.Subscription +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class SubscriptionPutRequestBody : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// Determines if all notifications should be blocked from this repository. + public bool? Ignored { get; set; } + /// Determines if notifications should be received from this repository. + public bool? Subscribed { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public SubscriptionPutRequestBody() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Repos.Item.Item.Subscription.SubscriptionPutRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Repos.Item.Item.Subscription.SubscriptionPutRequestBody(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "ignored", n => { Ignored = n.GetBoolValue(); } }, + { "subscribed", n => { Subscribed = n.GetBoolValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteBoolValue("ignored", Ignored); + writer.WriteBoolValue("subscribed", Subscribed); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Subscription/SubscriptionRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Subscription/SubscriptionRequestBuilder.cs new file mode 100644 index 0000000..43b89ae --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Subscription/SubscriptionRequestBuilder.cs @@ -0,0 +1,193 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.Subscription +{ + /// + /// Builds and executes requests for operations under \repos\{owner-id}\{repo-id}\subscription + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class SubscriptionRequestBuilder : BaseRequestBuilder + { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public SubscriptionRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/subscription", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public SubscriptionRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/subscription", rawUrl) + { + } + /// + /// 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/rest/activity/watching#set-a-repository-subscription). + /// API method documentation + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task DeleteAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task DeleteAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToDeleteRequestInformation(requestConfiguration); + await RequestAdapter.SendNoContentAsync(requestInfo, default, cancellationToken).ConfigureAwait(false); + } + /// + /// Gets information about whether the authenticated user is subscribed to the repository. + /// API method documentation + /// + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 403 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "403", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Models.RepositorySubscription.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// 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/rest/activity/watching#delete-a-repository-subscription) completely. + /// API method documentation + /// + /// A + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PutAsync(global::Ayllu.Github.Client.Repos.Item.Item.Subscription.SubscriptionPutRequestBody body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task PutAsync(global::Ayllu.Github.Client.Repos.Item.Item.Subscription.SubscriptionPutRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPutRequestInformation(body, requestConfiguration); + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Models.RepositorySubscription.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false); + } + /// + /// 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/rest/activity/watching#set-a-repository-subscription). + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToDeleteRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToDeleteRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.DELETE, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + return requestInfo; + } + /// + /// Gets information about whether the authenticated user is subscribed to the repository. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// 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/rest/activity/watching#delete-a-repository-subscription) completely. + /// + /// A + /// The request body + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPutRequestInformation(global::Ayllu.Github.Client.Repos.Item.Item.Subscription.SubscriptionPutRequestBody body, Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToPutRequestInformation(global::Ayllu.Github.Client.Repos.Item.Item.Subscription.SubscriptionPutRequestBody body, Action> requestConfiguration = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation(Method.PUT, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.Repos.Item.Item.Subscription.SubscriptionRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Repos.Item.Item.Subscription.SubscriptionRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class SubscriptionRequestBuilderDeleteRequestConfiguration : RequestConfiguration + { + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class SubscriptionRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class SubscriptionRequestBuilderPutRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Tags/Protection/Item/WithTag_protection_ItemRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Tags/Protection/Item/WithTag_protection_ItemRequestBuilder.cs new file mode 100644 index 0000000..2438b57 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Tags/Protection/Item/WithTag_protection_ItemRequestBuilder.cs @@ -0,0 +1,102 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.Tags.Protection.Item +{ + /// + /// Builds and executes requests for operations under \repos\{owner-id}\{repo-id}\tags\protection\{tag_protection_id} + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithTag_protection_ItemRequestBuilder : BaseRequestBuilder + { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public WithTag_protection_ItemRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/tags/protection/{tag_protection_id}", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public WithTag_protection_ItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/tags/protection/{tag_protection_id}", rawUrl) + { + } + /// + /// > [!WARNING]> **Closing down notice:** This operation is closing down and will be removed after August 30, 2024. Use the "[Repository Rulesets](https://docs.github.com/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. + /// API method documentation + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 403 status code + /// When receiving a 404 status code + [Obsolete("")] +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task DeleteAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task DeleteAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToDeleteRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "403", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "404", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + }; + await RequestAdapter.SendNoContentAsync(requestInfo, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// > [!WARNING]> **Closing down notice:** This operation is closing down and will be removed after August 30, 2024. Use the "[Repository Rulesets](https://docs.github.com/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. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. + [Obsolete("")] +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToDeleteRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToDeleteRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.DELETE, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + [Obsolete("")] + public global::Ayllu.Github.Client.Repos.Item.Item.Tags.Protection.Item.WithTag_protection_ItemRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Repos.Item.Item.Tags.Protection.Item.WithTag_protection_ItemRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithTag_protection_ItemRequestBuilderDeleteRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Tags/Protection/ProtectionPostRequestBody.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Tags/Protection/ProtectionPostRequestBody.cs new file mode 100644 index 0000000..0886310 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Tags/Protection/ProtectionPostRequestBody.cs @@ -0,0 +1,65 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.Tags.Protection +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class ProtectionPostRequestBody : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// An optional glob pattern to match against when enforcing tag protection. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Pattern { get; set; } +#nullable restore +#else + public string Pattern { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public ProtectionPostRequestBody() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Repos.Item.Item.Tags.Protection.ProtectionPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Repos.Item.Item.Tags.Protection.ProtectionPostRequestBody(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "pattern", n => { Pattern = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("pattern", Pattern); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Tags/Protection/ProtectionRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Tags/Protection/ProtectionRequestBuilder.cs new file mode 100644 index 0000000..25d7075 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Tags/Protection/ProtectionRequestBuilder.cs @@ -0,0 +1,191 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Ayllu.Github.Client.Repos.Item.Item.Tags.Protection.Item; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.Tags.Protection +{ + /// + /// Builds and executes requests for operations under \repos\{owner-id}\{repo-id}\tags\protection + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class ProtectionRequestBuilder : BaseRequestBuilder + { + /// Gets an item from the Ayllu.Github.Client.repos.item.item.tags.protection.item collection + /// The unique identifier of the tag protection. + /// A + [Obsolete("")] + public global::Ayllu.Github.Client.Repos.Item.Item.Tags.Protection.Item.WithTag_protection_ItemRequestBuilder this[int position] + { + get + { + var urlTplParams = new Dictionary(PathParameters); + urlTplParams.Add("tag_protection_id", position); + return new global::Ayllu.Github.Client.Repos.Item.Item.Tags.Protection.Item.WithTag_protection_ItemRequestBuilder(urlTplParams, RequestAdapter); + } + } + /// Gets an item from the Ayllu.Github.Client.repos.item.item.tags.protection.item collection + /// The unique identifier of the tag protection. + /// A + [Obsolete("This indexer is deprecated and will be removed in the next major version. Use the one with the typed parameter instead.")] + public global::Ayllu.Github.Client.Repos.Item.Item.Tags.Protection.Item.WithTag_protection_ItemRequestBuilder this[string position] + { + get + { + var urlTplParams = new Dictionary(PathParameters); + if (!string.IsNullOrWhiteSpace(position)) urlTplParams.Add("tag_protection_id", position); + return new global::Ayllu.Github.Client.Repos.Item.Item.Tags.Protection.Item.WithTag_protection_ItemRequestBuilder(urlTplParams, RequestAdapter); + } + } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public ProtectionRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/tags/protection", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public ProtectionRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/tags/protection", rawUrl) + { + } + /// + /// > [!WARNING]> **Closing down notice:** This operation is closing down and will be removed after August 30, 2024. Use the "[Repository Rulesets](https://docs.github.com/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. + /// API method documentation + /// + /// A List<global::Ayllu.Github.Client.Models.TagProtection> + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 403 status code + /// When receiving a 404 status code + [Obsolete("")] +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task?> GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task> GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "403", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "404", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + }; + var collectionResult = await RequestAdapter.SendCollectionAsync(requestInfo, global::Ayllu.Github.Client.Models.TagProtection.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + return collectionResult?.AsList(); + } + /// + /// > [!WARNING]> **Closing down notice:** This operation is closing down and will be removed after August 30, 2024. Use the "[Repository Rulesets](https://docs.github.com/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. + /// API method documentation + /// + /// A + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 403 status code + /// When receiving a 404 status code + [Obsolete("")] +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PostAsync(global::Ayllu.Github.Client.Repos.Item.Item.Tags.Protection.ProtectionPostRequestBody body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task PostAsync(global::Ayllu.Github.Client.Repos.Item.Item.Tags.Protection.ProtectionPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPostRequestInformation(body, requestConfiguration); + var errorMapping = new Dictionary> + { + { "403", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "404", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Models.TagProtection.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// > [!WARNING]> **Closing down notice:** This operation is closing down and will be removed after August 30, 2024. Use the "[Repository Rulesets](https://docs.github.com/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. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. + [Obsolete("")] +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// > [!WARNING]> **Closing down notice:** This operation is closing down and will be removed after August 30, 2024. Use the "[Repository Rulesets](https://docs.github.com/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. + /// + /// A + /// The request body + /// Configuration for the request such as headers, query parameters, and middleware options. + [Obsolete("")] +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPostRequestInformation(global::Ayllu.Github.Client.Repos.Item.Item.Tags.Protection.ProtectionPostRequestBody body, Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToPostRequestInformation(global::Ayllu.Github.Client.Repos.Item.Item.Tags.Protection.ProtectionPostRequestBody body, Action> requestConfiguration = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + [Obsolete("")] + public global::Ayllu.Github.Client.Repos.Item.Item.Tags.Protection.ProtectionRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Repos.Item.Item.Tags.Protection.ProtectionRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class ProtectionRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class ProtectionRequestBuilderPostRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Tags/TagsRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Tags/TagsRequestBuilder.cs new file mode 100644 index 0000000..fa6f02e --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Tags/TagsRequestBuilder.cs @@ -0,0 +1,110 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Ayllu.Github.Client.Repos.Item.Item.Tags.Protection; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.Tags +{ + /// + /// Builds and executes requests for operations under \repos\{owner-id}\{repo-id}\tags + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class TagsRequestBuilder : BaseRequestBuilder + { + /// The protection property + public global::Ayllu.Github.Client.Repos.Item.Item.Tags.Protection.ProtectionRequestBuilder Protection + { + get => new global::Ayllu.Github.Client.Repos.Item.Item.Tags.Protection.ProtectionRequestBuilder(PathParameters, RequestAdapter); + } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public TagsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/tags{?page*,per_page*}", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public TagsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/tags{?page*,per_page*}", rawUrl) + { + } + /// + /// List repository tags + /// API method documentation + /// + /// A List<global::Ayllu.Github.Client.Models.Tag> + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task?> GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task> GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var collectionResult = await RequestAdapter.SendCollectionAsync(requestInfo, global::Ayllu.Github.Client.Models.Tag.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false); + return collectionResult?.AsList(); + } + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.Repos.Item.Item.Tags.TagsRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Repos.Item.Item.Tags.TagsRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// List repository tags + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class TagsRequestBuilderGetQueryParameters + { + /// The page number of the results to fetch. For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." + [QueryParameter("page")] + public int? Page { get; set; } + /// The number of results per page (max 100). For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." + [QueryParameter("per_page")] + public int? PerPage { get; set; } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class TagsRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Tarball/Item/WithRefItemRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Tarball/Item/WithRefItemRequestBuilder.cs new file mode 100644 index 0000000..e2a8b16 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Tarball/Item/WithRefItemRequestBuilder.cs @@ -0,0 +1,90 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.Tarball.Item +{ + /// + /// Builds and executes requests for operations under \repos\{owner-id}\{repo-id}\tarball\{ref} + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithRefItemRequestBuilder : BaseRequestBuilder + { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public WithRefItemRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/tarball/{ref}", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public WithRefItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/tarball/{ref}", rawUrl) + { + } + /// + /// 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 + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + await RequestAdapter.SendNoContentAsync(requestInfo, default, cancellationToken).ConfigureAwait(false); + } + /// + /// 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. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.Repos.Item.Item.Tarball.Item.WithRefItemRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Repos.Item.Item.Tarball.Item.WithRefItemRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithRefItemRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Tarball/TarballRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Tarball/TarballRequestBuilder.cs new file mode 100644 index 0000000..d11d222 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Tarball/TarballRequestBuilder.cs @@ -0,0 +1,48 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Repos.Item.Item.Tarball.Item; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.Tarball +{ + /// + /// Builds and executes requests for operations under \repos\{owner-id}\{repo-id}\tarball + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class TarballRequestBuilder : BaseRequestBuilder + { + /// Gets an item from the Ayllu.Github.Client.repos.item.item.tarball.item collection + /// Unique identifier of the item + /// A + public global::Ayllu.Github.Client.Repos.Item.Item.Tarball.Item.WithRefItemRequestBuilder this[string position] + { + get + { + var urlTplParams = new Dictionary(PathParameters); + urlTplParams.Add("ref", position); + return new global::Ayllu.Github.Client.Repos.Item.Item.Tarball.Item.WithRefItemRequestBuilder(urlTplParams, RequestAdapter); + } + } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public TarballRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/tarball", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public TarballRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/tarball", rawUrl) + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Teams/TeamsRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Teams/TeamsRequestBuilder.cs new file mode 100644 index 0000000..baf2d63 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Teams/TeamsRequestBuilder.cs @@ -0,0 +1,112 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.Teams +{ + /// + /// Builds and executes requests for operations under \repos\{owner-id}\{repo-id}\teams + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class TeamsRequestBuilder : BaseRequestBuilder + { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public TeamsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/teams{?page*,per_page*}", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public TeamsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/teams{?page*,per_page*}", rawUrl) + { + } + /// + /// 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. + /// API method documentation + /// + /// A List<global::Ayllu.Github.Client.Models.Team> + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 404 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task?> GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task> GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "404", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + }; + var collectionResult = await RequestAdapter.SendCollectionAsync(requestInfo, global::Ayllu.Github.Client.Models.Team.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + return collectionResult?.AsList(); + } + /// + /// 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. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.Repos.Item.Item.Teams.TeamsRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Repos.Item.Item.Teams.TeamsRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// 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. + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class TeamsRequestBuilderGetQueryParameters + { + /// The page number of the results to fetch. For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." + [QueryParameter("page")] + public int? Page { get; set; } + /// The number of results per page (max 100). For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." + [QueryParameter("per_page")] + public int? PerPage { get; set; } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class TeamsRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Topics/TopicsPutRequestBody.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Topics/TopicsPutRequestBody.cs new file mode 100644 index 0000000..9ea70e9 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Topics/TopicsPutRequestBody.cs @@ -0,0 +1,65 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.Topics +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class TopicsPutRequestBody : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// 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` will be saved as lowercase. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? Names { get; set; } +#nullable restore +#else + public List Names { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public TopicsPutRequestBody() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Repos.Item.Item.Topics.TopicsPutRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Repos.Item.Item.Topics.TopicsPutRequestBody(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "names", n => { Names = n.GetCollectionOfPrimitiveValues()?.AsList(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteCollectionOfPrimitiveValues("names", Names); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Topics/TopicsRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Topics/TopicsRequestBuilder.cs new file mode 100644 index 0000000..ac1a701 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Topics/TopicsRequestBuilder.cs @@ -0,0 +1,163 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.Topics +{ + /// + /// Builds and executes requests for operations under \repos\{owner-id}\{repo-id}\topics + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class TopicsRequestBuilder : BaseRequestBuilder + { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public TopicsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/topics{?page*,per_page*}", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public TopicsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/topics{?page*,per_page*}", rawUrl) + { + } + /// + /// Get all repository topics + /// API method documentation + /// + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 404 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "404", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Models.Topic.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// Replace all repository topics + /// API method documentation + /// + /// A + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 404 status code + /// When receiving a 422 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PutAsync(global::Ayllu.Github.Client.Repos.Item.Item.Topics.TopicsPutRequestBody body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task PutAsync(global::Ayllu.Github.Client.Repos.Item.Item.Topics.TopicsPutRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPutRequestInformation(body, requestConfiguration); + var errorMapping = new Dictionary> + { + { "404", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "422", global::Ayllu.Github.Client.Models.ValidationErrorSimple.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Models.Topic.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// A + /// The request body + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPutRequestInformation(global::Ayllu.Github.Client.Repos.Item.Item.Topics.TopicsPutRequestBody body, Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToPutRequestInformation(global::Ayllu.Github.Client.Repos.Item.Item.Topics.TopicsPutRequestBody body, Action> requestConfiguration = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation(Method.PUT, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.Repos.Item.Item.Topics.TopicsRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Repos.Item.Item.Topics.TopicsRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Get all repository topics + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class TopicsRequestBuilderGetQueryParameters + { + /// The page number of the results to fetch. For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." + [QueryParameter("page")] + public int? Page { get; set; } + /// The number of results per page (max 100). For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." + [QueryParameter("per_page")] + public int? PerPage { get; set; } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class TopicsRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class TopicsRequestBuilderPutRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Traffic/Clones/ClonesRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Traffic/Clones/ClonesRequestBuilder.cs new file mode 100644 index 0000000..ae5429a --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Traffic/Clones/ClonesRequestBuilder.cs @@ -0,0 +1,119 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.Traffic.Clones +{ + /// + /// Builds and executes requests for operations under \repos\{owner-id}\{repo-id}\traffic\clones + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class ClonesRequestBuilder : BaseRequestBuilder + { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public ClonesRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/traffic/clones{?per*}", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public ClonesRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/traffic/clones{?per*}", rawUrl) + { + } + /// + /// 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. + /// API method documentation + /// + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 403 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "403", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Models.CloneTraffic.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// 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. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.Repos.Item.Item.Traffic.Clones.ClonesRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Repos.Item.Item.Traffic.Clones.ClonesRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// 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. + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class ClonesRequestBuilderGetQueryParameters + { + /// The time frame to display results for. + [Obsolete("This property is deprecated, use PerAsGetPerQueryParameterType instead")] +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("per")] + public string? Per { get; set; } +#nullable restore +#else + [QueryParameter("per")] + public string Per { get; set; } +#endif + /// The time frame to display results for. + [QueryParameter("per")] + public global::Ayllu.Github.Client.Repos.Item.Item.Traffic.Clones.GetPerQueryParameterType? PerAsGetPerQueryParameterType { get; set; } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class ClonesRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Traffic/Clones/GetPerQueryParameterType.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Traffic/Clones/GetPerQueryParameterType.cs new file mode 100644 index 0000000..dd7a4b3 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Traffic/Clones/GetPerQueryParameterType.cs @@ -0,0 +1,20 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.Traffic.Clones +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public enum GetPerQueryParameterType + #pragma warning restore CS1591 + { + [EnumMember(Value = "day")] + #pragma warning disable CS1591 + Day, + #pragma warning restore CS1591 + [EnumMember(Value = "week")] + #pragma warning disable CS1591 + Week, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Traffic/Popular/Paths/PathsRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Traffic/Popular/Paths/PathsRequestBuilder.cs new file mode 100644 index 0000000..6af7097 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Traffic/Popular/Paths/PathsRequestBuilder.cs @@ -0,0 +1,99 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.Traffic.Popular.Paths +{ + /// + /// Builds and executes requests for operations under \repos\{owner-id}\{repo-id}\traffic\popular\paths + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class PathsRequestBuilder : BaseRequestBuilder + { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public PathsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/traffic/popular/paths", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public PathsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/traffic/popular/paths", rawUrl) + { + } + /// + /// Get the top 10 popular contents over the last 14 days. + /// API method documentation + /// + /// A List<global::Ayllu.Github.Client.Models.ContentTraffic> + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 403 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task?> GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task> GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "403", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + }; + var collectionResult = await RequestAdapter.SendCollectionAsync(requestInfo, global::Ayllu.Github.Client.Models.ContentTraffic.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + return collectionResult?.AsList(); + } + /// + /// Get the top 10 popular contents over the last 14 days. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.Repos.Item.Item.Traffic.Popular.Paths.PathsRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Repos.Item.Item.Traffic.Popular.Paths.PathsRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class PathsRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Traffic/Popular/PopularRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Traffic/Popular/PopularRequestBuilder.cs new file mode 100644 index 0000000..e3dedf0 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Traffic/Popular/PopularRequestBuilder.cs @@ -0,0 +1,47 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Repos.Item.Item.Traffic.Popular.Paths; +using Ayllu.Github.Client.Repos.Item.Item.Traffic.Popular.Referrers; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.Traffic.Popular +{ + /// + /// Builds and executes requests for operations under \repos\{owner-id}\{repo-id}\traffic\popular + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class PopularRequestBuilder : BaseRequestBuilder + { + /// The paths property + public global::Ayllu.Github.Client.Repos.Item.Item.Traffic.Popular.Paths.PathsRequestBuilder Paths + { + get => new global::Ayllu.Github.Client.Repos.Item.Item.Traffic.Popular.Paths.PathsRequestBuilder(PathParameters, RequestAdapter); + } + /// The referrers property + public global::Ayllu.Github.Client.Repos.Item.Item.Traffic.Popular.Referrers.ReferrersRequestBuilder Referrers + { + get => new global::Ayllu.Github.Client.Repos.Item.Item.Traffic.Popular.Referrers.ReferrersRequestBuilder(PathParameters, RequestAdapter); + } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public PopularRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/traffic/popular", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public PopularRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/traffic/popular", rawUrl) + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Traffic/Popular/Referrers/ReferrersRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Traffic/Popular/Referrers/ReferrersRequestBuilder.cs new file mode 100644 index 0000000..d9de492 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Traffic/Popular/Referrers/ReferrersRequestBuilder.cs @@ -0,0 +1,99 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.Traffic.Popular.Referrers +{ + /// + /// Builds and executes requests for operations under \repos\{owner-id}\{repo-id}\traffic\popular\referrers + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class ReferrersRequestBuilder : BaseRequestBuilder + { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public ReferrersRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/traffic/popular/referrers", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public ReferrersRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/traffic/popular/referrers", rawUrl) + { + } + /// + /// Get the top 10 referrers over the last 14 days. + /// API method documentation + /// + /// A List<global::Ayllu.Github.Client.Models.ReferrerTraffic> + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 403 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task?> GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task> GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "403", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + }; + var collectionResult = await RequestAdapter.SendCollectionAsync(requestInfo, global::Ayllu.Github.Client.Models.ReferrerTraffic.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + return collectionResult?.AsList(); + } + /// + /// Get the top 10 referrers over the last 14 days. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.Repos.Item.Item.Traffic.Popular.Referrers.ReferrersRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Repos.Item.Item.Traffic.Popular.Referrers.ReferrersRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class ReferrersRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Traffic/TrafficRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Traffic/TrafficRequestBuilder.cs new file mode 100644 index 0000000..428877c --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Traffic/TrafficRequestBuilder.cs @@ -0,0 +1,53 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Repos.Item.Item.Traffic.Clones; +using Ayllu.Github.Client.Repos.Item.Item.Traffic.Popular; +using Ayllu.Github.Client.Repos.Item.Item.Traffic.Views; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.Traffic +{ + /// + /// Builds and executes requests for operations under \repos\{owner-id}\{repo-id}\traffic + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class TrafficRequestBuilder : BaseRequestBuilder + { + /// The clones property + public global::Ayllu.Github.Client.Repos.Item.Item.Traffic.Clones.ClonesRequestBuilder Clones + { + get => new global::Ayllu.Github.Client.Repos.Item.Item.Traffic.Clones.ClonesRequestBuilder(PathParameters, RequestAdapter); + } + /// The popular property + public global::Ayllu.Github.Client.Repos.Item.Item.Traffic.Popular.PopularRequestBuilder Popular + { + get => new global::Ayllu.Github.Client.Repos.Item.Item.Traffic.Popular.PopularRequestBuilder(PathParameters, RequestAdapter); + } + /// The views property + public global::Ayllu.Github.Client.Repos.Item.Item.Traffic.Views.ViewsRequestBuilder Views + { + get => new global::Ayllu.Github.Client.Repos.Item.Item.Traffic.Views.ViewsRequestBuilder(PathParameters, RequestAdapter); + } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public TrafficRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/traffic", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public TrafficRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/traffic", rawUrl) + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Traffic/Views/GetPerQueryParameterType.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Traffic/Views/GetPerQueryParameterType.cs new file mode 100644 index 0000000..ab996a8 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Traffic/Views/GetPerQueryParameterType.cs @@ -0,0 +1,20 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.Traffic.Views +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public enum GetPerQueryParameterType + #pragma warning restore CS1591 + { + [EnumMember(Value = "day")] + #pragma warning disable CS1591 + Day, + #pragma warning restore CS1591 + [EnumMember(Value = "week")] + #pragma warning disable CS1591 + Week, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Traffic/Views/ViewsRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Traffic/Views/ViewsRequestBuilder.cs new file mode 100644 index 0000000..4cddfe9 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Traffic/Views/ViewsRequestBuilder.cs @@ -0,0 +1,119 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.Traffic.Views +{ + /// + /// Builds and executes requests for operations under \repos\{owner-id}\{repo-id}\traffic\views + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class ViewsRequestBuilder : BaseRequestBuilder + { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public ViewsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/traffic/views{?per*}", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public ViewsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/traffic/views{?per*}", rawUrl) + { + } + /// + /// 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. + /// API method documentation + /// + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 403 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "403", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Models.ViewTraffic.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// 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. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.Repos.Item.Item.Traffic.Views.ViewsRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Repos.Item.Item.Traffic.Views.ViewsRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// 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. + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class ViewsRequestBuilderGetQueryParameters + { + /// The time frame to display results for. + [Obsolete("This property is deprecated, use PerAsGetPerQueryParameterType instead")] +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("per")] + public string? Per { get; set; } +#nullable restore +#else + [QueryParameter("per")] + public string Per { get; set; } +#endif + /// The time frame to display results for. + [QueryParameter("per")] + public global::Ayllu.Github.Client.Repos.Item.Item.Traffic.Views.GetPerQueryParameterType? PerAsGetPerQueryParameterType { get; set; } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class ViewsRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Transfer/TransferPostRequestBody.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Transfer/TransferPostRequestBody.cs new file mode 100644 index 0000000..a722a2c --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Transfer/TransferPostRequestBody.cs @@ -0,0 +1,85 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.Transfer +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class TransferPostRequestBody : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The new name to be given to the repository. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? NewName { get; set; } +#nullable restore +#else + public string NewName { get; set; } +#endif + /// The username or organization name the repository will be transferred to. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? NewOwner { get; set; } +#nullable restore +#else + public string NewOwner { get; set; } +#endif + /// ID of the team or teams to add to the repository. Teams can only be added to organization-owned repositories. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? TeamIds { get; set; } +#nullable restore +#else + public List TeamIds { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public TransferPostRequestBody() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Repos.Item.Item.Transfer.TransferPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Repos.Item.Item.Transfer.TransferPostRequestBody(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "new_name", n => { NewName = n.GetStringValue(); } }, + { "new_owner", n => { NewOwner = n.GetStringValue(); } }, + { "team_ids", n => { TeamIds = n.GetCollectionOfPrimitiveValues()?.AsList(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("new_name", NewName); + writer.WriteStringValue("new_owner", NewOwner); + writer.WriteCollectionOfPrimitiveValues("team_ids", TeamIds); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Transfer/TransferRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Transfer/TransferRequestBuilder.cs new file mode 100644 index 0000000..e0b8d7a --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Transfer/TransferRequestBuilder.cs @@ -0,0 +1,98 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.Transfer +{ + /// + /// Builds and executes requests for operations under \repos\{owner-id}\{repo-id}\transfer + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class TransferRequestBuilder : BaseRequestBuilder + { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public TransferRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/transfer", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public TransferRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/transfer", rawUrl) + { + } + /// + /// 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/articles/about-repository-transfers/). + /// API method documentation + /// + /// A + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PostAsync(global::Ayllu.Github.Client.Repos.Item.Item.Transfer.TransferPostRequestBody body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task PostAsync(global::Ayllu.Github.Client.Repos.Item.Item.Transfer.TransferPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPostRequestInformation(body, requestConfiguration); + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Models.MinimalRepository.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false); + } + /// + /// 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/articles/about-repository-transfers/). + /// + /// A + /// The request body + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPostRequestInformation(global::Ayllu.Github.Client.Repos.Item.Item.Transfer.TransferPostRequestBody body, Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToPostRequestInformation(global::Ayllu.Github.Client.Repos.Item.Item.Transfer.TransferPostRequestBody body, Action> requestConfiguration = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.Repos.Item.Item.Transfer.TransferRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Repos.Item.Item.Transfer.TransferRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class TransferRequestBuilderPostRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/VulnerabilityAlerts/VulnerabilityAlertsRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/VulnerabilityAlerts/VulnerabilityAlertsRequestBuilder.cs new file mode 100644 index 0000000..b6d9b3e --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/VulnerabilityAlerts/VulnerabilityAlertsRequestBuilder.cs @@ -0,0 +1,178 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.VulnerabilityAlerts +{ + /// + /// Builds and executes requests for operations under \repos\{owner-id}\{repo-id}\vulnerability-alerts + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class VulnerabilityAlertsRequestBuilder : BaseRequestBuilder + { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public VulnerabilityAlertsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/vulnerability-alerts", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public VulnerabilityAlertsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/vulnerability-alerts", rawUrl) + { + } + /// + /// 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/articles/about-security-alerts-for-vulnerable-dependencies)". + /// API method documentation + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task DeleteAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task DeleteAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToDeleteRequestInformation(requestConfiguration); + await RequestAdapter.SendNoContentAsync(requestInfo, default, cancellationToken).ConfigureAwait(false); + } + /// + /// 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/articles/about-security-alerts-for-vulnerable-dependencies)". + /// API method documentation + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + await RequestAdapter.SendNoContentAsync(requestInfo, default, cancellationToken).ConfigureAwait(false); + } + /// + /// 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/articles/about-security-alerts-for-vulnerable-dependencies)". + /// API method documentation + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PutAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task PutAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToPutRequestInformation(requestConfiguration); + await RequestAdapter.SendNoContentAsync(requestInfo, default, cancellationToken).ConfigureAwait(false); + } + /// + /// 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/articles/about-security-alerts-for-vulnerable-dependencies)". + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToDeleteRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToDeleteRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.DELETE, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + return requestInfo; + } + /// + /// 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/articles/about-security-alerts-for-vulnerable-dependencies)". + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + return requestInfo; + } + /// + /// 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/articles/about-security-alerts-for-vulnerable-dependencies)". + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPutRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToPutRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.PUT, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.Repos.Item.Item.VulnerabilityAlerts.VulnerabilityAlertsRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Repos.Item.Item.VulnerabilityAlerts.VulnerabilityAlertsRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class VulnerabilityAlertsRequestBuilderDeleteRequestConfiguration : RequestConfiguration + { + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class VulnerabilityAlertsRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class VulnerabilityAlertsRequestBuilderPutRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Zipball/Item/WithRefItemRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Zipball/Item/WithRefItemRequestBuilder.cs new file mode 100644 index 0000000..b0b1add --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Zipball/Item/WithRefItemRequestBuilder.cs @@ -0,0 +1,90 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.Zipball.Item +{ + /// + /// Builds and executes requests for operations under \repos\{owner-id}\{repo-id}\zipball\{ref} + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithRefItemRequestBuilder : BaseRequestBuilder + { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public WithRefItemRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/zipball/{ref}", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public WithRefItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/zipball/{ref}", rawUrl) + { + } + /// + /// 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 + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + await RequestAdapter.SendNoContentAsync(requestInfo, default, cancellationToken).ConfigureAwait(false); + } + /// + /// 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. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.Repos.Item.Item.Zipball.Item.WithRefItemRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Repos.Item.Item.Zipball.Item.WithRefItemRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithRefItemRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Zipball/ZipballRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Zipball/ZipballRequestBuilder.cs new file mode 100644 index 0000000..b44b631 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/Item/Zipball/ZipballRequestBuilder.cs @@ -0,0 +1,48 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Repos.Item.Item.Zipball.Item; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System; +namespace Ayllu.Github.Client.Repos.Item.Item.Zipball +{ + /// + /// Builds and executes requests for operations under \repos\{owner-id}\{repo-id}\zipball + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class ZipballRequestBuilder : BaseRequestBuilder + { + /// Gets an item from the Ayllu.Github.Client.repos.item.item.zipball.item collection + /// Unique identifier of the item + /// A + public global::Ayllu.Github.Client.Repos.Item.Item.Zipball.Item.WithRefItemRequestBuilder this[string position] + { + get + { + var urlTplParams = new Dictionary(PathParameters); + urlTplParams.Add("ref", position); + return new global::Ayllu.Github.Client.Repos.Item.Item.Zipball.Item.WithRefItemRequestBuilder(urlTplParams, RequestAdapter); + } + } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public ZipballRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/zipball", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public ZipballRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/zipball", rawUrl) + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/Item/OwnerItemRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Repos/Item/OwnerItemRequestBuilder.cs new file mode 100644 index 0000000..ef8f5b0 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/Item/OwnerItemRequestBuilder.cs @@ -0,0 +1,48 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Repos.Item.Item; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System; +namespace Ayllu.Github.Client.Repos.Item +{ + /// + /// Builds and executes requests for operations under \repos\{owner-id} + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class OwnerItemRequestBuilder : BaseRequestBuilder + { + /// Gets an item from the Ayllu.Github.Client.repos.item.item collection + /// The name of the repository without the `.git` extension. The name is not case sensitive. + /// A + public global::Ayllu.Github.Client.Repos.Item.Item.RepoItemRequestBuilder this[string position] + { + get + { + var urlTplParams = new Dictionary(PathParameters); + urlTplParams.Add("repo%2Did", position); + return new global::Ayllu.Github.Client.Repos.Item.Item.RepoItemRequestBuilder(urlTplParams, RequestAdapter); + } + } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public OwnerItemRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public OwnerItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}", rawUrl) + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Repos/ReposRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Repos/ReposRequestBuilder.cs new file mode 100644 index 0000000..6b9d816 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repos/ReposRequestBuilder.cs @@ -0,0 +1,48 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Repos.Item; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System; +namespace Ayllu.Github.Client.Repos +{ + /// + /// Builds and executes requests for operations under \repos + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class ReposRequestBuilder : BaseRequestBuilder + { + /// Gets an item from the Ayllu.Github.Client.repos.item collection + /// The account owner of the repository. The name is not case sensitive. + /// A + public global::Ayllu.Github.Client.Repos.Item.OwnerItemRequestBuilder this[string position] + { + get + { + var urlTplParams = new Dictionary(PathParameters); + urlTplParams.Add("owner%2Did", position); + return new global::Ayllu.Github.Client.Repos.Item.OwnerItemRequestBuilder(urlTplParams, RequestAdapter); + } + } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public ReposRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public ReposRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos", rawUrl) + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Repositories/RepositoriesRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Repositories/RepositoriesRequestBuilder.cs new file mode 100644 index 0000000..bad6707 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Repositories/RepositoriesRequestBuilder.cs @@ -0,0 +1,109 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Repositories +{ + /// + /// Builds and executes requests for operations under \repositories + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class RepositoriesRequestBuilder : BaseRequestBuilder + { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public RepositoriesRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repositories{?since*}", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public RepositoriesRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repositories{?since*}", rawUrl) + { + } + /// + /// 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/rest/guides/using-pagination-in-the-rest-api#using-link-headers) to get the URL for the next page of repositories. + /// API method documentation + /// + /// A List<global::Ayllu.Github.Client.Models.MinimalRepository> + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 422 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task?> GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task> GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "422", global::Ayllu.Github.Client.Models.ValidationError.CreateFromDiscriminatorValue }, + }; + var collectionResult = await RequestAdapter.SendCollectionAsync(requestInfo, global::Ayllu.Github.Client.Models.MinimalRepository.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + return collectionResult?.AsList(); + } + /// + /// 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/rest/guides/using-pagination-in-the-rest-api#using-link-headers) to get the URL for the next page of repositories. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.Repositories.RepositoriesRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Repositories.RepositoriesRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// 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/rest/guides/using-pagination-in-the-rest-api#using-link-headers) to get the URL for the next page of repositories. + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class RepositoriesRequestBuilderGetQueryParameters + { + /// A repository ID. Only return repositories with an ID greater than this ID. + [QueryParameter("since")] + public int? Since { get; set; } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class RepositoriesRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Search/Code/CodeGetResponse.cs b/src/Ayllu.Github.Client/Github/Client/Search/Code/CodeGetResponse.cs new file mode 100644 index 0000000..707bb32 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Search/Code/CodeGetResponse.cs @@ -0,0 +1,74 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Search.Code +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class CodeGetResponse : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The incomplete_results property + public bool? IncompleteResults { get; set; } + /// The items property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? Items { get; set; } +#nullable restore +#else + public List Items { get; set; } +#endif + /// The total_count property + public int? TotalCount { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public CodeGetResponse() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Search.Code.CodeGetResponse CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Search.Code.CodeGetResponse(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "incomplete_results", n => { IncompleteResults = n.GetBoolValue(); } }, + { "items", n => { Items = n.GetCollectionOfObjectValues(global::Ayllu.Github.Client.Models.CodeSearchResultItem.CreateFromDiscriminatorValue)?.AsList(); } }, + { "total_count", n => { TotalCount = n.GetIntValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteBoolValue("incomplete_results", IncompleteResults); + writer.WriteCollectionOfObjectValues("items", Items); + writer.WriteIntValue("total_count", TotalCount); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Search/Code/CodeRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Search/Code/CodeRequestBuilder.cs new file mode 100644 index 0000000..3e4ab87 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Search/Code/CodeRequestBuilder.cs @@ -0,0 +1,184 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Search.Code +{ + /// + /// Builds and executes requests for operations under \search\code + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class CodeRequestBuilder : BaseRequestBuilder + { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public CodeRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/search/code?q={q}{&order*,page*,per_page*,sort*}", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public CodeRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/search/code?q={q}{&order*,page*,per_page*,sort*}", rawUrl) + { + } + /// + /// Searches for query terms inside of a file. This method returns up to 100 results [per page](https://docs.github.com/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/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. + /// API method documentation + /// + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 403 status code + /// When receiving a 422 status code + /// When receiving a 503 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsCodeGetResponseAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task GetAsCodeGetResponseAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "403", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "422", global::Ayllu.Github.Client.Models.ValidationError.CreateFromDiscriminatorValue }, + { "503", global::Ayllu.Github.Client.Models.Code503Error.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Search.Code.CodeGetResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// Searches for query terms inside of a file. This method returns up to 100 results [per page](https://docs.github.com/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/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. + /// API method documentation + /// + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 403 status code + /// When receiving a 422 status code + /// When receiving a 503 status code + [Obsolete("This method is obsolete. Use GetAsCodeGetResponseAsync instead.")] +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "403", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "422", global::Ayllu.Github.Client.Models.ValidationError.CreateFromDiscriminatorValue }, + { "503", global::Ayllu.Github.Client.Models.Code503Error.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Search.Code.CodeResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// Searches for query terms inside of a file. This method returns up to 100 results [per page](https://docs.github.com/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/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. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.Search.Code.CodeRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Search.Code.CodeRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Searches for query terms inside of a file. This method returns up to 100 results [per page](https://docs.github.com/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/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. + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class CodeRequestBuilderGetQueryParameters + { + /// **This field is closing down.** 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`. + [Obsolete("This property is deprecated, use OrderAsGetOrderQueryParameterType instead")] +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("order")] + public string? Order { get; set; } +#nullable restore +#else + [QueryParameter("order")] + public string Order { get; set; } +#endif + /// **This field is closing down.** 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`. + [Obsolete("")] + [QueryParameter("order")] + public global::Ayllu.Github.Client.Search.Code.GetOrderQueryParameterType? OrderAsGetOrderQueryParameterType { get; set; } + /// The page number of the results to fetch. For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." + [QueryParameter("page")] + public int? Page { get; set; } + /// The number of results per page (max 100). For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." + [QueryParameter("per_page")] + public int? PerPage { get; set; } + /// The query contains one or more search keywords and qualifiers. Qualifiers allow you to limit your search to specific areas of GitHub. The REST API supports the same qualifiers as the web interface for GitHub. To learn more about the format of the query, see [Constructing a search query](https://docs.github.com/rest/search/search#constructing-a-search-query). See "[Searching code](https://docs.github.com/search-github/searching-on-github/searching-code)" for a detailed list of qualifiers. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("q")] + public string? Q { get; set; } +#nullable restore +#else + [QueryParameter("q")] + public string Q { get; set; } +#endif + /// **This field is closing down.** Sorts the results of your query. Can only be `indexed`, which indicates how recently a file has been indexed by the GitHub search infrastructure. Default: [best match](https://docs.github.com/rest/search/search#ranking-search-results) + [Obsolete("This property is deprecated, use SortAsGetSortQueryParameterType instead")] +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("sort")] + public string? Sort { get; set; } +#nullable restore +#else + [QueryParameter("sort")] + public string Sort { get; set; } +#endif + /// **This field is closing down.** Sorts the results of your query. Can only be `indexed`, which indicates how recently a file has been indexed by the GitHub search infrastructure. Default: [best match](https://docs.github.com/rest/search/search#ranking-search-results) + [Obsolete("")] + [QueryParameter("sort")] + public global::Ayllu.Github.Client.Search.Code.GetSortQueryParameterType? SortAsGetSortQueryParameterType { get; set; } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class CodeRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Search/Code/CodeResponse.cs b/src/Ayllu.Github.Client/Github/Client/Search/Code/CodeResponse.cs new file mode 100644 index 0000000..0a44710 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Search/Code/CodeResponse.cs @@ -0,0 +1,28 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Search.Code +{ + [Obsolete("This class is obsolete. Use CodeGetResponse instead.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class CodeResponse : global::Ayllu.Github.Client.Search.Code.CodeGetResponse, IParsable + #pragma warning restore CS1591 + { + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static new global::Ayllu.Github.Client.Search.Code.CodeResponse CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Search.Code.CodeResponse(); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Search/Code/GetOrderQueryParameterType.cs b/src/Ayllu.Github.Client/Github/Client/Search/Code/GetOrderQueryParameterType.cs new file mode 100644 index 0000000..637ae94 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Search/Code/GetOrderQueryParameterType.cs @@ -0,0 +1,20 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Search.Code +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public enum GetOrderQueryParameterType + #pragma warning restore CS1591 + { + [EnumMember(Value = "desc")] + #pragma warning disable CS1591 + Desc, + #pragma warning restore CS1591 + [EnumMember(Value = "asc")] + #pragma warning disable CS1591 + Asc, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Search/Code/GetSortQueryParameterType.cs b/src/Ayllu.Github.Client/Github/Client/Search/Code/GetSortQueryParameterType.cs new file mode 100644 index 0000000..20115b9 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Search/Code/GetSortQueryParameterType.cs @@ -0,0 +1,16 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Search.Code +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public enum GetSortQueryParameterType + #pragma warning restore CS1591 + { + [EnumMember(Value = "indexed")] + #pragma warning disable CS1591 + Indexed, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Search/Commits/CommitsGetResponse.cs b/src/Ayllu.Github.Client/Github/Client/Search/Commits/CommitsGetResponse.cs new file mode 100644 index 0000000..58eeaa8 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Search/Commits/CommitsGetResponse.cs @@ -0,0 +1,74 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Search.Commits +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class CommitsGetResponse : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The incomplete_results property + public bool? IncompleteResults { get; set; } + /// The items property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? Items { get; set; } +#nullable restore +#else + public List Items { get; set; } +#endif + /// The total_count property + public int? TotalCount { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public CommitsGetResponse() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Search.Commits.CommitsGetResponse CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Search.Commits.CommitsGetResponse(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "incomplete_results", n => { IncompleteResults = n.GetBoolValue(); } }, + { "items", n => { Items = n.GetCollectionOfObjectValues(global::Ayllu.Github.Client.Models.CommitSearchResultItem.CreateFromDiscriminatorValue)?.AsList(); } }, + { "total_count", n => { TotalCount = n.GetIntValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteBoolValue("incomplete_results", IncompleteResults); + writer.WriteCollectionOfObjectValues("items", Items); + writer.WriteIntValue("total_count", TotalCount); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Search/Commits/CommitsRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Search/Commits/CommitsRequestBuilder.cs new file mode 100644 index 0000000..371170c --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Search/Commits/CommitsRequestBuilder.cs @@ -0,0 +1,163 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Search.Commits +{ + /// + /// Builds and executes requests for operations under \search\commits + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class CommitsRequestBuilder : BaseRequestBuilder + { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public CommitsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/search/commits?q={q}{&order*,page*,per_page*,sort*}", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public CommitsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/search/commits?q={q}{&order*,page*,per_page*,sort*}", rawUrl) + { + } + /// + /// Find commits via various criteria on the default branch (usually `main`). This method returns up to 100 results [per page](https://docs.github.com/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/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` + /// API method documentation + /// + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsCommitsGetResponseAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task GetAsCommitsGetResponseAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Search.Commits.CommitsGetResponse.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false); + } + /// + /// Find commits via various criteria on the default branch (usually `main`). This method returns up to 100 results [per page](https://docs.github.com/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/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` + /// API method documentation + /// + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + [Obsolete("This method is obsolete. Use GetAsCommitsGetResponseAsync instead.")] +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Search.Commits.CommitsResponse.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false); + } + /// + /// Find commits via various criteria on the default branch (usually `main`). This method returns up to 100 results [per page](https://docs.github.com/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/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` + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.Search.Commits.CommitsRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Search.Commits.CommitsRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Find commits via various criteria on the default branch (usually `main`). This method returns up to 100 results [per page](https://docs.github.com/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/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` + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class CommitsRequestBuilderGetQueryParameters + { + /// 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`. + [Obsolete("This property is deprecated, use OrderAsGetOrderQueryParameterType instead")] +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("order")] + public string? Order { get; set; } +#nullable restore +#else + [QueryParameter("order")] + public string Order { get; set; } +#endif + /// 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`. + [QueryParameter("order")] + public global::Ayllu.Github.Client.Search.Commits.GetOrderQueryParameterType? OrderAsGetOrderQueryParameterType { get; set; } + /// The page number of the results to fetch. For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." + [QueryParameter("page")] + public int? Page { get; set; } + /// The number of results per page (max 100). For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." + [QueryParameter("per_page")] + public int? PerPage { get; set; } + /// The query contains one or more search keywords and qualifiers. Qualifiers allow you to limit your search to specific areas of GitHub. The REST API supports the same qualifiers as the web interface for GitHub. To learn more about the format of the query, see [Constructing a search query](https://docs.github.com/rest/search/search#constructing-a-search-query). See "[Searching commits](https://docs.github.com/search-github/searching-on-github/searching-commits)" for a detailed list of qualifiers. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("q")] + public string? Q { get; set; } +#nullable restore +#else + [QueryParameter("q")] + public string Q { get; set; } +#endif + /// Sorts the results of your query by `author-date` or `committer-date`. Default: [best match](https://docs.github.com/rest/search/search#ranking-search-results) + [Obsolete("This property is deprecated, use SortAsGetSortQueryParameterType instead")] +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("sort")] + public string? Sort { get; set; } +#nullable restore +#else + [QueryParameter("sort")] + public string Sort { get; set; } +#endif + /// Sorts the results of your query by `author-date` or `committer-date`. Default: [best match](https://docs.github.com/rest/search/search#ranking-search-results) + [QueryParameter("sort")] + public global::Ayllu.Github.Client.Search.Commits.GetSortQueryParameterType? SortAsGetSortQueryParameterType { get; set; } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class CommitsRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Search/Commits/CommitsResponse.cs b/src/Ayllu.Github.Client/Github/Client/Search/Commits/CommitsResponse.cs new file mode 100644 index 0000000..99ef81f --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Search/Commits/CommitsResponse.cs @@ -0,0 +1,28 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Search.Commits +{ + [Obsolete("This class is obsolete. Use CommitsGetResponse instead.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class CommitsResponse : global::Ayllu.Github.Client.Search.Commits.CommitsGetResponse, IParsable + #pragma warning restore CS1591 + { + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static new global::Ayllu.Github.Client.Search.Commits.CommitsResponse CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Search.Commits.CommitsResponse(); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Search/Commits/GetOrderQueryParameterType.cs b/src/Ayllu.Github.Client/Github/Client/Search/Commits/GetOrderQueryParameterType.cs new file mode 100644 index 0000000..0605427 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Search/Commits/GetOrderQueryParameterType.cs @@ -0,0 +1,20 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Search.Commits +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public enum GetOrderQueryParameterType + #pragma warning restore CS1591 + { + [EnumMember(Value = "desc")] + #pragma warning disable CS1591 + Desc, + #pragma warning restore CS1591 + [EnumMember(Value = "asc")] + #pragma warning disable CS1591 + Asc, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Search/Commits/GetSortQueryParameterType.cs b/src/Ayllu.Github.Client/Github/Client/Search/Commits/GetSortQueryParameterType.cs new file mode 100644 index 0000000..a9cb40d --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Search/Commits/GetSortQueryParameterType.cs @@ -0,0 +1,20 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Search.Commits +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public enum GetSortQueryParameterType + #pragma warning restore CS1591 + { + [EnumMember(Value = "author-date")] + #pragma warning disable CS1591 + AuthorDate, + #pragma warning restore CS1591 + [EnumMember(Value = "committer-date")] + #pragma warning disable CS1591 + CommitterDate, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Search/Issues/GetOrderQueryParameterType.cs b/src/Ayllu.Github.Client/Github/Client/Search/Issues/GetOrderQueryParameterType.cs new file mode 100644 index 0000000..804f23e --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Search/Issues/GetOrderQueryParameterType.cs @@ -0,0 +1,20 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Search.Issues +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public enum GetOrderQueryParameterType + #pragma warning restore CS1591 + { + [EnumMember(Value = "desc")] + #pragma warning disable CS1591 + Desc, + #pragma warning restore CS1591 + [EnumMember(Value = "asc")] + #pragma warning disable CS1591 + Asc, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Search/Issues/GetSortQueryParameterType.cs b/src/Ayllu.Github.Client/Github/Client/Search/Issues/GetSortQueryParameterType.cs new file mode 100644 index 0000000..fe158aa --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Search/Issues/GetSortQueryParameterType.cs @@ -0,0 +1,56 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Search.Issues +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public enum GetSortQueryParameterType + #pragma warning restore CS1591 + { + [EnumMember(Value = "comments")] + #pragma warning disable CS1591 + Comments, + #pragma warning restore CS1591 + [EnumMember(Value = "reactions")] + #pragma warning disable CS1591 + Reactions, + #pragma warning restore CS1591 + [EnumMember(Value = "reactions-+1")] + #pragma warning disable CS1591 + Reactions_plus_1, + #pragma warning restore CS1591 + [EnumMember(Value = "reactions--1")] + #pragma warning disable CS1591 + Reactions1, + #pragma warning restore CS1591 + [EnumMember(Value = "reactions-smile")] + #pragma warning disable CS1591 + ReactionsSmile, + #pragma warning restore CS1591 + [EnumMember(Value = "reactions-thinking_face")] + #pragma warning disable CS1591 + ReactionsThinking_face, + #pragma warning restore CS1591 + [EnumMember(Value = "reactions-heart")] + #pragma warning disable CS1591 + ReactionsHeart, + #pragma warning restore CS1591 + [EnumMember(Value = "reactions-tada")] + #pragma warning disable CS1591 + ReactionsTada, + #pragma warning restore CS1591 + [EnumMember(Value = "interactions")] + #pragma warning disable CS1591 + Interactions, + #pragma warning restore CS1591 + [EnumMember(Value = "created")] + #pragma warning disable CS1591 + Created, + #pragma warning restore CS1591 + [EnumMember(Value = "updated")] + #pragma warning disable CS1591 + Updated, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Search/Issues/IssuesGetResponse.cs b/src/Ayllu.Github.Client/Github/Client/Search/Issues/IssuesGetResponse.cs new file mode 100644 index 0000000..fd84213 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Search/Issues/IssuesGetResponse.cs @@ -0,0 +1,74 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Search.Issues +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class IssuesGetResponse : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The incomplete_results property + public bool? IncompleteResults { get; set; } + /// The items property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? Items { get; set; } +#nullable restore +#else + public List Items { get; set; } +#endif + /// The total_count property + public int? TotalCount { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public IssuesGetResponse() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Search.Issues.IssuesGetResponse CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Search.Issues.IssuesGetResponse(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "incomplete_results", n => { IncompleteResults = n.GetBoolValue(); } }, + { "items", n => { Items = n.GetCollectionOfObjectValues(global::Ayllu.Github.Client.Models.IssueSearchResultItem.CreateFromDiscriminatorValue)?.AsList(); } }, + { "total_count", n => { TotalCount = n.GetIntValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteBoolValue("incomplete_results", IncompleteResults); + writer.WriteCollectionOfObjectValues("items", Items); + writer.WriteIntValue("total_count", TotalCount); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Search/Issues/IssuesRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Search/Issues/IssuesRequestBuilder.cs new file mode 100644 index 0000000..3015a12 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Search/Issues/IssuesRequestBuilder.cs @@ -0,0 +1,195 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Search.Issues +{ + /// + /// Builds and executes requests for operations under \search\issues + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class IssuesRequestBuilder : BaseRequestBuilder + { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public IssuesRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/search/issues?q={q}{&advanced_search*,order*,page*,per_page*,sort*}", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public IssuesRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/search/issues?q={q}{&advanced_search*,order*,page*,per_page*,sort*}", rawUrl) + { + } + /// + /// > [!WARNING]> **Notice:** Search for issues and pull requests will be overridden by advanced search on September 4, 2025.> You can read more about this change on [the GitHub blog](https://github.blog/changelog/2025-03-06-github-issues-projects-api-support-for-issues-advanced-search-and-more/). + /// API method documentation + /// + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 403 status code + /// When receiving a 422 status code + /// When receiving a 503 status code + [Obsolete("")] +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsIssuesGetResponseAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task GetAsIssuesGetResponseAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "403", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "422", global::Ayllu.Github.Client.Models.ValidationError.CreateFromDiscriminatorValue }, + { "503", global::Ayllu.Github.Client.Models.Issues503Error.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Search.Issues.IssuesGetResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// > [!WARNING]> **Notice:** Search for issues and pull requests will be overridden by advanced search on September 4, 2025.> You can read more about this change on [the GitHub blog](https://github.blog/changelog/2025-03-06-github-issues-projects-api-support-for-issues-advanced-search-and-more/). + /// API method documentation + /// + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 403 status code + /// When receiving a 422 status code + /// When receiving a 503 status code + [Obsolete("This method is obsolete. Use GetAsIssuesGetResponseAsync instead.")] +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "403", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "422", global::Ayllu.Github.Client.Models.ValidationError.CreateFromDiscriminatorValue }, + { "503", global::Ayllu.Github.Client.Models.Issues503Error.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Search.Issues.IssuesResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// > [!WARNING]> **Notice:** Search for issues and pull requests will be overridden by advanced search on September 4, 2025.> You can read more about this change on [the GitHub blog](https://github.blog/changelog/2025-03-06-github-issues-projects-api-support-for-issues-advanced-search-and-more/). + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. + [Obsolete("")] +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + [Obsolete("")] + public global::Ayllu.Github.Client.Search.Issues.IssuesRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Search.Issues.IssuesRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// > [!WARNING]> **Notice:** Search for issues and pull requests will be overridden by advanced search on September 4, 2025.> You can read more about this change on [the GitHub blog](https://github.blog/changelog/2025-03-06-github-issues-projects-api-support-for-issues-advanced-search-and-more/). + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class IssuesRequestBuilderGetQueryParameters + { + /// Set to `true` to use advanced search.Example: `http://api.github.com/search/issues?q={query}&advanced_search=true` +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("advanced_search")] + public string? AdvancedSearch { get; set; } +#nullable restore +#else + [QueryParameter("advanced_search")] + public string AdvancedSearch { get; set; } +#endif + /// 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`. + [Obsolete("This property is deprecated, use OrderAsGetOrderQueryParameterType instead")] +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("order")] + public string? Order { get; set; } +#nullable restore +#else + [QueryParameter("order")] + public string Order { get; set; } +#endif + /// 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`. + [QueryParameter("order")] + public global::Ayllu.Github.Client.Search.Issues.GetOrderQueryParameterType? OrderAsGetOrderQueryParameterType { get; set; } + /// The page number of the results to fetch. For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." + [QueryParameter("page")] + public int? Page { get; set; } + /// The number of results per page (max 100). For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." + [QueryParameter("per_page")] + public int? PerPage { get; set; } + /// The query contains one or more search keywords and qualifiers. Qualifiers allow you to limit your search to specific areas of GitHub. The REST API supports the same qualifiers as the web interface for GitHub. To learn more about the format of the query, see [Constructing a search query](https://docs.github.com/rest/search/search#constructing-a-search-query). See "[Searching issues and pull requests](https://docs.github.com/search-github/searching-on-github/searching-issues-and-pull-requests)" for a detailed list of qualifiers. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("q")] + public string? Q { get; set; } +#nullable restore +#else + [QueryParameter("q")] + public string Q { get; set; } +#endif + /// 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/rest/search/search#ranking-search-results) + [Obsolete("This property is deprecated, use SortAsGetSortQueryParameterType instead")] +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("sort")] + public string? Sort { get; set; } +#nullable restore +#else + [QueryParameter("sort")] + public string Sort { get; set; } +#endif + /// 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/rest/search/search#ranking-search-results) + [QueryParameter("sort")] + public global::Ayllu.Github.Client.Search.Issues.GetSortQueryParameterType? SortAsGetSortQueryParameterType { get; set; } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class IssuesRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Search/Issues/IssuesResponse.cs b/src/Ayllu.Github.Client/Github/Client/Search/Issues/IssuesResponse.cs new file mode 100644 index 0000000..b3b1305 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Search/Issues/IssuesResponse.cs @@ -0,0 +1,28 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Search.Issues +{ + [Obsolete("This class is obsolete. Use IssuesGetResponse instead.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class IssuesResponse : global::Ayllu.Github.Client.Search.Issues.IssuesGetResponse, IParsable + #pragma warning restore CS1591 + { + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static new global::Ayllu.Github.Client.Search.Issues.IssuesResponse CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Search.Issues.IssuesResponse(); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Search/Labels/GetOrderQueryParameterType.cs b/src/Ayllu.Github.Client/Github/Client/Search/Labels/GetOrderQueryParameterType.cs new file mode 100644 index 0000000..1601ae9 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Search/Labels/GetOrderQueryParameterType.cs @@ -0,0 +1,20 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Search.Labels +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public enum GetOrderQueryParameterType + #pragma warning restore CS1591 + { + [EnumMember(Value = "desc")] + #pragma warning disable CS1591 + Desc, + #pragma warning restore CS1591 + [EnumMember(Value = "asc")] + #pragma warning disable CS1591 + Asc, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Search/Labels/GetSortQueryParameterType.cs b/src/Ayllu.Github.Client/Github/Client/Search/Labels/GetSortQueryParameterType.cs new file mode 100644 index 0000000..2c87081 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Search/Labels/GetSortQueryParameterType.cs @@ -0,0 +1,20 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Search.Labels +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public enum GetSortQueryParameterType + #pragma warning restore CS1591 + { + [EnumMember(Value = "created")] + #pragma warning disable CS1591 + Created, + #pragma warning restore CS1591 + [EnumMember(Value = "updated")] + #pragma warning disable CS1591 + Updated, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Search/Labels/LabelsGetResponse.cs b/src/Ayllu.Github.Client/Github/Client/Search/Labels/LabelsGetResponse.cs new file mode 100644 index 0000000..24f108b --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Search/Labels/LabelsGetResponse.cs @@ -0,0 +1,74 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Search.Labels +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class LabelsGetResponse : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The incomplete_results property + public bool? IncompleteResults { get; set; } + /// The items property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? Items { get; set; } +#nullable restore +#else + public List Items { get; set; } +#endif + /// The total_count property + public int? TotalCount { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public LabelsGetResponse() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Search.Labels.LabelsGetResponse CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Search.Labels.LabelsGetResponse(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "incomplete_results", n => { IncompleteResults = n.GetBoolValue(); } }, + { "items", n => { Items = n.GetCollectionOfObjectValues(global::Ayllu.Github.Client.Models.LabelSearchResultItem.CreateFromDiscriminatorValue)?.AsList(); } }, + { "total_count", n => { TotalCount = n.GetIntValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteBoolValue("incomplete_results", IncompleteResults); + writer.WriteCollectionOfObjectValues("items", Items); + writer.WriteIntValue("total_count", TotalCount); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Search/Labels/LabelsRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Search/Labels/LabelsRequestBuilder.cs new file mode 100644 index 0000000..fa0222e --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Search/Labels/LabelsRequestBuilder.cs @@ -0,0 +1,185 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Search.Labels +{ + /// + /// Builds and executes requests for operations under \search\labels + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class LabelsRequestBuilder : BaseRequestBuilder + { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public LabelsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/search/labels?q={q}&repository_id={repository_id}{&order*,page*,per_page*,sort*}", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public LabelsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/search/labels?q={q}&repository_id={repository_id}{&order*,page*,per_page*,sort*}", rawUrl) + { + } + /// + /// Find labels in a repository with names or descriptions that match search keywords. Returns up to 100 results [per page](https://docs.github.com/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/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. + /// API method documentation + /// + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 403 status code + /// When receiving a 404 status code + /// When receiving a 422 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsLabelsGetResponseAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task GetAsLabelsGetResponseAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "403", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "404", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "422", global::Ayllu.Github.Client.Models.ValidationError.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Search.Labels.LabelsGetResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// Find labels in a repository with names or descriptions that match search keywords. Returns up to 100 results [per page](https://docs.github.com/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/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. + /// API method documentation + /// + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 403 status code + /// When receiving a 404 status code + /// When receiving a 422 status code + [Obsolete("This method is obsolete. Use GetAsLabelsGetResponseAsync instead.")] +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "403", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "404", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "422", global::Ayllu.Github.Client.Models.ValidationError.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Search.Labels.LabelsResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// Find labels in a repository with names or descriptions that match search keywords. Returns up to 100 results [per page](https://docs.github.com/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/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. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.Search.Labels.LabelsRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Search.Labels.LabelsRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Find labels in a repository with names or descriptions that match search keywords. Returns up to 100 results [per page](https://docs.github.com/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/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. + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class LabelsRequestBuilderGetQueryParameters + { + /// 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`. + [Obsolete("This property is deprecated, use OrderAsGetOrderQueryParameterType instead")] +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("order")] + public string? Order { get; set; } +#nullable restore +#else + [QueryParameter("order")] + public string Order { get; set; } +#endif + /// 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`. + [QueryParameter("order")] + public global::Ayllu.Github.Client.Search.Labels.GetOrderQueryParameterType? OrderAsGetOrderQueryParameterType { get; set; } + /// The page number of the results to fetch. For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." + [QueryParameter("page")] + public int? Page { get; set; } + /// The number of results per page (max 100). For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." + [QueryParameter("per_page")] + public int? PerPage { get; set; } + /// 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/rest/search/search#constructing-a-search-query). +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("q")] + public string? Q { get; set; } +#nullable restore +#else + [QueryParameter("q")] + public string Q { get; set; } +#endif + /// The id of the repository. + [QueryParameter("repository_id")] + public int? RepositoryId { get; set; } + /// Sorts the results of your query by when the label was `created` or `updated`. Default: [best match](https://docs.github.com/rest/search/search#ranking-search-results) + [Obsolete("This property is deprecated, use SortAsGetSortQueryParameterType instead")] +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("sort")] + public string? Sort { get; set; } +#nullable restore +#else + [QueryParameter("sort")] + public string Sort { get; set; } +#endif + /// Sorts the results of your query by when the label was `created` or `updated`. Default: [best match](https://docs.github.com/rest/search/search#ranking-search-results) + [QueryParameter("sort")] + public global::Ayllu.Github.Client.Search.Labels.GetSortQueryParameterType? SortAsGetSortQueryParameterType { get; set; } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class LabelsRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Search/Labels/LabelsResponse.cs b/src/Ayllu.Github.Client/Github/Client/Search/Labels/LabelsResponse.cs new file mode 100644 index 0000000..57fd0c0 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Search/Labels/LabelsResponse.cs @@ -0,0 +1,28 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Search.Labels +{ + [Obsolete("This class is obsolete. Use LabelsGetResponse instead.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class LabelsResponse : global::Ayllu.Github.Client.Search.Labels.LabelsGetResponse, IParsable + #pragma warning restore CS1591 + { + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static new global::Ayllu.Github.Client.Search.Labels.LabelsResponse CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Search.Labels.LabelsResponse(); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Search/Repositories/GetOrderQueryParameterType.cs b/src/Ayllu.Github.Client/Github/Client/Search/Repositories/GetOrderQueryParameterType.cs new file mode 100644 index 0000000..21a7cd5 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Search/Repositories/GetOrderQueryParameterType.cs @@ -0,0 +1,20 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Search.Repositories +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public enum GetOrderQueryParameterType + #pragma warning restore CS1591 + { + [EnumMember(Value = "desc")] + #pragma warning disable CS1591 + Desc, + #pragma warning restore CS1591 + [EnumMember(Value = "asc")] + #pragma warning disable CS1591 + Asc, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Search/Repositories/GetSortQueryParameterType.cs b/src/Ayllu.Github.Client/Github/Client/Search/Repositories/GetSortQueryParameterType.cs new file mode 100644 index 0000000..eefef5e --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Search/Repositories/GetSortQueryParameterType.cs @@ -0,0 +1,28 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Search.Repositories +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public enum GetSortQueryParameterType + #pragma warning restore CS1591 + { + [EnumMember(Value = "stars")] + #pragma warning disable CS1591 + Stars, + #pragma warning restore CS1591 + [EnumMember(Value = "forks")] + #pragma warning disable CS1591 + Forks, + #pragma warning restore CS1591 + [EnumMember(Value = "help-wanted-issues")] + #pragma warning disable CS1591 + HelpWantedIssues, + #pragma warning restore CS1591 + [EnumMember(Value = "updated")] + #pragma warning disable CS1591 + Updated, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Search/Repositories/RepositoriesGetResponse.cs b/src/Ayllu.Github.Client/Github/Client/Search/Repositories/RepositoriesGetResponse.cs new file mode 100644 index 0000000..eacb5b8 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Search/Repositories/RepositoriesGetResponse.cs @@ -0,0 +1,74 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Search.Repositories +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class RepositoriesGetResponse : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The incomplete_results property + public bool? IncompleteResults { get; set; } + /// The items property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? Items { get; set; } +#nullable restore +#else + public List Items { get; set; } +#endif + /// The total_count property + public int? TotalCount { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public RepositoriesGetResponse() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Search.Repositories.RepositoriesGetResponse CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Search.Repositories.RepositoriesGetResponse(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "incomplete_results", n => { IncompleteResults = n.GetBoolValue(); } }, + { "items", n => { Items = n.GetCollectionOfObjectValues(global::Ayllu.Github.Client.Models.RepoSearchResultItem.CreateFromDiscriminatorValue)?.AsList(); } }, + { "total_count", n => { TotalCount = n.GetIntValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteBoolValue("incomplete_results", IncompleteResults); + writer.WriteCollectionOfObjectValues("items", Items); + writer.WriteIntValue("total_count", TotalCount); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Search/Repositories/RepositoriesRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Search/Repositories/RepositoriesRequestBuilder.cs new file mode 100644 index 0000000..75be49c --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Search/Repositories/RepositoriesRequestBuilder.cs @@ -0,0 +1,178 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Search.Repositories +{ + /// + /// Builds and executes requests for operations under \search\repositories + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class RepositoriesRequestBuilder : BaseRequestBuilder + { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public RepositoriesRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/search/repositories?q={q}{&order*,page*,per_page*,sort*}", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public RepositoriesRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/search/repositories?q={q}{&order*,page*,per_page*,sort*}", rawUrl) + { + } + /// + /// Find repositories via various criteria. This method returns up to 100 results [per page](https://docs.github.com/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/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. + /// API method documentation + /// + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 422 status code + /// When receiving a 503 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsRepositoriesGetResponseAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task GetAsRepositoriesGetResponseAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "422", global::Ayllu.Github.Client.Models.ValidationError.CreateFromDiscriminatorValue }, + { "503", global::Ayllu.Github.Client.Models.Repositories503Error.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Search.Repositories.RepositoriesGetResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// Find repositories via various criteria. This method returns up to 100 results [per page](https://docs.github.com/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/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. + /// API method documentation + /// + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 422 status code + /// When receiving a 503 status code + [Obsolete("This method is obsolete. Use GetAsRepositoriesGetResponseAsync instead.")] +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "422", global::Ayllu.Github.Client.Models.ValidationError.CreateFromDiscriminatorValue }, + { "503", global::Ayllu.Github.Client.Models.Repositories503Error.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Search.Repositories.RepositoriesResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// Find repositories via various criteria. This method returns up to 100 results [per page](https://docs.github.com/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/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. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.Search.Repositories.RepositoriesRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Search.Repositories.RepositoriesRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Find repositories via various criteria. This method returns up to 100 results [per page](https://docs.github.com/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/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. + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class RepositoriesRequestBuilderGetQueryParameters + { + /// 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`. + [Obsolete("This property is deprecated, use OrderAsGetOrderQueryParameterType instead")] +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("order")] + public string? Order { get; set; } +#nullable restore +#else + [QueryParameter("order")] + public string Order { get; set; } +#endif + /// 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`. + [QueryParameter("order")] + public global::Ayllu.Github.Client.Search.Repositories.GetOrderQueryParameterType? OrderAsGetOrderQueryParameterType { get; set; } + /// The page number of the results to fetch. For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." + [QueryParameter("page")] + public int? Page { get; set; } + /// The number of results per page (max 100). For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." + [QueryParameter("per_page")] + public int? PerPage { get; set; } + /// The query contains one or more search keywords and qualifiers. Qualifiers allow you to limit your search to specific areas of GitHub. The REST API supports the same qualifiers as the web interface for GitHub. To learn more about the format of the query, see [Constructing a search query](https://docs.github.com/rest/search/search#constructing-a-search-query). See "[Searching for repositories](https://docs.github.com/articles/searching-for-repositories/)" for a detailed list of qualifiers. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("q")] + public string? Q { get; set; } +#nullable restore +#else + [QueryParameter("q")] + public string Q { get; set; } +#endif + /// 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/rest/search/search#ranking-search-results) + [Obsolete("This property is deprecated, use SortAsGetSortQueryParameterType instead")] +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("sort")] + public string? Sort { get; set; } +#nullable restore +#else + [QueryParameter("sort")] + public string Sort { get; set; } +#endif + /// 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/rest/search/search#ranking-search-results) + [QueryParameter("sort")] + public global::Ayllu.Github.Client.Search.Repositories.GetSortQueryParameterType? SortAsGetSortQueryParameterType { get; set; } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class RepositoriesRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Search/Repositories/RepositoriesResponse.cs b/src/Ayllu.Github.Client/Github/Client/Search/Repositories/RepositoriesResponse.cs new file mode 100644 index 0000000..e71e26e --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Search/Repositories/RepositoriesResponse.cs @@ -0,0 +1,28 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Search.Repositories +{ + [Obsolete("This class is obsolete. Use RepositoriesGetResponse instead.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class RepositoriesResponse : global::Ayllu.Github.Client.Search.Repositories.RepositoriesGetResponse, IParsable + #pragma warning restore CS1591 + { + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static new global::Ayllu.Github.Client.Search.Repositories.RepositoriesResponse CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Search.Repositories.RepositoriesResponse(); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Search/SearchRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Search/SearchRequestBuilder.cs new file mode 100644 index 0000000..5997488 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Search/SearchRequestBuilder.cs @@ -0,0 +1,77 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Search.Code; +using Ayllu.Github.Client.Search.Commits; +using Ayllu.Github.Client.Search.Issues; +using Ayllu.Github.Client.Search.Labels; +using Ayllu.Github.Client.Search.Repositories; +using Ayllu.Github.Client.Search.Topics; +using Ayllu.Github.Client.Search.Users; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System; +namespace Ayllu.Github.Client.Search +{ + /// + /// Builds and executes requests for operations under \search + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class SearchRequestBuilder : BaseRequestBuilder + { + /// The code property + public global::Ayllu.Github.Client.Search.Code.CodeRequestBuilder Code + { + get => new global::Ayllu.Github.Client.Search.Code.CodeRequestBuilder(PathParameters, RequestAdapter); + } + /// The commits property + public global::Ayllu.Github.Client.Search.Commits.CommitsRequestBuilder Commits + { + get => new global::Ayllu.Github.Client.Search.Commits.CommitsRequestBuilder(PathParameters, RequestAdapter); + } + /// The issues property + public global::Ayllu.Github.Client.Search.Issues.IssuesRequestBuilder Issues + { + get => new global::Ayllu.Github.Client.Search.Issues.IssuesRequestBuilder(PathParameters, RequestAdapter); + } + /// The labels property + public global::Ayllu.Github.Client.Search.Labels.LabelsRequestBuilder Labels + { + get => new global::Ayllu.Github.Client.Search.Labels.LabelsRequestBuilder(PathParameters, RequestAdapter); + } + /// The repositories property + public global::Ayllu.Github.Client.Search.Repositories.RepositoriesRequestBuilder Repositories + { + get => new global::Ayllu.Github.Client.Search.Repositories.RepositoriesRequestBuilder(PathParameters, RequestAdapter); + } + /// The topics property + public global::Ayllu.Github.Client.Search.Topics.TopicsRequestBuilder Topics + { + get => new global::Ayllu.Github.Client.Search.Topics.TopicsRequestBuilder(PathParameters, RequestAdapter); + } + /// The users property + public global::Ayllu.Github.Client.Search.Users.UsersRequestBuilder Users + { + get => new global::Ayllu.Github.Client.Search.Users.UsersRequestBuilder(PathParameters, RequestAdapter); + } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public SearchRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/search", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public SearchRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/search", rawUrl) + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Search/Topics/TopicsGetResponse.cs b/src/Ayllu.Github.Client/Github/Client/Search/Topics/TopicsGetResponse.cs new file mode 100644 index 0000000..46d8336 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Search/Topics/TopicsGetResponse.cs @@ -0,0 +1,74 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Search.Topics +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class TopicsGetResponse : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The incomplete_results property + public bool? IncompleteResults { get; set; } + /// The items property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? Items { get; set; } +#nullable restore +#else + public List Items { get; set; } +#endif + /// The total_count property + public int? TotalCount { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public TopicsGetResponse() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Search.Topics.TopicsGetResponse CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Search.Topics.TopicsGetResponse(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "incomplete_results", n => { IncompleteResults = n.GetBoolValue(); } }, + { "items", n => { Items = n.GetCollectionOfObjectValues(global::Ayllu.Github.Client.Models.TopicSearchResultItem.CreateFromDiscriminatorValue)?.AsList(); } }, + { "total_count", n => { TotalCount = n.GetIntValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteBoolValue("incomplete_results", IncompleteResults); + writer.WriteCollectionOfObjectValues("items", Items); + writer.WriteIntValue("total_count", TotalCount); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Search/Topics/TopicsRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Search/Topics/TopicsRequestBuilder.cs new file mode 100644 index 0000000..3719b95 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Search/Topics/TopicsRequestBuilder.cs @@ -0,0 +1,135 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Search.Topics +{ + /// + /// Builds and executes requests for operations under \search\topics + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class TopicsRequestBuilder : BaseRequestBuilder + { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public TopicsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/search/topics?q={q}{&page*,per_page*}", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public TopicsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/search/topics?q={q}{&page*,per_page*}", rawUrl) + { + } + /// + /// Find topics via various criteria. Results are sorted by best match. This method returns up to 100 results [per page](https://docs.github.com/rest/guides/using-pagination-in-the-rest-api). See "[Searching topics](https://docs.github.com/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/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. + /// API method documentation + /// + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsTopicsGetResponseAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task GetAsTopicsGetResponseAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Search.Topics.TopicsGetResponse.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false); + } + /// + /// Find topics via various criteria. Results are sorted by best match. This method returns up to 100 results [per page](https://docs.github.com/rest/guides/using-pagination-in-the-rest-api). See "[Searching topics](https://docs.github.com/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/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. + /// API method documentation + /// + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + [Obsolete("This method is obsolete. Use GetAsTopicsGetResponseAsync instead.")] +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Search.Topics.TopicsResponse.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false); + } + /// + /// Find topics via various criteria. Results are sorted by best match. This method returns up to 100 results [per page](https://docs.github.com/rest/guides/using-pagination-in-the-rest-api). See "[Searching topics](https://docs.github.com/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/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. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.Search.Topics.TopicsRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Search.Topics.TopicsRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Find topics via various criteria. Results are sorted by best match. This method returns up to 100 results [per page](https://docs.github.com/rest/guides/using-pagination-in-the-rest-api). See "[Searching topics](https://docs.github.com/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/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. + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class TopicsRequestBuilderGetQueryParameters + { + /// The page number of the results to fetch. For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." + [QueryParameter("page")] + public int? Page { get; set; } + /// The number of results per page (max 100). For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." + [QueryParameter("per_page")] + public int? PerPage { get; set; } + /// The query contains one or more search keywords and qualifiers. Qualifiers allow you to limit your search to specific areas of GitHub. The REST API supports the same qualifiers as the web interface for GitHub. To learn more about the format of the query, see [Constructing a search query](https://docs.github.com/rest/search/search#constructing-a-search-query). +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("q")] + public string? Q { get; set; } +#nullable restore +#else + [QueryParameter("q")] + public string Q { get; set; } +#endif + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class TopicsRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Search/Topics/TopicsResponse.cs b/src/Ayllu.Github.Client/Github/Client/Search/Topics/TopicsResponse.cs new file mode 100644 index 0000000..05e1569 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Search/Topics/TopicsResponse.cs @@ -0,0 +1,28 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Search.Topics +{ + [Obsolete("This class is obsolete. Use TopicsGetResponse instead.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class TopicsResponse : global::Ayllu.Github.Client.Search.Topics.TopicsGetResponse, IParsable + #pragma warning restore CS1591 + { + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static new global::Ayllu.Github.Client.Search.Topics.TopicsResponse CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Search.Topics.TopicsResponse(); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Search/Users/GetOrderQueryParameterType.cs b/src/Ayllu.Github.Client/Github/Client/Search/Users/GetOrderQueryParameterType.cs new file mode 100644 index 0000000..e4ed79b --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Search/Users/GetOrderQueryParameterType.cs @@ -0,0 +1,20 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Search.Users +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public enum GetOrderQueryParameterType + #pragma warning restore CS1591 + { + [EnumMember(Value = "desc")] + #pragma warning disable CS1591 + Desc, + #pragma warning restore CS1591 + [EnumMember(Value = "asc")] + #pragma warning disable CS1591 + Asc, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Search/Users/GetSortQueryParameterType.cs b/src/Ayllu.Github.Client/Github/Client/Search/Users/GetSortQueryParameterType.cs new file mode 100644 index 0000000..0d7b1f3 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Search/Users/GetSortQueryParameterType.cs @@ -0,0 +1,24 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Search.Users +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public enum GetSortQueryParameterType + #pragma warning restore CS1591 + { + [EnumMember(Value = "followers")] + #pragma warning disable CS1591 + Followers, + #pragma warning restore CS1591 + [EnumMember(Value = "repositories")] + #pragma warning disable CS1591 + Repositories, + #pragma warning restore CS1591 + [EnumMember(Value = "joined")] + #pragma warning disable CS1591 + Joined, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Search/Users/UsersGetResponse.cs b/src/Ayllu.Github.Client/Github/Client/Search/Users/UsersGetResponse.cs new file mode 100644 index 0000000..5334cbc --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Search/Users/UsersGetResponse.cs @@ -0,0 +1,74 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Search.Users +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class UsersGetResponse : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The incomplete_results property + public bool? IncompleteResults { get; set; } + /// The items property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? Items { get; set; } +#nullable restore +#else + public List Items { get; set; } +#endif + /// The total_count property + public int? TotalCount { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public UsersGetResponse() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Search.Users.UsersGetResponse CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Search.Users.UsersGetResponse(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "incomplete_results", n => { IncompleteResults = n.GetBoolValue(); } }, + { "items", n => { Items = n.GetCollectionOfObjectValues(global::Ayllu.Github.Client.Models.UserSearchResultItem.CreateFromDiscriminatorValue)?.AsList(); } }, + { "total_count", n => { TotalCount = n.GetIntValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteBoolValue("incomplete_results", IncompleteResults); + writer.WriteCollectionOfObjectValues("items", Items); + writer.WriteIntValue("total_count", TotalCount); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Search/Users/UsersRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Search/Users/UsersRequestBuilder.cs new file mode 100644 index 0000000..7c638be --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Search/Users/UsersRequestBuilder.cs @@ -0,0 +1,178 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Search.Users +{ + /// + /// Builds and executes requests for operations under \search\users + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class UsersRequestBuilder : BaseRequestBuilder + { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public UsersRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/search/users?q={q}{&order*,page*,per_page*,sort*}", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public UsersRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/search/users?q={q}{&order*,page*,per_page*,sort*}", rawUrl) + { + } + /// + /// Find users via various criteria. This method returns up to 100 results [per page](https://docs.github.com/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/rest/search/search#text-match-metadata). For more details about how to receive highlighted search results, see [Text match metadata](https://docs.github.com/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/graphql/reference/queries#search)." + /// API method documentation + /// + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 422 status code + /// When receiving a 503 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsUsersGetResponseAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task GetAsUsersGetResponseAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "422", global::Ayllu.Github.Client.Models.ValidationError.CreateFromDiscriminatorValue }, + { "503", global::Ayllu.Github.Client.Models.Users503Error.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Search.Users.UsersGetResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// Find users via various criteria. This method returns up to 100 results [per page](https://docs.github.com/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/rest/search/search#text-match-metadata). For more details about how to receive highlighted search results, see [Text match metadata](https://docs.github.com/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/graphql/reference/queries#search)." + /// API method documentation + /// + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 422 status code + /// When receiving a 503 status code + [Obsolete("This method is obsolete. Use GetAsUsersGetResponseAsync instead.")] +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "422", global::Ayllu.Github.Client.Models.ValidationError.CreateFromDiscriminatorValue }, + { "503", global::Ayllu.Github.Client.Models.Users503Error.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Search.Users.UsersResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// Find users via various criteria. This method returns up to 100 results [per page](https://docs.github.com/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/rest/search/search#text-match-metadata). For more details about how to receive highlighted search results, see [Text match metadata](https://docs.github.com/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/graphql/reference/queries#search)." + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.Search.Users.UsersRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Search.Users.UsersRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Find users via various criteria. This method returns up to 100 results [per page](https://docs.github.com/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/rest/search/search#text-match-metadata). For more details about how to receive highlighted search results, see [Text match metadata](https://docs.github.com/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/graphql/reference/queries#search)." + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class UsersRequestBuilderGetQueryParameters + { + /// 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`. + [Obsolete("This property is deprecated, use OrderAsGetOrderQueryParameterType instead")] +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("order")] + public string? Order { get; set; } +#nullable restore +#else + [QueryParameter("order")] + public string Order { get; set; } +#endif + /// 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`. + [QueryParameter("order")] + public global::Ayllu.Github.Client.Search.Users.GetOrderQueryParameterType? OrderAsGetOrderQueryParameterType { get; set; } + /// The page number of the results to fetch. For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." + [QueryParameter("page")] + public int? Page { get; set; } + /// The number of results per page (max 100). For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." + [QueryParameter("per_page")] + public int? PerPage { get; set; } + /// The query contains one or more search keywords and qualifiers. Qualifiers allow you to limit your search to specific areas of GitHub. The REST API supports the same qualifiers as the web interface for GitHub. To learn more about the format of the query, see [Constructing a search query](https://docs.github.com/rest/search/search#constructing-a-search-query). See "[Searching users](https://docs.github.com/search-github/searching-on-github/searching-users)" for a detailed list of qualifiers. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("q")] + public string? Q { get; set; } +#nullable restore +#else + [QueryParameter("q")] + public string Q { get; set; } +#endif + /// Sorts the results of your query by number of `followers` or `repositories`, or when the person `joined` GitHub. Default: [best match](https://docs.github.com/rest/search/search#ranking-search-results) + [Obsolete("This property is deprecated, use SortAsGetSortQueryParameterType instead")] +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("sort")] + public string? Sort { get; set; } +#nullable restore +#else + [QueryParameter("sort")] + public string Sort { get; set; } +#endif + /// Sorts the results of your query by number of `followers` or `repositories`, or when the person `joined` GitHub. Default: [best match](https://docs.github.com/rest/search/search#ranking-search-results) + [QueryParameter("sort")] + public global::Ayllu.Github.Client.Search.Users.GetSortQueryParameterType? SortAsGetSortQueryParameterType { get; set; } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class UsersRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Search/Users/UsersResponse.cs b/src/Ayllu.Github.Client/Github/Client/Search/Users/UsersResponse.cs new file mode 100644 index 0000000..a481542 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Search/Users/UsersResponse.cs @@ -0,0 +1,28 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Search.Users +{ + [Obsolete("This class is obsolete. Use UsersGetResponse instead.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class UsersResponse : global::Ayllu.Github.Client.Search.Users.UsersGetResponse, IParsable + #pragma warning restore CS1591 + { + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static new global::Ayllu.Github.Client.Search.Users.UsersResponse CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Search.Users.UsersResponse(); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Teams/Item/Discussions/DiscussionsPostRequestBody.cs b/src/Ayllu.Github.Client/Github/Client/Teams/Item/Discussions/DiscussionsPostRequestBody.cs new file mode 100644 index 0000000..cfe8dcc --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Teams/Item/Discussions/DiscussionsPostRequestBody.cs @@ -0,0 +1,79 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Teams.Item.Discussions +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class DiscussionsPostRequestBody : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The discussion post's body text. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Body { get; set; } +#nullable restore +#else + public string Body { get; set; } +#endif + /// 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. + public bool? Private { get; set; } + /// The discussion post's title. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Title { get; set; } +#nullable restore +#else + public string Title { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public DiscussionsPostRequestBody() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Teams.Item.Discussions.DiscussionsPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Teams.Item.Discussions.DiscussionsPostRequestBody(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "body", n => { Body = n.GetStringValue(); } }, + { "private", n => { Private = n.GetBoolValue(); } }, + { "title", n => { Title = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("body", Body); + writer.WriteBoolValue("private", Private); + writer.WriteStringValue("title", Title); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Teams/Item/Discussions/DiscussionsRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Teams/Item/Discussions/DiscussionsRequestBuilder.cs new file mode 100644 index 0000000..03f571e --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Teams/Item/Discussions/DiscussionsRequestBuilder.cs @@ -0,0 +1,204 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Ayllu.Github.Client.Teams.Item.Discussions.Item; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Teams.Item.Discussions +{ + /// + /// Builds and executes requests for operations under \teams\{team_id}\discussions + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class DiscussionsRequestBuilder : BaseRequestBuilder + { + /// Gets an item from the Ayllu.Github.Client.teams.item.discussions.item collection + /// The number that identifies the discussion. + /// A + [Obsolete("")] + public global::Ayllu.Github.Client.Teams.Item.Discussions.Item.WithDiscussion_numberItemRequestBuilder this[int position] + { + get + { + var urlTplParams = new Dictionary(PathParameters); + urlTplParams.Add("discussion_number", position); + return new global::Ayllu.Github.Client.Teams.Item.Discussions.Item.WithDiscussion_numberItemRequestBuilder(urlTplParams, RequestAdapter); + } + } + /// Gets an item from the Ayllu.Github.Client.teams.item.discussions.item collection + /// The number that identifies the discussion. + /// A + [Obsolete("This indexer is deprecated and will be removed in the next major version. Use the one with the typed parameter instead.")] + public global::Ayllu.Github.Client.Teams.Item.Discussions.Item.WithDiscussion_numberItemRequestBuilder this[string position] + { + get + { + var urlTplParams = new Dictionary(PathParameters); + if (!string.IsNullOrWhiteSpace(position)) urlTplParams.Add("discussion_number", position); + return new global::Ayllu.Github.Client.Teams.Item.Discussions.Item.WithDiscussion_numberItemRequestBuilder(urlTplParams, RequestAdapter); + } + } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public DiscussionsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/teams/{team_id}/discussions{?direction*,page*,per_page*}", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public DiscussionsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/teams/{team_id}/discussions{?direction*,page*,per_page*}", rawUrl) + { + } + /// + /// > [!WARNING]> **Endpoint closing down notice:** This endpoint route is closing down and will be removed from the Teams API. We recommend migrating your existing code to use the new [`List discussions`](https://docs.github.com/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. + /// API method documentation + /// + /// A List<global::Ayllu.Github.Client.Models.TeamDiscussion> + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + [Obsolete("")] +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task?> GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task> GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var collectionResult = await RequestAdapter.SendCollectionAsync(requestInfo, global::Ayllu.Github.Client.Models.TeamDiscussion.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false); + return collectionResult?.AsList(); + } + /// + /// > [!WARNING]> **Endpoint closing down notice:** This endpoint route is closing down and will be removed from the Teams API. We recommend migrating your existing code to use the new [`Create a discussion`](https://docs.github.com/rest/teams/discussions#create-a-discussion) endpoint.Creates a new discussion post on a team's page.This endpoint triggers [notifications](https://docs.github.com/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. For more information, see "[Rate limits for the API](https://docs.github.com/rest/using-the-rest-api/rate-limits-for-the-rest-api#about-secondary-rate-limits)" and "[Best practices for using the REST API](https://docs.github.com/rest/guides/best-practices-for-using-the-rest-api)."OAuth app tokens and personal access tokens (classic) need the `write:discussion` scope to use this endpoint. + /// API method documentation + /// + /// A + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + [Obsolete("")] +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PostAsync(global::Ayllu.Github.Client.Teams.Item.Discussions.DiscussionsPostRequestBody body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task PostAsync(global::Ayllu.Github.Client.Teams.Item.Discussions.DiscussionsPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPostRequestInformation(body, requestConfiguration); + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Models.TeamDiscussion.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false); + } + /// + /// > [!WARNING]> **Endpoint closing down notice:** This endpoint route is closing down and will be removed from the Teams API. We recommend migrating your existing code to use the new [`List discussions`](https://docs.github.com/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. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. + [Obsolete("")] +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// > [!WARNING]> **Endpoint closing down notice:** This endpoint route is closing down and will be removed from the Teams API. We recommend migrating your existing code to use the new [`Create a discussion`](https://docs.github.com/rest/teams/discussions#create-a-discussion) endpoint.Creates a new discussion post on a team's page.This endpoint triggers [notifications](https://docs.github.com/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. For more information, see "[Rate limits for the API](https://docs.github.com/rest/using-the-rest-api/rate-limits-for-the-rest-api#about-secondary-rate-limits)" and "[Best practices for using the REST API](https://docs.github.com/rest/guides/best-practices-for-using-the-rest-api)."OAuth app tokens and personal access tokens (classic) need the `write:discussion` scope to use this endpoint. + /// + /// A + /// The request body + /// Configuration for the request such as headers, query parameters, and middleware options. + [Obsolete("")] +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPostRequestInformation(global::Ayllu.Github.Client.Teams.Item.Discussions.DiscussionsPostRequestBody body, Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToPostRequestInformation(global::Ayllu.Github.Client.Teams.Item.Discussions.DiscussionsPostRequestBody body, Action> requestConfiguration = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + [Obsolete("")] + public global::Ayllu.Github.Client.Teams.Item.Discussions.DiscussionsRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Teams.Item.Discussions.DiscussionsRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// > [!WARNING]> **Endpoint closing down notice:** This endpoint route is closing down and will be removed from the Teams API. We recommend migrating your existing code to use the new [`List discussions`](https://docs.github.com/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. + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class DiscussionsRequestBuilderGetQueryParameters + { + /// The direction to sort the results by. + [Obsolete("This property is deprecated, use DirectionAsGetDirectionQueryParameterType instead")] +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("direction")] + public string? Direction { get; set; } +#nullable restore +#else + [QueryParameter("direction")] + public string Direction { get; set; } +#endif + /// The direction to sort the results by. + [QueryParameter("direction")] + public global::Ayllu.Github.Client.Teams.Item.Discussions.GetDirectionQueryParameterType? DirectionAsGetDirectionQueryParameterType { get; set; } + /// The page number of the results to fetch. For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." + [QueryParameter("page")] + public int? Page { get; set; } + /// The number of results per page (max 100). For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." + [QueryParameter("per_page")] + public int? PerPage { get; set; } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class DiscussionsRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class DiscussionsRequestBuilderPostRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Teams/Item/Discussions/GetDirectionQueryParameterType.cs b/src/Ayllu.Github.Client/Github/Client/Teams/Item/Discussions/GetDirectionQueryParameterType.cs new file mode 100644 index 0000000..4ab5719 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Teams/Item/Discussions/GetDirectionQueryParameterType.cs @@ -0,0 +1,20 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Teams.Item.Discussions +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public enum GetDirectionQueryParameterType + #pragma warning restore CS1591 + { + [EnumMember(Value = "asc")] + #pragma warning disable CS1591 + Asc, + #pragma warning restore CS1591 + [EnumMember(Value = "desc")] + #pragma warning disable CS1591 + Desc, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Teams/Item/Discussions/Item/Comments/CommentsPostRequestBody.cs b/src/Ayllu.Github.Client/Github/Client/Teams/Item/Discussions/Item/Comments/CommentsPostRequestBody.cs new file mode 100644 index 0000000..699614d --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Teams/Item/Discussions/Item/Comments/CommentsPostRequestBody.cs @@ -0,0 +1,65 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Teams.Item.Discussions.Item.Comments +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class CommentsPostRequestBody : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The discussion comment's body text. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Body { get; set; } +#nullable restore +#else + public string Body { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public CommentsPostRequestBody() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Teams.Item.Discussions.Item.Comments.CommentsPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Teams.Item.Discussions.Item.Comments.CommentsPostRequestBody(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "body", n => { Body = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("body", Body); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Teams/Item/Discussions/Item/Comments/CommentsRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Teams/Item/Discussions/Item/Comments/CommentsRequestBuilder.cs new file mode 100644 index 0000000..d29fc6e --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Teams/Item/Discussions/Item/Comments/CommentsRequestBuilder.cs @@ -0,0 +1,204 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Ayllu.Github.Client.Teams.Item.Discussions.Item.Comments.Item; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Teams.Item.Discussions.Item.Comments +{ + /// + /// Builds and executes requests for operations under \teams\{team_id}\discussions\{discussion_number}\comments + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class CommentsRequestBuilder : BaseRequestBuilder + { + /// Gets an item from the Ayllu.Github.Client.teams.item.discussions.item.comments.item collection + /// The number that identifies the comment. + /// A + [Obsolete("")] + public global::Ayllu.Github.Client.Teams.Item.Discussions.Item.Comments.Item.WithComment_numberItemRequestBuilder this[int position] + { + get + { + var urlTplParams = new Dictionary(PathParameters); + urlTplParams.Add("comment_number", position); + return new global::Ayllu.Github.Client.Teams.Item.Discussions.Item.Comments.Item.WithComment_numberItemRequestBuilder(urlTplParams, RequestAdapter); + } + } + /// Gets an item from the Ayllu.Github.Client.teams.item.discussions.item.comments.item collection + /// The number that identifies the comment. + /// A + [Obsolete("This indexer is deprecated and will be removed in the next major version. Use the one with the typed parameter instead.")] + public global::Ayllu.Github.Client.Teams.Item.Discussions.Item.Comments.Item.WithComment_numberItemRequestBuilder this[string position] + { + get + { + var urlTplParams = new Dictionary(PathParameters); + if (!string.IsNullOrWhiteSpace(position)) urlTplParams.Add("comment_number", position); + return new global::Ayllu.Github.Client.Teams.Item.Discussions.Item.Comments.Item.WithComment_numberItemRequestBuilder(urlTplParams, RequestAdapter); + } + } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public CommentsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/teams/{team_id}/discussions/{discussion_number}/comments{?direction*,page*,per_page*}", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public CommentsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/teams/{team_id}/discussions/{discussion_number}/comments{?direction*,page*,per_page*}", rawUrl) + { + } + /// + /// > [!WARNING]> **Endpoint closing down notice:** This endpoint route is closing down 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/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. + /// API method documentation + /// + /// A List<global::Ayllu.Github.Client.Models.TeamDiscussionComment> + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + [Obsolete("")] +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task?> GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task> GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var collectionResult = await RequestAdapter.SendCollectionAsync(requestInfo, global::Ayllu.Github.Client.Models.TeamDiscussionComment.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false); + return collectionResult?.AsList(); + } + /// + /// > [!WARNING]> **Endpoint closing down notice:** This endpoint route is closing down and will be removed from the Teams API. We recommend migrating your existing code to use the new [Create a discussion comment](https://docs.github.com/rest/teams/discussion-comments#create-a-discussion-comment) endpoint.Creates a new comment on a team discussion.This endpoint triggers [notifications](https://docs.github.com/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. For more information, see "[Rate limits for the API](https://docs.github.com/rest/using-the-rest-api/rate-limits-for-the-rest-api#about-secondary-rate-limits)" and "[Best practices for using the REST API](https://docs.github.com/rest/guides/best-practices-for-using-the-rest-api)."OAuth app tokens and personal access tokens (classic) need the `write:discussion` scope to use this endpoint. + /// API method documentation + /// + /// A + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + [Obsolete("")] +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PostAsync(global::Ayllu.Github.Client.Teams.Item.Discussions.Item.Comments.CommentsPostRequestBody body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task PostAsync(global::Ayllu.Github.Client.Teams.Item.Discussions.Item.Comments.CommentsPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPostRequestInformation(body, requestConfiguration); + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Models.TeamDiscussionComment.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false); + } + /// + /// > [!WARNING]> **Endpoint closing down notice:** This endpoint route is closing down 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/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. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. + [Obsolete("")] +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// > [!WARNING]> **Endpoint closing down notice:** This endpoint route is closing down and will be removed from the Teams API. We recommend migrating your existing code to use the new [Create a discussion comment](https://docs.github.com/rest/teams/discussion-comments#create-a-discussion-comment) endpoint.Creates a new comment on a team discussion.This endpoint triggers [notifications](https://docs.github.com/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. For more information, see "[Rate limits for the API](https://docs.github.com/rest/using-the-rest-api/rate-limits-for-the-rest-api#about-secondary-rate-limits)" and "[Best practices for using the REST API](https://docs.github.com/rest/guides/best-practices-for-using-the-rest-api)."OAuth app tokens and personal access tokens (classic) need the `write:discussion` scope to use this endpoint. + /// + /// A + /// The request body + /// Configuration for the request such as headers, query parameters, and middleware options. + [Obsolete("")] +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPostRequestInformation(global::Ayllu.Github.Client.Teams.Item.Discussions.Item.Comments.CommentsPostRequestBody body, Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToPostRequestInformation(global::Ayllu.Github.Client.Teams.Item.Discussions.Item.Comments.CommentsPostRequestBody body, Action> requestConfiguration = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + [Obsolete("")] + public global::Ayllu.Github.Client.Teams.Item.Discussions.Item.Comments.CommentsRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Teams.Item.Discussions.Item.Comments.CommentsRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// > [!WARNING]> **Endpoint closing down notice:** This endpoint route is closing down 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/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. + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class CommentsRequestBuilderGetQueryParameters + { + /// The direction to sort the results by. + [Obsolete("This property is deprecated, use DirectionAsGetDirectionQueryParameterType instead")] +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("direction")] + public string? Direction { get; set; } +#nullable restore +#else + [QueryParameter("direction")] + public string Direction { get; set; } +#endif + /// The direction to sort the results by. + [QueryParameter("direction")] + public global::Ayllu.Github.Client.Teams.Item.Discussions.Item.Comments.GetDirectionQueryParameterType? DirectionAsGetDirectionQueryParameterType { get; set; } + /// The page number of the results to fetch. For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." + [QueryParameter("page")] + public int? Page { get; set; } + /// The number of results per page (max 100). For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." + [QueryParameter("per_page")] + public int? PerPage { get; set; } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class CommentsRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class CommentsRequestBuilderPostRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Teams/Item/Discussions/Item/Comments/GetDirectionQueryParameterType.cs b/src/Ayllu.Github.Client/Github/Client/Teams/Item/Discussions/Item/Comments/GetDirectionQueryParameterType.cs new file mode 100644 index 0000000..8e36229 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Teams/Item/Discussions/Item/Comments/GetDirectionQueryParameterType.cs @@ -0,0 +1,20 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Teams.Item.Discussions.Item.Comments +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public enum GetDirectionQueryParameterType + #pragma warning restore CS1591 + { + [EnumMember(Value = "asc")] + #pragma warning disable CS1591 + Asc, + #pragma warning restore CS1591 + [EnumMember(Value = "desc")] + #pragma warning disable CS1591 + Desc, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Teams/Item/Discussions/Item/Comments/Item/Reactions/GetContentQueryParameterType.cs b/src/Ayllu.Github.Client/Github/Client/Teams/Item/Discussions/Item/Comments/Item/Reactions/GetContentQueryParameterType.cs new file mode 100644 index 0000000..a664831 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Teams/Item/Discussions/Item/Comments/Item/Reactions/GetContentQueryParameterType.cs @@ -0,0 +1,44 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Teams.Item.Discussions.Item.Comments.Item.Reactions +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public enum GetContentQueryParameterType + #pragma warning restore CS1591 + { + [EnumMember(Value = "+1")] + #pragma warning disable CS1591 + Plus_1, + #pragma warning restore CS1591 + [EnumMember(Value = "-1")] + #pragma warning disable CS1591 + Minus_1, + #pragma warning restore CS1591 + [EnumMember(Value = "laugh")] + #pragma warning disable CS1591 + Laugh, + #pragma warning restore CS1591 + [EnumMember(Value = "confused")] + #pragma warning disable CS1591 + Confused, + #pragma warning restore CS1591 + [EnumMember(Value = "heart")] + #pragma warning disable CS1591 + Heart, + #pragma warning restore CS1591 + [EnumMember(Value = "hooray")] + #pragma warning disable CS1591 + Hooray, + #pragma warning restore CS1591 + [EnumMember(Value = "rocket")] + #pragma warning disable CS1591 + Rocket, + #pragma warning restore CS1591 + [EnumMember(Value = "eyes")] + #pragma warning disable CS1591 + Eyes, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Teams/Item/Discussions/Item/Comments/Item/Reactions/ReactionsPostRequestBody.cs b/src/Ayllu.Github.Client/Github/Client/Teams/Item/Discussions/Item/Comments/Item/Reactions/ReactionsPostRequestBody.cs new file mode 100644 index 0000000..94daec2 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Teams/Item/Discussions/Item/Comments/Item/Reactions/ReactionsPostRequestBody.cs @@ -0,0 +1,59 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Teams.Item.Discussions.Item.Comments.Item.Reactions +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class ReactionsPostRequestBody : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The [reaction type](https://docs.github.com/rest/reactions/reactions#about-reactions) to add to the team discussion comment. + public global::Ayllu.Github.Client.Teams.Item.Discussions.Item.Comments.Item.Reactions.ReactionsPostRequestBody_content? Content { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public ReactionsPostRequestBody() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Teams.Item.Discussions.Item.Comments.Item.Reactions.ReactionsPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Teams.Item.Discussions.Item.Comments.Item.Reactions.ReactionsPostRequestBody(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "content", n => { Content = n.GetEnumValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteEnumValue("content", Content); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Teams/Item/Discussions/Item/Comments/Item/Reactions/ReactionsPostRequestBody_content.cs b/src/Ayllu.Github.Client/Github/Client/Teams/Item/Discussions/Item/Comments/Item/Reactions/ReactionsPostRequestBody_content.cs new file mode 100644 index 0000000..d44c9ac --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Teams/Item/Discussions/Item/Comments/Item/Reactions/ReactionsPostRequestBody_content.cs @@ -0,0 +1,43 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Teams.Item.Discussions.Item.Comments.Item.Reactions +{ + /// The [reaction type](https://docs.github.com/rest/reactions/reactions#about-reactions) to add to the team discussion comment. + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public enum ReactionsPostRequestBody_content + { + [EnumMember(Value = "+1")] + #pragma warning disable CS1591 + Plus_1, + #pragma warning restore CS1591 + [EnumMember(Value = "-1")] + #pragma warning disable CS1591 + Minus_1, + #pragma warning restore CS1591 + [EnumMember(Value = "laugh")] + #pragma warning disable CS1591 + Laugh, + #pragma warning restore CS1591 + [EnumMember(Value = "confused")] + #pragma warning disable CS1591 + Confused, + #pragma warning restore CS1591 + [EnumMember(Value = "heart")] + #pragma warning disable CS1591 + Heart, + #pragma warning restore CS1591 + [EnumMember(Value = "hooray")] + #pragma warning disable CS1591 + Hooray, + #pragma warning restore CS1591 + [EnumMember(Value = "rocket")] + #pragma warning disable CS1591 + Rocket, + #pragma warning restore CS1591 + [EnumMember(Value = "eyes")] + #pragma warning disable CS1591 + Eyes, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Teams/Item/Discussions/Item/Comments/Item/Reactions/ReactionsRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Teams/Item/Discussions/Item/Comments/Item/Reactions/ReactionsRequestBuilder.cs new file mode 100644 index 0000000..15cbdf7 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Teams/Item/Discussions/Item/Comments/Item/Reactions/ReactionsRequestBuilder.cs @@ -0,0 +1,177 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Teams.Item.Discussions.Item.Comments.Item.Reactions +{ + /// + /// Builds and executes requests for operations under \teams\{team_id}\discussions\{discussion_number}\comments\{comment_number}\reactions + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class ReactionsRequestBuilder : BaseRequestBuilder + { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public ReactionsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/teams/{team_id}/discussions/{discussion_number}/comments/{comment_number}/reactions{?content*,page*,per_page*}", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public ReactionsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/teams/{team_id}/discussions/{discussion_number}/comments/{comment_number}/reactions{?content*,page*,per_page*}", rawUrl) + { + } + /// + /// > [!WARNING]> **Endpoint closing down notice:** This endpoint route is closing down 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/rest/reactions/reactions#list-reactions-for-a-team-discussion-comment) endpoint.List the reactions to a [team discussion comment](https://docs.github.com/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. + /// API method documentation + /// + /// A List<global::Ayllu.Github.Client.Models.Reaction> + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + [Obsolete("")] +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task?> GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task> GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var collectionResult = await RequestAdapter.SendCollectionAsync(requestInfo, global::Ayllu.Github.Client.Models.Reaction.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false); + return collectionResult?.AsList(); + } + /// + /// > [!WARNING]> **Endpoint closing down notice:** This endpoint route is closing down 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/rest/reactions/reactions#create-reaction-for-a-team-discussion-comment)" endpoint.Create a reaction to a [team discussion comment](https://docs.github.com/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. + /// API method documentation + /// + /// A + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + [Obsolete("")] +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PostAsync(global::Ayllu.Github.Client.Teams.Item.Discussions.Item.Comments.Item.Reactions.ReactionsPostRequestBody body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task PostAsync(global::Ayllu.Github.Client.Teams.Item.Discussions.Item.Comments.Item.Reactions.ReactionsPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPostRequestInformation(body, requestConfiguration); + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Models.Reaction.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false); + } + /// + /// > [!WARNING]> **Endpoint closing down notice:** This endpoint route is closing down 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/rest/reactions/reactions#list-reactions-for-a-team-discussion-comment) endpoint.List the reactions to a [team discussion comment](https://docs.github.com/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. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. + [Obsolete("")] +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// > [!WARNING]> **Endpoint closing down notice:** This endpoint route is closing down 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/rest/reactions/reactions#create-reaction-for-a-team-discussion-comment)" endpoint.Create a reaction to a [team discussion comment](https://docs.github.com/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. + /// + /// A + /// The request body + /// Configuration for the request such as headers, query parameters, and middleware options. + [Obsolete("")] +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPostRequestInformation(global::Ayllu.Github.Client.Teams.Item.Discussions.Item.Comments.Item.Reactions.ReactionsPostRequestBody body, Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToPostRequestInformation(global::Ayllu.Github.Client.Teams.Item.Discussions.Item.Comments.Item.Reactions.ReactionsPostRequestBody body, Action> requestConfiguration = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + [Obsolete("")] + public global::Ayllu.Github.Client.Teams.Item.Discussions.Item.Comments.Item.Reactions.ReactionsRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Teams.Item.Discussions.Item.Comments.Item.Reactions.ReactionsRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// > [!WARNING]> **Endpoint closing down notice:** This endpoint route is closing down 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/rest/reactions/reactions#list-reactions-for-a-team-discussion-comment) endpoint.List the reactions to a [team discussion comment](https://docs.github.com/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. + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class ReactionsRequestBuilderGetQueryParameters + { + /// Returns a single [reaction type](https://docs.github.com/rest/reactions/reactions#about-reactions). Omit this parameter to list all reactions to a team discussion comment. + [Obsolete("This property is deprecated, use ContentAsGetContentQueryParameterType instead")] +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("content")] + public string? Content { get; set; } +#nullable restore +#else + [QueryParameter("content")] + public string Content { get; set; } +#endif + /// Returns a single [reaction type](https://docs.github.com/rest/reactions/reactions#about-reactions). Omit this parameter to list all reactions to a team discussion comment. + [QueryParameter("content")] + public global::Ayllu.Github.Client.Teams.Item.Discussions.Item.Comments.Item.Reactions.GetContentQueryParameterType? ContentAsGetContentQueryParameterType { get; set; } + /// The page number of the results to fetch. For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." + [QueryParameter("page")] + public int? Page { get; set; } + /// The number of results per page (max 100). For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." + [QueryParameter("per_page")] + public int? PerPage { get; set; } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class ReactionsRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class ReactionsRequestBuilderPostRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Teams/Item/Discussions/Item/Comments/Item/WithComment_numberItemRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Teams/Item/Discussions/Item/Comments/Item/WithComment_numberItemRequestBuilder.cs new file mode 100644 index 0000000..d0b3be4 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Teams/Item/Discussions/Item/Comments/Item/WithComment_numberItemRequestBuilder.cs @@ -0,0 +1,202 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Ayllu.Github.Client.Teams.Item.Discussions.Item.Comments.Item.Reactions; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Teams.Item.Discussions.Item.Comments.Item +{ + /// + /// Builds and executes requests for operations under \teams\{team_id}\discussions\{discussion_number}\comments\{comment_number} + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithComment_numberItemRequestBuilder : BaseRequestBuilder + { + /// The reactions property + [Obsolete("")] + public global::Ayllu.Github.Client.Teams.Item.Discussions.Item.Comments.Item.Reactions.ReactionsRequestBuilder Reactions + { + get => new global::Ayllu.Github.Client.Teams.Item.Discussions.Item.Comments.Item.Reactions.ReactionsRequestBuilder(PathParameters, RequestAdapter); + } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public WithComment_numberItemRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/teams/{team_id}/discussions/{discussion_number}/comments/{comment_number}", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public WithComment_numberItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/teams/{team_id}/discussions/{discussion_number}/comments/{comment_number}", rawUrl) + { + } + /// + /// > [!WARNING]> **Endpoint closing down notice:** This endpoint route is closing down 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/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. + /// API method documentation + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + [Obsolete("")] +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task DeleteAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task DeleteAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToDeleteRequestInformation(requestConfiguration); + await RequestAdapter.SendNoContentAsync(requestInfo, default, cancellationToken).ConfigureAwait(false); + } + /// + /// > [!WARNING]> **Endpoint closing down notice:** This endpoint route is closing down 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/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. + /// API method documentation + /// + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + [Obsolete("")] +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Models.TeamDiscussionComment.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false); + } + /// + /// > [!WARNING]> **Endpoint closing down notice:** This endpoint route is closing down 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/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. + /// API method documentation + /// + /// A + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + [Obsolete("")] +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PatchAsync(global::Ayllu.Github.Client.Teams.Item.Discussions.Item.Comments.Item.WithComment_numberPatchRequestBody body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task PatchAsync(global::Ayllu.Github.Client.Teams.Item.Discussions.Item.Comments.Item.WithComment_numberPatchRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPatchRequestInformation(body, requestConfiguration); + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Models.TeamDiscussionComment.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false); + } + /// + /// > [!WARNING]> **Endpoint closing down notice:** This endpoint route is closing down 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/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. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. + [Obsolete("")] +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToDeleteRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToDeleteRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.DELETE, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + return requestInfo; + } + /// + /// > [!WARNING]> **Endpoint closing down notice:** This endpoint route is closing down 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/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. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. + [Obsolete("")] +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// > [!WARNING]> **Endpoint closing down notice:** This endpoint route is closing down 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/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. + /// + /// A + /// The request body + /// Configuration for the request such as headers, query parameters, and middleware options. + [Obsolete("")] +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPatchRequestInformation(global::Ayllu.Github.Client.Teams.Item.Discussions.Item.Comments.Item.WithComment_numberPatchRequestBody body, Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToPatchRequestInformation(global::Ayllu.Github.Client.Teams.Item.Discussions.Item.Comments.Item.WithComment_numberPatchRequestBody body, Action> requestConfiguration = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + [Obsolete("")] + public global::Ayllu.Github.Client.Teams.Item.Discussions.Item.Comments.Item.WithComment_numberItemRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Teams.Item.Discussions.Item.Comments.Item.WithComment_numberItemRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithComment_numberItemRequestBuilderDeleteRequestConfiguration : RequestConfiguration + { + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithComment_numberItemRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithComment_numberItemRequestBuilderPatchRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Teams/Item/Discussions/Item/Comments/Item/WithComment_numberPatchRequestBody.cs b/src/Ayllu.Github.Client/Github/Client/Teams/Item/Discussions/Item/Comments/Item/WithComment_numberPatchRequestBody.cs new file mode 100644 index 0000000..a09a3d7 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Teams/Item/Discussions/Item/Comments/Item/WithComment_numberPatchRequestBody.cs @@ -0,0 +1,65 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Teams.Item.Discussions.Item.Comments.Item +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class WithComment_numberPatchRequestBody : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The discussion comment's body text. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Body { get; set; } +#nullable restore +#else + public string Body { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public WithComment_numberPatchRequestBody() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Teams.Item.Discussions.Item.Comments.Item.WithComment_numberPatchRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Teams.Item.Discussions.Item.Comments.Item.WithComment_numberPatchRequestBody(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "body", n => { Body = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("body", Body); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Teams/Item/Discussions/Item/Reactions/GetContentQueryParameterType.cs b/src/Ayllu.Github.Client/Github/Client/Teams/Item/Discussions/Item/Reactions/GetContentQueryParameterType.cs new file mode 100644 index 0000000..120c000 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Teams/Item/Discussions/Item/Reactions/GetContentQueryParameterType.cs @@ -0,0 +1,44 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Teams.Item.Discussions.Item.Reactions +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public enum GetContentQueryParameterType + #pragma warning restore CS1591 + { + [EnumMember(Value = "+1")] + #pragma warning disable CS1591 + Plus_1, + #pragma warning restore CS1591 + [EnumMember(Value = "-1")] + #pragma warning disable CS1591 + Minus_1, + #pragma warning restore CS1591 + [EnumMember(Value = "laugh")] + #pragma warning disable CS1591 + Laugh, + #pragma warning restore CS1591 + [EnumMember(Value = "confused")] + #pragma warning disable CS1591 + Confused, + #pragma warning restore CS1591 + [EnumMember(Value = "heart")] + #pragma warning disable CS1591 + Heart, + #pragma warning restore CS1591 + [EnumMember(Value = "hooray")] + #pragma warning disable CS1591 + Hooray, + #pragma warning restore CS1591 + [EnumMember(Value = "rocket")] + #pragma warning disable CS1591 + Rocket, + #pragma warning restore CS1591 + [EnumMember(Value = "eyes")] + #pragma warning disable CS1591 + Eyes, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Teams/Item/Discussions/Item/Reactions/ReactionsPostRequestBody.cs b/src/Ayllu.Github.Client/Github/Client/Teams/Item/Discussions/Item/Reactions/ReactionsPostRequestBody.cs new file mode 100644 index 0000000..32e5b6e --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Teams/Item/Discussions/Item/Reactions/ReactionsPostRequestBody.cs @@ -0,0 +1,59 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Teams.Item.Discussions.Item.Reactions +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class ReactionsPostRequestBody : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The [reaction type](https://docs.github.com/rest/reactions/reactions#about-reactions) to add to the team discussion. + public global::Ayllu.Github.Client.Teams.Item.Discussions.Item.Reactions.ReactionsPostRequestBody_content? Content { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public ReactionsPostRequestBody() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Teams.Item.Discussions.Item.Reactions.ReactionsPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Teams.Item.Discussions.Item.Reactions.ReactionsPostRequestBody(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "content", n => { Content = n.GetEnumValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteEnumValue("content", Content); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Teams/Item/Discussions/Item/Reactions/ReactionsPostRequestBody_content.cs b/src/Ayllu.Github.Client/Github/Client/Teams/Item/Discussions/Item/Reactions/ReactionsPostRequestBody_content.cs new file mode 100644 index 0000000..d9def44 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Teams/Item/Discussions/Item/Reactions/ReactionsPostRequestBody_content.cs @@ -0,0 +1,43 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Teams.Item.Discussions.Item.Reactions +{ + /// The [reaction type](https://docs.github.com/rest/reactions/reactions#about-reactions) to add to the team discussion. + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public enum ReactionsPostRequestBody_content + { + [EnumMember(Value = "+1")] + #pragma warning disable CS1591 + Plus_1, + #pragma warning restore CS1591 + [EnumMember(Value = "-1")] + #pragma warning disable CS1591 + Minus_1, + #pragma warning restore CS1591 + [EnumMember(Value = "laugh")] + #pragma warning disable CS1591 + Laugh, + #pragma warning restore CS1591 + [EnumMember(Value = "confused")] + #pragma warning disable CS1591 + Confused, + #pragma warning restore CS1591 + [EnumMember(Value = "heart")] + #pragma warning disable CS1591 + Heart, + #pragma warning restore CS1591 + [EnumMember(Value = "hooray")] + #pragma warning disable CS1591 + Hooray, + #pragma warning restore CS1591 + [EnumMember(Value = "rocket")] + #pragma warning disable CS1591 + Rocket, + #pragma warning restore CS1591 + [EnumMember(Value = "eyes")] + #pragma warning disable CS1591 + Eyes, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Teams/Item/Discussions/Item/Reactions/ReactionsRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Teams/Item/Discussions/Item/Reactions/ReactionsRequestBuilder.cs new file mode 100644 index 0000000..a1fd0cb --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Teams/Item/Discussions/Item/Reactions/ReactionsRequestBuilder.cs @@ -0,0 +1,177 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Teams.Item.Discussions.Item.Reactions +{ + /// + /// Builds and executes requests for operations under \teams\{team_id}\discussions\{discussion_number}\reactions + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class ReactionsRequestBuilder : BaseRequestBuilder + { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public ReactionsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/teams/{team_id}/discussions/{discussion_number}/reactions{?content*,page*,per_page*}", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public ReactionsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/teams/{team_id}/discussions/{discussion_number}/reactions{?content*,page*,per_page*}", rawUrl) + { + } + /// + /// > [!WARNING]> **Endpoint closing down notice:** This endpoint route is closing down 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/rest/reactions/reactions#list-reactions-for-a-team-discussion) endpoint.List the reactions to a [team discussion](https://docs.github.com/rest/teams/discussions#get-a-discussion).OAuth app tokens and personal access tokens (classic) need the `read:discussion` scope to use this endpoint. + /// API method documentation + /// + /// A List<global::Ayllu.Github.Client.Models.Reaction> + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + [Obsolete("")] +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task?> GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task> GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var collectionResult = await RequestAdapter.SendCollectionAsync(requestInfo, global::Ayllu.Github.Client.Models.Reaction.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false); + return collectionResult?.AsList(); + } + /// + /// > [!WARNING]> **Endpoint closing down notice:** This endpoint route is closing down 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/rest/reactions/reactions#create-reaction-for-a-team-discussion) endpoint.Create a reaction to a [team discussion](https://docs.github.com/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. + /// API method documentation + /// + /// A + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + [Obsolete("")] +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PostAsync(global::Ayllu.Github.Client.Teams.Item.Discussions.Item.Reactions.ReactionsPostRequestBody body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task PostAsync(global::Ayllu.Github.Client.Teams.Item.Discussions.Item.Reactions.ReactionsPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPostRequestInformation(body, requestConfiguration); + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Models.Reaction.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false); + } + /// + /// > [!WARNING]> **Endpoint closing down notice:** This endpoint route is closing down 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/rest/reactions/reactions#list-reactions-for-a-team-discussion) endpoint.List the reactions to a [team discussion](https://docs.github.com/rest/teams/discussions#get-a-discussion).OAuth app tokens and personal access tokens (classic) need the `read:discussion` scope to use this endpoint. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. + [Obsolete("")] +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// > [!WARNING]> **Endpoint closing down notice:** This endpoint route is closing down 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/rest/reactions/reactions#create-reaction-for-a-team-discussion) endpoint.Create a reaction to a [team discussion](https://docs.github.com/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. + /// + /// A + /// The request body + /// Configuration for the request such as headers, query parameters, and middleware options. + [Obsolete("")] +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPostRequestInformation(global::Ayllu.Github.Client.Teams.Item.Discussions.Item.Reactions.ReactionsPostRequestBody body, Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToPostRequestInformation(global::Ayllu.Github.Client.Teams.Item.Discussions.Item.Reactions.ReactionsPostRequestBody body, Action> requestConfiguration = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + [Obsolete("")] + public global::Ayllu.Github.Client.Teams.Item.Discussions.Item.Reactions.ReactionsRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Teams.Item.Discussions.Item.Reactions.ReactionsRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// > [!WARNING]> **Endpoint closing down notice:** This endpoint route is closing down 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/rest/reactions/reactions#list-reactions-for-a-team-discussion) endpoint.List the reactions to a [team discussion](https://docs.github.com/rest/teams/discussions#get-a-discussion).OAuth app tokens and personal access tokens (classic) need the `read:discussion` scope to use this endpoint. + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class ReactionsRequestBuilderGetQueryParameters + { + /// Returns a single [reaction type](https://docs.github.com/rest/reactions/reactions#about-reactions). Omit this parameter to list all reactions to a team discussion. + [Obsolete("This property is deprecated, use ContentAsGetContentQueryParameterType instead")] +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("content")] + public string? Content { get; set; } +#nullable restore +#else + [QueryParameter("content")] + public string Content { get; set; } +#endif + /// Returns a single [reaction type](https://docs.github.com/rest/reactions/reactions#about-reactions). Omit this parameter to list all reactions to a team discussion. + [QueryParameter("content")] + public global::Ayllu.Github.Client.Teams.Item.Discussions.Item.Reactions.GetContentQueryParameterType? ContentAsGetContentQueryParameterType { get; set; } + /// The page number of the results to fetch. For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." + [QueryParameter("page")] + public int? Page { get; set; } + /// The number of results per page (max 100). For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." + [QueryParameter("per_page")] + public int? PerPage { get; set; } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class ReactionsRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class ReactionsRequestBuilderPostRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Teams/Item/Discussions/Item/WithDiscussion_numberItemRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Teams/Item/Discussions/Item/WithDiscussion_numberItemRequestBuilder.cs new file mode 100644 index 0000000..219b886 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Teams/Item/Discussions/Item/WithDiscussion_numberItemRequestBuilder.cs @@ -0,0 +1,209 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Ayllu.Github.Client.Teams.Item.Discussions.Item.Comments; +using Ayllu.Github.Client.Teams.Item.Discussions.Item.Reactions; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Teams.Item.Discussions.Item +{ + /// + /// Builds and executes requests for operations under \teams\{team_id}\discussions\{discussion_number} + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithDiscussion_numberItemRequestBuilder : BaseRequestBuilder + { + /// The comments property + [Obsolete("")] + public global::Ayllu.Github.Client.Teams.Item.Discussions.Item.Comments.CommentsRequestBuilder Comments + { + get => new global::Ayllu.Github.Client.Teams.Item.Discussions.Item.Comments.CommentsRequestBuilder(PathParameters, RequestAdapter); + } + /// The reactions property + [Obsolete("")] + public global::Ayllu.Github.Client.Teams.Item.Discussions.Item.Reactions.ReactionsRequestBuilder Reactions + { + get => new global::Ayllu.Github.Client.Teams.Item.Discussions.Item.Reactions.ReactionsRequestBuilder(PathParameters, RequestAdapter); + } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public WithDiscussion_numberItemRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/teams/{team_id}/discussions/{discussion_number}", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public WithDiscussion_numberItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/teams/{team_id}/discussions/{discussion_number}", rawUrl) + { + } + /// + /// > [!WARNING]> **Endpoint closing down notice:** This endpoint route is closing down 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/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. + /// API method documentation + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + [Obsolete("")] +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task DeleteAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task DeleteAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToDeleteRequestInformation(requestConfiguration); + await RequestAdapter.SendNoContentAsync(requestInfo, default, cancellationToken).ConfigureAwait(false); + } + /// + /// > [!WARNING]> **Endpoint closing down notice:** This endpoint route is closing down 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/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. + /// API method documentation + /// + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + [Obsolete("")] +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Models.TeamDiscussion.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false); + } + /// + /// > [!WARNING]> **Endpoint closing down notice:** This endpoint route is closing down 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/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. + /// API method documentation + /// + /// A + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + [Obsolete("")] +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PatchAsync(global::Ayllu.Github.Client.Teams.Item.Discussions.Item.WithDiscussion_numberPatchRequestBody body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task PatchAsync(global::Ayllu.Github.Client.Teams.Item.Discussions.Item.WithDiscussion_numberPatchRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPatchRequestInformation(body, requestConfiguration); + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Models.TeamDiscussion.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false); + } + /// + /// > [!WARNING]> **Endpoint closing down notice:** This endpoint route is closing down 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/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. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. + [Obsolete("")] +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToDeleteRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToDeleteRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.DELETE, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + return requestInfo; + } + /// + /// > [!WARNING]> **Endpoint closing down notice:** This endpoint route is closing down 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/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. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. + [Obsolete("")] +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// > [!WARNING]> **Endpoint closing down notice:** This endpoint route is closing down 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/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. + /// + /// A + /// The request body + /// Configuration for the request such as headers, query parameters, and middleware options. + [Obsolete("")] +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPatchRequestInformation(global::Ayllu.Github.Client.Teams.Item.Discussions.Item.WithDiscussion_numberPatchRequestBody body, Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToPatchRequestInformation(global::Ayllu.Github.Client.Teams.Item.Discussions.Item.WithDiscussion_numberPatchRequestBody body, Action> requestConfiguration = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + [Obsolete("")] + public global::Ayllu.Github.Client.Teams.Item.Discussions.Item.WithDiscussion_numberItemRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Teams.Item.Discussions.Item.WithDiscussion_numberItemRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithDiscussion_numberItemRequestBuilderDeleteRequestConfiguration : RequestConfiguration + { + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithDiscussion_numberItemRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithDiscussion_numberItemRequestBuilderPatchRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Teams/Item/Discussions/Item/WithDiscussion_numberPatchRequestBody.cs b/src/Ayllu.Github.Client/Github/Client/Teams/Item/Discussions/Item/WithDiscussion_numberPatchRequestBody.cs new file mode 100644 index 0000000..225bead --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Teams/Item/Discussions/Item/WithDiscussion_numberPatchRequestBody.cs @@ -0,0 +1,75 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Teams.Item.Discussions.Item +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class WithDiscussion_numberPatchRequestBody : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The discussion post's body text. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Body { get; set; } +#nullable restore +#else + public string Body { get; set; } +#endif + /// The discussion post's title. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Title { get; set; } +#nullable restore +#else + public string Title { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public WithDiscussion_numberPatchRequestBody() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Teams.Item.Discussions.Item.WithDiscussion_numberPatchRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Teams.Item.Discussions.Item.WithDiscussion_numberPatchRequestBody(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "body", n => { Body = n.GetStringValue(); } }, + { "title", n => { Title = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("body", Body); + writer.WriteStringValue("title", Title); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Teams/Item/Invitations/InvitationsRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Teams/Item/Invitations/InvitationsRequestBuilder.cs new file mode 100644 index 0000000..fe62d34 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Teams/Item/Invitations/InvitationsRequestBuilder.cs @@ -0,0 +1,110 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Teams.Item.Invitations +{ + /// + /// Builds and executes requests for operations under \teams\{team_id}\invitations + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class InvitationsRequestBuilder : BaseRequestBuilder + { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public InvitationsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/teams/{team_id}/invitations{?page*,per_page*}", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public InvitationsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/teams/{team_id}/invitations{?page*,per_page*}", rawUrl) + { + } + /// + /// > [!WARNING]> **Endpoint closing down notice:** This endpoint route is closing down 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/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 member, the `login` field in the return hash will be `null`. + /// API method documentation + /// + /// A List<global::Ayllu.Github.Client.Models.OrganizationInvitation> + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + [Obsolete("")] +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task?> GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task> GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var collectionResult = await RequestAdapter.SendCollectionAsync(requestInfo, global::Ayllu.Github.Client.Models.OrganizationInvitation.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false); + return collectionResult?.AsList(); + } + /// + /// > [!WARNING]> **Endpoint closing down notice:** This endpoint route is closing down 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/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 member, the `login` field in the return hash will be `null`. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. + [Obsolete("")] +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + [Obsolete("")] + public global::Ayllu.Github.Client.Teams.Item.Invitations.InvitationsRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Teams.Item.Invitations.InvitationsRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// > [!WARNING]> **Endpoint closing down notice:** This endpoint route is closing down 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/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 member, the `login` field in the return hash will be `null`. + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class InvitationsRequestBuilderGetQueryParameters + { + /// The page number of the results to fetch. For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." + [QueryParameter("page")] + public int? Page { get; set; } + /// The number of results per page (max 100). For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." + [QueryParameter("per_page")] + public int? PerPage { get; set; } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class InvitationsRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Teams/Item/Members/GetRoleQueryParameterType.cs b/src/Ayllu.Github.Client/Github/Client/Teams/Item/Members/GetRoleQueryParameterType.cs new file mode 100644 index 0000000..d764146 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Teams/Item/Members/GetRoleQueryParameterType.cs @@ -0,0 +1,24 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Teams.Item.Members +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public enum GetRoleQueryParameterType + #pragma warning restore CS1591 + { + [EnumMember(Value = "member")] + #pragma warning disable CS1591 + Member, + #pragma warning restore CS1591 + [EnumMember(Value = "maintainer")] + #pragma warning disable CS1591 + Maintainer, + #pragma warning restore CS1591 + [EnumMember(Value = "all")] + #pragma warning disable CS1591 + All, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Teams/Item/Members/Item/WithUsernameItemRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Teams/Item/Members/Item/WithUsernameItemRequestBuilder.cs new file mode 100644 index 0000000..b46b2d2 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Teams/Item/Members/Item/WithUsernameItemRequestBuilder.cs @@ -0,0 +1,192 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Teams.Item.Members.Item +{ + /// + /// Builds and executes requests for operations under \teams\{team_id}\members\{username} + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithUsernameItemRequestBuilder : BaseRequestBuilder + { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public WithUsernameItemRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/teams/{team_id}/members/{username}", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public WithUsernameItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/teams/{team_id}/members/{username}", rawUrl) + { + } + /// + /// The "Remove team member" endpoint (described below) is closing down.We recommend using the [Remove team membership for a user](https://docs.github.com/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/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 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](https://docs.github.com/articles/synchronizing-teams-between-your-identity-provider-and-github/)." + /// API method documentation + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + [Obsolete("")] +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task DeleteAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task DeleteAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToDeleteRequestInformation(requestConfiguration); + await RequestAdapter.SendNoContentAsync(requestInfo, default, cancellationToken).ConfigureAwait(false); + } + /// + /// The "Get team member" endpoint (described below) is closing down.We recommend using the [Get team membership for a user](https://docs.github.com/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. + /// API method documentation + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + [Obsolete("")] +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + await RequestAdapter.SendNoContentAsync(requestInfo, default, cancellationToken).ConfigureAwait(false); + } + /// + /// The "Add team member" endpoint (described below) is closing down.We recommend using the [Add or update team membership for a user](https://docs.github.com/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/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 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](https://docs.github.com/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/rest/guides/getting-started-with-the-rest-api#http-method)." + /// API method documentation + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 403 status code + [Obsolete("")] +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PutAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task PutAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToPutRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "403", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + }; + await RequestAdapter.SendNoContentAsync(requestInfo, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// The "Remove team member" endpoint (described below) is closing down.We recommend using the [Remove team membership for a user](https://docs.github.com/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/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 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](https://docs.github.com/articles/synchronizing-teams-between-your-identity-provider-and-github/)." + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. + [Obsolete("")] +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToDeleteRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToDeleteRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.DELETE, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + return requestInfo; + } + /// + /// The "Get team member" endpoint (described below) is closing down.We recommend using the [Get team membership for a user](https://docs.github.com/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. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. + [Obsolete("")] +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + return requestInfo; + } + /// + /// The "Add team member" endpoint (described below) is closing down.We recommend using the [Add or update team membership for a user](https://docs.github.com/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/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 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](https://docs.github.com/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/rest/guides/getting-started-with-the-rest-api#http-method)." + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. + [Obsolete("")] +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPutRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToPutRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.PUT, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + [Obsolete("")] + public global::Ayllu.Github.Client.Teams.Item.Members.Item.WithUsernameItemRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Teams.Item.Members.Item.WithUsernameItemRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithUsernameItemRequestBuilderDeleteRequestConfiguration : RequestConfiguration + { + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithUsernameItemRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithUsernameItemRequestBuilderPutRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Teams/Item/Members/MembersRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Teams/Item/Members/MembersRequestBuilder.cs new file mode 100644 index 0000000..7dfa28f --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Teams/Item/Members/MembersRequestBuilder.cs @@ -0,0 +1,143 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Ayllu.Github.Client.Teams.Item.Members.Item; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Teams.Item.Members +{ + /// + /// Builds and executes requests for operations under \teams\{team_id}\members + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class MembersRequestBuilder : BaseRequestBuilder + { + /// Gets an item from the Ayllu.Github.Client.teams.item.members.item collection + /// The handle for the GitHub user account. + /// A + [Obsolete("")] + public global::Ayllu.Github.Client.Teams.Item.Members.Item.WithUsernameItemRequestBuilder this[string position] + { + get + { + var urlTplParams = new Dictionary(PathParameters); + urlTplParams.Add("username", position); + return new global::Ayllu.Github.Client.Teams.Item.Members.Item.WithUsernameItemRequestBuilder(urlTplParams, RequestAdapter); + } + } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public MembersRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/teams/{team_id}/members{?page*,per_page*,role*}", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public MembersRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/teams/{team_id}/members{?page*,per_page*,role*}", rawUrl) + { + } + /// + /// > [!WARNING]> **Endpoint closing down notice:** This endpoint route is closing down 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/rest/teams/members#list-team-members) endpoint.Team members will include the members of child teams. + /// API method documentation + /// + /// A List<global::Ayllu.Github.Client.Models.SimpleUser> + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 404 status code + [Obsolete("")] +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task?> GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task> GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "404", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + }; + var collectionResult = await RequestAdapter.SendCollectionAsync(requestInfo, global::Ayllu.Github.Client.Models.SimpleUser.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + return collectionResult?.AsList(); + } + /// + /// > [!WARNING]> **Endpoint closing down notice:** This endpoint route is closing down 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/rest/teams/members#list-team-members) endpoint.Team members will include the members of child teams. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. + [Obsolete("")] +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + [Obsolete("")] + public global::Ayllu.Github.Client.Teams.Item.Members.MembersRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Teams.Item.Members.MembersRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// > [!WARNING]> **Endpoint closing down notice:** This endpoint route is closing down 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/rest/teams/members#list-team-members) endpoint.Team members will include the members of child teams. + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class MembersRequestBuilderGetQueryParameters + { + /// The page number of the results to fetch. For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." + [QueryParameter("page")] + public int? Page { get; set; } + /// The number of results per page (max 100). For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." + [QueryParameter("per_page")] + public int? PerPage { get; set; } + /// Filters members returned by their role in the team. + [Obsolete("This property is deprecated, use RoleAsGetRoleQueryParameterType instead")] +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("role")] + public string? Role { get; set; } +#nullable restore +#else + [QueryParameter("role")] + public string Role { get; set; } +#endif + /// Filters members returned by their role in the team. + [QueryParameter("role")] + public global::Ayllu.Github.Client.Teams.Item.Members.GetRoleQueryParameterType? RoleAsGetRoleQueryParameterType { get; set; } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class MembersRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Teams/Item/Memberships/Item/WithUsernameItemRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Teams/Item/Memberships/Item/WithUsernameItemRequestBuilder.cs new file mode 100644 index 0000000..7e87ef8 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Teams/Item/Memberships/Item/WithUsernameItemRequestBuilder.cs @@ -0,0 +1,205 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Teams.Item.Memberships.Item +{ + /// + /// Builds and executes requests for operations under \teams\{team_id}\memberships\{username} + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithUsernameItemRequestBuilder : BaseRequestBuilder + { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public WithUsernameItemRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/teams/{team_id}/memberships/{username}", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public WithUsernameItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/teams/{team_id}/memberships/{username}", rawUrl) + { + } + /// + /// > [!WARNING]> **Endpoint closing down notice:** This endpoint route is closing down 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/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/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 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](https://docs.github.com/articles/synchronizing-teams-between-your-identity-provider-and-github/)." + /// API method documentation + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + [Obsolete("")] +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task DeleteAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task DeleteAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToDeleteRequestInformation(requestConfiguration); + await RequestAdapter.SendNoContentAsync(requestInfo, default, cancellationToken).ConfigureAwait(false); + } + /// + /// > [!WARNING]> **Endpoint closing down notice:** This endpoint route is closing down 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/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/rest/teams/teams#create-a-team). + /// API method documentation + /// + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 404 status code + [Obsolete("")] +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "404", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Models.TeamMembership.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// > [!WARNING]> **Endpoint closing down notice:** This endpoint route is closing down 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/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/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 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](https://docs.github.com/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. + /// API method documentation + /// + /// A + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 404 status code + [Obsolete("")] +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PutAsync(global::Ayllu.Github.Client.Teams.Item.Memberships.Item.WithUsernamePutRequestBody body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task PutAsync(global::Ayllu.Github.Client.Teams.Item.Memberships.Item.WithUsernamePutRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPutRequestInformation(body, requestConfiguration); + var errorMapping = new Dictionary> + { + { "404", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Models.TeamMembership.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// > [!WARNING]> **Endpoint closing down notice:** This endpoint route is closing down 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/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/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 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](https://docs.github.com/articles/synchronizing-teams-between-your-identity-provider-and-github/)." + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. + [Obsolete("")] +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToDeleteRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToDeleteRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.DELETE, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + return requestInfo; + } + /// + /// > [!WARNING]> **Endpoint closing down notice:** This endpoint route is closing down 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/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/rest/teams/teams#create-a-team). + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. + [Obsolete("")] +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// > [!WARNING]> **Endpoint closing down notice:** This endpoint route is closing down 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/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/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 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](https://docs.github.com/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. + /// + /// A + /// The request body + /// Configuration for the request such as headers, query parameters, and middleware options. + [Obsolete("")] +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPutRequestInformation(global::Ayllu.Github.Client.Teams.Item.Memberships.Item.WithUsernamePutRequestBody body, Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToPutRequestInformation(global::Ayllu.Github.Client.Teams.Item.Memberships.Item.WithUsernamePutRequestBody body, Action> requestConfiguration = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation(Method.PUT, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + [Obsolete("")] + public global::Ayllu.Github.Client.Teams.Item.Memberships.Item.WithUsernameItemRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Teams.Item.Memberships.Item.WithUsernameItemRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithUsernameItemRequestBuilderDeleteRequestConfiguration : RequestConfiguration + { + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithUsernameItemRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithUsernameItemRequestBuilderPutRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Teams/Item/Memberships/Item/WithUsernamePutRequestBody.cs b/src/Ayllu.Github.Client/Github/Client/Teams/Item/Memberships/Item/WithUsernamePutRequestBody.cs new file mode 100644 index 0000000..4f43a87 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Teams/Item/Memberships/Item/WithUsernamePutRequestBody.cs @@ -0,0 +1,60 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Teams.Item.Memberships.Item +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class WithUsernamePutRequestBody : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The role that this user should have in the team. + public global::Ayllu.Github.Client.Teams.Item.Memberships.Item.WithUsernamePutRequestBody_role? Role { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public WithUsernamePutRequestBody() + { + AdditionalData = new Dictionary(); + Role = global::Ayllu.Github.Client.Teams.Item.Memberships.Item.WithUsernamePutRequestBody_role.Member; + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Teams.Item.Memberships.Item.WithUsernamePutRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Teams.Item.Memberships.Item.WithUsernamePutRequestBody(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "role", n => { Role = n.GetEnumValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteEnumValue("role", Role); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Teams/Item/Memberships/Item/WithUsernamePutRequestBody_role.cs b/src/Ayllu.Github.Client/Github/Client/Teams/Item/Memberships/Item/WithUsernamePutRequestBody_role.cs new file mode 100644 index 0000000..39d1042 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Teams/Item/Memberships/Item/WithUsernamePutRequestBody_role.cs @@ -0,0 +1,19 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Teams.Item.Memberships.Item +{ + /// The role that this user should have in the team. + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public enum WithUsernamePutRequestBody_role + { + [EnumMember(Value = "member")] + #pragma warning disable CS1591 + Member, + #pragma warning restore CS1591 + [EnumMember(Value = "maintainer")] + #pragma warning disable CS1591 + Maintainer, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Teams/Item/Memberships/MembershipsRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Teams/Item/Memberships/MembershipsRequestBuilder.cs new file mode 100644 index 0000000..02b1105 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Teams/Item/Memberships/MembershipsRequestBuilder.cs @@ -0,0 +1,49 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Teams.Item.Memberships.Item; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System; +namespace Ayllu.Github.Client.Teams.Item.Memberships +{ + /// + /// Builds and executes requests for operations under \teams\{team_id}\memberships + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class MembershipsRequestBuilder : BaseRequestBuilder + { + /// Gets an item from the Ayllu.Github.Client.teams.item.memberships.item collection + /// The handle for the GitHub user account. + /// A + [Obsolete("")] + public global::Ayllu.Github.Client.Teams.Item.Memberships.Item.WithUsernameItemRequestBuilder this[string position] + { + get + { + var urlTplParams = new Dictionary(PathParameters); + urlTplParams.Add("username", position); + return new global::Ayllu.Github.Client.Teams.Item.Memberships.Item.WithUsernameItemRequestBuilder(urlTplParams, RequestAdapter); + } + } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public MembershipsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/teams/{team_id}/memberships", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public MembershipsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/teams/{team_id}/memberships", rawUrl) + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Teams/Item/Projects/Item/WithProject_403Error.cs b/src/Ayllu.Github.Client/Github/Client/Teams/Item/Projects/Item/WithProject_403Error.cs new file mode 100644 index 0000000..06a4455 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Teams/Item/Projects/Item/WithProject_403Error.cs @@ -0,0 +1,78 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Teams.Item.Projects.Item +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class WithProject_403Error : ApiException, IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The documentation_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? DocumentationUrl { get; set; } +#nullable restore +#else + public string DocumentationUrl { get; set; } +#endif + /// The primary error message. + public override string Message { get => MessageEscaped ?? string.Empty; } + /// The message property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? MessageEscaped { get; set; } +#nullable restore +#else + public string MessageEscaped { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public WithProject_403Error() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Teams.Item.Projects.Item.WithProject_403Error CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Teams.Item.Projects.Item.WithProject_403Error(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "documentation_url", n => { DocumentationUrl = n.GetStringValue(); } }, + { "message", n => { MessageEscaped = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("documentation_url", DocumentationUrl); + writer.WriteStringValue("message", MessageEscaped); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Teams/Item/Projects/Item/WithProject_ItemRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Teams/Item/Projects/Item/WithProject_ItemRequestBuilder.cs new file mode 100644 index 0000000..6412fcf --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Teams/Item/Projects/Item/WithProject_ItemRequestBuilder.cs @@ -0,0 +1,211 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Teams.Item.Projects.Item +{ + /// + /// Builds and executes requests for operations under \teams\{team_id}\projects\{project_id} + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithProject_ItemRequestBuilder : BaseRequestBuilder + { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public WithProject_ItemRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/teams/{team_id}/projects/{project_id}", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public WithProject_ItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/teams/{team_id}/projects/{project_id}", rawUrl) + { + } + /// + /// > [!WARNING]> **Closing down notice:** Projects (classic) is being deprecated in favor of the new Projects experience.> See the [changelog](https://github.blog/changelog/2024-05-23-sunset-notice-projects-classic/) for more information. + /// API method documentation + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 404 status code + /// When receiving a 422 status code + [Obsolete("")] +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task DeleteAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task DeleteAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToDeleteRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "404", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "422", global::Ayllu.Github.Client.Models.ValidationError.CreateFromDiscriminatorValue }, + }; + await RequestAdapter.SendNoContentAsync(requestInfo, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// > [!WARNING]> **Closing down notice:** Projects (classic) is being deprecated in favor of the new Projects experience.> See the [changelog](https://github.blog/changelog/2024-05-23-sunset-notice-projects-classic/) for more information. + /// API method documentation + /// + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + [Obsolete("")] +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Models.TeamProject.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false); + } + /// + /// > [!WARNING]> **Closing down notice:** Projects (classic) is being deprecated in favor of the new Projects experience.> See the [changelog](https://github.blog/changelog/2024-05-23-sunset-notice-projects-classic/) for more information. + /// API method documentation + /// + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 403 status code + /// When receiving a 404 status code + /// When receiving a 422 status code + [Obsolete("")] +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PutAsync(global::Ayllu.Github.Client.Teams.Item.Projects.Item.WithProject_PutRequestBody body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task PutAsync(global::Ayllu.Github.Client.Teams.Item.Projects.Item.WithProject_PutRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPutRequestInformation(body, requestConfiguration); + var errorMapping = new Dictionary> + { + { "403", global::Ayllu.Github.Client.Teams.Item.Projects.Item.WithProject_403Error.CreateFromDiscriminatorValue }, + { "404", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "422", global::Ayllu.Github.Client.Models.ValidationError.CreateFromDiscriminatorValue }, + }; + await RequestAdapter.SendNoContentAsync(requestInfo, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// > [!WARNING]> **Closing down notice:** Projects (classic) is being deprecated in favor of the new Projects experience.> See the [changelog](https://github.blog/changelog/2024-05-23-sunset-notice-projects-classic/) for more information. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. + [Obsolete("")] +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToDeleteRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToDeleteRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.DELETE, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// > [!WARNING]> **Closing down notice:** Projects (classic) is being deprecated in favor of the new Projects experience.> See the [changelog](https://github.blog/changelog/2024-05-23-sunset-notice-projects-classic/) for more information. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. + [Obsolete("")] +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// > [!WARNING]> **Closing down notice:** Projects (classic) is being deprecated in favor of the new Projects experience.> See the [changelog](https://github.blog/changelog/2024-05-23-sunset-notice-projects-classic/) for more information. + /// + /// A + /// The request body + /// Configuration for the request such as headers, query parameters, and middleware options. + [Obsolete("")] +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPutRequestInformation(global::Ayllu.Github.Client.Teams.Item.Projects.Item.WithProject_PutRequestBody body, Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToPutRequestInformation(global::Ayllu.Github.Client.Teams.Item.Projects.Item.WithProject_PutRequestBody body, Action> requestConfiguration = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation(Method.PUT, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + [Obsolete("")] + public global::Ayllu.Github.Client.Teams.Item.Projects.Item.WithProject_ItemRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Teams.Item.Projects.Item.WithProject_ItemRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithProject_ItemRequestBuilderDeleteRequestConfiguration : RequestConfiguration + { + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithProject_ItemRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithProject_ItemRequestBuilderPutRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Teams/Item/Projects/Item/WithProject_PutRequestBody.cs b/src/Ayllu.Github.Client/Github/Client/Teams/Item/Projects/Item/WithProject_PutRequestBody.cs new file mode 100644 index 0000000..68b2449 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Teams/Item/Projects/Item/WithProject_PutRequestBody.cs @@ -0,0 +1,59 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Teams.Item.Projects.Item +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class WithProject_PutRequestBody : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The permission to grant to the team for this project. Default: the team's `permission` attribute will be used to determine what permission to grant the team on this project. Note that, if you choose not to pass any parameters, you'll need to set `Content-Length` to zero when calling this endpoint. For more information, see "[HTTP method](https://docs.github.com/rest/guides/getting-started-with-the-rest-api#http-method)." + public global::Ayllu.Github.Client.Teams.Item.Projects.Item.WithProject_PutRequestBody_permission? Permission { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public WithProject_PutRequestBody() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Teams.Item.Projects.Item.WithProject_PutRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Teams.Item.Projects.Item.WithProject_PutRequestBody(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "permission", n => { Permission = n.GetEnumValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteEnumValue("permission", Permission); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Teams/Item/Projects/Item/WithProject_PutRequestBody_permission.cs b/src/Ayllu.Github.Client/Github/Client/Teams/Item/Projects/Item/WithProject_PutRequestBody_permission.cs new file mode 100644 index 0000000..aa8af5f --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Teams/Item/Projects/Item/WithProject_PutRequestBody_permission.cs @@ -0,0 +1,23 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Teams.Item.Projects.Item +{ + /// The permission to grant to the team for this project. Default: the team's `permission` attribute will be used to determine what permission to grant the team on this project. Note that, if you choose not to pass any parameters, you'll need to set `Content-Length` to zero when calling this endpoint. For more information, see "[HTTP method](https://docs.github.com/rest/guides/getting-started-with-the-rest-api#http-method)." + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public enum WithProject_PutRequestBody_permission + { + [EnumMember(Value = "read")] + #pragma warning disable CS1591 + Read, + #pragma warning restore CS1591 + [EnumMember(Value = "write")] + #pragma warning disable CS1591 + Write, + #pragma warning restore CS1591 + [EnumMember(Value = "admin")] + #pragma warning disable CS1591 + Admin, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Teams/Item/Projects/ProjectsRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Teams/Item/Projects/ProjectsRequestBuilder.cs new file mode 100644 index 0000000..83691b9 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Teams/Item/Projects/ProjectsRequestBuilder.cs @@ -0,0 +1,142 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Ayllu.Github.Client.Teams.Item.Projects.Item; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Teams.Item.Projects +{ + /// + /// Builds and executes requests for operations under \teams\{team_id}\projects + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class ProjectsRequestBuilder : BaseRequestBuilder + { + /// Gets an item from the Ayllu.Github.Client.teams.item.projects.item collection + /// The unique identifier of the project. + /// A + [Obsolete("")] + public global::Ayllu.Github.Client.Teams.Item.Projects.Item.WithProject_ItemRequestBuilder this[int position] + { + get + { + var urlTplParams = new Dictionary(PathParameters); + urlTplParams.Add("project_id", position); + return new global::Ayllu.Github.Client.Teams.Item.Projects.Item.WithProject_ItemRequestBuilder(urlTplParams, RequestAdapter); + } + } + /// Gets an item from the Ayllu.Github.Client.teams.item.projects.item collection + /// The unique identifier of the project. + /// A + [Obsolete("This indexer is deprecated and will be removed in the next major version. Use the one with the typed parameter instead.")] + public global::Ayllu.Github.Client.Teams.Item.Projects.Item.WithProject_ItemRequestBuilder this[string position] + { + get + { + var urlTplParams = new Dictionary(PathParameters); + if (!string.IsNullOrWhiteSpace(position)) urlTplParams.Add("project_id", position); + return new global::Ayllu.Github.Client.Teams.Item.Projects.Item.WithProject_ItemRequestBuilder(urlTplParams, RequestAdapter); + } + } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public ProjectsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/teams/{team_id}/projects{?page*,per_page*}", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public ProjectsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/teams/{team_id}/projects{?page*,per_page*}", rawUrl) + { + } + /// + /// > [!WARNING]> **Closing down notice:** Projects (classic) is being deprecated in favor of the new Projects experience.> See the [changelog](https://github.blog/changelog/2024-05-23-sunset-notice-projects-classic/) for more information. + /// API method documentation + /// + /// A List<global::Ayllu.Github.Client.Models.TeamProject> + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 404 status code + [Obsolete("")] +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task?> GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task> GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "404", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + }; + var collectionResult = await RequestAdapter.SendCollectionAsync(requestInfo, global::Ayllu.Github.Client.Models.TeamProject.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + return collectionResult?.AsList(); + } + /// + /// > [!WARNING]> **Closing down notice:** Projects (classic) is being deprecated in favor of the new Projects experience.> See the [changelog](https://github.blog/changelog/2024-05-23-sunset-notice-projects-classic/) for more information. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. + [Obsolete("")] +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + [Obsolete("")] + public global::Ayllu.Github.Client.Teams.Item.Projects.ProjectsRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Teams.Item.Projects.ProjectsRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// > [!WARNING]> **Closing down notice:** Projects (classic) is being deprecated in favor of the new Projects experience.> See the [changelog](https://github.blog/changelog/2024-05-23-sunset-notice-projects-classic/) for more information. + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class ProjectsRequestBuilderGetQueryParameters + { + /// The page number of the results to fetch. For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." + [QueryParameter("page")] + public int? Page { get; set; } + /// The number of results per page (max 100). For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." + [QueryParameter("per_page")] + public int? PerPage { get; set; } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class ProjectsRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Teams/Item/Repos/Item/Item/WithRepoItemRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Teams/Item/Repos/Item/Item/WithRepoItemRequestBuilder.cs new file mode 100644 index 0000000..cf0c393 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Teams/Item/Repos/Item/Item/WithRepoItemRequestBuilder.cs @@ -0,0 +1,201 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Teams.Item.Repos.Item.Item +{ + /// + /// Builds and executes requests for operations under \teams\{team_id}\repos\{owner}\{repo} + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithRepoItemRequestBuilder : BaseRequestBuilder + { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public WithRepoItemRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/teams/{team_id}/repos/{owner}/{repo}", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public WithRepoItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/teams/{team_id}/repos/{owner}/{repo}", rawUrl) + { + } + /// + /// > [!WARNING]> **Endpoint closing down notice:** This endpoint route is closing down 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/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. + /// API method documentation + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + [Obsolete("")] +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task DeleteAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task DeleteAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToDeleteRequestInformation(requestConfiguration); + await RequestAdapter.SendNoContentAsync(requestInfo, default, cancellationToken).ConfigureAwait(false); + } + /// + /// > [!WARNING]> **Endpoint closing down notice:** This endpoint route is closing down and will be removed from the Teams API. We recommend migrating your existing code to use the new [Check team permissions for a repository](https://docs.github.com/rest/teams/teams#check-team-permissions-for-a-repository) endpoint.> [!NOTE]> Repositories inherited through a parent team will also be checked.You can also get information about the specified repository, including what permissions the team grants on it, by passing the following custom [media type](https://docs.github.com/rest/using-the-rest-api/getting-started-with-the-rest-api#media-types/) via the `Accept` header: + /// API method documentation + /// + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + [Obsolete("")] +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Models.TeamRepository.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false); + } + /// + /// > [!WARNING]> **Endpoint closing down notice:** This endpoint route is closing down 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/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/rest/guides/getting-started-with-the-rest-api#http-method)." + /// API method documentation + /// + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 403 status code + /// When receiving a 422 status code + [Obsolete("")] +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PutAsync(global::Ayllu.Github.Client.Teams.Item.Repos.Item.Item.WithRepoPutRequestBody body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task PutAsync(global::Ayllu.Github.Client.Teams.Item.Repos.Item.Item.WithRepoPutRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPutRequestInformation(body, requestConfiguration); + var errorMapping = new Dictionary> + { + { "403", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "422", global::Ayllu.Github.Client.Models.ValidationError.CreateFromDiscriminatorValue }, + }; + await RequestAdapter.SendNoContentAsync(requestInfo, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// > [!WARNING]> **Endpoint closing down notice:** This endpoint route is closing down 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/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. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. + [Obsolete("")] +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToDeleteRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToDeleteRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.DELETE, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + return requestInfo; + } + /// + /// > [!WARNING]> **Endpoint closing down notice:** This endpoint route is closing down and will be removed from the Teams API. We recommend migrating your existing code to use the new [Check team permissions for a repository](https://docs.github.com/rest/teams/teams#check-team-permissions-for-a-repository) endpoint.> [!NOTE]> Repositories inherited through a parent team will also be checked.You can also get information about the specified repository, including what permissions the team grants on it, by passing the following custom [media type](https://docs.github.com/rest/using-the-rest-api/getting-started-with-the-rest-api#media-types/) via the `Accept` header: + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. + [Obsolete("")] +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// > [!WARNING]> **Endpoint closing down notice:** This endpoint route is closing down 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/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/rest/guides/getting-started-with-the-rest-api#http-method)." + /// + /// A + /// The request body + /// Configuration for the request such as headers, query parameters, and middleware options. + [Obsolete("")] +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPutRequestInformation(global::Ayllu.Github.Client.Teams.Item.Repos.Item.Item.WithRepoPutRequestBody body, Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToPutRequestInformation(global::Ayllu.Github.Client.Teams.Item.Repos.Item.Item.WithRepoPutRequestBody body, Action> requestConfiguration = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation(Method.PUT, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + [Obsolete("")] + public global::Ayllu.Github.Client.Teams.Item.Repos.Item.Item.WithRepoItemRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Teams.Item.Repos.Item.Item.WithRepoItemRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithRepoItemRequestBuilderDeleteRequestConfiguration : RequestConfiguration + { + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithRepoItemRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithRepoItemRequestBuilderPutRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Teams/Item/Repos/Item/Item/WithRepoPutRequestBody.cs b/src/Ayllu.Github.Client/Github/Client/Teams/Item/Repos/Item/Item/WithRepoPutRequestBody.cs new file mode 100644 index 0000000..00b6507 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Teams/Item/Repos/Item/Item/WithRepoPutRequestBody.cs @@ -0,0 +1,59 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Teams.Item.Repos.Item.Item +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class WithRepoPutRequestBody : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// 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. + public global::Ayllu.Github.Client.Teams.Item.Repos.Item.Item.WithRepoPutRequestBody_permission? Permission { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public WithRepoPutRequestBody() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Teams.Item.Repos.Item.Item.WithRepoPutRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Teams.Item.Repos.Item.Item.WithRepoPutRequestBody(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "permission", n => { Permission = n.GetEnumValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteEnumValue("permission", Permission); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Teams/Item/Repos/Item/Item/WithRepoPutRequestBody_permission.cs b/src/Ayllu.Github.Client/Github/Client/Teams/Item/Repos/Item/Item/WithRepoPutRequestBody_permission.cs new file mode 100644 index 0000000..df42b81 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Teams/Item/Repos/Item/Item/WithRepoPutRequestBody_permission.cs @@ -0,0 +1,23 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Teams.Item.Repos.Item.Item +{ + /// 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. + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public enum WithRepoPutRequestBody_permission + { + [EnumMember(Value = "pull")] + #pragma warning disable CS1591 + Pull, + #pragma warning restore CS1591 + [EnumMember(Value = "push")] + #pragma warning disable CS1591 + Push, + #pragma warning restore CS1591 + [EnumMember(Value = "admin")] + #pragma warning disable CS1591 + Admin, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Teams/Item/Repos/Item/WithOwnerItemRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Teams/Item/Repos/Item/WithOwnerItemRequestBuilder.cs new file mode 100644 index 0000000..e830c16 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Teams/Item/Repos/Item/WithOwnerItemRequestBuilder.cs @@ -0,0 +1,49 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Teams.Item.Repos.Item.Item; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System; +namespace Ayllu.Github.Client.Teams.Item.Repos.Item +{ + /// + /// Builds and executes requests for operations under \teams\{team_id}\repos\{owner} + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithOwnerItemRequestBuilder : BaseRequestBuilder + { + /// Gets an item from the Ayllu.Github.Client.teams.item.repos.item.item collection + /// Unique identifier of the item + /// A + [Obsolete("")] + public global::Ayllu.Github.Client.Teams.Item.Repos.Item.Item.WithRepoItemRequestBuilder this[string position] + { + get + { + var urlTplParams = new Dictionary(PathParameters); + urlTplParams.Add("repo", position); + return new global::Ayllu.Github.Client.Teams.Item.Repos.Item.Item.WithRepoItemRequestBuilder(urlTplParams, RequestAdapter); + } + } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public WithOwnerItemRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/teams/{team_id}/repos/{owner}", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public WithOwnerItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/teams/{team_id}/repos/{owner}", rawUrl) + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Teams/Item/Repos/ReposRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Teams/Item/Repos/ReposRequestBuilder.cs new file mode 100644 index 0000000..4a142fd --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Teams/Item/Repos/ReposRequestBuilder.cs @@ -0,0 +1,128 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Ayllu.Github.Client.Teams.Item.Repos.Item; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Teams.Item.Repos +{ + /// + /// Builds and executes requests for operations under \teams\{team_id}\repos + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class ReposRequestBuilder : BaseRequestBuilder + { + /// Gets an item from the Ayllu.Github.Client.teams.item.repos.item collection + /// Unique identifier of the item + /// A + public global::Ayllu.Github.Client.Teams.Item.Repos.Item.WithOwnerItemRequestBuilder this[string position] + { + get + { + var urlTplParams = new Dictionary(PathParameters); + urlTplParams.Add("owner", position); + return new global::Ayllu.Github.Client.Teams.Item.Repos.Item.WithOwnerItemRequestBuilder(urlTplParams, RequestAdapter); + } + } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public ReposRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/teams/{team_id}/repos{?page*,per_page*}", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public ReposRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/teams/{team_id}/repos{?page*,per_page*}", rawUrl) + { + } + /// + /// > [!WARNING]> **Endpoint closing down notice:** This endpoint route is closing down 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/rest/teams/teams#list-team-repositories) endpoint. + /// API method documentation + /// + /// A List<global::Ayllu.Github.Client.Models.MinimalRepository> + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 404 status code + [Obsolete("")] +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task?> GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task> GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "404", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + }; + var collectionResult = await RequestAdapter.SendCollectionAsync(requestInfo, global::Ayllu.Github.Client.Models.MinimalRepository.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + return collectionResult?.AsList(); + } + /// + /// > [!WARNING]> **Endpoint closing down notice:** This endpoint route is closing down 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/rest/teams/teams#list-team-repositories) endpoint. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. + [Obsolete("")] +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + [Obsolete("")] + public global::Ayllu.Github.Client.Teams.Item.Repos.ReposRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Teams.Item.Repos.ReposRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// > [!WARNING]> **Endpoint closing down notice:** This endpoint route is closing down 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/rest/teams/teams#list-team-repositories) endpoint. + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class ReposRequestBuilderGetQueryParameters + { + /// The page number of the results to fetch. For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." + [QueryParameter("page")] + public int? Page { get; set; } + /// The number of results per page (max 100). For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." + [QueryParameter("per_page")] + public int? PerPage { get; set; } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class ReposRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Teams/Item/Teams/TeamsRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Teams/Item/Teams/TeamsRequestBuilder.cs new file mode 100644 index 0000000..b5d42f4 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Teams/Item/Teams/TeamsRequestBuilder.cs @@ -0,0 +1,119 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Teams.Item.Teams +{ + /// + /// Builds and executes requests for operations under \teams\{team_id}\teams + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class TeamsRequestBuilder : BaseRequestBuilder + { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public TeamsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/teams/{team_id}/teams{?page*,per_page*}", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public TeamsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/teams/{team_id}/teams{?page*,per_page*}", rawUrl) + { + } + /// + /// > [!WARNING]> **Endpoint closing down notice:** This endpoint route is closing down 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/rest/teams/teams#list-child-teams) endpoint. + /// API method documentation + /// + /// A List<global::Ayllu.Github.Client.Models.Team> + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 403 status code + /// When receiving a 404 status code + /// When receiving a 422 status code + [Obsolete("")] +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task?> GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task> GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "403", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "404", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "422", global::Ayllu.Github.Client.Models.ValidationError.CreateFromDiscriminatorValue }, + }; + var collectionResult = await RequestAdapter.SendCollectionAsync(requestInfo, global::Ayllu.Github.Client.Models.Team.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + return collectionResult?.AsList(); + } + /// + /// > [!WARNING]> **Endpoint closing down notice:** This endpoint route is closing down 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/rest/teams/teams#list-child-teams) endpoint. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. + [Obsolete("")] +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + [Obsolete("")] + public global::Ayllu.Github.Client.Teams.Item.Teams.TeamsRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Teams.Item.Teams.TeamsRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// > [!WARNING]> **Endpoint closing down notice:** This endpoint route is closing down 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/rest/teams/teams#list-child-teams) endpoint. + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class TeamsRequestBuilderGetQueryParameters + { + /// The page number of the results to fetch. For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." + [QueryParameter("page")] + public int? Page { get; set; } + /// The number of results per page (max 100). For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." + [QueryParameter("per_page")] + public int? PerPage { get; set; } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class TeamsRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Teams/Item/WithTeam_ItemRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Teams/Item/WithTeam_ItemRequestBuilder.cs new file mode 100644 index 0000000..c1c98cc --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Teams/Item/WithTeam_ItemRequestBuilder.cs @@ -0,0 +1,266 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Ayllu.Github.Client.Teams.Item.Discussions; +using Ayllu.Github.Client.Teams.Item.Invitations; +using Ayllu.Github.Client.Teams.Item.Members; +using Ayllu.Github.Client.Teams.Item.Memberships; +using Ayllu.Github.Client.Teams.Item.Projects; +using Ayllu.Github.Client.Teams.Item.Repos; +using Ayllu.Github.Client.Teams.Item.Teams; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Teams.Item +{ + /// + /// Builds and executes requests for operations under \teams\{team_id} + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithTeam_ItemRequestBuilder : BaseRequestBuilder + { + /// The discussions property + [Obsolete("")] + public global::Ayllu.Github.Client.Teams.Item.Discussions.DiscussionsRequestBuilder Discussions + { + get => new global::Ayllu.Github.Client.Teams.Item.Discussions.DiscussionsRequestBuilder(PathParameters, RequestAdapter); + } + /// The invitations property + [Obsolete("")] + public global::Ayllu.Github.Client.Teams.Item.Invitations.InvitationsRequestBuilder Invitations + { + get => new global::Ayllu.Github.Client.Teams.Item.Invitations.InvitationsRequestBuilder(PathParameters, RequestAdapter); + } + /// The members property + [Obsolete("")] + public global::Ayllu.Github.Client.Teams.Item.Members.MembersRequestBuilder Members + { + get => new global::Ayllu.Github.Client.Teams.Item.Members.MembersRequestBuilder(PathParameters, RequestAdapter); + } + /// The memberships property + [Obsolete("")] + public global::Ayllu.Github.Client.Teams.Item.Memberships.MembershipsRequestBuilder Memberships + { + get => new global::Ayllu.Github.Client.Teams.Item.Memberships.MembershipsRequestBuilder(PathParameters, RequestAdapter); + } + /// The projects property + [Obsolete("")] + public global::Ayllu.Github.Client.Teams.Item.Projects.ProjectsRequestBuilder Projects + { + get => new global::Ayllu.Github.Client.Teams.Item.Projects.ProjectsRequestBuilder(PathParameters, RequestAdapter); + } + /// The repos property + [Obsolete("")] + public global::Ayllu.Github.Client.Teams.Item.Repos.ReposRequestBuilder Repos + { + get => new global::Ayllu.Github.Client.Teams.Item.Repos.ReposRequestBuilder(PathParameters, RequestAdapter); + } + /// The teams property + [Obsolete("")] + public global::Ayllu.Github.Client.Teams.Item.Teams.TeamsRequestBuilder Teams + { + get => new global::Ayllu.Github.Client.Teams.Item.Teams.TeamsRequestBuilder(PathParameters, RequestAdapter); + } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public WithTeam_ItemRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/teams/{team_id}", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public WithTeam_ItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/teams/{team_id}", rawUrl) + { + } + /// + /// > [!WARNING]> **Endpoint closing down notice:** This endpoint route is closing down 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/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. + /// API method documentation + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 404 status code + /// When receiving a 422 status code + [Obsolete("")] +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task DeleteAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task DeleteAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToDeleteRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "404", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "422", global::Ayllu.Github.Client.Models.ValidationError.CreateFromDiscriminatorValue }, + }; + await RequestAdapter.SendNoContentAsync(requestInfo, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// > [!WARNING]> **Endpoint closing down notice:** This endpoint route is closing down 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/rest/teams/teams#get-a-team-by-name) endpoint. + /// API method documentation + /// + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 404 status code + [Obsolete("")] +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "404", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Models.TeamFull.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// > [!WARNING]> **Endpoint closing down notice:** This endpoint route is closing down 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/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`. + /// API method documentation + /// + /// A + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 403 status code + /// When receiving a 404 status code + /// When receiving a 422 status code + [Obsolete("")] +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PatchAsync(global::Ayllu.Github.Client.Teams.Item.WithTeam_PatchRequestBody body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task PatchAsync(global::Ayllu.Github.Client.Teams.Item.WithTeam_PatchRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPatchRequestInformation(body, requestConfiguration); + var errorMapping = new Dictionary> + { + { "403", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "404", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "422", global::Ayllu.Github.Client.Models.ValidationError.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Models.TeamFull.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// > [!WARNING]> **Endpoint closing down notice:** This endpoint route is closing down 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/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. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. + [Obsolete("")] +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToDeleteRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToDeleteRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.DELETE, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// > [!WARNING]> **Endpoint closing down notice:** This endpoint route is closing down 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/rest/teams/teams#get-a-team-by-name) endpoint. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. + [Obsolete("")] +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// > [!WARNING]> **Endpoint closing down notice:** This endpoint route is closing down 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/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`. + /// + /// A + /// The request body + /// Configuration for the request such as headers, query parameters, and middleware options. + [Obsolete("")] +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPatchRequestInformation(global::Ayllu.Github.Client.Teams.Item.WithTeam_PatchRequestBody body, Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToPatchRequestInformation(global::Ayllu.Github.Client.Teams.Item.WithTeam_PatchRequestBody body, Action> requestConfiguration = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + [Obsolete("")] + public global::Ayllu.Github.Client.Teams.Item.WithTeam_ItemRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Teams.Item.WithTeam_ItemRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithTeam_ItemRequestBuilderDeleteRequestConfiguration : RequestConfiguration + { + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithTeam_ItemRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithTeam_ItemRequestBuilderPatchRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Teams/Item/WithTeam_PatchRequestBody.cs b/src/Ayllu.Github.Client/Github/Client/Teams/Item/WithTeam_PatchRequestBody.cs new file mode 100644 index 0000000..882d3f2 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Teams/Item/WithTeam_PatchRequestBody.cs @@ -0,0 +1,92 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Teams.Item +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class WithTeam_PatchRequestBody : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The description of the team. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Description { get; set; } +#nullable restore +#else + public string Description { get; set; } +#endif + /// The name of the team. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Name { get; set; } +#nullable restore +#else + public string Name { get; set; } +#endif + /// 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. + public global::Ayllu.Github.Client.Teams.Item.WithTeam_PatchRequestBody_notification_setting? NotificationSetting { get; set; } + /// The ID of a team to set as the parent team. + public int? ParentTeamId { get; set; } + /// **Closing down notice**. The permission that new repositories will be added to the team with when none is specified. + public global::Ayllu.Github.Client.Teams.Item.WithTeam_PatchRequestBody_permission? Permission { get; set; } + /// 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. + public global::Ayllu.Github.Client.Teams.Item.WithTeam_PatchRequestBody_privacy? Privacy { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public WithTeam_PatchRequestBody() + { + AdditionalData = new Dictionary(); + Permission = global::Ayllu.Github.Client.Teams.Item.WithTeam_PatchRequestBody_permission.Pull; + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Teams.Item.WithTeam_PatchRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Teams.Item.WithTeam_PatchRequestBody(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "description", n => { Description = n.GetStringValue(); } }, + { "name", n => { Name = n.GetStringValue(); } }, + { "notification_setting", n => { NotificationSetting = n.GetEnumValue(); } }, + { "parent_team_id", n => { ParentTeamId = n.GetIntValue(); } }, + { "permission", n => { Permission = n.GetEnumValue(); } }, + { "privacy", n => { Privacy = n.GetEnumValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("description", Description); + writer.WriteStringValue("name", Name); + writer.WriteEnumValue("notification_setting", NotificationSetting); + writer.WriteIntValue("parent_team_id", ParentTeamId); + writer.WriteEnumValue("permission", Permission); + writer.WriteEnumValue("privacy", Privacy); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Teams/Item/WithTeam_PatchRequestBody_notification_setting.cs b/src/Ayllu.Github.Client/Github/Client/Teams/Item/WithTeam_PatchRequestBody_notification_setting.cs new file mode 100644 index 0000000..75f667b --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Teams/Item/WithTeam_PatchRequestBody_notification_setting.cs @@ -0,0 +1,19 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Teams.Item +{ + /// 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. + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public enum WithTeam_PatchRequestBody_notification_setting + { + [EnumMember(Value = "notifications_enabled")] + #pragma warning disable CS1591 + Notifications_enabled, + #pragma warning restore CS1591 + [EnumMember(Value = "notifications_disabled")] + #pragma warning disable CS1591 + Notifications_disabled, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Teams/Item/WithTeam_PatchRequestBody_permission.cs b/src/Ayllu.Github.Client/Github/Client/Teams/Item/WithTeam_PatchRequestBody_permission.cs new file mode 100644 index 0000000..4380308 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Teams/Item/WithTeam_PatchRequestBody_permission.cs @@ -0,0 +1,23 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Teams.Item +{ + /// **Closing down notice**. The permission that new repositories will be added to the team with when none is specified. + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public enum WithTeam_PatchRequestBody_permission + { + [EnumMember(Value = "pull")] + #pragma warning disable CS1591 + Pull, + #pragma warning restore CS1591 + [EnumMember(Value = "push")] + #pragma warning disable CS1591 + Push, + #pragma warning restore CS1591 + [EnumMember(Value = "admin")] + #pragma warning disable CS1591 + Admin, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Teams/Item/WithTeam_PatchRequestBody_privacy.cs b/src/Ayllu.Github.Client/Github/Client/Teams/Item/WithTeam_PatchRequestBody_privacy.cs new file mode 100644 index 0000000..ead8b8e --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Teams/Item/WithTeam_PatchRequestBody_privacy.cs @@ -0,0 +1,19 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Teams.Item +{ + /// 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. + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public enum WithTeam_PatchRequestBody_privacy + { + [EnumMember(Value = "secret")] + #pragma warning disable CS1591 + Secret, + #pragma warning restore CS1591 + [EnumMember(Value = "closed")] + #pragma warning disable CS1591 + Closed, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Teams/TeamsRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Teams/TeamsRequestBuilder.cs new file mode 100644 index 0000000..3d460c9 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Teams/TeamsRequestBuilder.cs @@ -0,0 +1,62 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Teams.Item; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System; +namespace Ayllu.Github.Client.Teams +{ + /// + /// Builds and executes requests for operations under \teams + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class TeamsRequestBuilder : BaseRequestBuilder + { + /// Gets an item from the Ayllu.Github.Client.teams.item collection + /// The unique identifier of the team. + /// A + [Obsolete("")] + public global::Ayllu.Github.Client.Teams.Item.WithTeam_ItemRequestBuilder this[int position] + { + get + { + var urlTplParams = new Dictionary(PathParameters); + urlTplParams.Add("team_id", position); + return new global::Ayllu.Github.Client.Teams.Item.WithTeam_ItemRequestBuilder(urlTplParams, RequestAdapter); + } + } + /// Gets an item from the Ayllu.Github.Client.teams.item collection + /// The unique identifier of the team. + /// A + [Obsolete("This indexer is deprecated and will be removed in the next major version. Use the one with the typed parameter instead.")] + public global::Ayllu.Github.Client.Teams.Item.WithTeam_ItemRequestBuilder this[string position] + { + get + { + var urlTplParams = new Dictionary(PathParameters); + if (!string.IsNullOrWhiteSpace(position)) urlTplParams.Add("team_id", position); + return new global::Ayllu.Github.Client.Teams.Item.WithTeam_ItemRequestBuilder(urlTplParams, RequestAdapter); + } + } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public TeamsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/teams", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public TeamsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/teams", rawUrl) + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/User/Blocks/BlocksRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/User/Blocks/BlocksRequestBuilder.cs new file mode 100644 index 0000000..a191383 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/User/Blocks/BlocksRequestBuilder.cs @@ -0,0 +1,129 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Ayllu.Github.Client.User.Blocks.Item; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.User.Blocks +{ + /// + /// Builds and executes requests for operations under \user\blocks + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class BlocksRequestBuilder : BaseRequestBuilder + { + /// Gets an item from the Ayllu.Github.Client.user.blocks.item collection + /// The handle for the GitHub user account. + /// A + public global::Ayllu.Github.Client.User.Blocks.Item.WithUsernameItemRequestBuilder this[string position] + { + get + { + var urlTplParams = new Dictionary(PathParameters); + urlTplParams.Add("username", position); + return new global::Ayllu.Github.Client.User.Blocks.Item.WithUsernameItemRequestBuilder(urlTplParams, RequestAdapter); + } + } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public BlocksRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/user/blocks{?page*,per_page*}", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public BlocksRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/user/blocks{?page*,per_page*}", rawUrl) + { + } + /// + /// List the users you've blocked on your personal account. + /// API method documentation + /// + /// A List<global::Ayllu.Github.Client.Models.SimpleUser> + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 401 status code + /// When receiving a 403 status code + /// When receiving a 404 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task?> GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task> GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "401", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "403", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "404", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + }; + var collectionResult = await RequestAdapter.SendCollectionAsync(requestInfo, global::Ayllu.Github.Client.Models.SimpleUser.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + return collectionResult?.AsList(); + } + /// + /// List the users you've blocked on your personal account. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.User.Blocks.BlocksRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.User.Blocks.BlocksRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// List the users you've blocked on your personal account. + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class BlocksRequestBuilderGetQueryParameters + { + /// The page number of the results to fetch. For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." + [QueryParameter("page")] + public int? Page { get; set; } + /// The number of results per page (max 100). For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." + [QueryParameter("per_page")] + public int? PerPage { get; set; } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class BlocksRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/User/Blocks/Item/WithUsernameItemRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/User/Blocks/Item/WithUsernameItemRequestBuilder.cs new file mode 100644 index 0000000..3db9c62 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/User/Blocks/Item/WithUsernameItemRequestBuilder.cs @@ -0,0 +1,211 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.User.Blocks.Item +{ + /// + /// Builds and executes requests for operations under \user\blocks\{username} + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithUsernameItemRequestBuilder : BaseRequestBuilder + { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public WithUsernameItemRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/user/blocks/{username}", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public WithUsernameItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/user/blocks/{username}", rawUrl) + { + } + /// + /// Unblocks the given user and returns a 204. + /// API method documentation + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 401 status code + /// When receiving a 403 status code + /// When receiving a 404 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task DeleteAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task DeleteAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToDeleteRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "401", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "403", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "404", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + }; + await RequestAdapter.SendNoContentAsync(requestInfo, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// 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. + /// API method documentation + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 401 status code + /// When receiving a 403 status code + /// When receiving a 404 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "401", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "403", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "404", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + }; + await RequestAdapter.SendNoContentAsync(requestInfo, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// Blocks the given user and returns a 204. If the authenticated user cannot block the given user a 422 is returned. + /// API method documentation + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 401 status code + /// When receiving a 403 status code + /// When receiving a 404 status code + /// When receiving a 422 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PutAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task PutAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToPutRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "401", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "403", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "404", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "422", global::Ayllu.Github.Client.Models.ValidationError.CreateFromDiscriminatorValue }, + }; + await RequestAdapter.SendNoContentAsync(requestInfo, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// Unblocks the given user and returns a 204. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToDeleteRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToDeleteRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.DELETE, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// 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. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Blocks the given user and returns a 204. If the authenticated user cannot block the given user a 422 is returned. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPutRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToPutRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.PUT, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.User.Blocks.Item.WithUsernameItemRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.User.Blocks.Item.WithUsernameItemRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithUsernameItemRequestBuilderDeleteRequestConfiguration : RequestConfiguration + { + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithUsernameItemRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithUsernameItemRequestBuilderPutRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/User/Codespaces/CodespacesGetResponse.cs b/src/Ayllu.Github.Client/Github/Client/User/Codespaces/CodespacesGetResponse.cs new file mode 100644 index 0000000..188496d --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/User/Codespaces/CodespacesGetResponse.cs @@ -0,0 +1,70 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.User.Codespaces +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class CodespacesGetResponse : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The codespaces property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? Codespaces { get; set; } +#nullable restore +#else + public List Codespaces { get; set; } +#endif + /// The total_count property + public int? TotalCount { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public CodespacesGetResponse() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.User.Codespaces.CodespacesGetResponse CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.User.Codespaces.CodespacesGetResponse(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "codespaces", n => { Codespaces = n.GetCollectionOfObjectValues(global::Ayllu.Github.Client.Models.Codespace.CreateFromDiscriminatorValue)?.AsList(); } }, + { "total_count", n => { TotalCount = n.GetIntValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteCollectionOfObjectValues("codespaces", Codespaces); + writer.WriteIntValue("total_count", TotalCount); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/User/Codespaces/CodespacesPostRequestBodyMember1.cs b/src/Ayllu.Github.Client/Github/Client/User/Codespaces/CodespacesPostRequestBodyMember1.cs new file mode 100644 index 0000000..3405eb5 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/User/Codespaces/CodespacesPostRequestBodyMember1.cs @@ -0,0 +1,145 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.User.Codespaces +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class CodespacesPostRequestBodyMember1 : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// IP for location auto-detection when proxying a request +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? ClientIp { get; set; } +#nullable restore +#else + public string ClientIp { get; set; } +#endif + /// Path to devcontainer.json config to use for this codespace +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? DevcontainerPath { get; set; } +#nullable restore +#else + public string DevcontainerPath { get; set; } +#endif + /// Display name for this codespace +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? DisplayName { get; set; } +#nullable restore +#else + public string DisplayName { get; set; } +#endif + /// The geographic area for this codespace. If not specified, the value is assigned by IP. This property replaces `location`, which is closing down. + public global::Ayllu.Github.Client.User.Codespaces.CodespacesPostRequestBodyMember1_geo? Geo { get; set; } + /// Time in minutes before codespace stops from inactivity + public int? IdleTimeoutMinutes { get; set; } + /// The requested location for a new codespace. Best efforts are made to respect this upon creation. Assigned by IP if not provided. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Location { get; set; } +#nullable restore +#else + public string Location { get; set; } +#endif + /// Machine type to use for this codespace +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Machine { get; set; } +#nullable restore +#else + public string Machine { get; set; } +#endif + /// Whether to authorize requested permissions from devcontainer.json + public bool? MultiRepoPermissionsOptOut { get; set; } + /// Git ref (typically a branch name) for this codespace +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Ref { get; set; } +#nullable restore +#else + public string Ref { get; set; } +#endif + /// Repository id for this codespace + public int? RepositoryId { get; set; } + /// Duration in minutes after codespace has gone idle in which it will be deleted. Must be integer minutes between 0 and 43200 (30 days). + public int? RetentionPeriodMinutes { get; set; } + /// Working directory for this codespace +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? WorkingDirectory { get; set; } +#nullable restore +#else + public string WorkingDirectory { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public CodespacesPostRequestBodyMember1() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.User.Codespaces.CodespacesPostRequestBodyMember1 CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.User.Codespaces.CodespacesPostRequestBodyMember1(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "client_ip", n => { ClientIp = n.GetStringValue(); } }, + { "devcontainer_path", n => { DevcontainerPath = n.GetStringValue(); } }, + { "display_name", n => { DisplayName = n.GetStringValue(); } }, + { "geo", n => { Geo = n.GetEnumValue(); } }, + { "idle_timeout_minutes", n => { IdleTimeoutMinutes = n.GetIntValue(); } }, + { "location", n => { Location = n.GetStringValue(); } }, + { "machine", n => { Machine = n.GetStringValue(); } }, + { "multi_repo_permissions_opt_out", n => { MultiRepoPermissionsOptOut = n.GetBoolValue(); } }, + { "ref", n => { Ref = n.GetStringValue(); } }, + { "repository_id", n => { RepositoryId = n.GetIntValue(); } }, + { "retention_period_minutes", n => { RetentionPeriodMinutes = n.GetIntValue(); } }, + { "working_directory", n => { WorkingDirectory = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("client_ip", ClientIp); + writer.WriteStringValue("devcontainer_path", DevcontainerPath); + writer.WriteStringValue("display_name", DisplayName); + writer.WriteEnumValue("geo", Geo); + writer.WriteIntValue("idle_timeout_minutes", IdleTimeoutMinutes); + writer.WriteStringValue("location", Location); + writer.WriteStringValue("machine", Machine); + writer.WriteBoolValue("multi_repo_permissions_opt_out", MultiRepoPermissionsOptOut); + writer.WriteStringValue("ref", Ref); + writer.WriteIntValue("repository_id", RepositoryId); + writer.WriteIntValue("retention_period_minutes", RetentionPeriodMinutes); + writer.WriteStringValue("working_directory", WorkingDirectory); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/User/Codespaces/CodespacesPostRequestBodyMember1_geo.cs b/src/Ayllu.Github.Client/Github/Client/User/Codespaces/CodespacesPostRequestBodyMember1_geo.cs new file mode 100644 index 0000000..183e76c --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/User/Codespaces/CodespacesPostRequestBodyMember1_geo.cs @@ -0,0 +1,27 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.User.Codespaces +{ + /// The geographic area for this codespace. If not specified, the value is assigned by IP. This property replaces `location`, which is closing down. + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public enum CodespacesPostRequestBodyMember1_geo + { + [EnumMember(Value = "EuropeWest")] + #pragma warning disable CS1591 + EuropeWest, + #pragma warning restore CS1591 + [EnumMember(Value = "SoutheastAsia")] + #pragma warning disable CS1591 + SoutheastAsia, + #pragma warning restore CS1591 + [EnumMember(Value = "UsEast")] + #pragma warning disable CS1591 + UsEast, + #pragma warning restore CS1591 + [EnumMember(Value = "UsWest")] + #pragma warning disable CS1591 + UsWest, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/User/Codespaces/CodespacesPostRequestBodyMember2.cs b/src/Ayllu.Github.Client/Github/Client/User/Codespaces/CodespacesPostRequestBodyMember2.cs new file mode 100644 index 0000000..2052a9c --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/User/Codespaces/CodespacesPostRequestBodyMember2.cs @@ -0,0 +1,113 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.User.Codespaces +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class CodespacesPostRequestBodyMember2 : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// Path to devcontainer.json config to use for this codespace +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? DevcontainerPath { get; set; } +#nullable restore +#else + public string DevcontainerPath { get; set; } +#endif + /// The geographic area for this codespace. If not specified, the value is assigned by IP. This property replaces `location`, which is closing down. + public global::Ayllu.Github.Client.User.Codespaces.CodespacesPostRequestBodyMember2_geo? Geo { get; set; } + /// Time in minutes before codespace stops from inactivity + public int? IdleTimeoutMinutes { get; set; } + /// The requested location for a new codespace. Best efforts are made to respect this upon creation. Assigned by IP if not provided. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Location { get; set; } +#nullable restore +#else + public string Location { get; set; } +#endif + /// Machine type to use for this codespace +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Machine { get; set; } +#nullable restore +#else + public string Machine { get; set; } +#endif + /// Pull request number for this codespace +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.User.Codespaces.CodespacesPostRequestBodyMember2_pull_request? PullRequest { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.User.Codespaces.CodespacesPostRequestBodyMember2_pull_request PullRequest { get; set; } +#endif + /// Working directory for this codespace +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? WorkingDirectory { get; set; } +#nullable restore +#else + public string WorkingDirectory { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public CodespacesPostRequestBodyMember2() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.User.Codespaces.CodespacesPostRequestBodyMember2 CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.User.Codespaces.CodespacesPostRequestBodyMember2(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "devcontainer_path", n => { DevcontainerPath = n.GetStringValue(); } }, + { "geo", n => { Geo = n.GetEnumValue(); } }, + { "idle_timeout_minutes", n => { IdleTimeoutMinutes = n.GetIntValue(); } }, + { "location", n => { Location = n.GetStringValue(); } }, + { "machine", n => { Machine = n.GetStringValue(); } }, + { "pull_request", n => { PullRequest = n.GetObjectValue(global::Ayllu.Github.Client.User.Codespaces.CodespacesPostRequestBodyMember2_pull_request.CreateFromDiscriminatorValue); } }, + { "working_directory", n => { WorkingDirectory = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("devcontainer_path", DevcontainerPath); + writer.WriteEnumValue("geo", Geo); + writer.WriteIntValue("idle_timeout_minutes", IdleTimeoutMinutes); + writer.WriteStringValue("location", Location); + writer.WriteStringValue("machine", Machine); + writer.WriteObjectValue("pull_request", PullRequest); + writer.WriteStringValue("working_directory", WorkingDirectory); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/User/Codespaces/CodespacesPostRequestBodyMember2_geo.cs b/src/Ayllu.Github.Client/Github/Client/User/Codespaces/CodespacesPostRequestBodyMember2_geo.cs new file mode 100644 index 0000000..e4f33e3 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/User/Codespaces/CodespacesPostRequestBodyMember2_geo.cs @@ -0,0 +1,27 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.User.Codespaces +{ + /// The geographic area for this codespace. If not specified, the value is assigned by IP. This property replaces `location`, which is closing down. + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public enum CodespacesPostRequestBodyMember2_geo + { + [EnumMember(Value = "EuropeWest")] + #pragma warning disable CS1591 + EuropeWest, + #pragma warning restore CS1591 + [EnumMember(Value = "SoutheastAsia")] + #pragma warning disable CS1591 + SoutheastAsia, + #pragma warning restore CS1591 + [EnumMember(Value = "UsEast")] + #pragma warning disable CS1591 + UsEast, + #pragma warning restore CS1591 + [EnumMember(Value = "UsWest")] + #pragma warning disable CS1591 + UsWest, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/User/Codespaces/CodespacesPostRequestBodyMember2_pull_request.cs b/src/Ayllu.Github.Client/Github/Client/User/Codespaces/CodespacesPostRequestBodyMember2_pull_request.cs new file mode 100644 index 0000000..d18ff7f --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/User/Codespaces/CodespacesPostRequestBodyMember2_pull_request.cs @@ -0,0 +1,64 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.User.Codespaces +{ + /// + /// Pull request number for this codespace + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class CodespacesPostRequestBodyMember2_pull_request : IAdditionalDataHolder, IParsable + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// Pull request number + public int? PullRequestNumber { get; set; } + /// Repository id for this codespace + public int? RepositoryId { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public CodespacesPostRequestBodyMember2_pull_request() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.User.Codespaces.CodespacesPostRequestBodyMember2_pull_request CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.User.Codespaces.CodespacesPostRequestBodyMember2_pull_request(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "pull_request_number", n => { PullRequestNumber = n.GetIntValue(); } }, + { "repository_id", n => { RepositoryId = n.GetIntValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteIntValue("pull_request_number", PullRequestNumber); + writer.WriteIntValue("repository_id", RepositoryId); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/User/Codespaces/CodespacesRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/User/Codespaces/CodespacesRequestBuilder.cs new file mode 100644 index 0000000..2249c85 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/User/Codespaces/CodespacesRequestBuilder.cs @@ -0,0 +1,307 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Ayllu.Github.Client.User.Codespaces.Item; +using Ayllu.Github.Client.User.Codespaces.Secrets; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.User.Codespaces +{ + /// + /// Builds and executes requests for operations under \user\codespaces + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class CodespacesRequestBuilder : BaseRequestBuilder + { + /// The secrets property + public global::Ayllu.Github.Client.User.Codespaces.Secrets.SecretsRequestBuilder Secrets + { + get => new global::Ayllu.Github.Client.User.Codespaces.Secrets.SecretsRequestBuilder(PathParameters, RequestAdapter); + } + /// Gets an item from the Ayllu.Github.Client.user.codespaces.item collection + /// The name of the codespace. + /// A + public global::Ayllu.Github.Client.User.Codespaces.Item.WithCodespace_nameItemRequestBuilder this[string position] + { + get + { + var urlTplParams = new Dictionary(PathParameters); + urlTplParams.Add("codespace_name", position); + return new global::Ayllu.Github.Client.User.Codespaces.Item.WithCodespace_nameItemRequestBuilder(urlTplParams, RequestAdapter); + } + } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public CodespacesRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/user/codespaces{?page*,per_page*,repository_id*}", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public CodespacesRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/user/codespaces{?page*,per_page*,repository_id*}", rawUrl) + { + } + /// + /// Lists the authenticated user's codespaces.OAuth app tokens and personal access tokens (classic) need the `codespace` scope to use this endpoint. + /// API method documentation + /// + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 401 status code + /// When receiving a 403 status code + /// When receiving a 404 status code + /// When receiving a 500 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsCodespacesGetResponseAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task GetAsCodespacesGetResponseAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "401", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "403", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "404", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "500", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.User.Codespaces.CodespacesGetResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// Lists the authenticated user's codespaces.OAuth app tokens and personal access tokens (classic) need the `codespace` scope to use this endpoint. + /// API method documentation + /// + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 401 status code + /// When receiving a 403 status code + /// When receiving a 404 status code + /// When receiving a 500 status code + [Obsolete("This method is obsolete. Use GetAsCodespacesGetResponseAsync instead.")] +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "401", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "403", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "404", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "500", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.User.Codespaces.CodespacesResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// 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. + /// API method documentation + /// + /// A + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 401 status code + /// When receiving a 403 status code + /// When receiving a 404 status code + /// When receiving a 503 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PostAsync(global::Ayllu.Github.Client.User.Codespaces.CodespacesRequestBuilder.CodespacesPostRequestBody body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task PostAsync(global::Ayllu.Github.Client.User.Codespaces.CodespacesRequestBuilder.CodespacesPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPostRequestInformation(body, requestConfiguration); + var errorMapping = new Dictionary> + { + { "401", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "403", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "404", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "503", global::Ayllu.Github.Client.Models.Codespace503Error.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Models.Codespace.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// Lists the authenticated user's codespaces.OAuth app tokens and personal access tokens (classic) need the `codespace` scope to use this endpoint. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// 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. + /// + /// A + /// The request body + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPostRequestInformation(global::Ayllu.Github.Client.User.Codespaces.CodespacesRequestBuilder.CodespacesPostRequestBody body, Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToPostRequestInformation(global::Ayllu.Github.Client.User.Codespaces.CodespacesRequestBuilder.CodespacesPostRequestBody body, Action> requestConfiguration = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.User.Codespaces.CodespacesRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.User.Codespaces.CodespacesRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Composed type wrapper for classes , + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class CodespacesPostRequestBody : IComposedTypeWrapper, IParsable + { + /// Composed type representation for type +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.User.Codespaces.CodespacesPostRequestBodyMember1? CodespacesPostRequestBodyMember1 { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.User.Codespaces.CodespacesPostRequestBodyMember1 CodespacesPostRequestBodyMember1 { get; set; } +#endif + /// Composed type representation for type +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.User.Codespaces.CodespacesPostRequestBodyMember2? CodespacesPostRequestBodyMember2 { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.User.Codespaces.CodespacesPostRequestBodyMember2 CodespacesPostRequestBodyMember2 { get; set; } +#endif + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.User.Codespaces.CodespacesRequestBuilder.CodespacesPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + var mappingValue = parseNode.GetChildNode("")?.GetStringValue(); + var result = new global::Ayllu.Github.Client.User.Codespaces.CodespacesRequestBuilder.CodespacesPostRequestBody(); + if("".Equals(mappingValue, StringComparison.OrdinalIgnoreCase)) + { + result.CodespacesPostRequestBodyMember1 = new global::Ayllu.Github.Client.User.Codespaces.CodespacesPostRequestBodyMember1(); + } + else if("".Equals(mappingValue, StringComparison.OrdinalIgnoreCase)) + { + result.CodespacesPostRequestBodyMember2 = new global::Ayllu.Github.Client.User.Codespaces.CodespacesPostRequestBodyMember2(); + } + return result; + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + if(CodespacesPostRequestBodyMember1 != null) + { + return CodespacesPostRequestBodyMember1.GetFieldDeserializers(); + } + else if(CodespacesPostRequestBodyMember2 != null) + { + return CodespacesPostRequestBodyMember2.GetFieldDeserializers(); + } + return new Dictionary>(); + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(CodespacesPostRequestBodyMember1 != null) + { + writer.WriteObjectValue(null, CodespacesPostRequestBodyMember1); + } + else if(CodespacesPostRequestBodyMember2 != null) + { + writer.WriteObjectValue(null, CodespacesPostRequestBodyMember2); + } + } + } + /// + /// Lists the authenticated user's codespaces.OAuth app tokens and personal access tokens (classic) need the `codespace` scope to use this endpoint. + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class CodespacesRequestBuilderGetQueryParameters + { + /// The page number of the results to fetch. For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." + [QueryParameter("page")] + public int? Page { get; set; } + /// The number of results per page (max 100). For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." + [QueryParameter("per_page")] + public int? PerPage { get; set; } + /// ID of the Repository to filter on + [QueryParameter("repository_id")] + public int? RepositoryId { get; set; } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class CodespacesRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class CodespacesRequestBuilderPostRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/User/Codespaces/CodespacesResponse.cs b/src/Ayllu.Github.Client/Github/Client/User/Codespaces/CodespacesResponse.cs new file mode 100644 index 0000000..a658046 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/User/Codespaces/CodespacesResponse.cs @@ -0,0 +1,28 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.User.Codespaces +{ + [Obsolete("This class is obsolete. Use CodespacesGetResponse instead.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class CodespacesResponse : global::Ayllu.Github.Client.User.Codespaces.CodespacesGetResponse, IParsable + #pragma warning restore CS1591 + { + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static new global::Ayllu.Github.Client.User.Codespaces.CodespacesResponse CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.User.Codespaces.CodespacesResponse(); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/User/Codespaces/Item/Exports/ExportsRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/User/Codespaces/Item/Exports/ExportsRequestBuilder.cs new file mode 100644 index 0000000..3d14272 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/User/Codespaces/Item/Exports/ExportsRequestBuilder.cs @@ -0,0 +1,119 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Ayllu.Github.Client.User.Codespaces.Item.Exports.Item; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.User.Codespaces.Item.Exports +{ + /// + /// Builds and executes requests for operations under \user\codespaces\{codespace_name}\exports + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class ExportsRequestBuilder : BaseRequestBuilder + { + /// Gets an item from the Ayllu.Github.Client.user.codespaces.item.exports.item collection + /// The ID of the export operation, or `latest`. Currently only `latest` is currently supported. + /// A + public global::Ayllu.Github.Client.User.Codespaces.Item.Exports.Item.WithExport_ItemRequestBuilder this[string position] + { + get + { + var urlTplParams = new Dictionary(PathParameters); + urlTplParams.Add("export_id", position); + return new global::Ayllu.Github.Client.User.Codespaces.Item.Exports.Item.WithExport_ItemRequestBuilder(urlTplParams, RequestAdapter); + } + } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public ExportsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/user/codespaces/{codespace_name}/exports", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public ExportsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/user/codespaces/{codespace_name}/exports", rawUrl) + { + } + /// + /// 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. + /// API method documentation + /// + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 401 status code + /// When receiving a 403 status code + /// When receiving a 404 status code + /// When receiving a 422 status code + /// When receiving a 500 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PostAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task PostAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToPostRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "401", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "403", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "404", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "422", global::Ayllu.Github.Client.Models.ValidationError.CreateFromDiscriminatorValue }, + { "500", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Models.CodespaceExportDetails.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// 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. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPostRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToPostRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.User.Codespaces.Item.Exports.ExportsRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.User.Codespaces.Item.Exports.ExportsRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class ExportsRequestBuilderPostRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/User/Codespaces/Item/Exports/Item/WithExport_ItemRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/User/Codespaces/Item/Exports/Item/WithExport_ItemRequestBuilder.cs new file mode 100644 index 0000000..bf736ba --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/User/Codespaces/Item/Exports/Item/WithExport_ItemRequestBuilder.cs @@ -0,0 +1,98 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.User.Codespaces.Item.Exports.Item +{ + /// + /// Builds and executes requests for operations under \user\codespaces\{codespace_name}\exports\{export_id} + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithExport_ItemRequestBuilder : BaseRequestBuilder + { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public WithExport_ItemRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/user/codespaces/{codespace_name}/exports/{export_id}", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public WithExport_ItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/user/codespaces/{codespace_name}/exports/{export_id}", rawUrl) + { + } + /// + /// Gets information about an export of a codespace.OAuth app tokens and personal access tokens (classic) need the `codespace` scope to use this endpoint. + /// API method documentation + /// + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 404 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "404", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Models.CodespaceExportDetails.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// Gets information about an export of a codespace.OAuth app tokens and personal access tokens (classic) need the `codespace` scope to use this endpoint. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.User.Codespaces.Item.Exports.Item.WithExport_ItemRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.User.Codespaces.Item.Exports.Item.WithExport_ItemRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithExport_ItemRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/User/Codespaces/Item/Machines/MachinesGetResponse.cs b/src/Ayllu.Github.Client/Github/Client/User/Codespaces/Item/Machines/MachinesGetResponse.cs new file mode 100644 index 0000000..491adf2 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/User/Codespaces/Item/Machines/MachinesGetResponse.cs @@ -0,0 +1,70 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.User.Codespaces.Item.Machines +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class MachinesGetResponse : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The machines property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? Machines { get; set; } +#nullable restore +#else + public List Machines { get; set; } +#endif + /// The total_count property + public int? TotalCount { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public MachinesGetResponse() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.User.Codespaces.Item.Machines.MachinesGetResponse CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.User.Codespaces.Item.Machines.MachinesGetResponse(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "machines", n => { Machines = n.GetCollectionOfObjectValues(global::Ayllu.Github.Client.Models.CodespaceMachine.CreateFromDiscriminatorValue)?.AsList(); } }, + { "total_count", n => { TotalCount = n.GetIntValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteCollectionOfObjectValues("machines", Machines); + writer.WriteIntValue("total_count", TotalCount); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/User/Codespaces/Item/Machines/MachinesRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/User/Codespaces/Item/Machines/MachinesRequestBuilder.cs new file mode 100644 index 0000000..bbcf718 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/User/Codespaces/Item/Machines/MachinesRequestBuilder.cs @@ -0,0 +1,135 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.User.Codespaces.Item.Machines +{ + /// + /// Builds and executes requests for operations under \user\codespaces\{codespace_name}\machines + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class MachinesRequestBuilder : BaseRequestBuilder + { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public MachinesRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/user/codespaces/{codespace_name}/machines", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public MachinesRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/user/codespaces/{codespace_name}/machines", rawUrl) + { + } + /// + /// 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. + /// API method documentation + /// + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 401 status code + /// When receiving a 403 status code + /// When receiving a 404 status code + /// When receiving a 500 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsMachinesGetResponseAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task GetAsMachinesGetResponseAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "401", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "403", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "404", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "500", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.User.Codespaces.Item.Machines.MachinesGetResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// 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. + /// API method documentation + /// + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 401 status code + /// When receiving a 403 status code + /// When receiving a 404 status code + /// When receiving a 500 status code + [Obsolete("This method is obsolete. Use GetAsMachinesGetResponseAsync instead.")] +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "401", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "403", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "404", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "500", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.User.Codespaces.Item.Machines.MachinesResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// 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. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.User.Codespaces.Item.Machines.MachinesRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.User.Codespaces.Item.Machines.MachinesRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class MachinesRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/User/Codespaces/Item/Machines/MachinesResponse.cs b/src/Ayllu.Github.Client/Github/Client/User/Codespaces/Item/Machines/MachinesResponse.cs new file mode 100644 index 0000000..72cfe85 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/User/Codespaces/Item/Machines/MachinesResponse.cs @@ -0,0 +1,28 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.User.Codespaces.Item.Machines +{ + [Obsolete("This class is obsolete. Use MachinesGetResponse instead.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class MachinesResponse : global::Ayllu.Github.Client.User.Codespaces.Item.Machines.MachinesGetResponse, IParsable + #pragma warning restore CS1591 + { + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static new global::Ayllu.Github.Client.User.Codespaces.Item.Machines.MachinesResponse CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.User.Codespaces.Item.Machines.MachinesResponse(); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/User/Codespaces/Item/Publish/PublishPostRequestBody.cs b/src/Ayllu.Github.Client/Github/Client/User/Codespaces/Item/Publish/PublishPostRequestBody.cs new file mode 100644 index 0000000..127f2dc --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/User/Codespaces/Item/Publish/PublishPostRequestBody.cs @@ -0,0 +1,69 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.User.Codespaces.Item.Publish +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class PublishPostRequestBody : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// A name for the new repository. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Name { get; set; } +#nullable restore +#else + public string Name { get; set; } +#endif + /// Whether the new repository should be private. + public bool? Private { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public PublishPostRequestBody() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.User.Codespaces.Item.Publish.PublishPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.User.Codespaces.Item.Publish.PublishPostRequestBody(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "name", n => { Name = n.GetStringValue(); } }, + { "private", n => { Private = n.GetBoolValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("name", Name); + writer.WriteBoolValue("private", Private); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/User/Codespaces/Item/Publish/PublishRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/User/Codespaces/Item/Publish/PublishRequestBuilder.cs new file mode 100644 index 0000000..ea985fa --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/User/Codespaces/Item/Publish/PublishRequestBuilder.cs @@ -0,0 +1,109 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.User.Codespaces.Item.Publish +{ + /// + /// Builds and executes requests for operations under \user\codespaces\{codespace_name}\publish + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class PublishRequestBuilder : BaseRequestBuilder + { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public PublishRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/user/codespaces/{codespace_name}/publish", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public PublishRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/user/codespaces/{codespace_name}/publish", rawUrl) + { + } + /// + /// 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. + /// API method documentation + /// + /// A + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 401 status code + /// When receiving a 403 status code + /// When receiving a 404 status code + /// When receiving a 422 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PostAsync(global::Ayllu.Github.Client.User.Codespaces.Item.Publish.PublishPostRequestBody body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task PostAsync(global::Ayllu.Github.Client.User.Codespaces.Item.Publish.PublishPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPostRequestInformation(body, requestConfiguration); + var errorMapping = new Dictionary> + { + { "401", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "403", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "404", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "422", global::Ayllu.Github.Client.Models.ValidationError.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Models.CodespaceWithFullRepository.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// 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. + /// + /// A + /// The request body + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPostRequestInformation(global::Ayllu.Github.Client.User.Codespaces.Item.Publish.PublishPostRequestBody body, Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToPostRequestInformation(global::Ayllu.Github.Client.User.Codespaces.Item.Publish.PublishPostRequestBody body, Action> requestConfiguration = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.User.Codespaces.Item.Publish.PublishRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.User.Codespaces.Item.Publish.PublishRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class PublishRequestBuilderPostRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/User/Codespaces/Item/Start/StartRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/User/Codespaces/Item/Start/StartRequestBuilder.cs new file mode 100644 index 0000000..ed51f54 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/User/Codespaces/Item/Start/StartRequestBuilder.cs @@ -0,0 +1,110 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.User.Codespaces.Item.Start +{ + /// + /// Builds and executes requests for operations under \user\codespaces\{codespace_name}\start + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class StartRequestBuilder : BaseRequestBuilder + { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public StartRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/user/codespaces/{codespace_name}/start", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public StartRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/user/codespaces/{codespace_name}/start", rawUrl) + { + } + /// + /// Starts a user's codespace.OAuth app tokens and personal access tokens (classic) need the `codespace` scope to use this endpoint. + /// API method documentation + /// + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 400 status code + /// When receiving a 401 status code + /// When receiving a 402 status code + /// When receiving a 403 status code + /// When receiving a 404 status code + /// When receiving a 409 status code + /// When receiving a 500 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PostAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task PostAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToPostRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "400", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "401", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "402", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "403", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "404", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "409", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "500", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Models.Codespace.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// Starts a user's codespace.OAuth app tokens and personal access tokens (classic) need the `codespace` scope to use this endpoint. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPostRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToPostRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.User.Codespaces.Item.Start.StartRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.User.Codespaces.Item.Start.StartRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class StartRequestBuilderPostRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/User/Codespaces/Item/Stop/StopRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/User/Codespaces/Item/Stop/StopRequestBuilder.cs new file mode 100644 index 0000000..5030010 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/User/Codespaces/Item/Stop/StopRequestBuilder.cs @@ -0,0 +1,104 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.User.Codespaces.Item.Stop +{ + /// + /// Builds and executes requests for operations under \user\codespaces\{codespace_name}\stop + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class StopRequestBuilder : BaseRequestBuilder + { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public StopRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/user/codespaces/{codespace_name}/stop", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public StopRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/user/codespaces/{codespace_name}/stop", rawUrl) + { + } + /// + /// Stops a user's codespace.OAuth app tokens and personal access tokens (classic) need the `codespace` scope to use this endpoint. + /// API method documentation + /// + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 401 status code + /// When receiving a 403 status code + /// When receiving a 404 status code + /// When receiving a 500 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PostAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task PostAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToPostRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "401", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "403", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "404", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "500", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Models.Codespace.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// Stops a user's codespace.OAuth app tokens and personal access tokens (classic) need the `codespace` scope to use this endpoint. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPostRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToPostRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.User.Codespaces.Item.Stop.StopRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.User.Codespaces.Item.Stop.StopRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class StopRequestBuilderPostRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/User/Codespaces/Item/WithCodespace_nameDeleteResponse.cs b/src/Ayllu.Github.Client/Github/Client/User/Codespaces/Item/WithCodespace_nameDeleteResponse.cs new file mode 100644 index 0000000..b8027ba --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/User/Codespaces/Item/WithCodespace_nameDeleteResponse.cs @@ -0,0 +1,55 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.User.Codespaces.Item +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class WithCodespace_nameDeleteResponse : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public WithCodespace_nameDeleteResponse() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.User.Codespaces.Item.WithCodespace_nameDeleteResponse CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.User.Codespaces.Item.WithCodespace_nameDeleteResponse(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/User/Codespaces/Item/WithCodespace_nameItemRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/User/Codespaces/Item/WithCodespace_nameItemRequestBuilder.cs new file mode 100644 index 0000000..200f1ad --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/User/Codespaces/Item/WithCodespace_nameItemRequestBuilder.cs @@ -0,0 +1,282 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Ayllu.Github.Client.User.Codespaces.Item.Exports; +using Ayllu.Github.Client.User.Codespaces.Item.Machines; +using Ayllu.Github.Client.User.Codespaces.Item.Publish; +using Ayllu.Github.Client.User.Codespaces.Item.Start; +using Ayllu.Github.Client.User.Codespaces.Item.Stop; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.User.Codespaces.Item +{ + /// + /// Builds and executes requests for operations under \user\codespaces\{codespace_name} + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithCodespace_nameItemRequestBuilder : BaseRequestBuilder + { + /// The exports property + public global::Ayllu.Github.Client.User.Codespaces.Item.Exports.ExportsRequestBuilder Exports + { + get => new global::Ayllu.Github.Client.User.Codespaces.Item.Exports.ExportsRequestBuilder(PathParameters, RequestAdapter); + } + /// The machines property + public global::Ayllu.Github.Client.User.Codespaces.Item.Machines.MachinesRequestBuilder Machines + { + get => new global::Ayllu.Github.Client.User.Codespaces.Item.Machines.MachinesRequestBuilder(PathParameters, RequestAdapter); + } + /// The publish property + public global::Ayllu.Github.Client.User.Codespaces.Item.Publish.PublishRequestBuilder Publish + { + get => new global::Ayllu.Github.Client.User.Codespaces.Item.Publish.PublishRequestBuilder(PathParameters, RequestAdapter); + } + /// The start property + public global::Ayllu.Github.Client.User.Codespaces.Item.Start.StartRequestBuilder Start + { + get => new global::Ayllu.Github.Client.User.Codespaces.Item.Start.StartRequestBuilder(PathParameters, RequestAdapter); + } + /// The stop property + public global::Ayllu.Github.Client.User.Codespaces.Item.Stop.StopRequestBuilder Stop + { + get => new global::Ayllu.Github.Client.User.Codespaces.Item.Stop.StopRequestBuilder(PathParameters, RequestAdapter); + } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public WithCodespace_nameItemRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/user/codespaces/{codespace_name}", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public WithCodespace_nameItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/user/codespaces/{codespace_name}", rawUrl) + { + } + /// + /// Deletes a user's codespace.OAuth app tokens and personal access tokens (classic) need the `codespace` scope to use this endpoint. + /// API method documentation + /// + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 401 status code + /// When receiving a 403 status code + /// When receiving a 404 status code + /// When receiving a 500 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task DeleteAsWithCodespace_nameDeleteResponseAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task DeleteAsWithCodespace_nameDeleteResponseAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToDeleteRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "401", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "403", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "404", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "500", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.User.Codespaces.Item.WithCodespace_nameDeleteResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// Deletes a user's codespace.OAuth app tokens and personal access tokens (classic) need the `codespace` scope to use this endpoint. + /// API method documentation + /// + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 401 status code + /// When receiving a 403 status code + /// When receiving a 404 status code + /// When receiving a 500 status code + [Obsolete("This method is obsolete. Use DeleteAsWithCodespace_nameDeleteResponseAsync instead.")] +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task DeleteAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task DeleteAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToDeleteRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "401", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "403", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "404", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "500", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.User.Codespaces.Item.WithCodespace_nameResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// Gets information about a user's codespace.OAuth app tokens and personal access tokens (classic) need the `codespace` scope to use this endpoint. + /// API method documentation + /// + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 401 status code + /// When receiving a 403 status code + /// When receiving a 404 status code + /// When receiving a 500 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "401", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "403", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "404", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "500", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Models.Codespace.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// 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. + /// API method documentation + /// + /// A + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 401 status code + /// When receiving a 403 status code + /// When receiving a 404 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PatchAsync(global::Ayllu.Github.Client.User.Codespaces.Item.WithCodespace_namePatchRequestBody body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task PatchAsync(global::Ayllu.Github.Client.User.Codespaces.Item.WithCodespace_namePatchRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPatchRequestInformation(body, requestConfiguration); + var errorMapping = new Dictionary> + { + { "401", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "403", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "404", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Models.Codespace.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// Deletes a user's codespace.OAuth app tokens and personal access tokens (classic) need the `codespace` scope to use this endpoint. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToDeleteRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToDeleteRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.DELETE, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Gets information about a user's codespace.OAuth app tokens and personal access tokens (classic) need the `codespace` scope to use this endpoint. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// 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. + /// + /// A + /// The request body + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPatchRequestInformation(global::Ayllu.Github.Client.User.Codespaces.Item.WithCodespace_namePatchRequestBody body, Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToPatchRequestInformation(global::Ayllu.Github.Client.User.Codespaces.Item.WithCodespace_namePatchRequestBody body, Action> requestConfiguration = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.User.Codespaces.Item.WithCodespace_nameItemRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.User.Codespaces.Item.WithCodespace_nameItemRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithCodespace_nameItemRequestBuilderDeleteRequestConfiguration : RequestConfiguration + { + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithCodespace_nameItemRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithCodespace_nameItemRequestBuilderPatchRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/User/Codespaces/Item/WithCodespace_namePatchRequestBody.cs b/src/Ayllu.Github.Client/Github/Client/User/Codespaces/Item/WithCodespace_namePatchRequestBody.cs new file mode 100644 index 0000000..6d249ed --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/User/Codespaces/Item/WithCodespace_namePatchRequestBody.cs @@ -0,0 +1,85 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.User.Codespaces.Item +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class WithCodespace_namePatchRequestBody : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// Display name for this codespace +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? DisplayName { get; set; } +#nullable restore +#else + public string DisplayName { get; set; } +#endif + /// A valid machine to transition this codespace to. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Machine { get; set; } +#nullable restore +#else + public string Machine { get; set; } +#endif + /// Recently opened folders inside the codespace. It is currently used by the clients to determine the folder path to load the codespace in. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? RecentFolders { get; set; } +#nullable restore +#else + public List RecentFolders { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public WithCodespace_namePatchRequestBody() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.User.Codespaces.Item.WithCodespace_namePatchRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.User.Codespaces.Item.WithCodespace_namePatchRequestBody(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "display_name", n => { DisplayName = n.GetStringValue(); } }, + { "machine", n => { Machine = n.GetStringValue(); } }, + { "recent_folders", n => { RecentFolders = n.GetCollectionOfPrimitiveValues()?.AsList(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("display_name", DisplayName); + writer.WriteStringValue("machine", Machine); + writer.WriteCollectionOfPrimitiveValues("recent_folders", RecentFolders); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/User/Codespaces/Item/WithCodespace_nameResponse.cs b/src/Ayllu.Github.Client/Github/Client/User/Codespaces/Item/WithCodespace_nameResponse.cs new file mode 100644 index 0000000..52ebab6 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/User/Codespaces/Item/WithCodespace_nameResponse.cs @@ -0,0 +1,28 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.User.Codespaces.Item +{ + [Obsolete("This class is obsolete. Use WithCodespace_nameDeleteResponse instead.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class WithCodespace_nameResponse : global::Ayllu.Github.Client.User.Codespaces.Item.WithCodespace_nameDeleteResponse, IParsable + #pragma warning restore CS1591 + { + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static new global::Ayllu.Github.Client.User.Codespaces.Item.WithCodespace_nameResponse CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.User.Codespaces.Item.WithCodespace_nameResponse(); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/User/Codespaces/Secrets/Item/Repositories/Item/WithRepository_ItemRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/User/Codespaces/Secrets/Item/Repositories/Item/WithRepository_ItemRequestBuilder.cs new file mode 100644 index 0000000..eeaa0f8 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/User/Codespaces/Secrets/Item/Repositories/Item/WithRepository_ItemRequestBuilder.cs @@ -0,0 +1,159 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.User.Codespaces.Secrets.Item.Repositories.Item +{ + /// + /// Builds and executes requests for operations under \user\codespaces\secrets\{secret_name}\repositories\{repository_id} + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithRepository_ItemRequestBuilder : BaseRequestBuilder + { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public WithRepository_ItemRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/user/codespaces/secrets/{secret_name}/repositories/{repository_id}", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public WithRepository_ItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/user/codespaces/secrets/{secret_name}/repositories/{repository_id}", rawUrl) + { + } + /// + /// 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. + /// API method documentation + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 401 status code + /// When receiving a 403 status code + /// When receiving a 404 status code + /// When receiving a 500 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task DeleteAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task DeleteAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToDeleteRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "401", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "403", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "404", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "500", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + }; + await RequestAdapter.SendNoContentAsync(requestInfo, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// 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. + /// API method documentation + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 401 status code + /// When receiving a 403 status code + /// When receiving a 404 status code + /// When receiving a 500 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PutAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task PutAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToPutRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "401", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "403", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "404", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "500", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + }; + await RequestAdapter.SendNoContentAsync(requestInfo, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// 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. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToDeleteRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToDeleteRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.DELETE, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// 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. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPutRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToPutRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.PUT, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.User.Codespaces.Secrets.Item.Repositories.Item.WithRepository_ItemRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.User.Codespaces.Secrets.Item.Repositories.Item.WithRepository_ItemRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithRepository_ItemRequestBuilderDeleteRequestConfiguration : RequestConfiguration + { + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithRepository_ItemRequestBuilderPutRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/User/Codespaces/Secrets/Item/Repositories/RepositoriesGetResponse.cs b/src/Ayllu.Github.Client/Github/Client/User/Codespaces/Secrets/Item/Repositories/RepositoriesGetResponse.cs new file mode 100644 index 0000000..d949742 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/User/Codespaces/Secrets/Item/Repositories/RepositoriesGetResponse.cs @@ -0,0 +1,70 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.User.Codespaces.Secrets.Item.Repositories +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class RepositoriesGetResponse : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The repositories property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? Repositories { get; set; } +#nullable restore +#else + public List Repositories { get; set; } +#endif + /// The total_count property + public int? TotalCount { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public RepositoriesGetResponse() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.User.Codespaces.Secrets.Item.Repositories.RepositoriesGetResponse CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.User.Codespaces.Secrets.Item.Repositories.RepositoriesGetResponse(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "repositories", n => { Repositories = n.GetCollectionOfObjectValues(global::Ayllu.Github.Client.Models.MinimalRepository.CreateFromDiscriminatorValue)?.AsList(); } }, + { "total_count", n => { TotalCount = n.GetIntValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteCollectionOfObjectValues("repositories", Repositories); + writer.WriteIntValue("total_count", TotalCount); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/User/Codespaces/Secrets/Item/Repositories/RepositoriesPutRequestBody.cs b/src/Ayllu.Github.Client/Github/Client/User/Codespaces/Secrets/Item/Repositories/RepositoriesPutRequestBody.cs new file mode 100644 index 0000000..306b5f3 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/User/Codespaces/Secrets/Item/Repositories/RepositoriesPutRequestBody.cs @@ -0,0 +1,65 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.User.Codespaces.Secrets.Item.Repositories +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class RepositoriesPutRequestBody : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// 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/rest/codespaces/secrets#list-selected-repositories-for-a-user-secret), [Add a selected repository to a user secret](https://docs.github.com/rest/codespaces/secrets#add-a-selected-repository-to-a-user-secret), and [Remove a selected repository from a user secret](https://docs.github.com/rest/codespaces/secrets#remove-a-selected-repository-from-a-user-secret) endpoints. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? SelectedRepositoryIds { get; set; } +#nullable restore +#else + public List SelectedRepositoryIds { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public RepositoriesPutRequestBody() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.User.Codespaces.Secrets.Item.Repositories.RepositoriesPutRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.User.Codespaces.Secrets.Item.Repositories.RepositoriesPutRequestBody(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "selected_repository_ids", n => { SelectedRepositoryIds = n.GetCollectionOfPrimitiveValues()?.AsList(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteCollectionOfPrimitiveValues("selected_repository_ids", SelectedRepositoryIds); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/User/Codespaces/Secrets/Item/Repositories/RepositoriesRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/User/Codespaces/Secrets/Item/Repositories/RepositoriesRequestBuilder.cs new file mode 100644 index 0000000..c2ffc1d --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/User/Codespaces/Secrets/Item/Repositories/RepositoriesRequestBuilder.cs @@ -0,0 +1,222 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Ayllu.Github.Client.User.Codespaces.Secrets.Item.Repositories.Item; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.User.Codespaces.Secrets.Item.Repositories +{ + /// + /// Builds and executes requests for operations under \user\codespaces\secrets\{secret_name}\repositories + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class RepositoriesRequestBuilder : BaseRequestBuilder + { + /// Gets an item from the Ayllu.Github.Client.user.codespaces.secrets.item.repositories.item collection + /// Unique identifier of the item + /// A + public global::Ayllu.Github.Client.User.Codespaces.Secrets.Item.Repositories.Item.WithRepository_ItemRequestBuilder this[int position] + { + get + { + var urlTplParams = new Dictionary(PathParameters); + urlTplParams.Add("repository_id", position); + return new global::Ayllu.Github.Client.User.Codespaces.Secrets.Item.Repositories.Item.WithRepository_ItemRequestBuilder(urlTplParams, RequestAdapter); + } + } + /// Gets an item from the Ayllu.Github.Client.user.codespaces.secrets.item.repositories.item collection + /// Unique identifier of the item + /// A + [Obsolete("This indexer is deprecated and will be removed in the next major version. Use the one with the typed parameter instead.")] + public global::Ayllu.Github.Client.User.Codespaces.Secrets.Item.Repositories.Item.WithRepository_ItemRequestBuilder this[string position] + { + get + { + var urlTplParams = new Dictionary(PathParameters); + if (!string.IsNullOrWhiteSpace(position)) urlTplParams.Add("repository_id", position); + return new global::Ayllu.Github.Client.User.Codespaces.Secrets.Item.Repositories.Item.WithRepository_ItemRequestBuilder(urlTplParams, RequestAdapter); + } + } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public RepositoriesRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/user/codespaces/secrets/{secret_name}/repositories", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public RepositoriesRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/user/codespaces/secrets/{secret_name}/repositories", rawUrl) + { + } + /// + /// 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. + /// API method documentation + /// + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 401 status code + /// When receiving a 403 status code + /// When receiving a 404 status code + /// When receiving a 500 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsRepositoriesGetResponseAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task GetAsRepositoriesGetResponseAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "401", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "403", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "404", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "500", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.User.Codespaces.Secrets.Item.Repositories.RepositoriesGetResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// 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. + /// API method documentation + /// + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 401 status code + /// When receiving a 403 status code + /// When receiving a 404 status code + /// When receiving a 500 status code + [Obsolete("This method is obsolete. Use GetAsRepositoriesGetResponseAsync instead.")] +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "401", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "403", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "404", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "500", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.User.Codespaces.Secrets.Item.Repositories.RepositoriesResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// 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. + /// API method documentation + /// + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 401 status code + /// When receiving a 403 status code + /// When receiving a 404 status code + /// When receiving a 500 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PutAsync(global::Ayllu.Github.Client.User.Codespaces.Secrets.Item.Repositories.RepositoriesPutRequestBody body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task PutAsync(global::Ayllu.Github.Client.User.Codespaces.Secrets.Item.Repositories.RepositoriesPutRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPutRequestInformation(body, requestConfiguration); + var errorMapping = new Dictionary> + { + { "401", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "403", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "404", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "500", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + }; + await RequestAdapter.SendNoContentAsync(requestInfo, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// 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. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// 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. + /// + /// A + /// The request body + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPutRequestInformation(global::Ayllu.Github.Client.User.Codespaces.Secrets.Item.Repositories.RepositoriesPutRequestBody body, Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToPutRequestInformation(global::Ayllu.Github.Client.User.Codespaces.Secrets.Item.Repositories.RepositoriesPutRequestBody body, Action> requestConfiguration = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation(Method.PUT, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.User.Codespaces.Secrets.Item.Repositories.RepositoriesRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.User.Codespaces.Secrets.Item.Repositories.RepositoriesRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class RepositoriesRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class RepositoriesRequestBuilderPutRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/User/Codespaces/Secrets/Item/Repositories/RepositoriesResponse.cs b/src/Ayllu.Github.Client/Github/Client/User/Codespaces/Secrets/Item/Repositories/RepositoriesResponse.cs new file mode 100644 index 0000000..b110570 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/User/Codespaces/Secrets/Item/Repositories/RepositoriesResponse.cs @@ -0,0 +1,28 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.User.Codespaces.Secrets.Item.Repositories +{ + [Obsolete("This class is obsolete. Use RepositoriesGetResponse instead.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class RepositoriesResponse : global::Ayllu.Github.Client.User.Codespaces.Secrets.Item.Repositories.RepositoriesGetResponse, IParsable + #pragma warning restore CS1591 + { + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static new global::Ayllu.Github.Client.User.Codespaces.Secrets.Item.Repositories.RepositoriesResponse CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.User.Codespaces.Secrets.Item.Repositories.RepositoriesResponse(); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/User/Codespaces/Secrets/Item/WithSecret_nameItemRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/User/Codespaces/Secrets/Item/WithSecret_nameItemRequestBuilder.cs new file mode 100644 index 0000000..8318e52 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/User/Codespaces/Secrets/Item/WithSecret_nameItemRequestBuilder.cs @@ -0,0 +1,201 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Ayllu.Github.Client.User.Codespaces.Secrets.Item.Repositories; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.User.Codespaces.Secrets.Item +{ + /// + /// Builds and executes requests for operations under \user\codespaces\secrets\{secret_name} + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithSecret_nameItemRequestBuilder : BaseRequestBuilder + { + /// The repositories property + public global::Ayllu.Github.Client.User.Codespaces.Secrets.Item.Repositories.RepositoriesRequestBuilder Repositories + { + get => new global::Ayllu.Github.Client.User.Codespaces.Secrets.Item.Repositories.RepositoriesRequestBuilder(PathParameters, RequestAdapter); + } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public WithSecret_nameItemRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/user/codespaces/secrets/{secret_name}", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public WithSecret_nameItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/user/codespaces/secrets/{secret_name}", rawUrl) + { + } + /// + /// 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 + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task DeleteAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task DeleteAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToDeleteRequestInformation(requestConfiguration); + await RequestAdapter.SendNoContentAsync(requestInfo, default, cancellationToken).ConfigureAwait(false); + } + /// + /// 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. + /// API method documentation + /// + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Models.CodespacesSecret.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false); + } + /// + /// 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/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. + /// API method documentation + /// + /// A + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 404 status code + /// When receiving a 422 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PutAsync(global::Ayllu.Github.Client.User.Codespaces.Secrets.Item.WithSecret_namePutRequestBody body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task PutAsync(global::Ayllu.Github.Client.User.Codespaces.Secrets.Item.WithSecret_namePutRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPutRequestInformation(body, requestConfiguration); + var errorMapping = new Dictionary> + { + { "404", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "422", global::Ayllu.Github.Client.Models.ValidationError.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Models.EmptyObject.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// 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. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToDeleteRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToDeleteRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.DELETE, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + return requestInfo; + } + /// + /// 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. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// 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/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. + /// + /// A + /// The request body + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPutRequestInformation(global::Ayllu.Github.Client.User.Codespaces.Secrets.Item.WithSecret_namePutRequestBody body, Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToPutRequestInformation(global::Ayllu.Github.Client.User.Codespaces.Secrets.Item.WithSecret_namePutRequestBody body, Action> requestConfiguration = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation(Method.PUT, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.User.Codespaces.Secrets.Item.WithSecret_nameItemRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.User.Codespaces.Secrets.Item.WithSecret_nameItemRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithSecret_nameItemRequestBuilderDeleteRequestConfiguration : RequestConfiguration + { + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithSecret_nameItemRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithSecret_nameItemRequestBuilderPutRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/User/Codespaces/Secrets/Item/WithSecret_namePutRequestBody.cs b/src/Ayllu.Github.Client/Github/Client/User/Codespaces/Secrets/Item/WithSecret_namePutRequestBody.cs new file mode 100644 index 0000000..7706eb4 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/User/Codespaces/Secrets/Item/WithSecret_namePutRequestBody.cs @@ -0,0 +1,85 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.User.Codespaces.Secrets.Item +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class WithSecret_namePutRequestBody : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// 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/rest/codespaces/secrets#get-public-key-for-the-authenticated-user) endpoint. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? EncryptedValue { get; set; } +#nullable restore +#else + public string EncryptedValue { get; set; } +#endif + /// ID of the key you used to encrypt the secret. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? KeyId { get; set; } +#nullable restore +#else + public string KeyId { get; set; } +#endif + /// 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/rest/codespaces/secrets#list-selected-repositories-for-a-user-secret), [Set selected repositories for a user secret](https://docs.github.com/rest/codespaces/secrets#set-selected-repositories-for-a-user-secret), and [Remove a selected repository from a user secret](https://docs.github.com/rest/codespaces/secrets#remove-a-selected-repository-from-a-user-secret) endpoints. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? SelectedRepositoryIds { get; set; } +#nullable restore +#else + public List SelectedRepositoryIds { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public WithSecret_namePutRequestBody() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.User.Codespaces.Secrets.Item.WithSecret_namePutRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.User.Codespaces.Secrets.Item.WithSecret_namePutRequestBody(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "encrypted_value", n => { EncryptedValue = n.GetStringValue(); } }, + { "key_id", n => { KeyId = n.GetStringValue(); } }, + { "selected_repository_ids", n => { SelectedRepositoryIds = n.GetCollectionOfPrimitiveValues()?.AsList(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("encrypted_value", EncryptedValue); + writer.WriteStringValue("key_id", KeyId); + writer.WriteCollectionOfPrimitiveValues("selected_repository_ids", SelectedRepositoryIds); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/User/Codespaces/Secrets/PublicKey/PublicKeyRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/User/Codespaces/Secrets/PublicKey/PublicKeyRequestBuilder.cs new file mode 100644 index 0000000..1ce47b7 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/User/Codespaces/Secrets/PublicKey/PublicKeyRequestBuilder.cs @@ -0,0 +1,93 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.User.Codespaces.Secrets.PublicKey +{ + /// + /// Builds and executes requests for operations under \user\codespaces\secrets\public-key + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class PublicKeyRequestBuilder : BaseRequestBuilder + { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public PublicKeyRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/user/codespaces/secrets/public-key", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public PublicKeyRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/user/codespaces/secrets/public-key", rawUrl) + { + } + /// + /// 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. + /// API method documentation + /// + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Models.CodespacesUserPublicKey.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false); + } + /// + /// 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. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.User.Codespaces.Secrets.PublicKey.PublicKeyRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.User.Codespaces.Secrets.PublicKey.PublicKeyRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class PublicKeyRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/User/Codespaces/Secrets/SecretsGetResponse.cs b/src/Ayllu.Github.Client/Github/Client/User/Codespaces/Secrets/SecretsGetResponse.cs new file mode 100644 index 0000000..f3ed0de --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/User/Codespaces/Secrets/SecretsGetResponse.cs @@ -0,0 +1,70 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.User.Codespaces.Secrets +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class SecretsGetResponse : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The secrets property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? Secrets { get; set; } +#nullable restore +#else + public List Secrets { get; set; } +#endif + /// The total_count property + public int? TotalCount { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public SecretsGetResponse() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.User.Codespaces.Secrets.SecretsGetResponse CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.User.Codespaces.Secrets.SecretsGetResponse(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "secrets", n => { Secrets = n.GetCollectionOfObjectValues(global::Ayllu.Github.Client.Models.CodespacesSecret.CreateFromDiscriminatorValue)?.AsList(); } }, + { "total_count", n => { TotalCount = n.GetIntValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteCollectionOfObjectValues("secrets", Secrets); + writer.WriteIntValue("total_count", TotalCount); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/User/Codespaces/Secrets/SecretsRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/User/Codespaces/Secrets/SecretsRequestBuilder.cs new file mode 100644 index 0000000..85ef309 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/User/Codespaces/Secrets/SecretsRequestBuilder.cs @@ -0,0 +1,144 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.User.Codespaces.Secrets.Item; +using Ayllu.Github.Client.User.Codespaces.Secrets.PublicKey; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.User.Codespaces.Secrets +{ + /// + /// Builds and executes requests for operations under \user\codespaces\secrets + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class SecretsRequestBuilder : BaseRequestBuilder + { + /// The publicKey property + public global::Ayllu.Github.Client.User.Codespaces.Secrets.PublicKey.PublicKeyRequestBuilder PublicKey + { + get => new global::Ayllu.Github.Client.User.Codespaces.Secrets.PublicKey.PublicKeyRequestBuilder(PathParameters, RequestAdapter); + } + /// Gets an item from the Ayllu.Github.Client.user.codespaces.secrets.item collection + /// The name of the secret. + /// A + public global::Ayllu.Github.Client.User.Codespaces.Secrets.Item.WithSecret_nameItemRequestBuilder this[string position] + { + get + { + var urlTplParams = new Dictionary(PathParameters); + urlTplParams.Add("secret_name", position); + return new global::Ayllu.Github.Client.User.Codespaces.Secrets.Item.WithSecret_nameItemRequestBuilder(urlTplParams, RequestAdapter); + } + } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public SecretsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/user/codespaces/secrets{?page*,per_page*}", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public SecretsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/user/codespaces/secrets{?page*,per_page*}", rawUrl) + { + } + /// + /// 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. + /// API method documentation + /// + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsSecretsGetResponseAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task GetAsSecretsGetResponseAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.User.Codespaces.Secrets.SecretsGetResponse.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false); + } + /// + /// 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. + /// API method documentation + /// + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + [Obsolete("This method is obsolete. Use GetAsSecretsGetResponseAsync instead.")] +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.User.Codespaces.Secrets.SecretsResponse.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false); + } + /// + /// 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. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.User.Codespaces.Secrets.SecretsRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.User.Codespaces.Secrets.SecretsRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// 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. + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class SecretsRequestBuilderGetQueryParameters + { + /// The page number of the results to fetch. For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." + [QueryParameter("page")] + public int? Page { get; set; } + /// The number of results per page (max 100). For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." + [QueryParameter("per_page")] + public int? PerPage { get; set; } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class SecretsRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/User/Codespaces/Secrets/SecretsResponse.cs b/src/Ayllu.Github.Client/Github/Client/User/Codespaces/Secrets/SecretsResponse.cs new file mode 100644 index 0000000..9482ea7 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/User/Codespaces/Secrets/SecretsResponse.cs @@ -0,0 +1,28 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.User.Codespaces.Secrets +{ + [Obsolete("This class is obsolete. Use SecretsGetResponse instead.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class SecretsResponse : global::Ayllu.Github.Client.User.Codespaces.Secrets.SecretsGetResponse, IParsable + #pragma warning restore CS1591 + { + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static new global::Ayllu.Github.Client.User.Codespaces.Secrets.SecretsResponse CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.User.Codespaces.Secrets.SecretsResponse(); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/User/Docker/Conflicts/ConflictsRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/User/Docker/Conflicts/ConflictsRequestBuilder.cs new file mode 100644 index 0000000..76eaf16 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/User/Docker/Conflicts/ConflictsRequestBuilder.cs @@ -0,0 +1,94 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.User.Docker.Conflicts +{ + /// + /// Builds and executes requests for operations under \user\docker\conflicts + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class ConflictsRequestBuilder : BaseRequestBuilder + { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public ConflictsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/user/docker/conflicts", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public ConflictsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/user/docker/conflicts", rawUrl) + { + } + /// + /// 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. + /// API method documentation + /// + /// A List<global::Ayllu.Github.Client.Models.Package> + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task?> GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task> GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var collectionResult = await RequestAdapter.SendCollectionAsync(requestInfo, global::Ayllu.Github.Client.Models.Package.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false); + return collectionResult?.AsList(); + } + /// + /// 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. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.User.Docker.Conflicts.ConflictsRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.User.Docker.Conflicts.ConflictsRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class ConflictsRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/User/Docker/DockerRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/User/Docker/DockerRequestBuilder.cs new file mode 100644 index 0000000..469f525 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/User/Docker/DockerRequestBuilder.cs @@ -0,0 +1,41 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.User.Docker.Conflicts; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System; +namespace Ayllu.Github.Client.User.Docker +{ + /// + /// Builds and executes requests for operations under \user\docker + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class DockerRequestBuilder : BaseRequestBuilder + { + /// The conflicts property + public global::Ayllu.Github.Client.User.Docker.Conflicts.ConflictsRequestBuilder Conflicts + { + get => new global::Ayllu.Github.Client.User.Docker.Conflicts.ConflictsRequestBuilder(PathParameters, RequestAdapter); + } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public DockerRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/user/docker", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public DockerRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/user/docker", rawUrl) + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/User/Email/EmailRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/User/Email/EmailRequestBuilder.cs new file mode 100644 index 0000000..60cf633 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/User/Email/EmailRequestBuilder.cs @@ -0,0 +1,41 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.User.Email.Visibility; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System; +namespace Ayllu.Github.Client.User.Email +{ + /// + /// Builds and executes requests for operations under \user\email + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class EmailRequestBuilder : BaseRequestBuilder + { + /// The visibility property + public global::Ayllu.Github.Client.User.Email.Visibility.VisibilityRequestBuilder Visibility + { + get => new global::Ayllu.Github.Client.User.Email.Visibility.VisibilityRequestBuilder(PathParameters, RequestAdapter); + } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public EmailRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/user/email", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public EmailRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/user/email", rawUrl) + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/User/Email/Visibility/VisibilityPatchRequestBody.cs b/src/Ayllu.Github.Client/Github/Client/User/Email/Visibility/VisibilityPatchRequestBody.cs new file mode 100644 index 0000000..22fbca4 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/User/Email/Visibility/VisibilityPatchRequestBody.cs @@ -0,0 +1,59 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.User.Email.Visibility +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class VisibilityPatchRequestBody : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// Denotes whether an email is publicly visible. + public global::Ayllu.Github.Client.User.Email.Visibility.VisibilityPatchRequestBody_visibility? Visibility { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public VisibilityPatchRequestBody() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.User.Email.Visibility.VisibilityPatchRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.User.Email.Visibility.VisibilityPatchRequestBody(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "visibility", n => { Visibility = n.GetEnumValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteEnumValue("visibility", Visibility); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/User/Email/Visibility/VisibilityPatchRequestBody_visibility.cs b/src/Ayllu.Github.Client/Github/Client/User/Email/Visibility/VisibilityPatchRequestBody_visibility.cs new file mode 100644 index 0000000..c5da2d7 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/User/Email/Visibility/VisibilityPatchRequestBody_visibility.cs @@ -0,0 +1,19 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.User.Email.Visibility +{ + /// Denotes whether an email is publicly visible. + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public enum VisibilityPatchRequestBody_visibility + { + [EnumMember(Value = "public")] + #pragma warning disable CS1591 + Public, + #pragma warning restore CS1591 + [EnumMember(Value = "private")] + #pragma warning disable CS1591 + Private, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/User/Email/Visibility/VisibilityRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/User/Email/Visibility/VisibilityRequestBuilder.cs new file mode 100644 index 0000000..d9501c9 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/User/Email/Visibility/VisibilityRequestBuilder.cs @@ -0,0 +1,110 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.User.Email.Visibility +{ + /// + /// Builds and executes requests for operations under \user\email\visibility + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class VisibilityRequestBuilder : BaseRequestBuilder + { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public VisibilityRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/user/email/visibility", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public VisibilityRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/user/email/visibility", rawUrl) + { + } + /// + /// Sets the visibility for your primary email addresses. + /// API method documentation + /// + /// A List<global::Ayllu.Github.Client.Models.Email> + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 401 status code + /// When receiving a 403 status code + /// When receiving a 404 status code + /// When receiving a 422 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task?> PatchAsync(global::Ayllu.Github.Client.User.Email.Visibility.VisibilityPatchRequestBody body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task> PatchAsync(global::Ayllu.Github.Client.User.Email.Visibility.VisibilityPatchRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPatchRequestInformation(body, requestConfiguration); + var errorMapping = new Dictionary> + { + { "401", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "403", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "404", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "422", global::Ayllu.Github.Client.Models.ValidationError.CreateFromDiscriminatorValue }, + }; + var collectionResult = await RequestAdapter.SendCollectionAsync(requestInfo, global::Ayllu.Github.Client.Models.Email.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + return collectionResult?.AsList(); + } + /// + /// Sets the visibility for your primary email addresses. + /// + /// A + /// The request body + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPatchRequestInformation(global::Ayllu.Github.Client.User.Email.Visibility.VisibilityPatchRequestBody body, Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToPatchRequestInformation(global::Ayllu.Github.Client.User.Email.Visibility.VisibilityPatchRequestBody body, Action> requestConfiguration = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.User.Email.Visibility.VisibilityRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.User.Email.Visibility.VisibilityRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class VisibilityRequestBuilderPatchRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/User/Emails/EmailsDeleteRequestBodyMember1.cs b/src/Ayllu.Github.Client/Github/Client/User/Emails/EmailsDeleteRequestBodyMember1.cs new file mode 100644 index 0000000..61a3616 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/User/Emails/EmailsDeleteRequestBodyMember1.cs @@ -0,0 +1,66 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.User.Emails +{ + /// + /// 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. + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class EmailsDeleteRequestBodyMember1 : IAdditionalDataHolder, IParsable + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// Email addresses associated with the GitHub user account. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? Emails { get; set; } +#nullable restore +#else + public List Emails { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public EmailsDeleteRequestBodyMember1() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.User.Emails.EmailsDeleteRequestBodyMember1 CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.User.Emails.EmailsDeleteRequestBodyMember1(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "emails", n => { Emails = n.GetCollectionOfPrimitiveValues()?.AsList(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteCollectionOfPrimitiveValues("emails", Emails); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/User/Emails/EmailsPostRequestBodyMember1.cs b/src/Ayllu.Github.Client/Github/Client/User/Emails/EmailsPostRequestBodyMember1.cs new file mode 100644 index 0000000..bd5f2b2 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/User/Emails/EmailsPostRequestBodyMember1.cs @@ -0,0 +1,65 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.User.Emails +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class EmailsPostRequestBodyMember1 : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// 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. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? Emails { get; set; } +#nullable restore +#else + public List Emails { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public EmailsPostRequestBodyMember1() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.User.Emails.EmailsPostRequestBodyMember1 CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.User.Emails.EmailsPostRequestBodyMember1(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "emails", n => { Emails = n.GetCollectionOfPrimitiveValues()?.AsList(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteCollectionOfPrimitiveValues("emails", Emails); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/User/Emails/EmailsRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/User/Emails/EmailsRequestBuilder.cs new file mode 100644 index 0000000..6a8fc17 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/User/Emails/EmailsRequestBuilder.cs @@ -0,0 +1,414 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.User.Emails +{ + /// + /// Builds and executes requests for operations under \user\emails + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class EmailsRequestBuilder : BaseRequestBuilder + { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public EmailsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/user/emails{?page*,per_page*}", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public EmailsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/user/emails{?page*,per_page*}", rawUrl) + { + } + /// + /// OAuth app tokens and personal access tokens (classic) need the `user` scope to use this endpoint. + /// API method documentation + /// + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 401 status code + /// When receiving a 403 status code + /// When receiving a 404 status code + /// When receiving a 422 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task DeleteAsync(global::Ayllu.Github.Client.User.Emails.EmailsRequestBuilder.EmailsDeleteRequestBody body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task DeleteAsync(global::Ayllu.Github.Client.User.Emails.EmailsRequestBuilder.EmailsDeleteRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = ToDeleteRequestInformation(body, requestConfiguration); + var errorMapping = new Dictionary> + { + { "401", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "403", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "404", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "422", global::Ayllu.Github.Client.Models.ValidationError.CreateFromDiscriminatorValue }, + }; + await RequestAdapter.SendNoContentAsync(requestInfo, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// 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. + /// API method documentation + /// + /// A List<global::Ayllu.Github.Client.Models.Email> + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 401 status code + /// When receiving a 403 status code + /// When receiving a 404 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task?> GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task> GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "401", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "403", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "404", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + }; + var collectionResult = await RequestAdapter.SendCollectionAsync(requestInfo, global::Ayllu.Github.Client.Models.Email.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + return collectionResult?.AsList(); + } + /// + /// OAuth app tokens and personal access tokens (classic) need the `user` scope to use this endpoint. + /// API method documentation + /// + /// A List<global::Ayllu.Github.Client.Models.Email> + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 401 status code + /// When receiving a 403 status code + /// When receiving a 404 status code + /// When receiving a 422 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task?> PostAsync(global::Ayllu.Github.Client.User.Emails.EmailsRequestBuilder.EmailsPostRequestBody body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task> PostAsync(global::Ayllu.Github.Client.User.Emails.EmailsRequestBuilder.EmailsPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPostRequestInformation(body, requestConfiguration); + var errorMapping = new Dictionary> + { + { "401", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "403", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "404", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "422", global::Ayllu.Github.Client.Models.ValidationError.CreateFromDiscriminatorValue }, + }; + var collectionResult = await RequestAdapter.SendCollectionAsync(requestInfo, global::Ayllu.Github.Client.Models.Email.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + return collectionResult?.AsList(); + } + /// + /// OAuth app tokens and personal access tokens (classic) need the `user` scope to use this endpoint. + /// + /// A + /// The request body + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToDeleteRequestInformation(global::Ayllu.Github.Client.User.Emails.EmailsRequestBuilder.EmailsDeleteRequestBody body, Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToDeleteRequestInformation(global::Ayllu.Github.Client.User.Emails.EmailsRequestBuilder.EmailsDeleteRequestBody body, Action> requestConfiguration = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation(Method.DELETE, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + return requestInfo; + } + /// + /// 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. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// OAuth app tokens and personal access tokens (classic) need the `user` scope to use this endpoint. + /// + /// A + /// The request body + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPostRequestInformation(global::Ayllu.Github.Client.User.Emails.EmailsRequestBuilder.EmailsPostRequestBody body, Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToPostRequestInformation(global::Ayllu.Github.Client.User.Emails.EmailsRequestBuilder.EmailsPostRequestBody body, Action> requestConfiguration = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.User.Emails.EmailsRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.User.Emails.EmailsRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Composed type wrapper for classes , , List<string> + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class EmailsDeleteRequestBody : IComposedTypeWrapper, IParsable + { + /// Composed type representation for type +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.User.Emails.EmailsDeleteRequestBodyMember1? EmailsDeleteRequestBodyMember1 { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.User.Emails.EmailsDeleteRequestBodyMember1 EmailsDeleteRequestBodyMember1 { get; set; } +#endif + /// Composed type representation for type +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? EmailsDeleteRequestBodyString { get; set; } +#nullable restore +#else + public string EmailsDeleteRequestBodyString { get; set; } +#endif + /// Composed type representation for type List<string> +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? String { get; set; } +#nullable restore +#else + public List String { get; set; } +#endif + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.User.Emails.EmailsRequestBuilder.EmailsDeleteRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + var mappingValue = parseNode.GetChildNode("")?.GetStringValue(); + var result = new global::Ayllu.Github.Client.User.Emails.EmailsRequestBuilder.EmailsDeleteRequestBody(); + if("".Equals(mappingValue, StringComparison.OrdinalIgnoreCase)) + { + result.EmailsDeleteRequestBodyMember1 = new global::Ayllu.Github.Client.User.Emails.EmailsDeleteRequestBodyMember1(); + } + else if(parseNode.GetStringValue() is string emailsDeleteRequestBodyStringValue) + { + result.EmailsDeleteRequestBodyString = emailsDeleteRequestBodyStringValue; + } + else if(parseNode.GetCollectionOfPrimitiveValues()?.AsList() is List stringValue) + { + result.String = stringValue; + } + return result; + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + if(EmailsDeleteRequestBodyMember1 != null) + { + return EmailsDeleteRequestBodyMember1.GetFieldDeserializers(); + } + return new Dictionary>(); + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(EmailsDeleteRequestBodyMember1 != null) + { + writer.WriteObjectValue(null, EmailsDeleteRequestBodyMember1); + } + else if(EmailsDeleteRequestBodyString != null) + { + writer.WriteStringValue(null, EmailsDeleteRequestBodyString); + } + else if(String != null) + { + writer.WriteCollectionOfPrimitiveValues(null, String); + } + } + } + /// + /// Composed type wrapper for classes , , List<string> + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class EmailsPostRequestBody : IComposedTypeWrapper, IParsable + { + /// Composed type representation for type +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.User.Emails.EmailsPostRequestBodyMember1? EmailsPostRequestBodyMember1 { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.User.Emails.EmailsPostRequestBodyMember1 EmailsPostRequestBodyMember1 { get; set; } +#endif + /// Composed type representation for type +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? EmailsPostRequestBodyString { get; set; } +#nullable restore +#else + public string EmailsPostRequestBodyString { get; set; } +#endif + /// Composed type representation for type List<string> +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? String { get; set; } +#nullable restore +#else + public List String { get; set; } +#endif + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.User.Emails.EmailsRequestBuilder.EmailsPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + var mappingValue = parseNode.GetChildNode("")?.GetStringValue(); + var result = new global::Ayllu.Github.Client.User.Emails.EmailsRequestBuilder.EmailsPostRequestBody(); + if("".Equals(mappingValue, StringComparison.OrdinalIgnoreCase)) + { + result.EmailsPostRequestBodyMember1 = new global::Ayllu.Github.Client.User.Emails.EmailsPostRequestBodyMember1(); + } + else if(parseNode.GetStringValue() is string emailsPostRequestBodyStringValue) + { + result.EmailsPostRequestBodyString = emailsPostRequestBodyStringValue; + } + else if(parseNode.GetCollectionOfPrimitiveValues()?.AsList() is List stringValue) + { + result.String = stringValue; + } + return result; + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + if(EmailsPostRequestBodyMember1 != null) + { + return EmailsPostRequestBodyMember1.GetFieldDeserializers(); + } + return new Dictionary>(); + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(EmailsPostRequestBodyMember1 != null) + { + writer.WriteObjectValue(null, EmailsPostRequestBodyMember1); + } + else if(EmailsPostRequestBodyString != null) + { + writer.WriteStringValue(null, EmailsPostRequestBodyString); + } + else if(String != null) + { + writer.WriteCollectionOfPrimitiveValues(null, String); + } + } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class EmailsRequestBuilderDeleteRequestConfiguration : RequestConfiguration + { + } + /// + /// 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. + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class EmailsRequestBuilderGetQueryParameters + { + /// The page number of the results to fetch. For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." + [QueryParameter("page")] + public int? Page { get; set; } + /// The number of results per page (max 100). For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." + [QueryParameter("per_page")] + public int? PerPage { get; set; } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class EmailsRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class EmailsRequestBuilderPostRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/User/Followers/FollowersRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/User/Followers/FollowersRequestBuilder.cs new file mode 100644 index 0000000..30c5812 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/User/Followers/FollowersRequestBuilder.cs @@ -0,0 +1,114 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.User.Followers +{ + /// + /// Builds and executes requests for operations under \user\followers + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class FollowersRequestBuilder : BaseRequestBuilder + { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public FollowersRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/user/followers{?page*,per_page*}", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public FollowersRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/user/followers{?page*,per_page*}", rawUrl) + { + } + /// + /// Lists the people following the authenticated user. + /// API method documentation + /// + /// A List<global::Ayllu.Github.Client.Models.SimpleUser> + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 401 status code + /// When receiving a 403 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task?> GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task> GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "401", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "403", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + }; + var collectionResult = await RequestAdapter.SendCollectionAsync(requestInfo, global::Ayllu.Github.Client.Models.SimpleUser.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + return collectionResult?.AsList(); + } + /// + /// Lists the people following the authenticated user. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.User.Followers.FollowersRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.User.Followers.FollowersRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Lists the people following the authenticated user. + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class FollowersRequestBuilderGetQueryParameters + { + /// The page number of the results to fetch. For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." + [QueryParameter("page")] + public int? Page { get; set; } + /// The number of results per page (max 100). For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." + [QueryParameter("per_page")] + public int? PerPage { get; set; } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class FollowersRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/User/Following/FollowingRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/User/Following/FollowingRequestBuilder.cs new file mode 100644 index 0000000..a3b1fee --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/User/Following/FollowingRequestBuilder.cs @@ -0,0 +1,127 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Ayllu.Github.Client.User.Following.Item; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.User.Following +{ + /// + /// Builds and executes requests for operations under \user\following + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class FollowingRequestBuilder : BaseRequestBuilder + { + /// Gets an item from the Ayllu.Github.Client.user.following.item collection + /// The handle for the GitHub user account. + /// A + public global::Ayllu.Github.Client.User.Following.Item.WithUsernameItemRequestBuilder this[string position] + { + get + { + var urlTplParams = new Dictionary(PathParameters); + urlTplParams.Add("username", position); + return new global::Ayllu.Github.Client.User.Following.Item.WithUsernameItemRequestBuilder(urlTplParams, RequestAdapter); + } + } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public FollowingRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/user/following{?page*,per_page*}", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public FollowingRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/user/following{?page*,per_page*}", rawUrl) + { + } + /// + /// Lists the people who the authenticated user follows. + /// API method documentation + /// + /// A List<global::Ayllu.Github.Client.Models.SimpleUser> + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 401 status code + /// When receiving a 403 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task?> GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task> GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "401", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "403", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + }; + var collectionResult = await RequestAdapter.SendCollectionAsync(requestInfo, global::Ayllu.Github.Client.Models.SimpleUser.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + return collectionResult?.AsList(); + } + /// + /// Lists the people who the authenticated user follows. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.User.Following.FollowingRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.User.Following.FollowingRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Lists the people who the authenticated user follows. + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class FollowingRequestBuilderGetQueryParameters + { + /// The page number of the results to fetch. For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." + [QueryParameter("page")] + public int? Page { get; set; } + /// The number of results per page (max 100). For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." + [QueryParameter("per_page")] + public int? PerPage { get; set; } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class FollowingRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/User/Following/Item/WithUsernameItemRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/User/Following/Item/WithUsernameItemRequestBuilder.cs new file mode 100644 index 0000000..3f1c9fd --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/User/Following/Item/WithUsernameItemRequestBuilder.cs @@ -0,0 +1,208 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.User.Following.Item +{ + /// + /// Builds and executes requests for operations under \user\following\{username} + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithUsernameItemRequestBuilder : BaseRequestBuilder + { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public WithUsernameItemRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/user/following/{username}", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public WithUsernameItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/user/following/{username}", rawUrl) + { + } + /// + /// OAuth app tokens and personal access tokens (classic) need the `user:follow` scope to use this endpoint. + /// API method documentation + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 401 status code + /// When receiving a 403 status code + /// When receiving a 404 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task DeleteAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task DeleteAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToDeleteRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "401", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "403", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "404", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + }; + await RequestAdapter.SendNoContentAsync(requestInfo, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// Check if a person is followed by the authenticated user + /// API method documentation + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 401 status code + /// When receiving a 403 status code + /// When receiving a 404 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "401", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "403", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "404", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + }; + await RequestAdapter.SendNoContentAsync(requestInfo, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// 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/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. + /// API method documentation + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 401 status code + /// When receiving a 403 status code + /// When receiving a 404 status code + /// When receiving a 422 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PutAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task PutAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToPutRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "401", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "403", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "404", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "422", global::Ayllu.Github.Client.Models.ValidationError.CreateFromDiscriminatorValue }, + }; + await RequestAdapter.SendNoContentAsync(requestInfo, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// OAuth app tokens and personal access tokens (classic) need the `user:follow` scope to use this endpoint. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToDeleteRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToDeleteRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.DELETE, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// 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/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. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPutRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToPutRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.PUT, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.User.Following.Item.WithUsernameItemRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.User.Following.Item.WithUsernameItemRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithUsernameItemRequestBuilderDeleteRequestConfiguration : RequestConfiguration + { + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithUsernameItemRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithUsernameItemRequestBuilderPutRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/User/Gpg_keys/Gpg_keysPostRequestBody.cs b/src/Ayllu.Github.Client/Github/Client/User/Gpg_keys/Gpg_keysPostRequestBody.cs new file mode 100644 index 0000000..b3dff21 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/User/Gpg_keys/Gpg_keysPostRequestBody.cs @@ -0,0 +1,75 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.User.Gpg_keys +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class Gpg_keysPostRequestBody : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// A GPG key in ASCII-armored format. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? ArmoredPublicKey { get; set; } +#nullable restore +#else + public string ArmoredPublicKey { get; set; } +#endif + /// A descriptive name for the new key. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Name { get; set; } +#nullable restore +#else + public string Name { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public Gpg_keysPostRequestBody() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.User.Gpg_keys.Gpg_keysPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.User.Gpg_keys.Gpg_keysPostRequestBody(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "armored_public_key", n => { ArmoredPublicKey = n.GetStringValue(); } }, + { "name", n => { Name = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("armored_public_key", ArmoredPublicKey); + writer.WriteStringValue("name", Name); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/User/Gpg_keys/Gpg_keysRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/User/Gpg_keys/Gpg_keysRequestBuilder.cs new file mode 100644 index 0000000..f6dce30 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/User/Gpg_keys/Gpg_keysRequestBuilder.cs @@ -0,0 +1,204 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Ayllu.Github.Client.User.Gpg_keys.Item; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.User.Gpg_keys +{ + /// + /// Builds and executes requests for operations under \user\gpg_keys + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class Gpg_keysRequestBuilder : BaseRequestBuilder + { + /// Gets an item from the Ayllu.Github.Client.user.gpg_keys.item collection + /// The unique identifier of the GPG key. + /// A + public global::Ayllu.Github.Client.User.Gpg_keys.Item.WithGpg_key_ItemRequestBuilder this[int position] + { + get + { + var urlTplParams = new Dictionary(PathParameters); + urlTplParams.Add("gpg_key_id", position); + return new global::Ayllu.Github.Client.User.Gpg_keys.Item.WithGpg_key_ItemRequestBuilder(urlTplParams, RequestAdapter); + } + } + /// Gets an item from the Ayllu.Github.Client.user.gpg_keys.item collection + /// The unique identifier of the GPG key. + /// A + [Obsolete("This indexer is deprecated and will be removed in the next major version. Use the one with the typed parameter instead.")] + public global::Ayllu.Github.Client.User.Gpg_keys.Item.WithGpg_key_ItemRequestBuilder this[string position] + { + get + { + var urlTplParams = new Dictionary(PathParameters); + if (!string.IsNullOrWhiteSpace(position)) urlTplParams.Add("gpg_key_id", position); + return new global::Ayllu.Github.Client.User.Gpg_keys.Item.WithGpg_key_ItemRequestBuilder(urlTplParams, RequestAdapter); + } + } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public Gpg_keysRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/user/gpg_keys{?page*,per_page*}", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public Gpg_keysRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/user/gpg_keys{?page*,per_page*}", rawUrl) + { + } + /// + /// 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. + /// API method documentation + /// + /// A List<global::Ayllu.Github.Client.Models.GpgKey> + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 401 status code + /// When receiving a 403 status code + /// When receiving a 404 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task?> GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task> GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "401", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "403", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "404", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + }; + var collectionResult = await RequestAdapter.SendCollectionAsync(requestInfo, global::Ayllu.Github.Client.Models.GpgKey.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + return collectionResult?.AsList(); + } + /// + /// 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. + /// API method documentation + /// + /// A + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 401 status code + /// When receiving a 403 status code + /// When receiving a 404 status code + /// When receiving a 422 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PostAsync(global::Ayllu.Github.Client.User.Gpg_keys.Gpg_keysPostRequestBody body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task PostAsync(global::Ayllu.Github.Client.User.Gpg_keys.Gpg_keysPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPostRequestInformation(body, requestConfiguration); + var errorMapping = new Dictionary> + { + { "401", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "403", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "404", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "422", global::Ayllu.Github.Client.Models.ValidationError.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Models.GpgKey.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// 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. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// 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. + /// + /// A + /// The request body + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPostRequestInformation(global::Ayllu.Github.Client.User.Gpg_keys.Gpg_keysPostRequestBody body, Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToPostRequestInformation(global::Ayllu.Github.Client.User.Gpg_keys.Gpg_keysPostRequestBody body, Action> requestConfiguration = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.User.Gpg_keys.Gpg_keysRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.User.Gpg_keys.Gpg_keysRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// 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. + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class Gpg_keysRequestBuilderGetQueryParameters + { + /// The page number of the results to fetch. For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." + [QueryParameter("page")] + public int? Page { get; set; } + /// The number of results per page (max 100). For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." + [QueryParameter("per_page")] + public int? PerPage { get; set; } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class Gpg_keysRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class Gpg_keysRequestBuilderPostRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/User/Gpg_keys/Item/WithGpg_key_ItemRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/User/Gpg_keys/Item/WithGpg_key_ItemRequestBuilder.cs new file mode 100644 index 0000000..5ee6c64 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/User/Gpg_keys/Item/WithGpg_key_ItemRequestBuilder.cs @@ -0,0 +1,158 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.User.Gpg_keys.Item +{ + /// + /// Builds and executes requests for operations under \user\gpg_keys\{gpg_key_id} + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithGpg_key_ItemRequestBuilder : BaseRequestBuilder + { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public WithGpg_key_ItemRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/user/gpg_keys/{gpg_key_id}", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public WithGpg_key_ItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/user/gpg_keys/{gpg_key_id}", rawUrl) + { + } + /// + /// 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. + /// API method documentation + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 401 status code + /// When receiving a 403 status code + /// When receiving a 404 status code + /// When receiving a 422 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task DeleteAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task DeleteAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToDeleteRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "401", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "403", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "404", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "422", global::Ayllu.Github.Client.Models.ValidationError.CreateFromDiscriminatorValue }, + }; + await RequestAdapter.SendNoContentAsync(requestInfo, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// 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. + /// API method documentation + /// + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 401 status code + /// When receiving a 403 status code + /// When receiving a 404 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "401", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "403", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "404", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Models.GpgKey.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// 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. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToDeleteRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToDeleteRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.DELETE, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// 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. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.User.Gpg_keys.Item.WithGpg_key_ItemRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.User.Gpg_keys.Item.WithGpg_key_ItemRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithGpg_key_ItemRequestBuilderDeleteRequestConfiguration : RequestConfiguration + { + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithGpg_key_ItemRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/User/Installations/InstallationsGetResponse.cs b/src/Ayllu.Github.Client/Github/Client/User/Installations/InstallationsGetResponse.cs new file mode 100644 index 0000000..8dc9a08 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/User/Installations/InstallationsGetResponse.cs @@ -0,0 +1,70 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.User.Installations +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class InstallationsGetResponse : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The installations property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? Installations { get; set; } +#nullable restore +#else + public List Installations { get; set; } +#endif + /// The total_count property + public int? TotalCount { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public InstallationsGetResponse() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.User.Installations.InstallationsGetResponse CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.User.Installations.InstallationsGetResponse(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "installations", n => { Installations = n.GetCollectionOfObjectValues(global::Ayllu.Github.Client.Models.Installation.CreateFromDiscriminatorValue)?.AsList(); } }, + { "total_count", n => { TotalCount = n.GetIntValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteCollectionOfObjectValues("installations", Installations); + writer.WriteIntValue("total_count", TotalCount); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/User/Installations/InstallationsRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/User/Installations/InstallationsRequestBuilder.cs new file mode 100644 index 0000000..a0f72a4 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/User/Installations/InstallationsRequestBuilder.cs @@ -0,0 +1,166 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Ayllu.Github.Client.User.Installations.Item; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.User.Installations +{ + /// + /// Builds and executes requests for operations under \user\installations + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class InstallationsRequestBuilder : BaseRequestBuilder + { + /// Gets an item from the Ayllu.Github.Client.user.installations.item collection + /// The unique identifier of the installation. + /// A + public global::Ayllu.Github.Client.User.Installations.Item.WithInstallation_ItemRequestBuilder this[int position] + { + get + { + var urlTplParams = new Dictionary(PathParameters); + urlTplParams.Add("installation_id", position); + return new global::Ayllu.Github.Client.User.Installations.Item.WithInstallation_ItemRequestBuilder(urlTplParams, RequestAdapter); + } + } + /// Gets an item from the Ayllu.Github.Client.user.installations.item collection + /// The unique identifier of the installation. + /// A + [Obsolete("This indexer is deprecated and will be removed in the next major version. Use the one with the typed parameter instead.")] + public global::Ayllu.Github.Client.User.Installations.Item.WithInstallation_ItemRequestBuilder this[string position] + { + get + { + var urlTplParams = new Dictionary(PathParameters); + if (!string.IsNullOrWhiteSpace(position)) urlTplParams.Add("installation_id", position); + return new global::Ayllu.Github.Client.User.Installations.Item.WithInstallation_ItemRequestBuilder(urlTplParams, RequestAdapter); + } + } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public InstallationsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/user/installations{?page*,per_page*}", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public InstallationsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/user/installations{?page*,per_page*}", rawUrl) + { + } + /// + /// 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. + /// API method documentation + /// + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 401 status code + /// When receiving a 403 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsInstallationsGetResponseAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task GetAsInstallationsGetResponseAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "401", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "403", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.User.Installations.InstallationsGetResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// 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. + /// API method documentation + /// + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 401 status code + /// When receiving a 403 status code + [Obsolete("This method is obsolete. Use GetAsInstallationsGetResponseAsync instead.")] +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "401", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "403", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.User.Installations.InstallationsResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// 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. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.User.Installations.InstallationsRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.User.Installations.InstallationsRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// 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. + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class InstallationsRequestBuilderGetQueryParameters + { + /// The page number of the results to fetch. For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." + [QueryParameter("page")] + public int? Page { get; set; } + /// The number of results per page (max 100). For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." + [QueryParameter("per_page")] + public int? PerPage { get; set; } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class InstallationsRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/User/Installations/InstallationsResponse.cs b/src/Ayllu.Github.Client/Github/Client/User/Installations/InstallationsResponse.cs new file mode 100644 index 0000000..4c5f121 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/User/Installations/InstallationsResponse.cs @@ -0,0 +1,28 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.User.Installations +{ + [Obsolete("This class is obsolete. Use InstallationsGetResponse instead.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class InstallationsResponse : global::Ayllu.Github.Client.User.Installations.InstallationsGetResponse, IParsable + #pragma warning restore CS1591 + { + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static new global::Ayllu.Github.Client.User.Installations.InstallationsResponse CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.User.Installations.InstallationsResponse(); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/User/Installations/Item/Repositories/Item/WithRepository_ItemRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/User/Installations/Item/Repositories/Item/WithRepository_ItemRequestBuilder.cs new file mode 100644 index 0000000..bff48bc --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/User/Installations/Item/Repositories/Item/WithRepository_ItemRequestBuilder.cs @@ -0,0 +1,151 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.User.Installations.Item.Repositories.Item +{ + /// + /// Builds and executes requests for operations under \user\installations\{installation_id}\repositories\{repository_id} + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithRepository_ItemRequestBuilder : BaseRequestBuilder + { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public WithRepository_ItemRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/user/installations/{installation_id}/repositories/{repository_id}", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public WithRepository_ItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/user/installations/{installation_id}/repositories/{repository_id}", rawUrl) + { + } + /// + /// 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. + /// API method documentation + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 403 status code + /// When receiving a 404 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task DeleteAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task DeleteAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToDeleteRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "403", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "404", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + }; + await RequestAdapter.SendNoContentAsync(requestInfo, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// 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. + /// API method documentation + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 403 status code + /// When receiving a 404 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PutAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task PutAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToPutRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "403", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "404", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + }; + await RequestAdapter.SendNoContentAsync(requestInfo, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// 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. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToDeleteRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToDeleteRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.DELETE, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// 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. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPutRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToPutRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.PUT, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.User.Installations.Item.Repositories.Item.WithRepository_ItemRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.User.Installations.Item.Repositories.Item.WithRepository_ItemRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithRepository_ItemRequestBuilderDeleteRequestConfiguration : RequestConfiguration + { + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithRepository_ItemRequestBuilderPutRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/User/Installations/Item/Repositories/RepositoriesGetResponse.cs b/src/Ayllu.Github.Client/Github/Client/User/Installations/Item/Repositories/RepositoriesGetResponse.cs new file mode 100644 index 0000000..ef867e7 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/User/Installations/Item/Repositories/RepositoriesGetResponse.cs @@ -0,0 +1,80 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.User.Installations.Item.Repositories +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class RepositoriesGetResponse : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The repositories property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? Repositories { get; set; } +#nullable restore +#else + public List Repositories { get; set; } +#endif + /// The repository_selection property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? RepositorySelection { get; set; } +#nullable restore +#else + public string RepositorySelection { get; set; } +#endif + /// The total_count property + public int? TotalCount { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public RepositoriesGetResponse() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.User.Installations.Item.Repositories.RepositoriesGetResponse CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.User.Installations.Item.Repositories.RepositoriesGetResponse(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "repositories", n => { Repositories = n.GetCollectionOfObjectValues(global::Ayllu.Github.Client.Models.Repository.CreateFromDiscriminatorValue)?.AsList(); } }, + { "repository_selection", n => { RepositorySelection = n.GetStringValue(); } }, + { "total_count", n => { TotalCount = n.GetIntValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteCollectionOfObjectValues("repositories", Repositories); + writer.WriteStringValue("repository_selection", RepositorySelection); + writer.WriteIntValue("total_count", TotalCount); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/User/Installations/Item/Repositories/RepositoriesRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/User/Installations/Item/Repositories/RepositoriesRequestBuilder.cs new file mode 100644 index 0000000..abc2a69 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/User/Installations/Item/Repositories/RepositoriesRequestBuilder.cs @@ -0,0 +1,166 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Ayllu.Github.Client.User.Installations.Item.Repositories.Item; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.User.Installations.Item.Repositories +{ + /// + /// Builds and executes requests for operations under \user\installations\{installation_id}\repositories + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class RepositoriesRequestBuilder : BaseRequestBuilder + { + /// Gets an item from the Ayllu.Github.Client.user.installations.item.repositories.item collection + /// The unique identifier of the repository. + /// A + public global::Ayllu.Github.Client.User.Installations.Item.Repositories.Item.WithRepository_ItemRequestBuilder this[int position] + { + get + { + var urlTplParams = new Dictionary(PathParameters); + urlTplParams.Add("repository_id", position); + return new global::Ayllu.Github.Client.User.Installations.Item.Repositories.Item.WithRepository_ItemRequestBuilder(urlTplParams, RequestAdapter); + } + } + /// Gets an item from the Ayllu.Github.Client.user.installations.item.repositories.item collection + /// The unique identifier of the repository. + /// A + [Obsolete("This indexer is deprecated and will be removed in the next major version. Use the one with the typed parameter instead.")] + public global::Ayllu.Github.Client.User.Installations.Item.Repositories.Item.WithRepository_ItemRequestBuilder this[string position] + { + get + { + var urlTplParams = new Dictionary(PathParameters); + if (!string.IsNullOrWhiteSpace(position)) urlTplParams.Add("repository_id", position); + return new global::Ayllu.Github.Client.User.Installations.Item.Repositories.Item.WithRepository_ItemRequestBuilder(urlTplParams, RequestAdapter); + } + } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public RepositoriesRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/user/installations/{installation_id}/repositories{?page*,per_page*}", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public RepositoriesRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/user/installations/{installation_id}/repositories{?page*,per_page*}", rawUrl) + { + } + /// + /// 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. + /// API method documentation + /// + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 403 status code + /// When receiving a 404 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsRepositoriesGetResponseAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task GetAsRepositoriesGetResponseAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "403", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "404", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.User.Installations.Item.Repositories.RepositoriesGetResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// 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. + /// API method documentation + /// + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 403 status code + /// When receiving a 404 status code + [Obsolete("This method is obsolete. Use GetAsRepositoriesGetResponseAsync instead.")] +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "403", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "404", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.User.Installations.Item.Repositories.RepositoriesResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// 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. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.User.Installations.Item.Repositories.RepositoriesRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.User.Installations.Item.Repositories.RepositoriesRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// 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. + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class RepositoriesRequestBuilderGetQueryParameters + { + /// The page number of the results to fetch. For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." + [QueryParameter("page")] + public int? Page { get; set; } + /// The number of results per page (max 100). For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." + [QueryParameter("per_page")] + public int? PerPage { get; set; } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class RepositoriesRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/User/Installations/Item/Repositories/RepositoriesResponse.cs b/src/Ayllu.Github.Client/Github/Client/User/Installations/Item/Repositories/RepositoriesResponse.cs new file mode 100644 index 0000000..86ce69b --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/User/Installations/Item/Repositories/RepositoriesResponse.cs @@ -0,0 +1,28 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.User.Installations.Item.Repositories +{ + [Obsolete("This class is obsolete. Use RepositoriesGetResponse instead.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class RepositoriesResponse : global::Ayllu.Github.Client.User.Installations.Item.Repositories.RepositoriesGetResponse, IParsable + #pragma warning restore CS1591 + { + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static new global::Ayllu.Github.Client.User.Installations.Item.Repositories.RepositoriesResponse CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.User.Installations.Item.Repositories.RepositoriesResponse(); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/User/Installations/Item/WithInstallation_ItemRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/User/Installations/Item/WithInstallation_ItemRequestBuilder.cs new file mode 100644 index 0000000..cec82b7 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/User/Installations/Item/WithInstallation_ItemRequestBuilder.cs @@ -0,0 +1,41 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.User.Installations.Item.Repositories; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System; +namespace Ayllu.Github.Client.User.Installations.Item +{ + /// + /// Builds and executes requests for operations under \user\installations\{installation_id} + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithInstallation_ItemRequestBuilder : BaseRequestBuilder + { + /// The repositories property + public global::Ayllu.Github.Client.User.Installations.Item.Repositories.RepositoriesRequestBuilder Repositories + { + get => new global::Ayllu.Github.Client.User.Installations.Item.Repositories.RepositoriesRequestBuilder(PathParameters, RequestAdapter); + } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public WithInstallation_ItemRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/user/installations/{installation_id}", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public WithInstallation_ItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/user/installations/{installation_id}", rawUrl) + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/User/InteractionLimits/InteractionLimitsRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/User/InteractionLimits/InteractionLimitsRequestBuilder.cs new file mode 100644 index 0000000..24e757b --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/User/InteractionLimits/InteractionLimitsRequestBuilder.cs @@ -0,0 +1,193 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.User.InteractionLimits +{ + /// + /// Builds and executes requests for operations under \user\interaction-limits + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class InteractionLimitsRequestBuilder : BaseRequestBuilder + { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public InteractionLimitsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/user/interaction-limits", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public InteractionLimitsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/user/interaction-limits", rawUrl) + { + } + /// + /// Removes any interaction restrictions from your public repositories. + /// API method documentation + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task DeleteAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task DeleteAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToDeleteRequestInformation(requestConfiguration); + await RequestAdapter.SendNoContentAsync(requestInfo, default, cancellationToken).ConfigureAwait(false); + } + /// + /// Shows which type of GitHub user can interact with your public repositories and when the restriction expires. + /// API method documentation + /// + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Models.InteractionLimitResponse.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false); + } + /// + /// 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. + /// API method documentation + /// + /// A + /// Limit interactions to a specific type of user for a specified duration + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 422 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PutAsync(global::Ayllu.Github.Client.Models.InteractionLimit body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task PutAsync(global::Ayllu.Github.Client.Models.InteractionLimit body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPutRequestInformation(body, requestConfiguration); + var errorMapping = new Dictionary> + { + { "422", global::Ayllu.Github.Client.Models.ValidationError.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Models.InteractionLimitResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// Removes any interaction restrictions from your public repositories. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToDeleteRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToDeleteRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.DELETE, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + return requestInfo; + } + /// + /// Shows which type of GitHub user can interact with your public repositories and when the restriction expires. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// 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. + /// + /// A + /// Limit interactions to a specific type of user for a specified duration + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPutRequestInformation(global::Ayllu.Github.Client.Models.InteractionLimit body, Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToPutRequestInformation(global::Ayllu.Github.Client.Models.InteractionLimit body, Action> requestConfiguration = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation(Method.PUT, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.User.InteractionLimits.InteractionLimitsRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.User.InteractionLimits.InteractionLimitsRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class InteractionLimitsRequestBuilderDeleteRequestConfiguration : RequestConfiguration + { + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class InteractionLimitsRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class InteractionLimitsRequestBuilderPutRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/User/Issues/GetDirectionQueryParameterType.cs b/src/Ayllu.Github.Client/Github/Client/User/Issues/GetDirectionQueryParameterType.cs new file mode 100644 index 0000000..6d75829 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/User/Issues/GetDirectionQueryParameterType.cs @@ -0,0 +1,20 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.User.Issues +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public enum GetDirectionQueryParameterType + #pragma warning restore CS1591 + { + [EnumMember(Value = "asc")] + #pragma warning disable CS1591 + Asc, + #pragma warning restore CS1591 + [EnumMember(Value = "desc")] + #pragma warning disable CS1591 + Desc, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/User/Issues/GetFilterQueryParameterType.cs b/src/Ayllu.Github.Client/Github/Client/User/Issues/GetFilterQueryParameterType.cs new file mode 100644 index 0000000..0edb20f --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/User/Issues/GetFilterQueryParameterType.cs @@ -0,0 +1,36 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.User.Issues +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public enum GetFilterQueryParameterType + #pragma warning restore CS1591 + { + [EnumMember(Value = "assigned")] + #pragma warning disable CS1591 + Assigned, + #pragma warning restore CS1591 + [EnumMember(Value = "created")] + #pragma warning disable CS1591 + Created, + #pragma warning restore CS1591 + [EnumMember(Value = "mentioned")] + #pragma warning disable CS1591 + Mentioned, + #pragma warning restore CS1591 + [EnumMember(Value = "subscribed")] + #pragma warning disable CS1591 + Subscribed, + #pragma warning restore CS1591 + [EnumMember(Value = "repos")] + #pragma warning disable CS1591 + Repos, + #pragma warning restore CS1591 + [EnumMember(Value = "all")] + #pragma warning disable CS1591 + All, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/User/Issues/GetSortQueryParameterType.cs b/src/Ayllu.Github.Client/Github/Client/User/Issues/GetSortQueryParameterType.cs new file mode 100644 index 0000000..e82a44c --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/User/Issues/GetSortQueryParameterType.cs @@ -0,0 +1,24 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.User.Issues +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public enum GetSortQueryParameterType + #pragma warning restore CS1591 + { + [EnumMember(Value = "created")] + #pragma warning disable CS1591 + Created, + #pragma warning restore CS1591 + [EnumMember(Value = "updated")] + #pragma warning disable CS1591 + Updated, + #pragma warning restore CS1591 + [EnumMember(Value = "comments")] + #pragma warning disable CS1591 + Comments, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/User/Issues/GetStateQueryParameterType.cs b/src/Ayllu.Github.Client/Github/Client/User/Issues/GetStateQueryParameterType.cs new file mode 100644 index 0000000..2e229fe --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/User/Issues/GetStateQueryParameterType.cs @@ -0,0 +1,24 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.User.Issues +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public enum GetStateQueryParameterType + #pragma warning restore CS1591 + { + [EnumMember(Value = "open")] + #pragma warning disable CS1591 + Open, + #pragma warning restore CS1591 + [EnumMember(Value = "closed")] + #pragma warning disable CS1591 + Closed, + #pragma warning restore CS1591 + [EnumMember(Value = "all")] + #pragma warning disable CS1591 + All, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/User/Issues/IssuesRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/User/Issues/IssuesRequestBuilder.cs new file mode 100644 index 0000000..9e42085 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/User/Issues/IssuesRequestBuilder.cs @@ -0,0 +1,181 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.User.Issues +{ + /// + /// Builds and executes requests for operations under \user\issues + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class IssuesRequestBuilder : BaseRequestBuilder + { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public IssuesRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/user/issues{?direction*,filter*,labels*,page*,per_page*,since*,sort*,state*}", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public IssuesRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/user/issues{?direction*,filter*,labels*,page*,per_page*,since*,sort*,state*}", rawUrl) + { + } + /// + /// 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 this reason, "Issues" endpoints may return both issues and pull requests in the response. You can identify pull requests by the `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 pull request id, use the "[List pull requests](https://docs.github.com/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/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`. + /// API method documentation + /// + /// A List<global::Ayllu.Github.Client.Models.Issue> + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 404 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task?> GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task> GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "404", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + }; + var collectionResult = await RequestAdapter.SendCollectionAsync(requestInfo, global::Ayllu.Github.Client.Models.Issue.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + return collectionResult?.AsList(); + } + /// + /// 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 this reason, "Issues" endpoints may return both issues and pull requests in the response. You can identify pull requests by the `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 pull request id, use the "[List pull requests](https://docs.github.com/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/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`. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.User.Issues.IssuesRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.User.Issues.IssuesRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// 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 this reason, "Issues" endpoints may return both issues and pull requests in the response. You can identify pull requests by the `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 pull request id, use the "[List pull requests](https://docs.github.com/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/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`. + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class IssuesRequestBuilderGetQueryParameters + { + /// The direction to sort the results by. + [Obsolete("This property is deprecated, use DirectionAsGetDirectionQueryParameterType instead")] +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("direction")] + public string? Direction { get; set; } +#nullable restore +#else + [QueryParameter("direction")] + public string Direction { get; set; } +#endif + /// The direction to sort the results by. + [QueryParameter("direction")] + public global::Ayllu.Github.Client.User.Issues.GetDirectionQueryParameterType? DirectionAsGetDirectionQueryParameterType { get; set; } + /// 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. + [Obsolete("This property is deprecated, use FilterAsGetFilterQueryParameterType instead")] +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("filter")] + public string? Filter { get; set; } +#nullable restore +#else + [QueryParameter("filter")] + public string Filter { get; set; } +#endif + /// 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. + [QueryParameter("filter")] + public global::Ayllu.Github.Client.User.Issues.GetFilterQueryParameterType? FilterAsGetFilterQueryParameterType { get; set; } + /// A list of comma separated label names. Example: `bug,ui,@high` +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("labels")] + public string? Labels { get; set; } +#nullable restore +#else + [QueryParameter("labels")] + public string Labels { get; set; } +#endif + /// The page number of the results to fetch. For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." + [QueryParameter("page")] + public int? Page { get; set; } + /// The number of results per page (max 100). For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." + [QueryParameter("per_page")] + public int? PerPage { get; set; } + /// 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`. + [QueryParameter("since")] + public DateTimeOffset? Since { get; set; } + /// What to sort results by. + [Obsolete("This property is deprecated, use SortAsGetSortQueryParameterType instead")] +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("sort")] + public string? Sort { get; set; } +#nullable restore +#else + [QueryParameter("sort")] + public string Sort { get; set; } +#endif + /// What to sort results by. + [QueryParameter("sort")] + public global::Ayllu.Github.Client.User.Issues.GetSortQueryParameterType? SortAsGetSortQueryParameterType { get; set; } + /// Indicates the state of the issues to return. + [Obsolete("This property is deprecated, use StateAsGetStateQueryParameterType instead")] +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("state")] + public string? State { get; set; } +#nullable restore +#else + [QueryParameter("state")] + public string State { get; set; } +#endif + /// Indicates the state of the issues to return. + [QueryParameter("state")] + public global::Ayllu.Github.Client.User.Issues.GetStateQueryParameterType? StateAsGetStateQueryParameterType { get; set; } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class IssuesRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/User/Item/WithAccount_ItemRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/User/Item/WithAccount_ItemRequestBuilder.cs new file mode 100644 index 0000000..ae3e840 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/User/Item/WithAccount_ItemRequestBuilder.cs @@ -0,0 +1,273 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.User.Item +{ + /// + /// Builds and executes requests for operations under \user\{account_id} + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithAccount_ItemRequestBuilder : BaseRequestBuilder + { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public WithAccount_ItemRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/user/{account_id}", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public WithAccount_ItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/user/{account_id}", rawUrl) + { + } + /// + /// 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.If you are requesting information about an [Enterprise Managed User](https://docs.github.com/enterprise-cloud@latest/admin/managing-iam/understanding-iam-for-enterprises/about-enterprise-managed-users), or a GitHub App bot that is installed in an organization that uses Enterprise Managed Users, your requests must be authenticated as a user or GitHub App that has access to the organization to view that account's information. If you are not authorized, the request will return a `404 Not Found` status.The `email` key in the following response is the publicly visible email address from your GitHub [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. For more information, see [Authentication](https://docs.github.com/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/rest/users/emails). + /// API method documentation + /// + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 404 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsWithAccount_GetResponseAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task GetAsWithAccount_GetResponseAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "404", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.User.Item.WithAccount_ItemRequestBuilder.WithAccount_GetResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// 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.If you are requesting information about an [Enterprise Managed User](https://docs.github.com/enterprise-cloud@latest/admin/managing-iam/understanding-iam-for-enterprises/about-enterprise-managed-users), or a GitHub App bot that is installed in an organization that uses Enterprise Managed Users, your requests must be authenticated as a user or GitHub App that has access to the organization to view that account's information. If you are not authorized, the request will return a `404 Not Found` status.The `email` key in the following response is the publicly visible email address from your GitHub [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. For more information, see [Authentication](https://docs.github.com/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/rest/users/emails). + /// API method documentation + /// + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 404 status code + [Obsolete("This method is obsolete. Use GetAsWithAccount_GetResponseAsync instead.")] +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "404", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.User.Item.WithAccount_ItemRequestBuilder.WithAccount_Response.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// 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.If you are requesting information about an [Enterprise Managed User](https://docs.github.com/enterprise-cloud@latest/admin/managing-iam/understanding-iam-for-enterprises/about-enterprise-managed-users), or a GitHub App bot that is installed in an organization that uses Enterprise Managed Users, your requests must be authenticated as a user or GitHub App that has access to the organization to view that account's information. If you are not authorized, the request will return a `404 Not Found` status.The `email` key in the following response is the publicly visible email address from your GitHub [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. For more information, see [Authentication](https://docs.github.com/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/rest/users/emails). + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.User.Item.WithAccount_ItemRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.User.Item.WithAccount_ItemRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Composed type wrapper for classes , + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithAccount_GetResponse : IComposedTypeWrapper, IParsable + { + /// Composed type representation for type +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.PrivateUser? PrivateUser { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.PrivateUser PrivateUser { get; set; } +#endif + /// Composed type representation for type +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.PublicUser? PublicUser { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.PublicUser PublicUser { get; set; } +#endif + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.User.Item.WithAccount_ItemRequestBuilder.WithAccount_GetResponse CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + var mappingValue = parseNode.GetChildNode("user_view_type")?.GetStringValue(); + var result = new global::Ayllu.Github.Client.User.Item.WithAccount_ItemRequestBuilder.WithAccount_GetResponse(); + if("private".Equals(mappingValue, StringComparison.OrdinalIgnoreCase)) + { + result.PrivateUser = new global::Ayllu.Github.Client.Models.PrivateUser(); + } + else if("public".Equals(mappingValue, StringComparison.OrdinalIgnoreCase)) + { + result.PublicUser = new global::Ayllu.Github.Client.Models.PublicUser(); + } + return result; + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + if(PrivateUser != null) + { + return PrivateUser.GetFieldDeserializers(); + } + else if(PublicUser != null) + { + return PublicUser.GetFieldDeserializers(); + } + return new Dictionary>(); + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(PrivateUser != null) + { + writer.WriteObjectValue(null, PrivateUser); + } + else if(PublicUser != null) + { + writer.WriteObjectValue(null, PublicUser); + } + } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithAccount_ItemRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + /// + /// Composed type wrapper for classes , + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithAccount_Response : IComposedTypeWrapper, IParsable + { + /// Composed type representation for type +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.PrivateUser? PrivateUser { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.PrivateUser PrivateUser { get; set; } +#endif + /// Composed type representation for type +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.PublicUser? PublicUser { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.PublicUser PublicUser { get; set; } +#endif + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.User.Item.WithAccount_ItemRequestBuilder.WithAccount_Response CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + var mappingValue = parseNode.GetChildNode("user_view_type")?.GetStringValue(); + var result = new global::Ayllu.Github.Client.User.Item.WithAccount_ItemRequestBuilder.WithAccount_Response(); + if("private".Equals(mappingValue, StringComparison.OrdinalIgnoreCase)) + { + result.PrivateUser = new global::Ayllu.Github.Client.Models.PrivateUser(); + } + else if("public".Equals(mappingValue, StringComparison.OrdinalIgnoreCase)) + { + result.PublicUser = new global::Ayllu.Github.Client.Models.PublicUser(); + } + return result; + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + if(PrivateUser != null) + { + return PrivateUser.GetFieldDeserializers(); + } + else if(PublicUser != null) + { + return PublicUser.GetFieldDeserializers(); + } + return new Dictionary>(); + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(PrivateUser != null) + { + writer.WriteObjectValue(null, PrivateUser); + } + else if(PublicUser != null) + { + writer.WriteObjectValue(null, PublicUser); + } + } + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/User/Keys/Item/WithKey_ItemRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/User/Keys/Item/WithKey_ItemRequestBuilder.cs new file mode 100644 index 0000000..0a7e130 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/User/Keys/Item/WithKey_ItemRequestBuilder.cs @@ -0,0 +1,156 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.User.Keys.Item +{ + /// + /// Builds and executes requests for operations under \user\keys\{key_id} + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithKey_ItemRequestBuilder : BaseRequestBuilder + { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public WithKey_ItemRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/user/keys/{key_id}", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public WithKey_ItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/user/keys/{key_id}", rawUrl) + { + } + /// + /// 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. + /// API method documentation + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 401 status code + /// When receiving a 403 status code + /// When receiving a 404 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task DeleteAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task DeleteAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToDeleteRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "401", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "403", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "404", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + }; + await RequestAdapter.SendNoContentAsync(requestInfo, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// 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. + /// API method documentation + /// + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 401 status code + /// When receiving a 403 status code + /// When receiving a 404 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "401", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "403", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "404", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Models.Key.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// 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. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToDeleteRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToDeleteRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.DELETE, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// 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. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.User.Keys.Item.WithKey_ItemRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.User.Keys.Item.WithKey_ItemRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithKey_ItemRequestBuilderDeleteRequestConfiguration : RequestConfiguration + { + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithKey_ItemRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/User/Keys/KeysPostRequestBody.cs b/src/Ayllu.Github.Client/Github/Client/User/Keys/KeysPostRequestBody.cs new file mode 100644 index 0000000..166620f --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/User/Keys/KeysPostRequestBody.cs @@ -0,0 +1,75 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.User.Keys +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class KeysPostRequestBody : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The public SSH key to add to your GitHub account. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Key { get; set; } +#nullable restore +#else + public string Key { get; set; } +#endif + /// A descriptive name for the new key. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Title { get; set; } +#nullable restore +#else + public string Title { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public KeysPostRequestBody() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.User.Keys.KeysPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.User.Keys.KeysPostRequestBody(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "key", n => { Key = n.GetStringValue(); } }, + { "title", n => { Title = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("key", Key); + writer.WriteStringValue("title", Title); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/User/Keys/KeysRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/User/Keys/KeysRequestBuilder.cs new file mode 100644 index 0000000..93ed71a --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/User/Keys/KeysRequestBuilder.cs @@ -0,0 +1,204 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Ayllu.Github.Client.User.Keys.Item; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.User.Keys +{ + /// + /// Builds and executes requests for operations under \user\keys + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class KeysRequestBuilder : BaseRequestBuilder + { + /// Gets an item from the Ayllu.Github.Client.user.keys.item collection + /// The unique identifier of the key. + /// A + public global::Ayllu.Github.Client.User.Keys.Item.WithKey_ItemRequestBuilder this[int position] + { + get + { + var urlTplParams = new Dictionary(PathParameters); + urlTplParams.Add("key_id", position); + return new global::Ayllu.Github.Client.User.Keys.Item.WithKey_ItemRequestBuilder(urlTplParams, RequestAdapter); + } + } + /// Gets an item from the Ayllu.Github.Client.user.keys.item collection + /// The unique identifier of the key. + /// A + [Obsolete("This indexer is deprecated and will be removed in the next major version. Use the one with the typed parameter instead.")] + public global::Ayllu.Github.Client.User.Keys.Item.WithKey_ItemRequestBuilder this[string position] + { + get + { + var urlTplParams = new Dictionary(PathParameters); + if (!string.IsNullOrWhiteSpace(position)) urlTplParams.Add("key_id", position); + return new global::Ayllu.Github.Client.User.Keys.Item.WithKey_ItemRequestBuilder(urlTplParams, RequestAdapter); + } + } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public KeysRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/user/keys{?page*,per_page*}", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public KeysRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/user/keys{?page*,per_page*}", rawUrl) + { + } + /// + /// 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. + /// API method documentation + /// + /// A List<global::Ayllu.Github.Client.Models.Key> + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 401 status code + /// When receiving a 403 status code + /// When receiving a 404 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task?> GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task> GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "401", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "403", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "404", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + }; + var collectionResult = await RequestAdapter.SendCollectionAsync(requestInfo, global::Ayllu.Github.Client.Models.Key.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + return collectionResult?.AsList(); + } + /// + /// 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. + /// API method documentation + /// + /// A + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 401 status code + /// When receiving a 403 status code + /// When receiving a 404 status code + /// When receiving a 422 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PostAsync(global::Ayllu.Github.Client.User.Keys.KeysPostRequestBody body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task PostAsync(global::Ayllu.Github.Client.User.Keys.KeysPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPostRequestInformation(body, requestConfiguration); + var errorMapping = new Dictionary> + { + { "401", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "403", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "404", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "422", global::Ayllu.Github.Client.Models.ValidationError.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Models.Key.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// 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. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// 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. + /// + /// A + /// The request body + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPostRequestInformation(global::Ayllu.Github.Client.User.Keys.KeysPostRequestBody body, Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToPostRequestInformation(global::Ayllu.Github.Client.User.Keys.KeysPostRequestBody body, Action> requestConfiguration = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.User.Keys.KeysRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.User.Keys.KeysRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// 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. + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class KeysRequestBuilderGetQueryParameters + { + /// The page number of the results to fetch. For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." + [QueryParameter("page")] + public int? Page { get; set; } + /// The number of results per page (max 100). For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." + [QueryParameter("per_page")] + public int? PerPage { get; set; } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class KeysRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class KeysRequestBuilderPostRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/User/Marketplace_purchases/Marketplace_purchasesRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/User/Marketplace_purchases/Marketplace_purchasesRequestBuilder.cs new file mode 100644 index 0000000..7d54bbb --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/User/Marketplace_purchases/Marketplace_purchasesRequestBuilder.cs @@ -0,0 +1,120 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Ayllu.Github.Client.User.Marketplace_purchases.Stubbed; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.User.Marketplace_purchases +{ + /// + /// Builds and executes requests for operations under \user\marketplace_purchases + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class Marketplace_purchasesRequestBuilder : BaseRequestBuilder + { + /// The stubbed property + public global::Ayllu.Github.Client.User.Marketplace_purchases.Stubbed.StubbedRequestBuilder Stubbed + { + get => new global::Ayllu.Github.Client.User.Marketplace_purchases.Stubbed.StubbedRequestBuilder(PathParameters, RequestAdapter); + } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public Marketplace_purchasesRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/user/marketplace_purchases{?page*,per_page*}", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public Marketplace_purchasesRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/user/marketplace_purchases{?page*,per_page*}", rawUrl) + { + } + /// + /// Lists the active subscriptions for the authenticated user. + /// API method documentation + /// + /// A List<global::Ayllu.Github.Client.Models.UserMarketplacePurchase> + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 401 status code + /// When receiving a 404 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task?> GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task> GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "401", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "404", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + }; + var collectionResult = await RequestAdapter.SendCollectionAsync(requestInfo, global::Ayllu.Github.Client.Models.UserMarketplacePurchase.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + return collectionResult?.AsList(); + } + /// + /// Lists the active subscriptions for the authenticated user. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.User.Marketplace_purchases.Marketplace_purchasesRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.User.Marketplace_purchases.Marketplace_purchasesRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Lists the active subscriptions for the authenticated user. + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class Marketplace_purchasesRequestBuilderGetQueryParameters + { + /// The page number of the results to fetch. For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." + [QueryParameter("page")] + public int? Page { get; set; } + /// The number of results per page (max 100). For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." + [QueryParameter("per_page")] + public int? PerPage { get; set; } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class Marketplace_purchasesRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/User/Marketplace_purchases/Stubbed/StubbedRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/User/Marketplace_purchases/Stubbed/StubbedRequestBuilder.cs new file mode 100644 index 0000000..7280bcf --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/User/Marketplace_purchases/Stubbed/StubbedRequestBuilder.cs @@ -0,0 +1,112 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.User.Marketplace_purchases.Stubbed +{ + /// + /// Builds and executes requests for operations under \user\marketplace_purchases\stubbed + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class StubbedRequestBuilder : BaseRequestBuilder + { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public StubbedRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/user/marketplace_purchases/stubbed{?page*,per_page*}", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public StubbedRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/user/marketplace_purchases/stubbed{?page*,per_page*}", rawUrl) + { + } + /// + /// Lists the active subscriptions for the authenticated user. + /// API method documentation + /// + /// A List<global::Ayllu.Github.Client.Models.UserMarketplacePurchase> + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 401 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task?> GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task> GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "401", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + }; + var collectionResult = await RequestAdapter.SendCollectionAsync(requestInfo, global::Ayllu.Github.Client.Models.UserMarketplacePurchase.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + return collectionResult?.AsList(); + } + /// + /// Lists the active subscriptions for the authenticated user. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.User.Marketplace_purchases.Stubbed.StubbedRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.User.Marketplace_purchases.Stubbed.StubbedRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Lists the active subscriptions for the authenticated user. + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class StubbedRequestBuilderGetQueryParameters + { + /// The page number of the results to fetch. For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." + [QueryParameter("page")] + public int? Page { get; set; } + /// The number of results per page (max 100). For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." + [QueryParameter("per_page")] + public int? PerPage { get; set; } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class StubbedRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/User/Memberships/MembershipsRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/User/Memberships/MembershipsRequestBuilder.cs new file mode 100644 index 0000000..8c83b16 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/User/Memberships/MembershipsRequestBuilder.cs @@ -0,0 +1,41 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.User.Memberships.Orgs; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System; +namespace Ayllu.Github.Client.User.Memberships +{ + /// + /// Builds and executes requests for operations under \user\memberships + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class MembershipsRequestBuilder : BaseRequestBuilder + { + /// The orgs property + public global::Ayllu.Github.Client.User.Memberships.Orgs.OrgsRequestBuilder Orgs + { + get => new global::Ayllu.Github.Client.User.Memberships.Orgs.OrgsRequestBuilder(PathParameters, RequestAdapter); + } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public MembershipsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/user/memberships", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public MembershipsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/user/memberships", rawUrl) + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/User/Memberships/Orgs/GetStateQueryParameterType.cs b/src/Ayllu.Github.Client/Github/Client/User/Memberships/Orgs/GetStateQueryParameterType.cs new file mode 100644 index 0000000..f7a9678 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/User/Memberships/Orgs/GetStateQueryParameterType.cs @@ -0,0 +1,20 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.User.Memberships.Orgs +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public enum GetStateQueryParameterType + #pragma warning restore CS1591 + { + [EnumMember(Value = "active")] + #pragma warning disable CS1591 + Active, + #pragma warning restore CS1591 + [EnumMember(Value = "pending")] + #pragma warning disable CS1591 + Pending, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/User/Memberships/Orgs/Item/WithOrgItemRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/User/Memberships/Orgs/Item/WithOrgItemRequestBuilder.cs new file mode 100644 index 0000000..d2c9c55 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/User/Memberships/Orgs/Item/WithOrgItemRequestBuilder.cs @@ -0,0 +1,160 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.User.Memberships.Orgs.Item +{ + /// + /// Builds and executes requests for operations under \user\memberships\orgs\{org} + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithOrgItemRequestBuilder : BaseRequestBuilder + { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public WithOrgItemRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/user/memberships/orgs/{org}", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public WithOrgItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/user/memberships/orgs/{org}", rawUrl) + { + } + /// + /// 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. + /// API method documentation + /// + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 403 status code + /// When receiving a 404 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "403", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "404", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Models.OrgMembership.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// Converts the authenticated user to an active member of the organization, if that user has a pending invitation from the organization. + /// API method documentation + /// + /// A + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 403 status code + /// When receiving a 404 status code + /// When receiving a 422 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PatchAsync(global::Ayllu.Github.Client.User.Memberships.Orgs.Item.WithOrgPatchRequestBody body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task PatchAsync(global::Ayllu.Github.Client.User.Memberships.Orgs.Item.WithOrgPatchRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPatchRequestInformation(body, requestConfiguration); + var errorMapping = new Dictionary> + { + { "403", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "404", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "422", global::Ayllu.Github.Client.Models.ValidationError.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Models.OrgMembership.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// 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. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Converts the authenticated user to an active member of the organization, if that user has a pending invitation from the organization. + /// + /// A + /// The request body + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPatchRequestInformation(global::Ayllu.Github.Client.User.Memberships.Orgs.Item.WithOrgPatchRequestBody body, Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToPatchRequestInformation(global::Ayllu.Github.Client.User.Memberships.Orgs.Item.WithOrgPatchRequestBody body, Action> requestConfiguration = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.User.Memberships.Orgs.Item.WithOrgItemRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.User.Memberships.Orgs.Item.WithOrgItemRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithOrgItemRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithOrgItemRequestBuilderPatchRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/User/Memberships/Orgs/Item/WithOrgPatchRequestBody.cs b/src/Ayllu.Github.Client/Github/Client/User/Memberships/Orgs/Item/WithOrgPatchRequestBody.cs new file mode 100644 index 0000000..bf6c20f --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/User/Memberships/Orgs/Item/WithOrgPatchRequestBody.cs @@ -0,0 +1,59 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.User.Memberships.Orgs.Item +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class WithOrgPatchRequestBody : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The state that the membership should be in. Only `"active"` will be accepted. + public global::Ayllu.Github.Client.User.Memberships.Orgs.Item.WithOrgPatchRequestBody_state? State { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public WithOrgPatchRequestBody() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.User.Memberships.Orgs.Item.WithOrgPatchRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.User.Memberships.Orgs.Item.WithOrgPatchRequestBody(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "state", n => { State = n.GetEnumValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteEnumValue("state", State); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/User/Memberships/Orgs/Item/WithOrgPatchRequestBody_state.cs b/src/Ayllu.Github.Client/Github/Client/User/Memberships/Orgs/Item/WithOrgPatchRequestBody_state.cs new file mode 100644 index 0000000..2678be7 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/User/Memberships/Orgs/Item/WithOrgPatchRequestBody_state.cs @@ -0,0 +1,15 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.User.Memberships.Orgs.Item +{ + /// The state that the membership should be in. Only `"active"` will be accepted. + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public enum WithOrgPatchRequestBody_state + { + [EnumMember(Value = "active")] + #pragma warning disable CS1591 + Active, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/User/Memberships/Orgs/OrgsRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/User/Memberships/Orgs/OrgsRequestBuilder.cs new file mode 100644 index 0000000..47181a1 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/User/Memberships/Orgs/OrgsRequestBuilder.cs @@ -0,0 +1,143 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Ayllu.Github.Client.User.Memberships.Orgs.Item; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.User.Memberships.Orgs +{ + /// + /// Builds and executes requests for operations under \user\memberships\orgs + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class OrgsRequestBuilder : BaseRequestBuilder + { + /// Gets an item from the Ayllu.Github.Client.user.memberships.orgs.item collection + /// The organization name. The name is not case sensitive. + /// A + public global::Ayllu.Github.Client.User.Memberships.Orgs.Item.WithOrgItemRequestBuilder this[string position] + { + get + { + var urlTplParams = new Dictionary(PathParameters); + urlTplParams.Add("org", position); + return new global::Ayllu.Github.Client.User.Memberships.Orgs.Item.WithOrgItemRequestBuilder(urlTplParams, RequestAdapter); + } + } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public OrgsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/user/memberships/orgs{?page*,per_page*,state*}", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public OrgsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/user/memberships/orgs{?page*,per_page*,state*}", rawUrl) + { + } + /// + /// Lists all of the authenticated user's organization memberships. + /// API method documentation + /// + /// A List<global::Ayllu.Github.Client.Models.OrgMembership> + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 401 status code + /// When receiving a 403 status code + /// When receiving a 422 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task?> GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task> GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "401", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "403", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "422", global::Ayllu.Github.Client.Models.ValidationError.CreateFromDiscriminatorValue }, + }; + var collectionResult = await RequestAdapter.SendCollectionAsync(requestInfo, global::Ayllu.Github.Client.Models.OrgMembership.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + return collectionResult?.AsList(); + } + /// + /// Lists all of the authenticated user's organization memberships. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.User.Memberships.Orgs.OrgsRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.User.Memberships.Orgs.OrgsRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Lists all of the authenticated user's organization memberships. + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class OrgsRequestBuilderGetQueryParameters + { + /// The page number of the results to fetch. For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." + [QueryParameter("page")] + public int? Page { get; set; } + /// The number of results per page (max 100). For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." + [QueryParameter("per_page")] + public int? PerPage { get; set; } + /// Indicates the state of the memberships to return. If not specified, the API returns both active and pending memberships. + [Obsolete("This property is deprecated, use StateAsGetStateQueryParameterType instead")] +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("state")] + public string? State { get; set; } +#nullable restore +#else + [QueryParameter("state")] + public string State { get; set; } +#endif + /// Indicates the state of the memberships to return. If not specified, the API returns both active and pending memberships. + [QueryParameter("state")] + public global::Ayllu.Github.Client.User.Memberships.Orgs.GetStateQueryParameterType? StateAsGetStateQueryParameterType { get; set; } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class OrgsRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/User/Migrations/Item/Archive/ArchiveRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/User/Migrations/Item/Archive/ArchiveRequestBuilder.cs new file mode 100644 index 0000000..59e375a --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/User/Migrations/Item/Archive/ArchiveRequestBuilder.cs @@ -0,0 +1,153 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.User.Migrations.Item.Archive +{ + /// + /// Builds and executes requests for operations under \user\migrations\{migration_id}\archive + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class ArchiveRequestBuilder : BaseRequestBuilder + { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public ArchiveRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/user/migrations/{migration_id}/archive", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public ArchiveRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/user/migrations/{migration_id}/archive", rawUrl) + { + } + /// + /// 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/rest/migrations/users#list-user-migrations) and [Get a user migration status](https://docs.github.com/rest/migrations/users#get-a-user-migration-status) endpoints, will continue to be available even after an archive is deleted. + /// API method documentation + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 401 status code + /// When receiving a 403 status code + /// When receiving a 404 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task DeleteAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task DeleteAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToDeleteRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "401", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "403", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "404", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + }; + await RequestAdapter.SendNoContentAsync(requestInfo, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// 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. + /// API method documentation + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 401 status code + /// When receiving a 403 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "401", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "403", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + }; + await RequestAdapter.SendNoContentAsync(requestInfo, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// 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/rest/migrations/users#list-user-migrations) and [Get a user migration status](https://docs.github.com/rest/migrations/users#get-a-user-migration-status) endpoints, will continue to be available even after an archive is deleted. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToDeleteRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToDeleteRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.DELETE, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// 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. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.User.Migrations.Item.Archive.ArchiveRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.User.Migrations.Item.Archive.ArchiveRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class ArchiveRequestBuilderDeleteRequestConfiguration : RequestConfiguration + { + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class ArchiveRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/User/Migrations/Item/Repos/Item/Lock/LockRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/User/Migrations/Item/Repos/Item/Lock/LockRequestBuilder.cs new file mode 100644 index 0000000..3aa3904 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/User/Migrations/Item/Repos/Item/Lock/LockRequestBuilder.cs @@ -0,0 +1,101 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.User.Migrations.Item.Repos.Item.Lock +{ + /// + /// Builds and executes requests for operations under \user\migrations\{migration_id}\repos\{repo_name}\lock + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class LockRequestBuilder : BaseRequestBuilder + { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public LockRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/user/migrations/{migration_id}/repos/{repo_name}/lock", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public LockRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/user/migrations/{migration_id}/repos/{repo_name}/lock", rawUrl) + { + } + /// + /// Unlocks a repository. You can lock repositories when you [start a user migration](https://docs.github.com/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/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. + /// API method documentation + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 401 status code + /// When receiving a 403 status code + /// When receiving a 404 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task DeleteAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task DeleteAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToDeleteRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "401", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "403", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "404", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + }; + await RequestAdapter.SendNoContentAsync(requestInfo, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// Unlocks a repository. You can lock repositories when you [start a user migration](https://docs.github.com/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/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. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToDeleteRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToDeleteRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.DELETE, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.User.Migrations.Item.Repos.Item.Lock.LockRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.User.Migrations.Item.Repos.Item.Lock.LockRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class LockRequestBuilderDeleteRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/User/Migrations/Item/Repos/Item/WithRepo_nameItemRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/User/Migrations/Item/Repos/Item/WithRepo_nameItemRequestBuilder.cs new file mode 100644 index 0000000..695c34c --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/User/Migrations/Item/Repos/Item/WithRepo_nameItemRequestBuilder.cs @@ -0,0 +1,41 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.User.Migrations.Item.Repos.Item.Lock; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System; +namespace Ayllu.Github.Client.User.Migrations.Item.Repos.Item +{ + /// + /// Builds and executes requests for operations under \user\migrations\{migration_id}\repos\{repo_name} + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithRepo_nameItemRequestBuilder : BaseRequestBuilder + { + /// The lock property + public global::Ayllu.Github.Client.User.Migrations.Item.Repos.Item.Lock.LockRequestBuilder Lock + { + get => new global::Ayllu.Github.Client.User.Migrations.Item.Repos.Item.Lock.LockRequestBuilder(PathParameters, RequestAdapter); + } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public WithRepo_nameItemRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/user/migrations/{migration_id}/repos/{repo_name}", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public WithRepo_nameItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/user/migrations/{migration_id}/repos/{repo_name}", rawUrl) + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/User/Migrations/Item/Repos/ReposRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/User/Migrations/Item/Repos/ReposRequestBuilder.cs new file mode 100644 index 0000000..5040c03 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/User/Migrations/Item/Repos/ReposRequestBuilder.cs @@ -0,0 +1,48 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.User.Migrations.Item.Repos.Item; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System; +namespace Ayllu.Github.Client.User.Migrations.Item.Repos +{ + /// + /// Builds and executes requests for operations under \user\migrations\{migration_id}\repos + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class ReposRequestBuilder : BaseRequestBuilder + { + /// Gets an item from the Ayllu.Github.Client.user.migrations.item.repos.item collection + /// repo_name parameter + /// A + public global::Ayllu.Github.Client.User.Migrations.Item.Repos.Item.WithRepo_nameItemRequestBuilder this[string position] + { + get + { + var urlTplParams = new Dictionary(PathParameters); + urlTplParams.Add("repo_name", position); + return new global::Ayllu.Github.Client.User.Migrations.Item.Repos.Item.WithRepo_nameItemRequestBuilder(urlTplParams, RequestAdapter); + } + } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public ReposRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/user/migrations/{migration_id}/repos", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public ReposRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/user/migrations/{migration_id}/repos", rawUrl) + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/User/Migrations/Item/Repositories/RepositoriesRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/User/Migrations/Item/Repositories/RepositoriesRequestBuilder.cs new file mode 100644 index 0000000..8afed9f --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/User/Migrations/Item/Repositories/RepositoriesRequestBuilder.cs @@ -0,0 +1,112 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.User.Migrations.Item.Repositories +{ + /// + /// Builds and executes requests for operations under \user\migrations\{migration_id}\repositories + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class RepositoriesRequestBuilder : BaseRequestBuilder + { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public RepositoriesRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/user/migrations/{migration_id}/repositories{?page*,per_page*}", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public RepositoriesRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/user/migrations/{migration_id}/repositories{?page*,per_page*}", rawUrl) + { + } + /// + /// Lists all the repositories for this user migration. + /// API method documentation + /// + /// A List<global::Ayllu.Github.Client.Models.MinimalRepository> + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 404 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task?> GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task> GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "404", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + }; + var collectionResult = await RequestAdapter.SendCollectionAsync(requestInfo, global::Ayllu.Github.Client.Models.MinimalRepository.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + return collectionResult?.AsList(); + } + /// + /// Lists all the repositories for this user migration. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.User.Migrations.Item.Repositories.RepositoriesRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.User.Migrations.Item.Repositories.RepositoriesRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Lists all the repositories for this user migration. + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class RepositoriesRequestBuilderGetQueryParameters + { + /// The page number of the results to fetch. For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." + [QueryParameter("page")] + public int? Page { get; set; } + /// The number of results per page (max 100). For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." + [QueryParameter("per_page")] + public int? PerPage { get; set; } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class RepositoriesRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/User/Migrations/Item/WithMigration_ItemRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/User/Migrations/Item/WithMigration_ItemRequestBuilder.cs new file mode 100644 index 0000000..051fd85 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/User/Migrations/Item/WithMigration_ItemRequestBuilder.cs @@ -0,0 +1,136 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Ayllu.Github.Client.User.Migrations.Item.Archive; +using Ayllu.Github.Client.User.Migrations.Item.Repos; +using Ayllu.Github.Client.User.Migrations.Item.Repositories; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.User.Migrations.Item +{ + /// + /// Builds and executes requests for operations under \user\migrations\{migration_id} + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithMigration_ItemRequestBuilder : BaseRequestBuilder + { + /// The archive property + public global::Ayllu.Github.Client.User.Migrations.Item.Archive.ArchiveRequestBuilder Archive + { + get => new global::Ayllu.Github.Client.User.Migrations.Item.Archive.ArchiveRequestBuilder(PathParameters, RequestAdapter); + } + /// The repos property + public global::Ayllu.Github.Client.User.Migrations.Item.Repos.ReposRequestBuilder Repos + { + get => new global::Ayllu.Github.Client.User.Migrations.Item.Repos.ReposRequestBuilder(PathParameters, RequestAdapter); + } + /// The repositories property + public global::Ayllu.Github.Client.User.Migrations.Item.Repositories.RepositoriesRequestBuilder Repositories + { + get => new global::Ayllu.Github.Client.User.Migrations.Item.Repositories.RepositoriesRequestBuilder(PathParameters, RequestAdapter); + } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public WithMigration_ItemRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/user/migrations/{migration_id}{?exclude*}", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public WithMigration_ItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/user/migrations/{migration_id}{?exclude*}", rawUrl) + { + } + /// + /// 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/rest/migrations/users#download-a-user-migration-archive). + /// API method documentation + /// + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 401 status code + /// When receiving a 403 status code + /// When receiving a 404 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "401", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "403", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "404", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Models.Migration.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// 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/rest/migrations/users#download-a-user-migration-archive). + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.User.Migrations.Item.WithMigration_ItemRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.User.Migrations.Item.WithMigration_ItemRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// 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/rest/migrations/users#download-a-user-migration-archive). + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithMigration_ItemRequestBuilderGetQueryParameters + { +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("exclude")] + public string[]? Exclude { get; set; } +#nullable restore +#else + [QueryParameter("exclude")] + public string[] Exclude { get; set; } +#endif + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithMigration_ItemRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/User/Migrations/MigrationsPostRequestBody.cs b/src/Ayllu.Github.Client/Github/Client/User/Migrations/MigrationsPostRequestBody.cs new file mode 100644 index 0000000..349eb32 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/User/Migrations/MigrationsPostRequestBody.cs @@ -0,0 +1,103 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.User.Migrations +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class MigrationsPostRequestBody : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// Exclude attributes from the API response to improve performance +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? Exclude { get; set; } +#nullable restore +#else + public List Exclude { get; set; } +#endif + /// Do not include attachments in the migration + public bool? ExcludeAttachments { get; set; } + /// Indicates whether the repository git data should be excluded from the migration. + public bool? ExcludeGitData { get; set; } + /// Indicates whether metadata should be excluded and only git source should be included for the migration. + public bool? ExcludeMetadata { get; set; } + /// Indicates whether projects owned by the organization or users should be excluded. + public bool? ExcludeOwnerProjects { get; set; } + /// Do not include releases in the migration + public bool? ExcludeReleases { get; set; } + /// Lock the repositories being migrated at the start of the migration + public bool? LockRepositories { get; set; } + /// Indicates whether this should only include organization metadata (repositories array should be empty and will ignore other flags). + public bool? OrgMetadataOnly { get; set; } + /// The repositories property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? Repositories { get; set; } +#nullable restore +#else + public List Repositories { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public MigrationsPostRequestBody() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.User.Migrations.MigrationsPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.User.Migrations.MigrationsPostRequestBody(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "exclude", n => { Exclude = n.GetCollectionOfEnumValues()?.AsList(); } }, + { "exclude_attachments", n => { ExcludeAttachments = n.GetBoolValue(); } }, + { "exclude_git_data", n => { ExcludeGitData = n.GetBoolValue(); } }, + { "exclude_metadata", n => { ExcludeMetadata = n.GetBoolValue(); } }, + { "exclude_owner_projects", n => { ExcludeOwnerProjects = n.GetBoolValue(); } }, + { "exclude_releases", n => { ExcludeReleases = n.GetBoolValue(); } }, + { "lock_repositories", n => { LockRepositories = n.GetBoolValue(); } }, + { "org_metadata_only", n => { OrgMetadataOnly = n.GetBoolValue(); } }, + { "repositories", n => { Repositories = n.GetCollectionOfPrimitiveValues()?.AsList(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteCollectionOfEnumValues("exclude", Exclude); + writer.WriteBoolValue("exclude_attachments", ExcludeAttachments); + writer.WriteBoolValue("exclude_git_data", ExcludeGitData); + writer.WriteBoolValue("exclude_metadata", ExcludeMetadata); + writer.WriteBoolValue("exclude_owner_projects", ExcludeOwnerProjects); + writer.WriteBoolValue("exclude_releases", ExcludeReleases); + writer.WriteBoolValue("lock_repositories", LockRepositories); + writer.WriteBoolValue("org_metadata_only", OrgMetadataOnly); + writer.WriteCollectionOfPrimitiveValues("repositories", Repositories); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/User/Migrations/MigrationsPostRequestBody_exclude.cs b/src/Ayllu.Github.Client/Github/Client/User/Migrations/MigrationsPostRequestBody_exclude.cs new file mode 100644 index 0000000..5d9e926 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/User/Migrations/MigrationsPostRequestBody_exclude.cs @@ -0,0 +1,15 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.User.Migrations +{ + /// Allowed values that can be passed to the exclude param. + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public enum MigrationsPostRequestBody_exclude + { + [EnumMember(Value = "repositories")] + #pragma warning disable CS1591 + Repositories, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/User/Migrations/MigrationsRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/User/Migrations/MigrationsRequestBuilder.cs new file mode 100644 index 0000000..56cd5f2 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/User/Migrations/MigrationsRequestBuilder.cs @@ -0,0 +1,200 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Ayllu.Github.Client.User.Migrations.Item; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.User.Migrations +{ + /// + /// Builds and executes requests for operations under \user\migrations + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class MigrationsRequestBuilder : BaseRequestBuilder + { + /// Gets an item from the Ayllu.Github.Client.user.migrations.item collection + /// The unique identifier of the migration. + /// A + public global::Ayllu.Github.Client.User.Migrations.Item.WithMigration_ItemRequestBuilder this[int position] + { + get + { + var urlTplParams = new Dictionary(PathParameters); + urlTplParams.Add("migration_id", position); + return new global::Ayllu.Github.Client.User.Migrations.Item.WithMigration_ItemRequestBuilder(urlTplParams, RequestAdapter); + } + } + /// Gets an item from the Ayllu.Github.Client.user.migrations.item collection + /// The unique identifier of the migration. + /// A + [Obsolete("This indexer is deprecated and will be removed in the next major version. Use the one with the typed parameter instead.")] + public global::Ayllu.Github.Client.User.Migrations.Item.WithMigration_ItemRequestBuilder this[string position] + { + get + { + var urlTplParams = new Dictionary(PathParameters); + if (!string.IsNullOrWhiteSpace(position)) urlTplParams.Add("migration_id", position); + return new global::Ayllu.Github.Client.User.Migrations.Item.WithMigration_ItemRequestBuilder(urlTplParams, RequestAdapter); + } + } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public MigrationsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/user/migrations{?page*,per_page*}", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public MigrationsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/user/migrations{?page*,per_page*}", rawUrl) + { + } + /// + /// Lists all migrations a user has started. + /// API method documentation + /// + /// A List<global::Ayllu.Github.Client.Models.Migration> + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 401 status code + /// When receiving a 403 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task?> GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task> GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "401", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "403", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + }; + var collectionResult = await RequestAdapter.SendCollectionAsync(requestInfo, global::Ayllu.Github.Client.Models.Migration.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + return collectionResult?.AsList(); + } + /// + /// Initiates the generation of a user migration archive. + /// API method documentation + /// + /// A + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 401 status code + /// When receiving a 403 status code + /// When receiving a 422 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PostAsync(global::Ayllu.Github.Client.User.Migrations.MigrationsPostRequestBody body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task PostAsync(global::Ayllu.Github.Client.User.Migrations.MigrationsPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPostRequestInformation(body, requestConfiguration); + var errorMapping = new Dictionary> + { + { "401", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "403", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "422", global::Ayllu.Github.Client.Models.ValidationError.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Models.Migration.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// Lists all migrations a user has started. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Initiates the generation of a user migration archive. + /// + /// A + /// The request body + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPostRequestInformation(global::Ayllu.Github.Client.User.Migrations.MigrationsPostRequestBody body, Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToPostRequestInformation(global::Ayllu.Github.Client.User.Migrations.MigrationsPostRequestBody body, Action> requestConfiguration = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.User.Migrations.MigrationsRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.User.Migrations.MigrationsRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Lists all migrations a user has started. + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class MigrationsRequestBuilderGetQueryParameters + { + /// The page number of the results to fetch. For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." + [QueryParameter("page")] + public int? Page { get; set; } + /// The number of results per page (max 100). For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." + [QueryParameter("per_page")] + public int? PerPage { get; set; } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class MigrationsRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class MigrationsRequestBuilderPostRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/User/Orgs/OrgsRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/User/Orgs/OrgsRequestBuilder.cs new file mode 100644 index 0000000..69c7aa3 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/User/Orgs/OrgsRequestBuilder.cs @@ -0,0 +1,114 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.User.Orgs +{ + /// + /// Builds and executes requests for operations under \user\orgs + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class OrgsRequestBuilder : BaseRequestBuilder + { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public OrgsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/user/orgs{?page*,per_page*}", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public OrgsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/user/orgs{?page*,per_page*}", rawUrl) + { + } + /// + /// List organizations for the authenticated user.For OAuth app tokens and personal access tokens (classic), this endpoint only lists organizations that your authorization allows you to operate on in some way (e.g., you can list teams with `read:org` scope, you can publicize your organization membership with `user` scope, etc.). Therefore, this API requires at least `user` or `read:org` scope for OAuth app tokens and personal access tokens (classic). Requests with insufficient scope will receive a `403 Forbidden` response.> [!NOTE]> Requests using a fine-grained access token will receive a `200 Success` response with an empty list. + /// API method documentation + /// + /// A List<global::Ayllu.Github.Client.Models.OrganizationSimple> + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 401 status code + /// When receiving a 403 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task?> GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task> GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "401", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "403", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + }; + var collectionResult = await RequestAdapter.SendCollectionAsync(requestInfo, global::Ayllu.Github.Client.Models.OrganizationSimple.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + return collectionResult?.AsList(); + } + /// + /// List organizations for the authenticated user.For OAuth app tokens and personal access tokens (classic), this endpoint only lists organizations that your authorization allows you to operate on in some way (e.g., you can list teams with `read:org` scope, you can publicize your organization membership with `user` scope, etc.). Therefore, this API requires at least `user` or `read:org` scope for OAuth app tokens and personal access tokens (classic). Requests with insufficient scope will receive a `403 Forbidden` response.> [!NOTE]> Requests using a fine-grained access token will receive a `200 Success` response with an empty list. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.User.Orgs.OrgsRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.User.Orgs.OrgsRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// List organizations for the authenticated user.For OAuth app tokens and personal access tokens (classic), this endpoint only lists organizations that your authorization allows you to operate on in some way (e.g., you can list teams with `read:org` scope, you can publicize your organization membership with `user` scope, etc.). Therefore, this API requires at least `user` or `read:org` scope for OAuth app tokens and personal access tokens (classic). Requests with insufficient scope will receive a `403 Forbidden` response.> [!NOTE]> Requests using a fine-grained access token will receive a `200 Success` response with an empty list. + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class OrgsRequestBuilderGetQueryParameters + { + /// The page number of the results to fetch. For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." + [QueryParameter("page")] + public int? Page { get; set; } + /// The number of results per page (max 100). For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." + [QueryParameter("per_page")] + public int? PerPage { get; set; } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class OrgsRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/User/Packages/GetPackage_typeQueryParameterType.cs b/src/Ayllu.Github.Client/Github/Client/User/Packages/GetPackage_typeQueryParameterType.cs new file mode 100644 index 0000000..76a6d11 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/User/Packages/GetPackage_typeQueryParameterType.cs @@ -0,0 +1,36 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.User.Packages +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public enum GetPackage_typeQueryParameterType + #pragma warning restore CS1591 + { + [EnumMember(Value = "npm")] + #pragma warning disable CS1591 + Npm, + #pragma warning restore CS1591 + [EnumMember(Value = "maven")] + #pragma warning disable CS1591 + Maven, + #pragma warning restore CS1591 + [EnumMember(Value = "rubygems")] + #pragma warning disable CS1591 + Rubygems, + #pragma warning restore CS1591 + [EnumMember(Value = "docker")] + #pragma warning disable CS1591 + Docker, + #pragma warning restore CS1591 + [EnumMember(Value = "nuget")] + #pragma warning disable CS1591 + Nuget, + #pragma warning restore CS1591 + [EnumMember(Value = "container")] + #pragma warning disable CS1591 + Container, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/User/Packages/GetVisibilityQueryParameterType.cs b/src/Ayllu.Github.Client/Github/Client/User/Packages/GetVisibilityQueryParameterType.cs new file mode 100644 index 0000000..8428d7b --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/User/Packages/GetVisibilityQueryParameterType.cs @@ -0,0 +1,24 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.User.Packages +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public enum GetVisibilityQueryParameterType + #pragma warning restore CS1591 + { + [EnumMember(Value = "public")] + #pragma warning disable CS1591 + Public, + #pragma warning restore CS1591 + [EnumMember(Value = "private")] + #pragma warning disable CS1591 + Private, + #pragma warning restore CS1591 + [EnumMember(Value = "internal")] + #pragma warning disable CS1591 + Internal, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/User/Packages/Item/Item/Restore/RestoreRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/User/Packages/Item/Item/Restore/RestoreRequestBuilder.cs new file mode 100644 index 0000000..c75992d --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/User/Packages/Item/Item/Restore/RestoreRequestBuilder.cs @@ -0,0 +1,118 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.User.Packages.Item.Item.Restore +{ + /// + /// Builds and executes requests for operations under \user\packages\{package_type}\{package_name}\restore + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class RestoreRequestBuilder : BaseRequestBuilder + { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public RestoreRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/user/packages/{package_type}/{package_name}/restore{?token*}", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public RestoreRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/user/packages/{package_type}/{package_name}/restore{?token*}", rawUrl) + { + } + /// + /// 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. For more information, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." + /// API method documentation + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 401 status code + /// When receiving a 403 status code + /// When receiving a 404 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PostAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task PostAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToPostRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "401", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "403", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "404", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + }; + await RequestAdapter.SendNoContentAsync(requestInfo, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// 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. For more information, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPostRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToPostRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.User.Packages.Item.Item.Restore.RestoreRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.User.Packages.Item.Item.Restore.RestoreRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// 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. For more information, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class RestoreRequestBuilderPostQueryParameters + { + /// package token +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("token")] + public string? Token { get; set; } +#nullable restore +#else + [QueryParameter("token")] + public string Token { get; set; } +#endif + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class RestoreRequestBuilderPostRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/User/Packages/Item/Item/Versions/GetStateQueryParameterType.cs b/src/Ayllu.Github.Client/Github/Client/User/Packages/Item/Item/Versions/GetStateQueryParameterType.cs new file mode 100644 index 0000000..2a779f1 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/User/Packages/Item/Item/Versions/GetStateQueryParameterType.cs @@ -0,0 +1,20 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.User.Packages.Item.Item.Versions +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public enum GetStateQueryParameterType + #pragma warning restore CS1591 + { + [EnumMember(Value = "active")] + #pragma warning disable CS1591 + Active, + #pragma warning restore CS1591 + [EnumMember(Value = "deleted")] + #pragma warning disable CS1591 + Deleted, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/User/Packages/Item/Item/Versions/Item/Restore/RestoreRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/User/Packages/Item/Item/Versions/Item/Restore/RestoreRequestBuilder.cs new file mode 100644 index 0000000..5195908 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/User/Packages/Item/Item/Versions/Item/Restore/RestoreRequestBuilder.cs @@ -0,0 +1,101 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.User.Packages.Item.Item.Versions.Item.Restore +{ + /// + /// Builds and executes requests for operations under \user\packages\{package_type}\{package_name}\versions\{package_version_id}\restore + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class RestoreRequestBuilder : BaseRequestBuilder + { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public RestoreRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/user/packages/{package_type}/{package_name}/versions/{package_version_id}/restore", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public RestoreRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/user/packages/{package_type}/{package_name}/versions/{package_version_id}/restore", rawUrl) + { + } + /// + /// 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. For more information, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." + /// API method documentation + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 401 status code + /// When receiving a 403 status code + /// When receiving a 404 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PostAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task PostAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToPostRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "401", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "403", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "404", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + }; + await RequestAdapter.SendNoContentAsync(requestInfo, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// 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. For more information, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPostRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToPostRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.User.Packages.Item.Item.Versions.Item.Restore.RestoreRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.User.Packages.Item.Item.Versions.Item.Restore.RestoreRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class RestoreRequestBuilderPostRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/User/Packages/Item/Item/Versions/Item/WithPackage_version_ItemRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/User/Packages/Item/Item/Versions/Item/WithPackage_version_ItemRequestBuilder.cs new file mode 100644 index 0000000..6e18aae --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/User/Packages/Item/Item/Versions/Item/WithPackage_version_ItemRequestBuilder.cs @@ -0,0 +1,153 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Ayllu.Github.Client.User.Packages.Item.Item.Versions.Item.Restore; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.User.Packages.Item.Item.Versions.Item +{ + /// + /// Builds and executes requests for operations under \user\packages\{package_type}\{package_name}\versions\{package_version_id} + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithPackage_version_ItemRequestBuilder : BaseRequestBuilder + { + /// The restore property + public global::Ayllu.Github.Client.User.Packages.Item.Item.Versions.Item.Restore.RestoreRequestBuilder Restore + { + get => new global::Ayllu.Github.Client.User.Packages.Item.Item.Versions.Item.Restore.RestoreRequestBuilder(PathParameters, RequestAdapter); + } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public WithPackage_version_ItemRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/user/packages/{package_type}/{package_name}/versions/{package_version_id}", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public WithPackage_version_ItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/user/packages/{package_type}/{package_name}/versions/{package_version_id}", rawUrl) + { + } + /// + /// 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. For more information, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." + /// API method documentation + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 401 status code + /// When receiving a 403 status code + /// When receiving a 404 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task DeleteAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task DeleteAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToDeleteRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "401", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "403", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "404", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + }; + await RequestAdapter.SendNoContentAsync(requestInfo, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// 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. For more information, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." + /// API method documentation + /// + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Models.PackageVersion.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false); + } + /// + /// 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. For more information, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToDeleteRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToDeleteRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.DELETE, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// 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. For more information, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.User.Packages.Item.Item.Versions.Item.WithPackage_version_ItemRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.User.Packages.Item.Item.Versions.Item.WithPackage_version_ItemRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithPackage_version_ItemRequestBuilderDeleteRequestConfiguration : RequestConfiguration + { + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithPackage_version_ItemRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/User/Packages/Item/Item/Versions/VersionsRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/User/Packages/Item/Item/Versions/VersionsRequestBuilder.cs new file mode 100644 index 0000000..f61015d --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/User/Packages/Item/Item/Versions/VersionsRequestBuilder.cs @@ -0,0 +1,156 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Ayllu.Github.Client.User.Packages.Item.Item.Versions.Item; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.User.Packages.Item.Item.Versions +{ + /// + /// Builds and executes requests for operations under \user\packages\{package_type}\{package_name}\versions + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class VersionsRequestBuilder : BaseRequestBuilder + { + /// Gets an item from the Ayllu.Github.Client.user.packages.item.item.versions.item collection + /// Unique identifier of the package version. + /// A + public global::Ayllu.Github.Client.User.Packages.Item.Item.Versions.Item.WithPackage_version_ItemRequestBuilder this[int position] + { + get + { + var urlTplParams = new Dictionary(PathParameters); + urlTplParams.Add("package_version_id", position); + return new global::Ayllu.Github.Client.User.Packages.Item.Item.Versions.Item.WithPackage_version_ItemRequestBuilder(urlTplParams, RequestAdapter); + } + } + /// Gets an item from the Ayllu.Github.Client.user.packages.item.item.versions.item collection + /// Unique identifier of the package version. + /// A + [Obsolete("This indexer is deprecated and will be removed in the next major version. Use the one with the typed parameter instead.")] + public global::Ayllu.Github.Client.User.Packages.Item.Item.Versions.Item.WithPackage_version_ItemRequestBuilder this[string position] + { + get + { + var urlTplParams = new Dictionary(PathParameters); + if (!string.IsNullOrWhiteSpace(position)) urlTplParams.Add("package_version_id", position); + return new global::Ayllu.Github.Client.User.Packages.Item.Item.Versions.Item.WithPackage_version_ItemRequestBuilder(urlTplParams, RequestAdapter); + } + } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public VersionsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/user/packages/{package_type}/{package_name}/versions{?page*,per_page*,state*}", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public VersionsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/user/packages/{package_type}/{package_name}/versions{?page*,per_page*,state*}", rawUrl) + { + } + /// + /// 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. For more information, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." + /// API method documentation + /// + /// A List<global::Ayllu.Github.Client.Models.PackageVersion> + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 401 status code + /// When receiving a 403 status code + /// When receiving a 404 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task?> GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task> GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "401", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "403", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "404", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + }; + var collectionResult = await RequestAdapter.SendCollectionAsync(requestInfo, global::Ayllu.Github.Client.Models.PackageVersion.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + return collectionResult?.AsList(); + } + /// + /// 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. For more information, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.User.Packages.Item.Item.Versions.VersionsRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.User.Packages.Item.Item.Versions.VersionsRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// 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. For more information, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class VersionsRequestBuilderGetQueryParameters + { + /// The page number of the results to fetch. For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." + [QueryParameter("page")] + public int? Page { get; set; } + /// The number of results per page (max 100). For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." + [QueryParameter("per_page")] + public int? PerPage { get; set; } + /// The state of the package, either active or deleted. + [Obsolete("This property is deprecated, use StateAsGetStateQueryParameterType instead")] +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("state")] + public string? State { get; set; } +#nullable restore +#else + [QueryParameter("state")] + public string State { get; set; } +#endif + /// The state of the package, either active or deleted. + [QueryParameter("state")] + public global::Ayllu.Github.Client.User.Packages.Item.Item.Versions.GetStateQueryParameterType? StateAsGetStateQueryParameterType { get; set; } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class VersionsRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/User/Packages/Item/Item/WithPackage_nameItemRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/User/Packages/Item/Item/WithPackage_nameItemRequestBuilder.cs new file mode 100644 index 0000000..71a2bc8 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/User/Packages/Item/Item/WithPackage_nameItemRequestBuilder.cs @@ -0,0 +1,159 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Ayllu.Github.Client.User.Packages.Item.Item.Restore; +using Ayllu.Github.Client.User.Packages.Item.Item.Versions; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.User.Packages.Item.Item +{ + /// + /// Builds and executes requests for operations under \user\packages\{package_type}\{package_name} + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithPackage_nameItemRequestBuilder : BaseRequestBuilder + { + /// The restore property + public global::Ayllu.Github.Client.User.Packages.Item.Item.Restore.RestoreRequestBuilder Restore + { + get => new global::Ayllu.Github.Client.User.Packages.Item.Item.Restore.RestoreRequestBuilder(PathParameters, RequestAdapter); + } + /// The versions property + public global::Ayllu.Github.Client.User.Packages.Item.Item.Versions.VersionsRequestBuilder Versions + { + get => new global::Ayllu.Github.Client.User.Packages.Item.Item.Versions.VersionsRequestBuilder(PathParameters, RequestAdapter); + } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public WithPackage_nameItemRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/user/packages/{package_type}/{package_name}", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public WithPackage_nameItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/user/packages/{package_type}/{package_name}", rawUrl) + { + } + /// + /// 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. For more information, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." + /// API method documentation + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 401 status code + /// When receiving a 403 status code + /// When receiving a 404 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task DeleteAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task DeleteAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToDeleteRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "401", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "403", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "404", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + }; + await RequestAdapter.SendNoContentAsync(requestInfo, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// 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. For more information, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." + /// API method documentation + /// + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Models.Package.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false); + } + /// + /// 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. For more information, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToDeleteRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToDeleteRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.DELETE, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// 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. For more information, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.User.Packages.Item.Item.WithPackage_nameItemRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.User.Packages.Item.Item.WithPackage_nameItemRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithPackage_nameItemRequestBuilderDeleteRequestConfiguration : RequestConfiguration + { + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithPackage_nameItemRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/User/Packages/Item/WithPackage_typeItemRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/User/Packages/Item/WithPackage_typeItemRequestBuilder.cs new file mode 100644 index 0000000..8be2f17 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/User/Packages/Item/WithPackage_typeItemRequestBuilder.cs @@ -0,0 +1,48 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.User.Packages.Item.Item; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System; +namespace Ayllu.Github.Client.User.Packages.Item +{ + /// + /// Builds and executes requests for operations under \user\packages\{package_type} + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithPackage_typeItemRequestBuilder : BaseRequestBuilder + { + /// Gets an item from the Ayllu.Github.Client.user.packages.item.item collection + /// The name of the package. + /// A + public global::Ayllu.Github.Client.User.Packages.Item.Item.WithPackage_nameItemRequestBuilder this[string position] + { + get + { + var urlTplParams = new Dictionary(PathParameters); + urlTplParams.Add("package_name", position); + return new global::Ayllu.Github.Client.User.Packages.Item.Item.WithPackage_nameItemRequestBuilder(urlTplParams, RequestAdapter); + } + } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public WithPackage_typeItemRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/user/packages/{package_type}", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public WithPackage_typeItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/user/packages/{package_type}", rawUrl) + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/User/Packages/PackagesRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/User/Packages/PackagesRequestBuilder.cs new file mode 100644 index 0000000..07661f0 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/User/Packages/PackagesRequestBuilder.cs @@ -0,0 +1,148 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Ayllu.Github.Client.User.Packages.Item; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.User.Packages +{ + /// + /// Builds and executes requests for operations under \user\packages + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class PackagesRequestBuilder : BaseRequestBuilder + { + /// Gets an item from the Ayllu.Github.Client.user.packages.item collection + /// 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. + /// A + public global::Ayllu.Github.Client.User.Packages.Item.WithPackage_typeItemRequestBuilder this[string position] + { + get + { + var urlTplParams = new Dictionary(PathParameters); + urlTplParams.Add("package_type", position); + return new global::Ayllu.Github.Client.User.Packages.Item.WithPackage_typeItemRequestBuilder(urlTplParams, RequestAdapter); + } + } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public PackagesRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/user/packages?package_type={package_type}{&page*,per_page*,visibility*}", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public PackagesRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/user/packages?package_type={package_type}{&page*,per_page*,visibility*}", rawUrl) + { + } + /// + /// 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. For more information, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." + /// API method documentation + /// + /// A List<global::Ayllu.Github.Client.Models.Package> + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task?> GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task> GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var collectionResult = await RequestAdapter.SendCollectionAsync(requestInfo, global::Ayllu.Github.Client.Models.Package.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false); + return collectionResult?.AsList(); + } + /// + /// 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. For more information, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.User.Packages.PackagesRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.User.Packages.PackagesRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// 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. For more information, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class PackagesRequestBuilderGetQueryParameters + { + /// 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. + [Obsolete("This property is deprecated, use PackageTypeAsGetPackageTypeQueryParameterType instead")] +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("package_type")] + public string? PackageType { get; set; } +#nullable restore +#else + [QueryParameter("package_type")] + public string PackageType { get; set; } +#endif + /// 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. + [QueryParameter("package_type")] + public global::Ayllu.Github.Client.User.Packages.GetPackage_typeQueryParameterType? PackageTypeAsGetPackageTypeQueryParameterType { get; set; } + /// The page number of the results to fetch. For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." + [QueryParameter("page")] + public int? Page { get; set; } + /// The number of results per page (max 100). For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." + [QueryParameter("per_page")] + public int? PerPage { get; set; } + /// 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/packages/learn-github-packages/about-permissions-for-github-packages#granular-permissions-for-userorganization-scoped-packages)." + [Obsolete("This property is deprecated, use VisibilityAsGetVisibilityQueryParameterType instead")] +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("visibility")] + public string? Visibility { get; set; } +#nullable restore +#else + [QueryParameter("visibility")] + public string Visibility { get; set; } +#endif + /// 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/packages/learn-github-packages/about-permissions-for-github-packages#granular-permissions-for-userorganization-scoped-packages)." + [QueryParameter("visibility")] + public global::Ayllu.Github.Client.User.Packages.GetVisibilityQueryParameterType? VisibilityAsGetVisibilityQueryParameterType { get; set; } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class PackagesRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/User/Projects/ProjectsPostRequestBody.cs b/src/Ayllu.Github.Client/Github/Client/User/Projects/ProjectsPostRequestBody.cs new file mode 100644 index 0000000..2ee21b3 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/User/Projects/ProjectsPostRequestBody.cs @@ -0,0 +1,75 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.User.Projects +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class ProjectsPostRequestBody : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// Body of the project +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Body { get; set; } +#nullable restore +#else + public string Body { get; set; } +#endif + /// Name of the project +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Name { get; set; } +#nullable restore +#else + public string Name { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public ProjectsPostRequestBody() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.User.Projects.ProjectsPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.User.Projects.ProjectsPostRequestBody(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "body", n => { Body = n.GetStringValue(); } }, + { "name", n => { Name = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("body", Body); + writer.WriteStringValue("name", Name); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/User/Projects/ProjectsRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/User/Projects/ProjectsRequestBuilder.cs new file mode 100644 index 0000000..57c9553 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/User/Projects/ProjectsRequestBuilder.cs @@ -0,0 +1,110 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.User.Projects +{ + /// + /// Builds and executes requests for operations under \user\projects + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class ProjectsRequestBuilder : BaseRequestBuilder + { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public ProjectsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/user/projects", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public ProjectsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/user/projects", rawUrl) + { + } + /// + /// > [!WARNING]> **Closing down notice:** Projects (classic) is being deprecated in favor of the new Projects experience.> See the [changelog](https://github.blog/changelog/2024-05-23-sunset-notice-projects-classic/) for more information. + /// API method documentation + /// + /// A + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 401 status code + /// When receiving a 403 status code + /// When receiving a 422 status code + [Obsolete("")] +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PostAsync(global::Ayllu.Github.Client.User.Projects.ProjectsPostRequestBody body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task PostAsync(global::Ayllu.Github.Client.User.Projects.ProjectsPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPostRequestInformation(body, requestConfiguration); + var errorMapping = new Dictionary> + { + { "401", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "403", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "422", global::Ayllu.Github.Client.Models.ValidationErrorSimple.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Models.Project.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// > [!WARNING]> **Closing down notice:** Projects (classic) is being deprecated in favor of the new Projects experience.> See the [changelog](https://github.blog/changelog/2024-05-23-sunset-notice-projects-classic/) for more information. + /// + /// A + /// The request body + /// Configuration for the request such as headers, query parameters, and middleware options. + [Obsolete("")] +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPostRequestInformation(global::Ayllu.Github.Client.User.Projects.ProjectsPostRequestBody body, Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToPostRequestInformation(global::Ayllu.Github.Client.User.Projects.ProjectsPostRequestBody body, Action> requestConfiguration = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + [Obsolete("")] + public global::Ayllu.Github.Client.User.Projects.ProjectsRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.User.Projects.ProjectsRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class ProjectsRequestBuilderPostRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/User/Public_emails/Public_emailsRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/User/Public_emails/Public_emailsRequestBuilder.cs new file mode 100644 index 0000000..058f34b --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/User/Public_emails/Public_emailsRequestBuilder.cs @@ -0,0 +1,116 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.User.Public_emails +{ + /// + /// Builds and executes requests for operations under \user\public_emails + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class Public_emailsRequestBuilder : BaseRequestBuilder + { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public Public_emailsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/user/public_emails{?page*,per_page*}", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public Public_emailsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/user/public_emails{?page*,per_page*}", rawUrl) + { + } + /// + /// Lists your publicly visible email address, which you can set with the[Set primary email visibility for the authenticated user](https://docs.github.com/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. + /// API method documentation + /// + /// A List<global::Ayllu.Github.Client.Models.Email> + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 401 status code + /// When receiving a 403 status code + /// When receiving a 404 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task?> GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task> GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "401", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "403", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "404", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + }; + var collectionResult = await RequestAdapter.SendCollectionAsync(requestInfo, global::Ayllu.Github.Client.Models.Email.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + return collectionResult?.AsList(); + } + /// + /// Lists your publicly visible email address, which you can set with the[Set primary email visibility for the authenticated user](https://docs.github.com/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. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.User.Public_emails.Public_emailsRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.User.Public_emails.Public_emailsRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Lists your publicly visible email address, which you can set with the[Set primary email visibility for the authenticated user](https://docs.github.com/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. + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class Public_emailsRequestBuilderGetQueryParameters + { + /// The page number of the results to fetch. For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." + [QueryParameter("page")] + public int? Page { get; set; } + /// The number of results per page (max 100). For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." + [QueryParameter("per_page")] + public int? PerPage { get; set; } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class Public_emailsRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/User/Repos/GetDirectionQueryParameterType.cs b/src/Ayllu.Github.Client/Github/Client/User/Repos/GetDirectionQueryParameterType.cs new file mode 100644 index 0000000..c561ce3 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/User/Repos/GetDirectionQueryParameterType.cs @@ -0,0 +1,20 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.User.Repos +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public enum GetDirectionQueryParameterType + #pragma warning restore CS1591 + { + [EnumMember(Value = "asc")] + #pragma warning disable CS1591 + Asc, + #pragma warning restore CS1591 + [EnumMember(Value = "desc")] + #pragma warning disable CS1591 + Desc, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/User/Repos/GetSortQueryParameterType.cs b/src/Ayllu.Github.Client/Github/Client/User/Repos/GetSortQueryParameterType.cs new file mode 100644 index 0000000..60625da --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/User/Repos/GetSortQueryParameterType.cs @@ -0,0 +1,28 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.User.Repos +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public enum GetSortQueryParameterType + #pragma warning restore CS1591 + { + [EnumMember(Value = "created")] + #pragma warning disable CS1591 + Created, + #pragma warning restore CS1591 + [EnumMember(Value = "updated")] + #pragma warning disable CS1591 + Updated, + #pragma warning restore CS1591 + [EnumMember(Value = "pushed")] + #pragma warning disable CS1591 + Pushed, + #pragma warning restore CS1591 + [EnumMember(Value = "full_name")] + #pragma warning disable CS1591 + Full_name, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/User/Repos/GetTypeQueryParameterType.cs b/src/Ayllu.Github.Client/Github/Client/User/Repos/GetTypeQueryParameterType.cs new file mode 100644 index 0000000..1f71d34 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/User/Repos/GetTypeQueryParameterType.cs @@ -0,0 +1,32 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.User.Repos +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public enum GetTypeQueryParameterType + #pragma warning restore CS1591 + { + [EnumMember(Value = "all")] + #pragma warning disable CS1591 + All, + #pragma warning restore CS1591 + [EnumMember(Value = "owner")] + #pragma warning disable CS1591 + Owner, + #pragma warning restore CS1591 + [EnumMember(Value = "public")] + #pragma warning disable CS1591 + Public, + #pragma warning restore CS1591 + [EnumMember(Value = "private")] + #pragma warning disable CS1591 + Private, + #pragma warning restore CS1591 + [EnumMember(Value = "member")] + #pragma warning disable CS1591 + Member, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/User/Repos/GetVisibilityQueryParameterType.cs b/src/Ayllu.Github.Client/Github/Client/User/Repos/GetVisibilityQueryParameterType.cs new file mode 100644 index 0000000..f7b5f06 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/User/Repos/GetVisibilityQueryParameterType.cs @@ -0,0 +1,24 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.User.Repos +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public enum GetVisibilityQueryParameterType + #pragma warning restore CS1591 + { + [EnumMember(Value = "all")] + #pragma warning disable CS1591 + All, + #pragma warning restore CS1591 + [EnumMember(Value = "public")] + #pragma warning disable CS1591 + Public, + #pragma warning restore CS1591 + [EnumMember(Value = "private")] + #pragma warning disable CS1591 + Private, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/User/Repos/ReposPostRequestBody.cs b/src/Ayllu.Github.Client/Github/Client/User/Repos/ReposPostRequestBody.cs new file mode 100644 index 0000000..6f2b6e2 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/User/Repos/ReposPostRequestBody.cs @@ -0,0 +1,177 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.User.Repos +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class ReposPostRequestBody : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// Whether to allow Auto-merge to be used on pull requests. + public bool? AllowAutoMerge { get; set; } + /// Whether to allow merge commits for pull requests. + public bool? AllowMergeCommit { get; set; } + /// Whether to allow rebase merges for pull requests. + public bool? AllowRebaseMerge { get; set; } + /// Whether to allow squash merges for pull requests. + public bool? AllowSquashMerge { get; set; } + /// Whether the repository is initialized with a minimal README. + public bool? AutoInit { get; set; } + /// Whether to delete head branches when pull requests are merged + public bool? DeleteBranchOnMerge { get; set; } + /// A short description of the repository. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Description { get; set; } +#nullable restore +#else + public string Description { get; set; } +#endif + /// The desired language or platform to apply to the .gitignore. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? GitignoreTemplate { get; set; } +#nullable restore +#else + public string GitignoreTemplate { get; set; } +#endif + /// Whether discussions are enabled. + public bool? HasDiscussions { get; set; } + /// Whether downloads are enabled. + public bool? HasDownloads { get; set; } + /// Whether issues are enabled. + public bool? HasIssues { get; set; } + /// Whether projects are enabled. + public bool? HasProjects { get; set; } + /// Whether the wiki is enabled. + public bool? HasWiki { get; set; } + /// A URL with more information about the repository. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Homepage { get; set; } +#nullable restore +#else + public string Homepage { get; set; } +#endif + /// Whether this repository acts as a template that can be used to generate new repositories. + public bool? IsTemplate { get; set; } + /// The license keyword of the open source license for this repository. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? LicenseTemplate { get; set; } +#nullable restore +#else + public string LicenseTemplate { get; set; } +#endif + /// 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. + public global::Ayllu.Github.Client.User.Repos.ReposPostRequestBody_merge_commit_message? MergeCommitMessage { get; set; } + /// Required when using `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). + public global::Ayllu.Github.Client.User.Repos.ReposPostRequestBody_merge_commit_title? MergeCommitTitle { get; set; } + /// The name of the repository. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Name { get; set; } +#nullable restore +#else + public string Name { get; set; } +#endif + /// Whether the repository is private. + public bool? Private { get; set; } + /// 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. + public global::Ayllu.Github.Client.User.Repos.ReposPostRequestBody_squash_merge_commit_message? SquashMergeCommitMessage { get; set; } + /// Required when using `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). + public global::Ayllu.Github.Client.User.Repos.ReposPostRequestBody_squash_merge_commit_title? SquashMergeCommitTitle { get; set; } + /// The id of the team that will be granted access to this repository. This is only valid when creating a repository in an organization. + public int? TeamId { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public ReposPostRequestBody() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.User.Repos.ReposPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.User.Repos.ReposPostRequestBody(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "allow_auto_merge", n => { AllowAutoMerge = n.GetBoolValue(); } }, + { "allow_merge_commit", n => { AllowMergeCommit = n.GetBoolValue(); } }, + { "allow_rebase_merge", n => { AllowRebaseMerge = n.GetBoolValue(); } }, + { "allow_squash_merge", n => { AllowSquashMerge = n.GetBoolValue(); } }, + { "auto_init", n => { AutoInit = n.GetBoolValue(); } }, + { "delete_branch_on_merge", n => { DeleteBranchOnMerge = n.GetBoolValue(); } }, + { "description", n => { Description = n.GetStringValue(); } }, + { "gitignore_template", n => { GitignoreTemplate = n.GetStringValue(); } }, + { "has_discussions", n => { HasDiscussions = n.GetBoolValue(); } }, + { "has_downloads", n => { HasDownloads = n.GetBoolValue(); } }, + { "has_issues", n => { HasIssues = n.GetBoolValue(); } }, + { "has_projects", n => { HasProjects = n.GetBoolValue(); } }, + { "has_wiki", n => { HasWiki = n.GetBoolValue(); } }, + { "homepage", n => { Homepage = n.GetStringValue(); } }, + { "is_template", n => { IsTemplate = n.GetBoolValue(); } }, + { "license_template", n => { LicenseTemplate = n.GetStringValue(); } }, + { "merge_commit_message", n => { MergeCommitMessage = n.GetEnumValue(); } }, + { "merge_commit_title", n => { MergeCommitTitle = n.GetEnumValue(); } }, + { "name", n => { Name = n.GetStringValue(); } }, + { "private", n => { Private = n.GetBoolValue(); } }, + { "squash_merge_commit_message", n => { SquashMergeCommitMessage = n.GetEnumValue(); } }, + { "squash_merge_commit_title", n => { SquashMergeCommitTitle = n.GetEnumValue(); } }, + { "team_id", n => { TeamId = n.GetIntValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteBoolValue("allow_auto_merge", AllowAutoMerge); + writer.WriteBoolValue("allow_merge_commit", AllowMergeCommit); + writer.WriteBoolValue("allow_rebase_merge", AllowRebaseMerge); + writer.WriteBoolValue("allow_squash_merge", AllowSquashMerge); + writer.WriteBoolValue("auto_init", AutoInit); + writer.WriteBoolValue("delete_branch_on_merge", DeleteBranchOnMerge); + writer.WriteStringValue("description", Description); + writer.WriteStringValue("gitignore_template", GitignoreTemplate); + writer.WriteBoolValue("has_discussions", HasDiscussions); + writer.WriteBoolValue("has_downloads", HasDownloads); + writer.WriteBoolValue("has_issues", HasIssues); + writer.WriteBoolValue("has_projects", HasProjects); + writer.WriteBoolValue("has_wiki", HasWiki); + writer.WriteStringValue("homepage", Homepage); + writer.WriteBoolValue("is_template", IsTemplate); + writer.WriteStringValue("license_template", LicenseTemplate); + writer.WriteEnumValue("merge_commit_message", MergeCommitMessage); + writer.WriteEnumValue("merge_commit_title", MergeCommitTitle); + writer.WriteStringValue("name", Name); + writer.WriteBoolValue("private", Private); + writer.WriteEnumValue("squash_merge_commit_message", SquashMergeCommitMessage); + writer.WriteEnumValue("squash_merge_commit_title", SquashMergeCommitTitle); + writer.WriteIntValue("team_id", TeamId); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/User/Repos/ReposPostRequestBody_merge_commit_message.cs b/src/Ayllu.Github.Client/Github/Client/User/Repos/ReposPostRequestBody_merge_commit_message.cs new file mode 100644 index 0000000..3b65481 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/User/Repos/ReposPostRequestBody_merge_commit_message.cs @@ -0,0 +1,23 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.User.Repos +{ + /// 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. + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public enum ReposPostRequestBody_merge_commit_message + { + [EnumMember(Value = "PR_BODY")] + #pragma warning disable CS1591 + PR_BODY, + #pragma warning restore CS1591 + [EnumMember(Value = "PR_TITLE")] + #pragma warning disable CS1591 + PR_TITLE, + #pragma warning restore CS1591 + [EnumMember(Value = "BLANK")] + #pragma warning disable CS1591 + BLANK, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/User/Repos/ReposPostRequestBody_merge_commit_title.cs b/src/Ayllu.Github.Client/Github/Client/User/Repos/ReposPostRequestBody_merge_commit_title.cs new file mode 100644 index 0000000..99ca1c2 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/User/Repos/ReposPostRequestBody_merge_commit_title.cs @@ -0,0 +1,19 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.User.Repos +{ + /// Required when using `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). + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public enum ReposPostRequestBody_merge_commit_title + { + [EnumMember(Value = "PR_TITLE")] + #pragma warning disable CS1591 + PR_TITLE, + #pragma warning restore CS1591 + [EnumMember(Value = "MERGE_MESSAGE")] + #pragma warning disable CS1591 + MERGE_MESSAGE, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/User/Repos/ReposPostRequestBody_squash_merge_commit_message.cs b/src/Ayllu.Github.Client/Github/Client/User/Repos/ReposPostRequestBody_squash_merge_commit_message.cs new file mode 100644 index 0000000..528136b --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/User/Repos/ReposPostRequestBody_squash_merge_commit_message.cs @@ -0,0 +1,23 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.User.Repos +{ + /// 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. + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public enum ReposPostRequestBody_squash_merge_commit_message + { + [EnumMember(Value = "PR_BODY")] + #pragma warning disable CS1591 + PR_BODY, + #pragma warning restore CS1591 + [EnumMember(Value = "COMMIT_MESSAGES")] + #pragma warning disable CS1591 + COMMIT_MESSAGES, + #pragma warning restore CS1591 + [EnumMember(Value = "BLANK")] + #pragma warning disable CS1591 + BLANK, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/User/Repos/ReposPostRequestBody_squash_merge_commit_title.cs b/src/Ayllu.Github.Client/Github/Client/User/Repos/ReposPostRequestBody_squash_merge_commit_title.cs new file mode 100644 index 0000000..0d0b741 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/User/Repos/ReposPostRequestBody_squash_merge_commit_title.cs @@ -0,0 +1,19 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.User.Repos +{ + /// Required when using `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). + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public enum ReposPostRequestBody_squash_merge_commit_title + { + [EnumMember(Value = "PR_TITLE")] + #pragma warning disable CS1591 + PR_TITLE, + #pragma warning restore CS1591 + [EnumMember(Value = "COMMIT_OR_PR_TITLE")] + #pragma warning disable CS1591 + COMMIT_OR_PR_TITLE, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/User/Repos/ReposRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/User/Repos/ReposRequestBuilder.cs new file mode 100644 index 0000000..a0c8fcd --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/User/Repos/ReposRequestBuilder.cs @@ -0,0 +1,252 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.User.Repos +{ + /// + /// Builds and executes requests for operations under \user\repos + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class ReposRequestBuilder : BaseRequestBuilder + { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public ReposRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/user/repos{?affiliation*,before*,direction*,page*,per_page*,since*,sort*,type*,visibility*}", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public ReposRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/user/repos{?affiliation*,before*,direction*,page*,per_page*,since*,sort*,type*,visibility*}", rawUrl) + { + } + /// + /// 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. + /// API method documentation + /// + /// A List<global::Ayllu.Github.Client.Models.Repository> + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 401 status code + /// When receiving a 403 status code + /// When receiving a 422 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task?> GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task> GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "401", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "403", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "422", global::Ayllu.Github.Client.Models.ValidationError.CreateFromDiscriminatorValue }, + }; + var collectionResult = await RequestAdapter.SendCollectionAsync(requestInfo, global::Ayllu.Github.Client.Models.Repository.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + return collectionResult?.AsList(); + } + /// + /// 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. + /// API method documentation + /// + /// A + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 400 status code + /// When receiving a 401 status code + /// When receiving a 403 status code + /// When receiving a 404 status code + /// When receiving a 422 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PostAsync(global::Ayllu.Github.Client.User.Repos.ReposPostRequestBody body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task PostAsync(global::Ayllu.Github.Client.User.Repos.ReposPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPostRequestInformation(body, requestConfiguration); + var errorMapping = new Dictionary> + { + { "400", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "401", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "403", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "404", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "422", global::Ayllu.Github.Client.Models.ValidationError.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Models.FullRepository.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// 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. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// 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. + /// + /// A + /// The request body + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPostRequestInformation(global::Ayllu.Github.Client.User.Repos.ReposPostRequestBody body, Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToPostRequestInformation(global::Ayllu.Github.Client.User.Repos.ReposPostRequestBody body, Action> requestConfiguration = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.User.Repos.ReposRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.User.Repos.ReposRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// 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. + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class ReposRequestBuilderGetQueryParameters + { + /// 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. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("affiliation")] + public string? Affiliation { get; set; } +#nullable restore +#else + [QueryParameter("affiliation")] + public string Affiliation { get; set; } +#endif + /// 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`. + [QueryParameter("before")] + public DateTimeOffset? Before { get; set; } + /// The order to sort by. Default: `asc` when using `full_name`, otherwise `desc`. + [Obsolete("This property is deprecated, use DirectionAsGetDirectionQueryParameterType instead")] +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("direction")] + public string? Direction { get; set; } +#nullable restore +#else + [QueryParameter("direction")] + public string Direction { get; set; } +#endif + /// The order to sort by. Default: `asc` when using `full_name`, otherwise `desc`. + [QueryParameter("direction")] + public global::Ayllu.Github.Client.User.Repos.GetDirectionQueryParameterType? DirectionAsGetDirectionQueryParameterType { get; set; } + /// The page number of the results to fetch. For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." + [QueryParameter("page")] + public int? Page { get; set; } + /// The number of results per page (max 100). For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." + [QueryParameter("per_page")] + public int? PerPage { get; set; } + /// 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`. + [QueryParameter("since")] + public DateTimeOffset? Since { get; set; } + /// The property to sort the results by. + [Obsolete("This property is deprecated, use SortAsGetSortQueryParameterType instead")] +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("sort")] + public string? Sort { get; set; } +#nullable restore +#else + [QueryParameter("sort")] + public string Sort { get; set; } +#endif + /// The property to sort the results by. + [QueryParameter("sort")] + public global::Ayllu.Github.Client.User.Repos.GetSortQueryParameterType? SortAsGetSortQueryParameterType { get; set; } + /// Limit results to repositories of the specified type. Will cause a `422` error if used in the same request as **visibility** or **affiliation**. + [Obsolete("This property is deprecated, use TypeAsGetTypeQueryParameterType instead")] +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("type")] + public string? Type { get; set; } +#nullable restore +#else + [QueryParameter("type")] + public string Type { get; set; } +#endif + /// Limit results to repositories of the specified type. Will cause a `422` error if used in the same request as **visibility** or **affiliation**. + [QueryParameter("type")] + public global::Ayllu.Github.Client.User.Repos.GetTypeQueryParameterType? TypeAsGetTypeQueryParameterType { get; set; } + /// Limit results to repositories with the specified visibility. + [Obsolete("This property is deprecated, use VisibilityAsGetVisibilityQueryParameterType instead")] +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("visibility")] + public string? Visibility { get; set; } +#nullable restore +#else + [QueryParameter("visibility")] + public string Visibility { get; set; } +#endif + /// Limit results to repositories with the specified visibility. + [QueryParameter("visibility")] + public global::Ayllu.Github.Client.User.Repos.GetVisibilityQueryParameterType? VisibilityAsGetVisibilityQueryParameterType { get; set; } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class ReposRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class ReposRequestBuilderPostRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/User/Repository_invitations/Item/WithInvitation_ItemRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/User/Repository_invitations/Item/WithInvitation_ItemRequestBuilder.cs new file mode 100644 index 0000000..fb7fb19 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/User/Repository_invitations/Item/WithInvitation_ItemRequestBuilder.cs @@ -0,0 +1,149 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.User.Repository_invitations.Item +{ + /// + /// Builds and executes requests for operations under \user\repository_invitations\{invitation_id} + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithInvitation_ItemRequestBuilder : BaseRequestBuilder + { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public WithInvitation_ItemRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/user/repository_invitations/{invitation_id}", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public WithInvitation_ItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/user/repository_invitations/{invitation_id}", rawUrl) + { + } + /// + /// Decline a repository invitation + /// API method documentation + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 403 status code + /// When receiving a 404 status code + /// When receiving a 409 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task DeleteAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task DeleteAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToDeleteRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "403", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "404", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "409", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + }; + await RequestAdapter.SendNoContentAsync(requestInfo, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// Accept a repository invitation + /// API method documentation + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 403 status code + /// When receiving a 404 status code + /// When receiving a 409 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PatchAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task PatchAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToPatchRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "403", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "404", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "409", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + }; + await RequestAdapter.SendNoContentAsync(requestInfo, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToDeleteRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToDeleteRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.DELETE, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPatchRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToPatchRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.User.Repository_invitations.Item.WithInvitation_ItemRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.User.Repository_invitations.Item.WithInvitation_ItemRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithInvitation_ItemRequestBuilderDeleteRequestConfiguration : RequestConfiguration + { + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithInvitation_ItemRequestBuilderPatchRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/User/Repository_invitations/Repository_invitationsRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/User/Repository_invitations/Repository_invitationsRequestBuilder.cs new file mode 100644 index 0000000..30f0379 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/User/Repository_invitations/Repository_invitationsRequestBuilder.cs @@ -0,0 +1,142 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Ayllu.Github.Client.User.Repository_invitations.Item; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.User.Repository_invitations +{ + /// + /// Builds and executes requests for operations under \user\repository_invitations + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class Repository_invitationsRequestBuilder : BaseRequestBuilder + { + /// Gets an item from the Ayllu.Github.Client.user.repository_invitations.item collection + /// The unique identifier of the invitation. + /// A + public global::Ayllu.Github.Client.User.Repository_invitations.Item.WithInvitation_ItemRequestBuilder this[int position] + { + get + { + var urlTplParams = new Dictionary(PathParameters); + urlTplParams.Add("invitation_id", position); + return new global::Ayllu.Github.Client.User.Repository_invitations.Item.WithInvitation_ItemRequestBuilder(urlTplParams, RequestAdapter); + } + } + /// Gets an item from the Ayllu.Github.Client.user.repository_invitations.item collection + /// The unique identifier of the invitation. + /// A + [Obsolete("This indexer is deprecated and will be removed in the next major version. Use the one with the typed parameter instead.")] + public global::Ayllu.Github.Client.User.Repository_invitations.Item.WithInvitation_ItemRequestBuilder this[string position] + { + get + { + var urlTplParams = new Dictionary(PathParameters); + if (!string.IsNullOrWhiteSpace(position)) urlTplParams.Add("invitation_id", position); + return new global::Ayllu.Github.Client.User.Repository_invitations.Item.WithInvitation_ItemRequestBuilder(urlTplParams, RequestAdapter); + } + } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public Repository_invitationsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/user/repository_invitations{?page*,per_page*}", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public Repository_invitationsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/user/repository_invitations{?page*,per_page*}", rawUrl) + { + } + /// + /// When authenticating as a user, this endpoint will list all currently open repository invitations for that user. + /// API method documentation + /// + /// A List<global::Ayllu.Github.Client.Models.RepositoryInvitation> + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 401 status code + /// When receiving a 403 status code + /// When receiving a 404 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task?> GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task> GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "401", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "403", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "404", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + }; + var collectionResult = await RequestAdapter.SendCollectionAsync(requestInfo, global::Ayllu.Github.Client.Models.RepositoryInvitation.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + return collectionResult?.AsList(); + } + /// + /// When authenticating as a user, this endpoint will list all currently open repository invitations for that user. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.User.Repository_invitations.Repository_invitationsRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.User.Repository_invitations.Repository_invitationsRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// When authenticating as a user, this endpoint will list all currently open repository invitations for that user. + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class Repository_invitationsRequestBuilderGetQueryParameters + { + /// The page number of the results to fetch. For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." + [QueryParameter("page")] + public int? Page { get; set; } + /// The number of results per page (max 100). For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." + [QueryParameter("per_page")] + public int? PerPage { get; set; } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class Repository_invitationsRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/User/Social_accounts/Social_accountsDeleteRequestBody.cs b/src/Ayllu.Github.Client/Github/Client/User/Social_accounts/Social_accountsDeleteRequestBody.cs new file mode 100644 index 0000000..de0f330 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/User/Social_accounts/Social_accountsDeleteRequestBody.cs @@ -0,0 +1,65 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.User.Social_accounts +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class Social_accountsDeleteRequestBody : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Full URLs for the social media profiles to delete. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? AccountUrls { get; set; } +#nullable restore +#else + public List AccountUrls { get; set; } +#endif + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public Social_accountsDeleteRequestBody() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.User.Social_accounts.Social_accountsDeleteRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.User.Social_accounts.Social_accountsDeleteRequestBody(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "account_urls", n => { AccountUrls = n.GetCollectionOfPrimitiveValues()?.AsList(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteCollectionOfPrimitiveValues("account_urls", AccountUrls); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/User/Social_accounts/Social_accountsPostRequestBody.cs b/src/Ayllu.Github.Client/Github/Client/User/Social_accounts/Social_accountsPostRequestBody.cs new file mode 100644 index 0000000..5b6d06f --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/User/Social_accounts/Social_accountsPostRequestBody.cs @@ -0,0 +1,65 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.User.Social_accounts +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class Social_accountsPostRequestBody : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Full URLs for the social media profiles to add. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? AccountUrls { get; set; } +#nullable restore +#else + public List AccountUrls { get; set; } +#endif + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public Social_accountsPostRequestBody() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.User.Social_accounts.Social_accountsPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.User.Social_accounts.Social_accountsPostRequestBody(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "account_urls", n => { AccountUrls = n.GetCollectionOfPrimitiveValues()?.AsList(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteCollectionOfPrimitiveValues("account_urls", AccountUrls); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/User/Social_accounts/Social_accountsRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/User/Social_accounts/Social_accountsRequestBuilder.cs new file mode 100644 index 0000000..0a7aed3 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/User/Social_accounts/Social_accountsRequestBuilder.cs @@ -0,0 +1,240 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.User.Social_accounts +{ + /// + /// Builds and executes requests for operations under \user\social_accounts + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class Social_accountsRequestBuilder : BaseRequestBuilder + { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public Social_accountsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/user/social_accounts{?page*,per_page*}", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public Social_accountsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/user/social_accounts{?page*,per_page*}", rawUrl) + { + } + /// + /// 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. + /// API method documentation + /// + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 401 status code + /// When receiving a 403 status code + /// When receiving a 404 status code + /// When receiving a 422 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task DeleteAsync(global::Ayllu.Github.Client.User.Social_accounts.Social_accountsDeleteRequestBody body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task DeleteAsync(global::Ayllu.Github.Client.User.Social_accounts.Social_accountsDeleteRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = ToDeleteRequestInformation(body, requestConfiguration); + var errorMapping = new Dictionary> + { + { "401", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "403", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "404", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "422", global::Ayllu.Github.Client.Models.ValidationError.CreateFromDiscriminatorValue }, + }; + await RequestAdapter.SendNoContentAsync(requestInfo, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// Lists all of your social accounts. + /// API method documentation + /// + /// A List<global::Ayllu.Github.Client.Models.SocialAccount> + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 401 status code + /// When receiving a 403 status code + /// When receiving a 404 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task?> GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task> GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "401", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "403", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "404", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + }; + var collectionResult = await RequestAdapter.SendCollectionAsync(requestInfo, global::Ayllu.Github.Client.Models.SocialAccount.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + return collectionResult?.AsList(); + } + /// + /// 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. + /// API method documentation + /// + /// A List<global::Ayllu.Github.Client.Models.SocialAccount> + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 401 status code + /// When receiving a 403 status code + /// When receiving a 404 status code + /// When receiving a 422 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task?> PostAsync(global::Ayllu.Github.Client.User.Social_accounts.Social_accountsPostRequestBody body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task> PostAsync(global::Ayllu.Github.Client.User.Social_accounts.Social_accountsPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPostRequestInformation(body, requestConfiguration); + var errorMapping = new Dictionary> + { + { "401", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "403", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "404", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "422", global::Ayllu.Github.Client.Models.ValidationError.CreateFromDiscriminatorValue }, + }; + var collectionResult = await RequestAdapter.SendCollectionAsync(requestInfo, global::Ayllu.Github.Client.Models.SocialAccount.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + return collectionResult?.AsList(); + } + /// + /// 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. + /// + /// A + /// The request body + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToDeleteRequestInformation(global::Ayllu.Github.Client.User.Social_accounts.Social_accountsDeleteRequestBody body, Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToDeleteRequestInformation(global::Ayllu.Github.Client.User.Social_accounts.Social_accountsDeleteRequestBody body, Action> requestConfiguration = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation(Method.DELETE, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + return requestInfo; + } + /// + /// Lists all of your social accounts. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// 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. + /// + /// A + /// The request body + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPostRequestInformation(global::Ayllu.Github.Client.User.Social_accounts.Social_accountsPostRequestBody body, Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToPostRequestInformation(global::Ayllu.Github.Client.User.Social_accounts.Social_accountsPostRequestBody body, Action> requestConfiguration = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.User.Social_accounts.Social_accountsRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.User.Social_accounts.Social_accountsRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class Social_accountsRequestBuilderDeleteRequestConfiguration : RequestConfiguration + { + } + /// + /// Lists all of your social accounts. + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class Social_accountsRequestBuilderGetQueryParameters + { + /// The page number of the results to fetch. For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." + [QueryParameter("page")] + public int? Page { get; set; } + /// The number of results per page (max 100). For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." + [QueryParameter("per_page")] + public int? PerPage { get; set; } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class Social_accountsRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class Social_accountsRequestBuilderPostRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/User/Ssh_signing_keys/Item/WithSsh_signing_key_ItemRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/User/Ssh_signing_keys/Item/WithSsh_signing_key_ItemRequestBuilder.cs new file mode 100644 index 0000000..8d6f420 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/User/Ssh_signing_keys/Item/WithSsh_signing_key_ItemRequestBuilder.cs @@ -0,0 +1,156 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.User.Ssh_signing_keys.Item +{ + /// + /// Builds and executes requests for operations under \user\ssh_signing_keys\{ssh_signing_key_id} + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithSsh_signing_key_ItemRequestBuilder : BaseRequestBuilder + { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public WithSsh_signing_key_ItemRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/user/ssh_signing_keys/{ssh_signing_key_id}", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public WithSsh_signing_key_ItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/user/ssh_signing_keys/{ssh_signing_key_id}", rawUrl) + { + } + /// + /// 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. + /// API method documentation + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 401 status code + /// When receiving a 403 status code + /// When receiving a 404 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task DeleteAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task DeleteAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToDeleteRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "401", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "403", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "404", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + }; + await RequestAdapter.SendNoContentAsync(requestInfo, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// 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. + /// API method documentation + /// + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 401 status code + /// When receiving a 403 status code + /// When receiving a 404 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "401", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "403", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "404", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Models.SshSigningKey.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// 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. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToDeleteRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToDeleteRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.DELETE, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// 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. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.User.Ssh_signing_keys.Item.WithSsh_signing_key_ItemRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.User.Ssh_signing_keys.Item.WithSsh_signing_key_ItemRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithSsh_signing_key_ItemRequestBuilderDeleteRequestConfiguration : RequestConfiguration + { + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithSsh_signing_key_ItemRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/User/Ssh_signing_keys/Ssh_signing_keysPostRequestBody.cs b/src/Ayllu.Github.Client/Github/Client/User/Ssh_signing_keys/Ssh_signing_keysPostRequestBody.cs new file mode 100644 index 0000000..f03d276 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/User/Ssh_signing_keys/Ssh_signing_keysPostRequestBody.cs @@ -0,0 +1,75 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.User.Ssh_signing_keys +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class Ssh_signing_keysPostRequestBody : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The public SSH key to add to your GitHub account. For more information, see "[Checking for existing SSH keys](https://docs.github.com/authentication/connecting-to-github-with-ssh/checking-for-existing-ssh-keys)." +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Key { get; set; } +#nullable restore +#else + public string Key { get; set; } +#endif + /// A descriptive name for the new key. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Title { get; set; } +#nullable restore +#else + public string Title { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public Ssh_signing_keysPostRequestBody() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.User.Ssh_signing_keys.Ssh_signing_keysPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.User.Ssh_signing_keys.Ssh_signing_keysPostRequestBody(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "key", n => { Key = n.GetStringValue(); } }, + { "title", n => { Title = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("key", Key); + writer.WriteStringValue("title", Title); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/User/Ssh_signing_keys/Ssh_signing_keysRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/User/Ssh_signing_keys/Ssh_signing_keysRequestBuilder.cs new file mode 100644 index 0000000..275d16f --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/User/Ssh_signing_keys/Ssh_signing_keysRequestBuilder.cs @@ -0,0 +1,204 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Ayllu.Github.Client.User.Ssh_signing_keys.Item; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.User.Ssh_signing_keys +{ + /// + /// Builds and executes requests for operations under \user\ssh_signing_keys + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class Ssh_signing_keysRequestBuilder : BaseRequestBuilder + { + /// Gets an item from the Ayllu.Github.Client.user.ssh_signing_keys.item collection + /// The unique identifier of the SSH signing key. + /// A + public global::Ayllu.Github.Client.User.Ssh_signing_keys.Item.WithSsh_signing_key_ItemRequestBuilder this[int position] + { + get + { + var urlTplParams = new Dictionary(PathParameters); + urlTplParams.Add("ssh_signing_key_id", position); + return new global::Ayllu.Github.Client.User.Ssh_signing_keys.Item.WithSsh_signing_key_ItemRequestBuilder(urlTplParams, RequestAdapter); + } + } + /// Gets an item from the Ayllu.Github.Client.user.ssh_signing_keys.item collection + /// The unique identifier of the SSH signing key. + /// A + [Obsolete("This indexer is deprecated and will be removed in the next major version. Use the one with the typed parameter instead.")] + public global::Ayllu.Github.Client.User.Ssh_signing_keys.Item.WithSsh_signing_key_ItemRequestBuilder this[string position] + { + get + { + var urlTplParams = new Dictionary(PathParameters); + if (!string.IsNullOrWhiteSpace(position)) urlTplParams.Add("ssh_signing_key_id", position); + return new global::Ayllu.Github.Client.User.Ssh_signing_keys.Item.WithSsh_signing_key_ItemRequestBuilder(urlTplParams, RequestAdapter); + } + } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public Ssh_signing_keysRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/user/ssh_signing_keys{?page*,per_page*}", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public Ssh_signing_keysRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/user/ssh_signing_keys{?page*,per_page*}", rawUrl) + { + } + /// + /// 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. + /// API method documentation + /// + /// A List<global::Ayllu.Github.Client.Models.SshSigningKey> + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 401 status code + /// When receiving a 403 status code + /// When receiving a 404 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task?> GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task> GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "401", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "403", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "404", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + }; + var collectionResult = await RequestAdapter.SendCollectionAsync(requestInfo, global::Ayllu.Github.Client.Models.SshSigningKey.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + return collectionResult?.AsList(); + } + /// + /// 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. + /// API method documentation + /// + /// A + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 401 status code + /// When receiving a 403 status code + /// When receiving a 404 status code + /// When receiving a 422 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PostAsync(global::Ayllu.Github.Client.User.Ssh_signing_keys.Ssh_signing_keysPostRequestBody body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task PostAsync(global::Ayllu.Github.Client.User.Ssh_signing_keys.Ssh_signing_keysPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPostRequestInformation(body, requestConfiguration); + var errorMapping = new Dictionary> + { + { "401", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "403", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "404", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "422", global::Ayllu.Github.Client.Models.ValidationError.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Models.SshSigningKey.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// 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. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// 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. + /// + /// A + /// The request body + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPostRequestInformation(global::Ayllu.Github.Client.User.Ssh_signing_keys.Ssh_signing_keysPostRequestBody body, Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToPostRequestInformation(global::Ayllu.Github.Client.User.Ssh_signing_keys.Ssh_signing_keysPostRequestBody body, Action> requestConfiguration = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.User.Ssh_signing_keys.Ssh_signing_keysRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.User.Ssh_signing_keys.Ssh_signing_keysRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// 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. + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class Ssh_signing_keysRequestBuilderGetQueryParameters + { + /// The page number of the results to fetch. For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." + [QueryParameter("page")] + public int? Page { get; set; } + /// The number of results per page (max 100). For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." + [QueryParameter("per_page")] + public int? PerPage { get; set; } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class Ssh_signing_keysRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class Ssh_signing_keysRequestBuilderPostRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/User/Starred/GetDirectionQueryParameterType.cs b/src/Ayllu.Github.Client/Github/Client/User/Starred/GetDirectionQueryParameterType.cs new file mode 100644 index 0000000..d1f89ae --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/User/Starred/GetDirectionQueryParameterType.cs @@ -0,0 +1,20 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.User.Starred +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public enum GetDirectionQueryParameterType + #pragma warning restore CS1591 + { + [EnumMember(Value = "asc")] + #pragma warning disable CS1591 + Asc, + #pragma warning restore CS1591 + [EnumMember(Value = "desc")] + #pragma warning disable CS1591 + Desc, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/User/Starred/GetSortQueryParameterType.cs b/src/Ayllu.Github.Client/Github/Client/User/Starred/GetSortQueryParameterType.cs new file mode 100644 index 0000000..02ea441 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/User/Starred/GetSortQueryParameterType.cs @@ -0,0 +1,20 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.User.Starred +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public enum GetSortQueryParameterType + #pragma warning restore CS1591 + { + [EnumMember(Value = "created")] + #pragma warning disable CS1591 + Created, + #pragma warning restore CS1591 + [EnumMember(Value = "updated")] + #pragma warning disable CS1591 + Updated, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/User/Starred/Item/Item/WithRepoItemRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/User/Starred/Item/Item/WithRepoItemRequestBuilder.cs new file mode 100644 index 0000000..720abfa --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/User/Starred/Item/Item/WithRepoItemRequestBuilder.cs @@ -0,0 +1,209 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.User.Starred.Item.Item +{ + /// + /// Builds and executes requests for operations under \user\starred\{owner}\{repo} + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithRepoItemRequestBuilder : BaseRequestBuilder + { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public WithRepoItemRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/user/starred/{owner}/{repo}", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public WithRepoItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/user/starred/{owner}/{repo}", rawUrl) + { + } + /// + /// Unstar a repository that the authenticated user has previously starred. + /// API method documentation + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 401 status code + /// When receiving a 403 status code + /// When receiving a 404 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task DeleteAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task DeleteAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToDeleteRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "401", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "403", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "404", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + }; + await RequestAdapter.SendNoContentAsync(requestInfo, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// Whether the authenticated user has starred the repository. + /// API method documentation + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 401 status code + /// When receiving a 403 status code + /// When receiving a 404 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "401", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "403", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "404", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + }; + await RequestAdapter.SendNoContentAsync(requestInfo, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// 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/rest/guides/getting-started-with-the-rest-api#http-method)." + /// API method documentation + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 401 status code + /// When receiving a 403 status code + /// When receiving a 404 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PutAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task PutAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToPutRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "401", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "403", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "404", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + }; + await RequestAdapter.SendNoContentAsync(requestInfo, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// Unstar a repository that the authenticated user has previously starred. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToDeleteRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToDeleteRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.DELETE, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Whether the authenticated user has starred the repository. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// 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/rest/guides/getting-started-with-the-rest-api#http-method)." + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPutRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToPutRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.PUT, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.User.Starred.Item.Item.WithRepoItemRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.User.Starred.Item.Item.WithRepoItemRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithRepoItemRequestBuilderDeleteRequestConfiguration : RequestConfiguration + { + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithRepoItemRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithRepoItemRequestBuilderPutRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/User/Starred/Item/WithOwnerItemRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/User/Starred/Item/WithOwnerItemRequestBuilder.cs new file mode 100644 index 0000000..e7734a8 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/User/Starred/Item/WithOwnerItemRequestBuilder.cs @@ -0,0 +1,48 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.User.Starred.Item.Item; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System; +namespace Ayllu.Github.Client.User.Starred.Item +{ + /// + /// Builds and executes requests for operations under \user\starred\{owner} + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithOwnerItemRequestBuilder : BaseRequestBuilder + { + /// Gets an item from the Ayllu.Github.Client.user.starred.item.item collection + /// Unique identifier of the item + /// A + public global::Ayllu.Github.Client.User.Starred.Item.Item.WithRepoItemRequestBuilder this[string position] + { + get + { + var urlTplParams = new Dictionary(PathParameters); + urlTplParams.Add("repo", position); + return new global::Ayllu.Github.Client.User.Starred.Item.Item.WithRepoItemRequestBuilder(urlTplParams, RequestAdapter); + } + } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public WithOwnerItemRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/user/starred/{owner}", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public WithOwnerItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/user/starred/{owner}", rawUrl) + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/User/Starred/StarredRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/User/Starred/StarredRequestBuilder.cs new file mode 100644 index 0000000..2ad7d2b --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/User/Starred/StarredRequestBuilder.cs @@ -0,0 +1,155 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Ayllu.Github.Client.User.Starred.Item; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.User.Starred +{ + /// + /// Builds and executes requests for operations under \user\starred + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class StarredRequestBuilder : BaseRequestBuilder + { + /// Gets an item from the Ayllu.Github.Client.user.starred.item collection + /// Unique identifier of the item + /// A + public global::Ayllu.Github.Client.User.Starred.Item.WithOwnerItemRequestBuilder this[string position] + { + get + { + var urlTplParams = new Dictionary(PathParameters); + urlTplParams.Add("owner", position); + return new global::Ayllu.Github.Client.User.Starred.Item.WithOwnerItemRequestBuilder(urlTplParams, RequestAdapter); + } + } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public StarredRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/user/starred{?direction*,page*,per_page*,sort*}", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public StarredRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/user/starred{?direction*,page*,per_page*,sort*}", rawUrl) + { + } + /// + /// 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/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. + /// API method documentation + /// + /// A List<global::Ayllu.Github.Client.Models.Repository> + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 401 status code + /// When receiving a 403 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task?> GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task> GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "401", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "403", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + }; + var collectionResult = await RequestAdapter.SendCollectionAsync(requestInfo, global::Ayllu.Github.Client.Models.Repository.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + return collectionResult?.AsList(); + } + /// + /// 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/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. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.User.Starred.StarredRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.User.Starred.StarredRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// 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/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. + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class StarredRequestBuilderGetQueryParameters + { + /// The direction to sort the results by. + [Obsolete("This property is deprecated, use DirectionAsGetDirectionQueryParameterType instead")] +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("direction")] + public string? Direction { get; set; } +#nullable restore +#else + [QueryParameter("direction")] + public string Direction { get; set; } +#endif + /// The direction to sort the results by. + [QueryParameter("direction")] + public global::Ayllu.Github.Client.User.Starred.GetDirectionQueryParameterType? DirectionAsGetDirectionQueryParameterType { get; set; } + /// The page number of the results to fetch. For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." + [QueryParameter("page")] + public int? Page { get; set; } + /// The number of results per page (max 100). For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." + [QueryParameter("per_page")] + public int? PerPage { get; set; } + /// The property to sort the results by. `created` means when the repository was starred. `updated` means when the repository was last pushed to. + [Obsolete("This property is deprecated, use SortAsGetSortQueryParameterType instead")] +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("sort")] + public string? Sort { get; set; } +#nullable restore +#else + [QueryParameter("sort")] + public string Sort { get; set; } +#endif + /// The property to sort the results by. `created` means when the repository was starred. `updated` means when the repository was last pushed to. + [QueryParameter("sort")] + public global::Ayllu.Github.Client.User.Starred.GetSortQueryParameterType? SortAsGetSortQueryParameterType { get; set; } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class StarredRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/User/Subscriptions/SubscriptionsRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/User/Subscriptions/SubscriptionsRequestBuilder.cs new file mode 100644 index 0000000..dfeb58c --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/User/Subscriptions/SubscriptionsRequestBuilder.cs @@ -0,0 +1,114 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.User.Subscriptions +{ + /// + /// Builds and executes requests for operations under \user\subscriptions + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class SubscriptionsRequestBuilder : BaseRequestBuilder + { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public SubscriptionsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/user/subscriptions{?page*,per_page*}", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public SubscriptionsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/user/subscriptions{?page*,per_page*}", rawUrl) + { + } + /// + /// Lists repositories the authenticated user is watching. + /// API method documentation + /// + /// A List<global::Ayllu.Github.Client.Models.MinimalRepository> + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 401 status code + /// When receiving a 403 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task?> GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task> GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "401", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "403", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + }; + var collectionResult = await RequestAdapter.SendCollectionAsync(requestInfo, global::Ayllu.Github.Client.Models.MinimalRepository.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + return collectionResult?.AsList(); + } + /// + /// Lists repositories the authenticated user is watching. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.User.Subscriptions.SubscriptionsRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.User.Subscriptions.SubscriptionsRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Lists repositories the authenticated user is watching. + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class SubscriptionsRequestBuilderGetQueryParameters + { + /// The page number of the results to fetch. For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." + [QueryParameter("page")] + public int? Page { get; set; } + /// The number of results per page (max 100). For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." + [QueryParameter("per_page")] + public int? PerPage { get; set; } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class SubscriptionsRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/User/Teams/TeamsRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/User/Teams/TeamsRequestBuilder.cs new file mode 100644 index 0000000..6a7c0e0 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/User/Teams/TeamsRequestBuilder.cs @@ -0,0 +1,114 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.User.Teams +{ + /// + /// Builds and executes requests for operations under \user\teams + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class TeamsRequestBuilder : BaseRequestBuilder + { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public TeamsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/user/teams{?page*,per_page*}", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public TeamsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/user/teams{?page*,per_page*}", rawUrl) + { + } + /// + /// 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. + /// API method documentation + /// + /// A List<global::Ayllu.Github.Client.Models.TeamFull> + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 403 status code + /// When receiving a 404 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task?> GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task> GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "403", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "404", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + }; + var collectionResult = await RequestAdapter.SendCollectionAsync(requestInfo, global::Ayllu.Github.Client.Models.TeamFull.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + return collectionResult?.AsList(); + } + /// + /// 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. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.User.Teams.TeamsRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.User.Teams.TeamsRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// 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. + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class TeamsRequestBuilderGetQueryParameters + { + /// The page number of the results to fetch. For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." + [QueryParameter("page")] + public int? Page { get; set; } + /// The number of results per page (max 100). For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." + [QueryParameter("per_page")] + public int? PerPage { get; set; } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class TeamsRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/User/UserPatchRequestBody.cs b/src/Ayllu.Github.Client/Github/Client/User/UserPatchRequestBody.cs new file mode 100644 index 0000000..d3e73d4 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/User/UserPatchRequestBody.cs @@ -0,0 +1,129 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.User +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class UserPatchRequestBody : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The new short biography of the user. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Bio { get; set; } +#nullable restore +#else + public string Bio { get; set; } +#endif + /// The new blog URL of the user. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Blog { get; set; } +#nullable restore +#else + public string Blog { get; set; } +#endif + /// The new company of the user. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Company { get; set; } +#nullable restore +#else + public string Company { get; set; } +#endif + /// The publicly visible email address of the user. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Email { get; set; } +#nullable restore +#else + public string Email { get; set; } +#endif + /// The new hiring availability of the user. + public bool? Hireable { get; set; } + /// The new location of the user. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Location { get; set; } +#nullable restore +#else + public string Location { get; set; } +#endif + /// The new name of the user. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Name { get; set; } +#nullable restore +#else + public string Name { get; set; } +#endif + /// The new Twitter username of the user. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? TwitterUsername { get; set; } +#nullable restore +#else + public string TwitterUsername { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public UserPatchRequestBody() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.User.UserPatchRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.User.UserPatchRequestBody(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "bio", n => { Bio = n.GetStringValue(); } }, + { "blog", n => { Blog = n.GetStringValue(); } }, + { "company", n => { Company = n.GetStringValue(); } }, + { "email", n => { Email = n.GetStringValue(); } }, + { "hireable", n => { Hireable = n.GetBoolValue(); } }, + { "location", n => { Location = n.GetStringValue(); } }, + { "name", n => { Name = n.GetStringValue(); } }, + { "twitter_username", n => { TwitterUsername = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("bio", Bio); + writer.WriteStringValue("blog", Blog); + writer.WriteStringValue("company", Company); + writer.WriteStringValue("email", Email); + writer.WriteBoolValue("hireable", Hireable); + writer.WriteStringValue("location", Location); + writer.WriteStringValue("name", Name); + writer.WriteStringValue("twitter_username", TwitterUsername); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/User/UserRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/User/UserRequestBuilder.cs new file mode 100644 index 0000000..58260e7 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/User/UserRequestBuilder.cs @@ -0,0 +1,521 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Ayllu.Github.Client.User.Blocks; +using Ayllu.Github.Client.User.Codespaces; +using Ayllu.Github.Client.User.Docker; +using Ayllu.Github.Client.User.Email; +using Ayllu.Github.Client.User.Emails; +using Ayllu.Github.Client.User.Followers; +using Ayllu.Github.Client.User.Following; +using Ayllu.Github.Client.User.Gpg_keys; +using Ayllu.Github.Client.User.Installations; +using Ayllu.Github.Client.User.InteractionLimits; +using Ayllu.Github.Client.User.Issues; +using Ayllu.Github.Client.User.Item; +using Ayllu.Github.Client.User.Keys; +using Ayllu.Github.Client.User.Marketplace_purchases; +using Ayllu.Github.Client.User.Memberships; +using Ayllu.Github.Client.User.Migrations; +using Ayllu.Github.Client.User.Orgs; +using Ayllu.Github.Client.User.Packages; +using Ayllu.Github.Client.User.Projects; +using Ayllu.Github.Client.User.Public_emails; +using Ayllu.Github.Client.User.Repos; +using Ayllu.Github.Client.User.Repository_invitations; +using Ayllu.Github.Client.User.Social_accounts; +using Ayllu.Github.Client.User.Ssh_signing_keys; +using Ayllu.Github.Client.User.Starred; +using Ayllu.Github.Client.User.Subscriptions; +using Ayllu.Github.Client.User.Teams; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.User +{ + /// + /// Builds and executes requests for operations under \user + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class UserRequestBuilder : BaseRequestBuilder + { + /// The blocks property + public global::Ayllu.Github.Client.User.Blocks.BlocksRequestBuilder Blocks + { + get => new global::Ayllu.Github.Client.User.Blocks.BlocksRequestBuilder(PathParameters, RequestAdapter); + } + /// The codespaces property + public global::Ayllu.Github.Client.User.Codespaces.CodespacesRequestBuilder Codespaces + { + get => new global::Ayllu.Github.Client.User.Codespaces.CodespacesRequestBuilder(PathParameters, RequestAdapter); + } + /// The docker property + public global::Ayllu.Github.Client.User.Docker.DockerRequestBuilder Docker + { + get => new global::Ayllu.Github.Client.User.Docker.DockerRequestBuilder(PathParameters, RequestAdapter); + } + /// The email property + public global::Ayllu.Github.Client.User.Email.EmailRequestBuilder Email + { + get => new global::Ayllu.Github.Client.User.Email.EmailRequestBuilder(PathParameters, RequestAdapter); + } + /// The emails property + public global::Ayllu.Github.Client.User.Emails.EmailsRequestBuilder Emails + { + get => new global::Ayllu.Github.Client.User.Emails.EmailsRequestBuilder(PathParameters, RequestAdapter); + } + /// The followers property + public global::Ayllu.Github.Client.User.Followers.FollowersRequestBuilder Followers + { + get => new global::Ayllu.Github.Client.User.Followers.FollowersRequestBuilder(PathParameters, RequestAdapter); + } + /// The following property + public global::Ayllu.Github.Client.User.Following.FollowingRequestBuilder Following + { + get => new global::Ayllu.Github.Client.User.Following.FollowingRequestBuilder(PathParameters, RequestAdapter); + } + /// The gpg_keys property + public global::Ayllu.Github.Client.User.Gpg_keys.Gpg_keysRequestBuilder Gpg_keys + { + get => new global::Ayllu.Github.Client.User.Gpg_keys.Gpg_keysRequestBuilder(PathParameters, RequestAdapter); + } + /// The installations property + public global::Ayllu.Github.Client.User.Installations.InstallationsRequestBuilder Installations + { + get => new global::Ayllu.Github.Client.User.Installations.InstallationsRequestBuilder(PathParameters, RequestAdapter); + } + /// The interactionLimits property + public global::Ayllu.Github.Client.User.InteractionLimits.InteractionLimitsRequestBuilder InteractionLimits + { + get => new global::Ayllu.Github.Client.User.InteractionLimits.InteractionLimitsRequestBuilder(PathParameters, RequestAdapter); + } + /// The issues property + public global::Ayllu.Github.Client.User.Issues.IssuesRequestBuilder Issues + { + get => new global::Ayllu.Github.Client.User.Issues.IssuesRequestBuilder(PathParameters, RequestAdapter); + } + /// The keys property + public global::Ayllu.Github.Client.User.Keys.KeysRequestBuilder Keys + { + get => new global::Ayllu.Github.Client.User.Keys.KeysRequestBuilder(PathParameters, RequestAdapter); + } + /// The marketplace_purchases property + public global::Ayllu.Github.Client.User.Marketplace_purchases.Marketplace_purchasesRequestBuilder Marketplace_purchases + { + get => new global::Ayllu.Github.Client.User.Marketplace_purchases.Marketplace_purchasesRequestBuilder(PathParameters, RequestAdapter); + } + /// The memberships property + public global::Ayllu.Github.Client.User.Memberships.MembershipsRequestBuilder Memberships + { + get => new global::Ayllu.Github.Client.User.Memberships.MembershipsRequestBuilder(PathParameters, RequestAdapter); + } + /// The migrations property + public global::Ayllu.Github.Client.User.Migrations.MigrationsRequestBuilder Migrations + { + get => new global::Ayllu.Github.Client.User.Migrations.MigrationsRequestBuilder(PathParameters, RequestAdapter); + } + /// The orgs property + public global::Ayllu.Github.Client.User.Orgs.OrgsRequestBuilder Orgs + { + get => new global::Ayllu.Github.Client.User.Orgs.OrgsRequestBuilder(PathParameters, RequestAdapter); + } + /// The packages property + public global::Ayllu.Github.Client.User.Packages.PackagesRequestBuilder Packages + { + get => new global::Ayllu.Github.Client.User.Packages.PackagesRequestBuilder(PathParameters, RequestAdapter); + } + /// The projects property + public global::Ayllu.Github.Client.User.Projects.ProjectsRequestBuilder Projects + { + get => new global::Ayllu.Github.Client.User.Projects.ProjectsRequestBuilder(PathParameters, RequestAdapter); + } + /// The public_emails property + public global::Ayllu.Github.Client.User.Public_emails.Public_emailsRequestBuilder Public_emails + { + get => new global::Ayllu.Github.Client.User.Public_emails.Public_emailsRequestBuilder(PathParameters, RequestAdapter); + } + /// The repos property + public global::Ayllu.Github.Client.User.Repos.ReposRequestBuilder Repos + { + get => new global::Ayllu.Github.Client.User.Repos.ReposRequestBuilder(PathParameters, RequestAdapter); + } + /// The repository_invitations property + public global::Ayllu.Github.Client.User.Repository_invitations.Repository_invitationsRequestBuilder Repository_invitations + { + get => new global::Ayllu.Github.Client.User.Repository_invitations.Repository_invitationsRequestBuilder(PathParameters, RequestAdapter); + } + /// The social_accounts property + public global::Ayllu.Github.Client.User.Social_accounts.Social_accountsRequestBuilder Social_accounts + { + get => new global::Ayllu.Github.Client.User.Social_accounts.Social_accountsRequestBuilder(PathParameters, RequestAdapter); + } + /// The ssh_signing_keys property + public global::Ayllu.Github.Client.User.Ssh_signing_keys.Ssh_signing_keysRequestBuilder Ssh_signing_keys + { + get => new global::Ayllu.Github.Client.User.Ssh_signing_keys.Ssh_signing_keysRequestBuilder(PathParameters, RequestAdapter); + } + /// The starred property + public global::Ayllu.Github.Client.User.Starred.StarredRequestBuilder Starred + { + get => new global::Ayllu.Github.Client.User.Starred.StarredRequestBuilder(PathParameters, RequestAdapter); + } + /// The subscriptions property + public global::Ayllu.Github.Client.User.Subscriptions.SubscriptionsRequestBuilder Subscriptions + { + get => new global::Ayllu.Github.Client.User.Subscriptions.SubscriptionsRequestBuilder(PathParameters, RequestAdapter); + } + /// The teams property + public global::Ayllu.Github.Client.User.Teams.TeamsRequestBuilder Teams + { + get => new global::Ayllu.Github.Client.User.Teams.TeamsRequestBuilder(PathParameters, RequestAdapter); + } + /// Gets an item from the Ayllu.Github.Client.user.item collection + /// account_id parameter + /// A + public global::Ayllu.Github.Client.User.Item.WithAccount_ItemRequestBuilder this[int position] + { + get + { + var urlTplParams = new Dictionary(PathParameters); + urlTplParams.Add("account_id", position); + return new global::Ayllu.Github.Client.User.Item.WithAccount_ItemRequestBuilder(urlTplParams, RequestAdapter); + } + } + /// Gets an item from the Ayllu.Github.Client.user.item collection + /// account_id parameter + /// A + [Obsolete("This indexer is deprecated and will be removed in the next major version. Use the one with the typed parameter instead.")] + public global::Ayllu.Github.Client.User.Item.WithAccount_ItemRequestBuilder this[string position] + { + get + { + var urlTplParams = new Dictionary(PathParameters); + if (!string.IsNullOrWhiteSpace(position)) urlTplParams.Add("account_id", position); + return new global::Ayllu.Github.Client.User.Item.WithAccount_ItemRequestBuilder(urlTplParams, RequestAdapter); + } + } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public UserRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/user", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public UserRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/user", rawUrl) + { + } + /// + /// OAuth app tokens and personal access tokens (classic) need the `user` scope in order for the response to include private profile information. + /// API method documentation + /// + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 401 status code + /// When receiving a 403 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsUserGetResponseAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task GetAsUserGetResponseAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "401", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "403", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.User.UserRequestBuilder.UserGetResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// OAuth app tokens and personal access tokens (classic) need the `user` scope in order for the response to include private profile information. + /// API method documentation + /// + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 401 status code + /// When receiving a 403 status code + [Obsolete("This method is obsolete. Use GetAsUserGetResponseAsync instead.")] +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "401", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "403", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.User.UserRequestBuilder.UserResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// **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. + /// API method documentation + /// + /// A + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 401 status code + /// When receiving a 403 status code + /// When receiving a 404 status code + /// When receiving a 422 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PatchAsync(global::Ayllu.Github.Client.User.UserPatchRequestBody body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task PatchAsync(global::Ayllu.Github.Client.User.UserPatchRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPatchRequestInformation(body, requestConfiguration); + var errorMapping = new Dictionary> + { + { "401", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "403", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "404", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "422", global::Ayllu.Github.Client.Models.ValidationError.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Models.PrivateUser.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// OAuth app tokens and personal access tokens (classic) need the `user` scope in order for the response to include private profile information. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// **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. + /// + /// A + /// The request body + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPatchRequestInformation(global::Ayllu.Github.Client.User.UserPatchRequestBody body, Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToPatchRequestInformation(global::Ayllu.Github.Client.User.UserPatchRequestBody body, Action> requestConfiguration = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.User.UserRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.User.UserRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Composed type wrapper for classes , + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class UserGetResponse : IComposedTypeWrapper, IParsable + { + /// Composed type representation for type +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.PrivateUser? PrivateUser { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.PrivateUser PrivateUser { get; set; } +#endif + /// Composed type representation for type +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.PublicUser? PublicUser { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.PublicUser PublicUser { get; set; } +#endif + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.User.UserRequestBuilder.UserGetResponse CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + var mappingValue = parseNode.GetChildNode("user_view_type")?.GetStringValue(); + var result = new global::Ayllu.Github.Client.User.UserRequestBuilder.UserGetResponse(); + if("private".Equals(mappingValue, StringComparison.OrdinalIgnoreCase)) + { + result.PrivateUser = new global::Ayllu.Github.Client.Models.PrivateUser(); + } + else if("public".Equals(mappingValue, StringComparison.OrdinalIgnoreCase)) + { + result.PublicUser = new global::Ayllu.Github.Client.Models.PublicUser(); + } + return result; + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + if(PrivateUser != null) + { + return PrivateUser.GetFieldDeserializers(); + } + else if(PublicUser != null) + { + return PublicUser.GetFieldDeserializers(); + } + return new Dictionary>(); + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(PrivateUser != null) + { + writer.WriteObjectValue(null, PrivateUser); + } + else if(PublicUser != null) + { + writer.WriteObjectValue(null, PublicUser); + } + } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class UserRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class UserRequestBuilderPatchRequestConfiguration : RequestConfiguration + { + } + /// + /// Composed type wrapper for classes , + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class UserResponse : IComposedTypeWrapper, IParsable + { + /// Composed type representation for type +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.PrivateUser? PrivateUser { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.PrivateUser PrivateUser { get; set; } +#endif + /// Composed type representation for type +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.PublicUser? PublicUser { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.PublicUser PublicUser { get; set; } +#endif + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.User.UserRequestBuilder.UserResponse CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + var mappingValue = parseNode.GetChildNode("user_view_type")?.GetStringValue(); + var result = new global::Ayllu.Github.Client.User.UserRequestBuilder.UserResponse(); + if("private".Equals(mappingValue, StringComparison.OrdinalIgnoreCase)) + { + result.PrivateUser = new global::Ayllu.Github.Client.Models.PrivateUser(); + } + else if("public".Equals(mappingValue, StringComparison.OrdinalIgnoreCase)) + { + result.PublicUser = new global::Ayllu.Github.Client.Models.PublicUser(); + } + return result; + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + if(PrivateUser != null) + { + return PrivateUser.GetFieldDeserializers(); + } + else if(PublicUser != null) + { + return PublicUser.GetFieldDeserializers(); + } + return new Dictionary>(); + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(PrivateUser != null) + { + writer.WriteObjectValue(null, PrivateUser); + } + else if(PublicUser != null) + { + writer.WriteObjectValue(null, PublicUser); + } + } + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Users/Item/Attestations/AttestationsRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Users/Item/Attestations/AttestationsRequestBuilder.cs new file mode 100644 index 0000000..b10b330 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Users/Item/Attestations/AttestationsRequestBuilder.cs @@ -0,0 +1,79 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Users.Item.Attestations.BulkList; +using Ayllu.Github.Client.Users.Item.Attestations.DeleteRequest; +using Ayllu.Github.Client.Users.Item.Attestations.Digest; +using Ayllu.Github.Client.Users.Item.Attestations.Item; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System; +namespace Ayllu.Github.Client.Users.Item.Attestations +{ + /// + /// Builds and executes requests for operations under \users\{username}\attestations + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class AttestationsRequestBuilder : BaseRequestBuilder + { + /// The bulkList property + public global::Ayllu.Github.Client.Users.Item.Attestations.BulkList.BulkListRequestBuilder BulkList + { + get => new global::Ayllu.Github.Client.Users.Item.Attestations.BulkList.BulkListRequestBuilder(PathParameters, RequestAdapter); + } + /// The deleteRequest property + public global::Ayllu.Github.Client.Users.Item.Attestations.DeleteRequest.DeleteRequestRequestBuilder DeleteRequest + { + get => new global::Ayllu.Github.Client.Users.Item.Attestations.DeleteRequest.DeleteRequestRequestBuilder(PathParameters, RequestAdapter); + } + /// The digest property + public global::Ayllu.Github.Client.Users.Item.Attestations.Digest.DigestRequestBuilder Digest + { + get => new global::Ayllu.Github.Client.Users.Item.Attestations.Digest.DigestRequestBuilder(PathParameters, RequestAdapter); + } + /// Gets an item from the Ayllu.Github.Client.users.item.attestations.item collection + /// Attestation ID + /// A + public global::Ayllu.Github.Client.Users.Item.Attestations.Item.Attestation_ItemRequestBuilder this[int position] + { + get + { + var urlTplParams = new Dictionary(PathParameters); + urlTplParams.Add("attestation_%2Did", position); + return new global::Ayllu.Github.Client.Users.Item.Attestations.Item.Attestation_ItemRequestBuilder(urlTplParams, RequestAdapter); + } + } + /// Gets an item from the Ayllu.Github.Client.users.item.attestations.item collection + /// Attestation ID + /// A + [Obsolete("This indexer is deprecated and will be removed in the next major version. Use the one with the typed parameter instead.")] + public global::Ayllu.Github.Client.Users.Item.Attestations.Item.Attestation_ItemRequestBuilder this[string position] + { + get + { + var urlTplParams = new Dictionary(PathParameters); + if (!string.IsNullOrWhiteSpace(position)) urlTplParams.Add("attestation_%2Did", position); + return new global::Ayllu.Github.Client.Users.Item.Attestations.Item.Attestation_ItemRequestBuilder(urlTplParams, RequestAdapter); + } + } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public AttestationsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/users/{username}/attestations", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public AttestationsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/users/{username}/attestations", rawUrl) + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Users/Item/Attestations/BulkList/BulkListPostRequestBody.cs b/src/Ayllu.Github.Client/Github/Client/Users/Item/Attestations/BulkList/BulkListPostRequestBody.cs new file mode 100644 index 0000000..e2a8be8 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Users/Item/Attestations/BulkList/BulkListPostRequestBody.cs @@ -0,0 +1,75 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Users.Item.Attestations.BulkList +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class BulkListPostRequestBody : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// Optional filter for fetching attestations with a given predicate type.This option accepts `provenance`, `sbom`, or freeform text for custom predicate types. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? PredicateType { get; set; } +#nullable restore +#else + public string PredicateType { get; set; } +#endif + /// List of subject digests to fetch attestations for. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? SubjectDigests { get; set; } +#nullable restore +#else + public List SubjectDigests { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public BulkListPostRequestBody() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Users.Item.Attestations.BulkList.BulkListPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Users.Item.Attestations.BulkList.BulkListPostRequestBody(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "predicate_type", n => { PredicateType = n.GetStringValue(); } }, + { "subject_digests", n => { SubjectDigests = n.GetCollectionOfPrimitiveValues()?.AsList(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("predicate_type", PredicateType); + writer.WriteCollectionOfPrimitiveValues("subject_digests", SubjectDigests); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Users/Item/Attestations/BulkList/BulkListPostResponse.cs b/src/Ayllu.Github.Client/Github/Client/Users/Item/Attestations/BulkList/BulkListPostResponse.cs new file mode 100644 index 0000000..f315c82 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Users/Item/Attestations/BulkList/BulkListPostResponse.cs @@ -0,0 +1,75 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Users.Item.Attestations.BulkList +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class BulkListPostResponse : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// Mapping of subject digest to bundles. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Users.Item.Attestations.BulkList.BulkListPostResponse_attestations_subject_digests? AttestationsSubjectDigests { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Users.Item.Attestations.BulkList.BulkListPostResponse_attestations_subject_digests AttestationsSubjectDigests { get; set; } +#endif + /// Information about the current page. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Users.Item.Attestations.BulkList.BulkListPostResponse_page_info? PageInfo { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Users.Item.Attestations.BulkList.BulkListPostResponse_page_info PageInfo { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public BulkListPostResponse() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Users.Item.Attestations.BulkList.BulkListPostResponse CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Users.Item.Attestations.BulkList.BulkListPostResponse(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "attestations_subject_digests", n => { AttestationsSubjectDigests = n.GetObjectValue(global::Ayllu.Github.Client.Users.Item.Attestations.BulkList.BulkListPostResponse_attestations_subject_digests.CreateFromDiscriminatorValue); } }, + { "page_info", n => { PageInfo = n.GetObjectValue(global::Ayllu.Github.Client.Users.Item.Attestations.BulkList.BulkListPostResponse_page_info.CreateFromDiscriminatorValue); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteObjectValue("attestations_subject_digests", AttestationsSubjectDigests); + writer.WriteObjectValue("page_info", PageInfo); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Users/Item/Attestations/BulkList/BulkListPostResponse_attestations_subject_digests.cs b/src/Ayllu.Github.Client/Github/Client/Users/Item/Attestations/BulkList/BulkListPostResponse_attestations_subject_digests.cs new file mode 100644 index 0000000..b895d5f --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Users/Item/Attestations/BulkList/BulkListPostResponse_attestations_subject_digests.cs @@ -0,0 +1,56 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Users.Item.Attestations.BulkList +{ + /// + /// Mapping of subject digest to bundles. + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class BulkListPostResponse_attestations_subject_digests : IAdditionalDataHolder, IParsable + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public BulkListPostResponse_attestations_subject_digests() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Users.Item.Attestations.BulkList.BulkListPostResponse_attestations_subject_digests CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Users.Item.Attestations.BulkList.BulkListPostResponse_attestations_subject_digests(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Users/Item/Attestations/BulkList/BulkListPostResponse_page_info.cs b/src/Ayllu.Github.Client/Github/Client/Users/Item/Attestations/BulkList/BulkListPostResponse_page_info.cs new file mode 100644 index 0000000..a25f905 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Users/Item/Attestations/BulkList/BulkListPostResponse_page_info.cs @@ -0,0 +1,84 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Users.Item.Attestations.BulkList +{ + /// + /// Information about the current page. + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class BulkListPostResponse_page_info : IAdditionalDataHolder, IParsable + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// Indicates whether there is a next page. + public bool? HasNext { get; set; } + /// Indicates whether there is a previous page. + public bool? HasPrevious { get; set; } + /// The cursor to the next page. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Next { get; set; } +#nullable restore +#else + public string Next { get; set; } +#endif + /// The cursor to the previous page. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Previous { get; set; } +#nullable restore +#else + public string Previous { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public BulkListPostResponse_page_info() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Users.Item.Attestations.BulkList.BulkListPostResponse_page_info CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Users.Item.Attestations.BulkList.BulkListPostResponse_page_info(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "has_next", n => { HasNext = n.GetBoolValue(); } }, + { "has_previous", n => { HasPrevious = n.GetBoolValue(); } }, + { "next", n => { Next = n.GetStringValue(); } }, + { "previous", n => { Previous = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteBoolValue("has_next", HasNext); + writer.WriteBoolValue("has_previous", HasPrevious); + writer.WriteStringValue("next", Next); + writer.WriteStringValue("previous", Previous); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Users/Item/Attestations/BulkList/BulkListRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Users/Item/Attestations/BulkList/BulkListRequestBuilder.cs new file mode 100644 index 0000000..7575ff7 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Users/Item/Attestations/BulkList/BulkListRequestBuilder.cs @@ -0,0 +1,149 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Users.Item.Attestations.BulkList +{ + /// + /// Builds and executes requests for operations under \users\{username}\attestations\bulk-list + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class BulkListRequestBuilder : BaseRequestBuilder + { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public BulkListRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/users/{username}/attestations/bulk-list{?after*,before*,per_page*}", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public BulkListRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/users/{username}/attestations/bulk-list{?after*,before*,per_page*}", rawUrl) + { + } + /// + /// List a collection of artifact attestations associated with any entry in a list of subject digests 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/actions/security-guides/using-artifact-attestations-to-establish-provenance-for-builds). + /// API method documentation + /// + /// A + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PostAsBulkListPostResponseAsync(global::Ayllu.Github.Client.Users.Item.Attestations.BulkList.BulkListPostRequestBody body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task PostAsBulkListPostResponseAsync(global::Ayllu.Github.Client.Users.Item.Attestations.BulkList.BulkListPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPostRequestInformation(body, requestConfiguration); + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Users.Item.Attestations.BulkList.BulkListPostResponse.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false); + } + /// + /// List a collection of artifact attestations associated with any entry in a list of subject digests 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/actions/security-guides/using-artifact-attestations-to-establish-provenance-for-builds). + /// API method documentation + /// + /// A + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + [Obsolete("This method is obsolete. Use PostAsBulkListPostResponseAsync instead.")] +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PostAsync(global::Ayllu.Github.Client.Users.Item.Attestations.BulkList.BulkListPostRequestBody body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task PostAsync(global::Ayllu.Github.Client.Users.Item.Attestations.BulkList.BulkListPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPostRequestInformation(body, requestConfiguration); + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Users.Item.Attestations.BulkList.BulkListResponse.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false); + } + /// + /// List a collection of artifact attestations associated with any entry in a list of subject digests 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/actions/security-guides/using-artifact-attestations-to-establish-provenance-for-builds). + /// + /// A + /// The request body + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPostRequestInformation(global::Ayllu.Github.Client.Users.Item.Attestations.BulkList.BulkListPostRequestBody body, Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToPostRequestInformation(global::Ayllu.Github.Client.Users.Item.Attestations.BulkList.BulkListPostRequestBody body, Action> requestConfiguration = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.Users.Item.Attestations.BulkList.BulkListRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Users.Item.Attestations.BulkList.BulkListRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// List a collection of artifact attestations associated with any entry in a list of subject digests 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/actions/security-guides/using-artifact-attestations-to-establish-provenance-for-builds). + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class BulkListRequestBuilderPostQueryParameters + { + /// A cursor, as given in the [Link header](https://docs.github.com/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/rest/using-the-rest-api/using-pagination-in-the-rest-api)." +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("after")] + public string? After { get; set; } +#nullable restore +#else + [QueryParameter("after")] + public string After { get; set; } +#endif + /// A cursor, as given in the [Link header](https://docs.github.com/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/rest/using-the-rest-api/using-pagination-in-the-rest-api)." +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("before")] + public string? Before { get; set; } +#nullable restore +#else + [QueryParameter("before")] + public string Before { get; set; } +#endif + /// The number of results per page (max 100). For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." + [QueryParameter("per_page")] + public int? PerPage { get; set; } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class BulkListRequestBuilderPostRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Users/Item/Attestations/BulkList/BulkListResponse.cs b/src/Ayllu.Github.Client/Github/Client/Users/Item/Attestations/BulkList/BulkListResponse.cs new file mode 100644 index 0000000..0d14b2f --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Users/Item/Attestations/BulkList/BulkListResponse.cs @@ -0,0 +1,28 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Users.Item.Attestations.BulkList +{ + [Obsolete("This class is obsolete. Use BulkListPostResponse instead.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class BulkListResponse : global::Ayllu.Github.Client.Users.Item.Attestations.BulkList.BulkListPostResponse, IParsable + #pragma warning restore CS1591 + { + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static new global::Ayllu.Github.Client.Users.Item.Attestations.BulkList.BulkListResponse CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Users.Item.Attestations.BulkList.BulkListResponse(); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Users/Item/Attestations/DeleteRequest/DeleteRequestPostRequestBodyMember1.cs b/src/Ayllu.Github.Client/Github/Client/Users/Item/Attestations/DeleteRequest/DeleteRequestPostRequestBodyMember1.cs new file mode 100644 index 0000000..5550247 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Users/Item/Attestations/DeleteRequest/DeleteRequestPostRequestBodyMember1.cs @@ -0,0 +1,65 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Users.Item.Attestations.DeleteRequest +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class DeleteRequestPostRequestBodyMember1 : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// List of subject digests associated with the artifact attestations to delete. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? SubjectDigests { get; set; } +#nullable restore +#else + public List SubjectDigests { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public DeleteRequestPostRequestBodyMember1() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Users.Item.Attestations.DeleteRequest.DeleteRequestPostRequestBodyMember1 CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Users.Item.Attestations.DeleteRequest.DeleteRequestPostRequestBodyMember1(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "subject_digests", n => { SubjectDigests = n.GetCollectionOfPrimitiveValues()?.AsList(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteCollectionOfPrimitiveValues("subject_digests", SubjectDigests); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Users/Item/Attestations/DeleteRequest/DeleteRequestPostRequestBodyMember2.cs b/src/Ayllu.Github.Client/Github/Client/Users/Item/Attestations/DeleteRequest/DeleteRequestPostRequestBodyMember2.cs new file mode 100644 index 0000000..d136618 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Users/Item/Attestations/DeleteRequest/DeleteRequestPostRequestBodyMember2.cs @@ -0,0 +1,65 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Users.Item.Attestations.DeleteRequest +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class DeleteRequestPostRequestBodyMember2 : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// List of unique IDs associated with the artifact attestations to delete. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? AttestationIds { get; set; } +#nullable restore +#else + public List AttestationIds { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public DeleteRequestPostRequestBodyMember2() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Users.Item.Attestations.DeleteRequest.DeleteRequestPostRequestBodyMember2 CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Users.Item.Attestations.DeleteRequest.DeleteRequestPostRequestBodyMember2(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "attestation_ids", n => { AttestationIds = n.GetCollectionOfPrimitiveValues()?.AsList(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteCollectionOfPrimitiveValues("attestation_ids", AttestationIds); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Users/Item/Attestations/DeleteRequest/DeleteRequestRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Users/Item/Attestations/DeleteRequest/DeleteRequestRequestBuilder.cs new file mode 100644 index 0000000..0c12bff --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Users/Item/Attestations/DeleteRequest/DeleteRequestRequestBuilder.cs @@ -0,0 +1,178 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Users.Item.Attestations.DeleteRequest +{ + /// + /// Builds and executes requests for operations under \users\{username}\attestations\delete-request + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class DeleteRequestRequestBuilder : BaseRequestBuilder + { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public DeleteRequestRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/users/{username}/attestations/delete-request", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public DeleteRequestRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/users/{username}/attestations/delete-request", rawUrl) + { + } + /// + /// Delete artifact attestations in bulk by either subject digests or unique ID. + /// API method documentation + /// + /// A + /// The request body must include either `subject_digests` or `attestation_ids`, but not both. + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 404 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PostAsync(global::Ayllu.Github.Client.Users.Item.Attestations.DeleteRequest.DeleteRequestRequestBuilder.DeleteRequestPostRequestBody body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task PostAsync(global::Ayllu.Github.Client.Users.Item.Attestations.DeleteRequest.DeleteRequestRequestBuilder.DeleteRequestPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPostRequestInformation(body, requestConfiguration); + var errorMapping = new Dictionary> + { + { "404", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendPrimitiveAsync(requestInfo, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// Delete artifact attestations in bulk by either subject digests or unique ID. + /// + /// A + /// The request body must include either `subject_digests` or `attestation_ids`, but not both. + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPostRequestInformation(global::Ayllu.Github.Client.Users.Item.Attestations.DeleteRequest.DeleteRequestRequestBuilder.DeleteRequestPostRequestBody body, Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToPostRequestInformation(global::Ayllu.Github.Client.Users.Item.Attestations.DeleteRequest.DeleteRequestRequestBuilder.DeleteRequestPostRequestBody body, Action> requestConfiguration = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.Users.Item.Attestations.DeleteRequest.DeleteRequestRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Users.Item.Attestations.DeleteRequest.DeleteRequestRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Composed type wrapper for classes , + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class DeleteRequestPostRequestBody : IComposedTypeWrapper, IParsable + { + /// Composed type representation for type +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Users.Item.Attestations.DeleteRequest.DeleteRequestPostRequestBodyMember1? DeleteRequestPostRequestBodyMember1 { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Users.Item.Attestations.DeleteRequest.DeleteRequestPostRequestBodyMember1 DeleteRequestPostRequestBodyMember1 { get; set; } +#endif + /// Composed type representation for type +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Users.Item.Attestations.DeleteRequest.DeleteRequestPostRequestBodyMember2? DeleteRequestPostRequestBodyMember2 { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Users.Item.Attestations.DeleteRequest.DeleteRequestPostRequestBodyMember2 DeleteRequestPostRequestBodyMember2 { get; set; } +#endif + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Users.Item.Attestations.DeleteRequest.DeleteRequestRequestBuilder.DeleteRequestPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + var mappingValue = parseNode.GetChildNode("")?.GetStringValue(); + var result = new global::Ayllu.Github.Client.Users.Item.Attestations.DeleteRequest.DeleteRequestRequestBuilder.DeleteRequestPostRequestBody(); + if("".Equals(mappingValue, StringComparison.OrdinalIgnoreCase)) + { + result.DeleteRequestPostRequestBodyMember1 = new global::Ayllu.Github.Client.Users.Item.Attestations.DeleteRequest.DeleteRequestPostRequestBodyMember1(); + } + else if("".Equals(mappingValue, StringComparison.OrdinalIgnoreCase)) + { + result.DeleteRequestPostRequestBodyMember2 = new global::Ayllu.Github.Client.Users.Item.Attestations.DeleteRequest.DeleteRequestPostRequestBodyMember2(); + } + return result; + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + if(DeleteRequestPostRequestBodyMember1 != null) + { + return DeleteRequestPostRequestBodyMember1.GetFieldDeserializers(); + } + else if(DeleteRequestPostRequestBodyMember2 != null) + { + return DeleteRequestPostRequestBodyMember2.GetFieldDeserializers(); + } + return new Dictionary>(); + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(DeleteRequestPostRequestBodyMember1 != null) + { + writer.WriteObjectValue(null, DeleteRequestPostRequestBodyMember1); + } + else if(DeleteRequestPostRequestBodyMember2 != null) + { + writer.WriteObjectValue(null, DeleteRequestPostRequestBodyMember2); + } + } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class DeleteRequestRequestBuilderPostRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Users/Item/Attestations/Digest/DigestRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Users/Item/Attestations/Digest/DigestRequestBuilder.cs new file mode 100644 index 0000000..72755d8 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Users/Item/Attestations/Digest/DigestRequestBuilder.cs @@ -0,0 +1,48 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Users.Item.Attestations.Digest.Item; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System; +namespace Ayllu.Github.Client.Users.Item.Attestations.Digest +{ + /// + /// Builds and executes requests for operations under \users\{username}\attestations\digest + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class DigestRequestBuilder : BaseRequestBuilder + { + /// Gets an item from the Ayllu.Github.Client.users.item.attestations.digest.item collection + /// Subject Digest + /// A + public global::Ayllu.Github.Client.Users.Item.Attestations.Digest.Item.WithSubject_digestItemRequestBuilder this[string position] + { + get + { + var urlTplParams = new Dictionary(PathParameters); + urlTplParams.Add("subject_digest", position); + return new global::Ayllu.Github.Client.Users.Item.Attestations.Digest.Item.WithSubject_digestItemRequestBuilder(urlTplParams, RequestAdapter); + } + } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public DigestRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/users/{username}/attestations/digest", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public DigestRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/users/{username}/attestations/digest", rawUrl) + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Users/Item/Attestations/Digest/Item/WithSubject_digestItemRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Users/Item/Attestations/Digest/Item/WithSubject_digestItemRequestBuilder.cs new file mode 100644 index 0000000..c4c2509 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Users/Item/Attestations/Digest/Item/WithSubject_digestItemRequestBuilder.cs @@ -0,0 +1,97 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Users.Item.Attestations.Digest.Item +{ + /// + /// Builds and executes requests for operations under \users\{username}\attestations\digest\{subject_digest} + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithSubject_digestItemRequestBuilder : BaseRequestBuilder + { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public WithSubject_digestItemRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/users/{username}/attestations/digest/{subject_digest}", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public WithSubject_digestItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/users/{username}/attestations/digest/{subject_digest}", rawUrl) + { + } + /// + /// Delete an artifact attestation by subject digest. + /// API method documentation + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 404 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task DeleteAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task DeleteAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToDeleteRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "404", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + }; + await RequestAdapter.SendNoContentAsync(requestInfo, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// Delete an artifact attestation by subject digest. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToDeleteRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToDeleteRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.DELETE, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.Users.Item.Attestations.Digest.Item.WithSubject_digestItemRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Users.Item.Attestations.Digest.Item.WithSubject_digestItemRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithSubject_digestItemRequestBuilderDeleteRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Users/Item/Attestations/Item/Attestation_GetResponse.cs b/src/Ayllu.Github.Client/Github/Client/Users/Item/Attestations/Item/Attestation_GetResponse.cs new file mode 100644 index 0000000..352645f --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Users/Item/Attestations/Item/Attestation_GetResponse.cs @@ -0,0 +1,65 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Users.Item.Attestations.Item +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class Attestation_GetResponse : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The attestations property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? Attestations { get; set; } +#nullable restore +#else + public List Attestations { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public Attestation_GetResponse() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Users.Item.Attestations.Item.Attestation_GetResponse CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Users.Item.Attestations.Item.Attestation_GetResponse(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "attestations", n => { Attestations = n.GetCollectionOfObjectValues(global::Ayllu.Github.Client.Users.Item.Attestations.Item.Attestation_GetResponse_attestations.CreateFromDiscriminatorValue)?.AsList(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteCollectionOfObjectValues("attestations", Attestations); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Users/Item/Attestations/Item/Attestation_GetResponse_attestations.cs b/src/Ayllu.Github.Client/Github/Client/Users/Item/Attestations/Item/Attestation_GetResponse_attestations.cs new file mode 100644 index 0000000..684adc1 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Users/Item/Attestations/Item/Attestation_GetResponse_attestations.cs @@ -0,0 +1,79 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Users.Item.Attestations.Item +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class Attestation_GetResponse_attestations : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// 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. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Users.Item.Attestations.Item.Attestation_GetResponse_attestations_bundle? Bundle { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Users.Item.Attestations.Item.Attestation_GetResponse_attestations_bundle Bundle { get; set; } +#endif + /// The bundle_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? BundleUrl { get; set; } +#nullable restore +#else + public string BundleUrl { get; set; } +#endif + /// The repository_id property + public int? RepositoryId { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public Attestation_GetResponse_attestations() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Users.Item.Attestations.Item.Attestation_GetResponse_attestations CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Users.Item.Attestations.Item.Attestation_GetResponse_attestations(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "bundle", n => { Bundle = n.GetObjectValue(global::Ayllu.Github.Client.Users.Item.Attestations.Item.Attestation_GetResponse_attestations_bundle.CreateFromDiscriminatorValue); } }, + { "bundle_url", n => { BundleUrl = n.GetStringValue(); } }, + { "repository_id", n => { RepositoryId = n.GetIntValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteObjectValue("bundle", Bundle); + writer.WriteStringValue("bundle_url", BundleUrl); + writer.WriteIntValue("repository_id", RepositoryId); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Users/Item/Attestations/Item/Attestation_GetResponse_attestations_bundle.cs b/src/Ayllu.Github.Client/Github/Client/Users/Item/Attestations/Item/Attestation_GetResponse_attestations_bundle.cs new file mode 100644 index 0000000..2829144 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Users/Item/Attestations/Item/Attestation_GetResponse_attestations_bundle.cs @@ -0,0 +1,86 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Users.Item.Attestations.Item +{ + /// + /// 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. + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class Attestation_GetResponse_attestations_bundle : IAdditionalDataHolder, IParsable + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The dsseEnvelope property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Users.Item.Attestations.Item.Attestation_GetResponse_attestations_bundle_dsseEnvelope? DsseEnvelope { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Users.Item.Attestations.Item.Attestation_GetResponse_attestations_bundle_dsseEnvelope DsseEnvelope { get; set; } +#endif + /// The mediaType property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? MediaType { get; set; } +#nullable restore +#else + public string MediaType { get; set; } +#endif + /// The verificationMaterial property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Users.Item.Attestations.Item.Attestation_GetResponse_attestations_bundle_verificationMaterial? VerificationMaterial { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Users.Item.Attestations.Item.Attestation_GetResponse_attestations_bundle_verificationMaterial VerificationMaterial { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public Attestation_GetResponse_attestations_bundle() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Users.Item.Attestations.Item.Attestation_GetResponse_attestations_bundle CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Users.Item.Attestations.Item.Attestation_GetResponse_attestations_bundle(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "dsseEnvelope", n => { DsseEnvelope = n.GetObjectValue(global::Ayllu.Github.Client.Users.Item.Attestations.Item.Attestation_GetResponse_attestations_bundle_dsseEnvelope.CreateFromDiscriminatorValue); } }, + { "mediaType", n => { MediaType = n.GetStringValue(); } }, + { "verificationMaterial", n => { VerificationMaterial = n.GetObjectValue(global::Ayllu.Github.Client.Users.Item.Attestations.Item.Attestation_GetResponse_attestations_bundle_verificationMaterial.CreateFromDiscriminatorValue); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteObjectValue("dsseEnvelope", DsseEnvelope); + writer.WriteStringValue("mediaType", MediaType); + writer.WriteObjectValue("verificationMaterial", VerificationMaterial); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Users/Item/Attestations/Item/Attestation_GetResponse_attestations_bundle_dsseEnvelope.cs b/src/Ayllu.Github.Client/Github/Client/Users/Item/Attestations/Item/Attestation_GetResponse_attestations_bundle_dsseEnvelope.cs new file mode 100644 index 0000000..7e6b772 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Users/Item/Attestations/Item/Attestation_GetResponse_attestations_bundle_dsseEnvelope.cs @@ -0,0 +1,55 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Users.Item.Attestations.Item +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class Attestation_GetResponse_attestations_bundle_dsseEnvelope : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public Attestation_GetResponse_attestations_bundle_dsseEnvelope() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Users.Item.Attestations.Item.Attestation_GetResponse_attestations_bundle_dsseEnvelope CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Users.Item.Attestations.Item.Attestation_GetResponse_attestations_bundle_dsseEnvelope(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Users/Item/Attestations/Item/Attestation_GetResponse_attestations_bundle_verificationMaterial.cs b/src/Ayllu.Github.Client/Github/Client/Users/Item/Attestations/Item/Attestation_GetResponse_attestations_bundle_verificationMaterial.cs new file mode 100644 index 0000000..451be6d --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Users/Item/Attestations/Item/Attestation_GetResponse_attestations_bundle_verificationMaterial.cs @@ -0,0 +1,55 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Users.Item.Attestations.Item +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class Attestation_GetResponse_attestations_bundle_verificationMaterial : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public Attestation_GetResponse_attestations_bundle_verificationMaterial() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Users.Item.Attestations.Item.Attestation_GetResponse_attestations_bundle_verificationMaterial CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Users.Item.Attestations.Item.Attestation_GetResponse_attestations_bundle_verificationMaterial(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Users/Item/Attestations/Item/Attestation_ItemRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Users/Item/Attestations/Item/Attestation_ItemRequestBuilder.cs new file mode 100644 index 0000000..bb721a8 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Users/Item/Attestations/Item/Attestation_ItemRequestBuilder.cs @@ -0,0 +1,215 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Users.Item.Attestations.Item +{ + /// + /// Builds and executes requests for operations under \users\{username}\attestations\{attestation_-id} + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class Attestation_ItemRequestBuilder : BaseRequestBuilder + { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public Attestation_ItemRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/users/{username}/attestations/{attestation_%2Did}{?after*,before*,per_page*,predicate_type*}", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public Attestation_ItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/users/{username}/attestations/{attestation_%2Did}{?after*,before*,per_page*,predicate_type*}", rawUrl) + { + } + /// + /// Delete an artifact attestation by unique ID that is associated with a repository owned by a user. + /// API method documentation + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 403 status code + /// When receiving a 404 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task DeleteAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task DeleteAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToDeleteRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "403", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "404", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + }; + await RequestAdapter.SendNoContentAsync(requestInfo, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// 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/actions/security-guides/using-artifact-attestations-to-establish-provenance-for-builds). + /// API method documentation + /// + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 404 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsAttestation_GetResponseAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task GetAsAttestation_GetResponseAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "404", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Users.Item.Attestations.Item.Attestation_GetResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// 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/actions/security-guides/using-artifact-attestations-to-establish-provenance-for-builds). + /// API method documentation + /// + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 404 status code + [Obsolete("This method is obsolete. Use GetAsAttestation_GetResponseAsync instead.")] +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "404", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Users.Item.Attestations.Item.Attestation_Response.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// Delete an artifact attestation by unique ID that is associated with a repository owned by a user. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToDeleteRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToDeleteRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.DELETE, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// 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/actions/security-guides/using-artifact-attestations-to-establish-provenance-for-builds). + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.Users.Item.Attestations.Item.Attestation_ItemRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Users.Item.Attestations.Item.Attestation_ItemRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class Attestation_ItemRequestBuilderDeleteRequestConfiguration : RequestConfiguration + { + } + /// + /// 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/actions/security-guides/using-artifact-attestations-to-establish-provenance-for-builds). + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class Attestation_ItemRequestBuilderGetQueryParameters + { + /// A cursor, as given in the [Link header](https://docs.github.com/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/rest/using-the-rest-api/using-pagination-in-the-rest-api)." +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("after")] + public string? After { get; set; } +#nullable restore +#else + [QueryParameter("after")] + public string After { get; set; } +#endif + /// A cursor, as given in the [Link header](https://docs.github.com/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/rest/using-the-rest-api/using-pagination-in-the-rest-api)." +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("before")] + public string? Before { get; set; } +#nullable restore +#else + [QueryParameter("before")] + public string Before { get; set; } +#endif + /// The number of results per page (max 100). For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." + [QueryParameter("per_page")] + public int? PerPage { get; set; } + /// Optional filter for fetching attestations with a given predicate type.This option accepts `provenance`, `sbom`, or freeform text for custom predicate types. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("predicate_type")] + public string? PredicateType { get; set; } +#nullable restore +#else + [QueryParameter("predicate_type")] + public string PredicateType { get; set; } +#endif + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class Attestation_ItemRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Users/Item/Attestations/Item/Attestation_Response.cs b/src/Ayllu.Github.Client/Github/Client/Users/Item/Attestations/Item/Attestation_Response.cs new file mode 100644 index 0000000..4f41217 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Users/Item/Attestations/Item/Attestation_Response.cs @@ -0,0 +1,28 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Users.Item.Attestations.Item +{ + [Obsolete("This class is obsolete. Use Attestation_GetResponse instead.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class Attestation_Response : global::Ayllu.Github.Client.Users.Item.Attestations.Item.Attestation_GetResponse, IParsable + #pragma warning restore CS1591 + { + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static new global::Ayllu.Github.Client.Users.Item.Attestations.Item.Attestation_Response CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Users.Item.Attestations.Item.Attestation_Response(); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Users/Item/Docker/Conflicts/ConflictsRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Users/Item/Docker/Conflicts/ConflictsRequestBuilder.cs new file mode 100644 index 0000000..537cb63 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Users/Item/Docker/Conflicts/ConflictsRequestBuilder.cs @@ -0,0 +1,101 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Users.Item.Docker.Conflicts +{ + /// + /// Builds and executes requests for operations under \users\{username}\docker\conflicts + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class ConflictsRequestBuilder : BaseRequestBuilder + { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public ConflictsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/users/{username}/docker/conflicts", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public ConflictsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/users/{username}/docker/conflicts", rawUrl) + { + } + /// + /// 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. + /// API method documentation + /// + /// A List<global::Ayllu.Github.Client.Models.Package> + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 401 status code + /// When receiving a 403 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task?> GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task> GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "401", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "403", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + }; + var collectionResult = await RequestAdapter.SendCollectionAsync(requestInfo, global::Ayllu.Github.Client.Models.Package.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + return collectionResult?.AsList(); + } + /// + /// 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. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.Users.Item.Docker.Conflicts.ConflictsRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Users.Item.Docker.Conflicts.ConflictsRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class ConflictsRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Users/Item/Docker/DockerRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Users/Item/Docker/DockerRequestBuilder.cs new file mode 100644 index 0000000..51a24c8 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Users/Item/Docker/DockerRequestBuilder.cs @@ -0,0 +1,41 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Users.Item.Docker.Conflicts; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System; +namespace Ayllu.Github.Client.Users.Item.Docker +{ + /// + /// Builds and executes requests for operations under \users\{username}\docker + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class DockerRequestBuilder : BaseRequestBuilder + { + /// The conflicts property + public global::Ayllu.Github.Client.Users.Item.Docker.Conflicts.ConflictsRequestBuilder Conflicts + { + get => new global::Ayllu.Github.Client.Users.Item.Docker.Conflicts.ConflictsRequestBuilder(PathParameters, RequestAdapter); + } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public DockerRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/users/{username}/docker", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public DockerRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/users/{username}/docker", rawUrl) + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Users/Item/Events/EventsRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Users/Item/Events/EventsRequestBuilder.cs new file mode 100644 index 0000000..813fdf4 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Users/Item/Events/EventsRequestBuilder.cs @@ -0,0 +1,119 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Ayllu.Github.Client.Users.Item.Events.Orgs; +using Ayllu.Github.Client.Users.Item.Events.Public; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Users.Item.Events +{ + /// + /// Builds and executes requests for operations under \users\{username}\events + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class EventsRequestBuilder : BaseRequestBuilder + { + /// The orgs property + public global::Ayllu.Github.Client.Users.Item.Events.Orgs.OrgsRequestBuilder Orgs + { + get => new global::Ayllu.Github.Client.Users.Item.Events.Orgs.OrgsRequestBuilder(PathParameters, RequestAdapter); + } + /// The public property + public global::Ayllu.Github.Client.Users.Item.Events.Public.PublicRequestBuilder Public + { + get => new global::Ayllu.Github.Client.Users.Item.Events.Public.PublicRequestBuilder(PathParameters, RequestAdapter); + } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public EventsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/users/{username}/events{?page*,per_page*}", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public EventsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/users/{username}/events{?page*,per_page*}", rawUrl) + { + } + /// + /// If you are authenticated as the given user, you will see your private events. Otherwise, you'll only see public events. _Optional_: use the fine-grained token with following permission set to view private events: "Events" user permissions (read).> [!NOTE]> This API is not built to serve real-time use cases. Depending on the time of day, event latency can be anywhere from 30s to 6h. + /// API method documentation + /// + /// A List<global::Ayllu.Github.Client.Models.Event> + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task?> GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task> GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var collectionResult = await RequestAdapter.SendCollectionAsync(requestInfo, global::Ayllu.Github.Client.Models.Event.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false); + return collectionResult?.AsList(); + } + /// + /// If you are authenticated as the given user, you will see your private events. Otherwise, you'll only see public events. _Optional_: use the fine-grained token with following permission set to view private events: "Events" user permissions (read).> [!NOTE]> This API is not built to serve real-time use cases. Depending on the time of day, event latency can be anywhere from 30s to 6h. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.Users.Item.Events.EventsRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Users.Item.Events.EventsRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// If you are authenticated as the given user, you will see your private events. Otherwise, you'll only see public events. _Optional_: use the fine-grained token with following permission set to view private events: "Events" user permissions (read).> [!NOTE]> This API is not built to serve real-time use cases. Depending on the time of day, event latency can be anywhere from 30s to 6h. + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class EventsRequestBuilderGetQueryParameters + { + /// The page number of the results to fetch. For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." + [QueryParameter("page")] + public int? Page { get; set; } + /// The number of results per page (max 100). For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." + [QueryParameter("per_page")] + public int? PerPage { get; set; } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class EventsRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Users/Item/Events/Orgs/Item/WithOrgItemRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Users/Item/Events/Orgs/Item/WithOrgItemRequestBuilder.cs new file mode 100644 index 0000000..70ae1fb --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Users/Item/Events/Orgs/Item/WithOrgItemRequestBuilder.cs @@ -0,0 +1,107 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Users.Item.Events.Orgs.Item +{ + /// + /// Builds and executes requests for operations under \users\{username}\events\orgs\{org} + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithOrgItemRequestBuilder : BaseRequestBuilder + { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public WithOrgItemRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/users/{username}/events/orgs/{org}{?page*,per_page*}", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public WithOrgItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/users/{username}/events/orgs/{org}{?page*,per_page*}", rawUrl) + { + } + /// + /// This is the user's organization dashboard. You must be authenticated as the user to view this.> [!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. + /// API method documentation + /// + /// A List<global::Ayllu.Github.Client.Models.Event> + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task?> GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task> GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var collectionResult = await RequestAdapter.SendCollectionAsync(requestInfo, global::Ayllu.Github.Client.Models.Event.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false); + return collectionResult?.AsList(); + } + /// + /// This is the user's organization dashboard. You must be authenticated as the user to view this.> [!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. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.Users.Item.Events.Orgs.Item.WithOrgItemRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Users.Item.Events.Orgs.Item.WithOrgItemRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// This is the user's organization dashboard. You must be authenticated as the user to view this.> [!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. + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithOrgItemRequestBuilderGetQueryParameters + { + /// The page number of the results to fetch. For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." + [QueryParameter("page")] + public int? Page { get; set; } + /// The number of results per page (max 100). For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." + [QueryParameter("per_page")] + public int? PerPage { get; set; } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithOrgItemRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Users/Item/Events/Orgs/OrgsRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Users/Item/Events/Orgs/OrgsRequestBuilder.cs new file mode 100644 index 0000000..8294cb5 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Users/Item/Events/Orgs/OrgsRequestBuilder.cs @@ -0,0 +1,48 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Users.Item.Events.Orgs.Item; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System; +namespace Ayllu.Github.Client.Users.Item.Events.Orgs +{ + /// + /// Builds and executes requests for operations under \users\{username}\events\orgs + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class OrgsRequestBuilder : BaseRequestBuilder + { + /// Gets an item from the Ayllu.Github.Client.users.item.events.orgs.item collection + /// The organization name. The name is not case sensitive. + /// A + public global::Ayllu.Github.Client.Users.Item.Events.Orgs.Item.WithOrgItemRequestBuilder this[string position] + { + get + { + var urlTplParams = new Dictionary(PathParameters); + urlTplParams.Add("org", position); + return new global::Ayllu.Github.Client.Users.Item.Events.Orgs.Item.WithOrgItemRequestBuilder(urlTplParams, RequestAdapter); + } + } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public OrgsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/users/{username}/events/orgs", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public OrgsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/users/{username}/events/orgs", rawUrl) + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Users/Item/Events/Public/PublicRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Users/Item/Events/Public/PublicRequestBuilder.cs new file mode 100644 index 0000000..2dd02aa --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Users/Item/Events/Public/PublicRequestBuilder.cs @@ -0,0 +1,107 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Users.Item.Events.Public +{ + /// + /// Builds and executes requests for operations under \users\{username}\events\public + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class PublicRequestBuilder : BaseRequestBuilder + { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public PublicRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/users/{username}/events/public{?page*,per_page*}", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public PublicRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/users/{username}/events/public{?page*,per_page*}", rawUrl) + { + } + /// + /// > [!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. + /// API method documentation + /// + /// A List<global::Ayllu.Github.Client.Models.Event> + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task?> GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task> GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var collectionResult = await RequestAdapter.SendCollectionAsync(requestInfo, global::Ayllu.Github.Client.Models.Event.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false); + return collectionResult?.AsList(); + } + /// + /// > [!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. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.Users.Item.Events.Public.PublicRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Users.Item.Events.Public.PublicRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// > [!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. + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class PublicRequestBuilderGetQueryParameters + { + /// The page number of the results to fetch. For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." + [QueryParameter("page")] + public int? Page { get; set; } + /// The number of results per page (max 100). For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." + [QueryParameter("per_page")] + public int? PerPage { get; set; } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class PublicRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Users/Item/Followers/FollowersRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Users/Item/Followers/FollowersRequestBuilder.cs new file mode 100644 index 0000000..d1582ba --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Users/Item/Followers/FollowersRequestBuilder.cs @@ -0,0 +1,107 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Users.Item.Followers +{ + /// + /// Builds and executes requests for operations under \users\{username}\followers + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class FollowersRequestBuilder : BaseRequestBuilder + { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public FollowersRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/users/{username}/followers{?page*,per_page*}", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public FollowersRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/users/{username}/followers{?page*,per_page*}", rawUrl) + { + } + /// + /// Lists the people following the specified user. + /// API method documentation + /// + /// A List<global::Ayllu.Github.Client.Models.SimpleUser> + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task?> GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task> GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var collectionResult = await RequestAdapter.SendCollectionAsync(requestInfo, global::Ayllu.Github.Client.Models.SimpleUser.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false); + return collectionResult?.AsList(); + } + /// + /// Lists the people following the specified user. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.Users.Item.Followers.FollowersRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Users.Item.Followers.FollowersRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Lists the people following the specified user. + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class FollowersRequestBuilderGetQueryParameters + { + /// The page number of the results to fetch. For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." + [QueryParameter("page")] + public int? Page { get; set; } + /// The number of results per page (max 100). For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." + [QueryParameter("per_page")] + public int? PerPage { get; set; } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class FollowersRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Users/Item/Following/FollowingRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Users/Item/Following/FollowingRequestBuilder.cs new file mode 100644 index 0000000..cd80b0a --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Users/Item/Following/FollowingRequestBuilder.cs @@ -0,0 +1,120 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Ayllu.Github.Client.Users.Item.Following.Item; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Users.Item.Following +{ + /// + /// Builds and executes requests for operations under \users\{username}\following + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class FollowingRequestBuilder : BaseRequestBuilder + { + /// Gets an item from the Ayllu.Github.Client.users.item.following.item collection + /// Unique identifier of the item + /// A + public global::Ayllu.Github.Client.Users.Item.Following.Item.WithTarget_userItemRequestBuilder this[string position] + { + get + { + var urlTplParams = new Dictionary(PathParameters); + urlTplParams.Add("target_user", position); + return new global::Ayllu.Github.Client.Users.Item.Following.Item.WithTarget_userItemRequestBuilder(urlTplParams, RequestAdapter); + } + } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public FollowingRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/users/{username}/following{?page*,per_page*}", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public FollowingRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/users/{username}/following{?page*,per_page*}", rawUrl) + { + } + /// + /// Lists the people who the specified user follows. + /// API method documentation + /// + /// A List<global::Ayllu.Github.Client.Models.SimpleUser> + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task?> GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task> GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var collectionResult = await RequestAdapter.SendCollectionAsync(requestInfo, global::Ayllu.Github.Client.Models.SimpleUser.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false); + return collectionResult?.AsList(); + } + /// + /// Lists the people who the specified user follows. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.Users.Item.Following.FollowingRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Users.Item.Following.FollowingRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Lists the people who the specified user follows. + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class FollowingRequestBuilderGetQueryParameters + { + /// The page number of the results to fetch. For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." + [QueryParameter("page")] + public int? Page { get; set; } + /// The number of results per page (max 100). For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." + [QueryParameter("per_page")] + public int? PerPage { get; set; } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class FollowingRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Users/Item/Following/Item/WithTarget_userItemRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Users/Item/Following/Item/WithTarget_userItemRequestBuilder.cs new file mode 100644 index 0000000..18cf684 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Users/Item/Following/Item/WithTarget_userItemRequestBuilder.cs @@ -0,0 +1,87 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Users.Item.Following.Item +{ + /// + /// Builds and executes requests for operations under \users\{username}\following\{target_user} + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithTarget_userItemRequestBuilder : BaseRequestBuilder + { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public WithTarget_userItemRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/users/{username}/following/{target_user}", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public WithTarget_userItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/users/{username}/following/{target_user}", rawUrl) + { + } + /// + /// Check if a user follows another user + /// API method documentation + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + await RequestAdapter.SendNoContentAsync(requestInfo, default, cancellationToken).ConfigureAwait(false); + } + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.Users.Item.Following.Item.WithTarget_userItemRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Users.Item.Following.Item.WithTarget_userItemRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithTarget_userItemRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Users/Item/Gists/GistsRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Users/Item/Gists/GistsRequestBuilder.cs new file mode 100644 index 0000000..9d5e408 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Users/Item/Gists/GistsRequestBuilder.cs @@ -0,0 +1,115 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Users.Item.Gists +{ + /// + /// Builds and executes requests for operations under \users\{username}\gists + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class GistsRequestBuilder : BaseRequestBuilder + { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public GistsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/users/{username}/gists{?page*,per_page*,since*}", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public GistsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/users/{username}/gists{?page*,per_page*,since*}", rawUrl) + { + } + /// + /// Lists public gists for the specified user: + /// API method documentation + /// + /// A List<global::Ayllu.Github.Client.Models.BaseGist> + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 422 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task?> GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task> GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "422", global::Ayllu.Github.Client.Models.ValidationError.CreateFromDiscriminatorValue }, + }; + var collectionResult = await RequestAdapter.SendCollectionAsync(requestInfo, global::Ayllu.Github.Client.Models.BaseGist.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + return collectionResult?.AsList(); + } + /// + /// Lists public gists for the specified user: + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.Users.Item.Gists.GistsRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Users.Item.Gists.GistsRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Lists public gists for the specified user: + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class GistsRequestBuilderGetQueryParameters + { + /// The page number of the results to fetch. For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." + [QueryParameter("page")] + public int? Page { get; set; } + /// The number of results per page (max 100). For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." + [QueryParameter("per_page")] + public int? PerPage { get; set; } + /// 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`. + [QueryParameter("since")] + public DateTimeOffset? Since { get; set; } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class GistsRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Users/Item/Gpg_keys/Gpg_keysRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Users/Item/Gpg_keys/Gpg_keysRequestBuilder.cs new file mode 100644 index 0000000..90cbeec --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Users/Item/Gpg_keys/Gpg_keysRequestBuilder.cs @@ -0,0 +1,107 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Users.Item.Gpg_keys +{ + /// + /// Builds and executes requests for operations under \users\{username}\gpg_keys + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class Gpg_keysRequestBuilder : BaseRequestBuilder + { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public Gpg_keysRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/users/{username}/gpg_keys{?page*,per_page*}", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public Gpg_keysRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/users/{username}/gpg_keys{?page*,per_page*}", rawUrl) + { + } + /// + /// Lists the GPG keys for a user. This information is accessible by anyone. + /// API method documentation + /// + /// A List<global::Ayllu.Github.Client.Models.GpgKey> + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task?> GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task> GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var collectionResult = await RequestAdapter.SendCollectionAsync(requestInfo, global::Ayllu.Github.Client.Models.GpgKey.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false); + return collectionResult?.AsList(); + } + /// + /// Lists the GPG keys for a user. This information is accessible by anyone. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.Users.Item.Gpg_keys.Gpg_keysRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Users.Item.Gpg_keys.Gpg_keysRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Lists the GPG keys for a user. This information is accessible by anyone. + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class Gpg_keysRequestBuilderGetQueryParameters + { + /// The page number of the results to fetch. For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." + [QueryParameter("page")] + public int? Page { get; set; } + /// The number of results per page (max 100). For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." + [QueryParameter("per_page")] + public int? PerPage { get; set; } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class Gpg_keysRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Users/Item/Hovercard/GetSubject_typeQueryParameterType.cs b/src/Ayllu.Github.Client/Github/Client/Users/Item/Hovercard/GetSubject_typeQueryParameterType.cs new file mode 100644 index 0000000..fe90d74 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Users/Item/Hovercard/GetSubject_typeQueryParameterType.cs @@ -0,0 +1,28 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Users.Item.Hovercard +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public enum GetSubject_typeQueryParameterType + #pragma warning restore CS1591 + { + [EnumMember(Value = "organization")] + #pragma warning disable CS1591 + Organization, + #pragma warning restore CS1591 + [EnumMember(Value = "repository")] + #pragma warning disable CS1591 + Repository, + #pragma warning restore CS1591 + [EnumMember(Value = "issue")] + #pragma warning disable CS1591 + Issue, + #pragma warning restore CS1591 + [EnumMember(Value = "pull_request")] + #pragma warning disable CS1591 + Pull_request, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Users/Item/Hovercard/HovercardRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Users/Item/Hovercard/HovercardRequestBuilder.cs new file mode 100644 index 0000000..5950776 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Users/Item/Hovercard/HovercardRequestBuilder.cs @@ -0,0 +1,131 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Users.Item.Hovercard +{ + /// + /// Builds and executes requests for operations under \users\{username}\hovercard + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class HovercardRequestBuilder : BaseRequestBuilder + { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public HovercardRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/users/{username}/hovercard{?subject_id*,subject_type*}", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public HovercardRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/users/{username}/hovercard{?subject_id*,subject_type*}", rawUrl) + { + } + /// + /// 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. + /// API method documentation + /// + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 404 status code + /// When receiving a 422 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "404", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "422", global::Ayllu.Github.Client.Models.ValidationError.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Models.Hovercard.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// 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. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.Users.Item.Hovercard.HovercardRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Users.Item.Hovercard.HovercardRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// 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. + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class HovercardRequestBuilderGetQueryParameters + { + /// Uses the ID for the `subject_type` you specified. **Required** when using `subject_type`. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("subject_id")] + public string? SubjectId { get; set; } +#nullable restore +#else + [QueryParameter("subject_id")] + public string SubjectId { get; set; } +#endif + /// 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`. + [Obsolete("This property is deprecated, use SubjectTypeAsGetSubjectTypeQueryParameterType instead")] +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("subject_type")] + public string? SubjectType { get; set; } +#nullable restore +#else + [QueryParameter("subject_type")] + public string SubjectType { get; set; } +#endif + /// 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`. + [QueryParameter("subject_type")] + public global::Ayllu.Github.Client.Users.Item.Hovercard.GetSubject_typeQueryParameterType? SubjectTypeAsGetSubjectTypeQueryParameterType { get; set; } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class HovercardRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Users/Item/Installation/InstallationRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Users/Item/Installation/InstallationRequestBuilder.cs new file mode 100644 index 0000000..6abbda6 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Users/Item/Installation/InstallationRequestBuilder.cs @@ -0,0 +1,93 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Users.Item.Installation +{ + /// + /// Builds and executes requests for operations under \users\{username}\installation + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class InstallationRequestBuilder : BaseRequestBuilder + { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public InstallationRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/users/{username}/installation", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public InstallationRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/users/{username}/installation", rawUrl) + { + } + /// + /// Enables an authenticated GitHub App to find the user’s installation information.You must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. + /// API method documentation + /// + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Models.Installation.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false); + } + /// + /// Enables an authenticated GitHub App to find the user’s installation information.You must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.Users.Item.Installation.InstallationRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Users.Item.Installation.InstallationRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class InstallationRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Users/Item/Keys/KeysRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Users/Item/Keys/KeysRequestBuilder.cs new file mode 100644 index 0000000..92b892f --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Users/Item/Keys/KeysRequestBuilder.cs @@ -0,0 +1,107 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Users.Item.Keys +{ + /// + /// Builds and executes requests for operations under \users\{username}\keys + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class KeysRequestBuilder : BaseRequestBuilder + { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public KeysRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/users/{username}/keys{?page*,per_page*}", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public KeysRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/users/{username}/keys{?page*,per_page*}", rawUrl) + { + } + /// + /// Lists the _verified_ public SSH keys for a user. This is accessible by anyone. + /// API method documentation + /// + /// A List<global::Ayllu.Github.Client.Models.KeySimple> + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task?> GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task> GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var collectionResult = await RequestAdapter.SendCollectionAsync(requestInfo, global::Ayllu.Github.Client.Models.KeySimple.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false); + return collectionResult?.AsList(); + } + /// + /// Lists the _verified_ public SSH keys for a user. This is accessible by anyone. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.Users.Item.Keys.KeysRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Users.Item.Keys.KeysRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Lists the _verified_ public SSH keys for a user. This is accessible by anyone. + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class KeysRequestBuilderGetQueryParameters + { + /// The page number of the results to fetch. For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." + [QueryParameter("page")] + public int? Page { get; set; } + /// The number of results per page (max 100). For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." + [QueryParameter("per_page")] + public int? PerPage { get; set; } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class KeysRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Users/Item/Orgs/OrgsRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Users/Item/Orgs/OrgsRequestBuilder.cs new file mode 100644 index 0000000..359ae84 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Users/Item/Orgs/OrgsRequestBuilder.cs @@ -0,0 +1,107 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Users.Item.Orgs +{ + /// + /// Builds and executes requests for operations under \users\{username}\orgs + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class OrgsRequestBuilder : BaseRequestBuilder + { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public OrgsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/users/{username}/orgs{?page*,per_page*}", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public OrgsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/users/{username}/orgs{?page*,per_page*}", rawUrl) + { + } + /// + /// List [public organization memberships](https://docs.github.com/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/rest/orgs/orgs#list-organizations-for-the-authenticated-user) API instead. + /// API method documentation + /// + /// A List<global::Ayllu.Github.Client.Models.OrganizationSimple> + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task?> GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task> GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var collectionResult = await RequestAdapter.SendCollectionAsync(requestInfo, global::Ayllu.Github.Client.Models.OrganizationSimple.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false); + return collectionResult?.AsList(); + } + /// + /// List [public organization memberships](https://docs.github.com/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/rest/orgs/orgs#list-organizations-for-the-authenticated-user) API instead. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.Users.Item.Orgs.OrgsRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Users.Item.Orgs.OrgsRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// List [public organization memberships](https://docs.github.com/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/rest/orgs/orgs#list-organizations-for-the-authenticated-user) API instead. + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class OrgsRequestBuilderGetQueryParameters + { + /// The page number of the results to fetch. For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." + [QueryParameter("page")] + public int? Page { get; set; } + /// The number of results per page (max 100). For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." + [QueryParameter("per_page")] + public int? PerPage { get; set; } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class OrgsRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Users/Item/Packages/GetPackage_typeQueryParameterType.cs b/src/Ayllu.Github.Client/Github/Client/Users/Item/Packages/GetPackage_typeQueryParameterType.cs new file mode 100644 index 0000000..59ed172 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Users/Item/Packages/GetPackage_typeQueryParameterType.cs @@ -0,0 +1,36 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Users.Item.Packages +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public enum GetPackage_typeQueryParameterType + #pragma warning restore CS1591 + { + [EnumMember(Value = "npm")] + #pragma warning disable CS1591 + Npm, + #pragma warning restore CS1591 + [EnumMember(Value = "maven")] + #pragma warning disable CS1591 + Maven, + #pragma warning restore CS1591 + [EnumMember(Value = "rubygems")] + #pragma warning disable CS1591 + Rubygems, + #pragma warning restore CS1591 + [EnumMember(Value = "docker")] + #pragma warning disable CS1591 + Docker, + #pragma warning restore CS1591 + [EnumMember(Value = "nuget")] + #pragma warning disable CS1591 + Nuget, + #pragma warning restore CS1591 + [EnumMember(Value = "container")] + #pragma warning disable CS1591 + Container, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Users/Item/Packages/GetVisibilityQueryParameterType.cs b/src/Ayllu.Github.Client/Github/Client/Users/Item/Packages/GetVisibilityQueryParameterType.cs new file mode 100644 index 0000000..c320da7 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Users/Item/Packages/GetVisibilityQueryParameterType.cs @@ -0,0 +1,24 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Users.Item.Packages +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public enum GetVisibilityQueryParameterType + #pragma warning restore CS1591 + { + [EnumMember(Value = "public")] + #pragma warning disable CS1591 + Public, + #pragma warning restore CS1591 + [EnumMember(Value = "private")] + #pragma warning disable CS1591 + Private, + #pragma warning restore CS1591 + [EnumMember(Value = "internal")] + #pragma warning disable CS1591 + Internal, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Users/Item/Packages/Item/Item/Restore/RestoreRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Users/Item/Packages/Item/Item/Restore/RestoreRequestBuilder.cs new file mode 100644 index 0000000..e018838 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Users/Item/Packages/Item/Item/Restore/RestoreRequestBuilder.cs @@ -0,0 +1,118 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Users.Item.Packages.Item.Item.Restore +{ + /// + /// Builds and executes requests for operations under \users\{username}\packages\{package_type}\{package_name}\restore + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class RestoreRequestBuilder : BaseRequestBuilder + { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public RestoreRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/users/{username}/packages/{package_type}/{package_name}/restore{?token*}", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public RestoreRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/users/{username}/packages/{package_type}/{package_name}/restore{?token*}", rawUrl) + { + } + /// + /// 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/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. For more information, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." + /// API method documentation + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 401 status code + /// When receiving a 403 status code + /// When receiving a 404 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PostAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task PostAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToPostRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "401", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "403", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "404", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + }; + await RequestAdapter.SendNoContentAsync(requestInfo, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// 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/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. For more information, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPostRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToPostRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.Users.Item.Packages.Item.Item.Restore.RestoreRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Users.Item.Packages.Item.Item.Restore.RestoreRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// 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/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. For more information, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class RestoreRequestBuilderPostQueryParameters + { + /// package token +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("token")] + public string? Token { get; set; } +#nullable restore +#else + [QueryParameter("token")] + public string Token { get; set; } +#endif + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class RestoreRequestBuilderPostRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Users/Item/Packages/Item/Item/Versions/Item/Restore/RestoreRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Users/Item/Packages/Item/Item/Versions/Item/Restore/RestoreRequestBuilder.cs new file mode 100644 index 0000000..a7f12a4 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Users/Item/Packages/Item/Item/Versions/Item/Restore/RestoreRequestBuilder.cs @@ -0,0 +1,101 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Users.Item.Packages.Item.Item.Versions.Item.Restore +{ + /// + /// Builds and executes requests for operations under \users\{username}\packages\{package_type}\{package_name}\versions\{package_version_id}\restore + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class RestoreRequestBuilder : BaseRequestBuilder + { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public RestoreRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/users/{username}/packages/{package_type}/{package_name}/versions/{package_version_id}/restore", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public RestoreRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/users/{username}/packages/{package_type}/{package_name}/versions/{package_version_id}/restore", rawUrl) + { + } + /// + /// 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/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. For more information, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." + /// API method documentation + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 401 status code + /// When receiving a 403 status code + /// When receiving a 404 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PostAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task PostAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToPostRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "401", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "403", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "404", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + }; + await RequestAdapter.SendNoContentAsync(requestInfo, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// 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/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. For more information, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPostRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToPostRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.Users.Item.Packages.Item.Item.Versions.Item.Restore.RestoreRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Users.Item.Packages.Item.Item.Versions.Item.Restore.RestoreRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class RestoreRequestBuilderPostRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Users/Item/Packages/Item/Item/Versions/Item/WithPackage_version_ItemRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Users/Item/Packages/Item/Item/Versions/Item/WithPackage_version_ItemRequestBuilder.cs new file mode 100644 index 0000000..be9a6e8 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Users/Item/Packages/Item/Item/Versions/Item/WithPackage_version_ItemRequestBuilder.cs @@ -0,0 +1,153 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Ayllu.Github.Client.Users.Item.Packages.Item.Item.Versions.Item.Restore; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Users.Item.Packages.Item.Item.Versions.Item +{ + /// + /// Builds and executes requests for operations under \users\{username}\packages\{package_type}\{package_name}\versions\{package_version_id} + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithPackage_version_ItemRequestBuilder : BaseRequestBuilder + { + /// The restore property + public global::Ayllu.Github.Client.Users.Item.Packages.Item.Item.Versions.Item.Restore.RestoreRequestBuilder Restore + { + get => new global::Ayllu.Github.Client.Users.Item.Packages.Item.Item.Versions.Item.Restore.RestoreRequestBuilder(PathParameters, RequestAdapter); + } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public WithPackage_version_ItemRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/users/{username}/packages/{package_type}/{package_name}/versions/{package_version_id}", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public WithPackage_version_ItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/users/{username}/packages/{package_type}/{package_name}/versions/{package_version_id}", rawUrl) + { + } + /// + /// 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/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. For more information, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." + /// API method documentation + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 401 status code + /// When receiving a 403 status code + /// When receiving a 404 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task DeleteAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task DeleteAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToDeleteRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "401", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "403", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "404", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + }; + await RequestAdapter.SendNoContentAsync(requestInfo, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// 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. For more information, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." + /// API method documentation + /// + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Models.PackageVersion.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false); + } + /// + /// 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/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. For more information, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToDeleteRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToDeleteRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.DELETE, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// 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. For more information, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.Users.Item.Packages.Item.Item.Versions.Item.WithPackage_version_ItemRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Users.Item.Packages.Item.Item.Versions.Item.WithPackage_version_ItemRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithPackage_version_ItemRequestBuilderDeleteRequestConfiguration : RequestConfiguration + { + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithPackage_version_ItemRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Users/Item/Packages/Item/Item/Versions/VersionsRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Users/Item/Packages/Item/Item/Versions/VersionsRequestBuilder.cs new file mode 100644 index 0000000..4b5a133 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Users/Item/Packages/Item/Item/Versions/VersionsRequestBuilder.cs @@ -0,0 +1,129 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Ayllu.Github.Client.Users.Item.Packages.Item.Item.Versions.Item; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Users.Item.Packages.Item.Item.Versions +{ + /// + /// Builds and executes requests for operations under \users\{username}\packages\{package_type}\{package_name}\versions + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class VersionsRequestBuilder : BaseRequestBuilder + { + /// Gets an item from the Ayllu.Github.Client.users.item.packages.item.item.versions.item collection + /// Unique identifier of the package version. + /// A + public global::Ayllu.Github.Client.Users.Item.Packages.Item.Item.Versions.Item.WithPackage_version_ItemRequestBuilder this[int position] + { + get + { + var urlTplParams = new Dictionary(PathParameters); + urlTplParams.Add("package_version_id", position); + return new global::Ayllu.Github.Client.Users.Item.Packages.Item.Item.Versions.Item.WithPackage_version_ItemRequestBuilder(urlTplParams, RequestAdapter); + } + } + /// Gets an item from the Ayllu.Github.Client.users.item.packages.item.item.versions.item collection + /// Unique identifier of the package version. + /// A + [Obsolete("This indexer is deprecated and will be removed in the next major version. Use the one with the typed parameter instead.")] + public global::Ayllu.Github.Client.Users.Item.Packages.Item.Item.Versions.Item.WithPackage_version_ItemRequestBuilder this[string position] + { + get + { + var urlTplParams = new Dictionary(PathParameters); + if (!string.IsNullOrWhiteSpace(position)) urlTplParams.Add("package_version_id", position); + return new global::Ayllu.Github.Client.Users.Item.Packages.Item.Item.Versions.Item.WithPackage_version_ItemRequestBuilder(urlTplParams, RequestAdapter); + } + } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public VersionsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/users/{username}/packages/{package_type}/{package_name}/versions", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public VersionsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/users/{username}/packages/{package_type}/{package_name}/versions", rawUrl) + { + } + /// + /// 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. For more information, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." + /// API method documentation + /// + /// A List<global::Ayllu.Github.Client.Models.PackageVersion> + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 401 status code + /// When receiving a 403 status code + /// When receiving a 404 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task?> GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task> GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "401", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "403", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "404", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + }; + var collectionResult = await RequestAdapter.SendCollectionAsync(requestInfo, global::Ayllu.Github.Client.Models.PackageVersion.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + return collectionResult?.AsList(); + } + /// + /// 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. For more information, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.Users.Item.Packages.Item.Item.Versions.VersionsRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Users.Item.Packages.Item.Item.Versions.VersionsRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class VersionsRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Users/Item/Packages/Item/Item/WithPackage_nameItemRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Users/Item/Packages/Item/Item/WithPackage_nameItemRequestBuilder.cs new file mode 100644 index 0000000..16d3ee3 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Users/Item/Packages/Item/Item/WithPackage_nameItemRequestBuilder.cs @@ -0,0 +1,159 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Ayllu.Github.Client.Users.Item.Packages.Item.Item.Restore; +using Ayllu.Github.Client.Users.Item.Packages.Item.Item.Versions; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Users.Item.Packages.Item.Item +{ + /// + /// Builds and executes requests for operations under \users\{username}\packages\{package_type}\{package_name} + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithPackage_nameItemRequestBuilder : BaseRequestBuilder + { + /// The restore property + public global::Ayllu.Github.Client.Users.Item.Packages.Item.Item.Restore.RestoreRequestBuilder Restore + { + get => new global::Ayllu.Github.Client.Users.Item.Packages.Item.Item.Restore.RestoreRequestBuilder(PathParameters, RequestAdapter); + } + /// The versions property + public global::Ayllu.Github.Client.Users.Item.Packages.Item.Item.Versions.VersionsRequestBuilder Versions + { + get => new global::Ayllu.Github.Client.Users.Item.Packages.Item.Item.Versions.VersionsRequestBuilder(PathParameters, RequestAdapter); + } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public WithPackage_nameItemRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/users/{username}/packages/{package_type}/{package_name}", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public WithPackage_nameItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/users/{username}/packages/{package_type}/{package_name}", rawUrl) + { + } + /// + /// 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/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. For more information, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." + /// API method documentation + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 401 status code + /// When receiving a 403 status code + /// When receiving a 404 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task DeleteAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task DeleteAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToDeleteRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "401", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "403", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "404", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + }; + await RequestAdapter.SendNoContentAsync(requestInfo, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// 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. For more information, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." + /// API method documentation + /// + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Models.Package.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false); + } + /// + /// 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/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. For more information, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToDeleteRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToDeleteRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.DELETE, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// 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. For more information, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.Users.Item.Packages.Item.Item.WithPackage_nameItemRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Users.Item.Packages.Item.Item.WithPackage_nameItemRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithPackage_nameItemRequestBuilderDeleteRequestConfiguration : RequestConfiguration + { + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithPackage_nameItemRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Users/Item/Packages/Item/WithPackage_typeItemRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Users/Item/Packages/Item/WithPackage_typeItemRequestBuilder.cs new file mode 100644 index 0000000..b1dbc16 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Users/Item/Packages/Item/WithPackage_typeItemRequestBuilder.cs @@ -0,0 +1,48 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Users.Item.Packages.Item.Item; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System; +namespace Ayllu.Github.Client.Users.Item.Packages.Item +{ + /// + /// Builds and executes requests for operations under \users\{username}\packages\{package_type} + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithPackage_typeItemRequestBuilder : BaseRequestBuilder + { + /// Gets an item from the Ayllu.Github.Client.users.item.packages.item.item collection + /// The name of the package. + /// A + public global::Ayllu.Github.Client.Users.Item.Packages.Item.Item.WithPackage_nameItemRequestBuilder this[string position] + { + get + { + var urlTplParams = new Dictionary(PathParameters); + urlTplParams.Add("package_name", position); + return new global::Ayllu.Github.Client.Users.Item.Packages.Item.Item.WithPackage_nameItemRequestBuilder(urlTplParams, RequestAdapter); + } + } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public WithPackage_typeItemRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/users/{username}/packages/{package_type}", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public WithPackage_typeItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/users/{username}/packages/{package_type}", rawUrl) + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Users/Item/Packages/PackagesRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Users/Item/Packages/PackagesRequestBuilder.cs new file mode 100644 index 0000000..c7c1ce3 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Users/Item/Packages/PackagesRequestBuilder.cs @@ -0,0 +1,155 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Ayllu.Github.Client.Users.Item.Packages.Item; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Users.Item.Packages +{ + /// + /// Builds and executes requests for operations under \users\{username}\packages + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class PackagesRequestBuilder : BaseRequestBuilder + { + /// Gets an item from the Ayllu.Github.Client.users.item.packages.item collection + /// 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. + /// A + public global::Ayllu.Github.Client.Users.Item.Packages.Item.WithPackage_typeItemRequestBuilder this[string position] + { + get + { + var urlTplParams = new Dictionary(PathParameters); + urlTplParams.Add("package_type", position); + return new global::Ayllu.Github.Client.Users.Item.Packages.Item.WithPackage_typeItemRequestBuilder(urlTplParams, RequestAdapter); + } + } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public PackagesRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/users/{username}/packages?package_type={package_type}{&page*,per_page*,visibility*}", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public PackagesRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/users/{username}/packages?package_type={package_type}{&page*,per_page*,visibility*}", rawUrl) + { + } + /// + /// 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. For more information, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." + /// API method documentation + /// + /// A List<global::Ayllu.Github.Client.Models.Package> + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 401 status code + /// When receiving a 403 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task?> GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task> GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "401", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "403", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + }; + var collectionResult = await RequestAdapter.SendCollectionAsync(requestInfo, global::Ayllu.Github.Client.Models.Package.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + return collectionResult?.AsList(); + } + /// + /// 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. For more information, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.Users.Item.Packages.PackagesRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Users.Item.Packages.PackagesRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// 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. For more information, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)." + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class PackagesRequestBuilderGetQueryParameters + { + /// 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. + [Obsolete("This property is deprecated, use PackageTypeAsGetPackageTypeQueryParameterType instead")] +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("package_type")] + public string? PackageType { get; set; } +#nullable restore +#else + [QueryParameter("package_type")] + public string PackageType { get; set; } +#endif + /// 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. + [QueryParameter("package_type")] + public global::Ayllu.Github.Client.Users.Item.Packages.GetPackage_typeQueryParameterType? PackageTypeAsGetPackageTypeQueryParameterType { get; set; } + /// The page number of the results to fetch. For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." + [QueryParameter("page")] + public int? Page { get; set; } + /// The number of results per page (max 100). For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." + [QueryParameter("per_page")] + public int? PerPage { get; set; } + /// 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/packages/learn-github-packages/about-permissions-for-github-packages#granular-permissions-for-userorganization-scoped-packages)." + [Obsolete("This property is deprecated, use VisibilityAsGetVisibilityQueryParameterType instead")] +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("visibility")] + public string? Visibility { get; set; } +#nullable restore +#else + [QueryParameter("visibility")] + public string Visibility { get; set; } +#endif + /// 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/packages/learn-github-packages/about-permissions-for-github-packages#granular-permissions-for-userorganization-scoped-packages)." + [QueryParameter("visibility")] + public global::Ayllu.Github.Client.Users.Item.Packages.GetVisibilityQueryParameterType? VisibilityAsGetVisibilityQueryParameterType { get; set; } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class PackagesRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Users/Item/Projects/GetStateQueryParameterType.cs b/src/Ayllu.Github.Client/Github/Client/Users/Item/Projects/GetStateQueryParameterType.cs new file mode 100644 index 0000000..88d84d3 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Users/Item/Projects/GetStateQueryParameterType.cs @@ -0,0 +1,24 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Users.Item.Projects +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public enum GetStateQueryParameterType + #pragma warning restore CS1591 + { + [EnumMember(Value = "open")] + #pragma warning disable CS1591 + Open, + #pragma warning restore CS1591 + [EnumMember(Value = "closed")] + #pragma warning disable CS1591 + Closed, + #pragma warning restore CS1591 + [EnumMember(Value = "all")] + #pragma warning disable CS1591 + All, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Users/Item/Projects/ProjectsRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Users/Item/Projects/ProjectsRequestBuilder.cs new file mode 100644 index 0000000..a09763d --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Users/Item/Projects/ProjectsRequestBuilder.cs @@ -0,0 +1,129 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Users.Item.Projects +{ + /// + /// Builds and executes requests for operations under \users\{username}\projects + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class ProjectsRequestBuilder : BaseRequestBuilder + { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public ProjectsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/users/{username}/projects{?page*,per_page*,state*}", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public ProjectsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/users/{username}/projects{?page*,per_page*,state*}", rawUrl) + { + } + /// + /// > [!WARNING]> **Closing down notice:** Projects (classic) is being deprecated in favor of the new Projects experience.> See the [changelog](https://github.blog/changelog/2024-05-23-sunset-notice-projects-classic/) for more information. + /// API method documentation + /// + /// A List<global::Ayllu.Github.Client.Models.Project> + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 422 status code + [Obsolete("")] +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task?> GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task> GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "422", global::Ayllu.Github.Client.Models.ValidationError.CreateFromDiscriminatorValue }, + }; + var collectionResult = await RequestAdapter.SendCollectionAsync(requestInfo, global::Ayllu.Github.Client.Models.Project.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + return collectionResult?.AsList(); + } + /// + /// > [!WARNING]> **Closing down notice:** Projects (classic) is being deprecated in favor of the new Projects experience.> See the [changelog](https://github.blog/changelog/2024-05-23-sunset-notice-projects-classic/) for more information. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. + [Obsolete("")] +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + [Obsolete("")] + public global::Ayllu.Github.Client.Users.Item.Projects.ProjectsRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Users.Item.Projects.ProjectsRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// > [!WARNING]> **Closing down notice:** Projects (classic) is being deprecated in favor of the new Projects experience.> See the [changelog](https://github.blog/changelog/2024-05-23-sunset-notice-projects-classic/) for more information. + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class ProjectsRequestBuilderGetQueryParameters + { + /// The page number of the results to fetch. For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." + [QueryParameter("page")] + public int? Page { get; set; } + /// The number of results per page (max 100). For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." + [QueryParameter("per_page")] + public int? PerPage { get; set; } + /// Indicates the state of the projects to return. + [Obsolete("This property is deprecated, use StateAsGetStateQueryParameterType instead")] +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("state")] + public string? State { get; set; } +#nullable restore +#else + [QueryParameter("state")] + public string State { get; set; } +#endif + /// Indicates the state of the projects to return. + [QueryParameter("state")] + public global::Ayllu.Github.Client.Users.Item.Projects.GetStateQueryParameterType? StateAsGetStateQueryParameterType { get; set; } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class ProjectsRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Users/Item/Received_events/Public/PublicRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Users/Item/Received_events/Public/PublicRequestBuilder.cs new file mode 100644 index 0000000..a7f862b --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Users/Item/Received_events/Public/PublicRequestBuilder.cs @@ -0,0 +1,107 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Users.Item.Received_events.Public +{ + /// + /// Builds and executes requests for operations under \users\{username}\received_events\public + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class PublicRequestBuilder : BaseRequestBuilder + { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public PublicRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/users/{username}/received_events/public{?page*,per_page*}", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public PublicRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/users/{username}/received_events/public{?page*,per_page*}", rawUrl) + { + } + /// + /// > [!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. + /// API method documentation + /// + /// A List<global::Ayllu.Github.Client.Models.Event> + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task?> GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task> GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var collectionResult = await RequestAdapter.SendCollectionAsync(requestInfo, global::Ayllu.Github.Client.Models.Event.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false); + return collectionResult?.AsList(); + } + /// + /// > [!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. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.Users.Item.Received_events.Public.PublicRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Users.Item.Received_events.Public.PublicRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// > [!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. + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class PublicRequestBuilderGetQueryParameters + { + /// The page number of the results to fetch. For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." + [QueryParameter("page")] + public int? Page { get; set; } + /// The number of results per page (max 100). For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." + [QueryParameter("per_page")] + public int? PerPage { get; set; } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class PublicRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Users/Item/Received_events/Received_eventsRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Users/Item/Received_events/Received_eventsRequestBuilder.cs new file mode 100644 index 0000000..1f07fd6 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Users/Item/Received_events/Received_eventsRequestBuilder.cs @@ -0,0 +1,113 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Ayllu.Github.Client.Users.Item.Received_events.Public; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Users.Item.Received_events +{ + /// + /// Builds and executes requests for operations under \users\{username}\received_events + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class Received_eventsRequestBuilder : BaseRequestBuilder + { + /// The public property + public global::Ayllu.Github.Client.Users.Item.Received_events.Public.PublicRequestBuilder Public + { + get => new global::Ayllu.Github.Client.Users.Item.Received_events.Public.PublicRequestBuilder(PathParameters, RequestAdapter); + } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public Received_eventsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/users/{username}/received_events{?page*,per_page*}", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public Received_eventsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/users/{username}/received_events{?page*,per_page*}", rawUrl) + { + } + /// + /// These are events that you've received by watching repositories and following users. If you are authenticated as thegiven user, you will see private events. Otherwise, you'll only see public events.> [!NOTE]> This API is not built to serve real-time use cases. Depending on the time of day, event latency can be anywhere from 30s to 6h. + /// API method documentation + /// + /// A List<global::Ayllu.Github.Client.Models.Event> + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task?> GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task> GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var collectionResult = await RequestAdapter.SendCollectionAsync(requestInfo, global::Ayllu.Github.Client.Models.Event.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false); + return collectionResult?.AsList(); + } + /// + /// These are events that you've received by watching repositories and following users. If you are authenticated as thegiven user, you will see private events. Otherwise, you'll only see public events.> [!NOTE]> This API is not built to serve real-time use cases. Depending on the time of day, event latency can be anywhere from 30s to 6h. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.Users.Item.Received_events.Received_eventsRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Users.Item.Received_events.Received_eventsRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// These are events that you've received by watching repositories and following users. If you are authenticated as thegiven user, you will see private events. Otherwise, you'll only see public events.> [!NOTE]> This API is not built to serve real-time use cases. Depending on the time of day, event latency can be anywhere from 30s to 6h. + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class Received_eventsRequestBuilderGetQueryParameters + { + /// The page number of the results to fetch. For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." + [QueryParameter("page")] + public int? Page { get; set; } + /// The number of results per page (max 100). For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." + [QueryParameter("per_page")] + public int? PerPage { get; set; } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class Received_eventsRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Users/Item/Repos/GetDirectionQueryParameterType.cs b/src/Ayllu.Github.Client/Github/Client/Users/Item/Repos/GetDirectionQueryParameterType.cs new file mode 100644 index 0000000..899e1f2 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Users/Item/Repos/GetDirectionQueryParameterType.cs @@ -0,0 +1,20 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Users.Item.Repos +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public enum GetDirectionQueryParameterType + #pragma warning restore CS1591 + { + [EnumMember(Value = "asc")] + #pragma warning disable CS1591 + Asc, + #pragma warning restore CS1591 + [EnumMember(Value = "desc")] + #pragma warning disable CS1591 + Desc, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Users/Item/Repos/GetSortQueryParameterType.cs b/src/Ayllu.Github.Client/Github/Client/Users/Item/Repos/GetSortQueryParameterType.cs new file mode 100644 index 0000000..8435246 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Users/Item/Repos/GetSortQueryParameterType.cs @@ -0,0 +1,28 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Users.Item.Repos +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public enum GetSortQueryParameterType + #pragma warning restore CS1591 + { + [EnumMember(Value = "created")] + #pragma warning disable CS1591 + Created, + #pragma warning restore CS1591 + [EnumMember(Value = "updated")] + #pragma warning disable CS1591 + Updated, + #pragma warning restore CS1591 + [EnumMember(Value = "pushed")] + #pragma warning disable CS1591 + Pushed, + #pragma warning restore CS1591 + [EnumMember(Value = "full_name")] + #pragma warning disable CS1591 + Full_name, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Users/Item/Repos/GetTypeQueryParameterType.cs b/src/Ayllu.Github.Client/Github/Client/Users/Item/Repos/GetTypeQueryParameterType.cs new file mode 100644 index 0000000..bfba4e5 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Users/Item/Repos/GetTypeQueryParameterType.cs @@ -0,0 +1,24 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Users.Item.Repos +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public enum GetTypeQueryParameterType + #pragma warning restore CS1591 + { + [EnumMember(Value = "all")] + #pragma warning disable CS1591 + All, + #pragma warning restore CS1591 + [EnumMember(Value = "owner")] + #pragma warning disable CS1591 + Owner, + #pragma warning restore CS1591 + [EnumMember(Value = "member")] + #pragma warning disable CS1591 + Member, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Users/Item/Repos/ReposRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Users/Item/Repos/ReposRequestBuilder.cs new file mode 100644 index 0000000..89ad1c1 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Users/Item/Repos/ReposRequestBuilder.cs @@ -0,0 +1,149 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Users.Item.Repos +{ + /// + /// Builds and executes requests for operations under \users\{username}\repos + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class ReposRequestBuilder : BaseRequestBuilder + { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public ReposRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/users/{username}/repos{?direction*,page*,per_page*,sort*,type*}", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public ReposRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/users/{username}/repos{?direction*,page*,per_page*,sort*,type*}", rawUrl) + { + } + /// + /// Lists public repositories for the specified user. + /// API method documentation + /// + /// A List<global::Ayllu.Github.Client.Models.MinimalRepository> + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task?> GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task> GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var collectionResult = await RequestAdapter.SendCollectionAsync(requestInfo, global::Ayllu.Github.Client.Models.MinimalRepository.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false); + return collectionResult?.AsList(); + } + /// + /// Lists public repositories for the specified user. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.Users.Item.Repos.ReposRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Users.Item.Repos.ReposRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Lists public repositories for the specified user. + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class ReposRequestBuilderGetQueryParameters + { + /// The order to sort by. Default: `asc` when using `full_name`, otherwise `desc`. + [Obsolete("This property is deprecated, use DirectionAsGetDirectionQueryParameterType instead")] +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("direction")] + public string? Direction { get; set; } +#nullable restore +#else + [QueryParameter("direction")] + public string Direction { get; set; } +#endif + /// The order to sort by. Default: `asc` when using `full_name`, otherwise `desc`. + [QueryParameter("direction")] + public global::Ayllu.Github.Client.Users.Item.Repos.GetDirectionQueryParameterType? DirectionAsGetDirectionQueryParameterType { get; set; } + /// The page number of the results to fetch. For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." + [QueryParameter("page")] + public int? Page { get; set; } + /// The number of results per page (max 100). For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." + [QueryParameter("per_page")] + public int? PerPage { get; set; } + /// The property to sort the results by. + [Obsolete("This property is deprecated, use SortAsGetSortQueryParameterType instead")] +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("sort")] + public string? Sort { get; set; } +#nullable restore +#else + [QueryParameter("sort")] + public string Sort { get; set; } +#endif + /// The property to sort the results by. + [QueryParameter("sort")] + public global::Ayllu.Github.Client.Users.Item.Repos.GetSortQueryParameterType? SortAsGetSortQueryParameterType { get; set; } + /// Limit results to repositories of the specified type. + [Obsolete("This property is deprecated, use TypeAsGetTypeQueryParameterType instead")] +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("type")] + public string? Type { get; set; } +#nullable restore +#else + [QueryParameter("type")] + public string Type { get; set; } +#endif + /// Limit results to repositories of the specified type. + [QueryParameter("type")] + public global::Ayllu.Github.Client.Users.Item.Repos.GetTypeQueryParameterType? TypeAsGetTypeQueryParameterType { get; set; } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class ReposRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Users/Item/Settings/Billing/Actions/ActionsRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Users/Item/Settings/Billing/Actions/ActionsRequestBuilder.cs new file mode 100644 index 0000000..e399960 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Users/Item/Settings/Billing/Actions/ActionsRequestBuilder.cs @@ -0,0 +1,93 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Users.Item.Settings.Billing.Actions +{ + /// + /// Builds and executes requests for operations under \users\{username}\settings\billing\actions + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class ActionsRequestBuilder : BaseRequestBuilder + { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public ActionsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/users/{username}/settings/billing/actions", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public ActionsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/users/{username}/settings/billing/actions", rawUrl) + { + } + /// + /// 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/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. + /// API method documentation + /// + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Models.ActionsBillingUsage.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false); + } + /// + /// 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/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. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.Users.Item.Settings.Billing.Actions.ActionsRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Users.Item.Settings.Billing.Actions.ActionsRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class ActionsRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Users/Item/Settings/Billing/BillingRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Users/Item/Settings/Billing/BillingRequestBuilder.cs new file mode 100644 index 0000000..11481fe --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Users/Item/Settings/Billing/BillingRequestBuilder.cs @@ -0,0 +1,59 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Users.Item.Settings.Billing.Actions; +using Ayllu.Github.Client.Users.Item.Settings.Billing.Packages; +using Ayllu.Github.Client.Users.Item.Settings.Billing.SharedStorage; +using Ayllu.Github.Client.Users.Item.Settings.Billing.Usage; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System; +namespace Ayllu.Github.Client.Users.Item.Settings.Billing +{ + /// + /// Builds and executes requests for operations under \users\{username}\settings\billing + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class BillingRequestBuilder : BaseRequestBuilder + { + /// The actions property + public global::Ayllu.Github.Client.Users.Item.Settings.Billing.Actions.ActionsRequestBuilder Actions + { + get => new global::Ayllu.Github.Client.Users.Item.Settings.Billing.Actions.ActionsRequestBuilder(PathParameters, RequestAdapter); + } + /// The packages property + public global::Ayllu.Github.Client.Users.Item.Settings.Billing.Packages.PackagesRequestBuilder Packages + { + get => new global::Ayllu.Github.Client.Users.Item.Settings.Billing.Packages.PackagesRequestBuilder(PathParameters, RequestAdapter); + } + /// The sharedStorage property + public global::Ayllu.Github.Client.Users.Item.Settings.Billing.SharedStorage.SharedStorageRequestBuilder SharedStorage + { + get => new global::Ayllu.Github.Client.Users.Item.Settings.Billing.SharedStorage.SharedStorageRequestBuilder(PathParameters, RequestAdapter); + } + /// The usage property + public global::Ayllu.Github.Client.Users.Item.Settings.Billing.Usage.UsageRequestBuilder Usage + { + get => new global::Ayllu.Github.Client.Users.Item.Settings.Billing.Usage.UsageRequestBuilder(PathParameters, RequestAdapter); + } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public BillingRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/users/{username}/settings/billing", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public BillingRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/users/{username}/settings/billing", rawUrl) + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Users/Item/Settings/Billing/Packages/PackagesRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Users/Item/Settings/Billing/Packages/PackagesRequestBuilder.cs new file mode 100644 index 0000000..1b193a2 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Users/Item/Settings/Billing/Packages/PackagesRequestBuilder.cs @@ -0,0 +1,93 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Users.Item.Settings.Billing.Packages +{ + /// + /// Builds and executes requests for operations under \users\{username}\settings\billing\packages + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class PackagesRequestBuilder : BaseRequestBuilder + { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public PackagesRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/users/{username}/settings/billing/packages", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public PackagesRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/users/{username}/settings/billing/packages", rawUrl) + { + } + /// + /// 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/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. + /// API method documentation + /// + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Models.PackagesBillingUsage.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false); + } + /// + /// 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/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. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.Users.Item.Settings.Billing.Packages.PackagesRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Users.Item.Settings.Billing.Packages.PackagesRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class PackagesRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Users/Item/Settings/Billing/SharedStorage/SharedStorageRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Users/Item/Settings/Billing/SharedStorage/SharedStorageRequestBuilder.cs new file mode 100644 index 0000000..df895fe --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Users/Item/Settings/Billing/SharedStorage/SharedStorageRequestBuilder.cs @@ -0,0 +1,93 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Users.Item.Settings.Billing.SharedStorage +{ + /// + /// Builds and executes requests for operations under \users\{username}\settings\billing\shared-storage + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class SharedStorageRequestBuilder : BaseRequestBuilder + { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public SharedStorageRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/users/{username}/settings/billing/shared-storage", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public SharedStorageRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/users/{username}/settings/billing/shared-storage", rawUrl) + { + } + /// + /// 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/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. + /// API method documentation + /// + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Models.CombinedBillingUsage.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false); + } + /// + /// 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/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. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.Users.Item.Settings.Billing.SharedStorage.SharedStorageRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Users.Item.Settings.Billing.SharedStorage.SharedStorageRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class SharedStorageRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Users/Item/Settings/Billing/Usage/UsageRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Users/Item/Settings/Billing/Usage/UsageRequestBuilder.cs new file mode 100644 index 0000000..abbabbb --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Users/Item/Settings/Billing/Usage/UsageRequestBuilder.cs @@ -0,0 +1,123 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Users.Item.Settings.Billing.Usage +{ + /// + /// Builds and executes requests for operations under \users\{username}\settings\billing\usage + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class UsageRequestBuilder : BaseRequestBuilder + { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public UsageRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/users/{username}/settings/billing/usage{?day*,hour*,month*,year*}", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public UsageRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/users/{username}/settings/billing/usage{?day*,hour*,month*,year*}", rawUrl) + { + } + /// + /// Gets a report of the total usage for a user.**Note:** This endpoint is only available to users with access to the enhanced billing platform. + /// API method documentation + /// + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 400 status code + /// When receiving a 403 status code + /// When receiving a 500 status code + /// When receiving a 503 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "400", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "403", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "500", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + { "503", global::Ayllu.Github.Client.Models.BillingUsageReportUser503Error.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Models.BillingUsageReportUser.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// Gets a report of the total usage for a user.**Note:** This endpoint is only available to users with access to the enhanced billing platform. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.Users.Item.Settings.Billing.Usage.UsageRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Users.Item.Settings.Billing.Usage.UsageRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Gets a report of the total usage for a user.**Note:** This endpoint is only available to users with access to the enhanced billing platform. + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class UsageRequestBuilderGetQueryParameters + { + /// If specified, only return results for a single day. The value of `day` is an integer between `1` and `31`. If no `year` or `month` is specified, the default `year` and `month` are used. + [QueryParameter("day")] + public int? Day { get; set; } + /// If specified, only return results for a single hour. The value of `hour` is an integer between `0` and `23`. If no `year`, `month`, or `day` is specified, the default `year`, `month`, and `day` are used. + [QueryParameter("hour")] + public int? Hour { get; set; } + /// If specified, only return results for a single month. The value of `month` is an integer between `1` and `12`. If no year is specified the default `year` is used. + [QueryParameter("month")] + public int? Month { get; set; } + /// If specified, only return results for a single year. The value of `year` is an integer with four digits representing a year. For example, `2025`. Default value is the current year. + [QueryParameter("year")] + public int? Year { get; set; } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class UsageRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Users/Item/Settings/SettingsRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Users/Item/Settings/SettingsRequestBuilder.cs new file mode 100644 index 0000000..9a00661 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Users/Item/Settings/SettingsRequestBuilder.cs @@ -0,0 +1,41 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Users.Item.Settings.Billing; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System; +namespace Ayllu.Github.Client.Users.Item.Settings +{ + /// + /// Builds and executes requests for operations under \users\{username}\settings + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class SettingsRequestBuilder : BaseRequestBuilder + { + /// The billing property + public global::Ayllu.Github.Client.Users.Item.Settings.Billing.BillingRequestBuilder Billing + { + get => new global::Ayllu.Github.Client.Users.Item.Settings.Billing.BillingRequestBuilder(PathParameters, RequestAdapter); + } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public SettingsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/users/{username}/settings", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public SettingsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/users/{username}/settings", rawUrl) + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Users/Item/Social_accounts/Social_accountsRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Users/Item/Social_accounts/Social_accountsRequestBuilder.cs new file mode 100644 index 0000000..a92288b --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Users/Item/Social_accounts/Social_accountsRequestBuilder.cs @@ -0,0 +1,107 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Users.Item.Social_accounts +{ + /// + /// Builds and executes requests for operations under \users\{username}\social_accounts + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class Social_accountsRequestBuilder : BaseRequestBuilder + { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public Social_accountsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/users/{username}/social_accounts{?page*,per_page*}", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public Social_accountsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/users/{username}/social_accounts{?page*,per_page*}", rawUrl) + { + } + /// + /// Lists social media accounts for a user. This endpoint is accessible by anyone. + /// API method documentation + /// + /// A List<global::Ayllu.Github.Client.Models.SocialAccount> + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task?> GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task> GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var collectionResult = await RequestAdapter.SendCollectionAsync(requestInfo, global::Ayllu.Github.Client.Models.SocialAccount.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false); + return collectionResult?.AsList(); + } + /// + /// Lists social media accounts for a user. This endpoint is accessible by anyone. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.Users.Item.Social_accounts.Social_accountsRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Users.Item.Social_accounts.Social_accountsRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Lists social media accounts for a user. This endpoint is accessible by anyone. + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class Social_accountsRequestBuilderGetQueryParameters + { + /// The page number of the results to fetch. For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." + [QueryParameter("page")] + public int? Page { get; set; } + /// The number of results per page (max 100). For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." + [QueryParameter("per_page")] + public int? PerPage { get; set; } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class Social_accountsRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Users/Item/Ssh_signing_keys/Ssh_signing_keysRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Users/Item/Ssh_signing_keys/Ssh_signing_keysRequestBuilder.cs new file mode 100644 index 0000000..feb4bbd --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Users/Item/Ssh_signing_keys/Ssh_signing_keysRequestBuilder.cs @@ -0,0 +1,107 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Users.Item.Ssh_signing_keys +{ + /// + /// Builds and executes requests for operations under \users\{username}\ssh_signing_keys + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class Ssh_signing_keysRequestBuilder : BaseRequestBuilder + { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public Ssh_signing_keysRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/users/{username}/ssh_signing_keys{?page*,per_page*}", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public Ssh_signing_keysRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/users/{username}/ssh_signing_keys{?page*,per_page*}", rawUrl) + { + } + /// + /// Lists the SSH signing keys for a user. This operation is accessible by anyone. + /// API method documentation + /// + /// A List<global::Ayllu.Github.Client.Models.SshSigningKey> + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task?> GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task> GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var collectionResult = await RequestAdapter.SendCollectionAsync(requestInfo, global::Ayllu.Github.Client.Models.SshSigningKey.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false); + return collectionResult?.AsList(); + } + /// + /// Lists the SSH signing keys for a user. This operation is accessible by anyone. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.Users.Item.Ssh_signing_keys.Ssh_signing_keysRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Users.Item.Ssh_signing_keys.Ssh_signing_keysRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Lists the SSH signing keys for a user. This operation is accessible by anyone. + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class Ssh_signing_keysRequestBuilderGetQueryParameters + { + /// The page number of the results to fetch. For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." + [QueryParameter("page")] + public int? Page { get; set; } + /// The number of results per page (max 100). For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." + [QueryParameter("per_page")] + public int? PerPage { get; set; } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class Ssh_signing_keysRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Users/Item/Starred/GetDirectionQueryParameterType.cs b/src/Ayllu.Github.Client/Github/Client/Users/Item/Starred/GetDirectionQueryParameterType.cs new file mode 100644 index 0000000..6c2fcc9 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Users/Item/Starred/GetDirectionQueryParameterType.cs @@ -0,0 +1,20 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Users.Item.Starred +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public enum GetDirectionQueryParameterType + #pragma warning restore CS1591 + { + [EnumMember(Value = "asc")] + #pragma warning disable CS1591 + Asc, + #pragma warning restore CS1591 + [EnumMember(Value = "desc")] + #pragma warning disable CS1591 + Desc, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Users/Item/Starred/GetSortQueryParameterType.cs b/src/Ayllu.Github.Client/Github/Client/Users/Item/Starred/GetSortQueryParameterType.cs new file mode 100644 index 0000000..e65d129 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Users/Item/Starred/GetSortQueryParameterType.cs @@ -0,0 +1,20 @@ +// +using System.Runtime.Serialization; +using System; +namespace Ayllu.Github.Client.Users.Item.Starred +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public enum GetSortQueryParameterType + #pragma warning restore CS1591 + { + [EnumMember(Value = "created")] + #pragma warning disable CS1591 + Created, + #pragma warning restore CS1591 + [EnumMember(Value = "updated")] + #pragma warning disable CS1591 + Updated, + #pragma warning restore CS1591 + } +} diff --git a/src/Ayllu.Github.Client/Github/Client/Users/Item/Starred/Repository.cs b/src/Ayllu.Github.Client/Github/Client/Users/Item/Starred/Repository.cs new file mode 100644 index 0000000..8ad245e --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Users/Item/Starred/Repository.cs @@ -0,0 +1,55 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Users.Item.Starred +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class Repository : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public Repository() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Users.Item.Starred.Repository CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Users.Item.Starred.Repository(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Users/Item/Starred/StarredRepository.cs b/src/Ayllu.Github.Client/Github/Client/Users/Item/Starred/StarredRepository.cs new file mode 100644 index 0000000..c73327d --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Users/Item/Starred/StarredRepository.cs @@ -0,0 +1,55 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Ayllu.Github.Client.Users.Item.Starred +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class StarredRepository : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public StarredRepository() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Users.Item.Starred.StarredRepository CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::Ayllu.Github.Client.Users.Item.Starred.StarredRepository(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Users/Item/Starred/StarredRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Users/Item/Starred/StarredRequestBuilder.cs new file mode 100644 index 0000000..f818512 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Users/Item/Starred/StarredRequestBuilder.cs @@ -0,0 +1,285 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Users.Item.Starred +{ + /// + /// Builds and executes requests for operations under \users\{username}\starred + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class StarredRequestBuilder : BaseRequestBuilder + { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public StarredRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/users/{username}/starred{?direction*,page*,per_page*,sort*}", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public StarredRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/users/{username}/starred{?direction*,page*,per_page*,sort*}", rawUrl) + { + } + /// + /// Lists repositories a user has starred.This endpoint supports the following custom media types. For more information, see "[Media types](https://docs.github.com/rest/using-the-rest-api/getting-started-with-the-rest-api#media-types)."- **`application/vnd.github.star+json`**: Includes a timestamp of when the star was created. + /// API method documentation + /// + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsStarredGetResponseAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task GetAsStarredGetResponseAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Users.Item.Starred.StarredRequestBuilder.StarredGetResponse.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false); + } + /// + /// Lists repositories a user has starred.This endpoint supports the following custom media types. For more information, see "[Media types](https://docs.github.com/rest/using-the-rest-api/getting-started-with-the-rest-api#media-types)."- **`application/vnd.github.star+json`**: Includes a timestamp of when the star was created. + /// API method documentation + /// + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + [Obsolete("This method is obsolete. Use GetAsStarredGetResponseAsync instead.")] +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Users.Item.Starred.StarredRequestBuilder.StarredResponse.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false); + } + /// + /// Lists repositories a user has starred.This endpoint supports the following custom media types. For more information, see "[Media types](https://docs.github.com/rest/using-the-rest-api/getting-started-with-the-rest-api#media-types)."- **`application/vnd.github.star+json`**: Includes a timestamp of when the star was created. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.Users.Item.Starred.StarredRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Users.Item.Starred.StarredRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Composed type wrapper for classes List<global::Ayllu.Github.Client.Users.Item.Starred.Repository>, List<global::Ayllu.Github.Client.Users.Item.Starred.StarredRepository> + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class StarredGetResponse : IComposedTypeWrapper, IParsable + { + /// Composed type representation for type List<global::Ayllu.Github.Client.Users.Item.Starred.Repository> +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? Repository { get; set; } +#nullable restore +#else + public List Repository { get; set; } +#endif + /// Composed type representation for type List<global::Ayllu.Github.Client.Users.Item.Starred.StarredRepository> +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? StarredRepository { get; set; } +#nullable restore +#else + public List StarredRepository { get; set; } +#endif + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Users.Item.Starred.StarredRequestBuilder.StarredGetResponse CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + var result = new global::Ayllu.Github.Client.Users.Item.Starred.StarredRequestBuilder.StarredGetResponse(); + if(parseNode.GetCollectionOfObjectValues(global::Ayllu.Github.Client.Users.Item.Starred.Repository.CreateFromDiscriminatorValue)?.AsList() is List repositoryValue) + { + result.Repository = repositoryValue; + } + else if(parseNode.GetCollectionOfObjectValues(global::Ayllu.Github.Client.Users.Item.Starred.StarredRepository.CreateFromDiscriminatorValue)?.AsList() is List starredRepositoryValue) + { + result.StarredRepository = starredRepositoryValue; + } + return result; + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary>(); + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(Repository != null) + { + writer.WriteCollectionOfObjectValues(null, Repository); + } + else if(StarredRepository != null) + { + writer.WriteCollectionOfObjectValues(null, StarredRepository); + } + } + } + /// + /// Lists repositories a user has starred.This endpoint supports the following custom media types. For more information, see "[Media types](https://docs.github.com/rest/using-the-rest-api/getting-started-with-the-rest-api#media-types)."- **`application/vnd.github.star+json`**: Includes a timestamp of when the star was created. + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class StarredRequestBuilderGetQueryParameters + { + /// The direction to sort the results by. + [Obsolete("This property is deprecated, use DirectionAsGetDirectionQueryParameterType instead")] +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("direction")] + public string? Direction { get; set; } +#nullable restore +#else + [QueryParameter("direction")] + public string Direction { get; set; } +#endif + /// The direction to sort the results by. + [QueryParameter("direction")] + public global::Ayllu.Github.Client.Users.Item.Starred.GetDirectionQueryParameterType? DirectionAsGetDirectionQueryParameterType { get; set; } + /// The page number of the results to fetch. For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." + [QueryParameter("page")] + public int? Page { get; set; } + /// The number of results per page (max 100). For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." + [QueryParameter("per_page")] + public int? PerPage { get; set; } + /// The property to sort the results by. `created` means when the repository was starred. `updated` means when the repository was last pushed to. + [Obsolete("This property is deprecated, use SortAsGetSortQueryParameterType instead")] +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("sort")] + public string? Sort { get; set; } +#nullable restore +#else + [QueryParameter("sort")] + public string Sort { get; set; } +#endif + /// The property to sort the results by. `created` means when the repository was starred. `updated` means when the repository was last pushed to. + [QueryParameter("sort")] + public global::Ayllu.Github.Client.Users.Item.Starred.GetSortQueryParameterType? SortAsGetSortQueryParameterType { get; set; } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class StarredRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + /// + /// Composed type wrapper for classes List<global::Ayllu.Github.Client.Users.Item.Starred.Repository>, List<global::Ayllu.Github.Client.Users.Item.Starred.StarredRepository> + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class StarredResponse : IComposedTypeWrapper, IParsable + { + /// Composed type representation for type List<global::Ayllu.Github.Client.Users.Item.Starred.Repository> +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? Repository { get; set; } +#nullable restore +#else + public List Repository { get; set; } +#endif + /// Composed type representation for type List<global::Ayllu.Github.Client.Users.Item.Starred.StarredRepository> +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? StarredRepository { get; set; } +#nullable restore +#else + public List StarredRepository { get; set; } +#endif + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Users.Item.Starred.StarredRequestBuilder.StarredResponse CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + var result = new global::Ayllu.Github.Client.Users.Item.Starred.StarredRequestBuilder.StarredResponse(); + if(parseNode.GetCollectionOfObjectValues(global::Ayllu.Github.Client.Users.Item.Starred.Repository.CreateFromDiscriminatorValue)?.AsList() is List repositoryValue) + { + result.Repository = repositoryValue; + } + else if(parseNode.GetCollectionOfObjectValues(global::Ayllu.Github.Client.Users.Item.Starred.StarredRepository.CreateFromDiscriminatorValue)?.AsList() is List starredRepositoryValue) + { + result.StarredRepository = starredRepositoryValue; + } + return result; + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary>(); + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(Repository != null) + { + writer.WriteCollectionOfObjectValues(null, Repository); + } + else if(StarredRepository != null) + { + writer.WriteCollectionOfObjectValues(null, StarredRepository); + } + } + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Users/Item/Subscriptions/SubscriptionsRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Users/Item/Subscriptions/SubscriptionsRequestBuilder.cs new file mode 100644 index 0000000..f0067ed --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Users/Item/Subscriptions/SubscriptionsRequestBuilder.cs @@ -0,0 +1,107 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Users.Item.Subscriptions +{ + /// + /// Builds and executes requests for operations under \users\{username}\subscriptions + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class SubscriptionsRequestBuilder : BaseRequestBuilder + { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public SubscriptionsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/users/{username}/subscriptions{?page*,per_page*}", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public SubscriptionsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/users/{username}/subscriptions{?page*,per_page*}", rawUrl) + { + } + /// + /// Lists repositories a user is watching. + /// API method documentation + /// + /// A List<global::Ayllu.Github.Client.Models.MinimalRepository> + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task?> GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task> GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var collectionResult = await RequestAdapter.SendCollectionAsync(requestInfo, global::Ayllu.Github.Client.Models.MinimalRepository.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false); + return collectionResult?.AsList(); + } + /// + /// Lists repositories a user is watching. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.Users.Item.Subscriptions.SubscriptionsRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Users.Item.Subscriptions.SubscriptionsRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Lists repositories a user is watching. + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class SubscriptionsRequestBuilderGetQueryParameters + { + /// The page number of the results to fetch. For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." + [QueryParameter("page")] + public int? Page { get; set; } + /// The number of results per page (max 100). For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." + [QueryParameter("per_page")] + public int? PerPage { get; set; } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class SubscriptionsRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Users/Item/WithUsernameItemRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Users/Item/WithUsernameItemRequestBuilder.cs new file mode 100644 index 0000000..8f78eb5 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Users/Item/WithUsernameItemRequestBuilder.cs @@ -0,0 +1,393 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Ayllu.Github.Client.Users.Item.Attestations; +using Ayllu.Github.Client.Users.Item.Docker; +using Ayllu.Github.Client.Users.Item.Events; +using Ayllu.Github.Client.Users.Item.Followers; +using Ayllu.Github.Client.Users.Item.Following; +using Ayllu.Github.Client.Users.Item.Gists; +using Ayllu.Github.Client.Users.Item.Gpg_keys; +using Ayllu.Github.Client.Users.Item.Hovercard; +using Ayllu.Github.Client.Users.Item.Installation; +using Ayllu.Github.Client.Users.Item.Keys; +using Ayllu.Github.Client.Users.Item.Orgs; +using Ayllu.Github.Client.Users.Item.Packages; +using Ayllu.Github.Client.Users.Item.Projects; +using Ayllu.Github.Client.Users.Item.Received_events; +using Ayllu.Github.Client.Users.Item.Repos; +using Ayllu.Github.Client.Users.Item.Settings; +using Ayllu.Github.Client.Users.Item.Social_accounts; +using Ayllu.Github.Client.Users.Item.Ssh_signing_keys; +using Ayllu.Github.Client.Users.Item.Starred; +using Ayllu.Github.Client.Users.Item.Subscriptions; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Users.Item +{ + /// + /// Builds and executes requests for operations under \users\{username} + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithUsernameItemRequestBuilder : BaseRequestBuilder + { + /// The attestations property + public global::Ayllu.Github.Client.Users.Item.Attestations.AttestationsRequestBuilder Attestations + { + get => new global::Ayllu.Github.Client.Users.Item.Attestations.AttestationsRequestBuilder(PathParameters, RequestAdapter); + } + /// The docker property + public global::Ayllu.Github.Client.Users.Item.Docker.DockerRequestBuilder Docker + { + get => new global::Ayllu.Github.Client.Users.Item.Docker.DockerRequestBuilder(PathParameters, RequestAdapter); + } + /// The events property + public global::Ayllu.Github.Client.Users.Item.Events.EventsRequestBuilder Events + { + get => new global::Ayllu.Github.Client.Users.Item.Events.EventsRequestBuilder(PathParameters, RequestAdapter); + } + /// The followers property + public global::Ayllu.Github.Client.Users.Item.Followers.FollowersRequestBuilder Followers + { + get => new global::Ayllu.Github.Client.Users.Item.Followers.FollowersRequestBuilder(PathParameters, RequestAdapter); + } + /// The following property + public global::Ayllu.Github.Client.Users.Item.Following.FollowingRequestBuilder Following + { + get => new global::Ayllu.Github.Client.Users.Item.Following.FollowingRequestBuilder(PathParameters, RequestAdapter); + } + /// The gists property + public global::Ayllu.Github.Client.Users.Item.Gists.GistsRequestBuilder Gists + { + get => new global::Ayllu.Github.Client.Users.Item.Gists.GistsRequestBuilder(PathParameters, RequestAdapter); + } + /// The gpg_keys property + public global::Ayllu.Github.Client.Users.Item.Gpg_keys.Gpg_keysRequestBuilder Gpg_keys + { + get => new global::Ayllu.Github.Client.Users.Item.Gpg_keys.Gpg_keysRequestBuilder(PathParameters, RequestAdapter); + } + /// The hovercard property + public global::Ayllu.Github.Client.Users.Item.Hovercard.HovercardRequestBuilder Hovercard + { + get => new global::Ayllu.Github.Client.Users.Item.Hovercard.HovercardRequestBuilder(PathParameters, RequestAdapter); + } + /// The installation property + public global::Ayllu.Github.Client.Users.Item.Installation.InstallationRequestBuilder Installation + { + get => new global::Ayllu.Github.Client.Users.Item.Installation.InstallationRequestBuilder(PathParameters, RequestAdapter); + } + /// The keys property + public global::Ayllu.Github.Client.Users.Item.Keys.KeysRequestBuilder Keys + { + get => new global::Ayllu.Github.Client.Users.Item.Keys.KeysRequestBuilder(PathParameters, RequestAdapter); + } + /// The orgs property + public global::Ayllu.Github.Client.Users.Item.Orgs.OrgsRequestBuilder Orgs + { + get => new global::Ayllu.Github.Client.Users.Item.Orgs.OrgsRequestBuilder(PathParameters, RequestAdapter); + } + /// The packages property + public global::Ayllu.Github.Client.Users.Item.Packages.PackagesRequestBuilder Packages + { + get => new global::Ayllu.Github.Client.Users.Item.Packages.PackagesRequestBuilder(PathParameters, RequestAdapter); + } + /// The projects property + public global::Ayllu.Github.Client.Users.Item.Projects.ProjectsRequestBuilder Projects + { + get => new global::Ayllu.Github.Client.Users.Item.Projects.ProjectsRequestBuilder(PathParameters, RequestAdapter); + } + /// The received_events property + public global::Ayllu.Github.Client.Users.Item.Received_events.Received_eventsRequestBuilder Received_events + { + get => new global::Ayllu.Github.Client.Users.Item.Received_events.Received_eventsRequestBuilder(PathParameters, RequestAdapter); + } + /// The repos property + public global::Ayllu.Github.Client.Users.Item.Repos.ReposRequestBuilder Repos + { + get => new global::Ayllu.Github.Client.Users.Item.Repos.ReposRequestBuilder(PathParameters, RequestAdapter); + } + /// The settings property + public global::Ayllu.Github.Client.Users.Item.Settings.SettingsRequestBuilder Settings + { + get => new global::Ayllu.Github.Client.Users.Item.Settings.SettingsRequestBuilder(PathParameters, RequestAdapter); + } + /// The social_accounts property + public global::Ayllu.Github.Client.Users.Item.Social_accounts.Social_accountsRequestBuilder Social_accounts + { + get => new global::Ayllu.Github.Client.Users.Item.Social_accounts.Social_accountsRequestBuilder(PathParameters, RequestAdapter); + } + /// The ssh_signing_keys property + public global::Ayllu.Github.Client.Users.Item.Ssh_signing_keys.Ssh_signing_keysRequestBuilder Ssh_signing_keys + { + get => new global::Ayllu.Github.Client.Users.Item.Ssh_signing_keys.Ssh_signing_keysRequestBuilder(PathParameters, RequestAdapter); + } + /// The starred property + public global::Ayllu.Github.Client.Users.Item.Starred.StarredRequestBuilder Starred + { + get => new global::Ayllu.Github.Client.Users.Item.Starred.StarredRequestBuilder(PathParameters, RequestAdapter); + } + /// The subscriptions property + public global::Ayllu.Github.Client.Users.Item.Subscriptions.SubscriptionsRequestBuilder Subscriptions + { + get => new global::Ayllu.Github.Client.Users.Item.Subscriptions.SubscriptionsRequestBuilder(PathParameters, RequestAdapter); + } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public WithUsernameItemRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/users/{username}", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public WithUsernameItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/users/{username}", rawUrl) + { + } + /// + /// Provides publicly available information about someone with a GitHub account.If you are requesting information about an [Enterprise Managed User](https://docs.github.com/enterprise-cloud@latest/admin/managing-iam/understanding-iam-for-enterprises/about-enterprise-managed-users), or a GitHub App bot that is installed in an organization that uses Enterprise Managed Users, your requests must be authenticated as a user or GitHub App that has access to the organization to view that account's information. If you are not authorized, the request will return a `404 Not Found` status.The `email` key in the following response is the publicly visible email address from your GitHub [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. For more information, see [Authentication](https://docs.github.com/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/rest/users/emails). + /// API method documentation + /// + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 404 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsWithUsernameGetResponseAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task GetAsWithUsernameGetResponseAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "404", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Users.Item.WithUsernameItemRequestBuilder.WithUsernameGetResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// Provides publicly available information about someone with a GitHub account.If you are requesting information about an [Enterprise Managed User](https://docs.github.com/enterprise-cloud@latest/admin/managing-iam/understanding-iam-for-enterprises/about-enterprise-managed-users), or a GitHub App bot that is installed in an organization that uses Enterprise Managed Users, your requests must be authenticated as a user or GitHub App that has access to the organization to view that account's information. If you are not authorized, the request will return a `404 Not Found` status.The `email` key in the following response is the publicly visible email address from your GitHub [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. For more information, see [Authentication](https://docs.github.com/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/rest/users/emails). + /// API method documentation + /// + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 404 status code + [Obsolete("This method is obsolete. Use GetAsWithUsernameGetResponseAsync instead.")] +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "404", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendAsync(requestInfo, global::Ayllu.Github.Client.Users.Item.WithUsernameItemRequestBuilder.WithUsernameResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// Provides publicly available information about someone with a GitHub account.If you are requesting information about an [Enterprise Managed User](https://docs.github.com/enterprise-cloud@latest/admin/managing-iam/understanding-iam-for-enterprises/about-enterprise-managed-users), or a GitHub App bot that is installed in an organization that uses Enterprise Managed Users, your requests must be authenticated as a user or GitHub App that has access to the organization to view that account's information. If you are not authorized, the request will return a `404 Not Found` status.The `email` key in the following response is the publicly visible email address from your GitHub [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. For more information, see [Authentication](https://docs.github.com/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/rest/users/emails). + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.Users.Item.WithUsernameItemRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Users.Item.WithUsernameItemRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Composed type wrapper for classes , + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithUsernameGetResponse : IComposedTypeWrapper, IParsable + { + /// Composed type representation for type +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.PrivateUser? PrivateUser { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.PrivateUser PrivateUser { get; set; } +#endif + /// Composed type representation for type +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.PublicUser? PublicUser { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.PublicUser PublicUser { get; set; } +#endif + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Users.Item.WithUsernameItemRequestBuilder.WithUsernameGetResponse CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + var mappingValue = parseNode.GetChildNode("user_view_type")?.GetStringValue(); + var result = new global::Ayllu.Github.Client.Users.Item.WithUsernameItemRequestBuilder.WithUsernameGetResponse(); + if("private".Equals(mappingValue, StringComparison.OrdinalIgnoreCase)) + { + result.PrivateUser = new global::Ayllu.Github.Client.Models.PrivateUser(); + } + else if("public".Equals(mappingValue, StringComparison.OrdinalIgnoreCase)) + { + result.PublicUser = new global::Ayllu.Github.Client.Models.PublicUser(); + } + return result; + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + if(PrivateUser != null) + { + return PrivateUser.GetFieldDeserializers(); + } + else if(PublicUser != null) + { + return PublicUser.GetFieldDeserializers(); + } + return new Dictionary>(); + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(PrivateUser != null) + { + writer.WriteObjectValue(null, PrivateUser); + } + else if(PublicUser != null) + { + writer.WriteObjectValue(null, PublicUser); + } + } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithUsernameItemRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + /// + /// Composed type wrapper for classes , + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithUsernameResponse : IComposedTypeWrapper, IParsable + { + /// Composed type representation for type +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.PrivateUser? PrivateUser { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.PrivateUser PrivateUser { get; set; } +#endif + /// Composed type representation for type +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Ayllu.Github.Client.Models.PublicUser? PublicUser { get; set; } +#nullable restore +#else + public global::Ayllu.Github.Client.Models.PublicUser PublicUser { get; set; } +#endif + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Ayllu.Github.Client.Users.Item.WithUsernameItemRequestBuilder.WithUsernameResponse CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + var mappingValue = parseNode.GetChildNode("user_view_type")?.GetStringValue(); + var result = new global::Ayllu.Github.Client.Users.Item.WithUsernameItemRequestBuilder.WithUsernameResponse(); + if("private".Equals(mappingValue, StringComparison.OrdinalIgnoreCase)) + { + result.PrivateUser = new global::Ayllu.Github.Client.Models.PrivateUser(); + } + else if("public".Equals(mappingValue, StringComparison.OrdinalIgnoreCase)) + { + result.PublicUser = new global::Ayllu.Github.Client.Models.PublicUser(); + } + return result; + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + if(PrivateUser != null) + { + return PrivateUser.GetFieldDeserializers(); + } + else if(PublicUser != null) + { + return PublicUser.GetFieldDeserializers(); + } + return new Dictionary>(); + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(PrivateUser != null) + { + writer.WriteObjectValue(null, PrivateUser); + } + else if(PublicUser != null) + { + writer.WriteObjectValue(null, PublicUser); + } + } + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Users/UsersRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Users/UsersRequestBuilder.cs new file mode 100644 index 0000000..be4ed55 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Users/UsersRequestBuilder.cs @@ -0,0 +1,120 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Ayllu.Github.Client.Users.Item; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Users +{ + /// + /// Builds and executes requests for operations under \users + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class UsersRequestBuilder : BaseRequestBuilder + { + /// Gets an item from the Ayllu.Github.Client.users.item collection + /// The handle for the GitHub user account. + /// A + public global::Ayllu.Github.Client.Users.Item.WithUsernameItemRequestBuilder this[string position] + { + get + { + var urlTplParams = new Dictionary(PathParameters); + urlTplParams.Add("username", position); + return new global::Ayllu.Github.Client.Users.Item.WithUsernameItemRequestBuilder(urlTplParams, RequestAdapter); + } + } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public UsersRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/users{?per_page*,since*}", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public UsersRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/users{?per_page*,since*}", rawUrl) + { + } + /// + /// Lists all users, in the order that they signed up on GitHub. 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/rest/guides/using-pagination-in-the-rest-api#using-link-headers) to get the URL for the next page of users. + /// API method documentation + /// + /// A List<global::Ayllu.Github.Client.Models.SimpleUser> + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task?> GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task> GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var collectionResult = await RequestAdapter.SendCollectionAsync(requestInfo, global::Ayllu.Github.Client.Models.SimpleUser.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false); + return collectionResult?.AsList(); + } + /// + /// Lists all users, in the order that they signed up on GitHub. 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/rest/guides/using-pagination-in-the-rest-api#using-link-headers) to get the URL for the next page of users. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.Users.UsersRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Users.UsersRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Lists all users, in the order that they signed up on GitHub. 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/rest/guides/using-pagination-in-the-rest-api#using-link-headers) to get the URL for the next page of users. + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class UsersRequestBuilderGetQueryParameters + { + /// The number of results per page (max 100). For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." + [QueryParameter("per_page")] + public int? PerPage { get; set; } + /// A user ID. Only return users with an ID greater than this ID. + [QueryParameter("since")] + public int? Since { get; set; } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class UsersRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Versions/VersionsRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Versions/VersionsRequestBuilder.cs new file mode 100644 index 0000000..4561f6c --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Versions/VersionsRequestBuilder.cs @@ -0,0 +1,99 @@ +// +#pragma warning disable CS0618 +using Ayllu.Github.Client.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Versions +{ + /// + /// Builds and executes requests for operations under \versions + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class VersionsRequestBuilder : BaseRequestBuilder + { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public VersionsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/versions", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public VersionsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/versions", rawUrl) + { + } + /// + /// Get all supported GitHub API versions. + /// API method documentation + /// + /// A List<Date> + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 404 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task?> GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task> GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "404", global::Ayllu.Github.Client.Models.BasicError.CreateFromDiscriminatorValue }, + }; + var collectionResult = await RequestAdapter.SendPrimitiveCollectionAsync(requestInfo, errorMapping, cancellationToken).ConfigureAwait(false); + return collectionResult?.AsList(); + } + /// + /// Get all supported GitHub API versions. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.Versions.VersionsRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Versions.VersionsRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class VersionsRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Github.Client/Github/Client/Zen/ZenRequestBuilder.cs b/src/Ayllu.Github.Client/Github/Client/Zen/ZenRequestBuilder.cs new file mode 100644 index 0000000..3fe1393 --- /dev/null +++ b/src/Ayllu.Github.Client/Github/Client/Zen/ZenRequestBuilder.cs @@ -0,0 +1,92 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Ayllu.Github.Client.Zen +{ + /// + /// Builds and executes requests for operations under \zen + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class ZenRequestBuilder : BaseRequestBuilder + { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public ZenRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/zen", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public ZenRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/zen", rawUrl) + { + } + /// + /// Get a random sentence from the Zen of GitHub + /// API method documentation + /// + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + return await RequestAdapter.SendPrimitiveAsync(requestInfo, default, cancellationToken).ConfigureAwait(false); + } + /// + /// Get a random sentence from the Zen of GitHub + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "text/plain;q=0.9"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Ayllu.Github.Client.Zen.ZenRequestBuilder WithUrl(string rawUrl) + { + return new global::Ayllu.Github.Client.Zen.ZenRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class ZenRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/Ayllu.Infrastructure/Ayllu.Infrastructure.csproj b/src/Ayllu.Infrastructure/Ayllu.Infrastructure.csproj deleted file mode 100644 index 2166fda..0000000 --- a/src/Ayllu.Infrastructure/Ayllu.Infrastructure.csproj +++ /dev/null @@ -1,21 +0,0 @@ - - - - net9.0 - enable - enable - - - - - - - - - - - - - - - diff --git a/src/Ayllu.Infrastructure/Common/Middlewares/InvalidatedTokenMiddleware.cs b/src/Ayllu.Infrastructure/Common/Middlewares/InvalidatedTokenMiddleware.cs deleted file mode 100644 index 1a809ce..0000000 --- a/src/Ayllu.Infrastructure/Common/Middlewares/InvalidatedTokenMiddleware.cs +++ /dev/null @@ -1,43 +0,0 @@ -using Ayllu.Application.DTO.Responses; -using Ayllu.Infrastructure.Data; -using Microsoft.AspNetCore.Http; -using Microsoft.EntityFrameworkCore; -using System.Text.Json; - -namespace Ayllu.Infrastructure.Common.Middlewares; - -public class InvalidatedTokenMiddleware(RequestDelegate next) -{ - public async Task InvokeAsync(HttpContext context, AppDbContext dbContext) - { - var authHeader = context.Request.Headers["Authorization"].FirstOrDefault(); - - if (!string.IsNullOrEmpty(authHeader) && authHeader.StartsWith("Bearer ")) - { - var token = authHeader.Substring("Bearer ".Length).Trim(); - - // Validação rápida: se está no banco, bloqueia - var tokenExists = await dbContext.InvalidatedTokens - .AsNoTracking() - .AnyAsync(t => t.Jwt == token); - - if (tokenExists) - { - context.Response.StatusCode = StatusCodes.Status401Unauthorized; - context.Response.ContentType = "application/json"; - await context.Response.WriteAsync(JsonSerializer.Serialize( - new Response - { - Success = false, - Message = "Token has been invalidated.", - StatusCode = StatusCodes.Status401Unauthorized - }) - ); - return; - } - } - - // Continua o pipeline - await next(context); - } -} diff --git a/src/Ayllu.Infrastructure/Data/AppDbContext.cs b/src/Ayllu.Infrastructure/Data/AppDbContext.cs deleted file mode 100644 index 51a1c2c..0000000 --- a/src/Ayllu.Infrastructure/Data/AppDbContext.cs +++ /dev/null @@ -1,156 +0,0 @@ -using Ayllu.Domain.Entities; -using Microsoft.AspNetCore.Identity; -using Microsoft.AspNetCore.Identity.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore; - -namespace Ayllu.Infrastructure.Data; - -public class AppDbContext : IdentityDbContext -{ - public AppDbContext(DbContextOptions options) : base(options) { } - - public DbSet Organizations => Set(); - public DbSet UserOrganizations => Set(); - public DbSet Movements => Set(); - public DbSet Dialectics => Set(); - public DbSet DialecticStages => Set(); - public DbSet UserConnections => Set(); - public DbSet InvalidatedTokens => Set(); - - protected override void OnModelCreating(ModelBuilder builder) - { - base.OnModelCreating(builder); - - /* Identity renomeado (opcional) */ - builder.Entity().ToTable("Users"); - builder.Entity().ToTable("Roles"); - builder.Entity>().ToTable("UserRoles"); - builder.Entity>().ToTable("UserClaims"); - builder.Entity>().ToTable("UserLogins"); - builder.Entity>().ToTable("RoleClaims"); - builder.Entity>().ToTable("UserTokens"); - - /* Organization */ - builder.Entity(b => - { - b.ToTable("Organizations"); - b.HasKey(x => x.Id); - - b.Property(x => x.Name).HasMaxLength(200).IsRequired(); - b.Property(x => x.Description).HasMaxLength(2000); - b.Property(x => x.LogoUrl).HasMaxLength(1000); - - b.HasIndex(x => x.Name).IsUnique(); - }); - - /* AppUserOrganization */ - builder.Entity(b => - { - b.ToTable("UserOrganizations"); - b.HasKey(x => new { x.UserId, x.OrganizationId }); - - b.Property(x => x.Role).HasConversion().IsRequired(); - - b.HasOne(x => x.User) - .WithMany(u => u.OrganizationMemberships) - .HasForeignKey(x => x.UserId) - .OnDelete(DeleteBehavior.Cascade); - - b.HasOne(x => x.Organization) - .WithMany(o => o.Members) - .HasForeignKey(x => x.OrganizationId) - .OnDelete(DeleteBehavior.Cascade); - }); - - /* Movement */ - builder.Entity(b => - { - b.ToTable("Movements"); - b.HasKey(x => x.Id); - - b.Property(x => x.Title).HasMaxLength(200).IsRequired(); - b.Property(x => x.Description).HasMaxLength(4000); - - b.HasOne(x => x.Organization) - .WithMany(o => o.Movements) - .HasForeignKey(x => x.OrganizationId) - .OnDelete(DeleteBehavior.Cascade); - - b.HasOne(x => x.CreatedBy) - .WithMany(u => u.MovementsCreated) - .HasForeignKey(x => x.CreatedById) - .OnDelete(DeleteBehavior.Restrict); - }); - - /* Dialectic */ - builder.Entity(b => - { - b.ToTable("Dialectics"); - b.HasKey(x => x.Id); - - b.Property(x => x.Title).HasMaxLength(200).IsRequired(); - - b.HasOne(x => x.Organization) - .WithMany(o => o.Dialectics) - .HasForeignKey(x => x.OrganizationId) - .OnDelete(DeleteBehavior.Cascade); - - b.HasOne(x => x.CreatedBy) - .WithMany(u => u.DialecticsCreated) - .HasForeignKey(x => x.CreatedById) - .OnDelete(DeleteBehavior.Restrict); - }); - - /* DialecticStage */ - builder.Entity(b => - { - b.ToTable("DialecticStages"); - b.HasKey(x => x.Id); - - b.Property(x => x.StageType).HasConversion().IsRequired(); - b.Property(x => x.Content).IsRequired(); - - b.HasOne(x => x.Dialectic) - .WithMany(d => d.Stages) - .HasForeignKey(x => x.DialecticId) - .OnDelete(DeleteBehavior.Cascade); - - b.HasOne(x => x.Author) - .WithMany(u => u.DialecticStagesAuthored) - .HasForeignKey(x => x.AuthorId) - .OnDelete(DeleteBehavior.Restrict); - }); - - builder.Entity(b => - { - b.ToTable("UserConnections", t => - { - t.HasCheckConstraint("CK_UserConnections_Order", "[User1Id] < [User2Id]"); - }); - // Chave composta (User1Id, User2Id) - b.HasKey(x => new { x.User1Id, x.User2Id }); - - b.Property(x => x.Status).HasConversion().IsRequired(); - - b.HasOne(x => x.User1) - .WithMany() - .HasForeignKey(x => x.User1Id) - .OnDelete(DeleteBehavior.Restrict); - - b.HasOne(x => x.User2) - .WithMany() - .HasForeignKey(x => x.User2Id) - .OnDelete(DeleteBehavior.Restrict); - - }); - - builder.Entity(b => - { - b.ToTable("InvalidatedTokens"); - b.HasKey(x => x.Id); - - b.Property(x => x.Jwt).IsRequired(); - b.HasIndex(x => x.Jwt).IsUnique(); // garante que não duplica invalidação - }); - } -} diff --git a/src/Ayllu.Infrastructure/Migrations/20250817132200_InitialCreate.Designer.cs b/src/Ayllu.Infrastructure/Migrations/20250817132200_InitialCreate.Designer.cs deleted file mode 100644 index 5e8c44d..0000000 --- a/src/Ayllu.Infrastructure/Migrations/20250817132200_InitialCreate.Designer.cs +++ /dev/null @@ -1,619 +0,0 @@ -// -using System; -using Ayllu.Infrastructure.Data; -using Microsoft.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore.Infrastructure; -using Microsoft.EntityFrameworkCore.Metadata; -using Microsoft.EntityFrameworkCore.Migrations; -using Microsoft.EntityFrameworkCore.Storage.ValueConversion; - -#nullable disable - -namespace Ayllu.Infrastructure.Migrations -{ - [DbContext(typeof(AppDbContext))] - [Migration("20250817132200_InitialCreate")] - partial class InitialCreate - { - /// - protected override void BuildTargetModel(ModelBuilder modelBuilder) - { -#pragma warning disable 612, 618 - modelBuilder - .HasAnnotation("ProductVersion", "9.0.8") - .HasAnnotation("Relational:MaxIdentifierLength", 128); - - SqlServerModelBuilderExtensions.UseIdentityColumns(modelBuilder); - - modelBuilder.Entity("Ayllu.Domain.Entities.AppRole", b => - { - b.Property("Id") - .HasColumnType("nvarchar(450)"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasColumnType("nvarchar(max)"); - - b.Property("Name") - .HasMaxLength(256) - .HasColumnType("nvarchar(256)"); - - b.Property("NormalizedName") - .HasMaxLength(256) - .HasColumnType("nvarchar(256)"); - - b.HasKey("Id"); - - b.HasIndex("NormalizedName") - .IsUnique() - .HasDatabaseName("RoleNameIndex") - .HasFilter("[NormalizedName] IS NOT NULL"); - - b.ToTable("Roles", (string)null); - }); - - modelBuilder.Entity("Ayllu.Domain.Entities.AppUser", b => - { - b.Property("Id") - .HasColumnType("nvarchar(450)"); - - b.Property("AccessFailedCount") - .HasColumnType("int"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasColumnType("nvarchar(max)"); - - b.Property("Email") - .HasMaxLength(256) - .HasColumnType("nvarchar(256)"); - - b.Property("EmailConfirmed") - .HasColumnType("bit"); - - b.Property("LastName") - .IsRequired() - .HasColumnType("nvarchar(max)"); - - b.Property("LockoutEnabled") - .HasColumnType("bit"); - - b.Property("LockoutEnd") - .HasColumnType("datetimeoffset"); - - b.Property("Name") - .IsRequired() - .HasColumnType("nvarchar(max)"); - - b.Property("NormalizedEmail") - .HasMaxLength(256) - .HasColumnType("nvarchar(256)"); - - b.Property("NormalizedUserName") - .HasMaxLength(256) - .HasColumnType("nvarchar(256)"); - - b.Property("PasswordHash") - .HasColumnType("nvarchar(max)"); - - b.Property("PhoneNumber") - .HasColumnType("nvarchar(max)"); - - b.Property("PhoneNumberConfirmed") - .HasColumnType("bit"); - - b.Property("ProfilePictureUrl") - .HasColumnType("nvarchar(max)"); - - b.Property("SecurityStamp") - .HasColumnType("nvarchar(max)"); - - b.Property("TwoFactorEnabled") - .HasColumnType("bit"); - - b.Property("UserName") - .HasMaxLength(256) - .HasColumnType("nvarchar(256)"); - - b.HasKey("Id"); - - b.HasIndex("NormalizedEmail") - .HasDatabaseName("EmailIndex"); - - b.HasIndex("NormalizedUserName") - .IsUnique() - .HasDatabaseName("UserNameIndex") - .HasFilter("[NormalizedUserName] IS NOT NULL"); - - b.ToTable("Users", (string)null); - }); - - modelBuilder.Entity("Ayllu.Domain.Entities.AppUserOrganization", b => - { - b.Property("UserId") - .HasColumnType("nvarchar(450)"); - - b.Property("OrganizationId") - .HasColumnType("nvarchar(450)"); - - b.Property("Role") - .HasColumnType("int"); - - b.HasKey("UserId", "OrganizationId"); - - b.HasIndex("OrganizationId"); - - b.ToTable("UserOrganizations", (string)null); - }); - - modelBuilder.Entity("Ayllu.Domain.Entities.Dialectic", b => - { - b.Property("Id") - .HasColumnType("nvarchar(450)"); - - b.Property("CreatedAt") - .HasColumnType("datetime2"); - - b.Property("CreatedById") - .IsRequired() - .HasColumnType("nvarchar(450)"); - - b.Property("OrganizationId") - .IsRequired() - .HasColumnType("nvarchar(450)"); - - b.Property("Title") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("nvarchar(200)"); - - b.HasKey("Id"); - - b.HasIndex("CreatedById"); - - b.HasIndex("OrganizationId"); - - b.ToTable("Dialectics", (string)null); - }); - - modelBuilder.Entity("Ayllu.Domain.Entities.DialecticStage", b => - { - b.Property("Id") - .HasColumnType("nvarchar(450)"); - - b.Property("AuthorId") - .IsRequired() - .HasColumnType("nvarchar(450)"); - - b.Property("Content") - .IsRequired() - .HasColumnType("nvarchar(max)"); - - b.Property("CreatedAt") - .HasColumnType("datetime2"); - - b.Property("DialecticId") - .IsRequired() - .HasColumnType("nvarchar(450)"); - - b.Property("StageType") - .HasColumnType("int"); - - b.HasKey("Id"); - - b.HasIndex("AuthorId"); - - b.HasIndex("DialecticId"); - - b.ToTable("DialecticStages", (string)null); - }); - - modelBuilder.Entity("Ayllu.Domain.Entities.InvalidatedToken", b => - { - b.Property("Id") - .HasColumnType("nvarchar(450)"); - - b.Property("ExpirationDate") - .HasColumnType("datetime2"); - - b.Property("InvalidatedAt") - .HasColumnType("datetime2"); - - b.Property("Jwt") - .IsRequired() - .HasColumnType("nvarchar(450)"); - - b.HasKey("Id"); - - b.HasIndex("Jwt") - .IsUnique(); - - b.ToTable("InvalidatedTokens", (string)null); - }); - - modelBuilder.Entity("Ayllu.Domain.Entities.Movement", b => - { - b.Property("Id") - .HasColumnType("nvarchar(450)"); - - b.Property("CreatedAt") - .HasColumnType("datetime2"); - - b.Property("CreatedById") - .IsRequired() - .HasColumnType("nvarchar(450)"); - - b.Property("Description") - .HasMaxLength(4000) - .HasColumnType("nvarchar(4000)"); - - b.Property("OrganizationId") - .IsRequired() - .HasColumnType("nvarchar(450)"); - - b.Property("Title") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("nvarchar(200)"); - - b.HasKey("Id"); - - b.HasIndex("CreatedById"); - - b.HasIndex("OrganizationId"); - - b.ToTable("Movements", (string)null); - }); - - modelBuilder.Entity("Ayllu.Domain.Entities.Organization", b => - { - b.Property("Id") - .HasColumnType("nvarchar(450)"); - - b.Property("Description") - .HasMaxLength(2000) - .HasColumnType("nvarchar(2000)"); - - b.Property("LogoUrl") - .HasMaxLength(1000) - .HasColumnType("nvarchar(1000)"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("nvarchar(200)"); - - b.HasKey("Id"); - - b.HasIndex("Name") - .IsUnique(); - - b.ToTable("Organizations", (string)null); - }); - - modelBuilder.Entity("Ayllu.Domain.Entities.UserConnection", b => - { - b.Property("User1Id") - .HasColumnType("nvarchar(450)"); - - b.Property("User2Id") - .HasColumnType("nvarchar(450)"); - - b.Property("AppUserId") - .HasColumnType("nvarchar(450)"); - - b.Property("AppUserId1") - .HasColumnType("nvarchar(450)"); - - b.Property("CreatedAt") - .HasColumnType("datetime2"); - - b.Property("Status") - .HasColumnType("int"); - - b.HasKey("User1Id", "User2Id"); - - b.HasIndex("AppUserId"); - - b.HasIndex("AppUserId1"); - - b.HasIndex("User2Id"); - - b.ToTable("UserConnections", null, t => - { - t.HasCheckConstraint("CK_UserConnections_Order", "[User1Id] < [User2Id]"); - }); - }); - - modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityRoleClaim", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int"); - - SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); - - b.Property("ClaimType") - .HasColumnType("nvarchar(max)"); - - b.Property("ClaimValue") - .HasColumnType("nvarchar(max)"); - - b.Property("RoleId") - .IsRequired() - .HasColumnType("nvarchar(450)"); - - b.HasKey("Id"); - - b.HasIndex("RoleId"); - - b.ToTable("RoleClaims", (string)null); - }); - - modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserClaim", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int"); - - SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); - - b.Property("ClaimType") - .HasColumnType("nvarchar(max)"); - - b.Property("ClaimValue") - .HasColumnType("nvarchar(max)"); - - b.Property("UserId") - .IsRequired() - .HasColumnType("nvarchar(450)"); - - b.HasKey("Id"); - - b.HasIndex("UserId"); - - b.ToTable("UserClaims", (string)null); - }); - - modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserLogin", b => - { - b.Property("LoginProvider") - .HasColumnType("nvarchar(450)"); - - b.Property("ProviderKey") - .HasColumnType("nvarchar(450)"); - - b.Property("ProviderDisplayName") - .HasColumnType("nvarchar(max)"); - - b.Property("UserId") - .IsRequired() - .HasColumnType("nvarchar(450)"); - - b.HasKey("LoginProvider", "ProviderKey"); - - b.HasIndex("UserId"); - - b.ToTable("UserLogins", (string)null); - }); - - modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserRole", b => - { - b.Property("UserId") - .HasColumnType("nvarchar(450)"); - - b.Property("RoleId") - .HasColumnType("nvarchar(450)"); - - b.HasKey("UserId", "RoleId"); - - b.HasIndex("RoleId"); - - b.ToTable("UserRoles", (string)null); - }); - - modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserToken", b => - { - b.Property("UserId") - .HasColumnType("nvarchar(450)"); - - b.Property("LoginProvider") - .HasColumnType("nvarchar(450)"); - - b.Property("Name") - .HasColumnType("nvarchar(450)"); - - b.Property("Value") - .HasColumnType("nvarchar(max)"); - - b.HasKey("UserId", "LoginProvider", "Name"); - - b.ToTable("UserTokens", (string)null); - }); - - modelBuilder.Entity("Ayllu.Domain.Entities.AppUserOrganization", b => - { - b.HasOne("Ayllu.Domain.Entities.Organization", "Organization") - .WithMany("Members") - .HasForeignKey("OrganizationId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("Ayllu.Domain.Entities.AppUser", "User") - .WithMany("OrganizationMemberships") - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Organization"); - - b.Navigation("User"); - }); - - modelBuilder.Entity("Ayllu.Domain.Entities.Dialectic", b => - { - b.HasOne("Ayllu.Domain.Entities.AppUser", "CreatedBy") - .WithMany("DialecticsCreated") - .HasForeignKey("CreatedById") - .OnDelete(DeleteBehavior.Restrict) - .IsRequired(); - - b.HasOne("Ayllu.Domain.Entities.Organization", "Organization") - .WithMany("Dialectics") - .HasForeignKey("OrganizationId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("CreatedBy"); - - b.Navigation("Organization"); - }); - - modelBuilder.Entity("Ayllu.Domain.Entities.DialecticStage", b => - { - b.HasOne("Ayllu.Domain.Entities.AppUser", "Author") - .WithMany("DialecticStagesAuthored") - .HasForeignKey("AuthorId") - .OnDelete(DeleteBehavior.Restrict) - .IsRequired(); - - b.HasOne("Ayllu.Domain.Entities.Dialectic", "Dialectic") - .WithMany("Stages") - .HasForeignKey("DialecticId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Author"); - - b.Navigation("Dialectic"); - }); - - modelBuilder.Entity("Ayllu.Domain.Entities.Movement", b => - { - b.HasOne("Ayllu.Domain.Entities.AppUser", "CreatedBy") - .WithMany("MovementsCreated") - .HasForeignKey("CreatedById") - .OnDelete(DeleteBehavior.Restrict) - .IsRequired(); - - b.HasOne("Ayllu.Domain.Entities.Organization", "Organization") - .WithMany("Movements") - .HasForeignKey("OrganizationId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("CreatedBy"); - - b.Navigation("Organization"); - }); - - modelBuilder.Entity("Ayllu.Domain.Entities.UserConnection", b => - { - b.HasOne("Ayllu.Domain.Entities.AppUser", null) - .WithMany("ConnectionsReceived") - .HasForeignKey("AppUserId"); - - b.HasOne("Ayllu.Domain.Entities.AppUser", null) - .WithMany("ConnectionsRequested") - .HasForeignKey("AppUserId1"); - - b.HasOne("Ayllu.Domain.Entities.AppUser", "User1") - .WithMany() - .HasForeignKey("User1Id") - .OnDelete(DeleteBehavior.Restrict) - .IsRequired(); - - b.HasOne("Ayllu.Domain.Entities.AppUser", "User2") - .WithMany() - .HasForeignKey("User2Id") - .OnDelete(DeleteBehavior.Restrict) - .IsRequired(); - - b.Navigation("User1"); - - b.Navigation("User2"); - }); - - modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityRoleClaim", b => - { - b.HasOne("Ayllu.Domain.Entities.AppRole", null) - .WithMany() - .HasForeignKey("RoleId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserClaim", b => - { - b.HasOne("Ayllu.Domain.Entities.AppUser", null) - .WithMany() - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserLogin", b => - { - b.HasOne("Ayllu.Domain.Entities.AppUser", null) - .WithMany() - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserRole", b => - { - b.HasOne("Ayllu.Domain.Entities.AppRole", null) - .WithMany() - .HasForeignKey("RoleId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("Ayllu.Domain.Entities.AppUser", null) - .WithMany() - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserToken", b => - { - b.HasOne("Ayllu.Domain.Entities.AppUser", null) - .WithMany() - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("Ayllu.Domain.Entities.AppUser", b => - { - b.Navigation("ConnectionsReceived"); - - b.Navigation("ConnectionsRequested"); - - b.Navigation("DialecticStagesAuthored"); - - b.Navigation("DialecticsCreated"); - - b.Navigation("MovementsCreated"); - - b.Navigation("OrganizationMemberships"); - }); - - modelBuilder.Entity("Ayllu.Domain.Entities.Dialectic", b => - { - b.Navigation("Stages"); - }); - - modelBuilder.Entity("Ayllu.Domain.Entities.Organization", b => - { - b.Navigation("Dialectics"); - - b.Navigation("Members"); - - b.Navigation("Movements"); - }); -#pragma warning restore 612, 618 - } - } -} diff --git a/src/Ayllu.Infrastructure/Migrations/20250817132200_InitialCreate.cs b/src/Ayllu.Infrastructure/Migrations/20250817132200_InitialCreate.cs deleted file mode 100644 index e1b8ec4..0000000 --- a/src/Ayllu.Infrastructure/Migrations/20250817132200_InitialCreate.cs +++ /dev/null @@ -1,485 +0,0 @@ -using System; -using Microsoft.EntityFrameworkCore.Migrations; - -#nullable disable - -namespace Ayllu.Infrastructure.Migrations -{ - /// - public partial class InitialCreate : Migration - { - /// - protected override void Up(MigrationBuilder migrationBuilder) - { - migrationBuilder.CreateTable( - name: "InvalidatedTokens", - columns: table => new - { - Id = table.Column(type: "nvarchar(450)", nullable: false), - Jwt = table.Column(type: "nvarchar(450)", nullable: false), - ExpirationDate = table.Column(type: "datetime2", nullable: false), - InvalidatedAt = table.Column(type: "datetime2", nullable: false) - }, - constraints: table => - { - table.PrimaryKey("PK_InvalidatedTokens", x => x.Id); - }); - - migrationBuilder.CreateTable( - name: "Organizations", - columns: table => new - { - Id = table.Column(type: "nvarchar(450)", nullable: false), - Name = table.Column(type: "nvarchar(200)", maxLength: 200, nullable: false), - Description = table.Column(type: "nvarchar(2000)", maxLength: 2000, nullable: true), - LogoUrl = table.Column(type: "nvarchar(1000)", maxLength: 1000, nullable: true) - }, - constraints: table => - { - table.PrimaryKey("PK_Organizations", x => x.Id); - }); - - migrationBuilder.CreateTable( - name: "Roles", - columns: table => new - { - Id = table.Column(type: "nvarchar(450)", nullable: false), - Name = table.Column(type: "nvarchar(256)", maxLength: 256, nullable: true), - NormalizedName = table.Column(type: "nvarchar(256)", maxLength: 256, nullable: true), - ConcurrencyStamp = table.Column(type: "nvarchar(max)", nullable: true) - }, - constraints: table => - { - table.PrimaryKey("PK_Roles", x => x.Id); - }); - - migrationBuilder.CreateTable( - name: "Users", - columns: table => new - { - Id = table.Column(type: "nvarchar(450)", nullable: false), - Name = table.Column(type: "nvarchar(max)", nullable: false), - LastName = table.Column(type: "nvarchar(max)", nullable: false), - ProfilePictureUrl = table.Column(type: "nvarchar(max)", nullable: true), - UserName = table.Column(type: "nvarchar(256)", maxLength: 256, nullable: true), - NormalizedUserName = table.Column(type: "nvarchar(256)", maxLength: 256, nullable: true), - Email = table.Column(type: "nvarchar(256)", maxLength: 256, nullable: true), - NormalizedEmail = table.Column(type: "nvarchar(256)", maxLength: 256, nullable: true), - EmailConfirmed = table.Column(type: "bit", nullable: false), - PasswordHash = table.Column(type: "nvarchar(max)", nullable: true), - SecurityStamp = table.Column(type: "nvarchar(max)", nullable: true), - ConcurrencyStamp = table.Column(type: "nvarchar(max)", nullable: true), - PhoneNumber = table.Column(type: "nvarchar(max)", nullable: true), - PhoneNumberConfirmed = table.Column(type: "bit", nullable: false), - TwoFactorEnabled = table.Column(type: "bit", nullable: false), - LockoutEnd = table.Column(type: "datetimeoffset", nullable: true), - LockoutEnabled = table.Column(type: "bit", nullable: false), - AccessFailedCount = table.Column(type: "int", nullable: false) - }, - constraints: table => - { - table.PrimaryKey("PK_Users", x => x.Id); - }); - - migrationBuilder.CreateTable( - name: "RoleClaims", - columns: table => new - { - Id = table.Column(type: "int", nullable: false) - .Annotation("SqlServer:Identity", "1, 1"), - RoleId = table.Column(type: "nvarchar(450)", nullable: false), - ClaimType = table.Column(type: "nvarchar(max)", nullable: true), - ClaimValue = table.Column(type: "nvarchar(max)", nullable: true) - }, - constraints: table => - { - table.PrimaryKey("PK_RoleClaims", x => x.Id); - table.ForeignKey( - name: "FK_RoleClaims_Roles_RoleId", - column: x => x.RoleId, - principalTable: "Roles", - principalColumn: "Id", - onDelete: ReferentialAction.Cascade); - }); - - migrationBuilder.CreateTable( - name: "Dialectics", - columns: table => new - { - Id = table.Column(type: "nvarchar(450)", nullable: false), - Title = table.Column(type: "nvarchar(200)", maxLength: 200, nullable: false), - CreatedAt = table.Column(type: "datetime2", nullable: false), - OrganizationId = table.Column(type: "nvarchar(450)", nullable: false), - CreatedById = table.Column(type: "nvarchar(450)", nullable: false) - }, - constraints: table => - { - table.PrimaryKey("PK_Dialectics", x => x.Id); - table.ForeignKey( - name: "FK_Dialectics_Organizations_OrganizationId", - column: x => x.OrganizationId, - principalTable: "Organizations", - principalColumn: "Id", - onDelete: ReferentialAction.Cascade); - table.ForeignKey( - name: "FK_Dialectics_Users_CreatedById", - column: x => x.CreatedById, - principalTable: "Users", - principalColumn: "Id", - onDelete: ReferentialAction.Restrict); - }); - - migrationBuilder.CreateTable( - name: "Movements", - columns: table => new - { - Id = table.Column(type: "nvarchar(450)", nullable: false), - Title = table.Column(type: "nvarchar(200)", maxLength: 200, nullable: false), - Description = table.Column(type: "nvarchar(4000)", maxLength: 4000, nullable: true), - CreatedAt = table.Column(type: "datetime2", nullable: false), - OrganizationId = table.Column(type: "nvarchar(450)", nullable: false), - CreatedById = table.Column(type: "nvarchar(450)", nullable: false) - }, - constraints: table => - { - table.PrimaryKey("PK_Movements", x => x.Id); - table.ForeignKey( - name: "FK_Movements_Organizations_OrganizationId", - column: x => x.OrganizationId, - principalTable: "Organizations", - principalColumn: "Id", - onDelete: ReferentialAction.Cascade); - table.ForeignKey( - name: "FK_Movements_Users_CreatedById", - column: x => x.CreatedById, - principalTable: "Users", - principalColumn: "Id", - onDelete: ReferentialAction.Restrict); - }); - - migrationBuilder.CreateTable( - name: "UserClaims", - columns: table => new - { - Id = table.Column(type: "int", nullable: false) - .Annotation("SqlServer:Identity", "1, 1"), - UserId = table.Column(type: "nvarchar(450)", nullable: false), - ClaimType = table.Column(type: "nvarchar(max)", nullable: true), - ClaimValue = table.Column(type: "nvarchar(max)", nullable: true) - }, - constraints: table => - { - table.PrimaryKey("PK_UserClaims", x => x.Id); - table.ForeignKey( - name: "FK_UserClaims_Users_UserId", - column: x => x.UserId, - principalTable: "Users", - principalColumn: "Id", - onDelete: ReferentialAction.Cascade); - }); - - migrationBuilder.CreateTable( - name: "UserConnections", - columns: table => new - { - User1Id = table.Column(type: "nvarchar(450)", nullable: false), - User2Id = table.Column(type: "nvarchar(450)", nullable: false), - Status = table.Column(type: "int", nullable: false), - CreatedAt = table.Column(type: "datetime2", nullable: false), - AppUserId = table.Column(type: "nvarchar(450)", nullable: true), - AppUserId1 = table.Column(type: "nvarchar(450)", nullable: true) - }, - constraints: table => - { - table.PrimaryKey("PK_UserConnections", x => new { x.User1Id, x.User2Id }); - table.CheckConstraint("CK_UserConnections_Order", "[User1Id] < [User2Id]"); - table.ForeignKey( - name: "FK_UserConnections_Users_AppUserId", - column: x => x.AppUserId, - principalTable: "Users", - principalColumn: "Id"); - table.ForeignKey( - name: "FK_UserConnections_Users_AppUserId1", - column: x => x.AppUserId1, - principalTable: "Users", - principalColumn: "Id"); - table.ForeignKey( - name: "FK_UserConnections_Users_User1Id", - column: x => x.User1Id, - principalTable: "Users", - principalColumn: "Id", - onDelete: ReferentialAction.Restrict); - table.ForeignKey( - name: "FK_UserConnections_Users_User2Id", - column: x => x.User2Id, - principalTable: "Users", - principalColumn: "Id", - onDelete: ReferentialAction.Restrict); - }); - - migrationBuilder.CreateTable( - name: "UserLogins", - columns: table => new - { - LoginProvider = table.Column(type: "nvarchar(450)", nullable: false), - ProviderKey = table.Column(type: "nvarchar(450)", nullable: false), - ProviderDisplayName = table.Column(type: "nvarchar(max)", nullable: true), - UserId = table.Column(type: "nvarchar(450)", nullable: false) - }, - constraints: table => - { - table.PrimaryKey("PK_UserLogins", x => new { x.LoginProvider, x.ProviderKey }); - table.ForeignKey( - name: "FK_UserLogins_Users_UserId", - column: x => x.UserId, - principalTable: "Users", - principalColumn: "Id", - onDelete: ReferentialAction.Cascade); - }); - - migrationBuilder.CreateTable( - name: "UserOrganizations", - columns: table => new - { - UserId = table.Column(type: "nvarchar(450)", nullable: false), - OrganizationId = table.Column(type: "nvarchar(450)", nullable: false), - Role = table.Column(type: "int", nullable: false) - }, - constraints: table => - { - table.PrimaryKey("PK_UserOrganizations", x => new { x.UserId, x.OrganizationId }); - table.ForeignKey( - name: "FK_UserOrganizations_Organizations_OrganizationId", - column: x => x.OrganizationId, - principalTable: "Organizations", - principalColumn: "Id", - onDelete: ReferentialAction.Cascade); - table.ForeignKey( - name: "FK_UserOrganizations_Users_UserId", - column: x => x.UserId, - principalTable: "Users", - principalColumn: "Id", - onDelete: ReferentialAction.Cascade); - }); - - migrationBuilder.CreateTable( - name: "UserRoles", - columns: table => new - { - UserId = table.Column(type: "nvarchar(450)", nullable: false), - RoleId = table.Column(type: "nvarchar(450)", nullable: false) - }, - constraints: table => - { - table.PrimaryKey("PK_UserRoles", x => new { x.UserId, x.RoleId }); - table.ForeignKey( - name: "FK_UserRoles_Roles_RoleId", - column: x => x.RoleId, - principalTable: "Roles", - principalColumn: "Id", - onDelete: ReferentialAction.Cascade); - table.ForeignKey( - name: "FK_UserRoles_Users_UserId", - column: x => x.UserId, - principalTable: "Users", - principalColumn: "Id", - onDelete: ReferentialAction.Cascade); - }); - - migrationBuilder.CreateTable( - name: "UserTokens", - columns: table => new - { - UserId = table.Column(type: "nvarchar(450)", nullable: false), - LoginProvider = table.Column(type: "nvarchar(450)", nullable: false), - Name = table.Column(type: "nvarchar(450)", nullable: false), - Value = table.Column(type: "nvarchar(max)", nullable: true) - }, - constraints: table => - { - table.PrimaryKey("PK_UserTokens", x => new { x.UserId, x.LoginProvider, x.Name }); - table.ForeignKey( - name: "FK_UserTokens_Users_UserId", - column: x => x.UserId, - principalTable: "Users", - principalColumn: "Id", - onDelete: ReferentialAction.Cascade); - }); - - migrationBuilder.CreateTable( - name: "DialecticStages", - columns: table => new - { - Id = table.Column(type: "nvarchar(450)", nullable: false), - StageType = table.Column(type: "int", nullable: false), - Content = table.Column(type: "nvarchar(max)", nullable: false), - CreatedAt = table.Column(type: "datetime2", nullable: false), - DialecticId = table.Column(type: "nvarchar(450)", nullable: false), - AuthorId = table.Column(type: "nvarchar(450)", nullable: false) - }, - constraints: table => - { - table.PrimaryKey("PK_DialecticStages", x => x.Id); - table.ForeignKey( - name: "FK_DialecticStages_Dialectics_DialecticId", - column: x => x.DialecticId, - principalTable: "Dialectics", - principalColumn: "Id", - onDelete: ReferentialAction.Cascade); - table.ForeignKey( - name: "FK_DialecticStages_Users_AuthorId", - column: x => x.AuthorId, - principalTable: "Users", - principalColumn: "Id", - onDelete: ReferentialAction.Restrict); - }); - - migrationBuilder.CreateIndex( - name: "IX_Dialectics_CreatedById", - table: "Dialectics", - column: "CreatedById"); - - migrationBuilder.CreateIndex( - name: "IX_Dialectics_OrganizationId", - table: "Dialectics", - column: "OrganizationId"); - - migrationBuilder.CreateIndex( - name: "IX_DialecticStages_AuthorId", - table: "DialecticStages", - column: "AuthorId"); - - migrationBuilder.CreateIndex( - name: "IX_DialecticStages_DialecticId", - table: "DialecticStages", - column: "DialecticId"); - - migrationBuilder.CreateIndex( - name: "IX_InvalidatedTokens_Jwt", - table: "InvalidatedTokens", - column: "Jwt", - unique: true); - - migrationBuilder.CreateIndex( - name: "IX_Movements_CreatedById", - table: "Movements", - column: "CreatedById"); - - migrationBuilder.CreateIndex( - name: "IX_Movements_OrganizationId", - table: "Movements", - column: "OrganizationId"); - - migrationBuilder.CreateIndex( - name: "IX_Organizations_Name", - table: "Organizations", - column: "Name", - unique: true); - - migrationBuilder.CreateIndex( - name: "IX_RoleClaims_RoleId", - table: "RoleClaims", - column: "RoleId"); - - migrationBuilder.CreateIndex( - name: "RoleNameIndex", - table: "Roles", - column: "NormalizedName", - unique: true, - filter: "[NormalizedName] IS NOT NULL"); - - migrationBuilder.CreateIndex( - name: "IX_UserClaims_UserId", - table: "UserClaims", - column: "UserId"); - - migrationBuilder.CreateIndex( - name: "IX_UserConnections_AppUserId", - table: "UserConnections", - column: "AppUserId"); - - migrationBuilder.CreateIndex( - name: "IX_UserConnections_AppUserId1", - table: "UserConnections", - column: "AppUserId1"); - - migrationBuilder.CreateIndex( - name: "IX_UserConnections_User2Id", - table: "UserConnections", - column: "User2Id"); - - migrationBuilder.CreateIndex( - name: "IX_UserLogins_UserId", - table: "UserLogins", - column: "UserId"); - - migrationBuilder.CreateIndex( - name: "IX_UserOrganizations_OrganizationId", - table: "UserOrganizations", - column: "OrganizationId"); - - migrationBuilder.CreateIndex( - name: "IX_UserRoles_RoleId", - table: "UserRoles", - column: "RoleId"); - - migrationBuilder.CreateIndex( - name: "EmailIndex", - table: "Users", - column: "NormalizedEmail"); - - migrationBuilder.CreateIndex( - name: "UserNameIndex", - table: "Users", - column: "NormalizedUserName", - unique: true, - filter: "[NormalizedUserName] IS NOT NULL"); - } - - /// - protected override void Down(MigrationBuilder migrationBuilder) - { - migrationBuilder.DropTable( - name: "DialecticStages"); - - migrationBuilder.DropTable( - name: "InvalidatedTokens"); - - migrationBuilder.DropTable( - name: "Movements"); - - migrationBuilder.DropTable( - name: "RoleClaims"); - - migrationBuilder.DropTable( - name: "UserClaims"); - - migrationBuilder.DropTable( - name: "UserConnections"); - - migrationBuilder.DropTable( - name: "UserLogins"); - - migrationBuilder.DropTable( - name: "UserOrganizations"); - - migrationBuilder.DropTable( - name: "UserRoles"); - - migrationBuilder.DropTable( - name: "UserTokens"); - - migrationBuilder.DropTable( - name: "Dialectics"); - - migrationBuilder.DropTable( - name: "Roles"); - - migrationBuilder.DropTable( - name: "Organizations"); - - migrationBuilder.DropTable( - name: "Users"); - } - } -} diff --git a/src/Ayllu.Infrastructure/Migrations/AppDbContextModelSnapshot.cs b/src/Ayllu.Infrastructure/Migrations/AppDbContextModelSnapshot.cs deleted file mode 100644 index 65600ab..0000000 --- a/src/Ayllu.Infrastructure/Migrations/AppDbContextModelSnapshot.cs +++ /dev/null @@ -1,616 +0,0 @@ -// -using System; -using Ayllu.Infrastructure.Data; -using Microsoft.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore.Infrastructure; -using Microsoft.EntityFrameworkCore.Metadata; -using Microsoft.EntityFrameworkCore.Storage.ValueConversion; - -#nullable disable - -namespace Ayllu.Infrastructure.Migrations -{ - [DbContext(typeof(AppDbContext))] - partial class AppDbContextModelSnapshot : ModelSnapshot - { - protected override void BuildModel(ModelBuilder modelBuilder) - { -#pragma warning disable 612, 618 - modelBuilder - .HasAnnotation("ProductVersion", "9.0.8") - .HasAnnotation("Relational:MaxIdentifierLength", 128); - - SqlServerModelBuilderExtensions.UseIdentityColumns(modelBuilder); - - modelBuilder.Entity("Ayllu.Domain.Entities.AppRole", b => - { - b.Property("Id") - .HasColumnType("nvarchar(450)"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasColumnType("nvarchar(max)"); - - b.Property("Name") - .HasMaxLength(256) - .HasColumnType("nvarchar(256)"); - - b.Property("NormalizedName") - .HasMaxLength(256) - .HasColumnType("nvarchar(256)"); - - b.HasKey("Id"); - - b.HasIndex("NormalizedName") - .IsUnique() - .HasDatabaseName("RoleNameIndex") - .HasFilter("[NormalizedName] IS NOT NULL"); - - b.ToTable("Roles", (string)null); - }); - - modelBuilder.Entity("Ayllu.Domain.Entities.AppUser", b => - { - b.Property("Id") - .HasColumnType("nvarchar(450)"); - - b.Property("AccessFailedCount") - .HasColumnType("int"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasColumnType("nvarchar(max)"); - - b.Property("Email") - .HasMaxLength(256) - .HasColumnType("nvarchar(256)"); - - b.Property("EmailConfirmed") - .HasColumnType("bit"); - - b.Property("LastName") - .IsRequired() - .HasColumnType("nvarchar(max)"); - - b.Property("LockoutEnabled") - .HasColumnType("bit"); - - b.Property("LockoutEnd") - .HasColumnType("datetimeoffset"); - - b.Property("Name") - .IsRequired() - .HasColumnType("nvarchar(max)"); - - b.Property("NormalizedEmail") - .HasMaxLength(256) - .HasColumnType("nvarchar(256)"); - - b.Property("NormalizedUserName") - .HasMaxLength(256) - .HasColumnType("nvarchar(256)"); - - b.Property("PasswordHash") - .HasColumnType("nvarchar(max)"); - - b.Property("PhoneNumber") - .HasColumnType("nvarchar(max)"); - - b.Property("PhoneNumberConfirmed") - .HasColumnType("bit"); - - b.Property("ProfilePictureUrl") - .HasColumnType("nvarchar(max)"); - - b.Property("SecurityStamp") - .HasColumnType("nvarchar(max)"); - - b.Property("TwoFactorEnabled") - .HasColumnType("bit"); - - b.Property("UserName") - .HasMaxLength(256) - .HasColumnType("nvarchar(256)"); - - b.HasKey("Id"); - - b.HasIndex("NormalizedEmail") - .HasDatabaseName("EmailIndex"); - - b.HasIndex("NormalizedUserName") - .IsUnique() - .HasDatabaseName("UserNameIndex") - .HasFilter("[NormalizedUserName] IS NOT NULL"); - - b.ToTable("Users", (string)null); - }); - - modelBuilder.Entity("Ayllu.Domain.Entities.AppUserOrganization", b => - { - b.Property("UserId") - .HasColumnType("nvarchar(450)"); - - b.Property("OrganizationId") - .HasColumnType("nvarchar(450)"); - - b.Property("Role") - .HasColumnType("int"); - - b.HasKey("UserId", "OrganizationId"); - - b.HasIndex("OrganizationId"); - - b.ToTable("UserOrganizations", (string)null); - }); - - modelBuilder.Entity("Ayllu.Domain.Entities.Dialectic", b => - { - b.Property("Id") - .HasColumnType("nvarchar(450)"); - - b.Property("CreatedAt") - .HasColumnType("datetime2"); - - b.Property("CreatedById") - .IsRequired() - .HasColumnType("nvarchar(450)"); - - b.Property("OrganizationId") - .IsRequired() - .HasColumnType("nvarchar(450)"); - - b.Property("Title") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("nvarchar(200)"); - - b.HasKey("Id"); - - b.HasIndex("CreatedById"); - - b.HasIndex("OrganizationId"); - - b.ToTable("Dialectics", (string)null); - }); - - modelBuilder.Entity("Ayllu.Domain.Entities.DialecticStage", b => - { - b.Property("Id") - .HasColumnType("nvarchar(450)"); - - b.Property("AuthorId") - .IsRequired() - .HasColumnType("nvarchar(450)"); - - b.Property("Content") - .IsRequired() - .HasColumnType("nvarchar(max)"); - - b.Property("CreatedAt") - .HasColumnType("datetime2"); - - b.Property("DialecticId") - .IsRequired() - .HasColumnType("nvarchar(450)"); - - b.Property("StageType") - .HasColumnType("int"); - - b.HasKey("Id"); - - b.HasIndex("AuthorId"); - - b.HasIndex("DialecticId"); - - b.ToTable("DialecticStages", (string)null); - }); - - modelBuilder.Entity("Ayllu.Domain.Entities.InvalidatedToken", b => - { - b.Property("Id") - .HasColumnType("nvarchar(450)"); - - b.Property("ExpirationDate") - .HasColumnType("datetime2"); - - b.Property("InvalidatedAt") - .HasColumnType("datetime2"); - - b.Property("Jwt") - .IsRequired() - .HasColumnType("nvarchar(450)"); - - b.HasKey("Id"); - - b.HasIndex("Jwt") - .IsUnique(); - - b.ToTable("InvalidatedTokens", (string)null); - }); - - modelBuilder.Entity("Ayllu.Domain.Entities.Movement", b => - { - b.Property("Id") - .HasColumnType("nvarchar(450)"); - - b.Property("CreatedAt") - .HasColumnType("datetime2"); - - b.Property("CreatedById") - .IsRequired() - .HasColumnType("nvarchar(450)"); - - b.Property("Description") - .HasMaxLength(4000) - .HasColumnType("nvarchar(4000)"); - - b.Property("OrganizationId") - .IsRequired() - .HasColumnType("nvarchar(450)"); - - b.Property("Title") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("nvarchar(200)"); - - b.HasKey("Id"); - - b.HasIndex("CreatedById"); - - b.HasIndex("OrganizationId"); - - b.ToTable("Movements", (string)null); - }); - - modelBuilder.Entity("Ayllu.Domain.Entities.Organization", b => - { - b.Property("Id") - .HasColumnType("nvarchar(450)"); - - b.Property("Description") - .HasMaxLength(2000) - .HasColumnType("nvarchar(2000)"); - - b.Property("LogoUrl") - .HasMaxLength(1000) - .HasColumnType("nvarchar(1000)"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("nvarchar(200)"); - - b.HasKey("Id"); - - b.HasIndex("Name") - .IsUnique(); - - b.ToTable("Organizations", (string)null); - }); - - modelBuilder.Entity("Ayllu.Domain.Entities.UserConnection", b => - { - b.Property("User1Id") - .HasColumnType("nvarchar(450)"); - - b.Property("User2Id") - .HasColumnType("nvarchar(450)"); - - b.Property("AppUserId") - .HasColumnType("nvarchar(450)"); - - b.Property("AppUserId1") - .HasColumnType("nvarchar(450)"); - - b.Property("CreatedAt") - .HasColumnType("datetime2"); - - b.Property("Status") - .HasColumnType("int"); - - b.HasKey("User1Id", "User2Id"); - - b.HasIndex("AppUserId"); - - b.HasIndex("AppUserId1"); - - b.HasIndex("User2Id"); - - b.ToTable("UserConnections", null, t => - { - t.HasCheckConstraint("CK_UserConnections_Order", "[User1Id] < [User2Id]"); - }); - }); - - modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityRoleClaim", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int"); - - SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); - - b.Property("ClaimType") - .HasColumnType("nvarchar(max)"); - - b.Property("ClaimValue") - .HasColumnType("nvarchar(max)"); - - b.Property("RoleId") - .IsRequired() - .HasColumnType("nvarchar(450)"); - - b.HasKey("Id"); - - b.HasIndex("RoleId"); - - b.ToTable("RoleClaims", (string)null); - }); - - modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserClaim", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int"); - - SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); - - b.Property("ClaimType") - .HasColumnType("nvarchar(max)"); - - b.Property("ClaimValue") - .HasColumnType("nvarchar(max)"); - - b.Property("UserId") - .IsRequired() - .HasColumnType("nvarchar(450)"); - - b.HasKey("Id"); - - b.HasIndex("UserId"); - - b.ToTable("UserClaims", (string)null); - }); - - modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserLogin", b => - { - b.Property("LoginProvider") - .HasColumnType("nvarchar(450)"); - - b.Property("ProviderKey") - .HasColumnType("nvarchar(450)"); - - b.Property("ProviderDisplayName") - .HasColumnType("nvarchar(max)"); - - b.Property("UserId") - .IsRequired() - .HasColumnType("nvarchar(450)"); - - b.HasKey("LoginProvider", "ProviderKey"); - - b.HasIndex("UserId"); - - b.ToTable("UserLogins", (string)null); - }); - - modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserRole", b => - { - b.Property("UserId") - .HasColumnType("nvarchar(450)"); - - b.Property("RoleId") - .HasColumnType("nvarchar(450)"); - - b.HasKey("UserId", "RoleId"); - - b.HasIndex("RoleId"); - - b.ToTable("UserRoles", (string)null); - }); - - modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserToken", b => - { - b.Property("UserId") - .HasColumnType("nvarchar(450)"); - - b.Property("LoginProvider") - .HasColumnType("nvarchar(450)"); - - b.Property("Name") - .HasColumnType("nvarchar(450)"); - - b.Property("Value") - .HasColumnType("nvarchar(max)"); - - b.HasKey("UserId", "LoginProvider", "Name"); - - b.ToTable("UserTokens", (string)null); - }); - - modelBuilder.Entity("Ayllu.Domain.Entities.AppUserOrganization", b => - { - b.HasOne("Ayllu.Domain.Entities.Organization", "Organization") - .WithMany("Members") - .HasForeignKey("OrganizationId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("Ayllu.Domain.Entities.AppUser", "User") - .WithMany("OrganizationMemberships") - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Organization"); - - b.Navigation("User"); - }); - - modelBuilder.Entity("Ayllu.Domain.Entities.Dialectic", b => - { - b.HasOne("Ayllu.Domain.Entities.AppUser", "CreatedBy") - .WithMany("DialecticsCreated") - .HasForeignKey("CreatedById") - .OnDelete(DeleteBehavior.Restrict) - .IsRequired(); - - b.HasOne("Ayllu.Domain.Entities.Organization", "Organization") - .WithMany("Dialectics") - .HasForeignKey("OrganizationId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("CreatedBy"); - - b.Navigation("Organization"); - }); - - modelBuilder.Entity("Ayllu.Domain.Entities.DialecticStage", b => - { - b.HasOne("Ayllu.Domain.Entities.AppUser", "Author") - .WithMany("DialecticStagesAuthored") - .HasForeignKey("AuthorId") - .OnDelete(DeleteBehavior.Restrict) - .IsRequired(); - - b.HasOne("Ayllu.Domain.Entities.Dialectic", "Dialectic") - .WithMany("Stages") - .HasForeignKey("DialecticId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Author"); - - b.Navigation("Dialectic"); - }); - - modelBuilder.Entity("Ayllu.Domain.Entities.Movement", b => - { - b.HasOne("Ayllu.Domain.Entities.AppUser", "CreatedBy") - .WithMany("MovementsCreated") - .HasForeignKey("CreatedById") - .OnDelete(DeleteBehavior.Restrict) - .IsRequired(); - - b.HasOne("Ayllu.Domain.Entities.Organization", "Organization") - .WithMany("Movements") - .HasForeignKey("OrganizationId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("CreatedBy"); - - b.Navigation("Organization"); - }); - - modelBuilder.Entity("Ayllu.Domain.Entities.UserConnection", b => - { - b.HasOne("Ayllu.Domain.Entities.AppUser", null) - .WithMany("ConnectionsReceived") - .HasForeignKey("AppUserId"); - - b.HasOne("Ayllu.Domain.Entities.AppUser", null) - .WithMany("ConnectionsRequested") - .HasForeignKey("AppUserId1"); - - b.HasOne("Ayllu.Domain.Entities.AppUser", "User1") - .WithMany() - .HasForeignKey("User1Id") - .OnDelete(DeleteBehavior.Restrict) - .IsRequired(); - - b.HasOne("Ayllu.Domain.Entities.AppUser", "User2") - .WithMany() - .HasForeignKey("User2Id") - .OnDelete(DeleteBehavior.Restrict) - .IsRequired(); - - b.Navigation("User1"); - - b.Navigation("User2"); - }); - - modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityRoleClaim", b => - { - b.HasOne("Ayllu.Domain.Entities.AppRole", null) - .WithMany() - .HasForeignKey("RoleId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserClaim", b => - { - b.HasOne("Ayllu.Domain.Entities.AppUser", null) - .WithMany() - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserLogin", b => - { - b.HasOne("Ayllu.Domain.Entities.AppUser", null) - .WithMany() - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserRole", b => - { - b.HasOne("Ayllu.Domain.Entities.AppRole", null) - .WithMany() - .HasForeignKey("RoleId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("Ayllu.Domain.Entities.AppUser", null) - .WithMany() - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserToken", b => - { - b.HasOne("Ayllu.Domain.Entities.AppUser", null) - .WithMany() - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("Ayllu.Domain.Entities.AppUser", b => - { - b.Navigation("ConnectionsReceived"); - - b.Navigation("ConnectionsRequested"); - - b.Navigation("DialecticStagesAuthored"); - - b.Navigation("DialecticsCreated"); - - b.Navigation("MovementsCreated"); - - b.Navigation("OrganizationMemberships"); - }); - - modelBuilder.Entity("Ayllu.Domain.Entities.Dialectic", b => - { - b.Navigation("Stages"); - }); - - modelBuilder.Entity("Ayllu.Domain.Entities.Organization", b => - { - b.Navigation("Dialectics"); - - b.Navigation("Members"); - - b.Navigation("Movements"); - }); -#pragma warning restore 612, 618 - } - } -} diff --git a/src/Ayllu.Infrastructure/Repositories/OrganizationRoleRepository.cs b/src/Ayllu.Infrastructure/Repositories/OrganizationRoleRepository.cs deleted file mode 100644 index a9622ec..0000000 --- a/src/Ayllu.Infrastructure/Repositories/OrganizationRoleRepository.cs +++ /dev/null @@ -1,28 +0,0 @@ -using Ayllu.Application.Common.Interfaces; -using Ayllu.Infrastructure.Data; -using Microsoft.EntityFrameworkCore; - -namespace Ayllu.Infrastructure.Repositories -{ - public class OrganizationRolesRepository(AppDbContext context) : IOrganizationRolesRepository - { - public async Task> GetUserOrganizationRolesAsync(string userId) - { - return await context.UserOrganizations - .Include(uo => uo.Organization) - .Where(uo => uo.UserId == userId) - .Select(uo => uo.Role) - .ToListAsync(); - } - - public async Task IsUserInRoleInOrganizationAsync(string userId, string organizationId, string roleName) - { - return await context.UserOrganizations - .Include(uo => uo.Organization) - .AnyAsync(uo => - uo.UserId == userId && - uo.OrganizationId == organizationId && - uo.Role == roleName); - } - } -} diff --git a/src/Ayllu.Infrastructure/Services/TokenGenerator.cs b/src/Ayllu.Infrastructure/Services/TokenGenerator.cs deleted file mode 100644 index 4b9c455..0000000 --- a/src/Ayllu.Infrastructure/Services/TokenGenerator.cs +++ /dev/null @@ -1,119 +0,0 @@ -using Ayllu.Application.Common.Interfaces; -using Ayllu.Domain.Entities; -using Ayllu.Infrastructure.Data; -using Microsoft.Extensions.Configuration; -using Microsoft.Extensions.Logging; -using Microsoft.IdentityModel.Tokens; -using System.IdentityModel.Tokens.Jwt; -using System.Security.Claims; -using System.Security.Cryptography; -using System.Text; - -namespace Ayllu.Infrastructure.Services; - -public class TokenGenerator(IConfiguration configuration, ILogger logger, AppDbContext context) : ITokenGenerator -{ - public (string jwt, DateTime expirationDate, string refreshToken) GenerateToken( - string username, - string email, - string organization, - string phoneNumber, - IList roles, - IList organizationRoles) - { - try - { - var jwtSettings = configuration.GetSection("JwtSettings"); - var secretKey = jwtSettings["SecretKey"] ?? throw new InvalidOperationException("JWT SecretKey missing"); - var issuer = jwtSettings["Issuer"]; - var audience = jwtSettings["Audience"]; - var expiresInMinutes = int.Parse(jwtSettings["ExpiresInMinutes"] ?? "60"); - - var key = new SymmetricSecurityKey(Encoding.UTF8.GetBytes(secretKey)); - var creds = new SigningCredentials(key, SecurityAlgorithms.HmacSha256); - - var expiration = DateTime.UtcNow.AddMinutes(expiresInMinutes); - - // Claims básicos - List claims = - [ - new(JwtRegisteredClaimNames.Sub, username), - new(JwtRegisteredClaimNames.Email, email), - new("org", organization ?? string.Empty), - new(JwtRegisteredClaimNames.PhoneNumber, phoneNumber ?? string.Empty), - new(JwtRegisteredClaimNames.Jti, Guid.NewGuid().ToString()) - ]; - - // Roles do sistema - foreach (var role in roles) - { - claims.Add(new Claim(ClaimTypes.Role, role)); - } - - // Roles dentro da organização - foreach (var orgRole in organizationRoles) - { - claims.Add(new Claim("org_role", orgRole)); - } - - // Criar JWT - var token = new JwtSecurityToken( - issuer, - audience, - claims, - expires: expiration, - signingCredentials: creds - ); - - var jwt = new JwtSecurityTokenHandler().WriteToken(token); - - // Criar Refresh Token - var refreshToken = GenerateRefreshToken(); - - return (jwt, expiration, refreshToken); - - } - catch (Exception e) - { - logger.LogError(e, "Erro ao gerar token JWT: {Message}", e.Message); - throw new InvalidOperationException("Erro ao gerar o token JWT", e); - } - } - - public void Invalidate(string jwt) - { - try - { - var handler = new System.IdentityModel.Tokens.Jwt.JwtSecurityTokenHandler(); - var token = handler.ReadJwtToken(jwt); - var expiration = token.ValidTo; - - var invalidatedToken = new InvalidatedToken - { - Jwt = jwt, - ExpirationDate = expiration - }; - - context.InvalidatedTokens.Add(invalidatedToken); - context.SaveChanges(); - } - catch (Exception e) - { - logger.LogError(e, "Erro ao invalidar token: {Message}", e.Message); - throw new InvalidOperationException("Erro ao invalidar token", e); - } - } - - public bool IsTokenInvalidated(string jwt) - { - return context.InvalidatedTokens.Any(t => t.Jwt == jwt); - } - - private static string GenerateRefreshToken() - { - var randomNumber = new byte[64]; - using var rng = RandomNumberGenerator.Create(); - rng.GetBytes(randomNumber); - return Convert.ToBase64String(randomNumber); - } -} diff --git a/src/Ayllu.Web/App.razor b/src/Ayllu.Web/App.razor index 6fd3ed1..1a2b4a6 100644 --- a/src/Ayllu.Web/App.razor +++ b/src/Ayllu.Web/App.razor @@ -1,4 +1,6 @@ - +@namespace Ayllu.Web + + @@ -10,3 +12,4 @@ + \ No newline at end of file diff --git a/src/Ayllu.Web/App.razor.cs b/src/Ayllu.Web/App.razor.cs new file mode 100644 index 0000000..5594994 --- /dev/null +++ b/src/Ayllu.Web/App.razor.cs @@ -0,0 +1,9 @@ +using Microsoft.AspNetCore.Components; + +namespace Ayllu.Web +{ + public partial class App : ComponentBase + { + + } +} diff --git a/src/Ayllu.Web/Ayllu.Web.csproj b/src/Ayllu.Web/Ayllu.Web.csproj index 0b91338..6ffc1fd 100644 --- a/src/Ayllu.Web/Ayllu.Web.csproj +++ b/src/Ayllu.Web/Ayllu.Web.csproj @@ -1,14 +1,37 @@ - + - net9.0 + net8.0 enable enable + Ayllu.Web + 0.0.1.0 - + + + + + + + + + True + True + Strings.resx + + + + + + PublicResXFileCodeGenerator + Strings.Designer.cs + + + + diff --git a/src/Ayllu.Web/Components/Layout/MainLayout.razor b/src/Ayllu.Web/Components/Layout/MainLayout.razor new file mode 100644 index 0000000..e109459 --- /dev/null +++ b/src/Ayllu.Web/Components/Layout/MainLayout.razor @@ -0,0 +1,26 @@ +@inherits LayoutComponentBase +@* Required *@ + + + +@* Needed for dialogs *@ + + +@* Needed for snackbars *@ + + +
+ + +
+
+ About +
+ +
+ @Body +
+
+
diff --git a/src/Ayllu.Web/Layout/MainLayout.razor.css b/src/Ayllu.Web/Components/Layout/MainLayout.razor.css similarity index 100% rename from src/Ayllu.Web/Layout/MainLayout.razor.css rename to src/Ayllu.Web/Components/Layout/MainLayout.razor.css diff --git a/src/Ayllu.Web/Layout/NavMenu.razor b/src/Ayllu.Web/Components/Layout/NavMenu.razor similarity index 100% rename from src/Ayllu.Web/Layout/NavMenu.razor rename to src/Ayllu.Web/Components/Layout/NavMenu.razor diff --git a/src/Ayllu.Web/Layout/NavMenu.razor.css b/src/Ayllu.Web/Components/Layout/NavMenu.razor.css similarity index 100% rename from src/Ayllu.Web/Layout/NavMenu.razor.css rename to src/Ayllu.Web/Components/Layout/NavMenu.razor.css diff --git a/src/Ayllu.Web/Pages/Counter.razor b/src/Ayllu.Web/Components/Pages/Counter.razor similarity index 100% rename from src/Ayllu.Web/Pages/Counter.razor rename to src/Ayllu.Web/Components/Pages/Counter.razor diff --git a/src/Ayllu.Web/Pages/Home.razor b/src/Ayllu.Web/Components/Pages/Home.razor similarity index 100% rename from src/Ayllu.Web/Pages/Home.razor rename to src/Ayllu.Web/Components/Pages/Home.razor diff --git a/src/Ayllu.Web/Pages/Weather.razor b/src/Ayllu.Web/Components/Pages/Weather.razor similarity index 100% rename from src/Ayllu.Web/Pages/Weather.razor rename to src/Ayllu.Web/Components/Pages/Weather.razor diff --git a/src/Ayllu.Web/Program.cs b/src/Ayllu.Web/Program.cs index 53ddeb8..f981943 100644 --- a/src/Ayllu.Web/Program.cs +++ b/src/Ayllu.Web/Program.cs @@ -1,10 +1,12 @@ +using Ayllu.Web; using Microsoft.AspNetCore.Components.Web; using Microsoft.AspNetCore.Components.WebAssembly.Hosting; -using Ayllu.Web; +using MudBlazor.Services; var builder = WebAssemblyHostBuilder.CreateDefault(args); builder.RootComponents.Add("#app"); builder.RootComponents.Add("head::after"); +builder.Services.AddMudServices(); builder.Services.AddScoped(sp => new HttpClient { BaseAddress = new Uri(builder.HostEnvironment.BaseAddress) }); diff --git a/src/Ayllu.Web/Resources/Strings/Strings.Designer.cs b/src/Ayllu.Web/Resources/Strings/Strings.Designer.cs new file mode 100644 index 0000000..bc90935 --- /dev/null +++ b/src/Ayllu.Web/Resources/Strings/Strings.Designer.cs @@ -0,0 +1,72 @@ +//------------------------------------------------------------------------------ +// +// O código foi gerado por uma ferramenta. +// Versão de Tempo de Execução:4.0.30319.42000 +// +// As alterações ao arquivo poderão causar comportamento incorreto e serão perdidas se +// o código for gerado novamente. +// +//------------------------------------------------------------------------------ + +namespace Ayllu.Web.Resources.Strings { + using System; + + + /// + /// Uma classe de recurso de tipo de alta segurança, para pesquisar cadeias de caracteres localizadas etc. + /// + // Essa classe foi gerada automaticamente pela classe StronglyTypedResourceBuilder + // através de uma ferramenta como ResGen ou Visual Studio. + // Para adicionar ou remover um associado, edite o arquivo .ResX e execute ResGen novamente + // com a opção /str, ou recrie o projeto do VS. + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "17.0.0.0")] + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] + public class Strings { + + private static global::System.Resources.ResourceManager resourceMan; + + private static global::System.Globalization.CultureInfo resourceCulture; + + [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] + internal Strings() { + } + + /// + /// Retorna a instância de ResourceManager armazenada em cache usada por essa classe. + /// + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] + public static global::System.Resources.ResourceManager ResourceManager { + get { + if (object.ReferenceEquals(resourceMan, null)) { + global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("Ayllu.Web.Resources.Strings.Strings", typeof(Strings).Assembly); + resourceMan = temp; + } + return resourceMan; + } + } + + /// + /// Substitui a propriedade CurrentUICulture do thread atual para todas as + /// pesquisas de recursos que usam essa classe de recurso de tipo de alta segurança. + /// + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] + public static global::System.Globalization.CultureInfo Culture { + get { + return resourceCulture; + } + set { + resourceCulture = value; + } + } + + /// + /// Consulta uma cadeia de caracteres localizada semelhante a Ayllu. + /// + public static string AppName { + get { + return ResourceManager.GetString("AppName", resourceCulture); + } + } + } +} diff --git a/src/Ayllu.Web/Resources/Strings/Strings.en-US.resx b/src/Ayllu.Web/Resources/Strings/Strings.en-US.resx new file mode 100644 index 0000000..ca269d3 --- /dev/null +++ b/src/Ayllu.Web/Resources/Strings/Strings.en-US.resx @@ -0,0 +1,123 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + Ayllu + + \ No newline at end of file diff --git a/src/Ayllu.Web/Resources/Strings/Strings.resx b/src/Ayllu.Web/Resources/Strings/Strings.resx new file mode 100644 index 0000000..ca269d3 --- /dev/null +++ b/src/Ayllu.Web/Resources/Strings/Strings.resx @@ -0,0 +1,123 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + Ayllu + + \ No newline at end of file diff --git a/src/Ayllu.Web/_Imports.razor b/src/Ayllu.Web/_Imports.razor index f4ef3ab..0cdb3cf 100644 --- a/src/Ayllu.Web/_Imports.razor +++ b/src/Ayllu.Web/_Imports.razor @@ -7,4 +7,7 @@ @using Microsoft.AspNetCore.Components.WebAssembly.Http @using Microsoft.JSInterop @using Ayllu.Web -@using Ayllu.Web.Layout +@using Ayllu.Web.Components +@using Ayllu.Web.Components.Layout +@using Ayllu.Web.Components.Pages +@using MudBlazor \ No newline at end of file diff --git a/src/Ayllu.Web/wwwroot/index.html b/src/Ayllu.Web/wwwroot/index.html index bd45bca..8ff129d 100644 --- a/src/Ayllu.Web/wwwroot/index.html +++ b/src/Ayllu.Web/wwwroot/index.html @@ -10,6 +10,9 @@ + + + @@ -27,6 +30,8 @@ 🗙 + + diff --git a/src/Ayllu/App.xaml b/src/Ayllu/App.xaml new file mode 100644 index 0000000..378f312 --- /dev/null +++ b/src/Ayllu/App.xaml @@ -0,0 +1,17 @@ + + + + + + + + + + diff --git a/src/Ayllu/App.xaml.cs b/src/Ayllu/App.xaml.cs new file mode 100644 index 0000000..6655a0c --- /dev/null +++ b/src/Ayllu/App.xaml.cs @@ -0,0 +1,12 @@ +namespace Ayllu +{ + public partial class App : Application + { + public App() + { + InitializeComponent(); + + MainPage = new MainPage(); + } + } +} diff --git a/src/Ayllu/Ayllu.csproj b/src/Ayllu/Ayllu.csproj new file mode 100644 index 0000000..ebd2b8a --- /dev/null +++ b/src/Ayllu/Ayllu.csproj @@ -0,0 +1,65 @@ + + + + net8.0-android;net8.0-ios + Exe + Ayllu + true + true + enable + false + enable + Ayllu + com.remotecodehub.ayllu + 1.0 + 1 + android-arm64;android-arm;android-x86;android-x64 + ios-arm64;iossimulator-arm64;iossimulator-x64 + 24.0 + 14.2 + pt-BR + 0.0.1.0 + pt-BR + True + Ayllu.xml + + + + + + + + + + + + + + + + + + + + + + + + + + + + True + True + Strings.resx + + + + + + ResXFileCodeGenerator + Strings.Designer.cs + + + + diff --git a/src/Ayllu/Ayllu.xml b/src/Ayllu/Ayllu.xml new file mode 100644 index 0000000..6b4710c --- /dev/null +++ b/src/Ayllu/Ayllu.xml @@ -0,0 +1,176 @@ + + + + Ayllu + + + + + Main entry point for the application. + + + + + Main method to create and configure the Maui application. + + The builded services and configurations ready to be executed on the platform + + + + Provides application-specific behavior to supplement the default Application class. + + + + + Initializes the singleton application object. This is the first line of authored code + executed, and as such is the logical equivalent of main() or WinMain(). + + + + + InitializeComponent() + + + + + GetXamlType(Type) + + + + + GetXamlType(String) + + + + + GetXmlnsDefinitions() + + + + + Program class + + + + + Uma classe de recurso de tipo de alta segurança, para pesquisar cadeias de caracteres localizadas etc. + + + + + Retorna a instância de ResourceManager armazenada em cache usada por essa classe. + + + + + Substitui a propriedade CurrentUICulture do thread atual para todas as + pesquisas de recursos que usam essa classe de recurso de tipo de alta segurança. + + + + + Consulta uma cadeia de caracteres localizada semelhante a Ayllu. + + + + + Main class for providing metadata for the app or library + + + + + GetXamlType(Type) + + + + + GetXamlType(String) + + + + + GetXmlnsDefinitions() + + + + The major version of the Windows App SDK release. + + + The minor version of the Windows App SDK release. + + + The patch version of the Windows App SDK release. + + + The major and minor version of the Windows App SDK release, encoded as a uint32_t (0xMMMMNNNN where M=major, N=minor). + + + The Windows App SDK release's channel; for example, "preview", or empty string for stable. + + + The Windows App SDK release's version tag; for example, "preview2", or empty string for stable. + + + The Windows App SDK release's short-form version tag; for example, "p2", or empty string for stable. + + + The Windows App SDK release's version tag, formatted for concatenation when constructing identifiers; for example, "-preview2", or empty string for stable. + + + The Windows App SDK release's short-form version tag, formatted for concatenation when constructing identifiers; for example, "-p2", or empty string for stable. + + + The Windows App SDK runtime's package identity's Publisher. + + + The Windows App SDK runtime's package identity's PublisherId. + + + The major version of the Windows App SDK runtime; for example, 1000. + + + The minor version of the Windows App SDK runtime; for example, 446. + + + The build version of the Windows App SDK runtime; for example, 804. + + + The revision version of the Windows App SDK runtime; for example, 0. + + + The version of the Windows App SDK runtime, as a uint64l for example, 0x03E801BE03240000. + + + The version of the Windows App SDK runtime, as a string (const wchar_t*); for example, "1000.446.804.0". + + + The Windows App SDK runtime's Framework package's family name. + + + The Windows App SDK runtime's Main package's family name. + + + The Windows App SDK runtime's Singleton package's family name. + + + The Windows App SDK runtime's Dynamic Dependency Lifetime Manager (DDLM) package's family name, for x86. + + + The Windows App SDK runtime's Dynamic Dependency Lifetime Manager (DDLM) package's family name, for x64. + + + The Windows App SDK runtime's Dynamic Dependency Lifetime Manager (DDLM) package's family name, for arm64. + + + + Roots RCW types for assemblies referencing old projections. + It is recommended to update those, to get binary size savings. + + + + + Roots all dependent RCW types. + + + + diff --git a/src/Ayllu.Web/Layout/MainLayout.razor b/src/Ayllu/Components/Layout/MainLayout.razor similarity index 69% rename from src/Ayllu.Web/Layout/MainLayout.razor rename to src/Ayllu/Components/Layout/MainLayout.razor index 76eb725..c1e557f 100644 --- a/src/Ayllu.Web/Layout/MainLayout.razor +++ b/src/Ayllu/Components/Layout/MainLayout.razor @@ -1,4 +1,13 @@ @inherits LayoutComponentBase +@* Required *@ + + + +@* Needed for dialogs *@ + + +@* Needed for snackbars *@ +